blob: 772a642392b588eed7a51cf6c6f7d7f92c552824 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using ShiftOS.Engine;
using ShiftOS.Frontend.Desktop;
using ShiftOS.Frontend.GraphicsSubsystem;
namespace ShiftOS.Frontend.Apps
{
[WinOpen("systemstatus")]
[Launcher("System Status", false, null, "System")]
[DefaultTitle("System Status")]
[SidePanel]
public class SystemStatus : GUI.Control, IShiftOSWindow
{
GUI.TextControl _header = null;
GUI.TextControl _mainstatus = null;
public SystemStatus()
{
Width = 720;
Height = 480;
_header = new GUI.TextControl();
_mainstatus = new GUI.TextControl();
AddControl(_header);
AddControl(_mainstatus);
_header.AutoSize = true;
_header.Text = "System Status";
}
public void OnLoad()
{
}
public void OnSkinLoad()
{
}
public bool OnUnload()
{
return true;
}
public void OnUpgrade()
{
}
protected override void OnLayout(GameTime gameTime)
{
_header.Font = SkinEngine.LoadedSkin.HeaderFont;
_header.X = 20;
_header.Y = 20;
_mainstatus.X = 20;
_mainstatus.Y = _header.Y + _header.Height + 10;
_mainstatus.Width = Width - 40;
_mainstatus.Height = Height - (_header.Y + _header.Height) - 40;
_mainstatus.Text = $@"Codepoints: {SaveSystem.CurrentSave.Codepoints}
Upgrades: {SaveSystem.CurrentSave.CountUpgrades()} installed, {Shiftorium.GetDefaults().Count} available
Filesystems:
";
foreach(var mount in Objects.ShiftFS.Utils.Mounts)
{
_mainstatus.Text += $" - {Objects.ShiftFS.Utils.Mounts.IndexOf(mount)}:/ ({mount.Name}){Environment.NewLine}";
}
_mainstatus.Text += $@"
Username: {SaveSystem.CurrentSave.Username}
System name: {SaveSystem.CurrentSave.SystemName}
RAM usage: 0MB/0MB <nyi>
Open programs: {AppearanceManager.OpenForms.Count}";
}
protected override void OnPaint(GraphicsContext gfx)
{
base.OnPaint(gfx);
}
}
}
|