From 07192c6c2e9e0559e2ac2d9478db36fdcb3a2071 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 7 Feb 2017 18:39:30 -0500 Subject: Add default icons for most apps --- ShiftOS.WinForms/Applications/Artpad.cs | 1 + ShiftOS.WinForms/Applications/MUDControlCentre.cs | 1 + ShiftOS.WinForms/Applications/NameChanger.cs | 13 +++++++++---- ShiftOS.WinForms/Applications/Pong.cs | 1 + ShiftOS.WinForms/Applications/Shifter.cs | 1 + ShiftOS.WinForms/Applications/Shiftnet.cs | 1 + ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs | 1 + ShiftOS.WinForms/Applications/Skin Loader.cs | 1 + ShiftOS.WinForms/Applications/Terminal.cs | 1 + ShiftOS.WinForms/Applications/TextPad.cs | 1 + 10 files changed, 18 insertions(+), 4 deletions(-) (limited to 'ShiftOS.WinForms/Applications') diff --git a/ShiftOS.WinForms/Applications/Artpad.cs b/ShiftOS.WinForms/Applications/Artpad.cs index ec26cef..c3b717b 100644 --- a/ShiftOS.WinForms/Applications/Artpad.cs +++ b/ShiftOS.WinForms/Applications/Artpad.cs @@ -44,6 +44,7 @@ namespace ShiftOS.WinForms.Applications [Launcher("Artpad", true, "al_artpad", "Graphics")] [RequiresUpgrade("artpad")] [WinOpen("artpad")] + [DefaultIcon("iconArtpad")] public partial class Artpad : UserControl, IShiftOSWindow { /// diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs index 0479268..595d2e8 100644 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs @@ -41,6 +41,7 @@ namespace ShiftOS.WinForms.Applications [RequiresUpgrade("mud_fundamentals")] [Launcher("MUD Control Centre", true, "al_mud_control_centre", "Networking")] [WinOpen("mud_control_centre")] + [DefaultIcon("iconSysinfo")] [DefaultTitle("MUD Control Centre")] public partial class MUDControlCentre : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/NameChanger.cs b/ShiftOS.WinForms/Applications/NameChanger.cs index c983841..d78c329 100644 --- a/ShiftOS.WinForms/Applications/NameChanger.cs +++ b/ShiftOS.WinForms/Applications/NameChanger.cs @@ -180,17 +180,22 @@ namespace ShiftOS.WinForms.Applications { } public static string GetName(IShiftOSWindow win) + { + return GetNameRaw(win.GetType()); + } + + internal static string GetNameRaw(Type type) { if (SkinEngine.LoadedSkin == null) - return AppearanceManager.GetDefaultTitle(win.GetType()); + return AppearanceManager.GetDefaultTitle(type); if (SkinEngine.LoadedSkin.AppNames == null) SkinEngine.LoadedSkin.AppNames = GetDefault(); - if (!SkinEngine.LoadedSkin.AppNames.ContainsKey(win.GetType().Name)) - SkinEngine.LoadedSkin.AppNames.Add(win.GetType().Name, AppearanceManager.GetDefaultTitle(win.GetType())); + if (!SkinEngine.LoadedSkin.AppNames.ContainsKey(type.Name)) + SkinEngine.LoadedSkin.AppNames.Add(type.Name, AppearanceManager.GetDefaultTitle(type)); - return SkinEngine.LoadedSkin.AppNames[win.GetType().Name]; + return SkinEngine.LoadedSkin.AppNames[type.Name]; } } } diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs index 82c86e5..d61e1fd 100644 --- a/ShiftOS.WinForms/Applications/Pong.cs +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -39,6 +39,7 @@ namespace ShiftOS.WinForms.Applications { [Launcher("Pong", true, "al_pong", "Games")] [WinOpen("pong")] + [DefaultIcon("iconPong")] public partial class Pong : UserControl, IShiftOSWindow { int xVel = 7; diff --git a/ShiftOS.WinForms/Applications/Shifter.cs b/ShiftOS.WinForms/Applications/Shifter.cs index 5b9ea41..4d29cf8 100644 --- a/ShiftOS.WinForms/Applications/Shifter.cs +++ b/ShiftOS.WinForms/Applications/Shifter.cs @@ -43,6 +43,7 @@ namespace ShiftOS.WinForms.Applications [Launcher("Shifter", true, "al_shifter", "Customization")] [RequiresUpgrade("shifter")] [WinOpen("shifter")] + [DefaultIcon("iconShifter")] public partial class Shifter : UserControl, IShiftOSWindow { public Shifter() diff --git a/ShiftOS.WinForms/Applications/Shiftnet.cs b/ShiftOS.WinForms/Applications/Shiftnet.cs index 2425910..48a9147 100644 --- a/ShiftOS.WinForms/Applications/Shiftnet.cs +++ b/ShiftOS.WinForms/Applications/Shiftnet.cs @@ -14,6 +14,7 @@ using static ShiftOS.Engine.SkinEngine; namespace ShiftOS.WinForms.Applications { [Launcher("Shiftnet", false, null, "Networking")] + [DefaultIcon("iconShiftnet")] public partial class Shiftnet : UserControl, IShiftOSWindow { public Shiftnet() diff --git a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs index 2e4dce0..b3724ae 100644 --- a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs +++ b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs @@ -41,6 +41,7 @@ namespace ShiftOS.WinForms.Applications [RequiresUpgrade("shiftorium_gui")] [WinOpen("shiftorium")] [DefaultTitle("Shiftorium")] + [DefaultIcon("iconShiftorium")] public partial class ShiftoriumFrontend : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/Skin Loader.cs b/ShiftOS.WinForms/Applications/Skin Loader.cs index 9933633..58b444c 100644 --- a/ShiftOS.WinForms/Applications/Skin Loader.cs +++ b/ShiftOS.WinForms/Applications/Skin Loader.cs @@ -41,6 +41,7 @@ namespace ShiftOS.WinForms.Applications [RequiresUpgrade("skinning")] [WinOpen("skin_loader")] [DefaultTitle("Skin Loader")] + [DefaultIcon("iconSkinLoader")] public partial class Skin_Loader : UserControl, IShiftOSWindow { public Skin_Loader() diff --git a/ShiftOS.WinForms/Applications/Terminal.cs b/ShiftOS.WinForms/Applications/Terminal.cs index 54a89d7..ff3569b 100644 --- a/ShiftOS.WinForms/Applications/Terminal.cs +++ b/ShiftOS.WinForms/Applications/Terminal.cs @@ -48,6 +48,7 @@ namespace ShiftOS.WinForms.Applications { [Launcher("Terminal", false, null, "Utilities")] [WinOpen("terminal")] + [DefaultIcon("iconTerminal")] public partial class Terminal : UserControl, IShiftOSWindow { public static Stack ConsoleStack = new Stack(); diff --git a/ShiftOS.WinForms/Applications/TextPad.cs b/ShiftOS.WinForms/Applications/TextPad.cs index bbf4846..b70a72c 100644 --- a/ShiftOS.WinForms/Applications/TextPad.cs +++ b/ShiftOS.WinForms/Applications/TextPad.cs @@ -39,6 +39,7 @@ namespace ShiftOS.WinForms.Applications [Launcher("TextPad", true, "al_textpad", "Accessories")] [RequiresUpgrade("textpad")] [WinOpen("textpad")] + [DefaultIcon("iconTextPad")] public partial class TextPad : UserControl, IShiftOSWindow { public TextPad() -- cgit v1.2.3