From 84f689b91a73e512b035df40bbcf556b008a3b81 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Sat, 25 Jun 2016 08:10:03 -0400 Subject: Sort source code into folders. It feels better to know what's responsible for what... Plus I removed some un-needed C# stuff. --- .../AlternateDesktop.Designer.cs | 133 - .../WindowsFormsApplication1/AlternateDesktop.cs | 165 - .../WindowsFormsApplication1/AlternateDesktop.resx | 126 - .../Apps/Appscape.Designer.cs | 862 +++ source/WindowsFormsApplication1/Apps/Appscape.cs | 976 ++++ source/WindowsFormsApplication1/Apps/Appscape.resx | 126 + .../Apps/AppscapeUploader.Designer.cs | 423 ++ .../Apps/AppscapeUploader.cs | 380 ++ .../Apps/AppscapeUploader.resx | 120 + .../Apps/Artpad.Designer.cs | 3589 +++++++++++++ source/WindowsFormsApplication1/Apps/Artpad.cs | 1783 +++++++ source/WindowsFormsApplication1/Apps/Artpad.resx | 138 + .../Apps/BitnoteConverter.Designer.cs | 106 + .../Apps/BitnoteConverter.cs | 65 + .../Apps/BitnoteConverter.resx | 120 + .../Apps/BitnoteDigger.Designer.cs | 337 ++ .../WindowsFormsApplication1/Apps/BitnoteDigger.cs | 234 + .../Apps/BitnoteDigger.resx | 126 + .../Apps/BitnoteWallet.Designer.cs | 243 + .../WindowsFormsApplication1/Apps/BitnoteWallet.cs | 247 + .../Apps/BitnoteWallet.resx | 123 + .../Apps/Dodge.Designer.cs | 230 + source/WindowsFormsApplication1/Apps/Dodge.cs | 291 + source/WindowsFormsApplication1/Apps/Dodge.resx | 126 + .../Apps/File Skimmer.Designer.cs | 245 + .../WindowsFormsApplication1/Apps/File Skimmer.cs | 602 +++ .../Apps/File Skimmer.resx | 338 ++ .../Apps/HoloChat.Designer.cs | 254 + source/WindowsFormsApplication1/Apps/HoloChat.cs | 666 +++ source/WindowsFormsApplication1/Apps/HoloChat.resx | 132 + .../Apps/IconManager.Designer.cs | 135 + .../WindowsFormsApplication1/Apps/IconManager.cs | 125 + .../WindowsFormsApplication1/Apps/IconManager.resx | 120 + .../Apps/KnowledgeInput.Designer.cs | 345 ++ .../Apps/KnowledgeInput.cs | 1425 +++++ .../Apps/KnowledgeInput.resx | 133 + .../Apps/Labyrinth.Designer.cs | 38 + source/WindowsFormsApplication1/Apps/Labyrinth.cs | 20 + .../Apps/NameChanger.Designer.cs | 165 + .../WindowsFormsApplication1/Apps/NameChanger.cs | 107 + .../WindowsFormsApplication1/Apps/NameChanger.resx | 120 + .../Apps/NetGen.Designer.cs | 628 +++ source/WindowsFormsApplication1/Apps/NetGen.cs | 361 ++ source/WindowsFormsApplication1/Apps/NetGen.resx | 138 + .../Apps/NetworkBrowser.Designer.cs | 290 + .../Apps/NetworkBrowser.cs | 301 ++ .../Apps/NetworkBrowser.resx | 123 + .../Apps/PanelManager.Designer.cs | 132 + .../WindowsFormsApplication1/Apps/PanelManager.cs | 74 + .../Apps/PanelManager.resx | 120 + .../WindowsFormsApplication1/Apps/Pong.Designer.cs | 588 ++ source/WindowsFormsApplication1/Apps/Pong.cs | 481 ++ source/WindowsFormsApplication1/Apps/Pong.resx | 143 + .../Apps/Shifter.Designer.cs | 5620 ++++++++++++++++++++ source/WindowsFormsApplication1/Apps/Shifter.cs | 3093 +++++++++++ source/WindowsFormsApplication1/Apps/Shifter.resx | 161 + .../Apps/Shiftnet.Designer.cs | 144 + source/WindowsFormsApplication1/Apps/Shiftnet.cs | 111 + source/WindowsFormsApplication1/Apps/Shiftnet.resx | 120 + .../Apps/ShiftnetDecryptor.Designer.cs | 170 + .../Apps/ShiftnetDecryptor.cs | 156 + .../Apps/ShiftnetDecryptor.resx | 123 + .../Apps/Shiftorium.Designer.cs | 322 ++ source/WindowsFormsApplication1/Apps/Shiftorium.cs | 215 + .../WindowsFormsApplication1/Apps/Shiftorium.resx | 132 + .../Apps/SkinLoader.Designer.cs | 739 +++ source/WindowsFormsApplication1/Apps/SkinLoader.cs | 652 +++ .../WindowsFormsApplication1/Apps/SkinLoader.resx | 126 + .../Apps/Terminal.Designer.cs | 126 + source/WindowsFormsApplication1/Apps/Terminal.cs | 2757 ++++++++++ source/WindowsFormsApplication1/Apps/Terminal.resx | 144 + .../Apps/TextPad.Designer.cs | 181 + source/WindowsFormsApplication1/Apps/TextPad.cs | 239 + source/WindowsFormsApplication1/Apps/TextPad.resx | 126 + .../Apps/WidgetManager.Designer.cs | 252 + .../WindowsFormsApplication1/Apps/WidgetManager.cs | 174 + .../Apps/WidgetManager.resx | 123 + .../WindowsFormsApplication1/Appscape.Designer.cs | 862 --- source/WindowsFormsApplication1/Appscape.cs | 976 ---- source/WindowsFormsApplication1/Appscape.resx | 126 - .../AppscapeUploader.Designer.cs | 423 -- .../WindowsFormsApplication1/AppscapeUploader.cs | 380 -- .../WindowsFormsApplication1/AppscapeUploader.resx | 120 - source/WindowsFormsApplication1/Artpad.Designer.cs | 3589 ------------- source/WindowsFormsApplication1/Artpad.cs | 1783 ------- source/WindowsFormsApplication1/Artpad.resx | 138 - .../AudioResourceClient.cs | 208 - .../BitnoteConverter.Designer.cs | 106 - .../WindowsFormsApplication1/BitnoteConverter.cs | 65 - .../WindowsFormsApplication1/BitnoteConverter.resx | 120 - .../BitnoteDigger.Designer.cs | 337 -- source/WindowsFormsApplication1/BitnoteDigger.cs | 234 - source/WindowsFormsApplication1/BitnoteDigger.resx | 126 - .../BitnoteWallet.Designer.cs | 243 - source/WindowsFormsApplication1/BitnoteWallet.cs | 247 - source/WindowsFormsApplication1/BitnoteWallet.resx | 123 - .../Color_Picker.Designer.cs | 3573 ------------- source/WindowsFormsApplication1/Color_Picker.cs | 2438 --------- source/WindowsFormsApplication1/Color_Picker.resx | 120 - .../WindowsFormsApplication1/Computer.Designer.cs | 66 - source/WindowsFormsApplication1/Computer.cs | 492 -- source/WindowsFormsApplication1/Computer.resx | 120 - .../Connection.Designer.cs | 45 - source/WindowsFormsApplication1/Connection.cs | 39 - source/WindowsFormsApplication1/Connection.resx | 120 - .../ConnectionManager.Designer.cs | 129 - .../WindowsFormsApplication1/ConnectionManager.cs | 91 - .../ConnectionManager.resx | 120 - .../Controls/Computer.Designer.cs | 66 + .../WindowsFormsApplication1/Controls/Computer.cs | 492 ++ .../Controls/Computer.resx | 120 + .../Controls/Connection.Designer.cs | 45 + .../Controls/Connection.cs | 39 + .../Controls/Connection.resx | 120 + .../Controls/DesktopIcon.Designer.cs | 78 + .../Controls/DesktopIcon.cs | 83 + .../Controls/DesktopIcon.resx | 120 + .../Controls/IconControl.Designer.cs | 92 + .../Controls/IconControl.cs | 69 + .../Controls/IconControl.resx | 120 + .../Controls/ImageSelector.Designer.cs | 76 + .../Controls/ImageSelector.cs | 55 + .../Controls/ImageSelector.resx | 120 + .../Controls/NetModuleStatus.Designer.cs | 84 + .../Controls/NetModuleStatus.cs | 46 + .../Controls/NetModuleStatus.resx | 120 + .../Controls/Notification.Designer.cs | 78 + .../Controls/Notification.cs | 39 + .../Controls/Notification.resx | 120 + .../Controls/ProgressBarEX.Designer.cs | 37 + .../Controls/ProgressBarEX.cs | 340 ++ .../Controls/ProgressBarEX.resx | 120 + .../Controls/ShifterColorInput.Designer.cs | 77 + .../Controls/ShifterColorInput.cs | 47 + .../Controls/ShifterColorInput.resx | 120 + .../Controls/ShifterGraphicInput.Designer.cs | 76 + .../Controls/ShifterGraphicInput.cs | 49 + .../Controls/ShifterGraphicInput.resx | 120 + .../Controls/ShifterIntInput.Designer.cs | 83 + .../Controls/ShifterIntInput.cs | 62 + .../Controls/ShifterIntInput.resx | 120 + .../Controls/ShifterTextInput.Designer.cs | 78 + .../Controls/ShifterTextInput.cs | 65 + .../Controls/ShifterTextInput.resx | 120 + .../Controls/WindowBorder.Designer.cs | 270 + .../Controls/WindowBorder.cs | 668 +++ .../Controls/WindowBorder.resx | 129 + .../Controls/infobox.Designer.cs | 187 + .../WindowsFormsApplication1/Controls/infobox.cs | 113 + .../WindowsFormsApplication1/Controls/infobox.resx | 120 + .../Desktop/ShiftOSDesktop.Designer.cs | 1583 ++++++ .../Desktop/ShiftOSDesktop.cs | 1647 ++++++ .../Desktop/ShiftOSDesktop.resx | 153 + .../DesktopIcon.Designer.cs | 78 - source/WindowsFormsApplication1/DesktopIcon.cs | 83 - source/WindowsFormsApplication1/DesktopIcon.resx | 120 - .../Dialogs/Color_Picker.Designer.cs | 3573 +++++++++++++ .../Dialogs/Color_Picker.cs | 2438 +++++++++ .../Dialogs/Color_Picker.resx | 120 + .../Dialogs/Graphic_Picker.Designer.cs | 400 ++ .../Dialogs/Graphic_Picker.cs | 249 + .../Dialogs/Graphic_Picker.resx | 123 + source/WindowsFormsApplication1/Dodge.Designer.cs | 230 - source/WindowsFormsApplication1/Dodge.cs | 291 - source/WindowsFormsApplication1/Dodge.resx | 126 - .../Engine/AudioResourceClient.cs | 208 + .../WindowsFormsApplication1/Engine/Lua_Interp.cs | 1280 +++++ .../WindowsFormsApplication1/Engine/SaveSystem.cs | 662 +++ source/WindowsFormsApplication1/Engine/Viruses.cs | 620 +++ source/WindowsFormsApplication1/Engine/undo.cs | 8 + .../File Skimmer.Designer.cs | 245 - source/WindowsFormsApplication1/File Skimmer.cs | 602 --- source/WindowsFormsApplication1/File Skimmer.resx | 338 -- .../Gameplay/HackUI.Designer.cs | 785 +++ source/WindowsFormsApplication1/Gameplay/HackUI.cs | 1921 +++++++ .../WindowsFormsApplication1/Gameplay/HackUI.resx | 177 + .../WindowsFormsApplication1/Gameplay/Hacking.cs | 801 +++ .../Gameplay/HijackScreen.Designer.cs | 116 + .../Gameplay/HijackScreen.cs | 723 +++ .../Gameplay/HijackScreen.resx | 132 + .../Graphic_Picker.Designer.cs | 400 -- source/WindowsFormsApplication1/Graphic_Picker.cs | 249 - .../WindowsFormsApplication1/Graphic_Picker.resx | 123 - source/WindowsFormsApplication1/HackUI.Designer.cs | 785 --- source/WindowsFormsApplication1/HackUI.cs | 1921 ------- source/WindowsFormsApplication1/HackUI.resx | 177 - source/WindowsFormsApplication1/Hacking.cs | 801 --- .../Hacking_Enemy.Designer.cs | 98 - source/WindowsFormsApplication1/Hacking_Enemy.cs | 322 -- source/WindowsFormsApplication1/Hacking_Enemy.resx | 123 - .../Hacking_YourHealth.Designer.cs | 479 -- .../WindowsFormsApplication1/Hacking_YourHealth.cs | 950 ---- .../Hacking_YourHealth.resx | 162 - .../HijackScreen.Designer.cs | 116 - source/WindowsFormsApplication1/HijackScreen.cs | 723 --- source/WindowsFormsApplication1/HijackScreen.resx | 132 - .../WindowsFormsApplication1/HoloChat.Designer.cs | 254 - source/WindowsFormsApplication1/HoloChat.cs | 666 --- source/WindowsFormsApplication1/HoloChat.resx | 132 - .../WindowsFormsApplication1/HostLayer/MountMgr.cs | 37 + .../WindowsFormsApplication1/HostLayer/OSInfo.cs | 72 + source/WindowsFormsApplication1/HostLayer/Paths.cs | 144 + .../IconControl.Designer.cs | 92 - source/WindowsFormsApplication1/IconControl.cs | 69 - source/WindowsFormsApplication1/IconControl.resx | 120 - .../IconManager.Designer.cs | 135 - source/WindowsFormsApplication1/IconManager.cs | 125 - source/WindowsFormsApplication1/IconManager.resx | 120 - .../ImageSelector.Designer.cs | 76 - source/WindowsFormsApplication1/ImageSelector.cs | 55 - source/WindowsFormsApplication1/ImageSelector.resx | 120 - source/WindowsFormsApplication1/Jumper.Designer.cs | 130 - source/WindowsFormsApplication1/Jumper.cs | 146 - source/WindowsFormsApplication1/Jumper.resx | 123 - .../KnowledgeInput.Designer.cs | 345 -- source/WindowsFormsApplication1/KnowledgeInput.cs | 1425 ----- .../WindowsFormsApplication1/KnowledgeInput.resx | 133 - .../WindowsFormsApplication1/Labyrinth.Designer.cs | 38 - source/WindowsFormsApplication1/Labyrinth.cs | 20 - .../ListViewEx.Designer.cs | 66 - source/WindowsFormsApplication1/ListViewEx.cs | 65 - source/WindowsFormsApplication1/ListViewEx.resx | 120 - source/WindowsFormsApplication1/Lua_Interp.cs | 1280 ----- source/WindowsFormsApplication1/MountMgr.cs | 37 - .../NameChanger.Designer.cs | 165 - source/WindowsFormsApplication1/NameChanger.cs | 107 - source/WindowsFormsApplication1/NameChanger.resx | 120 - source/WindowsFormsApplication1/NetGen.Designer.cs | 628 --- source/WindowsFormsApplication1/NetGen.cs | 361 -- source/WindowsFormsApplication1/NetGen.resx | 138 - .../NetModuleStatus.Designer.cs | 84 - source/WindowsFormsApplication1/NetModuleStatus.cs | 46 - .../WindowsFormsApplication1/NetModuleStatus.resx | 120 - .../NetworkBrowser.Designer.cs | 290 - source/WindowsFormsApplication1/NetworkBrowser.cs | 301 -- .../WindowsFormsApplication1/NetworkBrowser.resx | 123 - .../Notification.Designer.cs | 78 - source/WindowsFormsApplication1/Notification.cs | 39 - source/WindowsFormsApplication1/Notification.resx | 120 - source/WindowsFormsApplication1/OSInfo.cs | 72 - .../Online/ConnectionManager.Designer.cs | 129 + .../Online/ConnectionManager.cs | 91 + .../Online/ConnectionManager.resx | 120 + .../Online/Package_Grabber.cs | 402 ++ source/WindowsFormsApplication1/Package_Grabber.cs | 402 -- .../PanelManager.Designer.cs | 132 - source/WindowsFormsApplication1/PanelManager.cs | 74 - source/WindowsFormsApplication1/PanelManager.resx | 120 - source/WindowsFormsApplication1/Paths.cs | 144 - source/WindowsFormsApplication1/Pong.Designer.cs | 588 -- source/WindowsFormsApplication1/Pong.cs | 481 -- source/WindowsFormsApplication1/Pong.resx | 143 - .../ProgressBarEX.Designer.cs | 37 - source/WindowsFormsApplication1/ProgressBarEX.cs | 340 -- source/WindowsFormsApplication1/ProgressBarEX.resx | 120 - .../WindowsFormsApplication1/QuickChat.Designer.cs | 228 - source/WindowsFormsApplication1/QuickChat.cs | 204 - source/WindowsFormsApplication1/QuickChat.resx | 123 - source/WindowsFormsApplication1/RemoteCoherence.cs | 12 - source/WindowsFormsApplication1/SaveSystem.cs | 662 --- source/WindowsFormsApplication1/ShiftOS.csproj | 2 - .../WindowsFormsApplication1/ShiftOSColorTable.cs | 238 - .../ShiftOSDesktop.Designer.cs | 1583 ------ source/WindowsFormsApplication1/ShiftOSDesktop.cs | 1647 ------ .../WindowsFormsApplication1/ShiftOSDesktop.resx | 153 - .../WindowsFormsApplication1/Shifter.Designer.cs | 5620 -------------------- source/WindowsFormsApplication1/Shifter.cs | 3093 ----------- source/WindowsFormsApplication1/Shifter.resx | 161 - .../ShifterColorInput.Designer.cs | 77 - .../WindowsFormsApplication1/ShifterColorInput.cs | 47 - .../ShifterColorInput.resx | 120 - .../ShifterGraphicInput.Designer.cs | 76 - .../ShifterGraphicInput.cs | 49 - .../ShifterGraphicInput.resx | 120 - .../ShifterIntInput.Designer.cs | 83 - source/WindowsFormsApplication1/ShifterIntInput.cs | 62 - .../WindowsFormsApplication1/ShifterIntInput.resx | 120 - .../ShifterTextInput.Designer.cs | 78 - .../WindowsFormsApplication1/ShifterTextInput.cs | 65 - .../WindowsFormsApplication1/ShifterTextInput.resx | 120 - .../WindowsFormsApplication1/Shiftnet.Designer.cs | 144 - source/WindowsFormsApplication1/Shiftnet.cs | 111 - source/WindowsFormsApplication1/Shiftnet.resx | 120 - .../ShiftnetDecryptor.Designer.cs | 170 - .../WindowsFormsApplication1/ShiftnetDecryptor.cs | 156 - .../ShiftnetDecryptor.resx | 123 - .../Shiftorium.Designer.cs | 322 -- source/WindowsFormsApplication1/Shiftorium.cs | 215 - source/WindowsFormsApplication1/Shiftorium.resx | 132 - .../SkinEngine/ShiftOSColorTable.cs | 238 + .../SkinEngine/WindowComposition.cs | 390 ++ .../WindowsFormsApplication1/SkinEngine/skins.cs | 840 +++ .../SkinLoader.Designer.cs | 739 --- source/WindowsFormsApplication1/SkinLoader.cs | 652 --- source/WindowsFormsApplication1/SkinLoader.resx | 126 - source/WindowsFormsApplication1/SpeechListener.cs | 53 - .../WindowsFormsApplication1/Template.Designer.cs | 243 - source/WindowsFormsApplication1/Template.cs | 589 -- source/WindowsFormsApplication1/Template.resx | 129 - .../WindowsFormsApplication1/Terminal.Designer.cs | 126 - source/WindowsFormsApplication1/Terminal.cs | 2757 ---------- source/WindowsFormsApplication1/Terminal.resx | 144 - .../WindowsFormsApplication1/TextPad.Designer.cs | 181 - source/WindowsFormsApplication1/TextPad.cs | 239 - source/WindowsFormsApplication1/TextPad.resx | 126 - source/WindowsFormsApplication1/Viruses.cs | 620 --- .../WidgetManager.Designer.cs | 252 - source/WindowsFormsApplication1/WidgetManager.cs | 174 - source/WindowsFormsApplication1/WidgetManager.resx | 123 - .../WindowBorder.Designer.cs | 270 - source/WindowsFormsApplication1/WindowBorder.cs | 668 --- source/WindowsFormsApplication1/WindowBorder.resx | 129 - .../WindowsFormsApplication1/WindowComposition.cs | 390 -- .../WindowsFormsApplication1/infobox.Designer.cs | 187 - source/WindowsFormsApplication1/infobox.cs | 113 - source/WindowsFormsApplication1/infobox.resx | 120 - source/WindowsFormsApplication1/skins.cs | 840 --- source/WindowsFormsApplication1/undo.cs | 8 - 318 files changed, 60365 insertions(+), 65156 deletions(-) delete mode 100644 source/WindowsFormsApplication1/AlternateDesktop.Designer.cs delete mode 100644 source/WindowsFormsApplication1/AlternateDesktop.cs delete mode 100644 source/WindowsFormsApplication1/AlternateDesktop.resx create mode 100644 source/WindowsFormsApplication1/Apps/Appscape.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Appscape.cs create mode 100644 source/WindowsFormsApplication1/Apps/Appscape.resx create mode 100644 source/WindowsFormsApplication1/Apps/AppscapeUploader.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/AppscapeUploader.cs create mode 100644 source/WindowsFormsApplication1/Apps/AppscapeUploader.resx create mode 100644 source/WindowsFormsApplication1/Apps/Artpad.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Artpad.cs create mode 100644 source/WindowsFormsApplication1/Apps/Artpad.resx create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteConverter.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteConverter.cs create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteConverter.resx create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteDigger.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteDigger.cs create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteDigger.resx create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteWallet.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteWallet.cs create mode 100644 source/WindowsFormsApplication1/Apps/BitnoteWallet.resx create mode 100644 source/WindowsFormsApplication1/Apps/Dodge.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Dodge.cs create mode 100644 source/WindowsFormsApplication1/Apps/Dodge.resx create mode 100644 source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/File Skimmer.cs create mode 100644 source/WindowsFormsApplication1/Apps/File Skimmer.resx create mode 100644 source/WindowsFormsApplication1/Apps/HoloChat.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/HoloChat.cs create mode 100644 source/WindowsFormsApplication1/Apps/HoloChat.resx create mode 100644 source/WindowsFormsApplication1/Apps/IconManager.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/IconManager.cs create mode 100644 source/WindowsFormsApplication1/Apps/IconManager.resx create mode 100644 source/WindowsFormsApplication1/Apps/KnowledgeInput.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/KnowledgeInput.cs create mode 100644 source/WindowsFormsApplication1/Apps/KnowledgeInput.resx create mode 100644 source/WindowsFormsApplication1/Apps/Labyrinth.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Labyrinth.cs create mode 100644 source/WindowsFormsApplication1/Apps/NameChanger.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/NameChanger.cs create mode 100644 source/WindowsFormsApplication1/Apps/NameChanger.resx create mode 100644 source/WindowsFormsApplication1/Apps/NetGen.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/NetGen.cs create mode 100644 source/WindowsFormsApplication1/Apps/NetGen.resx create mode 100644 source/WindowsFormsApplication1/Apps/NetworkBrowser.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/NetworkBrowser.cs create mode 100644 source/WindowsFormsApplication1/Apps/NetworkBrowser.resx create mode 100644 source/WindowsFormsApplication1/Apps/PanelManager.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/PanelManager.cs create mode 100644 source/WindowsFormsApplication1/Apps/PanelManager.resx create mode 100644 source/WindowsFormsApplication1/Apps/Pong.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Pong.cs create mode 100644 source/WindowsFormsApplication1/Apps/Pong.resx create mode 100644 source/WindowsFormsApplication1/Apps/Shifter.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Shifter.cs create mode 100644 source/WindowsFormsApplication1/Apps/Shifter.resx create mode 100644 source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Shiftnet.cs create mode 100644 source/WindowsFormsApplication1/Apps/Shiftnet.resx create mode 100644 source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.cs create mode 100644 source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.resx create mode 100644 source/WindowsFormsApplication1/Apps/Shiftorium.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Shiftorium.cs create mode 100644 source/WindowsFormsApplication1/Apps/Shiftorium.resx create mode 100644 source/WindowsFormsApplication1/Apps/SkinLoader.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/SkinLoader.cs create mode 100644 source/WindowsFormsApplication1/Apps/SkinLoader.resx create mode 100644 source/WindowsFormsApplication1/Apps/Terminal.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/Terminal.cs create mode 100644 source/WindowsFormsApplication1/Apps/Terminal.resx create mode 100644 source/WindowsFormsApplication1/Apps/TextPad.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/TextPad.cs create mode 100644 source/WindowsFormsApplication1/Apps/TextPad.resx create mode 100644 source/WindowsFormsApplication1/Apps/WidgetManager.Designer.cs create mode 100644 source/WindowsFormsApplication1/Apps/WidgetManager.cs create mode 100644 source/WindowsFormsApplication1/Apps/WidgetManager.resx delete mode 100644 source/WindowsFormsApplication1/Appscape.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Appscape.cs delete mode 100644 source/WindowsFormsApplication1/Appscape.resx delete mode 100644 source/WindowsFormsApplication1/AppscapeUploader.Designer.cs delete mode 100644 source/WindowsFormsApplication1/AppscapeUploader.cs delete mode 100644 source/WindowsFormsApplication1/AppscapeUploader.resx delete mode 100644 source/WindowsFormsApplication1/Artpad.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Artpad.cs delete mode 100644 source/WindowsFormsApplication1/Artpad.resx delete mode 100644 source/WindowsFormsApplication1/AudioResourceClient.cs delete mode 100644 source/WindowsFormsApplication1/BitnoteConverter.Designer.cs delete mode 100644 source/WindowsFormsApplication1/BitnoteConverter.cs delete mode 100644 source/WindowsFormsApplication1/BitnoteConverter.resx delete mode 100644 source/WindowsFormsApplication1/BitnoteDigger.Designer.cs delete mode 100644 source/WindowsFormsApplication1/BitnoteDigger.cs delete mode 100644 source/WindowsFormsApplication1/BitnoteDigger.resx delete mode 100644 source/WindowsFormsApplication1/BitnoteWallet.Designer.cs delete mode 100644 source/WindowsFormsApplication1/BitnoteWallet.cs delete mode 100644 source/WindowsFormsApplication1/BitnoteWallet.resx delete mode 100644 source/WindowsFormsApplication1/Color_Picker.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Color_Picker.cs delete mode 100644 source/WindowsFormsApplication1/Color_Picker.resx delete mode 100644 source/WindowsFormsApplication1/Computer.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Computer.cs delete mode 100644 source/WindowsFormsApplication1/Computer.resx delete mode 100644 source/WindowsFormsApplication1/Connection.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Connection.cs delete mode 100644 source/WindowsFormsApplication1/Connection.resx delete mode 100644 source/WindowsFormsApplication1/ConnectionManager.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ConnectionManager.cs delete mode 100644 source/WindowsFormsApplication1/ConnectionManager.resx create mode 100644 source/WindowsFormsApplication1/Controls/Computer.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/Computer.cs create mode 100644 source/WindowsFormsApplication1/Controls/Computer.resx create mode 100644 source/WindowsFormsApplication1/Controls/Connection.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/Connection.cs create mode 100644 source/WindowsFormsApplication1/Controls/Connection.resx create mode 100644 source/WindowsFormsApplication1/Controls/DesktopIcon.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/DesktopIcon.cs create mode 100644 source/WindowsFormsApplication1/Controls/DesktopIcon.resx create mode 100644 source/WindowsFormsApplication1/Controls/IconControl.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/IconControl.cs create mode 100644 source/WindowsFormsApplication1/Controls/IconControl.resx create mode 100644 source/WindowsFormsApplication1/Controls/ImageSelector.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/ImageSelector.cs create mode 100644 source/WindowsFormsApplication1/Controls/ImageSelector.resx create mode 100644 source/WindowsFormsApplication1/Controls/NetModuleStatus.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/NetModuleStatus.cs create mode 100644 source/WindowsFormsApplication1/Controls/NetModuleStatus.resx create mode 100644 source/WindowsFormsApplication1/Controls/Notification.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/Notification.cs create mode 100644 source/WindowsFormsApplication1/Controls/Notification.resx create mode 100644 source/WindowsFormsApplication1/Controls/ProgressBarEX.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/ProgressBarEX.cs create mode 100644 source/WindowsFormsApplication1/Controls/ProgressBarEX.resx create mode 100644 source/WindowsFormsApplication1/Controls/ShifterColorInput.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/ShifterColorInput.cs create mode 100644 source/WindowsFormsApplication1/Controls/ShifterColorInput.resx create mode 100644 source/WindowsFormsApplication1/Controls/ShifterGraphicInput.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/ShifterGraphicInput.cs create mode 100644 source/WindowsFormsApplication1/Controls/ShifterGraphicInput.resx create mode 100644 source/WindowsFormsApplication1/Controls/ShifterIntInput.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/ShifterIntInput.cs create mode 100644 source/WindowsFormsApplication1/Controls/ShifterIntInput.resx create mode 100644 source/WindowsFormsApplication1/Controls/ShifterTextInput.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/ShifterTextInput.cs create mode 100644 source/WindowsFormsApplication1/Controls/ShifterTextInput.resx create mode 100644 source/WindowsFormsApplication1/Controls/WindowBorder.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/WindowBorder.cs create mode 100644 source/WindowsFormsApplication1/Controls/WindowBorder.resx create mode 100644 source/WindowsFormsApplication1/Controls/infobox.Designer.cs create mode 100644 source/WindowsFormsApplication1/Controls/infobox.cs create mode 100644 source/WindowsFormsApplication1/Controls/infobox.resx create mode 100644 source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.Designer.cs create mode 100644 source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.cs create mode 100644 source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.resx delete mode 100644 source/WindowsFormsApplication1/DesktopIcon.Designer.cs delete mode 100644 source/WindowsFormsApplication1/DesktopIcon.cs delete mode 100644 source/WindowsFormsApplication1/DesktopIcon.resx create mode 100644 source/WindowsFormsApplication1/Dialogs/Color_Picker.Designer.cs create mode 100644 source/WindowsFormsApplication1/Dialogs/Color_Picker.cs create mode 100644 source/WindowsFormsApplication1/Dialogs/Color_Picker.resx create mode 100644 source/WindowsFormsApplication1/Dialogs/Graphic_Picker.Designer.cs create mode 100644 source/WindowsFormsApplication1/Dialogs/Graphic_Picker.cs create mode 100644 source/WindowsFormsApplication1/Dialogs/Graphic_Picker.resx delete mode 100644 source/WindowsFormsApplication1/Dodge.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Dodge.cs delete mode 100644 source/WindowsFormsApplication1/Dodge.resx create mode 100644 source/WindowsFormsApplication1/Engine/AudioResourceClient.cs create mode 100644 source/WindowsFormsApplication1/Engine/Lua_Interp.cs create mode 100644 source/WindowsFormsApplication1/Engine/SaveSystem.cs create mode 100644 source/WindowsFormsApplication1/Engine/Viruses.cs create mode 100644 source/WindowsFormsApplication1/Engine/undo.cs delete mode 100644 source/WindowsFormsApplication1/File Skimmer.Designer.cs delete mode 100644 source/WindowsFormsApplication1/File Skimmer.cs delete mode 100644 source/WindowsFormsApplication1/File Skimmer.resx create mode 100644 source/WindowsFormsApplication1/Gameplay/HackUI.Designer.cs create mode 100644 source/WindowsFormsApplication1/Gameplay/HackUI.cs create mode 100644 source/WindowsFormsApplication1/Gameplay/HackUI.resx create mode 100644 source/WindowsFormsApplication1/Gameplay/Hacking.cs create mode 100644 source/WindowsFormsApplication1/Gameplay/HijackScreen.Designer.cs create mode 100644 source/WindowsFormsApplication1/Gameplay/HijackScreen.cs create mode 100644 source/WindowsFormsApplication1/Gameplay/HijackScreen.resx delete mode 100644 source/WindowsFormsApplication1/Graphic_Picker.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Graphic_Picker.cs delete mode 100644 source/WindowsFormsApplication1/Graphic_Picker.resx delete mode 100644 source/WindowsFormsApplication1/HackUI.Designer.cs delete mode 100644 source/WindowsFormsApplication1/HackUI.cs delete mode 100644 source/WindowsFormsApplication1/HackUI.resx delete mode 100644 source/WindowsFormsApplication1/Hacking.cs delete mode 100644 source/WindowsFormsApplication1/Hacking_Enemy.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Hacking_Enemy.cs delete mode 100644 source/WindowsFormsApplication1/Hacking_Enemy.resx delete mode 100644 source/WindowsFormsApplication1/Hacking_YourHealth.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Hacking_YourHealth.cs delete mode 100644 source/WindowsFormsApplication1/Hacking_YourHealth.resx delete mode 100644 source/WindowsFormsApplication1/HijackScreen.Designer.cs delete mode 100644 source/WindowsFormsApplication1/HijackScreen.cs delete mode 100644 source/WindowsFormsApplication1/HijackScreen.resx delete mode 100644 source/WindowsFormsApplication1/HoloChat.Designer.cs delete mode 100644 source/WindowsFormsApplication1/HoloChat.cs delete mode 100644 source/WindowsFormsApplication1/HoloChat.resx create mode 100644 source/WindowsFormsApplication1/HostLayer/MountMgr.cs create mode 100644 source/WindowsFormsApplication1/HostLayer/OSInfo.cs create mode 100644 source/WindowsFormsApplication1/HostLayer/Paths.cs delete mode 100644 source/WindowsFormsApplication1/IconControl.Designer.cs delete mode 100644 source/WindowsFormsApplication1/IconControl.cs delete mode 100644 source/WindowsFormsApplication1/IconControl.resx delete mode 100644 source/WindowsFormsApplication1/IconManager.Designer.cs delete mode 100644 source/WindowsFormsApplication1/IconManager.cs delete mode 100644 source/WindowsFormsApplication1/IconManager.resx delete mode 100644 source/WindowsFormsApplication1/ImageSelector.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ImageSelector.cs delete mode 100644 source/WindowsFormsApplication1/ImageSelector.resx delete mode 100644 source/WindowsFormsApplication1/Jumper.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Jumper.cs delete mode 100644 source/WindowsFormsApplication1/Jumper.resx delete mode 100644 source/WindowsFormsApplication1/KnowledgeInput.Designer.cs delete mode 100644 source/WindowsFormsApplication1/KnowledgeInput.cs delete mode 100644 source/WindowsFormsApplication1/KnowledgeInput.resx delete mode 100644 source/WindowsFormsApplication1/Labyrinth.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Labyrinth.cs delete mode 100644 source/WindowsFormsApplication1/ListViewEx.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ListViewEx.cs delete mode 100644 source/WindowsFormsApplication1/ListViewEx.resx delete mode 100644 source/WindowsFormsApplication1/Lua_Interp.cs delete mode 100644 source/WindowsFormsApplication1/MountMgr.cs delete mode 100644 source/WindowsFormsApplication1/NameChanger.Designer.cs delete mode 100644 source/WindowsFormsApplication1/NameChanger.cs delete mode 100644 source/WindowsFormsApplication1/NameChanger.resx delete mode 100644 source/WindowsFormsApplication1/NetGen.Designer.cs delete mode 100644 source/WindowsFormsApplication1/NetGen.cs delete mode 100644 source/WindowsFormsApplication1/NetGen.resx delete mode 100644 source/WindowsFormsApplication1/NetModuleStatus.Designer.cs delete mode 100644 source/WindowsFormsApplication1/NetModuleStatus.cs delete mode 100644 source/WindowsFormsApplication1/NetModuleStatus.resx delete mode 100644 source/WindowsFormsApplication1/NetworkBrowser.Designer.cs delete mode 100644 source/WindowsFormsApplication1/NetworkBrowser.cs delete mode 100644 source/WindowsFormsApplication1/NetworkBrowser.resx delete mode 100644 source/WindowsFormsApplication1/Notification.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Notification.cs delete mode 100644 source/WindowsFormsApplication1/Notification.resx delete mode 100644 source/WindowsFormsApplication1/OSInfo.cs create mode 100644 source/WindowsFormsApplication1/Online/ConnectionManager.Designer.cs create mode 100644 source/WindowsFormsApplication1/Online/ConnectionManager.cs create mode 100644 source/WindowsFormsApplication1/Online/ConnectionManager.resx create mode 100644 source/WindowsFormsApplication1/Online/Package_Grabber.cs delete mode 100644 source/WindowsFormsApplication1/Package_Grabber.cs delete mode 100644 source/WindowsFormsApplication1/PanelManager.Designer.cs delete mode 100644 source/WindowsFormsApplication1/PanelManager.cs delete mode 100644 source/WindowsFormsApplication1/PanelManager.resx delete mode 100644 source/WindowsFormsApplication1/Paths.cs delete mode 100644 source/WindowsFormsApplication1/Pong.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Pong.cs delete mode 100644 source/WindowsFormsApplication1/Pong.resx delete mode 100644 source/WindowsFormsApplication1/ProgressBarEX.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ProgressBarEX.cs delete mode 100644 source/WindowsFormsApplication1/ProgressBarEX.resx delete mode 100644 source/WindowsFormsApplication1/QuickChat.Designer.cs delete mode 100644 source/WindowsFormsApplication1/QuickChat.cs delete mode 100644 source/WindowsFormsApplication1/QuickChat.resx delete mode 100644 source/WindowsFormsApplication1/RemoteCoherence.cs delete mode 100644 source/WindowsFormsApplication1/SaveSystem.cs delete mode 100644 source/WindowsFormsApplication1/ShiftOSColorTable.cs delete mode 100644 source/WindowsFormsApplication1/ShiftOSDesktop.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ShiftOSDesktop.cs delete mode 100644 source/WindowsFormsApplication1/ShiftOSDesktop.resx delete mode 100644 source/WindowsFormsApplication1/Shifter.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Shifter.cs delete mode 100644 source/WindowsFormsApplication1/Shifter.resx delete mode 100644 source/WindowsFormsApplication1/ShifterColorInput.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ShifterColorInput.cs delete mode 100644 source/WindowsFormsApplication1/ShifterColorInput.resx delete mode 100644 source/WindowsFormsApplication1/ShifterGraphicInput.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ShifterGraphicInput.cs delete mode 100644 source/WindowsFormsApplication1/ShifterGraphicInput.resx delete mode 100644 source/WindowsFormsApplication1/ShifterIntInput.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ShifterIntInput.cs delete mode 100644 source/WindowsFormsApplication1/ShifterIntInput.resx delete mode 100644 source/WindowsFormsApplication1/ShifterTextInput.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ShifterTextInput.cs delete mode 100644 source/WindowsFormsApplication1/ShifterTextInput.resx delete mode 100644 source/WindowsFormsApplication1/Shiftnet.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Shiftnet.cs delete mode 100644 source/WindowsFormsApplication1/Shiftnet.resx delete mode 100644 source/WindowsFormsApplication1/ShiftnetDecryptor.Designer.cs delete mode 100644 source/WindowsFormsApplication1/ShiftnetDecryptor.cs delete mode 100644 source/WindowsFormsApplication1/ShiftnetDecryptor.resx delete mode 100644 source/WindowsFormsApplication1/Shiftorium.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Shiftorium.cs delete mode 100644 source/WindowsFormsApplication1/Shiftorium.resx create mode 100644 source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs create mode 100644 source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs create mode 100644 source/WindowsFormsApplication1/SkinEngine/skins.cs delete mode 100644 source/WindowsFormsApplication1/SkinLoader.Designer.cs delete mode 100644 source/WindowsFormsApplication1/SkinLoader.cs delete mode 100644 source/WindowsFormsApplication1/SkinLoader.resx delete mode 100644 source/WindowsFormsApplication1/SpeechListener.cs delete mode 100644 source/WindowsFormsApplication1/Template.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Template.cs delete mode 100644 source/WindowsFormsApplication1/Template.resx delete mode 100644 source/WindowsFormsApplication1/Terminal.Designer.cs delete mode 100644 source/WindowsFormsApplication1/Terminal.cs delete mode 100644 source/WindowsFormsApplication1/Terminal.resx delete mode 100644 source/WindowsFormsApplication1/TextPad.Designer.cs delete mode 100644 source/WindowsFormsApplication1/TextPad.cs delete mode 100644 source/WindowsFormsApplication1/TextPad.resx delete mode 100644 source/WindowsFormsApplication1/Viruses.cs delete mode 100644 source/WindowsFormsApplication1/WidgetManager.Designer.cs delete mode 100644 source/WindowsFormsApplication1/WidgetManager.cs delete mode 100644 source/WindowsFormsApplication1/WidgetManager.resx delete mode 100644 source/WindowsFormsApplication1/WindowBorder.Designer.cs delete mode 100644 source/WindowsFormsApplication1/WindowBorder.cs delete mode 100644 source/WindowsFormsApplication1/WindowBorder.resx delete mode 100644 source/WindowsFormsApplication1/WindowComposition.cs delete mode 100644 source/WindowsFormsApplication1/infobox.Designer.cs delete mode 100644 source/WindowsFormsApplication1/infobox.cs delete mode 100644 source/WindowsFormsApplication1/infobox.resx delete mode 100644 source/WindowsFormsApplication1/skins.cs delete mode 100644 source/WindowsFormsApplication1/undo.cs diff --git a/source/WindowsFormsApplication1/AlternateDesktop.Designer.cs b/source/WindowsFormsApplication1/AlternateDesktop.Designer.cs deleted file mode 100644 index c26006e..0000000 --- a/source/WindowsFormsApplication1/AlternateDesktop.Designer.cs +++ /dev/null @@ -1,133 +0,0 @@ -namespace ShiftOS -{ - partial class AlternateDesktop - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.pnlcontext = new System.Windows.Forms.Panel(); - this.pnlapplauncher = new System.Windows.Forms.Panel(); - this.pnlsidebar = new System.Windows.Forms.FlowLayoutPanel(); - this.lbclock = new System.Windows.Forms.Label(); - this.ClockTick = new System.Windows.Forms.Timer(this.components); - this.lblapplabel = new System.Windows.Forms.Label(); - this.apptick = new System.Windows.Forms.Timer(this.components); - this.pnlcontext.SuspendLayout(); - this.SuspendLayout(); - // - // pnlcontext - // - this.pnlcontext.BackColor = System.Drawing.Color.Gray; - this.pnlcontext.Controls.Add(this.lbclock); - this.pnlcontext.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlcontext.Location = new System.Drawing.Point(0, 0); - this.pnlcontext.Name = "pnlcontext"; - this.pnlcontext.Size = new System.Drawing.Size(936, 28); - this.pnlcontext.TabIndex = 0; - // - // pnlapplauncher - // - this.pnlapplauncher.BackColor = System.Drawing.Color.Gray; - this.pnlapplauncher.Location = new System.Drawing.Point(71, 47); - this.pnlapplauncher.Name = "pnlapplauncher"; - this.pnlapplauncher.Size = new System.Drawing.Size(664, 353); - this.pnlapplauncher.TabIndex = 1; - this.pnlapplauncher.Visible = false; - // - // pnlsidebar - // - this.pnlsidebar.BackColor = System.Drawing.Color.Gray; - this.pnlsidebar.Dock = System.Windows.Forms.DockStyle.Left; - this.pnlsidebar.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.pnlsidebar.Location = new System.Drawing.Point(0, 28); - this.pnlsidebar.Name = "pnlsidebar"; - this.pnlsidebar.Size = new System.Drawing.Size(52, 509); - this.pnlsidebar.TabIndex = 2; - // - // lbclock - // - this.lbclock.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbclock.Location = new System.Drawing.Point(820, 0); - this.lbclock.Name = "lbclock"; - this.lbclock.Size = new System.Drawing.Size(113, 28); - this.lbclock.TabIndex = 0; - this.lbclock.Text = "500023"; - this.lbclock.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // ClockTick - // - this.ClockTick.Enabled = true; - this.ClockTick.Tick += new System.EventHandler(this.ClockTick_Tick); - // - // lblapplabel - // - this.lblapplabel.AutoSize = true; - this.lblapplabel.Location = new System.Drawing.Point(823, 313); - this.lblapplabel.Name = "lblapplabel"; - this.lblapplabel.Size = new System.Drawing.Size(35, 13); - this.lblapplabel.TabIndex = 3; - this.lblapplabel.Text = "label1"; - this.lblapplabel.Visible = false; - // - // apptick - // - this.apptick.Enabled = true; - this.apptick.Interval = 2000; - this.apptick.Tick += new System.EventHandler(this.apptick_Tick); - // - // AlternateDesktop - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Black; - this.ClientSize = new System.Drawing.Size(936, 537); - this.Controls.Add(this.lblapplabel); - this.Controls.Add(this.pnlsidebar); - this.Controls.Add(this.pnlapplauncher); - this.Controls.Add(this.pnlcontext); - this.ForeColor = System.Drawing.Color.White; - this.Name = "AlternateDesktop"; - this.Text = "AlternateDesktop"; - this.Load += new System.EventHandler(this.AlternateDesktop_Load); - this.pnlcontext.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Panel pnlcontext; - private System.Windows.Forms.Label lbclock; - private System.Windows.Forms.Panel pnlapplauncher; - private System.Windows.Forms.FlowLayoutPanel pnlsidebar; - private System.Windows.Forms.Timer ClockTick; - private System.Windows.Forms.Label lblapplabel; - private System.Windows.Forms.Timer apptick; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/AlternateDesktop.cs b/source/WindowsFormsApplication1/AlternateDesktop.cs deleted file mode 100644 index 690977f..0000000 --- a/source/WindowsFormsApplication1/AlternateDesktop.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class AlternateDesktop : Form - { - public AlternateDesktop() - { - InitializeComponent(); - } - - private void ClockTick_Tick(object sender, EventArgs e) - { - lbclock.Text = API.GetTime(); - - } - - public void GetApps() - { - pnlsidebar.Controls.Clear(); - API.GetAppLauncherItems(); - Panel appbtn = new Panel(); - appbtn.BackColor = Color.Black; - appbtn.Size = new Size(32, 32); - appbtn.Visible = true; - appbtn.Name = "ashow"; - appbtn.Click += new EventHandler(this.SidebarButton_Click); - - pnlsidebar.Controls.Add(appbtn); - foreach(ApplauncherItem itm in API.AppLauncherItems) - { - if(itm.Display == true) - { - Panel btn = new Panel(); - btn.BackColor = Color.Gray; - btn.BackgroundImage = itm.Icon; - btn.BackgroundImageLayout = ImageLayout.Stretch; - btn.Size = new Size(32, 32); - btn.Name = $"al_{new Random().Next(1000, 9999)}"; - btn.Tag = itm; - btn.MouseMove += new MouseEventHandler(this.SidebarButton_Hover); - btn.MouseLeave += new EventHandler(this.SidebarButton_Leave); - btn.Click += new EventHandler(this.SidebarButton_Click); - pnlsidebar.Controls.Add(btn); - btn.Show(); - } - } - foreach(PanelButton pbtn in API.PanelButtons) - { - Panel btn = new Panel(); - btn.Tag = pbtn; - btn.Name = $"pnl_{new Random().Next(1000, 9999)}"; - btn.BackgroundImage = pbtn.Icon; - btn.BackgroundImageLayout = ImageLayout.Stretch; - btn.BackColor = Color.Black; - btn.Size = new Size(32, 32); - btn.MouseMove += new MouseEventHandler(this.SidebarButton_Hover); - btn.MouseLeave += new EventHandler(this.SidebarButton_Leave); - btn.Click += new EventHandler(this.SidebarButton_Click); - pnlsidebar.Controls.Add(btn); - btn.Show(); - } - } - - public void SidebarButton_Hover(object sender, MouseEventArgs e) - { - Panel s = (Panel)sender; - int labelLoc = pnlcontext.Height + (s.Bottom - (s.Height / 2)); - lblapplabel.Location = new Point(pnlsidebar.Width + 5, labelLoc); - if(s.Name.Contains("al")) - { - var itm = (ApplauncherItem)s.Tag; - lblapplabel.Text = itm.Name; - } - else - { - var itm = (PanelButton)s.Tag; - lblapplabel.Text = itm.Name; - } - lblapplabel.Visible = true; - } - - public void SidebarButton_Click(object sender, EventArgs e) - { - var s = (Panel)sender; - if (s.Name.Contains("al")) - { - var itm = (ApplauncherItem)s.Tag; - var li = new LuaInterpreter(); - li.mod(itm.Lua); - li = null; - } - else if(s.Name.Contains("ashow")) - { - pnlapplauncher.Show(); - foreach(Control ctrl in this.Controls) - { - ctrl.MouseDown += (object se, MouseEventArgs a) => - { - pnlapplauncher.Hide(); - }; - } - } - else - { - try - { - PanelButton pbtn = (PanelButton)s.Tag; - API.ToggleMinimized(pbtn.FormToManage); - } - catch - { - - } - } - } - - public void SidebarButton_Leave(object sender, EventArgs e) - { - lblapplabel.Hide(); - } - - private void AlternateDesktop_Load(object sender, EventArgs e) - { - this.ShowInTaskbar = false; - this.FormBorderStyle = FormBorderStyle.None; - this.WindowState = FormWindowState.Maximized; - GetApps(); - } - - private void apptick_Tick(object sender, EventArgs e) - { - //GetApps(); - } - - private bool unity = false; - - public void ToggleUnityMode() - { - if (unity == false) - { - unity = true; - this.BackColor = Skinning.Utilities.globaltransparencycolour; - this.BackgroundImage = null; - this.TransparencyKey = Skinning.Utilities.globaltransparencycolour; - } - else - { - unity = false; - this.BackColor = API.CurrentSkin.desktopbackgroundcolour; - this.BackgroundImage = API.CurrentSkinImages.desktopbackground; - this.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.desktopbackgroundlayout; - this.TransparencyKey = Skinning.Utilities.globaltransparencycolour; - } - } - } -} diff --git a/source/WindowsFormsApplication1/AlternateDesktop.resx b/source/WindowsFormsApplication1/AlternateDesktop.resx deleted file mode 100644 index 2d0907d..0000000 --- a/source/WindowsFormsApplication1/AlternateDesktop.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 120, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Appscape.Designer.cs b/source/WindowsFormsApplication1/Apps/Appscape.Designer.cs new file mode 100644 index 0000000..e8ef295 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Appscape.Designer.cs @@ -0,0 +1,862 @@ +namespace ShiftOS +{ + partial class Appscape + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Appscape)); + this.panel3 = new System.Windows.Forms.Panel(); + this.pnlchoosenetwork = new System.Windows.Forms.Panel(); + this.btnrequest = new System.Windows.Forms.Button(); + this.label14 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.lvnets = new System.Windows.Forms.ListView(); + this.clhostnameheader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.pnlpackageeditor = new System.Windows.Forms.Panel(); + this.label12 = new System.Windows.Forms.Label(); + this.btndonecustomizing = new System.Windows.Forms.Button(); + this.btnsaa = new System.Windows.Forms.Button(); + this.txtprice = new System.Windows.Forms.TextBox(); + this.lbprice = new System.Windows.Forms.Label(); + this.lbaddress = new System.Windows.Forms.Label(); + this.cbsell = new System.Windows.Forms.CheckBox(); + this.txtpackagedescription = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.txtpackagename = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.pnllounge = new System.Windows.Forms.Panel(); + this.btnedit = new System.Windows.Forms.Button(); + this.btnupload = new System.Windows.Forms.Button(); + this.btnsave = new System.Windows.Forms.Button(); + this.txtbitnoteaddress = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.txtbio = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.txtmoddername = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.lbmybio = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.lbmyname = new System.Windows.Forms.Label(); + this.lvmypackages = new System.Windows.Forms.ListView(); + this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.pnlpackageinfo = new System.Windows.Forms.Panel(); + this.pnlauthordetails = new System.Windows.Forms.Panel(); + this.lbauthordescription = new System.Windows.Forms.Label(); + this.lbauthorname = new System.Windows.Forms.Label(); + this.pbappicon = new System.Windows.Forms.PictureBox(); + this.pbappscreenshot = new System.Windows.Forms.PictureBox(); + this.pnldownload = new System.Windows.Forms.Panel(); + this.lbdownloadpath = new System.Windows.Forms.Label(); + this.btndownload = new System.Windows.Forms.Button(); + this.lbpkgdescription = new System.Windows.Forms.Label(); + this.lbpkgname = new System.Windows.Forms.Label(); + this.pnllist = new System.Windows.Forms.Panel(); + this.lvpackages = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.pnlsearch = new System.Windows.Forms.Panel(); + this.btnlounge = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.btngetkey = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.txtsearch = new System.Windows.Forms.TextBox(); + this.btnskins = new System.Windows.Forms.Button(); + this.btnapps = new System.Windows.Forms.Button(); + this.imgpackageicons = new System.Windows.Forms.ImageList(this.components); + this.panel3.SuspendLayout(); + this.pnlchoosenetwork.SuspendLayout(); + this.pnlpackageeditor.SuspendLayout(); + this.pnllounge.SuspendLayout(); + this.pnlpackageinfo.SuspendLayout(); + this.pnlauthordetails.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbappicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbappscreenshot)).BeginInit(); + this.pnldownload.SuspendLayout(); + this.pnllist.SuspendLayout(); + this.pnlsearch.SuspendLayout(); + this.SuspendLayout(); + // + // panel3 + // + this.panel3.Controls.Add(this.pnlchoosenetwork); + this.panel3.Controls.Add(this.pnlpackageeditor); + this.panel3.Controls.Add(this.pnllounge); + this.panel3.Controls.Add(this.pnlpackageinfo); + this.panel3.Controls.Add(this.pnllist); + this.panel3.Controls.Add(this.pnlsearch); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 0); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(886, 469); + this.panel3.TabIndex = 3; + // + // pnlchoosenetwork + // + this.pnlchoosenetwork.Controls.Add(this.lvnets); + this.pnlchoosenetwork.Controls.Add(this.btnrequest); + this.pnlchoosenetwork.Controls.Add(this.label14); + this.pnlchoosenetwork.Controls.Add(this.label13); + this.pnlchoosenetwork.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlchoosenetwork.Location = new System.Drawing.Point(0, 47); + this.pnlchoosenetwork.Name = "pnlchoosenetwork"; + this.pnlchoosenetwork.Size = new System.Drawing.Size(886, 422); + this.pnlchoosenetwork.TabIndex = 16; + // + // btnrequest + // + this.btnrequest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnrequest.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnrequest.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnrequest.Location = new System.Drawing.Point(799, 385); + this.btnrequest.Name = "btnrequest"; + this.btnrequest.Size = new System.Drawing.Size(75, 23); + this.btnrequest.TabIndex = 7; + this.btnrequest.Text = "Request Key"; + this.btnrequest.UseVisualStyleBackColor = true; + this.btnrequest.Click += new System.EventHandler(this.btnrequest_Click); + // + // label14 + // + this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label14.Location = new System.Drawing.Point(17, 31); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(857, 30); + this.label14.TabIndex = 6; + this.label14.Text = resources.GetString("label14.Text"); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Times New Roman", 13F); + this.label13.Location = new System.Drawing.Point(16, 7); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(157, 20); + this.label13.TabIndex = 5; + this.label13.Text = "Choose a repository."; + // + // lvnets + // + this.lvnets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lvnets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.clhostnameheader}); + this.lvnets.FullRowSelect = true; + this.lvnets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvnets.Location = new System.Drawing.Point(12, 64); + this.lvnets.Name = "lvnets"; + this.lvnets.Size = new System.Drawing.Size(868, 307); + this.lvnets.TabIndex = 0; + this.lvnets.UseCompatibleStateImageBehavior = false; + this.lvnets.View = System.Windows.Forms.View.Details; + // + // clhostnameheader + // + this.clhostnameheader.Text = "Hostname"; + // + // pnlpackageeditor + // + this.pnlpackageeditor.Controls.Add(this.label12); + this.pnlpackageeditor.Controls.Add(this.btndonecustomizing); + this.pnlpackageeditor.Controls.Add(this.btnsaa); + this.pnlpackageeditor.Controls.Add(this.txtprice); + this.pnlpackageeditor.Controls.Add(this.lbprice); + this.pnlpackageeditor.Controls.Add(this.lbaddress); + this.pnlpackageeditor.Controls.Add(this.cbsell); + this.pnlpackageeditor.Controls.Add(this.txtpackagedescription); + this.pnlpackageeditor.Controls.Add(this.label10); + this.pnlpackageeditor.Controls.Add(this.txtpackagename); + this.pnlpackageeditor.Controls.Add(this.label11); + this.pnlpackageeditor.Controls.Add(this.label9); + this.pnlpackageeditor.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlpackageeditor.Location = new System.Drawing.Point(0, 47); + this.pnlpackageeditor.Name = "pnlpackageeditor"; + this.pnlpackageeditor.Size = new System.Drawing.Size(886, 422); + this.pnlpackageeditor.TabIndex = 15; + // + // label12 + // + this.label12.Location = new System.Drawing.Point(96, 349); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(275, 22); + this.label12.TabIndex = 19; + this.label12.Text = "This allows you to release a patch for your application."; + this.label12.Visible = false; + // + // btndonecustomizing + // + this.btndonecustomizing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndonecustomizing.AutoSize = true; + this.btndonecustomizing.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndonecustomizing.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndonecustomizing.Font = new System.Drawing.Font("Times New Roman", 10F); + this.btndonecustomizing.Location = new System.Drawing.Point(824, 385); + this.btndonecustomizing.Name = "btndonecustomizing"; + this.btndonecustomizing.Size = new System.Drawing.Size(50, 28); + this.btndonecustomizing.TabIndex = 18; + this.btndonecustomizing.Text = "Done"; + this.btndonecustomizing.UseVisualStyleBackColor = true; + this.btndonecustomizing.Click += new System.EventHandler(this.btndonecustomizing_Click); + // + // btnsaa + // + this.btnsaa.AutoSize = true; + this.btnsaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnsaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsaa.Font = new System.Drawing.Font("Times New Roman", 10F); + this.btnsaa.Location = new System.Drawing.Point(99, 318); + this.btnsaa.Name = "btnsaa"; + this.btnsaa.Size = new System.Drawing.Size(123, 28); + this.btnsaa.TabIndex = 17; + this.btnsaa.Text = "Release New SAA"; + this.btnsaa.UseVisualStyleBackColor = true; + this.btnsaa.Click += new System.EventHandler(this.btnsaa_Click); + // + // txtprice + // + this.txtprice.Location = new System.Drawing.Point(541, 267); + this.txtprice.Name = "txtprice"; + this.txtprice.Size = new System.Drawing.Size(89, 20); + this.txtprice.TabIndex = 16; + this.txtprice.Visible = false; + // + // lbprice + // + this.lbprice.AutoSize = true; + this.lbprice.Location = new System.Drawing.Point(504, 270); + this.lbprice.Name = "lbprice"; + this.lbprice.Size = new System.Drawing.Size(34, 13); + this.lbprice.TabIndex = 15; + this.lbprice.Text = "Price:"; + this.lbprice.Visible = false; + // + // lbaddress + // + this.lbaddress.Location = new System.Drawing.Point(210, 270); + this.lbaddress.Name = "lbaddress"; + this.lbaddress.Size = new System.Drawing.Size(275, 45); + this.lbaddress.TabIndex = 14; + this.lbaddress.Text = "All profit made from this package will be sent to the Bitnote Address defined in " + + "your Dev Lounge; if it is non-existent, Bitnotes simply won\'t arrive."; + this.lbaddress.Visible = false; + // + // cbsell + // + this.cbsell.Appearance = System.Windows.Forms.Appearance.Button; + this.cbsell.AutoSize = true; + this.cbsell.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbsell.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.cbsell.Location = new System.Drawing.Point(97, 263); + this.cbsell.Name = "cbsell"; + this.cbsell.Size = new System.Drawing.Size(92, 24); + this.cbsell.TabIndex = 13; + this.cbsell.Text = "Sell for Bitnotes"; + this.cbsell.UseVisualStyleBackColor = true; + this.cbsell.CheckedChanged += new System.EventHandler(this.cbsell_CheckedChanged); + // + // txtpackagedescription + // + this.txtpackagedescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtpackagedescription.Location = new System.Drawing.Point(99, 72); + this.txtpackagedescription.Multiline = true; + this.txtpackagedescription.Name = "txtpackagedescription"; + this.txtpackagedescription.Size = new System.Drawing.Size(591, 189); + this.txtpackagedescription.TabIndex = 12; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(12, 75); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(60, 13); + this.label10.TabIndex = 11; + this.label10.Text = "Description"; + // + // txtpackagename + // + this.txtpackagename.Location = new System.Drawing.Point(99, 43); + this.txtpackagename.Name = "txtpackagename"; + this.txtpackagename.Size = new System.Drawing.Size(258, 20); + this.txtpackagename.TabIndex = 10; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(12, 46); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(81, 13); + this.label11.TabIndex = 9; + this.label11.Text = "Package Name"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Times New Roman", 13F); + this.label9.Location = new System.Drawing.Point(12, 17); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(118, 20); + this.label9.TabIndex = 0; + this.label9.Text = "Package Editor"; + // + // pnllounge + // + this.pnllounge.Controls.Add(this.btnedit); + this.pnllounge.Controls.Add(this.btnupload); + this.pnllounge.Controls.Add(this.btnsave); + this.pnllounge.Controls.Add(this.txtbitnoteaddress); + this.pnllounge.Controls.Add(this.label8); + this.pnllounge.Controls.Add(this.txtbio); + this.pnllounge.Controls.Add(this.label7); + this.pnllounge.Controls.Add(this.txtmoddername); + this.pnllounge.Controls.Add(this.label6); + this.pnllounge.Controls.Add(this.label5); + this.pnllounge.Controls.Add(this.label4); + this.pnllounge.Controls.Add(this.lbmybio); + this.pnllounge.Controls.Add(this.label3); + this.pnllounge.Controls.Add(this.lbmyname); + this.pnllounge.Controls.Add(this.lvmypackages); + this.pnllounge.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnllounge.Location = new System.Drawing.Point(0, 47); + this.pnllounge.Name = "pnllounge"; + this.pnllounge.Size = new System.Drawing.Size(886, 422); + this.pnllounge.TabIndex = 1; + // + // btnedit + // + this.btnedit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnedit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnedit.Location = new System.Drawing.Point(239, 377); + this.btnedit.Name = "btnedit"; + this.btnedit.Size = new System.Drawing.Size(75, 23); + this.btnedit.TabIndex = 14; + this.btnedit.Text = "Edit"; + this.btnedit.UseVisualStyleBackColor = true; + this.btnedit.Click += new System.EventHandler(this.btnedit_Click); + // + // btnupload + // + this.btnupload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnupload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnupload.Location = new System.Drawing.Point(320, 377); + this.btnupload.Name = "btnupload"; + this.btnupload.Size = new System.Drawing.Size(75, 23); + this.btnupload.TabIndex = 13; + this.btnupload.Text = "Add"; + this.btnupload.UseVisualStyleBackColor = true; + this.btnupload.Click += new System.EventHandler(this.btnupload_Click); + // + // btnsave + // + this.btnsave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnsave.Location = new System.Drawing.Point(799, 390); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(75, 23); + this.btnsave.TabIndex = 12; + this.btnsave.Text = "Save"; + this.btnsave.UseVisualStyleBackColor = true; + this.btnsave.Click += new System.EventHandler(this.btnsave_Click); + // + // txtbitnoteaddress + // + this.txtbitnoteaddress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtbitnoteaddress.Location = new System.Drawing.Point(490, 333); + this.txtbitnoteaddress.Name = "txtbitnoteaddress"; + this.txtbitnoteaddress.Size = new System.Drawing.Size(384, 20); + this.txtbitnoteaddress.TabIndex = 11; + this.txtbitnoteaddress.TextChanged += new System.EventHandler(this.txtbitnoteaddress_TextChanged); + // + // label8 + // + this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(407, 339); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(73, 13); + this.label8.TabIndex = 10; + this.label8.Text = "BTN Address:"; + // + // txtbio + // + this.txtbio.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtbio.Location = new System.Drawing.Point(490, 110); + this.txtbio.Multiline = true; + this.txtbio.Name = "txtbio"; + this.txtbio.Size = new System.Drawing.Size(384, 217); + this.txtbio.TabIndex = 9; + this.txtbio.TextChanged += new System.EventHandler(this.txtbio_TextChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(407, 116); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(22, 13); + this.label7.TabIndex = 8; + this.label7.Text = "Bio"; + // + // txtmoddername + // + this.txtmoddername.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtmoddername.Location = new System.Drawing.Point(490, 84); + this.txtmoddername.Name = "txtmoddername"; + this.txtmoddername.Size = new System.Drawing.Size(384, 20); + this.txtmoddername.TabIndex = 7; + this.txtmoddername.TextChanged += new System.EventHandler(this.txtmoddername_TextChanged); + // + // label6 + // + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(407, 90); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(77, 13); + this.label6.TabIndex = 6; + this.label6.Text = "Modder Name:"; + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label5.Location = new System.Drawing.Point(404, 31); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(378, 32); + this.label5.TabIndex = 5; + this.label5.Text = "This screen allows you to customize your profile, add a biography, modder name an" + + "d Bitnote Address for your profile."; + // + // label4 + // + this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Times New Roman", 13F); + this.label4.Location = new System.Drawing.Point(403, 11); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(112, 20); + this.label4.TabIndex = 4; + this.label4.Text = "Customization"; + // + // lbmybio + // + this.lbmybio.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.lbmybio.Location = new System.Drawing.Point(17, 46); + this.lbmybio.Name = "lbmybio"; + this.lbmybio.Size = new System.Drawing.Size(378, 110); + this.lbmybio.TabIndex = 3; + this.lbmybio.Text = "label4"; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(17, 156); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(208, 13); + this.label3.TabIndex = 2; + this.label3.Text = "This is a list of all packages owned by you."; + // + // lbmyname + // + this.lbmyname.AutoSize = true; + this.lbmyname.Font = new System.Drawing.Font("Times New Roman", 13F); + this.lbmyname.Location = new System.Drawing.Point(13, 11); + this.lbmyname.Name = "lbmyname"; + this.lbmyname.Size = new System.Drawing.Size(51, 20); + this.lbmyname.TabIndex = 1; + this.lbmyname.Text = "label3"; + // + // lvmypackages + // + this.lvmypackages.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lvmypackages.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader4}); + this.lvmypackages.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvmypackages.Location = new System.Drawing.Point(20, 172); + this.lvmypackages.Name = "lvmypackages"; + this.lvmypackages.Size = new System.Drawing.Size(375, 199); + this.lvmypackages.TabIndex = 0; + this.lvmypackages.UseCompatibleStateImageBehavior = false; + this.lvmypackages.View = System.Windows.Forms.View.Details; + // + // columnHeader4 + // + this.columnHeader4.Text = "Name"; + // + // pnlpackageinfo + // + this.pnlpackageinfo.Controls.Add(this.pnlauthordetails); + this.pnlpackageinfo.Controls.Add(this.pbappicon); + this.pnlpackageinfo.Controls.Add(this.pbappscreenshot); + this.pnlpackageinfo.Controls.Add(this.pnldownload); + this.pnlpackageinfo.Controls.Add(this.lbpkgdescription); + this.pnlpackageinfo.Controls.Add(this.lbpkgname); + this.pnlpackageinfo.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlpackageinfo.Location = new System.Drawing.Point(0, 47); + this.pnlpackageinfo.Name = "pnlpackageinfo"; + this.pnlpackageinfo.Size = new System.Drawing.Size(886, 422); + this.pnlpackageinfo.TabIndex = 1; + // + // pnlauthordetails + // + this.pnlauthordetails.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnlauthordetails.Controls.Add(this.lbauthordescription); + this.pnlauthordetails.Controls.Add(this.lbauthorname); + this.pnlauthordetails.Location = new System.Drawing.Point(12, 213); + this.pnlauthordetails.Name = "pnlauthordetails"; + this.pnlauthordetails.Size = new System.Drawing.Size(468, 197); + this.pnlauthordetails.TabIndex = 5; + // + // lbauthordescription + // + this.lbauthordescription.Location = new System.Drawing.Point(13, 46); + this.lbauthordescription.Name = "lbauthordescription"; + this.lbauthordescription.Size = new System.Drawing.Size(452, 141); + this.lbauthordescription.TabIndex = 5; + this.lbauthordescription.Text = "label4"; + // + // lbauthorname + // + this.lbauthorname.AutoSize = true; + this.lbauthorname.Font = new System.Drawing.Font("Times New Roman", 13F); + this.lbauthorname.Location = new System.Drawing.Point(9, 11); + this.lbauthorname.Name = "lbauthorname"; + this.lbauthorname.Size = new System.Drawing.Size(51, 20); + this.lbauthorname.TabIndex = 4; + this.lbauthorname.Text = "label3"; + // + // pbappicon + // + this.pbappicon.Location = new System.Drawing.Point(12, 11); + this.pbappicon.Name = "pbappicon"; + this.pbappicon.Size = new System.Drawing.Size(32, 32); + this.pbappicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbappicon.TabIndex = 4; + this.pbappicon.TabStop = false; + // + // pbappscreenshot + // + this.pbappscreenshot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pbappscreenshot.Location = new System.Drawing.Point(500, 213); + this.pbappscreenshot.Name = "pbappscreenshot"; + this.pbappscreenshot.Size = new System.Drawing.Size(374, 197); + this.pbappscreenshot.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbappscreenshot.TabIndex = 3; + this.pbappscreenshot.TabStop = false; + // + // pnldownload + // + this.pnldownload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pnldownload.Controls.Add(this.lbdownloadpath); + this.pnldownload.Controls.Add(this.btndownload); + this.pnldownload.Location = new System.Drawing.Point(646, 7); + this.pnldownload.Name = "pnldownload"; + this.pnldownload.Size = new System.Drawing.Size(237, 97); + this.pnldownload.TabIndex = 2; + // + // lbdownloadpath + // + this.lbdownloadpath.Location = new System.Drawing.Point(4, 57); + this.lbdownloadpath.Name = "lbdownloadpath"; + this.lbdownloadpath.Size = new System.Drawing.Size(224, 31); + this.lbdownloadpath.TabIndex = 1; + this.lbdownloadpath.Text = "label1"; + this.lbdownloadpath.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // btndownload + // + this.btndownload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndownload.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btndownload.Location = new System.Drawing.Point(112, 13); + this.btndownload.Name = "btndownload"; + this.btndownload.Size = new System.Drawing.Size(116, 39); + this.btndownload.TabIndex = 0; + this.btndownload.Text = "Download This Package"; + this.btndownload.UseVisualStyleBackColor = true; + this.btndownload.Click += new System.EventHandler(this.btndownload_Click); + // + // lbpkgdescription + // + this.lbpkgdescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.lbpkgdescription.Location = new System.Drawing.Point(17, 47); + this.lbpkgdescription.Name = "lbpkgdescription"; + this.lbpkgdescription.Size = new System.Drawing.Size(347, 156); + this.lbpkgdescription.TabIndex = 1; + this.lbpkgdescription.Text = "label1"; + // + // lbpkgname + // + this.lbpkgname.AutoSize = true; + this.lbpkgname.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F); + this.lbpkgname.Location = new System.Drawing.Point(50, 19); + this.lbpkgname.Name = "lbpkgname"; + this.lbpkgname.Size = new System.Drawing.Size(60, 24); + this.lbpkgname.TabIndex = 0; + this.lbpkgname.Text = "label1"; + // + // pnllist + // + this.pnllist.Controls.Add(this.lvpackages); + this.pnllist.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnllist.Location = new System.Drawing.Point(0, 47); + this.pnllist.Name = "pnllist"; + this.pnllist.Size = new System.Drawing.Size(886, 422); + this.pnllist.TabIndex = 3; + // + // lvpackages + // + this.lvpackages.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2, + this.columnHeader3}); + this.lvpackages.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvpackages.FullRowSelect = true; + this.lvpackages.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvpackages.Location = new System.Drawing.Point(0, 0); + this.lvpackages.Name = "lvpackages"; + this.lvpackages.Size = new System.Drawing.Size(886, 422); + this.lvpackages.TabIndex = 0; + this.lvpackages.UseCompatibleStateImageBehavior = false; + this.lvpackages.View = System.Windows.Forms.View.Details; + this.lvpackages.SelectedIndexChanged += new System.EventHandler(this.lvpackages_SelectedIndexChanged); + this.lvpackages.DoubleClick += new System.EventHandler(this.lvpackages_DoubleClick); + // + // columnHeader1 + // + this.columnHeader1.Text = "Name"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Author"; + // + // columnHeader3 + // + this.columnHeader3.Text = "Cost (BTN)"; + // + // pnlsearch + // + this.pnlsearch.BackColor = System.Drawing.Color.Gray; + this.pnlsearch.Controls.Add(this.btnlounge); + this.pnlsearch.Controls.Add(this.label2); + this.pnlsearch.Controls.Add(this.btngetkey); + this.pnlsearch.Controls.Add(this.label1); + this.pnlsearch.Controls.Add(this.txtsearch); + this.pnlsearch.Controls.Add(this.btnskins); + this.pnlsearch.Controls.Add(this.btnapps); + this.pnlsearch.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlsearch.ForeColor = System.Drawing.Color.White; + this.pnlsearch.Location = new System.Drawing.Point(0, 0); + this.pnlsearch.Name = "pnlsearch"; + this.pnlsearch.Size = new System.Drawing.Size(886, 47); + this.pnlsearch.TabIndex = 0; + // + // btnlounge + // + this.btnlounge.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnlounge.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnlounge.Location = new System.Drawing.Point(377, 14); + this.btnlounge.Name = "btnlounge"; + this.btnlounge.Size = new System.Drawing.Size(114, 23); + this.btnlounge.TabIndex = 6; + this.btnlounge.Text = "Access My Lounge"; + this.btnlounge.UseVisualStyleBackColor = true; + this.btnlounge.Click += new System.EventHandler(this.btnlounge_Click); + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(643, 16); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(71, 13); + this.label2.TabIndex = 5; + this.label2.Text = "Search (slow)"; + // + // btngetkey + // + this.btngetkey.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btngetkey.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btngetkey.Location = new System.Drawing.Point(296, 14); + this.btngetkey.Name = "btngetkey"; + this.btngetkey.Size = new System.Drawing.Size(75, 23); + this.btngetkey.TabIndex = 4; + this.btngetkey.Text = "Get one!"; + this.btngetkey.UseVisualStyleBackColor = true; + this.btngetkey.Click += new System.EventHandler(this.btngetkey_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(169, 19); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(121, 13); + this.label1.TabIndex = 3; + this.label1.Text = "Need a Developer Key?"; + // + // txtsearch + // + this.txtsearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtsearch.Location = new System.Drawing.Point(721, 13); + this.txtsearch.Name = "txtsearch"; + this.txtsearch.Size = new System.Drawing.Size(153, 20); + this.txtsearch.TabIndex = 2; + this.txtsearch.TextChanged += new System.EventHandler(this.txtsearch_TextChanged); + // + // btnskins + // + this.btnskins.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnskins.Font = new System.Drawing.Font("Times New Roman", 10F); + this.btnskins.Location = new System.Drawing.Point(86, 4); + this.btnskins.Name = "btnskins"; + this.btnskins.Size = new System.Drawing.Size(76, 40); + this.btnskins.TabIndex = 1; + this.btnskins.Text = "Skins"; + this.btnskins.UseVisualStyleBackColor = true; + this.btnskins.Click += new System.EventHandler(this.btnskins_Click); + // + // btnapps + // + this.btnapps.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapps.Font = new System.Drawing.Font("Times New Roman", 10F); + this.btnapps.Location = new System.Drawing.Point(4, 4); + this.btnapps.Name = "btnapps"; + this.btnapps.Size = new System.Drawing.Size(76, 40); + this.btnapps.TabIndex = 0; + this.btnapps.Text = "Apps"; + this.btnapps.UseVisualStyleBackColor = true; + this.btnapps.Click += new System.EventHandler(this.btnapps_Click); + // + // imgpackageicons + // + this.imgpackageicons.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; + this.imgpackageicons.ImageSize = new System.Drawing.Size(16, 16); + this.imgpackageicons.TransparentColor = System.Drawing.Color.Transparent; + // + // Appscape + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Control; + this.ClientSize = new System.Drawing.Size(886, 469); + this.Controls.Add(this.panel3); + this.Name = "Appscape"; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.panel3.ResumeLayout(false); + this.pnlchoosenetwork.ResumeLayout(false); + this.pnlchoosenetwork.PerformLayout(); + this.pnlpackageeditor.ResumeLayout(false); + this.pnlpackageeditor.PerformLayout(); + this.pnllounge.ResumeLayout(false); + this.pnllounge.PerformLayout(); + this.pnlpackageinfo.ResumeLayout(false); + this.pnlpackageinfo.PerformLayout(); + this.pnlauthordetails.ResumeLayout(false); + this.pnlauthordetails.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbappicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbappscreenshot)).EndInit(); + this.pnldownload.ResumeLayout(false); + this.pnllist.ResumeLayout(false); + this.pnlsearch.ResumeLayout(false); + this.pnlsearch.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.ImageList imgpackageicons; + private System.Windows.Forms.Panel pnlsearch; + private System.Windows.Forms.Button btnskins; + private System.Windows.Forms.Button btnapps; + private System.Windows.Forms.Panel pnlpackageinfo; + private System.Windows.Forms.Label lbpkgname; + private System.Windows.Forms.Label lbpkgdescription; + private System.Windows.Forms.Panel pnldownload; + private System.Windows.Forms.Label lbdownloadpath; + private System.Windows.Forms.Button btndownload; + private System.Windows.Forms.Panel pnllist; + private System.Windows.Forms.ListView lvpackages; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.PictureBox pbappscreenshot; + private System.Windows.Forms.PictureBox pbappicon; + private System.Windows.Forms.TextBox txtsearch; + private System.Windows.Forms.Button btnlounge; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btngetkey; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel pnllounge; + private System.Windows.Forms.ListView lvmypackages; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.Label lbmyname; + private System.Windows.Forms.Label lbmybio; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtbitnoteaddress; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox txtbio; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox txtmoddername; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button btnsave; + private System.Windows.Forms.Button btnupload; + private System.Windows.Forms.Button btnedit; + private System.Windows.Forms.Panel pnlpackageeditor; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox txtprice; + private System.Windows.Forms.Label lbprice; + private System.Windows.Forms.Label lbaddress; + private System.Windows.Forms.CheckBox cbsell; + private System.Windows.Forms.TextBox txtpackagedescription; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtpackagename; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Button btndonecustomizing; + private System.Windows.Forms.Button btnsaa; + private System.Windows.Forms.Panel pnlauthordetails; + private System.Windows.Forms.Label lbauthordescription; + private System.Windows.Forms.Label lbauthorname; + private System.Windows.Forms.Panel pnlchoosenetwork; + private System.Windows.Forms.Button btnrequest; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.ListView lvnets; + private System.Windows.Forms.ColumnHeader clhostnameheader; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Appscape.cs b/source/WindowsFormsApplication1/Apps/Appscape.cs new file mode 100644 index 0000000..92171d9 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Appscape.cs @@ -0,0 +1,976 @@ +using NetSockets; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Appscape : Form + { + /// + /// Front-end for the Appscape Package Manager. + /// + public Appscape() + { + InitializeComponent(); + } + + private List clients = null; + + private void Form1_Load(object sender, EventArgs e) + { + clients = new List(); + foreach(var ip in Package_Grabber.clients.Keys) + { + if (Package_Grabber.clients[ip].IsConnected) + { + var client = new AppscapeClient(ip); + client.OnSuccessfulDownload += (object s, EventArgs a) => + { + this.Invoke(new Action(() => + { + if (AddressToSendTo != null) + { + var w = new BitnoteWallet(); + while(w.Clients == null) + { + + } + if (API.BitnoteAddress.Bitnotes >= CurrentItemCost) + { + if (w.AddBitnotesToAddress(AddressToSendTo, CurrentItemCost)) + { + API.CreateInfoboxSession("Package downloaded.", "The package has been successfully downloaded to your system.", infobox.InfoboxMode.Info); + API.BitnoteAddress.Bitnotes -= CurrentItemCost; + } + else + { + API.CreateInfoboxSession("Server-side Bitnote Error", "We couldn't complete the transaction, but the package was still downloaded. No Bitnotes have been taken from your account.", infobox.InfoboxMode.Info); + } + } + else + { + File.Delete((string)s); + API.CreateInfoboxSession("Insufficient funds.", "You do not have enough Bitnotes to complete the transaction.", infobox.InfoboxMode.Info); + } + } + })); + }; + client.OnPackagesReceived += (object s, EventArgs a) => + { + this.Invoke(new Action(() => { lvmypackages.Items.Clear(); })); + foreach (AppscapePackage package in client.Packages) + { + ListViewItem lvitem = new ListViewItem(); + lvitem.Text = package.Name; + package.Server = client.IP; + lvitem.Tag = package; + this.Invoke(new Action(() => + { + lvmypackages.Columns[0].Width = lvmypackages.Width; + if (MyDevProfile != null && LoungeClient != null) + { + if (package.DevKey == MyDevProfile.DevKey) + { + var lvmy = new ListViewItem(); + lvmy.Text = package.Name; + lvmy.Tag = package; + lvmypackages.Items.Add(lvmy); + lvmy.SubItems.Add(package.Cost.ToString()); + } + } + lvpackages.Items.Add(lvitem); + if (package.DevKey != null) + { + client.GetDevList(); + try { + var obj = client.DevList[package.DevKey]; + if (obj != null) + { + lvitem.SubItems.Add(obj.Name); + } + else + { + lvitem.SubItems.Add("Unknown"); + } + } + catch + { + lvitem.SubItems.Add("Unknown"); + } + + } + else { + lvitem.SubItems.Add("Unknown"); + } + lvitem.SubItems.Add(package.Cost.ToString()); + })); + } + }; + client.OnSkinDataReceived += (object s, EventArgs a) => + { + foreach (SkinData skin in client.Skins) + { + var item = new ListViewItem(); + item.Text = skin.Name; + skin.Server = client.IP; + item.Tag = skin; + this.Invoke(new Action(() => + { + lvpackages.Items.Add(item); + item.SubItems.Add(""); + item.SubItems.Add(skin.Cost.ToString()); + })); + } + }; + client.OnDevListSync += (object s, EventArgs a) => + { + API.CurrentSession.Invoke(new Action(() => + { + foreach (ListViewItem itm in lvpackages.Items) + { + if (DataType == "apps") + { + var pkg = (AppscapePackage)itm.Tag; + foreach (ListViewItem.ListViewSubItem subItem in itm.SubItems) + { + if (subItem.Text == "Unknown") + { /********************************************************************************************************************************************************************************/ + if (client.DevList != null && pkg.DevKey != null) + { + if (client.DevList.ContainsKey(pkg.DevKey)) + { + var dev = client.DevList[pkg.DevKey]; + subItem.Text = dev.Name; + } + } + } + } + } + } + })); + }; + client.GetDevList(); + clients.Add(client); + } + } + SetupList(); + pnllist.BringToFront(); + + } + + + /// + /// Sets up Appscape's package listing. + /// + public void SetupList() + { + if (DataType == "apps") + { + btnapps.BackColor = Color.Black; + btnapps.ForeColor = Color.White; + btnskins.BackColor = Color.White; + btnskins.ForeColor = Color.Black; + } + else + { + btnapps.BackColor = Color.White; + btnapps.ForeColor = Color.Black; + btnskins.BackColor = Color.Black; + btnskins.ForeColor = Color.White; + } + columnHeader1.Width = lvpackages.Width / 3; + columnHeader2.Width = lvpackages.Width / 3; + columnHeader3.Width = lvpackages.Width / 3; + + lvpackages.Items.Clear(); + pnlsearch.BackColor = API.CurrentSkin.titlebarcolour; + pnlsearch.ForeColor = API.CurrentSkin.titletextcolour; + if (DataType == "apps") + { + foreach (var client in clients) + { + client.GetDevList(); + client.GetPackageData(); + } + + } + else + { + foreach (var client in clients) + { + client.GetSkinData(); + } + + } + } + + private string DownloadPath = ""; + + private void lvpackages_SelectedIndexChanged(object sender, EventArgs e) + { + if (lvpackages.SelectedItems.Count > 0) + { + lvpackages.SelectedItems[0].BackColor = Color.Gray; + pnldownload.Show(); + foreach (ListViewItem lv in lvpackages.Items) + { + lv.BackColor = Color.White; + } + if (DataType == "apps") + { + AppscapePackage pkg = (AppscapePackage)lvpackages.SelectedItems[0].Tag; + lbpkgname.Text = pkg.Name; + lbpkgdescription.Text = pkg.Description; + try { + pbappscreenshot.Show(); + pbappscreenshot.Load(pkg.ScreenshotPath); + } + catch + { + pbappscreenshot.Hide(); + } + if (pkg.SetupFile == "" || pkg.SetupFile == null) + { + pnldownload.Hide(); + } + else + { + pnldownload.Show(); + lbdownloadpath.Text = "This package will download to: " + pkg.Name + ".stp."; + if (!pkg.SetupFile.EndsWith(".stp")) + { + pkg.SetupFile = pkg.SetupFile + ".stp"; + } + + foreach(var c in clients) + { + if(c.IP == pkg.Server) + { + DownloadClient = c; + } + } + DownloadPath = pkg.SetupFile; + } + try { + pbappicon.Show(); + pbappicon.Load("http://playshiftos.ml/appscape/packages/" + pkg.PkgIconPath); + } + catch + { + pbappicon.Hide(); + } + if (pkg.Cost == 0) + { + CurrentItemCost = Convert.ToDecimal(pkg.Cost); + } + else { + CurrentItemCost = Convert.ToDecimal(pkg.Cost.ToString("#.#####")); + } + if(pkg.DevKey != null) + { + pnlauthordetails.Show(); + lbauthorname.Text = "Author: " + GetModderByDevID(pkg.DevKey).Key.Name; + lbauthordescription.Text = GetModderByDevID(pkg.DevKey).Key.Bio; + AddressToSendTo = GetModderByDevID(pkg.DevKey).Key.BitnoteAddress; + } + else + { + pnlauthordetails.Hide(); + //Classic packages. + if(pkg.Address != null) + { + AddressToSendTo = pkg.Address; + } + else + { + AddressToSendTo = null; + } + } + } + else + { + var skin = (SkinData)lvpackages.SelectedItems[0].Tag; + lbpkgname.Text = skin.Name; + lbpkgdescription.Text = "Author: " + skin.Author + Environment.NewLine; + if (skin.Download.EndsWith(".skn")) + { + lbpkgdescription.Text += "Type: Single Skin (.skn)" + Environment.NewLine; + } + else + { + lbpkgdescription.Text += "Type: Skin Pack (.spk)" + Environment.NewLine; + } + if (skin.Screenshot != null) + { + pbappscreenshot.Show(); + pbappscreenshot.Load(skin.Screenshot); + } + else + { + pbappscreenshot.Hide(); + } + if (skin.Icon != null) + { + pbappicon.Show(); + pbappicon.Load("http://shiftos.shiftgames.ml/appscape/skins/" + skin.Icon); + } + else + { + pbappicon.Hide(); + } + if (skin.Cost == 0) + { + CurrentItemCost = Convert.ToDecimal(skin.Cost); + } + else { + CurrentItemCost = Convert.ToDecimal(skin.Cost.ToString("#.#####")); + } + lbpkgdescription.Text += Environment.NewLine + skin.Description; + lbdownloadpath.Text = "This skin will download to C:\\ShiftOS\\Home\\Downloads\\" + skin.Download; + foreach(var c in clients) + { + if(c.IP == skin.Server) + { + DownloadClient = c; + } + } + DownloadPath = skin.Download; + } + } + } + + public decimal CurrentItemCost = 0; + public string AddressToSendTo = null; + public AppscapeClient DownloadClient = null; + public AppscapeClient LoungeClient = null; + + private void btndownload_Click(object sender, EventArgs e) + { + if (API.BitnoteAddress != null) + { + try + { + if (API.BitnoteAddress.Bitnotes >= CurrentItemCost) + { + WebClient wc = new WebClient(); + if (!Directory.Exists(Paths.Home + OSInfo.DirectorySeparator + "Downloads")) + { + Directory.CreateDirectory(Paths.Home + OSInfo.DirectorySeparator + "Downloads"); + } + switch(DataType) + { + case "apps": + DownloadClient.DownloadPackage(DownloadPath); + break; + default: + DownloadClient.DownloadSkin(DownloadPath); + break; + } + + } + else + { + API.CreateInfoboxSession("Appscape - Not enough bitnotes!", "You do not have enough Bitnotes to buy this package.", infobox.InfoboxMode.Info); + } + } + catch (Exception wex) + { + API.CreateInfoboxSession("Error", "An error has occurred while downloading the package." + Environment.NewLine + Environment.NewLine + wex.Message, infobox.InfoboxMode.Info); + } + } + else + { + API.CreateInfoboxSession("No Bitnote Address Found", "It seems that your computer is not linked with a Bitnote address. Please go to shiftnet://main/bitnote/home.rnp for more information.", infobox.InfoboxMode.Info); + } + } + + private void btnupload_Click(object sender, EventArgs e) + { + var u = new AppscapeUploader(MyDevProfile, LoungeClient); + API.CreateForm(u, "Appscape Uploader", Properties.Resources.iconAppscape); + } + + public string DataType = "apps"; + + private void btnapps_Click(object sender, EventArgs e) + { + pnllist.BringToFront(); + DataType = "apps"; + SetupList(); + } + + private void btnskins_Click(object sender, EventArgs e) + { + pnllist.BringToFront(); + DataType = "skins"; + SetupList(); + } + + private void lvpackages_DoubleClick(object sender, EventArgs e) + { + if(lvpackages.SelectedItems.Count > 0) + { + pnlpackageinfo.BringToFront(); + } + } + + private void txtsearch_TextChanged(object sender, EventArgs e) + { + var bw = new BackgroundWorker(); + bw.DoWork += (object s, DoWorkEventArgs a) => + { + this.Invoke(new Action(() => + { + SetupList(); + })); + if (txtsearch.Text != "") + { + this.Invoke(new Action(() => + { + pnllist.BringToFront(); + })); + var newlst = new List(); + this.Invoke(new Action(() => + { + foreach (ListViewItem item in lvpackages.Items) + { + if (item.Text.ToLower().Replace(" ", "").Contains(txtsearch.Text.ToLower().Replace(" ", ""))) + { + newlst.Add(item); + } + } + lvpackages.Items.Clear(); + })); + foreach (ListViewItem itm in newlst) + { + this.Invoke(new Action(() => + { + lvpackages.Items.Add(itm); + })); + } + } + }; + bw.RunWorkerAsync(); + } + + /// + /// Gets developer info using the specified key. + /// + /// Bugs: If two servers contain the same key, the first key the method sees will be returned. + /// + /// The key to search for. + /// A pair containing the developer info as well as the client that contained the key. + public KeyValuePair GetModderByDevID(string DevID) + { + AppscapeModder dev = null; + AppscapeClient clt = null; + foreach (var client in clients) + { + if (client.DevList.ContainsKey(DevID)) + { + if (dev == null) + { + dev = client.DevList[DevID]; + clt = client; + } + } + + } + return new KeyValuePair(dev, clt); + } + + /// + /// Adds a new developer key to the specified client's listing. + /// + /// The client to add to. + public void GenerateNewDevKey(AppscapeClient client) + { + if(client.DevList == null) + { + client.DevList = new Dictionary(); + } + var rnd = new Random(); + int key = rnd.Next(1, 99999999); + var dev = new AppscapeModder(); + dev.DevKey = key.ToString(); + dev.Name = "Modder"; + bool done = false; + if (!client.DevList.ContainsKey(key.ToString())) + { + if (done != true) + { + client.DevList.Add(dev.DevKey, dev); + client.UploadDevList(client.DevList); + done = true; + API.CreateInfoboxSession("Success.", $"Your new developer key is {dev.DevKey}. As long as you are connected to the {client.IP} repository, you can use this key to enter the Appscape Lounge, make a name for yourself, and start uploading.", infobox.InfoboxMode.Info); + } + } + } + + private void btngetkey_Click(object sender, EventArgs e) + { + pnlchoosenetwork.BringToFront(); + SetupNetworks(); + } + + /// + /// Lists all available Appscape repositories a key can be added to. + /// + private void SetupNetworks() + { + clhostnameheader.Width = lvnets.Width; + lvnets.Items.Clear(); + foreach(var c in clients) + { + var lv = new ListViewItem(); + lv.Text = c.IP; + lv.Tag = c; + lvnets.Items.Add(lv); + } + } + + private AppscapeModder MyDevProfile = null; + + /// + /// Sets up the Developer Lounge. + /// + public void SetupLounge() + { + pnllounge.BringToFront(); + //List of all my packages + lvmypackages.Items.Clear(); + foreach (var client in clients) + { + client.GetPackageData(); + } + + //My name. + lbmyname.Text = MyDevProfile.Name; + txtmoddername.Text = MyDevProfile.Name; + //Biography. + lbmybio.Text = MyDevProfile.Bio; + txtbio.Text = MyDevProfile.Bio; + //My Bitnote Address + txtbitnoteaddress.Text = MyDevProfile.BitnoteAddress; + + } + + private void btnlounge_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Appscape Developer Lounge", "Please enter your Developer Key to enter the Lounge.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + bool cont = true; + if (res != "fail") + { + try + { + var dev = GetModderByDevID(res); + MyDevProfile = dev.Key; + LoungeClient = dev.Value; + SetupLounge(); + } + catch + { + cont = false; + } + } + if (cont != true) + API.CreateInfoboxSession("Appscape Developer Lounge", "That Developer Key was not found in the database.", infobox.InfoboxMode.Info); + }; + } + + private void btnsave_Click(object sender, EventArgs e) + { + var c = LoungeClient; + c.DevList[MyDevProfile.DevKey] = MyDevProfile; + c.UploadDevList(c.DevList); + btnapps_Click(sender, e); + } + + private void txtbitnoteaddress_TextChanged(object sender, EventArgs e) + { + MyDevProfile.BitnoteAddress = txtbitnoteaddress.Text; + } + + private void txtbio_TextChanged(object sender, EventArgs e) + { + MyDevProfile.Bio = txtbio.Text; + } + + private void txtmoddername_TextChanged(object sender, EventArgs e) + { + MyDevProfile.Name = txtmoddername.Text; + } + + private AppscapePackage PackageToEdit = null; + + private void btnedit_Click(object sender, EventArgs e) + { + if(lvmypackages.SelectedItems.Count > 0) + { + ListViewItem itm = lvmypackages.SelectedItems[0]; + AppscapePackage pkg = (AppscapePackage)itm.Tag; + PackageToEdit = pkg; + pnlpackageeditor.BringToFront(); + SetupEditor(); + } + } + + /// + /// Sets up the package editor. + /// + private void SetupEditor() + { + if(PackageToEdit.Cost > 0) + { + cbsell.Checked = true; + } + txtprice.Text = PackageToEdit.Cost.ToString(); + txtpackagename.Text = PackageToEdit.Name; + txtpackagedescription.Text = PackageToEdit.Description; + SAAFile = null; + } + + private string SAAFile = null; + + private void cbsell_CheckedChanged(object sender, EventArgs e) + { + lbprice.Visible = cbsell.Checked; + lbaddress.Visible = cbsell.Checked; + txtprice.Visible = cbsell.Checked; + + } + + private void btndonecustomizing_Click(object sender, EventArgs e) + { + bool ContinueUpload = true; + //Create new package and assign values + var pkg = PackageToEdit; + var OldName = pkg.Name.Replace(" ", "_"); + pkg.Name = txtpackagename.Text; + pkg.Description = txtpackagedescription.Text; + if (cbsell.Checked == true) + { + try + { + pkg.Cost = Convert.ToDecimal(Convert.ToDecimal(txtprice.Text).ToString("#.#####")); + } + catch + { + ContinueUpload = false; + API.CreateInfoboxSession("Error", "You have entered an incorrect price value.", infobox.InfoboxMode.Info); + } + } + else { + pkg.Cost = 0; + } + pkg.PkgIconPath = ""; + if (ContinueUpload == true) + { + + if (!Directory.Exists(Paths.Mod_Temp + "newapm")) + { + Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); + } + else + { + Directory.Delete(Paths.Mod_Temp + "newapm", true); + Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); + } + + //Copy app SAA and icon to package folder + if (SAAFile != null) + { + File.Copy(SAAFile, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); + } + else + { + var wc = new WebClient(); + wc.DownloadFile("http://playshiftos.ml/appscape/packages/" + OldName + ".stp", Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); + } + Properties.Resources.iconShiftnet.Save(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); + + //Create AL meta file for package (so it will display in the app launcher) + var al = new ModApplauncherItem(); + al.Display = true; + al.Icon = "Icon.bmp"; + al.Name = pkg.Name; + al.ShiftCode = "runSAA:app.saa"; + al.AppDirectory = al.Name; + + //Serialize AL meta file and copy to package + var json = JsonConvert.SerializeObject(al); + File.WriteAllText(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "applauncher", json); + + //Package file to .stp and upload to Appscape + ZipFile.CreateFromDirectory(Paths.Mod_Temp + "newapm", Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp"); + LoungeClient.UploadPackage(pkg, File.ReadAllBytes(Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp")); + btnapps_Click(sender, e); + + SetupLounge(); + pnllounge.BringToFront(); + } + } + + private void btnsaa_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + SAAFile = res; + btnsaa.Text = new FileInfo(SAAFile).Name; + } + }; + } + + private void btnrequest_Click(object sender, EventArgs e) + { + if(lvnets.SelectedItems.Count > 0) + { + //try + //{ + GenerateNewDevKey((AppscapeClient)lvnets.SelectedItems[0].Tag); + /*} + catch (Exception ex) + { + API.CreateInfoboxSession("Error", "An error has occurred trying to process the request: {ex.Message}", infobox.InfoboxMode.Info); + }*/ + } + } + } + + public class AppscapeClient + { + #region Constructor + + /// + /// Represents a client that communicates with an Appscape repository. + /// + /// Generally you shouldn't need to create an instance of this unless you messed up Appscape and are desperately trying to fix it by rewriting it, in which case you really should've just rolled back the source code. xD + /// + /// IP address of the repo. This can be found in Package_Grabber.clients.Keys. + public AppscapeClient(string ip_address) + { + try { + var c = Package_Grabber.clients[ip_address]; + c.OnReceived += (object s, NetReceivedEventArgs a) => + { + var obj = (ObjectModel)a.Data.Object; + switch (_mode) + { + case "getapps": + try + { + Packages = (List)obj.OptionalObject; + var h = OnPackagesReceived; + if (h != null) + { + h(obj, new EventArgs()); + } + } + catch + { + + } + + break; + case "get_devlist": + try { + if (obj.OptionalObject != null) + { + if (DevList == null) + { + DevList = new Dictionary(); + } + var lst = (List)obj.OptionalObject; + foreach (string json in lst) + { + var dev = JsonConvert.DeserializeObject(json); + if (!DevList.ContainsKey(dev.DevKey)) + { + DevList.Add(dev.DevKey, dev); + } + } + var h = OnDevListSync; + if (h != null) + { + h(obj, new EventArgs()); + } + } + } + catch + { + + } + break; + case "getskins": + try + { + Skins = (List)obj.OptionalObject; + var h = OnSkinDataReceived; + if (h != null) + { + h(obj, new EventArgs()); + } + } + catch + { + + } + break; + default: + try { + var command = (ObjectModel)a.Data.Object; + string[] args = command.Command.Split(' '); + switch (args[0]) + { + case "package_bytes": + byte[] package = (byte[])command.OptionalObject; + File.WriteAllBytes($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{OSInfo.DirectorySeparator}{args[1]}", package); + var h = OnSuccessfulDownload; + if (h != null) + { + h($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{ OSInfo.DirectorySeparator}{args[1]}", new EventArgs()); + } + break; + case "skin_bytes": + byte[] skin = (byte[])command.OptionalObject; + File.WriteAllBytes($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{OSInfo.DirectorySeparator}{args[1]}", skin); + var ha = OnSuccessfulDownload; + if (ha != null) + { + ha($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{ OSInfo.DirectorySeparator}{args[1]}", new EventArgs()); + } + break; + } + } + catch + { + + } + break; + } + }; + _IP = ip_address; + } + catch + { + throw new ArgumentException("IP address not found in client list."); + } + } + + #endregion + + #region Events + + public event EventHandler OnPackagesReceived; + public event EventHandler OnSkinDataReceived; + public event EventHandler OnDevListSync; + public event EventHandler OnDevGrabbed; + public event EventHandler OnSuccessfulDownload; + + #endregion + + #region Variables + + public List Packages = null; + public List Skins = null; + public Dictionary DevList = null; + private string _mode = ""; + private string _IP = ""; + public string IP { get { return _IP; } } + + #endregion + + #region Methods + + /// + /// Connects to Appscape server and grabs app package listings. + /// + public void GetPackageData() + { + _mode = "getapps"; + Package_Grabber.SendMessage(_IP, "apm getapps"); + + } + + /// + /// Connects to server and requests a list of all developers. + /// + public void GetDevList() + { + _mode = "get_devlist"; + Package_Grabber.SendMessage(_IP, "get_devlist"); + } + + /// + /// Downloads a package. + /// + /// Package name to download. + public void DownloadPackage(string pkg) + { + _mode = ""; + Package_Grabber.SendMessage(_IP, $"apm getpackage {pkg}"); + } + + /// + /// Downloads a skin. + /// + /// The skin name to download. + public void DownloadSkin(string skn) + { + _mode = ""; + Package_Grabber.SendMessage(_IP, $"apm getskin {skn}"); + } + + + /// + /// Uploads a new package to the server. + /// + /// Package metadata (name, description, etc) + /// Byte array representing the .stp file to upload. + public void UploadPackage(AppscapePackage pkgMeta, byte[] pkg) + { + pkgMeta.SetupFile = pkgMeta.Name.Replace(" ", "_") + ".stp"; + Package_Grabber.SendMessage(_IP, $"apm uploadmeta {pkgMeta.Name.Replace(" ", "_")}.json", pkgMeta); + Package_Grabber.SendMessage(_IP, $"apm upload {pkgMeta.SetupFile}", pkg); + } + + /// + /// Connects to Appscape server and grabs skin listings. + /// + public void GetSkinData() + { + _mode = "getskins"; + Package_Grabber.SendMessage(_IP, "apm getskins"); + + } + + /// + /// Contacts the server to save the devlist. + /// + /// Updated dev list to save. + public void UploadDevList(Dictionary dict) + { + Package_Grabber.SendMessage(_IP, "apm uploaddevlist", dict); + } + + #endregion + } +} diff --git a/source/WindowsFormsApplication1/Apps/Appscape.resx b/source/WindowsFormsApplication1/Apps/Appscape.resx new file mode 100644 index 0000000..524af34 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Appscape.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Please choose a repository you would like your developer key to be associated with. Any uploads made using the new key will be sent to this repository and viewers of this repository will see your new package. + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/AppscapeUploader.Designer.cs b/source/WindowsFormsApplication1/Apps/AppscapeUploader.Designer.cs new file mode 100644 index 0000000..e23ef2d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/AppscapeUploader.Designer.cs @@ -0,0 +1,423 @@ +namespace ShiftOS +{ + partial class AppscapeUploader + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbtitle = new System.Windows.Forms.Label(); + this.pnlmain = new System.Windows.Forms.Panel(); + this.Page0 = new System.Windows.Forms.Panel(); + this.txtprice = new System.Windows.Forms.TextBox(); + this.lbprice = new System.Windows.Forms.Label(); + this.lbaddress = new System.Windows.Forms.Label(); + this.cbsell = new System.Windows.Forms.CheckBox(); + this.txtpackagedescription = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.txtpackagename = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.Page1 = new System.Windows.Forms.Panel(); + this.btncompilesaa = new System.Windows.Forms.Button(); + this.btnscreenshot = new System.Windows.Forms.Button(); + this.btnicon = new System.Windows.Forms.Button(); + this.btnsaa = new System.Windows.Forms.Button(); + this.Page2 = new System.Windows.Forms.Panel(); + this.txtconfirm = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.lbldescription = new System.Windows.Forms.Label(); + this.pnlactions = new System.Windows.Forms.FlowLayoutPanel(); + this.btndone = new System.Windows.Forms.Button(); + this.btnnext = new System.Windows.Forms.Button(); + this.btnback = new System.Windows.Forms.Button(); + this.btncancel = new System.Windows.Forms.Button(); + this.pnlmain.SuspendLayout(); + this.Page0.SuspendLayout(); + this.Page1.SuspendLayout(); + this.Page2.SuspendLayout(); + this.pnlactions.SuspendLayout(); + this.SuspendLayout(); + // + // lbtitle + // + this.lbtitle.BackColor = System.Drawing.Color.Gray; + this.lbtitle.Dock = System.Windows.Forms.DockStyle.Top; + this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.lbtitle.ForeColor = System.Drawing.Color.White; + this.lbtitle.Location = new System.Drawing.Point(0, 0); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Padding = new System.Windows.Forms.Padding(15, 0, 0, 0); + this.lbtitle.Size = new System.Drawing.Size(711, 49); + this.lbtitle.TabIndex = 0; + this.lbtitle.Text = "Welcome!"; + this.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // pnlmain + // + this.pnlmain.BackColor = System.Drawing.Color.Gray; + this.pnlmain.Controls.Add(this.Page0); + this.pnlmain.Controls.Add(this.Page1); + this.pnlmain.Controls.Add(this.Page2); + this.pnlmain.Controls.Add(this.lbldescription); + this.pnlmain.Controls.Add(this.pnlactions); + this.pnlmain.Controls.Add(this.lbtitle); + this.pnlmain.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlmain.Location = new System.Drawing.Point(0, 0); + this.pnlmain.Name = "pnlmain"; + this.pnlmain.Size = new System.Drawing.Size(711, 485); + this.pnlmain.TabIndex = 1; + // + // Page0 + // + this.Page0.Controls.Add(this.txtprice); + this.Page0.Controls.Add(this.lbprice); + this.Page0.Controls.Add(this.lbaddress); + this.Page0.Controls.Add(this.cbsell); + this.Page0.Controls.Add(this.txtpackagedescription); + this.Page0.Controls.Add(this.label2); + this.Page0.Controls.Add(this.txtpackagename); + this.Page0.Controls.Add(this.label1); + this.Page0.Dock = System.Windows.Forms.DockStyle.Fill; + this.Page0.Location = new System.Drawing.Point(0, 135); + this.Page0.Name = "Page0"; + this.Page0.Size = new System.Drawing.Size(711, 314); + this.Page0.TabIndex = 3; + // + // txtprice + // + this.txtprice.Location = new System.Drawing.Point(542, 239); + this.txtprice.Name = "txtprice"; + this.txtprice.Size = new System.Drawing.Size(89, 20); + this.txtprice.TabIndex = 8; + this.txtprice.Visible = false; + this.txtprice.TextChanged += new System.EventHandler(this.txtprice_TextChanged); + // + // lbprice + // + this.lbprice.AutoSize = true; + this.lbprice.Location = new System.Drawing.Point(505, 242); + this.lbprice.Name = "lbprice"; + this.lbprice.Size = new System.Drawing.Size(34, 13); + this.lbprice.TabIndex = 7; + this.lbprice.Text = "Price:"; + this.lbprice.Visible = false; + this.lbprice.Click += new System.EventHandler(this.lbprice_Click); + // + // lbaddress + // + this.lbaddress.Location = new System.Drawing.Point(211, 242); + this.lbaddress.Name = "lbaddress"; + this.lbaddress.Size = new System.Drawing.Size(275, 45); + this.lbaddress.TabIndex = 5; + this.lbaddress.Text = "All profit made from this package will be sent to the Bitnote Address defined in " + + "your Dev Lounge; if it is non-existent, Bitnotes simply won\'t arrive."; + this.lbaddress.Visible = false; + this.lbaddress.Click += new System.EventHandler(this.lbaddress_Click); + // + // cbsell + // + this.cbsell.Appearance = System.Windows.Forms.Appearance.Button; + this.cbsell.AutoSize = true; + this.cbsell.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbsell.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.cbsell.Location = new System.Drawing.Point(98, 235); + this.cbsell.Name = "cbsell"; + this.cbsell.Size = new System.Drawing.Size(92, 24); + this.cbsell.TabIndex = 4; + this.cbsell.Text = "Sell for Bitnotes"; + this.cbsell.UseVisualStyleBackColor = true; + this.cbsell.CheckedChanged += new System.EventHandler(this.cbsell_CheckedChanged); + // + // txtpackagedescription + // + this.txtpackagedescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtpackagedescription.Location = new System.Drawing.Point(100, 44); + this.txtpackagedescription.Multiline = true; + this.txtpackagedescription.Name = "txtpackagedescription"; + this.txtpackagedescription.Size = new System.Drawing.Size(591, 189); + this.txtpackagedescription.TabIndex = 3; + this.txtpackagedescription.TextChanged += new System.EventHandler(this.txtpackagedescription_TextChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(13, 47); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(60, 13); + this.label2.TabIndex = 2; + this.label2.Text = "Description"; + this.label2.Click += new System.EventHandler(this.label2_Click); + // + // txtpackagename + // + this.txtpackagename.Location = new System.Drawing.Point(100, 15); + this.txtpackagename.Name = "txtpackagename"; + this.txtpackagename.Size = new System.Drawing.Size(258, 20); + this.txtpackagename.TabIndex = 1; + this.txtpackagename.TextChanged += new System.EventHandler(this.txtpackagename_TextChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(81, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Package Name"; + this.label1.Click += new System.EventHandler(this.label1_Click); + // + // Page1 + // + this.Page1.Controls.Add(this.btncompilesaa); + this.Page1.Controls.Add(this.btnscreenshot); + this.Page1.Controls.Add(this.btnicon); + this.Page1.Controls.Add(this.btnsaa); + this.Page1.Dock = System.Windows.Forms.DockStyle.Fill; + this.Page1.Location = new System.Drawing.Point(0, 135); + this.Page1.Name = "Page1"; + this.Page1.Size = new System.Drawing.Size(711, 314); + this.Page1.TabIndex = 4; + // + // btncompilesaa + // + this.btncompilesaa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btncompilesaa.AutoSize = true; + this.btncompilesaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btncompilesaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncompilesaa.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btncompilesaa.Location = new System.Drawing.Point(4, 282); + this.btncompilesaa.Name = "btncompilesaa"; + this.btncompilesaa.Size = new System.Drawing.Size(82, 26); + this.btncompilesaa.TabIndex = 7; + this.btncompilesaa.Text = "Compile SAA"; + this.btncompilesaa.UseVisualStyleBackColor = true; + this.btncompilesaa.Click += new System.EventHandler(this.btncompilesaa_Click); + // + // btnscreenshot + // + this.btnscreenshot.AutoSize = true; + this.btnscreenshot.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnscreenshot.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnscreenshot.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnscreenshot.Location = new System.Drawing.Point(12, 76); + this.btnscreenshot.Name = "btnscreenshot"; + this.btnscreenshot.Size = new System.Drawing.Size(121, 26); + this.btnscreenshot.TabIndex = 6; + this.btnscreenshot.Text = "Select App Screenshot"; + this.btnscreenshot.UseVisualStyleBackColor = true; + this.btnscreenshot.Click += new System.EventHandler(this.btnscreenshot_Click); + // + // btnicon + // + this.btnicon.AutoSize = true; + this.btnicon.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnicon.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnicon.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnicon.Location = new System.Drawing.Point(12, 44); + this.btnicon.Name = "btnicon"; + this.btnicon.Size = new System.Drawing.Size(92, 26); + this.btnicon.TabIndex = 5; + this.btnicon.Text = "Select App Icon"; + this.btnicon.UseVisualStyleBackColor = true; + this.btnicon.Click += new System.EventHandler(this.btnicon_Click); + // + // btnsaa + // + this.btnsaa.AutoSize = true; + this.btnsaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnsaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsaa.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnsaa.Location = new System.Drawing.Point(12, 9); + this.btnsaa.Name = "btnsaa"; + this.btnsaa.Size = new System.Drawing.Size(92, 26); + this.btnsaa.TabIndex = 4; + this.btnsaa.Text = "Select App SAA"; + this.btnsaa.UseVisualStyleBackColor = true; + this.btnsaa.Click += new System.EventHandler(this.btnsaa_Click); + // + // Page2 + // + this.Page2.Controls.Add(this.txtconfirm); + this.Page2.Controls.Add(this.label3); + this.Page2.Dock = System.Windows.Forms.DockStyle.Fill; + this.Page2.Location = new System.Drawing.Point(0, 135); + this.Page2.Name = "Page2"; + this.Page2.Size = new System.Drawing.Size(711, 314); + this.Page2.TabIndex = 7; + // + // txtconfirm + // + this.txtconfirm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtconfirm.Location = new System.Drawing.Point(19, 49); + this.txtconfirm.Multiline = true; + this.txtconfirm.Name = "txtconfirm"; + this.txtconfirm.Size = new System.Drawing.Size(672, 259); + this.txtconfirm.TabIndex = 1; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(16, 18); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(132, 13); + this.label3.TabIndex = 0; + this.label3.Text = "Confirm Package Settings:"; + // + // lbldescription + // + this.lbldescription.Dock = System.Windows.Forms.DockStyle.Top; + this.lbldescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.lbldescription.ForeColor = System.Drawing.Color.White; + this.lbldescription.Location = new System.Drawing.Point(0, 49); + this.lbldescription.Name = "lbldescription"; + this.lbldescription.Padding = new System.Windows.Forms.Padding(15, 0, 0, 0); + this.lbldescription.Size = new System.Drawing.Size(711, 86); + this.lbldescription.TabIndex = 2; + this.lbldescription.Text = "label1"; + // + // pnlactions + // + this.pnlactions.Controls.Add(this.btndone); + this.pnlactions.Controls.Add(this.btnnext); + this.pnlactions.Controls.Add(this.btnback); + this.pnlactions.Controls.Add(this.btncancel); + this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlactions.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.pnlactions.ForeColor = System.Drawing.Color.White; + this.pnlactions.Location = new System.Drawing.Point(0, 449); + this.pnlactions.Name = "pnlactions"; + this.pnlactions.Size = new System.Drawing.Size(711, 36); + this.pnlactions.TabIndex = 1; + // + // btndone + // + this.btndone.AutoSize = true; + this.btndone.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndone.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btndone.Location = new System.Drawing.Point(660, 3); + this.btndone.Name = "btndone"; + this.btndone.Size = new System.Drawing.Size(48, 26); + this.btndone.TabIndex = 0; + this.btndone.Text = "Done!"; + this.btndone.UseVisualStyleBackColor = true; + this.btndone.Click += new System.EventHandler(this.btndone_Click); + // + // btnnext + // + this.btnnext.AutoSize = true; + this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnnext.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnnext.Location = new System.Drawing.Point(612, 3); + this.btnnext.Name = "btnnext"; + this.btnnext.Size = new System.Drawing.Size(42, 26); + this.btnnext.TabIndex = 1; + this.btnnext.Text = "Next"; + this.btnnext.UseVisualStyleBackColor = true; + this.btnnext.Click += new System.EventHandler(this.btnnext_Click); + // + // btnback + // + this.btnback.AutoSize = true; + this.btnback.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnback.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnback.Location = new System.Drawing.Point(564, 3); + this.btnback.Name = "btnback"; + this.btnback.Size = new System.Drawing.Size(42, 26); + this.btnback.TabIndex = 2; + this.btnback.Text = "Back"; + this.btnback.UseVisualStyleBackColor = true; + this.btnback.Click += new System.EventHandler(this.btnback_Click); + // + // btncancel + // + this.btncancel.AutoSize = true; + this.btncancel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btncancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncancel.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btncancel.Location = new System.Drawing.Point(508, 3); + this.btncancel.Name = "btncancel"; + this.btncancel.Size = new System.Drawing.Size(50, 26); + this.btncancel.TabIndex = 3; + this.btncancel.Text = "Cancel"; + this.btncancel.UseVisualStyleBackColor = true; + this.btncancel.Click += new System.EventHandler(this.btncancel_Click); + // + // AppscapeUploader + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(711, 485); + this.Controls.Add(this.pnlmain); + this.Name = "AppscapeUploader"; + this.Text = "AppscapeUploader"; + this.Load += new System.EventHandler(this.AppscapeUploader_Load); + this.pnlmain.ResumeLayout(false); + this.Page0.ResumeLayout(false); + this.Page0.PerformLayout(); + this.Page1.ResumeLayout(false); + this.Page1.PerformLayout(); + this.Page2.ResumeLayout(false); + this.Page2.PerformLayout(); + this.pnlactions.ResumeLayout(false); + this.pnlactions.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.Panel pnlmain; + private System.Windows.Forms.FlowLayoutPanel pnlactions; + private System.Windows.Forms.Button btndone; + private System.Windows.Forms.Button btnnext; + private System.Windows.Forms.Button btnback; + private System.Windows.Forms.Button btncancel; + private System.Windows.Forms.Label lbldescription; + private System.Windows.Forms.Panel Page0; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtpackagedescription; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtpackagename; + private System.Windows.Forms.Panel Page1; + private System.Windows.Forms.Button btnsaa; + private System.Windows.Forms.Button btnscreenshot; + private System.Windows.Forms.Button btnicon; + private System.Windows.Forms.Panel Page2; + private System.Windows.Forms.TextBox txtconfirm; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btncompilesaa; + private System.Windows.Forms.TextBox txtprice; + private System.Windows.Forms.Label lbprice; + private System.Windows.Forms.Label lbaddress; + private System.Windows.Forms.CheckBox cbsell; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/AppscapeUploader.cs b/source/WindowsFormsApplication1/Apps/AppscapeUploader.cs new file mode 100644 index 0000000..5cc8560 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/AppscapeUploader.cs @@ -0,0 +1,380 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class AppscapeUploader : Form + { + /// + /// Front-end to handle uploading of an Appscape package. + /// + /// The developer of the new package. + /// The client representing the repository to upload to. + public AppscapeUploader(AppscapeModder modder, AppscapeClient repo) + { + InitializeComponent(); + MyProfile = modder; + Repo = repo; + } + + private AppscapeModder MyProfile = null; + private AppscapeClient Repo = null; + + private void btncancel_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void btndone_Click(object sender, EventArgs e) + { + bool ContinueUpload = true; + //Create new package and assign values + var pkg = new AppscapePackage(); + pkg.Name = txtpackagename.Text; + pkg.DevKey = MyProfile.DevKey; + pkg.Description = txtpackagedescription.Text; + if (cbsell.Checked == true) + { + try + { + pkg.Cost = Convert.ToDecimal(Convert.ToDecimal(txtprice.Text).ToString("#.#####")); + } + catch + { + ContinueUpload = false; + API.CreateInfoboxSession("Error", "You have entered an incorrect price value.", infobox.InfoboxMode.Info); + } + } + else { + pkg.Cost = 0; + } + pkg.SetupFile = pkg.Name.Replace(" ", "_"); + pkg.PkgIconPath = ""; + if(AppScreenshot != null) + { + pkg.ScreenshotPath = new FileInfo(AppScreenshot).Name.Replace(" ", "_"); + } + else + { + pkg.ScreenshotPath = "none.jpg"; + } + if (ContinueUpload == true) { + //Upload the package meta file + + if (!Directory.Exists(Paths.Mod_Temp + "newapm")) { + Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); + } + else + { + Directory.Delete(Paths.Mod_Temp + "newapm", true); + Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); + } + + //Copy app SAA and icon to package folder + File.Copy(SAAFile, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); + if (AppIcon != null) + { + File.Copy(AppIcon, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); + } + else + { + Properties.Resources.iconShiftnet.Save(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); + } + + //Create AL meta file for package (so it will display in the app launcher) + var al = new ModApplauncherItem(); + al.Display = true; + al.Icon = "Icon.bmp"; + al.Name = pkg.Name; + al.ShiftCode = "runSAA:app.saa"; + al.AppDirectory = al.Name; + + //Serialize AL meta file and copy to package + var json = JsonConvert.SerializeObject(al); + File.WriteAllText(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "applauncher", json); + + //Package file to .stp and upload to Appscape + ZipFile.CreateFromDirectory(Paths.Mod_Temp + "newapm", Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp"); + Repo.UploadPackage(pkg, File.ReadAllBytes(Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp")); + + + + this.Close(); + } + } + + + int page = 0; + + /// + /// Makes the specified control and ALL of it's children, grand children, great grand children, and so on, appear "dark". + /// + /// The top of the hierarchy; the start of it all. + private void RecursiveControlSetup(Control ctrl) + { + ctrl.BackColor = API.CurrentSkin.titlebarcolour; + ctrl.ForeColor = API.CurrentSkin.titletextcolour; + try + { + var pnl = (Panel)ctrl; + foreach(Control c in pnl.Controls) + { + RecursiveControlSetup(c); + } + } + catch { + + } + } + + /// + /// Sets up the user interface. + /// + private void SetupUI() + { + RecursiveControlSetup(pnlmain); + switch (page) + { + case 0: + lbtitle.Text = "Welcome!"; + lbldescription.Text = "This wizard will guide you through the creation of an Appscape Package which will be uploaded to Appscape for all to see. First, let's start with some basics."; + Page0.BringToFront(); + btndone.Hide(); + btnback.Hide(); + break; + case 1: + lbtitle.Text = "Packaged Files"; + lbldescription.Text = "Now that we have a name and description, it's time to get some files into your package. Namely, an icon and the app itself."; + btnback.Show(); + Page1.BringToFront(); + break; + case 2: + lbtitle.Text = "Ready!"; + lbldescription.Text = "That's all we need from you. Assuming everything is correct, as soon as you click 'Done!', the package will be generated and uploaded to Appscape quicker than you can say \"Appscape Package Manager is so freakin' awesome.\"."; + btnnext.Hide(); + btndone.Show(); + Page2.BringToFront(); + txtconfirm.Font = new Font(OSInfo.GetMonospaceFont(), 9); + ConfirmPKG(); + break; + } + } + + /// + /// Makes sure the package is ready for upload. + /// + private void ConfirmPKG() + { + txtconfirm.Text = ""; + WriteLine(" == Basics == "); + WriteLine($"Name: {txtpackagename.Text}"); + WriteLine($"Description: {txtpackagedescription.Text}"); + WriteLine(""); + WriteLine(" == Files == "); + if(SAAFile != null) + { + WriteLine(SAAFile); + } + else + { + WriteLine("no saa file"); + } + WriteLine(AppIcon); + WriteLine(AppScreenshot); + WriteLine(""); + WriteLine(" == Package Check == "); + CheckForErrors(); + foreach(string err in Errors) + { + WriteLine(" - " + err); + btndone.Hide(); + } + if(Errors.Count > 0) + { + WriteLine("Please go back and correct these errors."); + } + } + + private List Errors = null; + + /// + /// Checks for package errors. + /// + private void CheckForErrors() + { + Errors = new List(); + if(txtpackagename.Text.Length < 1) + { + Errors.Add("Your package doesn't have a name."); + } + if(SAAFile == null) + { + Errors.Add("Your package won't contain a .saa file, therefore it won't be installed by ShiftOS!"); + } + } + + /// + /// Writes a line to the summary box. + /// + /// Text to write. + private void WriteLine(string text) + { + if(txtconfirm.Text == "") + { + txtconfirm.Text = text; + } + else + { + txtconfirm.Text += Environment.NewLine + text; + } + } + + private void btnnext_Click(object sender, EventArgs e) + { + page += 1; + SetupUI(); + } + + private void btnback_Click(object sender, EventArgs e) + { + page -= 1; + SetupUI(); + } + + private void AppscapeUploader_Load(object sender, EventArgs e) + { + SetupUI(); + } + + private string SAAFile = null; + private string AppIcon = null; + private string AppScreenshot = null; + + private void btnsaa_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + SAAFile = res; + btnsaa.Text = new FileInfo(SAAFile).Name; + } + }; + } + + private void btnicon_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".bmp;.png;.jpg;.pic", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + AppIcon = res; + btnicon.Text = new FileInfo(res).Name; + } + }; + } + + private void btnscreenshot_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".bmp;.png;.jpg;.pic", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + AppScreenshot = res; + btnscreenshot.Text = new FileInfo(res).Name; + } + }; + } + + private void btncompilesaa_Click(object sender, EventArgs e) + { + //Source code folder finder + API.CreateFileSkimmerSession("dir", File_Skimmer.FileSkimmerMode.OpenFolder); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + if(File.Exists(res + OSInfo.DirectorySeparator + "main.lua")) { + string dir = res; + API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s2, FormClosingEventArgs a2) => + { + try + { + ZipFile.CreateFromDirectory(dir, API.GetFSResult()); + API.CreateInfoboxSession("Success", "The SAA file has been created successfully.", infobox.InfoboxMode.Info); + } + catch + { + API.CreateInfoboxSession("Error", "Could not create the SAA file.", infobox.InfoboxMode.Info); + } + }; + } + else { + API.CreateInfoboxSession("Invalid source", "Your source directory doesn't contain a main script (main.lua) file.", infobox.InfoboxMode.Info); + } + } + }; + } + + private void cbsell_CheckedChanged(object sender, EventArgs e) + { + lbprice.Visible = cbsell.Checked; + lbaddress.Visible = cbsell.Checked; + txtprice.Visible = cbsell.Checked; + } + + private void lbprice_Click(object sender, EventArgs e) + { + + } + + private void txtprice_TextChanged(object sender, EventArgs e) + { + + } + + private void lbaddress_Click(object sender, EventArgs e) + { + + } + + private void txtpackagedescription_TextChanged(object sender, EventArgs e) + { + + } + + private void label2_Click(object sender, EventArgs e) + { + + } + + private void txtpackagename_TextChanged(object sender, EventArgs e) + { + + } + + private void label1_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/AppscapeUploader.resx b/source/WindowsFormsApplication1/Apps/AppscapeUploader.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/AppscapeUploader.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Artpad.Designer.cs b/source/WindowsFormsApplication1/Apps/Artpad.Designer.cs new file mode 100644 index 0000000..13bfba1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Artpad.Designer.cs @@ -0,0 +1,3589 @@ +namespace ShiftOS +{ + partial class Artpad + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.pnldrawingbackground = new System.Windows.Forms.Panel(); + this.pnlinitialcanvassettings = new System.Windows.Forms.Panel(); + this.btncancel = new System.Windows.Forms.Button(); + this.btncreate = new System.Windows.Forms.Button(); + this.Label11 = new System.Windows.Forms.Label(); + this.lbltotalpixels = new System.Windows.Forms.Label(); + this.txtnewcanvasheight = new System.Windows.Forms.TextBox(); + this.Label10 = new System.Windows.Forms.Label(); + this.txtnewcanvaswidth = new System.Windows.Forms.TextBox(); + this.Label9 = new System.Windows.Forms.Label(); + this.pnlpalletsize = new System.Windows.Forms.Panel(); + this.txttopspace = new System.Windows.Forms.TextBox(); + this.Label40 = new System.Windows.Forms.Label(); + this.txtsidespace = new System.Windows.Forms.TextBox(); + this.Label41 = new System.Windows.Forms.Label(); + this.btnchangesizecancel = new System.Windows.Forms.Button(); + this.btnsetsize = new System.Windows.Forms.Button(); + this.txtcolorpalletheight = new System.Windows.Forms.TextBox(); + this.Label42 = new System.Windows.Forms.Label(); + this.txtcolorpalletwidth = new System.Windows.Forms.TextBox(); + this.Label43 = new System.Windows.Forms.Label(); + this.picdrawingdisplay = new System.Windows.Forms.PictureBox(); + this.pnlbottompanel = new System.Windows.Forms.Panel(); + this.pnlpallet = new System.Windows.Forms.Panel(); + this.flowcolours = new System.Windows.Forms.FlowLayoutPanel(); + this.colourpallet1 = new System.Windows.Forms.Panel(); + this.colourpallet2 = new System.Windows.Forms.Panel(); + this.colourpallet3 = new System.Windows.Forms.Panel(); + this.colourpallet4 = new System.Windows.Forms.Panel(); + this.colourpallet5 = new System.Windows.Forms.Panel(); + this.colourpallet6 = new System.Windows.Forms.Panel(); + this.colourpallet7 = new System.Windows.Forms.Panel(); + this.colourpallet8 = new System.Windows.Forms.Panel(); + this.colourpallet9 = new System.Windows.Forms.Panel(); + this.colourpallet10 = new System.Windows.Forms.Panel(); + this.colourpallet11 = new System.Windows.Forms.Panel(); + this.colourpallet12 = new System.Windows.Forms.Panel(); + this.colourpallet13 = new System.Windows.Forms.Panel(); + this.colourpallet14 = new System.Windows.Forms.Panel(); + this.colourpallet15 = new System.Windows.Forms.Panel(); + this.colourpallet16 = new System.Windows.Forms.Panel(); + this.colourpallet17 = new System.Windows.Forms.Panel(); + this.colourpallet18 = new System.Windows.Forms.Panel(); + this.colourpallet19 = new System.Windows.Forms.Panel(); + this.colourpallet20 = new System.Windows.Forms.Panel(); + this.colourpallet21 = new System.Windows.Forms.Panel(); + this.colourpallet22 = new System.Windows.Forms.Panel(); + this.colourpallet23 = new System.Windows.Forms.Panel(); + this.colourpallet24 = new System.Windows.Forms.Panel(); + this.colourpallet25 = new System.Windows.Forms.Panel(); + this.colourpallet26 = new System.Windows.Forms.Panel(); + this.colourpallet27 = new System.Windows.Forms.Panel(); + this.colourpallet28 = new System.Windows.Forms.Panel(); + this.colourpallet29 = new System.Windows.Forms.Panel(); + this.colourpallet30 = new System.Windows.Forms.Panel(); + this.colourpallet31 = new System.Windows.Forms.Panel(); + this.colourpallet32 = new System.Windows.Forms.Panel(); + this.colourpallet33 = new System.Windows.Forms.Panel(); + this.colourpallet34 = new System.Windows.Forms.Panel(); + this.colourpallet35 = new System.Windows.Forms.Panel(); + this.colourpallet36 = new System.Windows.Forms.Panel(); + this.colourpallet37 = new System.Windows.Forms.Panel(); + this.colourpallet38 = new System.Windows.Forms.Panel(); + this.colourpallet39 = new System.Windows.Forms.Panel(); + this.colourpallet40 = new System.Windows.Forms.Panel(); + this.colourpallet41 = new System.Windows.Forms.Panel(); + this.colourpallet42 = new System.Windows.Forms.Panel(); + this.colourpallet43 = new System.Windows.Forms.Panel(); + this.colourpallet44 = new System.Windows.Forms.Panel(); + this.colourpallet45 = new System.Windows.Forms.Panel(); + this.colourpallet46 = new System.Windows.Forms.Panel(); + this.colourpallet47 = new System.Windows.Forms.Panel(); + this.colourpallet48 = new System.Windows.Forms.Panel(); + this.colourpallet49 = new System.Windows.Forms.Panel(); + this.colourpallet50 = new System.Windows.Forms.Panel(); + this.colourpallet51 = new System.Windows.Forms.Panel(); + this.colourpallet52 = new System.Windows.Forms.Panel(); + this.colourpallet53 = new System.Windows.Forms.Panel(); + this.colourpallet54 = new System.Windows.Forms.Panel(); + this.colourpallet55 = new System.Windows.Forms.Panel(); + this.colourpallet56 = new System.Windows.Forms.Panel(); + this.colourpallet57 = new System.Windows.Forms.Panel(); + this.colourpallet58 = new System.Windows.Forms.Panel(); + this.colourpallet59 = new System.Windows.Forms.Panel(); + this.colourpallet60 = new System.Windows.Forms.Panel(); + this.colourpallet61 = new System.Windows.Forms.Panel(); + this.colourpallet62 = new System.Windows.Forms.Panel(); + this.colourpallet63 = new System.Windows.Forms.Panel(); + this.colourpallet64 = new System.Windows.Forms.Panel(); + this.colourpallet65 = new System.Windows.Forms.Panel(); + this.colourpallet66 = new System.Windows.Forms.Panel(); + this.colourpallet67 = new System.Windows.Forms.Panel(); + this.colourpallet68 = new System.Windows.Forms.Panel(); + this.colourpallet69 = new System.Windows.Forms.Panel(); + this.colourpallet70 = new System.Windows.Forms.Panel(); + this.colourpallet71 = new System.Windows.Forms.Panel(); + this.colourpallet72 = new System.Windows.Forms.Panel(); + this.colourpallet73 = new System.Windows.Forms.Panel(); + this.colourpallet74 = new System.Windows.Forms.Panel(); + this.colourpallet75 = new System.Windows.Forms.Panel(); + this.colourpallet76 = new System.Windows.Forms.Panel(); + this.colourpallet77 = new System.Windows.Forms.Panel(); + this.colourpallet78 = new System.Windows.Forms.Panel(); + this.colourpallet79 = new System.Windows.Forms.Panel(); + this.colourpallet80 = new System.Windows.Forms.Panel(); + this.colourpallet81 = new System.Windows.Forms.Panel(); + this.colourpallet82 = new System.Windows.Forms.Panel(); + this.colourpallet83 = new System.Windows.Forms.Panel(); + this.colourpallet84 = new System.Windows.Forms.Panel(); + this.colourpallet85 = new System.Windows.Forms.Panel(); + this.colourpallet86 = new System.Windows.Forms.Panel(); + this.colourpallet87 = new System.Windows.Forms.Panel(); + this.colourpallet88 = new System.Windows.Forms.Panel(); + this.colourpallet89 = new System.Windows.Forms.Panel(); + this.colourpallet90 = new System.Windows.Forms.Panel(); + this.colourpallet91 = new System.Windows.Forms.Panel(); + this.colourpallet92 = new System.Windows.Forms.Panel(); + this.colourpallet93 = new System.Windows.Forms.Panel(); + this.colourpallet94 = new System.Windows.Forms.Panel(); + this.colourpallet95 = new System.Windows.Forms.Panel(); + this.colourpallet96 = new System.Windows.Forms.Panel(); + this.colourpallet97 = new System.Windows.Forms.Panel(); + this.colourpallet98 = new System.Windows.Forms.Panel(); + this.colourpallet99 = new System.Windows.Forms.Panel(); + this.colourpallet100 = new System.Windows.Forms.Panel(); + this.colourpallet101 = new System.Windows.Forms.Panel(); + this.colourpallet102 = new System.Windows.Forms.Panel(); + this.colourpallet103 = new System.Windows.Forms.Panel(); + this.colourpallet104 = new System.Windows.Forms.Panel(); + this.colourpallet105 = new System.Windows.Forms.Panel(); + this.colourpallet106 = new System.Windows.Forms.Panel(); + this.colourpallet107 = new System.Windows.Forms.Panel(); + this.colourpallet108 = new System.Windows.Forms.Panel(); + this.colourpallet109 = new System.Windows.Forms.Panel(); + this.colourpallet110 = new System.Windows.Forms.Panel(); + this.colourpallet111 = new System.Windows.Forms.Panel(); + this.colourpallet112 = new System.Windows.Forms.Panel(); + this.colourpallet113 = new System.Windows.Forms.Panel(); + this.colourpallet114 = new System.Windows.Forms.Panel(); + this.colourpallet115 = new System.Windows.Forms.Panel(); + this.colourpallet116 = new System.Windows.Forms.Panel(); + this.colourpallet117 = new System.Windows.Forms.Panel(); + this.colourpallet118 = new System.Windows.Forms.Panel(); + this.colourpallet119 = new System.Windows.Forms.Panel(); + this.colourpallet120 = new System.Windows.Forms.Panel(); + this.colourpallet121 = new System.Windows.Forms.Panel(); + this.colourpallet122 = new System.Windows.Forms.Panel(); + this.colourpallet123 = new System.Windows.Forms.Panel(); + this.colourpallet124 = new System.Windows.Forms.Panel(); + this.colourpallet125 = new System.Windows.Forms.Panel(); + this.colourpallet126 = new System.Windows.Forms.Panel(); + this.colourpallet127 = new System.Windows.Forms.Panel(); + this.colourpallet128 = new System.Windows.Forms.Panel(); + this.Label4 = new System.Windows.Forms.Label(); + this.line6 = new System.Windows.Forms.Panel(); + this.pnltoolproperties = new System.Windows.Forms.Panel(); + this.pnlovaltoolsettings = new System.Windows.Forms.Panel(); + this.Label20 = new System.Windows.Forms.Label(); + this.btnovalfillonoff = new System.Windows.Forms.Button(); + this.pnlovalfillcolour = new System.Windows.Forms.Panel(); + this.txtovalborderwidth = new System.Windows.Forms.TextBox(); + this.Label21 = new System.Windows.Forms.Label(); + this.Label22 = new System.Windows.Forms.Label(); + this.Label23 = new System.Windows.Forms.Label(); + this.pnleracertoolsettings = new System.Windows.Forms.Panel(); + this.Label28 = new System.Windows.Forms.Label(); + this.btneracersquare = new System.Windows.Forms.Button(); + this.btneracercircle = new System.Windows.Forms.Button(); + this.Label24 = new System.Windows.Forms.Label(); + this.txteracersize = new System.Windows.Forms.TextBox(); + this.Label26 = new System.Windows.Forms.Label(); + this.Label27 = new System.Windows.Forms.Label(); + this.pnllinetoolsettings = new System.Windows.Forms.Panel(); + this.Label29 = new System.Windows.Forms.Label(); + this.txtlinewidth = new System.Windows.Forms.TextBox(); + this.Label30 = new System.Windows.Forms.Label(); + this.Label31 = new System.Windows.Forms.Label(); + this.pnlpaintbrushtoolsettings = new System.Windows.Forms.Panel(); + this.Label36 = new System.Windows.Forms.Label(); + this.btnpaintsquareshape = new System.Windows.Forms.Button(); + this.btnpaintcircleshape = new System.Windows.Forms.Button(); + this.Label37 = new System.Windows.Forms.Label(); + this.txtpaintbrushsize = new System.Windows.Forms.TextBox(); + this.Label38 = new System.Windows.Forms.Label(); + this.Label39 = new System.Windows.Forms.Label(); + this.pnltexttoolsettings = new System.Windows.Forms.Panel(); + this.Label35 = new System.Windows.Forms.Label(); + this.combofontstyle = new System.Windows.Forms.ComboBox(); + this.txtdrawstringtext = new System.Windows.Forms.TextBox(); + this.combodrawtextfont = new System.Windows.Forms.ComboBox(); + this.Label25 = new System.Windows.Forms.Label(); + this.txtdrawtextsize = new System.Windows.Forms.TextBox(); + this.Label32 = new System.Windows.Forms.Label(); + this.Label33 = new System.Windows.Forms.Label(); + this.Label34 = new System.Windows.Forms.Label(); + this.pnlpixelsettersettings = new System.Windows.Forms.Panel(); + this.btnpixelsettersetpixel = new System.Windows.Forms.Button(); + this.txtpixelsetterycoordinate = new System.Windows.Forms.TextBox(); + this.txtpixelsetterxcoordinate = new System.Windows.Forms.TextBox(); + this.Label3 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.pnlmagnifiersettings = new System.Windows.Forms.Panel(); + this.btnzoomout = new System.Windows.Forms.Button(); + this.btnzoomin = new System.Windows.Forms.Button(); + this.lblzoomlevel = new System.Windows.Forms.Label(); + this.Label7 = new System.Windows.Forms.Label(); + this.pnlfloodfillsettings = new System.Windows.Forms.Panel(); + this.Label12 = new System.Windows.Forms.Label(); + this.Label15 = new System.Windows.Forms.Label(); + this.pnlsquaretoolsettings = new System.Windows.Forms.Panel(); + this.Label19 = new System.Windows.Forms.Label(); + this.btnsquarefillonoff = new System.Windows.Forms.Button(); + this.pnlsquarefillcolour = new System.Windows.Forms.Panel(); + this.txtsquareborderwidth = new System.Windows.Forms.TextBox(); + this.Label16 = new System.Windows.Forms.Label(); + this.Label18 = new System.Windows.Forms.Label(); + this.Label17 = new System.Windows.Forms.Label(); + this.pnlpixelplacersettings = new System.Windows.Forms.Panel(); + this.lblpixelplacerhelp = new System.Windows.Forms.Label(); + this.btnpixelplacermovementmode = new System.Windows.Forms.Button(); + this.Label8 = new System.Windows.Forms.Label(); + this.pnlpencilsettings = new System.Windows.Forms.Panel(); + this.btnpencilsize3 = new System.Windows.Forms.Button(); + this.btnpencilsize2 = new System.Windows.Forms.Button(); + this.btnpencilsize1 = new System.Windows.Forms.Button(); + this.Label14 = new System.Windows.Forms.Label(); + this.Label6 = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.line5 = new System.Windows.Forms.Panel(); + this.line3 = new System.Windows.Forms.Panel(); + this.pnltools = new System.Windows.Forms.Panel(); + this.pnltoolpositioner = new System.Windows.Forms.FlowLayoutPanel(); + this.btnpixelsetter = new System.Windows.Forms.Button(); + this.btnpixelplacer = new System.Windows.Forms.Button(); + this.btnpencil = new System.Windows.Forms.Button(); + this.btnfloodfill = new System.Windows.Forms.Button(); + this.btnoval = new System.Windows.Forms.Button(); + this.btnsquare = new System.Windows.Forms.Button(); + this.btnlinetool = new System.Windows.Forms.Button(); + this.btnpaintbrush = new System.Windows.Forms.Button(); + this.btntexttool = new System.Windows.Forms.Button(); + this.btneracer = new System.Windows.Forms.Button(); + this.btnnew = new System.Windows.Forms.Button(); + this.btnmagnify = new System.Windows.Forms.Button(); + this.btnopen = new System.Windows.Forms.Button(); + this.btnsave = new System.Windows.Forms.Button(); + this.btnundo = new System.Windows.Forms.Button(); + this.btnredo = new System.Windows.Forms.Button(); + this.line1 = new System.Windows.Forms.Panel(); + this.pnltoolpreview = new System.Windows.Forms.Panel(); + this.Label13 = new System.Windows.Forms.Label(); + this.picpreview = new System.Windows.Forms.PictureBox(); + this.lbltoolselected = new System.Windows.Forms.Label(); + this.line4 = new System.Windows.Forms.Panel(); + this.line2 = new System.Windows.Forms.Panel(); + this.tmrcodepointcooldown = new System.Windows.Forms.Timer(this.components); + this.tmrshowearnedcodepoints = new System.Windows.Forms.Timer(this.components); + this.pullbs = new System.Windows.Forms.Timer(this.components); + this.pullbottom = new System.Windows.Forms.Timer(this.components); + this.pullside = new System.Windows.Forms.Timer(this.components); + this.tmrsetupui = new System.Windows.Forms.Timer(this.components); + this.pgcontents.SuspendLayout(); + this.pnldrawingbackground.SuspendLayout(); + this.pnlinitialcanvassettings.SuspendLayout(); + this.pnlpalletsize.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picdrawingdisplay)).BeginInit(); + this.pnlbottompanel.SuspendLayout(); + this.pnlpallet.SuspendLayout(); + this.flowcolours.SuspendLayout(); + this.pnltoolproperties.SuspendLayout(); + this.pnlovaltoolsettings.SuspendLayout(); + this.pnleracertoolsettings.SuspendLayout(); + this.pnllinetoolsettings.SuspendLayout(); + this.pnlpaintbrushtoolsettings.SuspendLayout(); + this.pnltexttoolsettings.SuspendLayout(); + this.pnlpixelsettersettings.SuspendLayout(); + this.pnlmagnifiersettings.SuspendLayout(); + this.pnlfloodfillsettings.SuspendLayout(); + this.pnlsquaretoolsettings.SuspendLayout(); + this.pnlpixelplacersettings.SuspendLayout(); + this.pnlpencilsettings.SuspendLayout(); + this.pnltools.SuspendLayout(); + this.pnltoolpositioner.SuspendLayout(); + this.pnltoolpreview.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picpreview)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnldrawingbackground); + this.pgcontents.Controls.Add(this.pnlbottompanel); + this.pgcontents.Controls.Add(this.pnltools); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(802, 598); + this.pgcontents.TabIndex = 20; + // + // pnldrawingbackground + // + this.pnldrawingbackground.AutoScroll = true; + this.pnldrawingbackground.BackColor = System.Drawing.Color.Gray; + this.pnldrawingbackground.Controls.Add(this.pnlinitialcanvassettings); + this.pnldrawingbackground.Controls.Add(this.pnlpalletsize); + this.pnldrawingbackground.Controls.Add(this.picdrawingdisplay); + this.pnldrawingbackground.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnldrawingbackground.Location = new System.Drawing.Point(120, 0); + this.pnldrawingbackground.Name = "pnldrawingbackground"; + this.pnldrawingbackground.Size = new System.Drawing.Size(682, 498); + this.pnldrawingbackground.TabIndex = 2; + // + // pnlinitialcanvassettings + // + this.pnlinitialcanvassettings.BackColor = System.Drawing.Color.White; + this.pnlinitialcanvassettings.Controls.Add(this.btncancel); + this.pnlinitialcanvassettings.Controls.Add(this.btncreate); + this.pnlinitialcanvassettings.Controls.Add(this.Label11); + this.pnlinitialcanvassettings.Controls.Add(this.lbltotalpixels); + this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvasheight); + this.pnlinitialcanvassettings.Controls.Add(this.Label10); + this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvaswidth); + this.pnlinitialcanvassettings.Controls.Add(this.Label9); + this.pnlinitialcanvassettings.Location = new System.Drawing.Point(223, 178); + this.pnlinitialcanvassettings.Name = "pnlinitialcanvassettings"; + this.pnlinitialcanvassettings.Size = new System.Drawing.Size(223, 100); + this.pnlinitialcanvassettings.TabIndex = 1; + // + // btncancel + // + this.btncancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btncancel.Location = new System.Drawing.Point(7, 66); + this.btncancel.Name = "btncancel"; + this.btncancel.Size = new System.Drawing.Size(102, 28); + this.btncancel.TabIndex = 7; + this.btncancel.Text = "Cancel"; + this.btncancel.UseVisualStyleBackColor = true; + this.btncancel.Click += new System.EventHandler(this.btncancel_Click); + // + // btncreate + // + this.btncreate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncreate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btncreate.Location = new System.Drawing.Point(114, 66); + this.btncreate.Name = "btncreate"; + this.btncreate.Size = new System.Drawing.Size(102, 28); + this.btncreate.TabIndex = 6; + this.btncreate.Text = "Create"; + this.btncreate.UseVisualStyleBackColor = true; + this.btncreate.Click += new System.EventHandler(this.btncreate_Click); + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label11.Location = new System.Drawing.Point(124, 9); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(88, 20); + this.Label11.TabIndex = 5; + this.Label11.Text = "Total Pixels"; + // + // lbltotalpixels + // + this.lbltotalpixels.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltotalpixels.Location = new System.Drawing.Point(114, 30); + this.lbltotalpixels.Name = "lbltotalpixels"; + this.lbltotalpixels.Size = new System.Drawing.Size(106, 29); + this.lbltotalpixels.TabIndex = 4; + this.lbltotalpixels.Text = "0"; + this.lbltotalpixels.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtnewcanvasheight + // + this.txtnewcanvasheight.BackColor = System.Drawing.Color.White; + this.txtnewcanvasheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtnewcanvasheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtnewcanvasheight.Location = new System.Drawing.Point(59, 37); + this.txtnewcanvasheight.MaxLength = 4; + this.txtnewcanvasheight.Name = "txtnewcanvasheight"; + this.txtnewcanvasheight.Size = new System.Drawing.Size(54, 22); + this.txtnewcanvasheight.TabIndex = 3; + this.txtnewcanvasheight.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); + // + // Label10 + // + this.Label10.AutoSize = true; + this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label10.Location = new System.Drawing.Point(8, 40); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(50, 16); + this.Label10.TabIndex = 2; + this.Label10.Text = "Height:"; + // + // txtnewcanvaswidth + // + this.txtnewcanvaswidth.BackColor = System.Drawing.Color.White; + this.txtnewcanvaswidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtnewcanvaswidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtnewcanvaswidth.Location = new System.Drawing.Point(59, 9); + this.txtnewcanvaswidth.MaxLength = 4; + this.txtnewcanvaswidth.Name = "txtnewcanvaswidth"; + this.txtnewcanvaswidth.Size = new System.Drawing.Size(54, 22); + this.txtnewcanvaswidth.TabIndex = 1; + this.txtnewcanvaswidth.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); + // + // Label9 + // + this.Label9.AutoSize = true; + this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label9.Location = new System.Drawing.Point(8, 12); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(45, 16); + this.Label9.TabIndex = 0; + this.Label9.Text = "Width:"; + // + // pnlpalletsize + // + this.pnlpalletsize.BackColor = System.Drawing.Color.White; + this.pnlpalletsize.Controls.Add(this.txttopspace); + this.pnlpalletsize.Controls.Add(this.Label40); + this.pnlpalletsize.Controls.Add(this.txtsidespace); + this.pnlpalletsize.Controls.Add(this.Label41); + this.pnlpalletsize.Controls.Add(this.btnchangesizecancel); + this.pnlpalletsize.Controls.Add(this.btnsetsize); + this.pnlpalletsize.Controls.Add(this.txtcolorpalletheight); + this.pnlpalletsize.Controls.Add(this.Label42); + this.pnlpalletsize.Controls.Add(this.txtcolorpalletwidth); + this.pnlpalletsize.Controls.Add(this.Label43); + this.pnlpalletsize.Location = new System.Drawing.Point(207, 178); + this.pnlpalletsize.Name = "pnlpalletsize"; + this.pnlpalletsize.Size = new System.Drawing.Size(259, 100); + this.pnlpalletsize.TabIndex = 2; + this.pnlpalletsize.Visible = false; + // + // txttopspace + // + this.txttopspace.BackColor = System.Drawing.Color.White; + this.txttopspace.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttopspace.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttopspace.Location = new System.Drawing.Point(198, 38); + this.txttopspace.Name = "txttopspace"; + this.txttopspace.Size = new System.Drawing.Size(54, 22); + this.txttopspace.TabIndex = 11; + // + // Label40 + // + this.Label40.AutoSize = true; + this.Label40.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label40.Location = new System.Drawing.Point(115, 40); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(79, 16); + this.Label40.TabIndex = 10; + this.Label40.Text = "Top Space:"; + // + // txtsidespace + // + this.txtsidespace.BackColor = System.Drawing.Color.White; + this.txtsidespace.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtsidespace.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtsidespace.Location = new System.Drawing.Point(198, 10); + this.txtsidespace.Name = "txtsidespace"; + this.txtsidespace.Size = new System.Drawing.Size(54, 22); + this.txtsidespace.TabIndex = 9; + // + // Label41 + // + this.Label41.AutoSize = true; + this.Label41.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label41.Location = new System.Drawing.Point(115, 12); + this.Label41.Name = "Label41"; + this.Label41.Size = new System.Drawing.Size(82, 16); + this.Label41.TabIndex = 8; + this.Label41.Text = "Side Space:"; + // + // btnchangesizecancel + // + this.btnchangesizecancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnchangesizecancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnchangesizecancel.Location = new System.Drawing.Point(7, 66); + this.btnchangesizecancel.Name = "btnchangesizecancel"; + this.btnchangesizecancel.Size = new System.Drawing.Size(121, 28); + this.btnchangesizecancel.TabIndex = 7; + this.btnchangesizecancel.Text = "Close"; + this.btnchangesizecancel.UseVisualStyleBackColor = true; + // + // btnsetsize + // + this.btnsetsize.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsetsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsetsize.Location = new System.Drawing.Point(133, 66); + this.btnsetsize.Name = "btnsetsize"; + this.btnsetsize.Size = new System.Drawing.Size(119, 28); + this.btnsetsize.TabIndex = 6; + this.btnsetsize.Text = "Set Size"; + this.btnsetsize.UseVisualStyleBackColor = true; + // + // txtcolorpalletheight + // + this.txtcolorpalletheight.BackColor = System.Drawing.Color.White; + this.txtcolorpalletheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtcolorpalletheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtcolorpalletheight.Location = new System.Drawing.Point(59, 37); + this.txtcolorpalletheight.Name = "txtcolorpalletheight"; + this.txtcolorpalletheight.Size = new System.Drawing.Size(54, 22); + this.txtcolorpalletheight.TabIndex = 3; + // + // Label42 + // + this.Label42.AutoSize = true; + this.Label42.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label42.Location = new System.Drawing.Point(8, 40); + this.Label42.Name = "Label42"; + this.Label42.Size = new System.Drawing.Size(50, 16); + this.Label42.TabIndex = 2; + this.Label42.Text = "Height:"; + // + // txtcolorpalletwidth + // + this.txtcolorpalletwidth.BackColor = System.Drawing.Color.White; + this.txtcolorpalletwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtcolorpalletwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtcolorpalletwidth.Location = new System.Drawing.Point(59, 9); + this.txtcolorpalletwidth.Name = "txtcolorpalletwidth"; + this.txtcolorpalletwidth.Size = new System.Drawing.Size(54, 22); + this.txtcolorpalletwidth.TabIndex = 1; + // + // Label43 + // + this.Label43.AutoSize = true; + this.Label43.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label43.Location = new System.Drawing.Point(8, 12); + this.Label43.Name = "Label43"; + this.Label43.Size = new System.Drawing.Size(45, 16); + this.Label43.TabIndex = 0; + this.Label43.Text = "Width:"; + // + // picdrawingdisplay + // + this.picdrawingdisplay.BackColor = System.Drawing.Color.White; + this.picdrawingdisplay.Location = new System.Drawing.Point(180, 108); + this.picdrawingdisplay.Name = "picdrawingdisplay"; + this.picdrawingdisplay.Size = new System.Drawing.Size(100, 50); + this.picdrawingdisplay.TabIndex = 0; + this.picdrawingdisplay.TabStop = false; + this.picdrawingdisplay.Visible = false; + this.picdrawingdisplay.Paint += new System.Windows.Forms.PaintEventHandler(this.picdrawingdisplay_Paint); + this.picdrawingdisplay.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseDown); + this.picdrawingdisplay.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseMove); + this.picdrawingdisplay.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseUp); + // + // pnlbottompanel + // + this.pnlbottompanel.Controls.Add(this.pnlpallet); + this.pnlbottompanel.Controls.Add(this.pnltoolproperties); + this.pnlbottompanel.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlbottompanel.Location = new System.Drawing.Point(120, 498); + this.pnlbottompanel.Name = "pnlbottompanel"; + this.pnlbottompanel.Size = new System.Drawing.Size(682, 100); + this.pnlbottompanel.TabIndex = 1; + // + // pnlpallet + // + this.pnlpallet.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlpallet.Controls.Add(this.flowcolours); + this.pnlpallet.Controls.Add(this.Label4); + this.pnlpallet.Controls.Add(this.line6); + this.pnlpallet.Location = new System.Drawing.Point(457, 0); + this.pnlpallet.Name = "pnlpallet"; + this.pnlpallet.Size = new System.Drawing.Size(225, 100); + this.pnlpallet.TabIndex = 0; + // + // flowcolours + // + this.flowcolours.Controls.Add(this.colourpallet1); + this.flowcolours.Controls.Add(this.colourpallet2); + this.flowcolours.Controls.Add(this.colourpallet3); + this.flowcolours.Controls.Add(this.colourpallet4); + this.flowcolours.Controls.Add(this.colourpallet5); + this.flowcolours.Controls.Add(this.colourpallet6); + this.flowcolours.Controls.Add(this.colourpallet7); + this.flowcolours.Controls.Add(this.colourpallet8); + this.flowcolours.Controls.Add(this.colourpallet9); + this.flowcolours.Controls.Add(this.colourpallet10); + this.flowcolours.Controls.Add(this.colourpallet11); + this.flowcolours.Controls.Add(this.colourpallet12); + this.flowcolours.Controls.Add(this.colourpallet13); + this.flowcolours.Controls.Add(this.colourpallet14); + this.flowcolours.Controls.Add(this.colourpallet15); + this.flowcolours.Controls.Add(this.colourpallet16); + this.flowcolours.Controls.Add(this.colourpallet17); + this.flowcolours.Controls.Add(this.colourpallet18); + this.flowcolours.Controls.Add(this.colourpallet19); + this.flowcolours.Controls.Add(this.colourpallet20); + this.flowcolours.Controls.Add(this.colourpallet21); + this.flowcolours.Controls.Add(this.colourpallet22); + this.flowcolours.Controls.Add(this.colourpallet23); + this.flowcolours.Controls.Add(this.colourpallet24); + this.flowcolours.Controls.Add(this.colourpallet25); + this.flowcolours.Controls.Add(this.colourpallet26); + this.flowcolours.Controls.Add(this.colourpallet27); + this.flowcolours.Controls.Add(this.colourpallet28); + this.flowcolours.Controls.Add(this.colourpallet29); + this.flowcolours.Controls.Add(this.colourpallet30); + this.flowcolours.Controls.Add(this.colourpallet31); + this.flowcolours.Controls.Add(this.colourpallet32); + this.flowcolours.Controls.Add(this.colourpallet33); + this.flowcolours.Controls.Add(this.colourpallet34); + this.flowcolours.Controls.Add(this.colourpallet35); + this.flowcolours.Controls.Add(this.colourpallet36); + this.flowcolours.Controls.Add(this.colourpallet37); + this.flowcolours.Controls.Add(this.colourpallet38); + this.flowcolours.Controls.Add(this.colourpallet39); + this.flowcolours.Controls.Add(this.colourpallet40); + this.flowcolours.Controls.Add(this.colourpallet41); + this.flowcolours.Controls.Add(this.colourpallet42); + this.flowcolours.Controls.Add(this.colourpallet43); + this.flowcolours.Controls.Add(this.colourpallet44); + this.flowcolours.Controls.Add(this.colourpallet45); + this.flowcolours.Controls.Add(this.colourpallet46); + this.flowcolours.Controls.Add(this.colourpallet47); + this.flowcolours.Controls.Add(this.colourpallet48); + this.flowcolours.Controls.Add(this.colourpallet49); + this.flowcolours.Controls.Add(this.colourpallet50); + this.flowcolours.Controls.Add(this.colourpallet51); + this.flowcolours.Controls.Add(this.colourpallet52); + this.flowcolours.Controls.Add(this.colourpallet53); + this.flowcolours.Controls.Add(this.colourpallet54); + this.flowcolours.Controls.Add(this.colourpallet55); + this.flowcolours.Controls.Add(this.colourpallet56); + this.flowcolours.Controls.Add(this.colourpallet57); + this.flowcolours.Controls.Add(this.colourpallet58); + this.flowcolours.Controls.Add(this.colourpallet59); + this.flowcolours.Controls.Add(this.colourpallet60); + this.flowcolours.Controls.Add(this.colourpallet61); + this.flowcolours.Controls.Add(this.colourpallet62); + this.flowcolours.Controls.Add(this.colourpallet63); + this.flowcolours.Controls.Add(this.colourpallet64); + this.flowcolours.Controls.Add(this.colourpallet65); + this.flowcolours.Controls.Add(this.colourpallet66); + this.flowcolours.Controls.Add(this.colourpallet67); + this.flowcolours.Controls.Add(this.colourpallet68); + this.flowcolours.Controls.Add(this.colourpallet69); + this.flowcolours.Controls.Add(this.colourpallet70); + this.flowcolours.Controls.Add(this.colourpallet71); + this.flowcolours.Controls.Add(this.colourpallet72); + this.flowcolours.Controls.Add(this.colourpallet73); + this.flowcolours.Controls.Add(this.colourpallet74); + this.flowcolours.Controls.Add(this.colourpallet75); + this.flowcolours.Controls.Add(this.colourpallet76); + this.flowcolours.Controls.Add(this.colourpallet77); + this.flowcolours.Controls.Add(this.colourpallet78); + this.flowcolours.Controls.Add(this.colourpallet79); + this.flowcolours.Controls.Add(this.colourpallet80); + this.flowcolours.Controls.Add(this.colourpallet81); + this.flowcolours.Controls.Add(this.colourpallet82); + this.flowcolours.Controls.Add(this.colourpallet83); + this.flowcolours.Controls.Add(this.colourpallet84); + this.flowcolours.Controls.Add(this.colourpallet85); + this.flowcolours.Controls.Add(this.colourpallet86); + this.flowcolours.Controls.Add(this.colourpallet87); + this.flowcolours.Controls.Add(this.colourpallet88); + this.flowcolours.Controls.Add(this.colourpallet89); + this.flowcolours.Controls.Add(this.colourpallet90); + this.flowcolours.Controls.Add(this.colourpallet91); + this.flowcolours.Controls.Add(this.colourpallet92); + this.flowcolours.Controls.Add(this.colourpallet93); + this.flowcolours.Controls.Add(this.colourpallet94); + this.flowcolours.Controls.Add(this.colourpallet95); + this.flowcolours.Controls.Add(this.colourpallet96); + this.flowcolours.Controls.Add(this.colourpallet97); + this.flowcolours.Controls.Add(this.colourpallet98); + this.flowcolours.Controls.Add(this.colourpallet99); + this.flowcolours.Controls.Add(this.colourpallet100); + this.flowcolours.Controls.Add(this.colourpallet101); + this.flowcolours.Controls.Add(this.colourpallet102); + this.flowcolours.Controls.Add(this.colourpallet103); + this.flowcolours.Controls.Add(this.colourpallet104); + this.flowcolours.Controls.Add(this.colourpallet105); + this.flowcolours.Controls.Add(this.colourpallet106); + this.flowcolours.Controls.Add(this.colourpallet107); + this.flowcolours.Controls.Add(this.colourpallet108); + this.flowcolours.Controls.Add(this.colourpallet109); + this.flowcolours.Controls.Add(this.colourpallet110); + this.flowcolours.Controls.Add(this.colourpallet111); + this.flowcolours.Controls.Add(this.colourpallet112); + this.flowcolours.Controls.Add(this.colourpallet113); + this.flowcolours.Controls.Add(this.colourpallet114); + this.flowcolours.Controls.Add(this.colourpallet115); + this.flowcolours.Controls.Add(this.colourpallet116); + this.flowcolours.Controls.Add(this.colourpallet117); + this.flowcolours.Controls.Add(this.colourpallet118); + this.flowcolours.Controls.Add(this.colourpallet119); + this.flowcolours.Controls.Add(this.colourpallet120); + this.flowcolours.Controls.Add(this.colourpallet121); + this.flowcolours.Controls.Add(this.colourpallet122); + this.flowcolours.Controls.Add(this.colourpallet123); + this.flowcolours.Controls.Add(this.colourpallet124); + this.flowcolours.Controls.Add(this.colourpallet125); + this.flowcolours.Controls.Add(this.colourpallet126); + this.flowcolours.Controls.Add(this.colourpallet127); + this.flowcolours.Controls.Add(this.colourpallet128); + this.flowcolours.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowcolours.Location = new System.Drawing.Point(0, 27); + this.flowcolours.Name = "flowcolours"; + this.flowcolours.Padding = new System.Windows.Forms.Padding(1, 1, 0, 0); + this.flowcolours.Size = new System.Drawing.Size(225, 73); + this.flowcolours.TabIndex = 12; + // + // colourpallet1 + // + this.colourpallet1.BackColor = System.Drawing.Color.Black; + this.colourpallet1.Location = new System.Drawing.Point(2, 1); + this.colourpallet1.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet1.Name = "colourpallet1"; + this.colourpallet1.Size = new System.Drawing.Size(12, 8); + this.colourpallet1.TabIndex = 5; + this.colourpallet1.Visible = false; + // + // colourpallet2 + // + this.colourpallet2.BackColor = System.Drawing.Color.Black; + this.colourpallet2.Location = new System.Drawing.Point(15, 1); + this.colourpallet2.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet2.Name = "colourpallet2"; + this.colourpallet2.Size = new System.Drawing.Size(12, 8); + this.colourpallet2.TabIndex = 9; + this.colourpallet2.Visible = false; + // + // colourpallet3 + // + this.colourpallet3.BackColor = System.Drawing.Color.Black; + this.colourpallet3.Location = new System.Drawing.Point(28, 1); + this.colourpallet3.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet3.Name = "colourpallet3"; + this.colourpallet3.Size = new System.Drawing.Size(12, 8); + this.colourpallet3.TabIndex = 13; + this.colourpallet3.Visible = false; + // + // colourpallet4 + // + this.colourpallet4.BackColor = System.Drawing.Color.Black; + this.colourpallet4.Location = new System.Drawing.Point(41, 1); + this.colourpallet4.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet4.Name = "colourpallet4"; + this.colourpallet4.Size = new System.Drawing.Size(12, 8); + this.colourpallet4.TabIndex = 9; + this.colourpallet4.Visible = false; + // + // colourpallet5 + // + this.colourpallet5.BackColor = System.Drawing.Color.Black; + this.colourpallet5.Location = new System.Drawing.Point(54, 1); + this.colourpallet5.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet5.Name = "colourpallet5"; + this.colourpallet5.Size = new System.Drawing.Size(12, 8); + this.colourpallet5.TabIndex = 18; + this.colourpallet5.Visible = false; + // + // colourpallet6 + // + this.colourpallet6.BackColor = System.Drawing.Color.Black; + this.colourpallet6.Location = new System.Drawing.Point(67, 1); + this.colourpallet6.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet6.Name = "colourpallet6"; + this.colourpallet6.Size = new System.Drawing.Size(12, 8); + this.colourpallet6.TabIndex = 17; + this.colourpallet6.Visible = false; + // + // colourpallet7 + // + this.colourpallet7.BackColor = System.Drawing.Color.Black; + this.colourpallet7.Location = new System.Drawing.Point(80, 1); + this.colourpallet7.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet7.Name = "colourpallet7"; + this.colourpallet7.Size = new System.Drawing.Size(12, 8); + this.colourpallet7.TabIndex = 14; + this.colourpallet7.Visible = false; + // + // colourpallet8 + // + this.colourpallet8.BackColor = System.Drawing.Color.Black; + this.colourpallet8.Location = new System.Drawing.Point(93, 1); + this.colourpallet8.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet8.Name = "colourpallet8"; + this.colourpallet8.Size = new System.Drawing.Size(12, 8); + this.colourpallet8.TabIndex = 13; + this.colourpallet8.Visible = false; + // + // colourpallet9 + // + this.colourpallet9.BackColor = System.Drawing.Color.Black; + this.colourpallet9.Location = new System.Drawing.Point(106, 1); + this.colourpallet9.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet9.Name = "colourpallet9"; + this.colourpallet9.Size = new System.Drawing.Size(12, 8); + this.colourpallet9.TabIndex = 15; + this.colourpallet9.Visible = false; + // + // colourpallet10 + // + this.colourpallet10.BackColor = System.Drawing.Color.Black; + this.colourpallet10.Location = new System.Drawing.Point(119, 1); + this.colourpallet10.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet10.Name = "colourpallet10"; + this.colourpallet10.Size = new System.Drawing.Size(12, 8); + this.colourpallet10.TabIndex = 11; + this.colourpallet10.Visible = false; + // + // colourpallet11 + // + this.colourpallet11.BackColor = System.Drawing.Color.Black; + this.colourpallet11.Location = new System.Drawing.Point(132, 1); + this.colourpallet11.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet11.Name = "colourpallet11"; + this.colourpallet11.Size = new System.Drawing.Size(12, 8); + this.colourpallet11.TabIndex = 12; + this.colourpallet11.Visible = false; + // + // colourpallet12 + // + this.colourpallet12.BackColor = System.Drawing.Color.Black; + this.colourpallet12.Location = new System.Drawing.Point(145, 1); + this.colourpallet12.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet12.Name = "colourpallet12"; + this.colourpallet12.Size = new System.Drawing.Size(12, 8); + this.colourpallet12.TabIndex = 16; + this.colourpallet12.Visible = false; + // + // colourpallet13 + // + this.colourpallet13.BackColor = System.Drawing.Color.Black; + this.colourpallet13.Location = new System.Drawing.Point(158, 1); + this.colourpallet13.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet13.Name = "colourpallet13"; + this.colourpallet13.Size = new System.Drawing.Size(12, 8); + this.colourpallet13.TabIndex = 10; + this.colourpallet13.Visible = false; + // + // colourpallet14 + // + this.colourpallet14.BackColor = System.Drawing.Color.Black; + this.colourpallet14.Location = new System.Drawing.Point(171, 1); + this.colourpallet14.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet14.Name = "colourpallet14"; + this.colourpallet14.Size = new System.Drawing.Size(12, 8); + this.colourpallet14.TabIndex = 20; + this.colourpallet14.Visible = false; + // + // colourpallet15 + // + this.colourpallet15.BackColor = System.Drawing.Color.Black; + this.colourpallet15.Location = new System.Drawing.Point(184, 1); + this.colourpallet15.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet15.Name = "colourpallet15"; + this.colourpallet15.Size = new System.Drawing.Size(12, 8); + this.colourpallet15.TabIndex = 14; + this.colourpallet15.Visible = false; + // + // colourpallet16 + // + this.colourpallet16.BackColor = System.Drawing.Color.Black; + this.colourpallet16.Location = new System.Drawing.Point(197, 1); + this.colourpallet16.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet16.Name = "colourpallet16"; + this.colourpallet16.Size = new System.Drawing.Size(12, 8); + this.colourpallet16.TabIndex = 16; + this.colourpallet16.Visible = false; + // + // colourpallet17 + // + this.colourpallet17.BackColor = System.Drawing.Color.Black; + this.colourpallet17.Location = new System.Drawing.Point(210, 1); + this.colourpallet17.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet17.Name = "colourpallet17"; + this.colourpallet17.Size = new System.Drawing.Size(12, 8); + this.colourpallet17.TabIndex = 11; + this.colourpallet17.Visible = false; + // + // colourpallet18 + // + this.colourpallet18.BackColor = System.Drawing.Color.Black; + this.colourpallet18.Location = new System.Drawing.Point(2, 10); + this.colourpallet18.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet18.Name = "colourpallet18"; + this.colourpallet18.Size = new System.Drawing.Size(12, 8); + this.colourpallet18.TabIndex = 8; + this.colourpallet18.Visible = false; + // + // colourpallet19 + // + this.colourpallet19.BackColor = System.Drawing.Color.Black; + this.colourpallet19.Location = new System.Drawing.Point(15, 10); + this.colourpallet19.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet19.Name = "colourpallet19"; + this.colourpallet19.Size = new System.Drawing.Size(12, 8); + this.colourpallet19.TabIndex = 24; + this.colourpallet19.Visible = false; + // + // colourpallet20 + // + this.colourpallet20.BackColor = System.Drawing.Color.Black; + this.colourpallet20.Location = new System.Drawing.Point(28, 10); + this.colourpallet20.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet20.Name = "colourpallet20"; + this.colourpallet20.Size = new System.Drawing.Size(12, 8); + this.colourpallet20.TabIndex = 12; + this.colourpallet20.Visible = false; + // + // colourpallet21 + // + this.colourpallet21.BackColor = System.Drawing.Color.Black; + this.colourpallet21.Location = new System.Drawing.Point(41, 10); + this.colourpallet21.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet21.Name = "colourpallet21"; + this.colourpallet21.Size = new System.Drawing.Size(12, 8); + this.colourpallet21.TabIndex = 20; + this.colourpallet21.Visible = false; + // + // colourpallet22 + // + this.colourpallet22.BackColor = System.Drawing.Color.Black; + this.colourpallet22.Location = new System.Drawing.Point(54, 10); + this.colourpallet22.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet22.Name = "colourpallet22"; + this.colourpallet22.Size = new System.Drawing.Size(12, 8); + this.colourpallet22.TabIndex = 8; + this.colourpallet22.Visible = false; + // + // colourpallet23 + // + this.colourpallet23.BackColor = System.Drawing.Color.Black; + this.colourpallet23.Location = new System.Drawing.Point(67, 10); + this.colourpallet23.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet23.Name = "colourpallet23"; + this.colourpallet23.Size = new System.Drawing.Size(12, 8); + this.colourpallet23.TabIndex = 19; + this.colourpallet23.Visible = false; + // + // colourpallet24 + // + this.colourpallet24.BackColor = System.Drawing.Color.Black; + this.colourpallet24.Location = new System.Drawing.Point(80, 10); + this.colourpallet24.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet24.Name = "colourpallet24"; + this.colourpallet24.Size = new System.Drawing.Size(12, 8); + this.colourpallet24.TabIndex = 10; + this.colourpallet24.Visible = false; + // + // colourpallet25 + // + this.colourpallet25.BackColor = System.Drawing.Color.Black; + this.colourpallet25.Location = new System.Drawing.Point(93, 10); + this.colourpallet25.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet25.Name = "colourpallet25"; + this.colourpallet25.Size = new System.Drawing.Size(12, 8); + this.colourpallet25.TabIndex = 15; + this.colourpallet25.Visible = false; + // + // colourpallet26 + // + this.colourpallet26.BackColor = System.Drawing.Color.Black; + this.colourpallet26.Location = new System.Drawing.Point(106, 10); + this.colourpallet26.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet26.Name = "colourpallet26"; + this.colourpallet26.Size = new System.Drawing.Size(12, 8); + this.colourpallet26.TabIndex = 23; + this.colourpallet26.Visible = false; + // + // colourpallet27 + // + this.colourpallet27.BackColor = System.Drawing.Color.Black; + this.colourpallet27.Location = new System.Drawing.Point(119, 10); + this.colourpallet27.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet27.Name = "colourpallet27"; + this.colourpallet27.Size = new System.Drawing.Size(12, 8); + this.colourpallet27.TabIndex = 6; + this.colourpallet27.Visible = false; + // + // colourpallet28 + // + this.colourpallet28.BackColor = System.Drawing.Color.Black; + this.colourpallet28.Location = new System.Drawing.Point(132, 10); + this.colourpallet28.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet28.Name = "colourpallet28"; + this.colourpallet28.Size = new System.Drawing.Size(12, 8); + this.colourpallet28.TabIndex = 19; + this.colourpallet28.Visible = false; + // + // colourpallet29 + // + this.colourpallet29.BackColor = System.Drawing.Color.Black; + this.colourpallet29.Location = new System.Drawing.Point(145, 10); + this.colourpallet29.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet29.Name = "colourpallet29"; + this.colourpallet29.Size = new System.Drawing.Size(12, 8); + this.colourpallet29.TabIndex = 22; + this.colourpallet29.Visible = false; + // + // colourpallet30 + // + this.colourpallet30.BackColor = System.Drawing.Color.Black; + this.colourpallet30.Location = new System.Drawing.Point(158, 10); + this.colourpallet30.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet30.Name = "colourpallet30"; + this.colourpallet30.Size = new System.Drawing.Size(12, 8); + this.colourpallet30.TabIndex = 18; + this.colourpallet30.Visible = false; + // + // colourpallet31 + // + this.colourpallet31.BackColor = System.Drawing.Color.Black; + this.colourpallet31.Location = new System.Drawing.Point(171, 10); + this.colourpallet31.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet31.Name = "colourpallet31"; + this.colourpallet31.Size = new System.Drawing.Size(12, 8); + this.colourpallet31.TabIndex = 21; + this.colourpallet31.Visible = false; + // + // colourpallet32 + // + this.colourpallet32.BackColor = System.Drawing.Color.Black; + this.colourpallet32.Location = new System.Drawing.Point(184, 10); + this.colourpallet32.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet32.Name = "colourpallet32"; + this.colourpallet32.Size = new System.Drawing.Size(12, 8); + this.colourpallet32.TabIndex = 17; + this.colourpallet32.Visible = false; + // + // colourpallet33 + // + this.colourpallet33.BackColor = System.Drawing.Color.Black; + this.colourpallet33.Location = new System.Drawing.Point(197, 10); + this.colourpallet33.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet33.Name = "colourpallet33"; + this.colourpallet33.Size = new System.Drawing.Size(12, 8); + this.colourpallet33.TabIndex = 50; + this.colourpallet33.Visible = false; + // + // colourpallet34 + // + this.colourpallet34.BackColor = System.Drawing.Color.Black; + this.colourpallet34.Location = new System.Drawing.Point(210, 10); + this.colourpallet34.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet34.Name = "colourpallet34"; + this.colourpallet34.Size = new System.Drawing.Size(12, 8); + this.colourpallet34.TabIndex = 46; + this.colourpallet34.Visible = false; + // + // colourpallet35 + // + this.colourpallet35.BackColor = System.Drawing.Color.Black; + this.colourpallet35.Location = new System.Drawing.Point(2, 19); + this.colourpallet35.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet35.Name = "colourpallet35"; + this.colourpallet35.Size = new System.Drawing.Size(12, 8); + this.colourpallet35.TabIndex = 53; + this.colourpallet35.Visible = false; + // + // colourpallet36 + // + this.colourpallet36.BackColor = System.Drawing.Color.Black; + this.colourpallet36.Location = new System.Drawing.Point(15, 19); + this.colourpallet36.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet36.Name = "colourpallet36"; + this.colourpallet36.Size = new System.Drawing.Size(12, 8); + this.colourpallet36.TabIndex = 48; + this.colourpallet36.Visible = false; + // + // colourpallet37 + // + this.colourpallet37.BackColor = System.Drawing.Color.Black; + this.colourpallet37.Location = new System.Drawing.Point(28, 19); + this.colourpallet37.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet37.Name = "colourpallet37"; + this.colourpallet37.Size = new System.Drawing.Size(12, 8); + this.colourpallet37.TabIndex = 54; + this.colourpallet37.Visible = false; + // + // colourpallet38 + // + this.colourpallet38.BackColor = System.Drawing.Color.Black; + this.colourpallet38.Location = new System.Drawing.Point(41, 19); + this.colourpallet38.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet38.Name = "colourpallet38"; + this.colourpallet38.Size = new System.Drawing.Size(12, 8); + this.colourpallet38.TabIndex = 26; + this.colourpallet38.Visible = false; + // + // colourpallet39 + // + this.colourpallet39.BackColor = System.Drawing.Color.Black; + this.colourpallet39.Location = new System.Drawing.Point(54, 19); + this.colourpallet39.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet39.Name = "colourpallet39"; + this.colourpallet39.Size = new System.Drawing.Size(12, 8); + this.colourpallet39.TabIndex = 55; + this.colourpallet39.Visible = false; + // + // colourpallet40 + // + this.colourpallet40.BackColor = System.Drawing.Color.Black; + this.colourpallet40.Location = new System.Drawing.Point(67, 19); + this.colourpallet40.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet40.Name = "colourpallet40"; + this.colourpallet40.Size = new System.Drawing.Size(12, 8); + this.colourpallet40.TabIndex = 41; + this.colourpallet40.Visible = false; + // + // colourpallet41 + // + this.colourpallet41.BackColor = System.Drawing.Color.Black; + this.colourpallet41.Location = new System.Drawing.Point(80, 19); + this.colourpallet41.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet41.Name = "colourpallet41"; + this.colourpallet41.Size = new System.Drawing.Size(12, 8); + this.colourpallet41.TabIndex = 31; + this.colourpallet41.Visible = false; + // + // colourpallet42 + // + this.colourpallet42.BackColor = System.Drawing.Color.Black; + this.colourpallet42.Location = new System.Drawing.Point(93, 19); + this.colourpallet42.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet42.Name = "colourpallet42"; + this.colourpallet42.Size = new System.Drawing.Size(12, 8); + this.colourpallet42.TabIndex = 49; + this.colourpallet42.Visible = false; + // + // colourpallet43 + // + this.colourpallet43.BackColor = System.Drawing.Color.Black; + this.colourpallet43.Location = new System.Drawing.Point(106, 19); + this.colourpallet43.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet43.Name = "colourpallet43"; + this.colourpallet43.Size = new System.Drawing.Size(12, 8); + this.colourpallet43.TabIndex = 27; + this.colourpallet43.Visible = false; + // + // colourpallet44 + // + this.colourpallet44.BackColor = System.Drawing.Color.Black; + this.colourpallet44.Location = new System.Drawing.Point(119, 19); + this.colourpallet44.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet44.Name = "colourpallet44"; + this.colourpallet44.Size = new System.Drawing.Size(12, 8); + this.colourpallet44.TabIndex = 51; + this.colourpallet44.Visible = false; + // + // colourpallet45 + // + this.colourpallet45.BackColor = System.Drawing.Color.Black; + this.colourpallet45.Location = new System.Drawing.Point(132, 19); + this.colourpallet45.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet45.Name = "colourpallet45"; + this.colourpallet45.Size = new System.Drawing.Size(12, 8); + this.colourpallet45.TabIndex = 36; + this.colourpallet45.Visible = false; + // + // colourpallet46 + // + this.colourpallet46.BackColor = System.Drawing.Color.Black; + this.colourpallet46.Location = new System.Drawing.Point(145, 19); + this.colourpallet46.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet46.Name = "colourpallet46"; + this.colourpallet46.Size = new System.Drawing.Size(12, 8); + this.colourpallet46.TabIndex = 56; + this.colourpallet46.Visible = false; + // + // colourpallet47 + // + this.colourpallet47.BackColor = System.Drawing.Color.Black; + this.colourpallet47.Location = new System.Drawing.Point(158, 19); + this.colourpallet47.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet47.Name = "colourpallet47"; + this.colourpallet47.Size = new System.Drawing.Size(12, 8); + this.colourpallet47.TabIndex = 28; + this.colourpallet47.Visible = false; + // + // colourpallet48 + // + this.colourpallet48.BackColor = System.Drawing.Color.Black; + this.colourpallet48.Location = new System.Drawing.Point(171, 19); + this.colourpallet48.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet48.Name = "colourpallet48"; + this.colourpallet48.Size = new System.Drawing.Size(12, 8); + this.colourpallet48.TabIndex = 33; + this.colourpallet48.Visible = false; + // + // colourpallet49 + // + this.colourpallet49.BackColor = System.Drawing.Color.Black; + this.colourpallet49.Location = new System.Drawing.Point(184, 19); + this.colourpallet49.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet49.Name = "colourpallet49"; + this.colourpallet49.Size = new System.Drawing.Size(12, 8); + this.colourpallet49.TabIndex = 43; + this.colourpallet49.Visible = false; + // + // colourpallet50 + // + this.colourpallet50.BackColor = System.Drawing.Color.Black; + this.colourpallet50.Location = new System.Drawing.Point(197, 19); + this.colourpallet50.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet50.Name = "colourpallet50"; + this.colourpallet50.Size = new System.Drawing.Size(12, 8); + this.colourpallet50.TabIndex = 40; + this.colourpallet50.Visible = false; + // + // colourpallet51 + // + this.colourpallet51.BackColor = System.Drawing.Color.Black; + this.colourpallet51.Location = new System.Drawing.Point(210, 19); + this.colourpallet51.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet51.Name = "colourpallet51"; + this.colourpallet51.Size = new System.Drawing.Size(12, 8); + this.colourpallet51.TabIndex = 52; + this.colourpallet51.Visible = false; + // + // colourpallet52 + // + this.colourpallet52.BackColor = System.Drawing.Color.Black; + this.colourpallet52.Location = new System.Drawing.Point(2, 28); + this.colourpallet52.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet52.Name = "colourpallet52"; + this.colourpallet52.Size = new System.Drawing.Size(12, 8); + this.colourpallet52.TabIndex = 32; + this.colourpallet52.Visible = false; + // + // colourpallet53 + // + this.colourpallet53.BackColor = System.Drawing.Color.Black; + this.colourpallet53.Location = new System.Drawing.Point(15, 28); + this.colourpallet53.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet53.Name = "colourpallet53"; + this.colourpallet53.Size = new System.Drawing.Size(12, 8); + this.colourpallet53.TabIndex = 44; + this.colourpallet53.Visible = false; + // + // colourpallet54 + // + this.colourpallet54.BackColor = System.Drawing.Color.Black; + this.colourpallet54.Location = new System.Drawing.Point(28, 28); + this.colourpallet54.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet54.Name = "colourpallet54"; + this.colourpallet54.Size = new System.Drawing.Size(12, 8); + this.colourpallet54.TabIndex = 35; + this.colourpallet54.Visible = false; + // + // colourpallet55 + // + this.colourpallet55.BackColor = System.Drawing.Color.Black; + this.colourpallet55.Location = new System.Drawing.Point(41, 28); + this.colourpallet55.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet55.Name = "colourpallet55"; + this.colourpallet55.Size = new System.Drawing.Size(12, 8); + this.colourpallet55.TabIndex = 34; + this.colourpallet55.Visible = false; + // + // colourpallet56 + // + this.colourpallet56.BackColor = System.Drawing.Color.Black; + this.colourpallet56.Location = new System.Drawing.Point(54, 28); + this.colourpallet56.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet56.Name = "colourpallet56"; + this.colourpallet56.Size = new System.Drawing.Size(12, 8); + this.colourpallet56.TabIndex = 42; + this.colourpallet56.Visible = false; + // + // colourpallet57 + // + this.colourpallet57.BackColor = System.Drawing.Color.Black; + this.colourpallet57.Location = new System.Drawing.Point(67, 28); + this.colourpallet57.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet57.Name = "colourpallet57"; + this.colourpallet57.Size = new System.Drawing.Size(12, 8); + this.colourpallet57.TabIndex = 38; + this.colourpallet57.Visible = false; + // + // colourpallet58 + // + this.colourpallet58.BackColor = System.Drawing.Color.Black; + this.colourpallet58.Location = new System.Drawing.Point(80, 28); + this.colourpallet58.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet58.Name = "colourpallet58"; + this.colourpallet58.Size = new System.Drawing.Size(12, 8); + this.colourpallet58.TabIndex = 39; + this.colourpallet58.Visible = false; + // + // colourpallet59 + // + this.colourpallet59.BackColor = System.Drawing.Color.Black; + this.colourpallet59.Location = new System.Drawing.Point(93, 28); + this.colourpallet59.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet59.Name = "colourpallet59"; + this.colourpallet59.Size = new System.Drawing.Size(12, 8); + this.colourpallet59.TabIndex = 45; + this.colourpallet59.Visible = false; + // + // colourpallet60 + // + this.colourpallet60.BackColor = System.Drawing.Color.Black; + this.colourpallet60.Location = new System.Drawing.Point(106, 28); + this.colourpallet60.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet60.Name = "colourpallet60"; + this.colourpallet60.Size = new System.Drawing.Size(12, 8); + this.colourpallet60.TabIndex = 47; + this.colourpallet60.Visible = false; + // + // colourpallet61 + // + this.colourpallet61.BackColor = System.Drawing.Color.Black; + this.colourpallet61.Location = new System.Drawing.Point(119, 28); + this.colourpallet61.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet61.Name = "colourpallet61"; + this.colourpallet61.Size = new System.Drawing.Size(12, 8); + this.colourpallet61.TabIndex = 30; + this.colourpallet61.Visible = false; + // + // colourpallet62 + // + this.colourpallet62.BackColor = System.Drawing.Color.Black; + this.colourpallet62.Location = new System.Drawing.Point(132, 28); + this.colourpallet62.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet62.Name = "colourpallet62"; + this.colourpallet62.Size = new System.Drawing.Size(12, 8); + this.colourpallet62.TabIndex = 37; + this.colourpallet62.Visible = false; + // + // colourpallet63 + // + this.colourpallet63.BackColor = System.Drawing.Color.Black; + this.colourpallet63.Location = new System.Drawing.Point(145, 28); + this.colourpallet63.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet63.Name = "colourpallet63"; + this.colourpallet63.Size = new System.Drawing.Size(12, 8); + this.colourpallet63.TabIndex = 29; + this.colourpallet63.Visible = false; + // + // colourpallet64 + // + this.colourpallet64.BackColor = System.Drawing.Color.Black; + this.colourpallet64.Location = new System.Drawing.Point(158, 28); + this.colourpallet64.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet64.Name = "colourpallet64"; + this.colourpallet64.Size = new System.Drawing.Size(12, 8); + this.colourpallet64.TabIndex = 25; + this.colourpallet64.Visible = false; + // + // colourpallet65 + // + this.colourpallet65.BackColor = System.Drawing.Color.Black; + this.colourpallet65.Location = new System.Drawing.Point(171, 28); + this.colourpallet65.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet65.Name = "colourpallet65"; + this.colourpallet65.Size = new System.Drawing.Size(12, 8); + this.colourpallet65.TabIndex = 57; + this.colourpallet65.Visible = false; + // + // colourpallet66 + // + this.colourpallet66.BackColor = System.Drawing.Color.Black; + this.colourpallet66.Location = new System.Drawing.Point(184, 28); + this.colourpallet66.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet66.Name = "colourpallet66"; + this.colourpallet66.Size = new System.Drawing.Size(12, 8); + this.colourpallet66.TabIndex = 61; + this.colourpallet66.Visible = false; + // + // colourpallet67 + // + this.colourpallet67.BackColor = System.Drawing.Color.Black; + this.colourpallet67.Location = new System.Drawing.Point(197, 28); + this.colourpallet67.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet67.Name = "colourpallet67"; + this.colourpallet67.Size = new System.Drawing.Size(12, 8); + this.colourpallet67.TabIndex = 69; + this.colourpallet67.Visible = false; + // + // colourpallet68 + // + this.colourpallet68.BackColor = System.Drawing.Color.Black; + this.colourpallet68.Location = new System.Drawing.Point(210, 28); + this.colourpallet68.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet68.Name = "colourpallet68"; + this.colourpallet68.Size = new System.Drawing.Size(12, 8); + this.colourpallet68.TabIndex = 62; + this.colourpallet68.Visible = false; + // + // colourpallet69 + // + this.colourpallet69.BackColor = System.Drawing.Color.Black; + this.colourpallet69.Location = new System.Drawing.Point(2, 37); + this.colourpallet69.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet69.Name = "colourpallet69"; + this.colourpallet69.Size = new System.Drawing.Size(12, 8); + this.colourpallet69.TabIndex = 79; + this.colourpallet69.Visible = false; + // + // colourpallet70 + // + this.colourpallet70.BackColor = System.Drawing.Color.Black; + this.colourpallet70.Location = new System.Drawing.Point(15, 37); + this.colourpallet70.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet70.Name = "colourpallet70"; + this.colourpallet70.Size = new System.Drawing.Size(12, 8); + this.colourpallet70.TabIndex = 77; + this.colourpallet70.Visible = false; + // + // colourpallet71 + // + this.colourpallet71.BackColor = System.Drawing.Color.Black; + this.colourpallet71.Location = new System.Drawing.Point(28, 37); + this.colourpallet71.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet71.Name = "colourpallet71"; + this.colourpallet71.Size = new System.Drawing.Size(12, 8); + this.colourpallet71.TabIndex = 71; + this.colourpallet71.Visible = false; + // + // colourpallet72 + // + this.colourpallet72.BackColor = System.Drawing.Color.Black; + this.colourpallet72.Location = new System.Drawing.Point(41, 37); + this.colourpallet72.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet72.Name = "colourpallet72"; + this.colourpallet72.Size = new System.Drawing.Size(12, 8); + this.colourpallet72.TabIndex = 70; + this.colourpallet72.Visible = false; + // + // colourpallet73 + // + this.colourpallet73.BackColor = System.Drawing.Color.Black; + this.colourpallet73.Location = new System.Drawing.Point(54, 37); + this.colourpallet73.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet73.Name = "colourpallet73"; + this.colourpallet73.Size = new System.Drawing.Size(12, 8); + this.colourpallet73.TabIndex = 74; + this.colourpallet73.Visible = false; + // + // colourpallet74 + // + this.colourpallet74.BackColor = System.Drawing.Color.Black; + this.colourpallet74.Location = new System.Drawing.Point(67, 37); + this.colourpallet74.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet74.Name = "colourpallet74"; + this.colourpallet74.Size = new System.Drawing.Size(12, 8); + this.colourpallet74.TabIndex = 66; + this.colourpallet74.Visible = false; + // + // colourpallet75 + // + this.colourpallet75.BackColor = System.Drawing.Color.Black; + this.colourpallet75.Location = new System.Drawing.Point(80, 37); + this.colourpallet75.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet75.Name = "colourpallet75"; + this.colourpallet75.Size = new System.Drawing.Size(12, 8); + this.colourpallet75.TabIndex = 67; + this.colourpallet75.Visible = false; + // + // colourpallet76 + // + this.colourpallet76.BackColor = System.Drawing.Color.Black; + this.colourpallet76.Location = new System.Drawing.Point(93, 37); + this.colourpallet76.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet76.Name = "colourpallet76"; + this.colourpallet76.Size = new System.Drawing.Size(12, 8); + this.colourpallet76.TabIndex = 76; + this.colourpallet76.Visible = false; + // + // colourpallet77 + // + this.colourpallet77.BackColor = System.Drawing.Color.Black; + this.colourpallet77.Location = new System.Drawing.Point(106, 37); + this.colourpallet77.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet77.Name = "colourpallet77"; + this.colourpallet77.Size = new System.Drawing.Size(12, 8); + this.colourpallet77.TabIndex = 64; + this.colourpallet77.Visible = false; + // + // colourpallet78 + // + this.colourpallet78.BackColor = System.Drawing.Color.Black; + this.colourpallet78.Location = new System.Drawing.Point(119, 37); + this.colourpallet78.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet78.Name = "colourpallet78"; + this.colourpallet78.Size = new System.Drawing.Size(12, 8); + this.colourpallet78.TabIndex = 84; + this.colourpallet78.Visible = false; + // + // colourpallet79 + // + this.colourpallet79.BackColor = System.Drawing.Color.Black; + this.colourpallet79.Location = new System.Drawing.Point(132, 37); + this.colourpallet79.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet79.Name = "colourpallet79"; + this.colourpallet79.Size = new System.Drawing.Size(12, 8); + this.colourpallet79.TabIndex = 72; + this.colourpallet79.Visible = false; + // + // colourpallet80 + // + this.colourpallet80.BackColor = System.Drawing.Color.Black; + this.colourpallet80.Location = new System.Drawing.Point(145, 37); + this.colourpallet80.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet80.Name = "colourpallet80"; + this.colourpallet80.Size = new System.Drawing.Size(12, 8); + this.colourpallet80.TabIndex = 75; + this.colourpallet80.Visible = false; + // + // colourpallet81 + // + this.colourpallet81.BackColor = System.Drawing.Color.Black; + this.colourpallet81.Location = new System.Drawing.Point(158, 37); + this.colourpallet81.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet81.Name = "colourpallet81"; + this.colourpallet81.Size = new System.Drawing.Size(12, 8); + this.colourpallet81.TabIndex = 65; + this.colourpallet81.Visible = false; + // + // colourpallet82 + // + this.colourpallet82.BackColor = System.Drawing.Color.Black; + this.colourpallet82.Location = new System.Drawing.Point(171, 37); + this.colourpallet82.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet82.Name = "colourpallet82"; + this.colourpallet82.Size = new System.Drawing.Size(12, 8); + this.colourpallet82.TabIndex = 60; + this.colourpallet82.Visible = false; + // + // colourpallet83 + // + this.colourpallet83.BackColor = System.Drawing.Color.Black; + this.colourpallet83.Location = new System.Drawing.Point(184, 37); + this.colourpallet83.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet83.Name = "colourpallet83"; + this.colourpallet83.Size = new System.Drawing.Size(12, 8); + this.colourpallet83.TabIndex = 88; + this.colourpallet83.Visible = false; + // + // colourpallet84 + // + this.colourpallet84.BackColor = System.Drawing.Color.Black; + this.colourpallet84.Location = new System.Drawing.Point(197, 37); + this.colourpallet84.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet84.Name = "colourpallet84"; + this.colourpallet84.Size = new System.Drawing.Size(12, 8); + this.colourpallet84.TabIndex = 68; + this.colourpallet84.Visible = false; + // + // colourpallet85 + // + this.colourpallet85.BackColor = System.Drawing.Color.Black; + this.colourpallet85.Location = new System.Drawing.Point(210, 37); + this.colourpallet85.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet85.Name = "colourpallet85"; + this.colourpallet85.Size = new System.Drawing.Size(12, 8); + this.colourpallet85.TabIndex = 83; + this.colourpallet85.Visible = false; + // + // colourpallet86 + // + this.colourpallet86.BackColor = System.Drawing.Color.Black; + this.colourpallet86.Location = new System.Drawing.Point(2, 46); + this.colourpallet86.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet86.Name = "colourpallet86"; + this.colourpallet86.Size = new System.Drawing.Size(12, 8); + this.colourpallet86.TabIndex = 59; + this.colourpallet86.Visible = false; + // + // colourpallet87 + // + this.colourpallet87.BackColor = System.Drawing.Color.Black; + this.colourpallet87.Location = new System.Drawing.Point(15, 46); + this.colourpallet87.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet87.Name = "colourpallet87"; + this.colourpallet87.Size = new System.Drawing.Size(12, 8); + this.colourpallet87.TabIndex = 81; + this.colourpallet87.Visible = false; + // + // colourpallet88 + // + this.colourpallet88.BackColor = System.Drawing.Color.Black; + this.colourpallet88.Location = new System.Drawing.Point(28, 46); + this.colourpallet88.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet88.Name = "colourpallet88"; + this.colourpallet88.Size = new System.Drawing.Size(12, 8); + this.colourpallet88.TabIndex = 63; + this.colourpallet88.Visible = false; + // + // colourpallet89 + // + this.colourpallet89.BackColor = System.Drawing.Color.Black; + this.colourpallet89.Location = new System.Drawing.Point(41, 46); + this.colourpallet89.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet89.Name = "colourpallet89"; + this.colourpallet89.Size = new System.Drawing.Size(12, 8); + this.colourpallet89.TabIndex = 73; + this.colourpallet89.Visible = false; + // + // colourpallet90 + // + this.colourpallet90.BackColor = System.Drawing.Color.Black; + this.colourpallet90.Location = new System.Drawing.Point(54, 46); + this.colourpallet90.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet90.Name = "colourpallet90"; + this.colourpallet90.Size = new System.Drawing.Size(12, 8); + this.colourpallet90.TabIndex = 87; + this.colourpallet90.Visible = false; + // + // colourpallet91 + // + this.colourpallet91.BackColor = System.Drawing.Color.Black; + this.colourpallet91.Location = new System.Drawing.Point(67, 46); + this.colourpallet91.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet91.Name = "colourpallet91"; + this.colourpallet91.Size = new System.Drawing.Size(12, 8); + this.colourpallet91.TabIndex = 58; + this.colourpallet91.Visible = false; + // + // colourpallet92 + // + this.colourpallet92.BackColor = System.Drawing.Color.Black; + this.colourpallet92.Location = new System.Drawing.Point(80, 46); + this.colourpallet92.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet92.Name = "colourpallet92"; + this.colourpallet92.Size = new System.Drawing.Size(12, 8); + this.colourpallet92.TabIndex = 82; + this.colourpallet92.Visible = false; + // + // colourpallet93 + // + this.colourpallet93.BackColor = System.Drawing.Color.Black; + this.colourpallet93.Location = new System.Drawing.Point(93, 46); + this.colourpallet93.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet93.Name = "colourpallet93"; + this.colourpallet93.Size = new System.Drawing.Size(12, 8); + this.colourpallet93.TabIndex = 86; + this.colourpallet93.Visible = false; + // + // colourpallet94 + // + this.colourpallet94.BackColor = System.Drawing.Color.Black; + this.colourpallet94.Location = new System.Drawing.Point(106, 46); + this.colourpallet94.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet94.Name = "colourpallet94"; + this.colourpallet94.Size = new System.Drawing.Size(12, 8); + this.colourpallet94.TabIndex = 80; + this.colourpallet94.Visible = false; + // + // colourpallet95 + // + this.colourpallet95.BackColor = System.Drawing.Color.Black; + this.colourpallet95.Location = new System.Drawing.Point(119, 46); + this.colourpallet95.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet95.Name = "colourpallet95"; + this.colourpallet95.Size = new System.Drawing.Size(12, 8); + this.colourpallet95.TabIndex = 85; + this.colourpallet95.Visible = false; + // + // colourpallet96 + // + this.colourpallet96.BackColor = System.Drawing.Color.Black; + this.colourpallet96.Location = new System.Drawing.Point(132, 46); + this.colourpallet96.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet96.Name = "colourpallet96"; + this.colourpallet96.Size = new System.Drawing.Size(12, 8); + this.colourpallet96.TabIndex = 78; + this.colourpallet96.Visible = false; + // + // colourpallet97 + // + this.colourpallet97.BackColor = System.Drawing.Color.Black; + this.colourpallet97.Location = new System.Drawing.Point(145, 46); + this.colourpallet97.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet97.Name = "colourpallet97"; + this.colourpallet97.Size = new System.Drawing.Size(12, 8); + this.colourpallet97.TabIndex = 89; + this.colourpallet97.Visible = false; + // + // colourpallet98 + // + this.colourpallet98.BackColor = System.Drawing.Color.Black; + this.colourpallet98.Location = new System.Drawing.Point(158, 46); + this.colourpallet98.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet98.Name = "colourpallet98"; + this.colourpallet98.Size = new System.Drawing.Size(12, 8); + this.colourpallet98.TabIndex = 93; + this.colourpallet98.Visible = false; + // + // colourpallet99 + // + this.colourpallet99.BackColor = System.Drawing.Color.Black; + this.colourpallet99.Location = new System.Drawing.Point(171, 46); + this.colourpallet99.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet99.Name = "colourpallet99"; + this.colourpallet99.Size = new System.Drawing.Size(12, 8); + this.colourpallet99.TabIndex = 101; + this.colourpallet99.Visible = false; + // + // colourpallet100 + // + this.colourpallet100.BackColor = System.Drawing.Color.Black; + this.colourpallet100.Location = new System.Drawing.Point(184, 46); + this.colourpallet100.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet100.Name = "colourpallet100"; + this.colourpallet100.Size = new System.Drawing.Size(12, 8); + this.colourpallet100.TabIndex = 94; + this.colourpallet100.Visible = false; + // + // colourpallet101 + // + this.colourpallet101.BackColor = System.Drawing.Color.Black; + this.colourpallet101.Location = new System.Drawing.Point(197, 46); + this.colourpallet101.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet101.Name = "colourpallet101"; + this.colourpallet101.Size = new System.Drawing.Size(12, 8); + this.colourpallet101.TabIndex = 111; + this.colourpallet101.Visible = false; + // + // colourpallet102 + // + this.colourpallet102.BackColor = System.Drawing.Color.Black; + this.colourpallet102.Location = new System.Drawing.Point(210, 46); + this.colourpallet102.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet102.Name = "colourpallet102"; + this.colourpallet102.Size = new System.Drawing.Size(12, 8); + this.colourpallet102.TabIndex = 110; + this.colourpallet102.Visible = false; + // + // colourpallet103 + // + this.colourpallet103.BackColor = System.Drawing.Color.Black; + this.colourpallet103.Location = new System.Drawing.Point(2, 55); + this.colourpallet103.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet103.Name = "colourpallet103"; + this.colourpallet103.Size = new System.Drawing.Size(12, 8); + this.colourpallet103.TabIndex = 117; + this.colourpallet103.Visible = false; + // + // colourpallet104 + // + this.colourpallet104.BackColor = System.Drawing.Color.Black; + this.colourpallet104.Location = new System.Drawing.Point(15, 55); + this.colourpallet104.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet104.Name = "colourpallet104"; + this.colourpallet104.Size = new System.Drawing.Size(12, 8); + this.colourpallet104.TabIndex = 112; + this.colourpallet104.Visible = false; + // + // colourpallet105 + // + this.colourpallet105.BackColor = System.Drawing.Color.Black; + this.colourpallet105.Location = new System.Drawing.Point(28, 55); + this.colourpallet105.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet105.Name = "colourpallet105"; + this.colourpallet105.Size = new System.Drawing.Size(12, 8); + this.colourpallet105.TabIndex = 109; + this.colourpallet105.Visible = false; + // + // colourpallet106 + // + this.colourpallet106.BackColor = System.Drawing.Color.Black; + this.colourpallet106.Location = new System.Drawing.Point(41, 55); + this.colourpallet106.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet106.Name = "colourpallet106"; + this.colourpallet106.Size = new System.Drawing.Size(12, 8); + this.colourpallet106.TabIndex = 103; + this.colourpallet106.Visible = false; + // + // colourpallet107 + // + this.colourpallet107.BackColor = System.Drawing.Color.Black; + this.colourpallet107.Location = new System.Drawing.Point(54, 55); + this.colourpallet107.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet107.Name = "colourpallet107"; + this.colourpallet107.Size = new System.Drawing.Size(12, 8); + this.colourpallet107.TabIndex = 102; + this.colourpallet107.Visible = false; + // + // colourpallet108 + // + this.colourpallet108.BackColor = System.Drawing.Color.Black; + this.colourpallet108.Location = new System.Drawing.Point(67, 55); + this.colourpallet108.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet108.Name = "colourpallet108"; + this.colourpallet108.Size = new System.Drawing.Size(12, 8); + this.colourpallet108.TabIndex = 106; + this.colourpallet108.Visible = false; + // + // colourpallet109 + // + this.colourpallet109.BackColor = System.Drawing.Color.Black; + this.colourpallet109.Location = new System.Drawing.Point(80, 55); + this.colourpallet109.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet109.Name = "colourpallet109"; + this.colourpallet109.Size = new System.Drawing.Size(12, 8); + this.colourpallet109.TabIndex = 98; + this.colourpallet109.Visible = false; + // + // colourpallet110 + // + this.colourpallet110.BackColor = System.Drawing.Color.Black; + this.colourpallet110.Location = new System.Drawing.Point(93, 55); + this.colourpallet110.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet110.Name = "colourpallet110"; + this.colourpallet110.Size = new System.Drawing.Size(12, 8); + this.colourpallet110.TabIndex = 99; + this.colourpallet110.Visible = false; + // + // colourpallet111 + // + this.colourpallet111.BackColor = System.Drawing.Color.Black; + this.colourpallet111.Location = new System.Drawing.Point(106, 55); + this.colourpallet111.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet111.Name = "colourpallet111"; + this.colourpallet111.Size = new System.Drawing.Size(12, 8); + this.colourpallet111.TabIndex = 108; + this.colourpallet111.Visible = false; + // + // colourpallet112 + // + this.colourpallet112.BackColor = System.Drawing.Color.Black; + this.colourpallet112.Location = new System.Drawing.Point(119, 55); + this.colourpallet112.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet112.Name = "colourpallet112"; + this.colourpallet112.Size = new System.Drawing.Size(12, 8); + this.colourpallet112.TabIndex = 96; + this.colourpallet112.Visible = false; + // + // colourpallet113 + // + this.colourpallet113.BackColor = System.Drawing.Color.Black; + this.colourpallet113.Location = new System.Drawing.Point(132, 55); + this.colourpallet113.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet113.Name = "colourpallet113"; + this.colourpallet113.Size = new System.Drawing.Size(12, 8); + this.colourpallet113.TabIndex = 116; + this.colourpallet113.Visible = false; + // + // colourpallet114 + // + this.colourpallet114.BackColor = System.Drawing.Color.Black; + this.colourpallet114.Location = new System.Drawing.Point(145, 55); + this.colourpallet114.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet114.Name = "colourpallet114"; + this.colourpallet114.Size = new System.Drawing.Size(12, 8); + this.colourpallet114.TabIndex = 104; + this.colourpallet114.Visible = false; + // + // colourpallet115 + // + this.colourpallet115.BackColor = System.Drawing.Color.Black; + this.colourpallet115.Location = new System.Drawing.Point(158, 55); + this.colourpallet115.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet115.Name = "colourpallet115"; + this.colourpallet115.Size = new System.Drawing.Size(12, 8); + this.colourpallet115.TabIndex = 107; + this.colourpallet115.Visible = false; + // + // colourpallet116 + // + this.colourpallet116.BackColor = System.Drawing.Color.Black; + this.colourpallet116.Location = new System.Drawing.Point(171, 55); + this.colourpallet116.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet116.Name = "colourpallet116"; + this.colourpallet116.Size = new System.Drawing.Size(12, 8); + this.colourpallet116.TabIndex = 97; + this.colourpallet116.Visible = false; + // + // colourpallet117 + // + this.colourpallet117.BackColor = System.Drawing.Color.Black; + this.colourpallet117.Location = new System.Drawing.Point(184, 55); + this.colourpallet117.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet117.Name = "colourpallet117"; + this.colourpallet117.Size = new System.Drawing.Size(12, 8); + this.colourpallet117.TabIndex = 92; + this.colourpallet117.Visible = false; + // + // colourpallet118 + // + this.colourpallet118.BackColor = System.Drawing.Color.Black; + this.colourpallet118.Location = new System.Drawing.Point(197, 55); + this.colourpallet118.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet118.Name = "colourpallet118"; + this.colourpallet118.Size = new System.Drawing.Size(12, 8); + this.colourpallet118.TabIndex = 120; + this.colourpallet118.Visible = false; + // + // colourpallet119 + // + this.colourpallet119.BackColor = System.Drawing.Color.Black; + this.colourpallet119.Location = new System.Drawing.Point(210, 55); + this.colourpallet119.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet119.Name = "colourpallet119"; + this.colourpallet119.Size = new System.Drawing.Size(12, 8); + this.colourpallet119.TabIndex = 100; + this.colourpallet119.Visible = false; + // + // colourpallet120 + // + this.colourpallet120.BackColor = System.Drawing.Color.Black; + this.colourpallet120.Location = new System.Drawing.Point(2, 64); + this.colourpallet120.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet120.Name = "colourpallet120"; + this.colourpallet120.Size = new System.Drawing.Size(12, 8); + this.colourpallet120.TabIndex = 115; + this.colourpallet120.Visible = false; + // + // colourpallet121 + // + this.colourpallet121.BackColor = System.Drawing.Color.Black; + this.colourpallet121.Location = new System.Drawing.Point(15, 64); + this.colourpallet121.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet121.Name = "colourpallet121"; + this.colourpallet121.Size = new System.Drawing.Size(12, 8); + this.colourpallet121.TabIndex = 91; + this.colourpallet121.Visible = false; + // + // colourpallet122 + // + this.colourpallet122.BackColor = System.Drawing.Color.Black; + this.colourpallet122.Location = new System.Drawing.Point(28, 64); + this.colourpallet122.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet122.Name = "colourpallet122"; + this.colourpallet122.Size = new System.Drawing.Size(12, 8); + this.colourpallet122.TabIndex = 113; + this.colourpallet122.Visible = false; + // + // colourpallet123 + // + this.colourpallet123.BackColor = System.Drawing.Color.Black; + this.colourpallet123.Location = new System.Drawing.Point(41, 64); + this.colourpallet123.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet123.Name = "colourpallet123"; + this.colourpallet123.Size = new System.Drawing.Size(12, 8); + this.colourpallet123.TabIndex = 95; + this.colourpallet123.Visible = false; + // + // colourpallet124 + // + this.colourpallet124.BackColor = System.Drawing.Color.Black; + this.colourpallet124.Location = new System.Drawing.Point(54, 64); + this.colourpallet124.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet124.Name = "colourpallet124"; + this.colourpallet124.Size = new System.Drawing.Size(12, 8); + this.colourpallet124.TabIndex = 105; + this.colourpallet124.Visible = false; + // + // colourpallet125 + // + this.colourpallet125.BackColor = System.Drawing.Color.Black; + this.colourpallet125.Location = new System.Drawing.Point(67, 64); + this.colourpallet125.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet125.Name = "colourpallet125"; + this.colourpallet125.Size = new System.Drawing.Size(12, 8); + this.colourpallet125.TabIndex = 119; + this.colourpallet125.Visible = false; + // + // colourpallet126 + // + this.colourpallet126.BackColor = System.Drawing.Color.Black; + this.colourpallet126.Location = new System.Drawing.Point(80, 64); + this.colourpallet126.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet126.Name = "colourpallet126"; + this.colourpallet126.Size = new System.Drawing.Size(12, 8); + this.colourpallet126.TabIndex = 90; + this.colourpallet126.Visible = false; + // + // colourpallet127 + // + this.colourpallet127.BackColor = System.Drawing.Color.Black; + this.colourpallet127.Location = new System.Drawing.Point(93, 64); + this.colourpallet127.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet127.Name = "colourpallet127"; + this.colourpallet127.Size = new System.Drawing.Size(12, 8); + this.colourpallet127.TabIndex = 114; + this.colourpallet127.Visible = false; + // + // colourpallet128 + // + this.colourpallet128.BackColor = System.Drawing.Color.Black; + this.colourpallet128.Location = new System.Drawing.Point(106, 64); + this.colourpallet128.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet128.Name = "colourpallet128"; + this.colourpallet128.Size = new System.Drawing.Size(12, 8); + this.colourpallet128.TabIndex = 118; + this.colourpallet128.Visible = false; + // + // Label4 + // + this.Label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(11, 2); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(204, 23); + this.Label4.TabIndex = 11; + this.Label4.Text = "Colours"; + this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // line6 + // + this.line6.BackColor = System.Drawing.Color.Black; + this.line6.Dock = System.Windows.Forms.DockStyle.Top; + this.line6.Location = new System.Drawing.Point(0, 0); + this.line6.Name = "line6"; + this.line6.Size = new System.Drawing.Size(225, 1); + this.line6.TabIndex = 4; + // + // pnltoolproperties + // + this.pnltoolproperties.Controls.Add(this.pnlpixelplacersettings); + this.pnltoolproperties.Controls.Add(this.pnlovaltoolsettings); + this.pnltoolproperties.Controls.Add(this.pnleracertoolsettings); + this.pnltoolproperties.Controls.Add(this.pnllinetoolsettings); + this.pnltoolproperties.Controls.Add(this.pnlpaintbrushtoolsettings); + this.pnltoolproperties.Controls.Add(this.pnltexttoolsettings); + this.pnltoolproperties.Controls.Add(this.pnlpixelsettersettings); + this.pnltoolproperties.Controls.Add(this.pnlmagnifiersettings); + this.pnltoolproperties.Controls.Add(this.pnlfloodfillsettings); + this.pnltoolproperties.Controls.Add(this.pnlsquaretoolsettings); + this.pnltoolproperties.Controls.Add(this.pnlpencilsettings); + this.pnltoolproperties.Controls.Add(this.Label6); + this.pnltoolproperties.Controls.Add(this.Label5); + this.pnltoolproperties.Controls.Add(this.line5); + this.pnltoolproperties.Controls.Add(this.line3); + this.pnltoolproperties.Location = new System.Drawing.Point(0, 0); + this.pnltoolproperties.Name = "pnltoolproperties"; + this.pnltoolproperties.Size = new System.Drawing.Size(457, 100); + this.pnltoolproperties.TabIndex = 1; + // + // pnlovaltoolsettings + // + this.pnlovaltoolsettings.Controls.Add(this.Label20); + this.pnlovaltoolsettings.Controls.Add(this.btnovalfillonoff); + this.pnlovaltoolsettings.Controls.Add(this.pnlovalfillcolour); + this.pnlovaltoolsettings.Controls.Add(this.txtovalborderwidth); + this.pnlovaltoolsettings.Controls.Add(this.Label21); + this.pnlovaltoolsettings.Controls.Add(this.Label22); + this.pnlovaltoolsettings.Controls.Add(this.Label23); + this.pnlovaltoolsettings.Location = new System.Drawing.Point(0, 1); + this.pnlovaltoolsettings.Name = "pnlovaltoolsettings"; + this.pnlovaltoolsettings.Size = new System.Drawing.Size(459, 96); + this.pnlovaltoolsettings.TabIndex = 15; + this.pnlovaltoolsettings.Visible = false; + // + // Label20 + // + this.Label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label20.Location = new System.Drawing.Point(211, 29); + this.Label20.Name = "Label20"; + this.Label20.Size = new System.Drawing.Size(244, 65); + this.Label20.TabIndex = 15; + this.Label20.Text = "Set a border width and turn fill on or off then draw the square on the canvas wit" + + "h the mouse. Click the fill colour box to set it to your currently selected colo" + + "ur."; + // + // btnovalfillonoff + // + this.btnovalfillonoff.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnovalfillonoff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnovalfillonoff.Location = new System.Drawing.Point(150, 64); + this.btnovalfillonoff.Name = "btnovalfillonoff"; + this.btnovalfillonoff.Size = new System.Drawing.Size(56, 28); + this.btnovalfillonoff.TabIndex = 14; + this.btnovalfillonoff.Text = "Fill OFF"; + this.btnovalfillonoff.UseVisualStyleBackColor = true; + this.btnovalfillonoff.Click += new System.EventHandler(this.btnovalfillonoff_Click); + // + // pnlovalfillcolour + // + this.pnlovalfillcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlovalfillcolour.Location = new System.Drawing.Point(109, 64); + this.pnlovalfillcolour.Name = "pnlovalfillcolour"; + this.pnlovalfillcolour.Size = new System.Drawing.Size(34, 28); + this.pnlovalfillcolour.TabIndex = 13; + this.pnlovalfillcolour.Click += new System.EventHandler(this.pnlovalfillcolour_Click); + // + // txtovalborderwidth + // + this.txtovalborderwidth.BackColor = System.Drawing.Color.White; + this.txtovalborderwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtovalborderwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtovalborderwidth.ForeColor = System.Drawing.Color.Black; + this.txtovalborderwidth.Location = new System.Drawing.Point(133, 33); + this.txtovalborderwidth.Name = "txtovalborderwidth"; + this.txtovalborderwidth.Size = new System.Drawing.Size(73, 26); + this.txtovalborderwidth.TabIndex = 12; + this.txtovalborderwidth.TextChanged += new System.EventHandler(this.txtovalborderwidth_TextChanged); + // + // Label21 + // + this.Label21.AutoSize = true; + this.Label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label21.Location = new System.Drawing.Point(4, 66); + this.Label21.Name = "Label21"; + this.Label21.Size = new System.Drawing.Size(100, 24); + this.Label21.TabIndex = 11; + this.Label21.Text = "Fill Colour:"; + // + // Label22 + // + this.Label22.AutoSize = true; + this.Label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label22.Location = new System.Drawing.Point(4, 33); + this.Label22.Name = "Label22"; + this.Label22.Size = new System.Drawing.Size(125, 24); + this.Label22.TabIndex = 10; + this.Label22.Text = "Border Width:"; + // + // Label23 + // + this.Label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label23.Location = new System.Drawing.Point(6, 3); + this.Label23.Name = "Label23"; + this.Label23.Size = new System.Drawing.Size(444, 23); + this.Label23.TabIndex = 0; + this.Label23.Text = "Oval Tool Settings"; + this.Label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnleracertoolsettings + // + this.pnleracertoolsettings.Controls.Add(this.Label28); + this.pnleracertoolsettings.Controls.Add(this.btneracersquare); + this.pnleracertoolsettings.Controls.Add(this.btneracercircle); + this.pnleracertoolsettings.Controls.Add(this.Label24); + this.pnleracertoolsettings.Controls.Add(this.txteracersize); + this.pnleracertoolsettings.Controls.Add(this.Label26); + this.pnleracertoolsettings.Controls.Add(this.Label27); + this.pnleracertoolsettings.Location = new System.Drawing.Point(0, 1); + this.pnleracertoolsettings.Name = "pnleracertoolsettings"; + this.pnleracertoolsettings.Size = new System.Drawing.Size(459, 96); + this.pnleracertoolsettings.TabIndex = 16; + this.pnleracertoolsettings.Visible = false; + // + // Label28 + // + this.Label28.AutoSize = true; + this.Label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label28.Location = new System.Drawing.Point(40, 71); + this.Label28.Name = "Label28"; + this.Label28.Size = new System.Drawing.Size(65, 24); + this.Label28.TabIndex = 19; + this.Label28.Text = "Shape"; + // + // btneracersquare + // + this.btneracersquare.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadsquarerubberselected; + this.btneracersquare.FlatAppearance.BorderSize = 0; + this.btneracersquare.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btneracersquare.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btneracersquare.Location = new System.Drawing.Point(75, 21); + this.btneracersquare.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btneracersquare.Name = "btneracersquare"; + this.btneracersquare.Size = new System.Drawing.Size(60, 50); + this.btneracersquare.TabIndex = 17; + this.btneracersquare.Text = " "; + this.btneracersquare.UseVisualStyleBackColor = true; + this.btneracersquare.Click += new System.EventHandler(this.btneracersquare_Click); + // + // btneracercircle + // + this.btneracercircle.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadcirclerubber; + this.btneracercircle.FlatAppearance.BorderSize = 0; + this.btneracercircle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btneracercircle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btneracercircle.Location = new System.Drawing.Point(9, 21); + this.btneracercircle.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btneracercircle.Name = "btneracercircle"; + this.btneracercircle.Size = new System.Drawing.Size(60, 50); + this.btneracercircle.TabIndex = 16; + this.btneracercircle.Text = " "; + this.btneracercircle.UseVisualStyleBackColor = true; + this.btneracercircle.Click += new System.EventHandler(this.btneracercircle_Click); + // + // Label24 + // + this.Label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label24.Location = new System.Drawing.Point(141, 29); + this.Label24.Name = "Label24"; + this.Label24.Size = new System.Drawing.Size(314, 38); + this.Label24.TabIndex = 15; + this.Label24.Text = "Choose a shape and size for your eracer then rub out unwanted parts of your drawi" + + "ng with the mouse."; + // + // txteracersize + // + this.txteracersize.BackColor = System.Drawing.Color.White; + this.txteracersize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txteracersize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txteracersize.ForeColor = System.Drawing.Color.Black; + this.txteracersize.Location = new System.Drawing.Point(198, 70); + this.txteracersize.Name = "txteracersize"; + this.txteracersize.Size = new System.Drawing.Size(73, 26); + this.txteracersize.TabIndex = 12; + this.txteracersize.TextChanged += new System.EventHandler(this.txteracersize_TextChanged); + // + // Label26 + // + this.Label26.AutoSize = true; + this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label26.Location = new System.Drawing.Point(141, 71); + this.Label26.Name = "Label26"; + this.Label26.Size = new System.Drawing.Size(51, 24); + this.Label26.TabIndex = 10; + this.Label26.Text = "Size:"; + // + // Label27 + // + this.Label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label27.Location = new System.Drawing.Point(6, 3); + this.Label27.Name = "Label27"; + this.Label27.Size = new System.Drawing.Size(444, 23); + this.Label27.TabIndex = 0; + this.Label27.Text = "Eraser Tool Settings"; + this.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnllinetoolsettings + // + this.pnllinetoolsettings.Controls.Add(this.Label29); + this.pnllinetoolsettings.Controls.Add(this.txtlinewidth); + this.pnllinetoolsettings.Controls.Add(this.Label30); + this.pnllinetoolsettings.Controls.Add(this.Label31); + this.pnllinetoolsettings.Location = new System.Drawing.Point(168, 32); + this.pnllinetoolsettings.Name = "pnllinetoolsettings"; + this.pnllinetoolsettings.Size = new System.Drawing.Size(60, 28); + this.pnllinetoolsettings.TabIndex = 20; + this.pnllinetoolsettings.Visible = false; + // + // Label29 + // + this.Label29.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label29.Location = new System.Drawing.Point(196, 29); + this.Label29.Name = "Label29"; + this.Label29.Size = new System.Drawing.Size(257, 38); + this.Label29.TabIndex = 15; + this.Label29.Text = "Enter a line width then use the mouse to draw a straight line on the canvas."; + // + // txtlinewidth + // + this.txtlinewidth.BackColor = System.Drawing.Color.White; + this.txtlinewidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtlinewidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtlinewidth.ForeColor = System.Drawing.Color.Black; + this.txtlinewidth.Location = new System.Drawing.Point(114, 33); + this.txtlinewidth.Name = "txtlinewidth"; + this.txtlinewidth.Size = new System.Drawing.Size(73, 26); + this.txtlinewidth.TabIndex = 12; + this.txtlinewidth.TextAlignChanged += new System.EventHandler(this.txtlinewidth_TextChanged); + // + // Label30 + // + this.Label30.AutoSize = true; + this.Label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label30.Location = new System.Drawing.Point(8, 34); + this.Label30.Name = "Label30"; + this.Label30.Size = new System.Drawing.Size(104, 24); + this.Label30.TabIndex = 10; + this.Label30.Text = "Line Width:"; + // + // Label31 + // + this.Label31.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label31.Location = new System.Drawing.Point(6, 3); + this.Label31.Name = "Label31"; + this.Label31.Size = new System.Drawing.Size(444, 23); + this.Label31.TabIndex = 0; + this.Label31.Text = "Line Tool Settings"; + this.Label31.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlpaintbrushtoolsettings + // + this.pnlpaintbrushtoolsettings.Controls.Add(this.Label36); + this.pnlpaintbrushtoolsettings.Controls.Add(this.btnpaintsquareshape); + this.pnlpaintbrushtoolsettings.Controls.Add(this.btnpaintcircleshape); + this.pnlpaintbrushtoolsettings.Controls.Add(this.Label37); + this.pnlpaintbrushtoolsettings.Controls.Add(this.txtpaintbrushsize); + this.pnlpaintbrushtoolsettings.Controls.Add(this.Label38); + this.pnlpaintbrushtoolsettings.Controls.Add(this.Label39); + this.pnlpaintbrushtoolsettings.Location = new System.Drawing.Point(0, 1); + this.pnlpaintbrushtoolsettings.Name = "pnlpaintbrushtoolsettings"; + this.pnlpaintbrushtoolsettings.Size = new System.Drawing.Size(457, 97); + this.pnlpaintbrushtoolsettings.TabIndex = 21; + this.pnlpaintbrushtoolsettings.Visible = false; + // + // Label36 + // + this.Label36.AutoSize = true; + this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label36.Location = new System.Drawing.Point(32, 69); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(65, 24); + this.Label36.TabIndex = 19; + this.Label36.Text = "Shape"; + // + // btnpaintsquareshape + // + this.btnpaintsquareshape.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadsquarerubber; + this.btnpaintsquareshape.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnpaintsquareshape.FlatAppearance.BorderSize = 0; + this.btnpaintsquareshape.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpaintsquareshape.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpaintsquareshape.Location = new System.Drawing.Point(69, 27); + this.btnpaintsquareshape.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpaintsquareshape.Name = "btnpaintsquareshape"; + this.btnpaintsquareshape.Size = new System.Drawing.Size(48, 40); + this.btnpaintsquareshape.TabIndex = 17; + this.btnpaintsquareshape.Text = " "; + this.btnpaintsquareshape.UseVisualStyleBackColor = true; + this.btnpaintsquareshape.Click += new System.EventHandler(this.btnpaintsquareshape_Click); + // + // btnpaintcircleshape + // + this.btnpaintcircleshape.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadcirclerubberselected; + this.btnpaintcircleshape.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnpaintcircleshape.FlatAppearance.BorderSize = 0; + this.btnpaintcircleshape.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpaintcircleshape.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpaintcircleshape.Location = new System.Drawing.Point(16, 27); + this.btnpaintcircleshape.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpaintcircleshape.Name = "btnpaintcircleshape"; + this.btnpaintcircleshape.Size = new System.Drawing.Size(48, 40); + this.btnpaintcircleshape.TabIndex = 16; + this.btnpaintcircleshape.Text = " "; + this.btnpaintcircleshape.UseVisualStyleBackColor = true; + this.btnpaintcircleshape.Click += new System.EventHandler(this.btnpaintcircleshape_Click); + // + // Label37 + // + this.Label37.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label37.Location = new System.Drawing.Point(137, 29); + this.Label37.Name = "Label37"; + this.Label37.Size = new System.Drawing.Size(314, 38); + this.Label37.TabIndex = 15; + this.Label37.Text = "Choose a shape and size for your paint brush then paint on the canvas by drawing " + + "with the mouse."; + // + // txtpaintbrushsize + // + this.txtpaintbrushsize.BackColor = System.Drawing.Color.White; + this.txtpaintbrushsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpaintbrushsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpaintbrushsize.ForeColor = System.Drawing.Color.Black; + this.txtpaintbrushsize.Location = new System.Drawing.Point(194, 68); + this.txtpaintbrushsize.Name = "txtpaintbrushsize"; + this.txtpaintbrushsize.Size = new System.Drawing.Size(73, 26); + this.txtpaintbrushsize.TabIndex = 12; + this.txtpaintbrushsize.TextChanged += new System.EventHandler(this.txtpaintbrushsize_TextChanged); + // + // Label38 + // + this.Label38.AutoSize = true; + this.Label38.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label38.Location = new System.Drawing.Point(137, 69); + this.Label38.Name = "Label38"; + this.Label38.Size = new System.Drawing.Size(51, 24); + this.Label38.TabIndex = 10; + this.Label38.Text = "Size:"; + // + // Label39 + // + this.Label39.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label39.Location = new System.Drawing.Point(6, 3); + this.Label39.Name = "Label39"; + this.Label39.Size = new System.Drawing.Size(444, 23); + this.Label39.TabIndex = 0; + this.Label39.Text = "Paint Brush Tool Settings"; + this.Label39.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnltexttoolsettings + // + this.pnltexttoolsettings.Controls.Add(this.Label35); + this.pnltexttoolsettings.Controls.Add(this.combofontstyle); + this.pnltexttoolsettings.Controls.Add(this.txtdrawstringtext); + this.pnltexttoolsettings.Controls.Add(this.combodrawtextfont); + this.pnltexttoolsettings.Controls.Add(this.Label25); + this.pnltexttoolsettings.Controls.Add(this.txtdrawtextsize); + this.pnltexttoolsettings.Controls.Add(this.Label32); + this.pnltexttoolsettings.Controls.Add(this.Label33); + this.pnltexttoolsettings.Controls.Add(this.Label34); + this.pnltexttoolsettings.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnltexttoolsettings.Location = new System.Drawing.Point(0, 1); + this.pnltexttoolsettings.Name = "pnltexttoolsettings"; + this.pnltexttoolsettings.Size = new System.Drawing.Size(456, 99); + this.pnltexttoolsettings.TabIndex = 17; + this.pnltexttoolsettings.Visible = false; + // + // Label35 + // + this.Label35.AutoSize = true; + this.Label35.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label35.Location = new System.Drawing.Point(117, 33); + this.Label35.Name = "Label35"; + this.Label35.Size = new System.Drawing.Size(55, 24); + this.Label35.TabIndex = 19; + this.Label35.Text = "Style:"; + // + // combofontstyle + // + this.combofontstyle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.combofontstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combofontstyle.FormattingEnabled = true; + this.combofontstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.combofontstyle.Location = new System.Drawing.Point(178, 34); + this.combofontstyle.Name = "combofontstyle"; + this.combofontstyle.Size = new System.Drawing.Size(78, 24); + this.combofontstyle.TabIndex = 18; + this.combofontstyle.SelectedIndexChanged += new System.EventHandler(this.combofontstyle_SelectedIndexChanged); + // + // txtdrawstringtext + // + this.txtdrawstringtext.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdrawstringtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtdrawstringtext.Location = new System.Drawing.Point(265, 52); + this.txtdrawstringtext.Multiline = true; + this.txtdrawstringtext.Name = "txtdrawstringtext"; + this.txtdrawstringtext.Size = new System.Drawing.Size(185, 41); + this.txtdrawstringtext.TabIndex = 17; + this.txtdrawstringtext.Text = "Enter Words Here"; + this.txtdrawstringtext.TextChanged += new System.EventHandler(this.txtdrawstringtext_TextChanged); + // + // combodrawtextfont + // + this.combodrawtextfont.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.combodrawtextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combodrawtextfont.FormattingEnabled = true; + this.combodrawtextfont.Location = new System.Drawing.Point(64, 68); + this.combodrawtextfont.Name = "combodrawtextfont"; + this.combodrawtextfont.Size = new System.Drawing.Size(192, 24); + this.combodrawtextfont.TabIndex = 16; + this.combodrawtextfont.SelectedIndexChanged += new System.EventHandler(this.combodrawtextfont_SelectedIndexChanged); + // + // Label25 + // + this.Label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label25.Location = new System.Drawing.Point(262, 26); + this.Label25.Name = "Label25"; + this.Label25.Size = new System.Drawing.Size(189, 23); + this.Label25.TabIndex = 15; + this.Label25.Text = "Click and drag on the canvas!"; + this.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtdrawtextsize + // + this.txtdrawtextsize.BackColor = System.Drawing.Color.White; + this.txtdrawtextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdrawtextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtdrawtextsize.ForeColor = System.Drawing.Color.Black; + this.txtdrawtextsize.Location = new System.Drawing.Point(61, 33); + this.txtdrawtextsize.Name = "txtdrawtextsize"; + this.txtdrawtextsize.Size = new System.Drawing.Size(43, 26); + this.txtdrawtextsize.TabIndex = 12; + this.txtdrawtextsize.TextChanged += new System.EventHandler(this.txtdrawtextsize_TextChanged); + // + // Label32 + // + this.Label32.AutoSize = true; + this.Label32.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label32.Location = new System.Drawing.Point(4, 66); + this.Label32.Name = "Label32"; + this.Label32.Size = new System.Drawing.Size(53, 24); + this.Label32.TabIndex = 11; + this.Label32.Text = "Font:"; + // + // Label33 + // + this.Label33.AutoSize = true; + this.Label33.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label33.Location = new System.Drawing.Point(4, 33); + this.Label33.Name = "Label33"; + this.Label33.Size = new System.Drawing.Size(51, 24); + this.Label33.TabIndex = 10; + this.Label33.Text = "Size:"; + // + // Label34 + // + this.Label34.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label34.Location = new System.Drawing.Point(6, 3); + this.Label34.Name = "Label34"; + this.Label34.Size = new System.Drawing.Size(444, 23); + this.Label34.TabIndex = 0; + this.Label34.Text = "Text Tool Settings"; + this.Label34.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlpixelsettersettings + // + this.pnlpixelsettersettings.Controls.Add(this.btnpixelsettersetpixel); + this.pnlpixelsettersettings.Controls.Add(this.txtpixelsetterycoordinate); + this.pnlpixelsettersettings.Controls.Add(this.txtpixelsetterxcoordinate); + this.pnlpixelsettersettings.Controls.Add(this.Label3); + this.pnlpixelsettersettings.Controls.Add(this.Label2); + this.pnlpixelsettersettings.Controls.Add(this.Label1); + this.pnlpixelsettersettings.Location = new System.Drawing.Point(0, 1); + this.pnlpixelsettersettings.Name = "pnlpixelsettersettings"; + this.pnlpixelsettersettings.Size = new System.Drawing.Size(457, 99); + this.pnlpixelsettersettings.TabIndex = 5; + this.pnlpixelsettersettings.Visible = false; + // + // btnpixelsettersetpixel + // + this.btnpixelsettersetpixel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpixelsettersetpixel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpixelsettersetpixel.Location = new System.Drawing.Point(215, 34); + this.btnpixelsettersetpixel.Name = "btnpixelsettersetpixel"; + this.btnpixelsettersetpixel.Size = new System.Drawing.Size(228, 56); + this.btnpixelsettersetpixel.TabIndex = 10; + this.btnpixelsettersetpixel.Text = "Set Pixel"; + this.btnpixelsettersetpixel.UseVisualStyleBackColor = true; + this.btnpixelsettersetpixel.Click += new System.EventHandler(this.btnpixelsettersetpixel_Click); + // + // txtpixelsetterycoordinate + // + this.txtpixelsetterycoordinate.BackColor = System.Drawing.Color.White; + this.txtpixelsetterycoordinate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpixelsetterycoordinate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpixelsetterycoordinate.ForeColor = System.Drawing.Color.Black; + this.txtpixelsetterycoordinate.Location = new System.Drawing.Point(136, 64); + this.txtpixelsetterycoordinate.Name = "txtpixelsetterycoordinate"; + this.txtpixelsetterycoordinate.Size = new System.Drawing.Size(73, 26); + this.txtpixelsetterycoordinate.TabIndex = 9; + // + // txtpixelsetterxcoordinate + // + this.txtpixelsetterxcoordinate.BackColor = System.Drawing.Color.White; + this.txtpixelsetterxcoordinate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpixelsetterxcoordinate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpixelsetterxcoordinate.ForeColor = System.Drawing.Color.Black; + this.txtpixelsetterxcoordinate.Location = new System.Drawing.Point(136, 34); + this.txtpixelsetterxcoordinate.Name = "txtpixelsetterxcoordinate"; + this.txtpixelsetterxcoordinate.Size = new System.Drawing.Size(73, 26); + this.txtpixelsetterxcoordinate.TabIndex = 8; + // + // Label3 + // + this.Label3.AutoSize = true; + this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(8, 63); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(124, 24); + this.Label3.TabIndex = 2; + this.Label3.Text = "Y Coordinate:"; + // + // Label2 + // + this.Label2.AutoSize = true; + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(7, 34); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(126, 24); + this.Label2.TabIndex = 1; + this.Label2.Text = "X Coordinate:"; + // + // Label1 + // + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(6, 3); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(444, 23); + this.Label1.TabIndex = 0; + this.Label1.Text = "Pixel Setter Settings"; + this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlmagnifiersettings + // + this.pnlmagnifiersettings.Controls.Add(this.btnzoomout); + this.pnlmagnifiersettings.Controls.Add(this.btnzoomin); + this.pnlmagnifiersettings.Controls.Add(this.lblzoomlevel); + this.pnlmagnifiersettings.Controls.Add(this.Label7); + this.pnlmagnifiersettings.Location = new System.Drawing.Point(78, 50); + this.pnlmagnifiersettings.Name = "pnlmagnifiersettings"; + this.pnlmagnifiersettings.Size = new System.Drawing.Size(67, 44); + this.pnlmagnifiersettings.TabIndex = 6; + this.pnlmagnifiersettings.Visible = false; + // + // btnzoomout + // + this.btnzoomout.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnzoomout.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnzoomout.Location = new System.Drawing.Point(16, 33); + this.btnzoomout.Name = "btnzoomout"; + this.btnzoomout.Size = new System.Drawing.Size(129, 56); + this.btnzoomout.TabIndex = 11; + this.btnzoomout.Text = "-"; + this.btnzoomout.UseVisualStyleBackColor = true; + this.btnzoomout.Click += new System.EventHandler(this.btnzoomout_Click); + // + // btnzoomin + // + this.btnzoomin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnzoomin.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnzoomin.Location = new System.Drawing.Point(313, 33); + this.btnzoomin.Name = "btnzoomin"; + this.btnzoomin.Size = new System.Drawing.Size(129, 56); + this.btnzoomin.TabIndex = 10; + this.btnzoomin.Text = "+"; + this.btnzoomin.UseVisualStyleBackColor = true; + this.btnzoomin.Click += new System.EventHandler(this.btnzoomin_Click); + // + // lblzoomlevel + // + this.lblzoomlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblzoomlevel.Location = new System.Drawing.Point(151, 33); + this.lblzoomlevel.Name = "lblzoomlevel"; + this.lblzoomlevel.Size = new System.Drawing.Size(156, 56); + this.lblzoomlevel.TabIndex = 1; + this.lblzoomlevel.Text = "1X"; + this.lblzoomlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label7 + // + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(6, 3); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(444, 23); + this.Label7.TabIndex = 0; + this.Label7.Text = "Magnifier Settings"; + this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlfloodfillsettings + // + this.pnlfloodfillsettings.Controls.Add(this.Label12); + this.pnlfloodfillsettings.Controls.Add(this.Label15); + this.pnlfloodfillsettings.Location = new System.Drawing.Point(162, 65); + this.pnlfloodfillsettings.Name = "pnlfloodfillsettings"; + this.pnlfloodfillsettings.Size = new System.Drawing.Size(71, 31); + this.pnlfloodfillsettings.TabIndex = 13; + this.pnlfloodfillsettings.Visible = false; + // + // Label12 + // + this.Label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label12.Location = new System.Drawing.Point(3, 28); + this.Label12.Name = "Label12"; + this.Label12.Size = new System.Drawing.Size(450, 51); + this.Label12.TabIndex = 11; + this.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label15 + // + this.Label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label15.Location = new System.Drawing.Point(6, 3); + this.Label15.Name = "Label15"; + this.Label15.Size = new System.Drawing.Size(444, 23); + this.Label15.TabIndex = 0; + this.Label15.Text = "Flood Fill Settings"; + this.Label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlsquaretoolsettings + // + this.pnlsquaretoolsettings.Controls.Add(this.Label19); + this.pnlsquaretoolsettings.Controls.Add(this.btnsquarefillonoff); + this.pnlsquaretoolsettings.Controls.Add(this.pnlsquarefillcolour); + this.pnlsquaretoolsettings.Controls.Add(this.txtsquareborderwidth); + this.pnlsquaretoolsettings.Controls.Add(this.Label16); + this.pnlsquaretoolsettings.Controls.Add(this.Label18); + this.pnlsquaretoolsettings.Controls.Add(this.Label17); + this.pnlsquaretoolsettings.Location = new System.Drawing.Point(16, 39); + this.pnlsquaretoolsettings.Name = "pnlsquaretoolsettings"; + this.pnlsquaretoolsettings.Size = new System.Drawing.Size(42, 31); + this.pnlsquaretoolsettings.TabIndex = 14; + this.pnlsquaretoolsettings.Visible = false; + // + // Label19 + // + this.Label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label19.Location = new System.Drawing.Point(211, 29); + this.Label19.Name = "Label19"; + this.Label19.Size = new System.Drawing.Size(244, 65); + this.Label19.TabIndex = 15; + this.Label19.Text = "Set a border width and turn fill on or off then draw the square on the canvas wit" + + "h the mouse. Click the fill colour box to set it to your currently selected colo" + + "ur."; + // + // btnsquarefillonoff + // + this.btnsquarefillonoff.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnsquarefillonoff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsquarefillonoff.Location = new System.Drawing.Point(150, 64); + this.btnsquarefillonoff.Name = "btnsquarefillonoff"; + this.btnsquarefillonoff.Size = new System.Drawing.Size(56, 28); + this.btnsquarefillonoff.TabIndex = 14; + this.btnsquarefillonoff.Text = "Fill OFF"; + this.btnsquarefillonoff.UseVisualStyleBackColor = true; + this.btnsquarefillonoff.Click += new System.EventHandler(this.btnsquarefillonoff_Click); + // + // pnlsquarefillcolour + // + this.pnlsquarefillcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlsquarefillcolour.Location = new System.Drawing.Point(109, 64); + this.pnlsquarefillcolour.Name = "pnlsquarefillcolour"; + this.pnlsquarefillcolour.Size = new System.Drawing.Size(34, 28); + this.pnlsquarefillcolour.TabIndex = 13; + this.pnlsquarefillcolour.Click += new System.EventHandler(this.pnlsquarefillcolour_Click); + // + // txtsquareborderwidth + // + this.txtsquareborderwidth.BackColor = System.Drawing.Color.White; + this.txtsquareborderwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtsquareborderwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtsquareborderwidth.ForeColor = System.Drawing.Color.Black; + this.txtsquareborderwidth.Location = new System.Drawing.Point(133, 33); + this.txtsquareborderwidth.Name = "txtsquareborderwidth"; + this.txtsquareborderwidth.Size = new System.Drawing.Size(73, 26); + this.txtsquareborderwidth.TabIndex = 12; + this.txtsquareborderwidth.TextChanged += new System.EventHandler(this.txtsquareborderwidth_TextChanged); + // + // Label16 + // + this.Label16.AutoSize = true; + this.Label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label16.Location = new System.Drawing.Point(4, 66); + this.Label16.Name = "Label16"; + this.Label16.Size = new System.Drawing.Size(100, 24); + this.Label16.TabIndex = 11; + this.Label16.Text = "Fill Colour:"; + // + // Label18 + // + this.Label18.AutoSize = true; + this.Label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label18.Location = new System.Drawing.Point(4, 33); + this.Label18.Name = "Label18"; + this.Label18.Size = new System.Drawing.Size(125, 24); + this.Label18.TabIndex = 10; + this.Label18.Text = "Border Width:"; + // + // Label17 + // + this.Label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label17.Location = new System.Drawing.Point(6, 3); + this.Label17.Name = "Label17"; + this.Label17.Size = new System.Drawing.Size(444, 23); + this.Label17.TabIndex = 0; + this.Label17.Text = "Rectangle Tool Settings"; + this.Label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlpixelplacersettings + // + this.pnlpixelplacersettings.Controls.Add(this.lblpixelplacerhelp); + this.pnlpixelplacersettings.Controls.Add(this.btnpixelplacermovementmode); + this.pnlpixelplacersettings.Controls.Add(this.Label8); + this.pnlpixelplacersettings.Location = new System.Drawing.Point(0, 1); + this.pnlpixelplacersettings.Name = "pnlpixelplacersettings"; + this.pnlpixelplacersettings.Size = new System.Drawing.Size(454, 98); + this.pnlpixelplacersettings.TabIndex = 7; + this.pnlpixelplacersettings.Visible = false; + // + // lblpixelplacerhelp + // + this.lblpixelplacerhelp.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblpixelplacerhelp.Location = new System.Drawing.Point(3, 26); + this.lblpixelplacerhelp.Name = "lblpixelplacerhelp"; + this.lblpixelplacerhelp.Size = new System.Drawing.Size(307, 67); + this.lblpixelplacerhelp.TabIndex = 11; + this.lblpixelplacerhelp.Text = "This tool does not contain any alterable settings. Simply click on the canvas and" + + " a pixel will be placed in the spot you click."; + this.lblpixelplacerhelp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnpixelplacermovementmode + // + this.btnpixelplacermovementmode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpixelplacermovementmode.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpixelplacermovementmode.Location = new System.Drawing.Point(312, 26); + this.btnpixelplacermovementmode.Name = "btnpixelplacermovementmode"; + this.btnpixelplacermovementmode.Size = new System.Drawing.Size(138, 67); + this.btnpixelplacermovementmode.TabIndex = 10; + this.btnpixelplacermovementmode.Text = "Activate Movement Mode"; + this.btnpixelplacermovementmode.UseVisualStyleBackColor = true; + this.btnpixelplacermovementmode.Click += new System.EventHandler(this.btnpixelplacermovementmode_Click); + // + // Label8 + // + this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label8.Location = new System.Drawing.Point(6, 3); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(444, 23); + this.Label8.TabIndex = 0; + this.Label8.Text = "Pixel Placer Settings"; + this.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlpencilsettings + // + this.pnlpencilsettings.Controls.Add(this.btnpencilsize3); + this.pnlpencilsettings.Controls.Add(this.btnpencilsize2); + this.pnlpencilsettings.Controls.Add(this.btnpencilsize1); + this.pnlpencilsettings.Controls.Add(this.Label14); + this.pnlpencilsettings.Location = new System.Drawing.Point(422, 13); + this.pnlpencilsettings.Name = "pnlpencilsettings"; + this.pnlpencilsettings.Size = new System.Drawing.Size(28, 22); + this.pnlpencilsettings.TabIndex = 12; + this.pnlpencilsettings.Visible = false; + // + // btnpencilsize3 + // + this.btnpencilsize3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpencilsize3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpencilsize3.Location = new System.Drawing.Point(298, 30); + this.btnpencilsize3.Name = "btnpencilsize3"; + this.btnpencilsize3.Size = new System.Drawing.Size(127, 54); + this.btnpencilsize3.TabIndex = 12; + this.btnpencilsize3.Text = "Thickest"; + this.btnpencilsize3.UseVisualStyleBackColor = true; + this.btnpencilsize3.Click += new System.EventHandler(this.ChangePencilSize); + // + // btnpencilsize2 + // + this.btnpencilsize2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpencilsize2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpencilsize2.Location = new System.Drawing.Point(165, 30); + this.btnpencilsize2.Name = "btnpencilsize2"; + this.btnpencilsize2.Size = new System.Drawing.Size(127, 54); + this.btnpencilsize2.TabIndex = 11; + this.btnpencilsize2.Text = "Thicker"; + this.btnpencilsize2.UseVisualStyleBackColor = true; + this.btnpencilsize2.Click += new System.EventHandler(this.ChangePencilSize); + // + // btnpencilsize1 + // + this.btnpencilsize1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpencilsize1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpencilsize1.Location = new System.Drawing.Point(30, 30); + this.btnpencilsize1.Name = "btnpencilsize1"; + this.btnpencilsize1.Size = new System.Drawing.Size(127, 54); + this.btnpencilsize1.TabIndex = 10; + this.btnpencilsize1.Text = "Thin"; + this.btnpencilsize1.UseVisualStyleBackColor = true; + this.btnpencilsize1.Click += new System.EventHandler(this.ChangePencilSize); + // + // Label14 + // + this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label14.Location = new System.Drawing.Point(6, 3); + this.Label14.Name = "Label14"; + this.Label14.Size = new System.Drawing.Size(444, 23); + this.Label14.TabIndex = 0; + this.Label14.Text = "Pencil Settings"; + this.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label6 + // + this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(13, 40); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(437, 49); + this.Label6.TabIndex = 9; + this.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(110, 13); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(269, 24); + this.Label5.TabIndex = 8; + this.Label5.Text = "No Tool Currently Selected!"; + // + // line5 + // + this.line5.BackColor = System.Drawing.Color.Black; + this.line5.Dock = System.Windows.Forms.DockStyle.Top; + this.line5.Location = new System.Drawing.Point(0, 0); + this.line5.Name = "line5"; + this.line5.Size = new System.Drawing.Size(456, 1); + this.line5.TabIndex = 4; + // + // line3 + // + this.line3.BackColor = System.Drawing.Color.Black; + this.line3.Dock = System.Windows.Forms.DockStyle.Right; + this.line3.Location = new System.Drawing.Point(456, 0); + this.line3.Name = "line3"; + this.line3.Size = new System.Drawing.Size(1, 100); + this.line3.TabIndex = 2; + // + // pnltools + // + this.pnltools.BackColor = System.Drawing.Color.White; + this.pnltools.Controls.Add(this.pnltoolpositioner); + this.pnltools.Controls.Add(this.line1); + this.pnltools.Controls.Add(this.pnltoolpreview); + this.pnltools.Dock = System.Windows.Forms.DockStyle.Left; + this.pnltools.Location = new System.Drawing.Point(0, 0); + this.pnltools.Name = "pnltools"; + this.pnltools.Size = new System.Drawing.Size(120, 598); + this.pnltools.TabIndex = 0; + // + // pnltoolpositioner + // + this.pnltoolpositioner.Controls.Add(this.btnpixelsetter); + this.pnltoolpositioner.Controls.Add(this.btnpixelplacer); + this.pnltoolpositioner.Controls.Add(this.btnpencil); + this.pnltoolpositioner.Controls.Add(this.btnfloodfill); + this.pnltoolpositioner.Controls.Add(this.btnoval); + this.pnltoolpositioner.Controls.Add(this.btnsquare); + this.pnltoolpositioner.Controls.Add(this.btnlinetool); + this.pnltoolpositioner.Controls.Add(this.btnpaintbrush); + this.pnltoolpositioner.Controls.Add(this.btntexttool); + this.pnltoolpositioner.Controls.Add(this.btneracer); + this.pnltoolpositioner.Controls.Add(this.btnnew); + this.pnltoolpositioner.Controls.Add(this.btnmagnify); + this.pnltoolpositioner.Controls.Add(this.btnopen); + this.pnltoolpositioner.Controls.Add(this.btnsave); + this.pnltoolpositioner.Controls.Add(this.btnundo); + this.pnltoolpositioner.Controls.Add(this.btnredo); + this.pnltoolpositioner.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnltoolpositioner.Location = new System.Drawing.Point(0, 0); + this.pnltoolpositioner.Name = "pnltoolpositioner"; + this.pnltoolpositioner.Size = new System.Drawing.Size(119, 498); + this.pnltoolpositioner.TabIndex = 2; + // + // btnpixelsetter + // + this.btnpixelsetter.FlatAppearance.BorderSize = 0; + this.btnpixelsetter.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpixelsetter.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpixelsetter.Location = new System.Drawing.Point(6, 6); + this.btnpixelsetter.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpixelsetter.Name = "btnpixelsetter"; + this.btnpixelsetter.Size = new System.Drawing.Size(50, 50); + this.btnpixelsetter.TabIndex = 2; + this.btnpixelsetter.UseVisualStyleBackColor = true; + this.btnpixelsetter.Click += new System.EventHandler(this.btnpixelsetter_Click); + // + // btnpixelplacer + // + this.btnpixelplacer.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadpixelplacer; + this.btnpixelplacer.FlatAppearance.BorderSize = 0; + this.btnpixelplacer.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpixelplacer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpixelplacer.Location = new System.Drawing.Point(62, 6); + this.btnpixelplacer.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpixelplacer.Name = "btnpixelplacer"; + this.btnpixelplacer.Size = new System.Drawing.Size(50, 50); + this.btnpixelplacer.TabIndex = 4; + this.btnpixelplacer.UseVisualStyleBackColor = true; + this.btnpixelplacer.Click += new System.EventHandler(this.btnpixelplacer_Click); + // + // btnpencil + // + this.btnpencil.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadpencil; + this.btnpencil.FlatAppearance.BorderSize = 0; + this.btnpencil.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpencil.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpencil.Location = new System.Drawing.Point(6, 62); + this.btnpencil.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpencil.Name = "btnpencil"; + this.btnpencil.Size = new System.Drawing.Size(50, 50); + this.btnpencil.TabIndex = 7; + this.btnpencil.Text = " "; + this.btnpencil.UseVisualStyleBackColor = true; + this.btnpencil.Click += new System.EventHandler(this.btnpencil_Click); + // + // btnfloodfill + // + this.btnfloodfill.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadfloodfill; + this.btnfloodfill.FlatAppearance.BorderSize = 0; + this.btnfloodfill.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnfloodfill.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnfloodfill.Location = new System.Drawing.Point(62, 62); + this.btnfloodfill.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnfloodfill.Name = "btnfloodfill"; + this.btnfloodfill.Size = new System.Drawing.Size(50, 50); + this.btnfloodfill.TabIndex = 11; + this.btnfloodfill.UseVisualStyleBackColor = true; + this.btnfloodfill.Click += new System.EventHandler(this.btnfill_Click); + // + // btnoval + // + this.btnoval.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadOval; + this.btnoval.FlatAppearance.BorderSize = 0; + this.btnoval.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnoval.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnoval.Location = new System.Drawing.Point(6, 118); + this.btnoval.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnoval.Name = "btnoval"; + this.btnoval.Size = new System.Drawing.Size(50, 50); + this.btnoval.TabIndex = 13; + this.btnoval.Text = " "; + this.btnoval.UseVisualStyleBackColor = true; + this.btnoval.Click += new System.EventHandler(this.btnoval_Click); + // + // btnsquare + // + this.btnsquare.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadRectangle; + this.btnsquare.FlatAppearance.BorderSize = 0; + this.btnsquare.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsquare.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsquare.Location = new System.Drawing.Point(62, 118); + this.btnsquare.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnsquare.Name = "btnsquare"; + this.btnsquare.Size = new System.Drawing.Size(50, 50); + this.btnsquare.TabIndex = 12; + this.btnsquare.Text = " "; + this.btnsquare.UseVisualStyleBackColor = true; + this.btnsquare.Click += new System.EventHandler(this.btnsquare_Click); + // + // btnlinetool + // + this.btnlinetool.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadlinetool; + this.btnlinetool.FlatAppearance.BorderSize = 0; + this.btnlinetool.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnlinetool.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnlinetool.Location = new System.Drawing.Point(6, 174); + this.btnlinetool.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnlinetool.Name = "btnlinetool"; + this.btnlinetool.Size = new System.Drawing.Size(50, 50); + this.btnlinetool.TabIndex = 15; + this.btnlinetool.Text = " "; + this.btnlinetool.UseVisualStyleBackColor = true; + this.btnlinetool.Click += new System.EventHandler(this.btnlinetool_Click); + // + // btnpaintbrush + // + this.btnpaintbrush.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadpaintbrush; + this.btnpaintbrush.FlatAppearance.BorderSize = 0; + this.btnpaintbrush.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpaintbrush.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpaintbrush.Location = new System.Drawing.Point(62, 174); + this.btnpaintbrush.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpaintbrush.Name = "btnpaintbrush"; + this.btnpaintbrush.Size = new System.Drawing.Size(50, 50); + this.btnpaintbrush.TabIndex = 17; + this.btnpaintbrush.Text = " "; + this.btnpaintbrush.UseVisualStyleBackColor = true; + this.btnpaintbrush.Click += new System.EventHandler(this.btnpaintbrush_Click); + // + // btntexttool + // + this.btntexttool.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadtexttool; + this.btntexttool.FlatAppearance.BorderSize = 0; + this.btntexttool.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntexttool.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btntexttool.Location = new System.Drawing.Point(6, 230); + this.btntexttool.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btntexttool.Name = "btntexttool"; + this.btntexttool.Size = new System.Drawing.Size(50, 50); + this.btntexttool.TabIndex = 16; + this.btntexttool.Text = " "; + this.btntexttool.UseVisualStyleBackColor = true; + this.btntexttool.Click += new System.EventHandler(this.btntexttool_Click); + // + // btneracer + // + this.btneracer.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPaderacer; + this.btneracer.FlatAppearance.BorderSize = 0; + this.btneracer.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btneracer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btneracer.Location = new System.Drawing.Point(62, 230); + this.btneracer.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btneracer.Name = "btneracer"; + this.btneracer.Size = new System.Drawing.Size(50, 50); + this.btneracer.TabIndex = 14; + this.btneracer.Text = " "; + this.btneracer.UseVisualStyleBackColor = true; + this.btneracer.Click += new System.EventHandler(this.btneracer_Click); + // + // btnnew + // + this.btnnew.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadnew; + this.btnnew.FlatAppearance.BorderSize = 0; + this.btnnew.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnnew.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnnew.Location = new System.Drawing.Point(6, 286); + this.btnnew.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnnew.Name = "btnnew"; + this.btnnew.Size = new System.Drawing.Size(50, 50); + this.btnnew.TabIndex = 6; + this.btnnew.Text = " "; + this.btnnew.UseVisualStyleBackColor = true; + this.btnnew.Click += new System.EventHandler(this.btnnew_Click); + // + // btnmagnify + // + this.btnmagnify.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadmagnify; + this.btnmagnify.FlatAppearance.BorderSize = 0; + this.btnmagnify.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmagnify.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnmagnify.Location = new System.Drawing.Point(62, 286); + this.btnmagnify.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnmagnify.Name = "btnmagnify"; + this.btnmagnify.Size = new System.Drawing.Size(50, 50); + this.btnmagnify.TabIndex = 3; + this.btnmagnify.Text = " "; + this.btnmagnify.UseVisualStyleBackColor = true; + this.btnmagnify.Click += new System.EventHandler(this.btnmagnify_Click); + // + // btnopen + // + this.btnopen.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadopen; + this.btnopen.FlatAppearance.BorderSize = 0; + this.btnopen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnopen.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnopen.Location = new System.Drawing.Point(6, 342); + this.btnopen.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnopen.Name = "btnopen"; + this.btnopen.Size = new System.Drawing.Size(50, 50); + this.btnopen.TabIndex = 10; + this.btnopen.Text = " "; + this.btnopen.UseVisualStyleBackColor = true; + this.btnopen.Click += new System.EventHandler(this.btnopen_Click); + // + // btnsave + // + this.btnsave.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadsave; + this.btnsave.FlatAppearance.BorderSize = 0; + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsave.Location = new System.Drawing.Point(62, 342); + this.btnsave.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(50, 50); + this.btnsave.TabIndex = 5; + this.btnsave.Text = " "; + this.btnsave.UseVisualStyleBackColor = true; + this.btnsave.Click += new System.EventHandler(this.btnsave_Click); + // + // btnundo + // + this.btnundo.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadundo; + this.btnundo.FlatAppearance.BorderSize = 0; + this.btnundo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnundo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnundo.Location = new System.Drawing.Point(6, 398); + this.btnundo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnundo.Name = "btnundo"; + this.btnundo.Size = new System.Drawing.Size(50, 50); + this.btnundo.TabIndex = 8; + this.btnundo.Text = " "; + this.btnundo.UseVisualStyleBackColor = true; + this.btnundo.Click += new System.EventHandler(this.btnundo_Click); + // + // btnredo + // + this.btnredo.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadredo; + this.btnredo.FlatAppearance.BorderSize = 0; + this.btnredo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnredo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnredo.Location = new System.Drawing.Point(62, 398); + this.btnredo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnredo.Name = "btnredo"; + this.btnredo.Size = new System.Drawing.Size(50, 50); + this.btnredo.TabIndex = 9; + this.btnredo.Text = " "; + this.btnredo.UseVisualStyleBackColor = true; + this.btnredo.Click += new System.EventHandler(this.btnredo_Click); + // + // line1 + // + this.line1.BackColor = System.Drawing.Color.Black; + this.line1.Dock = System.Windows.Forms.DockStyle.Right; + this.line1.Location = new System.Drawing.Point(119, 0); + this.line1.Name = "line1"; + this.line1.Size = new System.Drawing.Size(1, 498); + this.line1.TabIndex = 1; + // + // pnltoolpreview + // + this.pnltoolpreview.Controls.Add(this.Label13); + this.pnltoolpreview.Controls.Add(this.picpreview); + this.pnltoolpreview.Controls.Add(this.lbltoolselected); + this.pnltoolpreview.Controls.Add(this.line4); + this.pnltoolpreview.Controls.Add(this.line2); + this.pnltoolpreview.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnltoolpreview.Location = new System.Drawing.Point(0, 498); + this.pnltoolpreview.Name = "pnltoolpreview"; + this.pnltoolpreview.Size = new System.Drawing.Size(120, 100); + this.pnltoolpreview.TabIndex = 0; + // + // Label13 + // + this.Label13.BackColor = System.Drawing.Color.Transparent; + this.Label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label13.Location = new System.Drawing.Point(3, 79); + this.Label13.Name = "Label13"; + this.Label13.Size = new System.Drawing.Size(113, 21); + this.Label13.TabIndex = 6; + this.Label13.Text = "Preview"; + this.Label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // picpreview + // + this.picpreview.Location = new System.Drawing.Point(24, 27); + this.picpreview.Name = "picpreview"; + this.picpreview.Size = new System.Drawing.Size(70, 50); + this.picpreview.TabIndex = 5; + this.picpreview.TabStop = false; + // + // lbltoolselected + // + this.lbltoolselected.BackColor = System.Drawing.Color.Transparent; + this.lbltoolselected.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltoolselected.Location = new System.Drawing.Point(3, 3); + this.lbltoolselected.Name = "lbltoolselected"; + this.lbltoolselected.Size = new System.Drawing.Size(113, 21); + this.lbltoolselected.TabIndex = 4; + this.lbltoolselected.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // line4 + // + this.line4.BackColor = System.Drawing.Color.Black; + this.line4.Dock = System.Windows.Forms.DockStyle.Top; + this.line4.Location = new System.Drawing.Point(0, 0); + this.line4.Name = "line4"; + this.line4.Size = new System.Drawing.Size(119, 1); + this.line4.TabIndex = 3; + // + // line2 + // + this.line2.BackColor = System.Drawing.Color.Black; + this.line2.Dock = System.Windows.Forms.DockStyle.Right; + this.line2.Location = new System.Drawing.Point(119, 0); + this.line2.Name = "line2"; + this.line2.Size = new System.Drawing.Size(1, 100); + this.line2.TabIndex = 2; + // + // tmrcodepointcooldown + // + this.tmrcodepointcooldown.Interval = 10000; + // + // tmrshowearnedcodepoints + // + this.tmrshowearnedcodepoints.Interval = 3000; + // + // pullbs + // + this.pullbs.Interval = 1; + // + // pullbottom + // + this.pullbottom.Interval = 1; + // + // pullside + // + this.pullside.Interval = 1; + // + // tmrsetupui + // + this.tmrsetupui.Tick += new System.EventHandler(this.tmrsetupui_Tick); + // + // Artpad + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(802, 598); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MinimumSize = new System.Drawing.Size(502, 398); + this.Name = "Artpad"; + this.Text = "ArtPad"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Template_Load); + this.pgcontents.ResumeLayout(false); + this.pnldrawingbackground.ResumeLayout(false); + this.pnlinitialcanvassettings.ResumeLayout(false); + this.pnlinitialcanvassettings.PerformLayout(); + this.pnlpalletsize.ResumeLayout(false); + this.pnlpalletsize.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picdrawingdisplay)).EndInit(); + this.pnlbottompanel.ResumeLayout(false); + this.pnlpallet.ResumeLayout(false); + this.flowcolours.ResumeLayout(false); + this.pnltoolproperties.ResumeLayout(false); + this.pnltoolproperties.PerformLayout(); + this.pnlovaltoolsettings.ResumeLayout(false); + this.pnlovaltoolsettings.PerformLayout(); + this.pnleracertoolsettings.ResumeLayout(false); + this.pnleracertoolsettings.PerformLayout(); + this.pnllinetoolsettings.ResumeLayout(false); + this.pnllinetoolsettings.PerformLayout(); + this.pnlpaintbrushtoolsettings.ResumeLayout(false); + this.pnlpaintbrushtoolsettings.PerformLayout(); + this.pnltexttoolsettings.ResumeLayout(false); + this.pnltexttoolsettings.PerformLayout(); + this.pnlpixelsettersettings.ResumeLayout(false); + this.pnlpixelsettersettings.PerformLayout(); + this.pnlmagnifiersettings.ResumeLayout(false); + this.pnlfloodfillsettings.ResumeLayout(false); + this.pnlsquaretoolsettings.ResumeLayout(false); + this.pnlsquaretoolsettings.PerformLayout(); + this.pnlpixelplacersettings.ResumeLayout(false); + this.pnlpencilsettings.ResumeLayout(false); + this.pnltools.ResumeLayout(false); + this.pnltoolpositioner.ResumeLayout(false); + this.pnltoolpreview.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.picpreview)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Panel pnlbottompanel; + internal System.Windows.Forms.Panel pnltoolproperties; + internal System.Windows.Forms.Panel pnlpallet; + internal System.Windows.Forms.Panel line3; + internal System.Windows.Forms.Panel line5; + internal System.Windows.Forms.Panel line6; + internal System.Windows.Forms.Panel pnldrawingbackground; + internal System.Windows.Forms.PictureBox picdrawingdisplay; + internal System.Windows.Forms.Button btnpixelsetter; + internal System.Windows.Forms.Panel pnlpixelsettersettings; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Button btnpixelsettersetpixel; + internal System.Windows.Forms.TextBox txtpixelsetterycoordinate; + internal System.Windows.Forms.TextBox txtpixelsetterxcoordinate; + internal System.Windows.Forms.Button btnmagnify; + internal System.Windows.Forms.Panel colourpallet32; + internal System.Windows.Forms.Panel colourpallet31; + internal System.Windows.Forms.Panel colourpallet30; + internal System.Windows.Forms.Panel colourpallet29; + internal System.Windows.Forms.Panel colourpallet28; + internal System.Windows.Forms.Panel colourpallet26; + internal System.Windows.Forms.Panel colourpallet25; + internal System.Windows.Forms.Panel colourpallet23; + internal System.Windows.Forms.Panel colourpallet21; + internal System.Windows.Forms.Panel colourpallet19; + internal System.Windows.Forms.Panel colourpallet8; + internal System.Windows.Forms.Panel colourpallet6; + internal System.Windows.Forms.Panel colourpallet16; + internal System.Windows.Forms.Panel colourpallet14; + internal System.Windows.Forms.Panel colourpallet7; + internal System.Windows.Forms.Panel colourpallet5; + internal System.Windows.Forms.Panel colourpallet10; + internal System.Windows.Forms.Panel colourpallet9; + internal System.Windows.Forms.Panel colourpallet11; + internal System.Windows.Forms.Panel colourpallet12; + internal System.Windows.Forms.Panel colourpallet13; + internal System.Windows.Forms.Panel colourpallet15; + internal System.Windows.Forms.Panel colourpallet4; + internal System.Windows.Forms.Panel colourpallet3; + internal System.Windows.Forms.Panel colourpallet17; + internal System.Windows.Forms.Panel colourpallet18; + internal System.Windows.Forms.Panel colourpallet20; + internal System.Windows.Forms.Panel colourpallet22; + internal System.Windows.Forms.Panel colourpallet24; + internal System.Windows.Forms.Panel colourpallet2; + internal System.Windows.Forms.Panel colourpallet27; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Panel colourpallet1; + internal System.Windows.Forms.Panel pnlmagnifiersettings; + internal System.Windows.Forms.Button btnzoomin; + internal System.Windows.Forms.Label lblzoomlevel; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.Button btnzoomout; + internal System.Windows.Forms.Button btnpixelplacer; + internal System.Windows.Forms.Panel pnlpixelplacersettings; + internal System.Windows.Forms.Button btnpixelplacermovementmode; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.Label lblpixelplacerhelp; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Button btnnew; + internal System.Windows.Forms.FlowLayoutPanel flowcolours; + internal System.Windows.Forms.Button btnpencil; + internal System.Windows.Forms.Panel pnlpencilsettings; + internal System.Windows.Forms.Button btnpencilsize3; + internal System.Windows.Forms.Button btnpencilsize2; + internal System.Windows.Forms.Button btnpencilsize1; + internal System.Windows.Forms.Label Label14; + internal System.Windows.Forms.Button btnfloodfill; + internal System.Windows.Forms.Panel pnlfloodfillsettings; + internal System.Windows.Forms.Label Label12; + internal System.Windows.Forms.Label Label15; + internal System.Windows.Forms.Button btnsquare; + internal System.Windows.Forms.Panel pnlsquaretoolsettings; + internal System.Windows.Forms.TextBox txtsquareborderwidth; + internal System.Windows.Forms.Label Label16; + internal System.Windows.Forms.Label Label18; + internal System.Windows.Forms.Label Label17; + internal System.Windows.Forms.Button btnsquarefillonoff; + internal System.Windows.Forms.Panel pnlsquarefillcolour; + internal System.Windows.Forms.Label Label19; + internal System.Windows.Forms.Button btnoval; + internal System.Windows.Forms.Panel pnlovaltoolsettings; + internal System.Windows.Forms.Label Label20; + internal System.Windows.Forms.Button btnovalfillonoff; + internal System.Windows.Forms.Panel pnlovalfillcolour; + internal System.Windows.Forms.TextBox txtovalborderwidth; + internal System.Windows.Forms.Label Label21; + internal System.Windows.Forms.Label Label22; + internal System.Windows.Forms.Label Label23; + internal System.Windows.Forms.Panel pnltools; + internal System.Windows.Forms.FlowLayoutPanel pnltoolpositioner; + internal System.Windows.Forms.Panel line1; + internal System.Windows.Forms.Panel pnltoolpreview; + internal System.Windows.Forms.Label Label13; + internal System.Windows.Forms.PictureBox picpreview; + internal System.Windows.Forms.Label lbltoolselected; + internal System.Windows.Forms.Panel line4; + internal System.Windows.Forms.Panel line2; + internal System.Windows.Forms.Button btnopen; + internal System.Windows.Forms.Button btnsave; + internal System.Windows.Forms.Button btnundo; + internal System.Windows.Forms.Button btnredo; + internal System.Windows.Forms.Button btneracer; + internal System.Windows.Forms.Button btnlinetool; + internal System.Windows.Forms.Panel pnllinetoolsettings; + internal System.Windows.Forms.Label Label29; + internal System.Windows.Forms.TextBox txtlinewidth; + internal System.Windows.Forms.Label Label30; + internal System.Windows.Forms.Label Label31; + internal System.Windows.Forms.Panel pnleracertoolsettings; + internal System.Windows.Forms.Label Label28; + internal System.Windows.Forms.Button btneracersquare; + internal System.Windows.Forms.Button btneracercircle; + internal System.Windows.Forms.Label Label24; + internal System.Windows.Forms.TextBox txteracersize; + internal System.Windows.Forms.Label Label26; + internal System.Windows.Forms.Label Label27; + internal System.Windows.Forms.Button btntexttool; + internal System.Windows.Forms.Button btnpaintbrush; + internal System.Windows.Forms.Panel pnltexttoolsettings; + internal System.Windows.Forms.Label Label25; + internal System.Windows.Forms.TextBox txtdrawtextsize; + internal System.Windows.Forms.Label Label32; + internal System.Windows.Forms.Label Label33; + internal System.Windows.Forms.Label Label34; + internal System.Windows.Forms.ComboBox combodrawtextfont; + internal System.Windows.Forms.TextBox txtdrawstringtext; + internal System.Windows.Forms.ComboBox combofontstyle; + internal System.Windows.Forms.Label Label35; + internal System.Windows.Forms.Panel pnlpaintbrushtoolsettings; + internal System.Windows.Forms.Label Label36; + internal System.Windows.Forms.Button btnpaintsquareshape; + internal System.Windows.Forms.Button btnpaintcircleshape; + internal System.Windows.Forms.Label Label37; + internal System.Windows.Forms.TextBox txtpaintbrushsize; + internal System.Windows.Forms.Label Label38; + internal System.Windows.Forms.Label Label39; + internal System.Windows.Forms.Timer tmrcodepointcooldown; + internal System.Windows.Forms.Timer tmrshowearnedcodepoints; + internal System.Windows.Forms.Panel pnlpalletsize; + internal System.Windows.Forms.Button btnchangesizecancel; + internal System.Windows.Forms.Button btnsetsize; + internal System.Windows.Forms.TextBox txtcolorpalletheight; + internal System.Windows.Forms.Label Label42; + internal System.Windows.Forms.TextBox txtcolorpalletwidth; + internal System.Windows.Forms.Label Label43; + internal System.Windows.Forms.Panel pnlinitialcanvassettings; + internal System.Windows.Forms.Button btncancel; + internal System.Windows.Forms.Button btncreate; + internal System.Windows.Forms.Label Label11; + internal System.Windows.Forms.Label lbltotalpixels; + internal System.Windows.Forms.TextBox txtnewcanvasheight; + internal System.Windows.Forms.Label Label10; + internal System.Windows.Forms.TextBox txtnewcanvaswidth; + internal System.Windows.Forms.Label Label9; + internal System.Windows.Forms.Panel colourpallet33; + internal System.Windows.Forms.Panel colourpallet34; + internal System.Windows.Forms.Panel colourpallet35; + internal System.Windows.Forms.Panel colourpallet36; + internal System.Windows.Forms.Panel colourpallet37; + internal System.Windows.Forms.Panel colourpallet38; + internal System.Windows.Forms.Panel colourpallet39; + internal System.Windows.Forms.Panel colourpallet40; + internal System.Windows.Forms.Panel colourpallet41; + internal System.Windows.Forms.Panel colourpallet42; + internal System.Windows.Forms.Panel colourpallet43; + internal System.Windows.Forms.Panel colourpallet44; + internal System.Windows.Forms.Panel colourpallet45; + internal System.Windows.Forms.Panel colourpallet46; + internal System.Windows.Forms.Panel colourpallet47; + internal System.Windows.Forms.Panel colourpallet48; + internal System.Windows.Forms.Panel colourpallet49; + internal System.Windows.Forms.Panel colourpallet50; + internal System.Windows.Forms.Panel colourpallet51; + internal System.Windows.Forms.Panel colourpallet52; + internal System.Windows.Forms.Panel colourpallet53; + internal System.Windows.Forms.Panel colourpallet54; + internal System.Windows.Forms.Panel colourpallet55; + internal System.Windows.Forms.Panel colourpallet56; + internal System.Windows.Forms.Panel colourpallet57; + internal System.Windows.Forms.Panel colourpallet58; + internal System.Windows.Forms.Panel colourpallet59; + internal System.Windows.Forms.Panel colourpallet60; + internal System.Windows.Forms.Panel colourpallet61; + internal System.Windows.Forms.Panel colourpallet62; + internal System.Windows.Forms.Panel colourpallet63; + internal System.Windows.Forms.Panel colourpallet64; + internal System.Windows.Forms.Panel colourpallet65; + internal System.Windows.Forms.Panel colourpallet66; + internal System.Windows.Forms.Panel colourpallet67; + internal System.Windows.Forms.Panel colourpallet68; + internal System.Windows.Forms.Panel colourpallet69; + internal System.Windows.Forms.Panel colourpallet70; + internal System.Windows.Forms.Panel colourpallet71; + internal System.Windows.Forms.Panel colourpallet72; + internal System.Windows.Forms.Panel colourpallet73; + internal System.Windows.Forms.Panel colourpallet74; + internal System.Windows.Forms.Panel colourpallet75; + internal System.Windows.Forms.Panel colourpallet76; + internal System.Windows.Forms.Panel colourpallet77; + internal System.Windows.Forms.Panel colourpallet78; + internal System.Windows.Forms.Panel colourpallet79; + internal System.Windows.Forms.Panel colourpallet80; + internal System.Windows.Forms.Panel colourpallet81; + internal System.Windows.Forms.Panel colourpallet82; + internal System.Windows.Forms.Panel colourpallet83; + internal System.Windows.Forms.Panel colourpallet84; + internal System.Windows.Forms.Panel colourpallet85; + internal System.Windows.Forms.Panel colourpallet86; + internal System.Windows.Forms.Panel colourpallet87; + internal System.Windows.Forms.Panel colourpallet88; + internal System.Windows.Forms.Panel colourpallet89; + internal System.Windows.Forms.Panel colourpallet90; + internal System.Windows.Forms.Panel colourpallet91; + internal System.Windows.Forms.Panel colourpallet92; + internal System.Windows.Forms.Panel colourpallet93; + internal System.Windows.Forms.Panel colourpallet94; + internal System.Windows.Forms.Panel colourpallet95; + internal System.Windows.Forms.Panel colourpallet96; + internal System.Windows.Forms.Panel colourpallet97; + internal System.Windows.Forms.Panel colourpallet98; + internal System.Windows.Forms.Panel colourpallet99; + internal System.Windows.Forms.Panel colourpallet100; + internal System.Windows.Forms.Panel colourpallet101; + internal System.Windows.Forms.Panel colourpallet102; + internal System.Windows.Forms.Panel colourpallet103; + internal System.Windows.Forms.Panel colourpallet104; + internal System.Windows.Forms.Panel colourpallet105; + internal System.Windows.Forms.Panel colourpallet106; + internal System.Windows.Forms.Panel colourpallet107; + internal System.Windows.Forms.Panel colourpallet108; + internal System.Windows.Forms.Panel colourpallet109; + internal System.Windows.Forms.Panel colourpallet110; + internal System.Windows.Forms.Panel colourpallet111; + internal System.Windows.Forms.Panel colourpallet112; + internal System.Windows.Forms.Panel colourpallet113; + internal System.Windows.Forms.Panel colourpallet114; + internal System.Windows.Forms.Panel colourpallet115; + internal System.Windows.Forms.Panel colourpallet116; + internal System.Windows.Forms.Panel colourpallet117; + internal System.Windows.Forms.Panel colourpallet118; + internal System.Windows.Forms.Panel colourpallet119; + internal System.Windows.Forms.Panel colourpallet120; + internal System.Windows.Forms.Panel colourpallet121; + internal System.Windows.Forms.Panel colourpallet122; + internal System.Windows.Forms.Panel colourpallet123; + internal System.Windows.Forms.Panel colourpallet124; + internal System.Windows.Forms.Panel colourpallet125; + internal System.Windows.Forms.Panel colourpallet126; + internal System.Windows.Forms.Panel colourpallet127; + internal System.Windows.Forms.Panel colourpallet128; + internal System.Windows.Forms.TextBox txttopspace; + internal System.Windows.Forms.Label Label40; + internal System.Windows.Forms.TextBox txtsidespace; + internal System.Windows.Forms.Label Label41; + internal System.Windows.Forms.Timer pullbs; + internal System.Windows.Forms.Timer pullbottom; + internal System.Windows.Forms.Timer pullside; + private System.Windows.Forms.Timer tmrsetupui; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Artpad.cs b/source/WindowsFormsApplication1/Apps/Artpad.cs new file mode 100644 index 0000000..c393ae0 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Artpad.cs @@ -0,0 +1,1783 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Drawing.Text; +using System.Drawing.Imaging; +using System.Drawing.Drawing2D; + +namespace ShiftOS +{ + public partial class Artpad : Form + { + /// + /// Artpad's GUI. + /// + public Artpad() + { + InitializeComponent(); + } + + #region Variables + + public int rolldownsize; + public int oldbordersize; + public int oldtitlebarheight; + public bool justopened = false; + public bool needtorollback = false; + public int minimumsizewidth = 502; + + public int minimumsizeheight = 398; + public int codepointsearned; + public bool codepointscooldown = false; + + public bool needtosave = false; + int canvaswidth = 150; + int canvasheight = 100; + public Bitmap canvasbitmap; + + Color canvascolor = Color.White; + + Bitmap previewcanvasbitmap; + int magnificationlevel = 1; + Rectangle magnifyRect; + Graphics graphicsbitmap; + public Color drawingcolour = Color.Black; + string selectedtool = "Pixel Setter"; + bool pixalplacermovable = false; + public string savelocation; + System.Drawing.Drawing2D.GraphicsPath mousePath = new System.Drawing.Drawing2D.GraphicsPath(); + int pencilwidth = 1; + undo undo = new undo(); + Point thisPoint; + int eracerwidth = 15; + + string eracertype = "square"; + int paintbrushwidth = 15; + + string paintbrushtype = "circle"; + float rectanglestartpointx; + float rectanglestartpointy; + bool currentlydrawingsquare; + int squarewidth = 1; + bool squarefillon = false; + + Color fillsquarecolor = Color.Black; + float ovalstartpointx; + float ovalstartpointy; + bool currentlydrawingoval; + int ovalwidth = 2; + bool ovalfillon = false; + + Color fillovalcolor = Color.Black; + float linestartpointx; + float linestartpointy; + bool currentlydrawingline; + + int linewidth = 2; + bool currentlydrawingtext; + System.Drawing.Font drawtextfont = new System.Drawing.Font("Microsoft Sans Serif", 16); + int drawtextsize; + string drawtextfontname; + + FontStyle drawtextfontstyle; + + #endregion + + #region Setup + + private void Template_Load(object sender, EventArgs e) + { + justopened = true; + this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; + this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; + + setuppreview(); + settoolcolours(); + loadcolors(); + AddFonts(); + setuptoolbox(); + determinevisiblepallets(); + tmrsetupui.Start(); + } + + + + public void setupcanvas() + { + canvasbitmap = new Bitmap(canvaswidth, canvasheight); + previewcanvasbitmap = new Bitmap(canvaswidth, canvasheight); + picdrawingdisplay.Size = new Size(canvaswidth, canvasheight); + picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth) / 2, (pnldrawingbackground.Height - canvasheight) / 2); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + SolidBrush canvasbrush = new SolidBrush(canvascolor); + graphicsbitmap.FillRectangle(canvasbrush, 0, 0, canvaswidth, canvasheight); + magnificationlevel = 1; + lblzoomlevel.Text = magnificationlevel + "X"; + setuppreview(); + needtosave = false; + } + + public void setuptoolbox() + { + btnpixelplacer.Hide(); + btnpencil.Hide(); + btnfloodfill.Hide(); + btnoval.Hide(); + btnsquare.Hide(); + btnlinetool.Hide(); + btnpaintbrush.Hide(); + btntexttool.Hide(); + btneracer.Hide(); + btnnew.Hide(); + btnopen.Hide(); + btnsave.Hide(); + btnundo.Hide(); + btnredo.Hide(); + btnpixelplacermovementmode.Hide(); + + if (API.Upgrades["artpadpixelplacer"] == true) + btnpixelplacer.Show(); + if (API.Upgrades["artpadpencil"] == true) + btnpencil.Show(); + if (API.Upgrades["artpadfilltool"] == true) + btnfloodfill.Show(); + if (API.Upgrades["artpadovaltool"] == true) + btnoval.Show(); + if (API.Upgrades["artpadrectangletool"] == true) + btnsquare.Show(); + if (API.Upgrades["artpadlinetool"] == true) + btnlinetool.Show(); + if (API.Upgrades["artpadpaintbrush"] == true) + btnpaintbrush.Show(); + if (API.Upgrades["artpadtexttool"] == true) + btntexttool.Show(); + if (API.Upgrades["artpaderaser"] == true) + btneracer.Show(); + if (API.Upgrades["artpadnew"] == true) + btnnew.Show(); + if (API.Upgrades["artpadload"] == true) + btnopen.Show(); + if (API.Upgrades["artpadsave"] == true) + btnsave.Show(); + if (API.Upgrades["artpadundo"] == true) + btnundo.Show(); + if (API.Upgrades["artpadredo"] == true) + btnredo.Show(); + if (API.Upgrades["artpadppmovementmode"] == true) + btnpixelplacermovementmode.Show(); + + } + + private void AddFonts() + { + // Get the installed fonts collection. + InstalledFontCollection allFonts = new InstalledFontCollection(); + + // Get an array of the system's font familiies. + FontFamily[] fontFamilies = allFonts.Families; + + // Display the font families. + foreach (FontFamily myFont in fontFamilies) + { + combodrawtextfont.Items.Add(myFont.Name); + } + //font_family + + combodrawtextfont.SelectedItem = combodrawtextfont.Items[1]; + combofontstyle.Text = "Regular"; + txtdrawtextsize.Text = "16"; + } + + #endregion + + #region General + + // ERROR: Handles clauses are not supported in C# + private void btnpixelsetter_Click(object sender, EventArgs e) + { + selectedtool = "Pixel Setter"; + gettoolsettings(pnlpixelsettersettings); + } + + private void gettoolsettings(Panel toolpanel) + { + //hide all properties panels + pnlpixelsettersettings.Hide(); + pnlmagnifiersettings.Hide(); + + //show chosen panel + toolpanel.Dock = DockStyle.Fill; + toolpanel.BringToFront(); + toolpanel.Show(); + + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpixelsettersetpixel_Click(object sender, EventArgs e) + { + try + { + undo.undoStack.Push((Image)canvasbitmap.Clone()); + undo.redoStack.Clear(); + canvasbitmap.SetPixel(Convert.ToInt32(txtpixelsetterxcoordinate.Text), Convert.ToInt32(txtpixelsetterycoordinate.Text), drawingcolour); + picdrawingdisplay.Invalidate(); + } + catch + { + API.CreateInfoboxSession("ArtPad - Placement Error!", "You have specified invalid coordinates for the pixel setter." + Environment.NewLine + Environment.NewLine + "Remember that the top left pixel has the coordinates 0, 0", infobox.InfoboxMode.Info); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnmagnify_Click(object sender, EventArgs e) + { + selectedtool = "Magnifier"; + gettoolsettings(pnlmagnifiersettings); + } + + #endregion + + #region Drawing Display + + // ERROR: Handles clauses are not supported in C# + private void picdrawingdisplay_Paint(object sender, System.Windows.Forms.PaintEventArgs e) + { + e.Graphics.FillRectangle(Brushes.White, 0, 0, canvaswidth * magnificationlevel, canvasheight * magnificationlevel); + e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor; + e.Graphics.PixelOffsetMode = PixelOffsetMode.Half; + e.Graphics.ScaleTransform(magnificationlevel, magnificationlevel); + + if (currentlydrawingsquare == true) + { + GC.Collect(); + Graphics g = Graphics.FromImage(previewcanvasbitmap); + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + g = Graphics.FromImage(previewcanvasbitmap); + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), squarewidth); + var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillsquarecolor)); + RectangleF rectdraw = new RectangleF(rectanglestartpointx, rectanglestartpointy, thisPoint.X - rectanglestartpointx, thisPoint.Y - rectanglestartpointy); + int heightamount; + int widthamount; + if (rectdraw.Height < 0) + heightamount = (int)Math.Abs(rectdraw.Height); + else + heightamount = 0; + if (rectdraw.Width < 0) + widthamount = (int)Math.Abs(rectdraw.Width); + else + widthamount = 0; + if (squarewidth > 0) + { + g.DrawRectangle(CurrentPen, rectdraw.X - widthamount, rectdraw.Y - heightamount, Math.Abs(rectdraw.Width), Math.Abs(rectdraw.Height)); + } + if (squarefillon == true) + { + float correctionamount = squarewidth / 2; + int addfillamount; + if (squarewidth > 0) + addfillamount = squarewidth; + else + addfillamount = -1; + g.FillRectangle(CurrentBrush, (rectdraw.X - widthamount) + correctionamount, (rectdraw.Y - heightamount) + correctionamount, Math.Abs(rectdraw.Width) - addfillamount, Math.Abs(rectdraw.Height) - addfillamount); + } + } + + if (currentlydrawingoval == true) + { + GC.Collect(); + Graphics g = Graphics.FromImage(previewcanvasbitmap); + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + g = Graphics.FromImage(previewcanvasbitmap); + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), ovalwidth); + var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillovalcolor)); + RectangleF ovaldraw = new RectangleF(ovalstartpointx, ovalstartpointy, thisPoint.X - ovalstartpointx, thisPoint.Y - ovalstartpointy); + int heightamount; + int widthamount; + if (ovaldraw.Height < 0) + heightamount = (int)Math.Abs(ovaldraw.Height); + else + heightamount = 0; + if (ovaldraw.Width < 0) + widthamount = (int)Math.Abs(ovaldraw.Width); + else + widthamount = 0; + if (ovalwidth > 0) + { + g.DrawEllipse(CurrentPen, ovaldraw.X - widthamount, ovaldraw.Y - heightamount, Math.Abs(ovaldraw.Width), Math.Abs(ovaldraw.Height)); + } + if (ovalfillon == true) + { + g.FillEllipse(CurrentBrush, (ovaldraw.X - widthamount), (ovaldraw.Y - heightamount), Math.Abs(ovaldraw.Width), Math.Abs(ovaldraw.Height)); + } + } + + if (currentlydrawingline == true) + { + GC.Collect(); + Graphics g = Graphics.FromImage(previewcanvasbitmap); + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + g = Graphics.FromImage(previewcanvasbitmap); + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), linewidth); + g.DrawLine(CurrentPen, linestartpointx, linestartpointy, thisPoint.X, thisPoint.Y); + } + + if (currentlydrawingtext == true) + { + GC.Collect(); + Graphics g = Graphics.FromImage(previewcanvasbitmap); + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + g = Graphics.FromImage(previewcanvasbitmap); + var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + g.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit; + drawtextfont = new System.Drawing.Font(drawtextfontname, drawtextsize, drawtextfontstyle); + g.DrawString(txtdrawstringtext.Text, drawtextfont, CurrentBrush, thisPoint.X, thisPoint.Y); + } + try + { + e.Graphics.DrawImage(canvasbitmap, 0, 0); + e.Graphics.DrawImage(previewcanvasbitmap, 0, 0); + } + catch + { + + } + } + + + + // ERROR: Handles clauses are not supported in C# + private void picdrawingdisplay_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) + { + undo.undoStack.Push((Image)canvasbitmap.Clone()); + undo.redoStack.Clear(); + + + thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + + if (selectedtool == "Pixel Placer") + { + if (e.Button == MouseButtons.Left) + { + if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) + { + if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) + { + canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour); + //set the pixel on the canvas + picdrawingdisplay.Invalidate(); + //refresh the picture from the canvas + } + } + } + } + + if (selectedtool == "Pencil") + { + if (e.Button == MouseButtons.Left) + { + mousePath.StartFigure(); + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Flood Fill") + { + if (e.Button == MouseButtons.Left) + { + if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) + { + if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) + { + SafeFloodFill(canvasbitmap, thisPoint.X, thisPoint.Y, drawingcolour); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + picdrawingdisplay.Invalidate(); + } + } + } + } + + if (selectedtool == "Square Tool") + { + if (e.Button == MouseButtons.Left) + { + rectanglestartpointx = thisPoint.X; + rectanglestartpointy = thisPoint.Y; + currentlydrawingsquare = true; + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Oval Tool") + { + if (e.Button == MouseButtons.Left) + { + ovalstartpointx = thisPoint.X; + ovalstartpointy = thisPoint.Y; + currentlydrawingoval = true; + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Line Tool") + { + if (e.Button == MouseButtons.Left) + { + linestartpointx = thisPoint.X; + linestartpointy = thisPoint.Y; + currentlydrawingline = true; + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Text Tool") + { + if (e.Button == MouseButtons.Left) + { + currentlydrawingtext = true; + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Eracer") + { + var CurrentPen = new Pen(Color.FromArgb(255, canvascolor), eracerwidth); + float halfsize = eracerwidth / 2; + if (eracertype == "circle") + { + graphicsbitmap.DrawEllipse(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); + } + else { + graphicsbitmap.DrawRectangle(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); + } + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Paint Brush") + { + var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + float halfsize = paintbrushwidth / 2; + if (paintbrushtype == "circle") + { + graphicsbitmap.FillEllipse(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); + } + else { + graphicsbitmap.FillRectangle(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); + } + picdrawingdisplay.Invalidate(); + CurrentBrush.Dispose(); + } + preparecooldown(); + } + + // ERROR: Handles clauses are not supported in C# + private void picdrawingdisplay_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) + { + Point lastpoint; + + thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + + + if (e.Button == MouseButtons.Left) + { + undo.redoStack.Clear(); + lastpoint = thisPoint; + preparecooldown(); + + if (selectedtool == "Pixel Placer" && pixalplacermovable == true) + { + if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) + { + if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) + { + canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour); + //set the pixel on the canvas + picdrawingdisplay.Invalidate(); + //refresh the picture from the canvas + } + } + } + + if (selectedtool == "Pencil") + { + mousePath.AddLine(thisPoint.X, thisPoint.Y, thisPoint.X, thisPoint.Y); + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), pencilwidth); + graphicsbitmap.DrawPath(CurrentPen, mousePath); + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Square Tool") + { + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Oval Tool") + { + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Line Tool") + { + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Text Tool") + { + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Eracer") + { + var CurrentPen = new Pen(Color.FromArgb(255, canvascolor), eracerwidth); + float halfsize = eracerwidth / 2; + if (eracertype == "circle") + { + graphicsbitmap.DrawEllipse(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); + } + else { + graphicsbitmap.DrawRectangle(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); + } + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Paint Brush") + { + var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + float halfsize = paintbrushwidth / 2; + if (paintbrushtype == "circle") + { + graphicsbitmap.FillEllipse(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); + } + else { + graphicsbitmap.FillRectangle(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); + } + picdrawingdisplay.Invalidate(); + } + } + + } + + + // ERROR: Handles clauses are not supported in C# + private void picdrawingdisplay_MouseUp(object sender, MouseEventArgs e) + { + thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + + if (selectedtool == "Pencil") + { + if (e.Button == MouseButtons.Left) + { + mousePath.Reset(); + } + } + + if (selectedtool == "Square Tool") + { + picdrawingdisplay.Invalidate(); + currentlydrawingsquare = false; + } + + if (selectedtool == "Oval Tool") + { + picdrawingdisplay.Invalidate(); + currentlydrawingoval = false; + } + + + if (selectedtool == "Line Tool") + { + picdrawingdisplay.Invalidate(); + currentlydrawingline = false; + } + + if (selectedtool == "Text Tool") + { + picdrawingdisplay.Invalidate(); + currentlydrawingtext = false; + } + + using (Graphics g = Graphics.FromImage(canvasbitmap)) + { + g.DrawImage(previewcanvasbitmap, 0, 0); + } + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + picdrawingdisplay.Invalidate(); + preparecooldown(); + + } + + #endregion + + #region Color Palettes + // ERROR: Handles clauses are not supported in C# + private void colourpallet1_MouseClick(object sender, MouseEventArgs e) + { + var s = (Control)sender; + if (e.Button == MouseButtons.Left) + { + drawingcolour = s.BackColor; + setuppreview(); + settoolcolours(); + } + else { + API.CreateColorPickerSession("Artpad Pallete Color", s.BackColor); + API.ColorPickerSession.FormClosing += (object se, FormClosingEventArgs a) => + { + s.BackColor = API.GetLastColorFromSession(); + }; + } + } + + // + public void loadcolors() + { + /*bool allwhite = true; + for (int i = 0; i <= 127; i++) + { + if (ShiftOSDesktop.artpadcolourpallets(i) == null) + { + } + else { + allwhite = false; + } + } + if (allwhite == true) + { + for (i = 0; i <= 127; i++) + { + ShiftOSDesktop.artpadcolourpallets(i) = Color.Black; + } + } + colourpallet1.BackColor = ShiftOSDesktop.artpadcolourpallets(0); + colourpallet2.BackColor = ShiftOSDesktop.artpadcolourpallets(1); + colourpallet3.BackColor = ShiftOSDesktop.artpadcolourpallets(2); + colourpallet4.BackColor = ShiftOSDesktop.artpadcolourpallets(3); + colourpallet5.BackColor = ShiftOSDesktop.artpadcolourpallets(4); + colourpallet6.BackColor = ShiftOSDesktop.artpadcolourpallets(5); + colourpallet7.BackColor = ShiftOSDesktop.artpadcolourpallets(6); + colourpallet8.BackColor = ShiftOSDesktop.artpadcolourpallets(7); + colourpallet9.BackColor = ShiftOSDesktop.artpadcolourpallets(8); + colourpallet10.BackColor = ShiftOSDesktop.artpadcolourpallets(9); + colourpallet11.BackColor = ShiftOSDesktop.artpadcolourpallets(10); + colourpallet12.BackColor = ShiftOSDesktop.artpadcolourpallets(11); + colourpallet13.BackColor = ShiftOSDesktop.artpadcolourpallets(12); + colourpallet14.BackColor = ShiftOSDesktop.artpadcolourpallets(13); + colourpallet15.BackColor = ShiftOSDesktop.artpadcolourpallets(14); + colourpallet16.BackColor = ShiftOSDesktop.artpadcolourpallets(15); + colourpallet17.BackColor = ShiftOSDesktop.artpadcolourpallets(16); + colourpallet18.BackColor = ShiftOSDesktop.artpadcolourpallets(17); + colourpallet19.BackColor = ShiftOSDesktop.artpadcolourpallets(18); + colourpallet20.BackColor = ShiftOSDesktop.artpadcolourpallets(19); + colourpallet21.BackColor = ShiftOSDesktop.artpadcolourpallets(20); + colourpallet22.BackColor = ShiftOSDesktop.artpadcolourpallets(21); + colourpallet23.BackColor = ShiftOSDesktop.artpadcolourpallets(22); + colourpallet24.BackColor = ShiftOSDesktop.artpadcolourpallets(23); + colourpallet25.BackColor = ShiftOSDesktop.artpadcolourpallets(24); + colourpallet26.BackColor = ShiftOSDesktop.artpadcolourpallets(25); + colourpallet27.BackColor = ShiftOSDesktop.artpadcolourpallets(26); + colourpallet28.BackColor = ShiftOSDesktop.artpadcolourpallets(27); + colourpallet29.BackColor = ShiftOSDesktop.artpadcolourpallets(28); + colourpallet30.BackColor = ShiftOSDesktop.artpadcolourpallets(29); + colourpallet31.BackColor = ShiftOSDesktop.artpadcolourpallets(30); + colourpallet32.BackColor = ShiftOSDesktop.artpadcolourpallets(31); + colourpallet33.BackColor = ShiftOSDesktop.artpadcolourpallets(32); + colourpallet34.BackColor = ShiftOSDesktop.artpadcolourpallets(33); + colourpallet35.BackColor = ShiftOSDesktop.artpadcolourpallets(34); + colourpallet36.BackColor = ShiftOSDesktop.artpadcolourpallets(35); + colourpallet37.BackColor = ShiftOSDesktop.artpadcolourpallets(36); + colourpallet38.BackColor = ShiftOSDesktop.artpadcolourpallets(37); + colourpallet39.BackColor = ShiftOSDesktop.artpadcolourpallets(38); + colourpallet40.BackColor = ShiftOSDesktop.artpadcolourpallets(39); + colourpallet41.BackColor = ShiftOSDesktop.artpadcolourpallets(40); + colourpallet42.BackColor = ShiftOSDesktop.artpadcolourpallets(41); + colourpallet43.BackColor = ShiftOSDesktop.artpadcolourpallets(42); + colourpallet44.BackColor = ShiftOSDesktop.artpadcolourpallets(43); + colourpallet45.BackColor = ShiftOSDesktop.artpadcolourpallets(44); + colourpallet46.BackColor = ShiftOSDesktop.artpadcolourpallets(45); + colourpallet47.BackColor = ShiftOSDesktop.artpadcolourpallets(46); + colourpallet48.BackColor = ShiftOSDesktop.artpadcolourpallets(47); + colourpallet49.BackColor = ShiftOSDesktop.artpadcolourpallets(48); + colourpallet50.BackColor = ShiftOSDesktop.artpadcolourpallets(49); + colourpallet51.BackColor = ShiftOSDesktop.artpadcolourpallets(50); + colourpallet52.BackColor = ShiftOSDesktop.artpadcolourpallets(51); + colourpallet53.BackColor = ShiftOSDesktop.artpadcolourpallets(52); + colourpallet54.BackColor = ShiftOSDesktop.artpadcolourpallets(53); + colourpallet55.BackColor = ShiftOSDesktop.artpadcolourpallets(54); + colourpallet56.BackColor = ShiftOSDesktop.artpadcolourpallets(55); + colourpallet57.BackColor = ShiftOSDesktop.artpadcolourpallets(56); + colourpallet58.BackColor = ShiftOSDesktop.artpadcolourpallets(57); + colourpallet59.BackColor = ShiftOSDesktop.artpadcolourpallets(58); + colourpallet60.BackColor = ShiftOSDesktop.artpadcolourpallets(59); + colourpallet61.BackColor = ShiftOSDesktop.artpadcolourpallets(60); + colourpallet62.BackColor = ShiftOSDesktop.artpadcolourpallets(61); + colourpallet63.BackColor = ShiftOSDesktop.artpadcolourpallets(62); + colourpallet64.BackColor = ShiftOSDesktop.artpadcolourpallets(63); + colourpallet65.BackColor = ShiftOSDesktop.artpadcolourpallets(64); + colourpallet66.BackColor = ShiftOSDesktop.artpadcolourpallets(65); + colourpallet67.BackColor = ShiftOSDesktop.artpadcolourpallets(66); + colourpallet68.BackColor = ShiftOSDesktop.artpadcolourpallets(67); + colourpallet69.BackColor = ShiftOSDesktop.artpadcolourpallets(68); + colourpallet70.BackColor = ShiftOSDesktop.artpadcolourpallets(69); + colourpallet71.BackColor = ShiftOSDesktop.artpadcolourpallets(70); + colourpallet72.BackColor = ShiftOSDesktop.artpadcolourpallets(71); + colourpallet73.BackColor = ShiftOSDesktop.artpadcolourpallets(72); + colourpallet74.BackColor = ShiftOSDesktop.artpadcolourpallets(73); + colourpallet75.BackColor = ShiftOSDesktop.artpadcolourpallets(74); + colourpallet76.BackColor = ShiftOSDesktop.artpadcolourpallets(75); + colourpallet77.BackColor = ShiftOSDesktop.artpadcolourpallets(76); + colourpallet78.BackColor = ShiftOSDesktop.artpadcolourpallets(77); + colourpallet79.BackColor = ShiftOSDesktop.artpadcolourpallets(78); + colourpallet80.BackColor = ShiftOSDesktop.artpadcolourpallets(79); + colourpallet81.BackColor = ShiftOSDesktop.artpadcolourpallets(80); + colourpallet82.BackColor = ShiftOSDesktop.artpadcolourpallets(81); + colourpallet83.BackColor = ShiftOSDesktop.artpadcolourpallets(82); + colourpallet84.BackColor = ShiftOSDesktop.artpadcolourpallets(83); + colourpallet85.BackColor = ShiftOSDesktop.artpadcolourpallets(84); + colourpallet86.BackColor = ShiftOSDesktop.artpadcolourpallets(85); + colourpallet87.BackColor = ShiftOSDesktop.artpadcolourpallets(86); + colourpallet88.BackColor = ShiftOSDesktop.artpadcolourpallets(87); + colourpallet89.BackColor = ShiftOSDesktop.artpadcolourpallets(88); + colourpallet90.BackColor = ShiftOSDesktop.artpadcolourpallets(89); + colourpallet91.BackColor = ShiftOSDesktop.artpadcolourpallets(90); + colourpallet92.BackColor = ShiftOSDesktop.artpadcolourpallets(91); + colourpallet93.BackColor = ShiftOSDesktop.artpadcolourpallets(92); + colourpallet94.BackColor = ShiftOSDesktop.artpadcolourpallets(93); + colourpallet95.BackColor = ShiftOSDesktop.artpadcolourpallets(94); + colourpallet96.BackColor = ShiftOSDesktop.artpadcolourpallets(95); + colourpallet97.BackColor = ShiftOSDesktop.artpadcolourpallets(96); + colourpallet98.BackColor = ShiftOSDesktop.artpadcolourpallets(97); + colourpallet99.BackColor = ShiftOSDesktop.artpadcolourpallets(98); + colourpallet100.BackColor = ShiftOSDesktop.artpadcolourpallets(99); + colourpallet101.BackColor = ShiftOSDesktop.artpadcolourpallets(100); + colourpallet102.BackColor = ShiftOSDesktop.artpadcolourpallets(101); + colourpallet103.BackColor = ShiftOSDesktop.artpadcolourpallets(102); + colourpallet104.BackColor = ShiftOSDesktop.artpadcolourpallets(103); + colourpallet105.BackColor = ShiftOSDesktop.artpadcolourpallets(104); + colourpallet106.BackColor = ShiftOSDesktop.artpadcolourpallets(105); + colourpallet107.BackColor = ShiftOSDesktop.artpadcolourpallets(106); + colourpallet108.BackColor = ShiftOSDesktop.artpadcolourpallets(107); + colourpallet109.BackColor = ShiftOSDesktop.artpadcolourpallets(108); + colourpallet110.BackColor = ShiftOSDesktop.artpadcolourpallets(109); + colourpallet111.BackColor = ShiftOSDesktop.artpadcolourpallets(110); + colourpallet112.BackColor = ShiftOSDesktop.artpadcolourpallets(111); + colourpallet113.BackColor = ShiftOSDesktop.artpadcolourpallets(112); + colourpallet114.BackColor = ShiftOSDesktop.artpadcolourpallets(113); + colourpallet115.BackColor = ShiftOSDesktop.artpadcolourpallets(114); + colourpallet116.BackColor = ShiftOSDesktop.artpadcolourpallets(115); + colourpallet117.BackColor = ShiftOSDesktop.artpadcolourpallets(116); + colourpallet118.BackColor = ShiftOSDesktop.artpadcolourpallets(117); + colourpallet119.BackColor = ShiftOSDesktop.artpadcolourpallets(118); + colourpallet120.BackColor = ShiftOSDesktop.artpadcolourpallets(119); + colourpallet121.BackColor = ShiftOSDesktop.artpadcolourpallets(120); + colourpallet122.BackColor = ShiftOSDesktop.artpadcolourpallets(121); + colourpallet123.BackColor = ShiftOSDesktop.artpadcolourpallets(122); + colourpallet124.BackColor = ShiftOSDesktop.artpadcolourpallets(123); + colourpallet125.BackColor = ShiftOSDesktop.artpadcolourpallets(124); + colourpallet126.BackColor = ShiftOSDesktop.artpadcolourpallets(125); + colourpallet127.BackColor = ShiftOSDesktop.artpadcolourpallets(126); + colourpallet128.BackColor = ShiftOSDesktop.artpadcolourpallets(127); + */} + + public void savecolors() + {/* + ShiftOSDesktop.artpadcolourpallets(0) = colourpallet1.BackColor; + ShiftOSDesktop.artpadcolourpallets(1) = colourpallet2.BackColor; + ShiftOSDesktop.artpadcolourpallets(2) = colourpallet3.BackColor; + ShiftOSDesktop.artpadcolourpallets(3) = colourpallet4.BackColor; + ShiftOSDesktop.artpadcolourpallets(4) = colourpallet5.BackColor; + ShiftOSDesktop.artpadcolourpallets(5) = colourpallet6.BackColor; + ShiftOSDesktop.artpadcolourpallets(6) = colourpallet7.BackColor; + ShiftOSDesktop.artpadcolourpallets(7) = colourpallet8.BackColor; + ShiftOSDesktop.artpadcolourpallets(8) = colourpallet9.BackColor; + ShiftOSDesktop.artpadcolourpallets(9) = colourpallet10.BackColor; + ShiftOSDesktop.artpadcolourpallets(10) = colourpallet11.BackColor; + ShiftOSDesktop.artpadcolourpallets(11) = colourpallet12.BackColor; + ShiftOSDesktop.artpadcolourpallets(12) = colourpallet13.BackColor; + ShiftOSDesktop.artpadcolourpallets(13) = colourpallet14.BackColor; + ShiftOSDesktop.artpadcolourpallets(14) = colourpallet15.BackColor; + ShiftOSDesktop.artpadcolourpallets(15) = colourpallet16.BackColor; + ShiftOSDesktop.artpadcolourpallets(16) = colourpallet17.BackColor; + ShiftOSDesktop.artpadcolourpallets(17) = colourpallet18.BackColor; + ShiftOSDesktop.artpadcolourpallets(18) = colourpallet19.BackColor; + ShiftOSDesktop.artpadcolourpallets(19) = colourpallet20.BackColor; + ShiftOSDesktop.artpadcolourpallets(20) = colourpallet21.BackColor; + ShiftOSDesktop.artpadcolourpallets(21) = colourpallet22.BackColor; + ShiftOSDesktop.artpadcolourpallets(22) = colourpallet23.BackColor; + ShiftOSDesktop.artpadcolourpallets(23) = colourpallet24.BackColor; + ShiftOSDesktop.artpadcolourpallets(24) = colourpallet25.BackColor; + ShiftOSDesktop.artpadcolourpallets(25) = colourpallet26.BackColor; + ShiftOSDesktop.artpadcolourpallets(26) = colourpallet27.BackColor; + ShiftOSDesktop.artpadcolourpallets(27) = colourpallet28.BackColor; + ShiftOSDesktop.artpadcolourpallets(28) = colourpallet29.BackColor; + ShiftOSDesktop.artpadcolourpallets(29) = colourpallet30.BackColor; + ShiftOSDesktop.artpadcolourpallets(30) = colourpallet31.BackColor; + ShiftOSDesktop.artpadcolourpallets(31) = colourpallet32.BackColor; + ShiftOSDesktop.artpadcolourpallets(32) = colourpallet33.BackColor; + ShiftOSDesktop.artpadcolourpallets(33) = colourpallet34.BackColor; + ShiftOSDesktop.artpadcolourpallets(34) = colourpallet35.BackColor; + ShiftOSDesktop.artpadcolourpallets(35) = colourpallet36.BackColor; + ShiftOSDesktop.artpadcolourpallets(36) = colourpallet37.BackColor; + ShiftOSDesktop.artpadcolourpallets(37) = colourpallet38.BackColor; + ShiftOSDesktop.artpadcolourpallets(38) = colourpallet39.BackColor; + ShiftOSDesktop.artpadcolourpallets(39) = colourpallet40.BackColor; + ShiftOSDesktop.artpadcolourpallets(40) = colourpallet41.BackColor; + ShiftOSDesktop.artpadcolourpallets(41) = colourpallet42.BackColor; + ShiftOSDesktop.artpadcolourpallets(42) = colourpallet43.BackColor; + ShiftOSDesktop.artpadcolourpallets(43) = colourpallet44.BackColor; + ShiftOSDesktop.artpadcolourpallets(44) = colourpallet45.BackColor; + ShiftOSDesktop.artpadcolourpallets(45) = colourpallet46.BackColor; + ShiftOSDesktop.artpadcolourpallets(46) = colourpallet47.BackColor; + ShiftOSDesktop.artpadcolourpallets(47) = colourpallet48.BackColor; + ShiftOSDesktop.artpadcolourpallets(48) = colourpallet49.BackColor; + ShiftOSDesktop.artpadcolourpallets(49) = colourpallet50.BackColor; + ShiftOSDesktop.artpadcolourpallets(50) = colourpallet51.BackColor; + ShiftOSDesktop.artpadcolourpallets(51) = colourpallet52.BackColor; + ShiftOSDesktop.artpadcolourpallets(52) = colourpallet53.BackColor; + ShiftOSDesktop.artpadcolourpallets(53) = colourpallet54.BackColor; + ShiftOSDesktop.artpadcolourpallets(54) = colourpallet55.BackColor; + ShiftOSDesktop.artpadcolourpallets(55) = colourpallet56.BackColor; + ShiftOSDesktop.artpadcolourpallets(56) = colourpallet57.BackColor; + ShiftOSDesktop.artpadcolourpallets(57) = colourpallet58.BackColor; + ShiftOSDesktop.artpadcolourpallets(58) = colourpallet59.BackColor; + ShiftOSDesktop.artpadcolourpallets(59) = colourpallet60.BackColor; + ShiftOSDesktop.artpadcolourpallets(60) = colourpallet61.BackColor; + ShiftOSDesktop.artpadcolourpallets(61) = colourpallet62.BackColor; + ShiftOSDesktop.artpadcolourpallets(62) = colourpallet63.BackColor; + ShiftOSDesktop.artpadcolourpallets(63) = colourpallet64.BackColor; + ShiftOSDesktop.artpadcolourpallets(64) = colourpallet65.BackColor; + ShiftOSDesktop.artpadcolourpallets(65) = colourpallet66.BackColor; + ShiftOSDesktop.artpadcolourpallets(66) = colourpallet67.BackColor; + ShiftOSDesktop.artpadcolourpallets(67) = colourpallet68.BackColor; + ShiftOSDesktop.artpadcolourpallets(68) = colourpallet69.BackColor; + ShiftOSDesktop.artpadcolourpallets(69) = colourpallet70.BackColor; + ShiftOSDesktop.artpadcolourpallets(70) = colourpallet71.BackColor; + ShiftOSDesktop.artpadcolourpallets(71) = colourpallet72.BackColor; + ShiftOSDesktop.artpadcolourpallets(72) = colourpallet73.BackColor; + ShiftOSDesktop.artpadcolourpallets(73) = colourpallet74.BackColor; + ShiftOSDesktop.artpadcolourpallets(74) = colourpallet75.BackColor; + ShiftOSDesktop.artpadcolourpallets(75) = colourpallet76.BackColor; + ShiftOSDesktop.artpadcolourpallets(76) = colourpallet77.BackColor; + ShiftOSDesktop.artpadcolourpallets(77) = colourpallet78.BackColor; + ShiftOSDesktop.artpadcolourpallets(78) = colourpallet79.BackColor; + ShiftOSDesktop.artpadcolourpallets(79) = colourpallet80.BackColor; + ShiftOSDesktop.artpadcolourpallets(80) = colourpallet81.BackColor; + ShiftOSDesktop.artpadcolourpallets(81) = colourpallet82.BackColor; + ShiftOSDesktop.artpadcolourpallets(82) = colourpallet83.BackColor; + ShiftOSDesktop.artpadcolourpallets(83) = colourpallet84.BackColor; + ShiftOSDesktop.artpadcolourpallets(84) = colourpallet85.BackColor; + ShiftOSDesktop.artpadcolourpallets(85) = colourpallet86.BackColor; + ShiftOSDesktop.artpadcolourpallets(86) = colourpallet87.BackColor; + ShiftOSDesktop.artpadcolourpallets(87) = colourpallet88.BackColor; + ShiftOSDesktop.artpadcolourpallets(88) = colourpallet89.BackColor; + ShiftOSDesktop.artpadcolourpallets(89) = colourpallet90.BackColor; + ShiftOSDesktop.artpadcolourpallets(90) = colourpallet91.BackColor; + ShiftOSDesktop.artpadcolourpallets(91) = colourpallet92.BackColor; + ShiftOSDesktop.artpadcolourpallets(92) = colourpallet93.BackColor; + ShiftOSDesktop.artpadcolourpallets(93) = colourpallet94.BackColor; + ShiftOSDesktop.artpadcolourpallets(94) = colourpallet95.BackColor; + ShiftOSDesktop.artpadcolourpallets(95) = colourpallet96.BackColor; + ShiftOSDesktop.artpadcolourpallets(96) = colourpallet97.BackColor; + ShiftOSDesktop.artpadcolourpallets(97) = colourpallet98.BackColor; + ShiftOSDesktop.artpadcolourpallets(98) = colourpallet99.BackColor; + ShiftOSDesktop.artpadcolourpallets(99) = colourpallet100.BackColor; + ShiftOSDesktop.artpadcolourpallets(100) = colourpallet101.BackColor; + ShiftOSDesktop.artpadcolourpallets(101) = colourpallet102.BackColor; + ShiftOSDesktop.artpadcolourpallets(102) = colourpallet103.BackColor; + ShiftOSDesktop.artpadcolourpallets(103) = colourpallet104.BackColor; + ShiftOSDesktop.artpadcolourpallets(104) = colourpallet105.BackColor; + ShiftOSDesktop.artpadcolourpallets(105) = colourpallet106.BackColor; + ShiftOSDesktop.artpadcolourpallets(106) = colourpallet107.BackColor; + ShiftOSDesktop.artpadcolourpallets(107) = colourpallet108.BackColor; + ShiftOSDesktop.artpadcolourpallets(108) = colourpallet109.BackColor; + ShiftOSDesktop.artpadcolourpallets(109) = colourpallet110.BackColor; + ShiftOSDesktop.artpadcolourpallets(110) = colourpallet111.BackColor; + ShiftOSDesktop.artpadcolourpallets(111) = colourpallet112.BackColor; + ShiftOSDesktop.artpadcolourpallets(112) = colourpallet113.BackColor; + ShiftOSDesktop.artpadcolourpallets(113) = colourpallet114.BackColor; + ShiftOSDesktop.artpadcolourpallets(114) = colourpallet115.BackColor; + ShiftOSDesktop.artpadcolourpallets(115) = colourpallet116.BackColor; + ShiftOSDesktop.artpadcolourpallets(116) = colourpallet117.BackColor; + ShiftOSDesktop.artpadcolourpallets(117) = colourpallet118.BackColor; + ShiftOSDesktop.artpadcolourpallets(118) = colourpallet119.BackColor; + ShiftOSDesktop.artpadcolourpallets(119) = colourpallet120.BackColor; + ShiftOSDesktop.artpadcolourpallets(120) = colourpallet121.BackColor; + ShiftOSDesktop.artpadcolourpallets(121) = colourpallet122.BackColor; + ShiftOSDesktop.artpadcolourpallets(122) = colourpallet123.BackColor; + ShiftOSDesktop.artpadcolourpallets(123) = colourpallet124.BackColor; + ShiftOSDesktop.artpadcolourpallets(124) = colourpallet125.BackColor; + ShiftOSDesktop.artpadcolourpallets(125) = colourpallet126.BackColor; + ShiftOSDesktop.artpadcolourpallets(126) = colourpallet127.BackColor; + ShiftOSDesktop.artpadcolourpallets(127) = colourpallet128.BackColor; + */} + // + + public void settoolcolours() + { + btnpixelsetter.BackColor = drawingcolour; + btnpixelplacer.BackColor = drawingcolour; + btnpencil.BackColor = drawingcolour; + btnfloodfill.BackColor = drawingcolour; + btnsquare.BackColor = drawingcolour; + btnoval.BackColor = drawingcolour; + btnlinetool.BackColor = drawingcolour; + btnpaintbrush.BackColor = drawingcolour; + btntexttool.BackColor = drawingcolour; + } + #endregion + + #region Zooming + + // ERROR: Handles clauses are not supported in C# + private void btnzoomin_Click(object sender, EventArgs e) + { + if (magnificationlevel < 256) + { + magnificationlevel *= 2; + } + else { + API.CreateInfoboxSession("ArtPad - Magnification Error!" + , "You are unable to increase the magnification level any further." + Environment.NewLine + Environment.NewLine + "256x is the highest level of magnification supported by ArtPad!", infobox.InfoboxMode.Info); + } + setmagnification(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnzoomout_Click(object sender, EventArgs e) + { + if (magnificationlevel > 1) + { + magnificationlevel /= 2; + pnldrawingbackground.AutoScrollPosition = new Point(0, 0); + } + else { + API.CreateInfoboxSession("ArtPad - Magnification Error!" + ,"You are unable to decrease the magnification level any further." + Environment.NewLine + Environment.NewLine + "Artpad is unable to scale pixels at a level smaller than their actual size!", infobox.InfoboxMode.Info); + } + setmagnification(); + } + + private void setmagnification() + { + magnifyRect.Width = (int)canvaswidth / magnificationlevel; + magnifyRect.Height = (int)canvasheight / magnificationlevel; + picdrawingdisplay.Size = new Size(canvaswidth * magnificationlevel, canvasheight * magnificationlevel); + if (picdrawingdisplay.Height > 468 && picdrawingdisplay.Width > 676) + { + picdrawingdisplay.Location = new Point(0, 0); + } + else { + picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth * magnificationlevel) / 2, (pnldrawingbackground.Height - canvasheight * magnificationlevel) / 2); + } + picdrawingdisplay.Invalidate(); + lblzoomlevel.Text = magnificationlevel + "X"; + } + + #endregion + + #region Pixel Placer + + // ERROR: Handles clauses are not supported in C# + private void pnlpixelplacer_Click(object sender, EventArgs e) + { + selectedtool = "Pixel Placer"; + gettoolsettings(pnlpixelplacersettings); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpixelplacermovementmode_Click(object sender, EventArgs e) + { + if (pixalplacermovable == false) + { + pixalplacermovable = true; + btnpixelplacermovementmode.ForeColor = Color.White; + btnpixelplacermovementmode.BackColor = Color.Black; + btnpixelplacermovementmode.Text = "Deactivate Movement Mode"; + lblpixelplacerhelp.Text = "Movement mode is enabled. Click and drag on the canvas to place pixels as you move the mouse. Please use 4x magnification or greater and move the mouse very slowly."; + } + else { + pixalplacermovable = false; + btnpixelplacermovementmode.ForeColor = Color.Black; + btnpixelplacermovementmode.BackColor = Color.White; + btnpixelplacermovementmode.Text = "Activate Movement Mode"; + lblpixelplacerhelp.Text = "This tool does not contain any alterable settings. Simply click on the canvas and a pixel will be placed in the spot you click."; + } + } + + #endregion + + #region Saving + + // ERROR: Handles clauses are not supported in C# + private void btnsave_Click(object sender, EventArgs e) + { + showsavedialog(); + } + + public void showsavedialog() + { + API.CreateFileSkimmerSession(".pic", File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + savelocation = res; + saveimage(); + } + }; + } + + public void saveimage() + { + canvasbitmap.Save(savelocation, ImageFormat.Bmp); + } + #endregion + + #region New Canvas + + // ERROR: Handles clauses are not supported in C# + private void txtnewcanvaswidth_TextChanged(object sender, EventArgs e) + { + if (txtnewcanvaswidth.Text == "" | txtnewcanvasheight.Text == "") + { + if(txtnewcanvasheight.Text == "") + { + txtnewcanvasheight.Text = "0"; + } + if (txtnewcanvaswidth.Text == "") + { + txtnewcanvaswidth.Text = "0"; + } + } + else { + try { + lbltotalpixels.Text = (Convert.ToInt32(txtnewcanvaswidth.Text) * Convert.ToInt32(txtnewcanvasheight.Text)).ToString(); + if (API.Upgrades["artpadlimitlesspixels"] == true) + { + lbltotalpixels.ForeColor = Color.Black; + } + else { + if ((Convert.ToInt32(txtnewcanvaswidth.Text) * Convert.ToInt32(txtnewcanvasheight.Text)) > GetPixelLimit()) + { + lbltotalpixels.ForeColor = Color.Red; + } + else { + lbltotalpixels.ForeColor = Color.Black; + } + } + } + catch + { + + } + } + + } + + public int GetPixelLimit() + { + int value = 2; + + + if(API.Upgrades["artpadpixellimit4"]) + { + value = 4; + if (API.Upgrades["artpadpixellimit8"]) + { + value = 8; + if (API.Upgrades["artpadpixellimit16"]) + { + value = 16; + if (API.Upgrades["artpadpixellimit64"]) + { + value = 64; + if (API.Upgrades["artpadpixellimit256"]) + { + value = 256; + if (API.Upgrades["artpadpixellimit1024"]) + { + value = 1024; + if (API.Upgrades["artpadpixellimit4096"]) + { + value = 4096; + if (API.Upgrades["artpadpixellimit16384"]) + { + value = 16384; + if (API.Upgrades["artpadpixellimit65536"]) + { + value = 65536; + } + } + } + } + } + } + } + } + } + + return value; + } + + // ERROR: Handles clauses are not supported in C# + private void btncreate_Click(object sender, EventArgs e) + { + if (lbltotalpixels.ForeColor == Color.Red) + { + API.CreateInfoboxSession("Artpad - Error", "Artpad cannot create the image. It is too big.", infobox.InfoboxMode.Info); + } + else { + if (lbltotalpixels.Text == "0") + { + } + else { + canvaswidth = Convert.ToInt32(txtnewcanvaswidth.Text); + canvasheight = Convert.ToInt32(txtnewcanvasheight.Text); + picdrawingdisplay.Show(); + setupcanvas(); + pnlinitialcanvassettings.Hide(); + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void btncancel_Click(object sender, EventArgs e) + { + pnlinitialcanvassettings.Hide(); + picdrawingdisplay.Show(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnnew_Click(object sender, EventArgs e) + { + pnlinitialcanvassettings.Show(); + picdrawingdisplay.Hide(); + } + + #endregion + + #region Preview + + public void setuppreview() + { + lbltoolselected.Text = selectedtool; + picpreview.CreateGraphics().FillRectangle(Brushes.White, 0, 0, 70, 50); + switch (selectedtool) + { + case "Square Tool": + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), squarewidth); + var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillsquarecolor)); + RectangleF rectdraw = new RectangleF(0, 0, picpreview.Width, picpreview.Height); + float correctionamount = squarewidth / 2; + if (squarewidth > 0) + { + picpreview.CreateGraphics().DrawRectangle(CurrentPen, rectdraw.X + correctionamount, rectdraw.Y + correctionamount, rectdraw.Width - squarewidth, rectdraw.Height - squarewidth); + } + if (squarefillon == true) + { + picpreview.CreateGraphics().FillRectangle(CurrentBrush, rectdraw.X + squarewidth, rectdraw.Y + squarewidth, rectdraw.Width - squarewidth - squarewidth, rectdraw.Height - squarewidth - squarewidth); + } + break; + case "Oval Tool": + var ovalCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), ovalwidth); + var ovalCurrentBrush = new SolidBrush(Color.FromArgb(255, fillovalcolor)); + RectangleF ovalrectdraw = new RectangleF(0, 0, picpreview.Width, picpreview.Height); + float ovalcorrectionamount = ovalwidth / 2; + if (ovalwidth > 0) + { + picpreview.CreateGraphics().DrawEllipse(ovalCurrentPen, ovalrectdraw.X + ovalcorrectionamount, ovalrectdraw.Y + ovalcorrectionamount, ovalrectdraw.Width - ovalwidth, ovalrectdraw.Height - ovalwidth); + } + if (ovalfillon == true) + { + float fixer = ovalwidth / 2; + picpreview.CreateGraphics().FillEllipse(ovalCurrentBrush, (ovalrectdraw.X + fixer), (ovalrectdraw.Y + fixer), ovalrectdraw.Width - fixer - fixer, ovalrectdraw.Height - fixer - fixer); + } + break; + case "Text Tool": + var textCurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + drawtextfont = new System.Drawing.Font(drawtextfontname, 20, drawtextfontstyle); + picpreview.CreateGraphics().DrawString("A", drawtextfont, textCurrentBrush, 20, 0); + break; + case "Line Tool": + var lineCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), linewidth); + picpreview.CreateGraphics().DrawLine(lineCurrentPen, 0, 0, picpreview.Width, picpreview.Height); + break; + case "Pencil": + var pencilCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), pencilwidth); + picpreview.CreateGraphics().DrawLine(pencilCurrentPen, 0, 25, picpreview.Width, 25); + break; + case "Paint Brush": + var pbCurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + float halfsize = paintbrushwidth / 2; + float halfwidth = picdrawingdisplay.Width / 2; + float halfheight = picdrawingdisplay.Height / 2; + if (paintbrushtype == "circle") + { + picpreview.CreateGraphics().FillEllipse(pbCurrentBrush, halfwidth - 15 - halfsize, halfheight - 1 - halfsize, paintbrushwidth, paintbrushwidth); + } + else { + picpreview.CreateGraphics().FillRectangle(pbCurrentBrush, halfwidth - 15 - halfsize, halfheight - 1 - halfsize, paintbrushwidth, paintbrushwidth); + } + break; + case "Eracer": + System.Drawing.SolidBrush drawbrush = new System.Drawing.SolidBrush(drawingcolour); + picpreview.CreateGraphics().FillRectangle(drawbrush, 0, 0, picpreview.Width, picpreview.Height); + var eCurrentBrush = new SolidBrush(Color.FromArgb(255, Color.White)); + float ehalfsize = eracerwidth / 2; + float ehalfwidth = picdrawingdisplay.Width / 2; + float ehalfheight = picdrawingdisplay.Height / 2; + if (eracertype == "circle") + { + picpreview.CreateGraphics().FillEllipse(eCurrentBrush, ehalfwidth - 15 - ehalfsize, ehalfheight - ehalfsize, eracerwidth, eracerwidth); + } + else { + picpreview.CreateGraphics().FillRectangle(eCurrentBrush, ehalfwidth - 15 - ehalfsize, ehalfheight - ehalfsize, eracerwidth, eracerwidth); + } + break; + default: + System.Drawing.SolidBrush ddrawbrush = new System.Drawing.SolidBrush(drawingcolour); + picpreview.CreateGraphics().FillRectangle(ddrawbrush, 0, 0, picpreview.Width, picpreview.Height); + ddrawbrush.Dispose(); + break; + } + } + + #endregion + + #region Pencil + + // ERROR: Handles clauses are not supported in C# + private void btnpencil_Click(object sender, EventArgs e) + { + selectedtool = "Pencil"; + gettoolsettings(pnlpencilsettings); + } + + // ERROR: Handles clauses are not supported in C# + private void ChangePencilSize(object sender, EventArgs e) + { + var s = (Control)sender; + switch (s.Name.ToString()) + { + case "btnpencilsize1": + pencilwidth = 1; + break; + case "btnpencilsize2": + pencilwidth = 2; + break; + case "btnpencilsize3": + pencilwidth = 3; + break; + } + setuppreview(); + } + + #endregion + + #region Undo/Redo + + // ERROR: Handles clauses are not supported in C# + private void btnundo_Click(object sender, EventArgs e) + { + try + { + undo.redoStack.Push((Image)canvasbitmap.Clone()); + canvasbitmap = (Bitmap)undo.undoStack.Pop(); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + picdrawingdisplay.Invalidate(); + } + catch + { + API.CreateInfoboxSession("ArtPad - Undo Error!" + ,"There doesn't appear to be any more actions to undo." + Environment.NewLine + Environment.NewLine + "One more step back would undo the creation of the canvas. If this is your goal just click new.", infobox.InfoboxMode.Info); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnredo_Click(object sender, EventArgs e) + { + try + { + undo.undoStack.Push((Image)canvasbitmap.Clone()); + canvasbitmap = (Bitmap)undo.redoStack.Pop(); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + picdrawingdisplay.Invalidate(); + } + catch + { + API.CreateInfoboxSession("ArtPad - Redo Error!" + , "There doesn't appear to be any more actions to redo." + Environment.NewLine + Environment.NewLine + "If you have drawn on the canvas recently all future history would have been wiped!", infobox.InfoboxMode.Info); + } + } + + #endregion + + #region File Loading + + // ERROR: Handles clauses are not supported in C# + private void btnopen_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".pic", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string res = API.GetFSResult(); + if(res != "fail") + { + savelocation = res; + openpic(); + } + }; + } + + public void openpic() + { + pnlinitialcanvassettings.Hide(); + picdrawingdisplay.Show(); + magnificationlevel = 1; + setmagnification(); + canvasbitmap = (Bitmap)Image.FromFile(savelocation); + canvasheight = canvasbitmap.Height; + canvaswidth = canvasbitmap.Width; + picdrawingdisplay.Size = new Size(canvaswidth, canvasheight); + picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth) / 2, (pnldrawingbackground.Height - canvasheight) / 2); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + picdrawingdisplay.Invalidate(); + } + + #endregion + + #region Flood Fill + + // Flood fill the point. + public void SafeFloodFill(Bitmap bm, int x, int y, Color new_color) + { + // Get the old and new colors. + Color old_color = bm.GetPixel(x, y); + + // The following "If Then" test was added by Reuben + // Jollif + // to protect the code in case the start pixel + // has the same color as the fill color. + if (old_color.ToArgb() != new_color.ToArgb()) + { + // Start with the original point in the stack. + Stack pts = new Stack(1000); + pts.Push(new Point(x, y)); + bm.SetPixel(x, y, new_color); + + // While the stack is not empty, process a point. + while (pts.Count > 0) + { + Point pt = (Point)pts.Pop(); + if (pt.X > 0) + SafeCheckPoint(bm, pts, pt.X - 1, pt.Y, old_color, new_color); + + if (pt.Y > 0) + SafeCheckPoint(bm, pts, pt.X, pt.Y - 1, old_color, new_color); + if (pt.X < bm.Width - 1) + SafeCheckPoint(bm, pts, pt.X + 1, pt.Y, old_color, new_color); + if (pt.Y < bm.Height - 1) + SafeCheckPoint(bm, pts, pt.X, pt.Y + 1, old_color, new_color); + } + } + } + + // See if this point should be added to the stack. + private void SafeCheckPoint(Bitmap bm, Stack pts, int x, int y, Color old_color, Color new_color) + { + Color clr = bm.GetPixel(x, y); + if (clr.Equals(old_color)) + { + pts.Push(new Point(x, y)); + bm.SetPixel(x, y, new_color); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnfill_Click(object sender, EventArgs e) + { + selectedtool = "Flood Fill"; + gettoolsettings(pnlfloodfillsettings); + } + + #endregion + + #region Shapes + + // ERROR: Handles clauses are not supported in C# + private void btnsquare_Click(object sender, EventArgs e) + { + selectedtool = "Square Tool"; + gettoolsettings(pnlsquaretoolsettings); + txtsquareborderwidth.Text = squarewidth.ToString(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtsquareborderwidth_TextChanged(object sender, EventArgs e) + { + if (txtsquareborderwidth.Text == "") + { + } + else { + squarewidth = (Convert.ToInt32(txtsquareborderwidth.Text)); + setuppreview(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlsquarefillcolour_Click(object sender, EventArgs e) + { + pnlsquarefillcolour.BackColor = drawingcolour; + fillsquarecolor = drawingcolour; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnsquarefillonoff_Click(object sender, EventArgs e) + { + if (squarefillon == true) + { + btnsquarefillonoff.Text = "Fill OFF"; + btnsquarefillonoff.BackColor = Color.White; + btnsquarefillonoff.ForeColor = Color.Black; + squarefillon = false; + } + else { + btnsquarefillonoff.Text = "Fill ON"; + btnsquarefillonoff.BackColor = Color.Black; + btnsquarefillonoff.ForeColor = Color.White; + squarefillon = true; + } + txtsquareborderwidth.Text = squarewidth.ToString(); + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnoval_Click(object sender, EventArgs e) + { + selectedtool = "Oval Tool"; + gettoolsettings(pnlovaltoolsettings); + txtovalborderwidth.Text = ovalwidth.ToString(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtovalborderwidth_TextChanged(object sender, EventArgs e) + { + if (txtovalborderwidth.Text == "") + { + } + else { + ovalwidth = (Convert.ToInt32(txtovalborderwidth.Text)); + setuppreview(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlovalfillcolour_Click(object sender, EventArgs e) + { + pnlovalfillcolour.BackColor = drawingcolour; + fillovalcolor = drawingcolour; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnovalfillonoff_Click(object sender, EventArgs e) + { + if (ovalfillon == true) + { + btnovalfillonoff.Text = "Fill OFF"; + btnovalfillonoff.BackColor = Color.White; + btnovalfillonoff.ForeColor = Color.Black; + ovalfillon = false; + } + else { + btnovalfillonoff.Text = "Fill ON"; + btnovalfillonoff.BackColor = Color.Black; + btnovalfillonoff.ForeColor = Color.White; + ovalfillon = true; + } + txtovalborderwidth.Text = ovalwidth.ToString(); + setuppreview(); + } + #endregion + + #region Eraser + + // ERROR: Handles clauses are not supported in C# + private void btneracer_Click(object sender, EventArgs e) + { + selectedtool = "Eracer"; + gettoolsettings(pnleracertoolsettings); + txteracersize.Text = eracerwidth.ToString(); + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void txteracersize_TextChanged(object sender, EventArgs e) + { + if (txteracersize.Text == "") + { + } + else { + eracerwidth = (Convert.ToInt32(txteracersize.Text)); + } + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btneracercircle_Click(object sender, EventArgs e) + { + eracertype = "circle"; + btneracercircle.BackgroundImage = Properties.Resources.ArtPadcirclerubberselected; + btneracersquare.BackgroundImage = Properties.Resources.ArtPadsquarerubber; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btneracersquare_Click(object sender, EventArgs e) + { + eracertype = "square"; + btneracercircle.BackgroundImage = Properties.Resources.ArtPadcirclerubber; + btneracersquare.BackgroundImage = Properties.Resources.ArtPadsquarerubberselected; + setuppreview(); + } + + #endregion + + #region Line + + // ERROR: Handles clauses are not supported in C# + private void btnlinetool_Click(object sender, EventArgs e) + { + selectedtool = "Line Tool"; + gettoolsettings(pnllinetoolsettings); + txtlinewidth.Text = linewidth.ToString(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtlinewidth_TextChanged(object sender, EventArgs e) + { + if (txtlinewidth.Text == "") + { + } + else { + linewidth = (Convert.ToInt32(txtlinewidth.Text)); + } + setuppreview(); + } + + #endregion + + #region Text + + // ERROR: Handles clauses are not supported in C# + private void btntexttool_Click(object sender, EventArgs e) + { + selectedtool = "Text Tool"; + gettoolsettings(pnltexttoolsettings); + } + + // ERROR: Handles clauses are not supported in C# + private void txtdrawtextsize_TextChanged(object sender, EventArgs e) + { + if (txtdrawtextsize.Text == "") + { + } + else { + drawtextsize = Convert.ToInt32(txtdrawtextsize.Text); + } + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void combodrawtextfont_SelectedIndexChanged(object sender, EventArgs e) + { + drawtextfontname = combodrawtextfont.Text; + txtdrawstringtext.Focus(); + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void combofontstyle_SelectedIndexChanged(object sender, EventArgs e) + { + switch (combofontstyle.Text) + { + case "Bold": + drawtextfontstyle = FontStyle.Bold; + break; + case "Italic": + drawtextfontstyle = FontStyle.Italic; + break; + case "Regular": + drawtextfontstyle = FontStyle.Regular; + break; + case "Strikeout": + drawtextfontstyle = FontStyle.Strikeout; + break; + case "Underline": + drawtextfontstyle = FontStyle.Underline; + break; + } + txtdrawstringtext.Focus(); + setuppreview(); + } + #endregion + + #region Paintbrush + + // ERROR: Handles clauses are not supported in C# + private void txtpaintbrushsize_TextChanged(object sender, EventArgs e) + { + if (txtpaintbrushsize.Text == "") + { + } + else { + paintbrushwidth = (Convert.ToInt32(txtpaintbrushsize.Text)); + } + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpaintsquareshape_Click(object sender, EventArgs e) + { + paintbrushtype = "square"; + btnpaintcircleshape.BackgroundImage = Properties.Resources.ArtPadcirclerubber; + btnpaintsquareshape.BackgroundImage = Properties.Resources.ArtPadsquarerubberselected; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpaintcircleshape_Click(object sender, EventArgs e) + { + paintbrushtype = "circle"; + btnpaintcircleshape.BackgroundImage = Properties.Resources.ArtPadcirclerubberselected; + btnpaintsquareshape.BackgroundImage = Properties.Resources.ArtPadsquarerubber; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpaintbrush_Click(object sender, EventArgs e) + { + selectedtool = "Paint Brush"; + gettoolsettings(pnlpaintbrushtoolsettings); + txtpaintbrushsize.Text = paintbrushwidth.ToString(); + setuppreview(); + } + + #endregion + + #region Codepoints + + private void preparecooldown() + { + needtosave = true; + if (codepointscooldown == true) + { + } + else { + codepointsearned = codepointsearned + 1; + codepointscooldown = true; + tmrcodepointcooldown.Start(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrcodepointcooldown_Tick(object sender, EventArgs e) + { + codepointscooldown = false; + tmrcodepointcooldown.Stop(); + } + + // ERROR: Handles clauses are not supported in C# + private void tmrshowearnedcodepoints_Tick(object sender, EventArgs e) + { + tmrshowearnedcodepoints.Stop(); + } + + #endregion + + #region More UI stuff + + public void determinevisiblepallets() + { + int panelstoadd = 2; + + if (API.Upgrades["artpad4colorpallets"] == true) + { + panelstoadd = 4; + } + if (API.Upgrades["artpad8colorpallets"] == true) + { + panelstoadd = 8; + } + if (API.Upgrades["artpad16colorpallets"] == true) + { + panelstoadd = 16; + } + if (API.Upgrades["artpad32colorpallets"] == true) + { + panelstoadd = 32; + } + if (API.Upgrades["artpad64colorpallets"] == true) + { + panelstoadd = 64; + } + if (API.Upgrades["artpad128colorpallets"] == true) + { + panelstoadd = 128; + } + flowcolours.Controls.Clear(); + for(int i = 0; i < panelstoadd; i++) + { + Panel pnl = new Panel(); + pnl.BackColor = Color.Black; + pnl.Size = new Size(12, 8); + flowcolours.Controls.Add(pnl); + pnl.Margin = new Padding(1, 0, 0, 1); + pnl.MouseClick += new MouseEventHandler(this.colourpallet1_MouseClick); + pnl.Show(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnchangesizecancel_Click(object sender, EventArgs e) + { + pnlpalletsize.Hide(); + } + + #endregion + + #region More Text Stuff + + // ERROR: Handles clauses are not supported in C# + private void txtdrawstringtext_TextChanged(object sender, EventArgs e) + { + setuppreview(); + } + + #endregion + + private void tmrsetupui_Tick(object sender, EventArgs e) + { + if(API.CurrentSkin != null) + { + pnldrawingbackground.BackColor = API.CurrentSkin.titlebarcolour; + } + } + + private void btnpixelplacer_Click(object sender, EventArgs e) + { + selectedtool = "Pixel Placer"; + gettoolsettings(pnlpixelplacersettings); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Artpad.resx b/source/WindowsFormsApplication1/Apps/Artpad.resx new file mode 100644 index 0000000..4175077 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Artpad.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 197, 17 + + + 394, 17 + + + 478, 17 + + + 591, 17 + + + 685, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteConverter.Designer.cs b/source/WindowsFormsApplication1/Apps/BitnoteConverter.Designer.cs new file mode 100644 index 0000000..2ad4885 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteConverter.Designer.cs @@ -0,0 +1,106 @@ +namespace ShiftOS +{ + partial class BitnoteConverter + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txtcodepoints = new System.Windows.Forms.TextBox(); + this.lbstatus = new System.Windows.Forms.Label(); + this.btnconvert = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // txtcodepoints + // + this.txtcodepoints.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.txtcodepoints.Location = new System.Drawing.Point(28, 12); + this.txtcodepoints.Name = "txtcodepoints"; + this.txtcodepoints.Size = new System.Drawing.Size(44, 26); + this.txtcodepoints.TabIndex = 0; + this.txtcodepoints.TextChanged += new System.EventHandler(this.txtcodepoints_TextChanged); + // + // lbstatus + // + this.lbstatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbstatus.AutoSize = true; + this.lbstatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.lbstatus.Location = new System.Drawing.Point(78, 16); + this.lbstatus.Name = "lbstatus"; + this.lbstatus.Size = new System.Drawing.Size(78, 22); + this.lbstatus.TabIndex = 1; + this.lbstatus.Text = "> 0 BTN"; + // + // btnconvert + // + this.btnconvert.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnconvert.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnconvert.Location = new System.Drawing.Point(0, 76); + this.btnconvert.Name = "btnconvert"; + this.btnconvert.Size = new System.Drawing.Size(229, 23); + this.btnconvert.TabIndex = 2; + this.btnconvert.Text = "Convert"; + this.btnconvert.UseVisualStyleBackColor = true; + this.btnconvert.Click += new System.EventHandler(this.btnconvert_Click); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.btnconvert); + this.panel1.Controls.Add(this.lbstatus); + this.panel1.Controls.Add(this.txtcodepoints); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(229, 99); + this.panel1.TabIndex = 3; + // + // BitnoteConverter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(229, 99); + this.Controls.Add(this.panel1); + this.Name = "BitnoteConverter"; + this.Text = "BitnoteConverter"; + this.Load += new System.EventHandler(this.BitnoteConverter_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox txtcodepoints; + private System.Windows.Forms.Label lbstatus; + private System.Windows.Forms.Button btnconvert; + private System.Windows.Forms.Panel panel1; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteConverter.cs b/source/WindowsFormsApplication1/Apps/BitnoteConverter.cs new file mode 100644 index 0000000..d28b970 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteConverter.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class BitnoteConverter : Form + { + /// + /// GUI for the Bitnote Converter package. + /// + public BitnoteConverter() + { + InitializeComponent(); + } + + private decimal BitnotesToAdd = 0; + + private void txtcodepoints_TextChanged(object sender, EventArgs e) + { + try + { + int cp = Convert.ToInt16(txtcodepoints.Text); + if(cp > API.CurrentSave.codepoints) + { + txtcodepoints.Text = API.CurrentSave.codepoints.ToString(); + } + string decstr = ((decimal)cp / 24).ToString("#.#####"); + + + lbstatus.Text = "> " + decstr + " BTN"; + BitnotesToAdd = Convert.ToDecimal(decstr); + } + catch + { + BitnotesToAdd = 0; + } + } + + private void btnconvert_Click(object sender, EventArgs e) + { + if(BitnotesToAdd > 0) + { + API.RemoveCodepoints((int)(BitnotesToAdd * 24)); + API.BitnoteAddress.Bitnotes += BitnotesToAdd; + API.CreateInfoboxSession("Bitnote Converter", "Your codepoints have been converted to Bitnotes successfully.", infobox.InfoboxMode.Info); + } + else + { + API.CreateInfoboxSession("Bitnote Converter", "An invalid ammount of Codepoints was entered. We couldn't convert them.", infobox.InfoboxMode.Info); + } + } + + private void BitnoteConverter_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/BitnoteConverter.resx b/source/WindowsFormsApplication1/Apps/BitnoteConverter.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteConverter.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteDigger.Designer.cs b/source/WindowsFormsApplication1/Apps/BitnoteDigger.Designer.cs new file mode 100644 index 0000000..b1fa081 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteDigger.Designer.cs @@ -0,0 +1,337 @@ +using System; + +namespace ShiftOS +{ + partial class BitnoteDigger + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.Label10 = new System.Windows.Forms.Label(); + this.btnsend = new System.Windows.Forms.Button(); + this.txtsendaddress = new System.Windows.Forms.TextBox(); + this.Label7 = new System.Windows.Forms.Label(); + this.lbltotalbitcoinsmined = new System.Windows.Forms.Label(); + this.Panel1 = new System.Windows.Forms.Panel(); + this.Label6 = new System.Windows.Forms.Label(); + this.Label8 = new System.Windows.Forms.Label(); + this.turbomodespeed = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.lbldiggerstatsspeed = new System.Windows.Forms.Label(); + this.lbldiggerstatsgrade = new System.Windows.Forms.Label(); + this.lbldiggerstatsname = new System.Windows.Forms.Label(); + this.btnturbomode = new System.Windows.Forms.Button(); + this.btnstop = new System.Windows.Forms.Button(); + this.btnstart = new System.Windows.Forms.Button(); + this.PictureBox1 = new System.Windows.Forms.PictureBox(); + this.Label1 = new System.Windows.Forms.Label(); + this.tmrcalcbitnotesmined = new System.Windows.Forms.Timer(this.components); + this.tmrturbomode = new System.Windows.Forms.Timer(this.components); + this.btnupgrade = new System.Windows.Forms.Button(); + this.pgcontents.SuspendLayout(); + this.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.Label10); + this.pgcontents.Controls.Add(this.btnsend); + this.pgcontents.Controls.Add(this.txtsendaddress); + this.pgcontents.Controls.Add(this.Label7); + this.pgcontents.Controls.Add(this.lbltotalbitcoinsmined); + this.pgcontents.Controls.Add(this.Panel1); + this.pgcontents.Controls.Add(this.Label1); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(560, 297); + this.pgcontents.TabIndex = 20; + // + // Label10 + // + this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label10.Location = new System.Drawing.Point(205, 182); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(261, 35); + this.Label10.TabIndex = 6; + this.Label10.Text = "Insert your Bitnote wallet address above then click send to transfer your earning" + + "s"; + this.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnsend + // + this.btnsend.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnsend.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsend.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsend.Location = new System.Drawing.Point(472, 181); + this.btnsend.Name = "btnsend"; + this.btnsend.Size = new System.Drawing.Size(73, 36); + this.btnsend.TabIndex = 5; + this.btnsend.Text = "Send"; + this.btnsend.UseVisualStyleBackColor = true; + this.btnsend.Click += new System.EventHandler(this.btnsend_Click); + // + // txtsendaddress + // + this.txtsendaddress.BackColor = System.Drawing.Color.White; + this.txtsendaddress.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtsendaddress.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtsendaddress.Location = new System.Drawing.Point(205, 155); + this.txtsendaddress.Multiline = true; + this.txtsendaddress.Name = "txtsendaddress"; + this.txtsendaddress.Size = new System.Drawing.Size(340, 21); + this.txtsendaddress.TabIndex = 4; + this.txtsendaddress.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label7 + // + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(203, 128); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(350, 27); + this.Label7.TabIndex = 3; + this.Label7.Text = "Send Bitnotes To:"; + this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbltotalbitcoinsmined + // + this.lbltotalbitcoinsmined.Font = new System.Drawing.Font("Microsoft Sans Serif", 32.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltotalbitcoinsmined.Location = new System.Drawing.Point(206, 57); + this.lbltotalbitcoinsmined.Name = "lbltotalbitcoinsmined"; + this.lbltotalbitcoinsmined.Size = new System.Drawing.Size(344, 51); + this.lbltotalbitcoinsmined.TabIndex = 2; + this.lbltotalbitcoinsmined.Text = "0.00000"; + this.lbltotalbitcoinsmined.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Panel1 + // + this.Panel1.Controls.Add(this.btnupgrade); + this.Panel1.Controls.Add(this.Label6); + this.Panel1.Controls.Add(this.Label8); + this.Panel1.Controls.Add(this.turbomodespeed); + this.Panel1.Controls.Add(this.Label5); + this.Panel1.Controls.Add(this.lbldiggerstatsspeed); + this.Panel1.Controls.Add(this.lbldiggerstatsgrade); + this.Panel1.Controls.Add(this.lbldiggerstatsname); + this.Panel1.Controls.Add(this.btnturbomode); + this.Panel1.Controls.Add(this.btnstop); + this.Panel1.Controls.Add(this.btnstart); + this.Panel1.Controls.Add(this.PictureBox1); + this.Panel1.Dock = System.Windows.Forms.DockStyle.Left; + this.Panel1.Location = new System.Drawing.Point(0, 0); + this.Panel1.Name = "Panel1"; + this.Panel1.Size = new System.Drawing.Size(199, 297); + this.Panel1.TabIndex = 1; + // + // Label6 + // + this.Label6.AutoSize = true; + this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(2, 88); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(157, 20); + this.Label6.TabIndex = 13; + this.Label6.Text = "Turbo Mode Stats:"; + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label8.Location = new System.Drawing.Point(3, 126); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(162, 16); + this.Label8.TabIndex = 11; + this.Label8.Text = "Codepoint Cost: 1CP / 10s"; + // + // turbomodespeed + // + this.turbomodespeed.AutoSize = true; + this.turbomodespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.turbomodespeed.Location = new System.Drawing.Point(3, 109); + this.turbomodespeed.Name = "turbomodespeed"; + this.turbomodespeed.Size = new System.Drawing.Size(183, 16); + this.turbomodespeed.TabIndex = 10; + this.turbomodespeed.Text = "Turbo Speed: 0.00002 BTN/S"; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(5, 5); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(115, 20); + this.Label5.TabIndex = 9; + this.Label5.Text = "Digger Stats:"; + // + // lbldiggerstatsspeed + // + this.lbldiggerstatsspeed.AutoSize = true; + this.lbldiggerstatsspeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbldiggerstatsspeed.Location = new System.Drawing.Point(6, 60); + this.lbldiggerstatsspeed.Name = "lbldiggerstatsspeed"; + this.lbldiggerstatsspeed.Size = new System.Drawing.Size(144, 16); + this.lbldiggerstatsspeed.TabIndex = 8; + this.lbldiggerstatsspeed.Text = "Speed: 0.00001 BTN/S"; + // + // lbldiggerstatsgrade + // + this.lbldiggerstatsgrade.AutoSize = true; + this.lbldiggerstatsgrade.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbldiggerstatsgrade.Location = new System.Drawing.Point(6, 43); + this.lbldiggerstatsgrade.Name = "lbldiggerstatsgrade"; + this.lbldiggerstatsgrade.Size = new System.Drawing.Size(103, 16); + this.lbldiggerstatsgrade.TabIndex = 7; + this.lbldiggerstatsgrade.Text = "Digger Grade: 1"; + // + // lbldiggerstatsname + // + this.lbldiggerstatsname.AutoSize = true; + this.lbldiggerstatsname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbldiggerstatsname.Location = new System.Drawing.Point(6, 26); + this.lbldiggerstatsname.Name = "lbldiggerstatsname"; + this.lbldiggerstatsname.Size = new System.Drawing.Size(157, 16); + this.lbldiggerstatsname.TabIndex = 6; + this.lbldiggerstatsname.Text = "Name: Surface Scratcher"; + // + // btnturbomode + // + this.btnturbomode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnturbomode.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnturbomode.Location = new System.Drawing.Point(6, 188); + this.btnturbomode.Name = "btnturbomode"; + this.btnturbomode.Size = new System.Drawing.Size(186, 29); + this.btnturbomode.TabIndex = 5; + this.btnturbomode.Text = "Activate Turbo Mode"; + this.btnturbomode.UseVisualStyleBackColor = true; + this.btnturbomode.Click += new System.EventHandler(this.btnturbomode_Click); + // + // btnstop + // + this.btnstop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnstop.Location = new System.Drawing.Point(101, 156); + this.btnstop.Name = "btnstop"; + this.btnstop.Size = new System.Drawing.Size(91, 29); + this.btnstop.TabIndex = 4; + this.btnstop.Text = "Stop"; + this.btnstop.UseVisualStyleBackColor = true; + this.btnstop.Click += new System.EventHandler(this.btnstop_Click); + // + // btnstart + // + this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstart.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnstart.Location = new System.Drawing.Point(6, 156); + this.btnstart.Name = "btnstart"; + this.btnstart.Size = new System.Drawing.Size(91, 29); + this.btnstart.TabIndex = 3; + this.btnstart.Text = "Start"; + this.btnstart.UseVisualStyleBackColor = true; + this.btnstart.Click += new System.EventHandler(this.btnstart_Click); + // + // PictureBox1 + // + this.PictureBox1.BackColor = System.Drawing.Color.Black; + this.PictureBox1.Dock = System.Windows.Forms.DockStyle.Right; + this.PictureBox1.Location = new System.Drawing.Point(198, 0); + this.PictureBox1.Name = "PictureBox1"; + this.PictureBox1.Size = new System.Drawing.Size(1, 297); + this.PictureBox1.TabIndex = 2; + this.PictureBox1.TabStop = false; + // + // Label1 + // + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(205, 16); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(345, 43); + this.Label1.TabIndex = 0; + this.Label1.Text = "Bitnotes Found"; + this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tmrcalcbitnotesmined + // + this.tmrcalcbitnotesmined.Interval = 1000; + this.tmrcalcbitnotesmined.Tick += new System.EventHandler(this.tmrcalcbitnotesmined_Tick); + // + // tmrturbomode + // + this.tmrturbomode.Interval = 10000; + this.tmrturbomode.Tick += new System.EventHandler(this.tmrturbomode_Tick); + // + // btnupgrade + // + this.btnupgrade.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnupgrade.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnupgrade.Location = new System.Drawing.Point(6, 223); + this.btnupgrade.Name = "btnupgrade"; + this.btnupgrade.Size = new System.Drawing.Size(186, 29); + this.btnupgrade.TabIndex = 14; + this.btnupgrade.Text = "Upgrade My Digger"; + this.btnupgrade.UseVisualStyleBackColor = true; + this.btnupgrade.Click += new System.EventHandler(this.btnupgrade_Click); + // + // BitnoteDigger + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(560, 297); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "BitnoteDigger"; + this.Text = "Bitnote_Digger"; + this.TopMost = true; + this.Load += new System.EventHandler(this.BitnoteDigger_Load); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.Panel1.ResumeLayout(false); + this.Panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Panel Panel1; + internal System.Windows.Forms.PictureBox PictureBox1; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Label lbltotalbitcoinsmined; + internal System.Windows.Forms.Button btnturbomode; + internal System.Windows.Forms.Button btnstop; + internal System.Windows.Forms.Button btnstart; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.Label turbomodespeed; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Label lbldiggerstatsspeed; + internal System.Windows.Forms.Label lbldiggerstatsgrade; + internal System.Windows.Forms.Label lbldiggerstatsname; + internal System.Windows.Forms.Label Label10; + internal System.Windows.Forms.Button btnsend; + internal System.Windows.Forms.TextBox txtsendaddress; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.Timer tmrcalcbitnotesmined; + internal System.Windows.Forms.Timer tmrturbomode; + internal System.Windows.Forms.Button btnupgrade; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteDigger.cs b/source/WindowsFormsApplication1/Apps/BitnoteDigger.cs new file mode 100644 index 0000000..df0b124 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteDigger.cs @@ -0,0 +1,234 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; +using Newtonsoft.Json; + +namespace ShiftOS +{ + public partial class BitnoteDigger : Form + { + /// + /// GUI for the Bitnote Digger fake Appscape Package. + /// + public BitnoteDigger() + { + InitializeComponent(); + } + + private void BitnoteDigger_Load(object sender, EventArgs e) + { + getdiggergrade(); + updatestats(); + } + + /// + /// Model for a digger grade. + /// + public class diggergrade + { + public string Name { get; set; } + public int Level { get; set; } + } + + /// + /// Retrieves the proper digger grade. + /// + public void getdiggergrade() + { + if(!File.Exists(Paths.Drivers + "BNDigger.dri")) + { + var d = new diggergrade(); + d.Level = 1; + d.Name = "Surface Scratcher"; + bitnotediggergrade = d; + File.WriteAllText(Paths.Drivers + "BNDigger.dri", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(d))); + } + else + { + string enc = File.ReadAllText(Paths.Drivers + "BNDigger.dri"); + bitnotediggergrade = JsonConvert.DeserializeObject(API.BitnoteEncryption.Decrypt(enc)); + } + } + + /// + /// Saves the digger grade to the save game. + /// + public void SaveDigger() + { + var d = bitnotediggergrade; + File.WriteAllText(Paths.Drivers + "BNDigger.dri", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(d))); + } + + public decimal bitnotesmined = 0; + public diggergrade bitnotediggergrade = null; + public double miningspeed = 0.00005; + + /// + /// Sets up digger statistics. + /// + public void updatestats() + { + lbldiggerstatsgrade.Text = "Digger Grade: " + bitnotediggergrade.Name; + switch (bitnotediggergrade.Level) + { + case 1: + lbldiggerstatsname.Text = "Surface Scratcher"; + lbldiggerstatsspeed.Text = "Speed: 0.00001"; + miningspeed = 0.00001; + break; + case 2: + lbldiggerstatsname.Text = "Name: Sediment Mover"; + lbldiggerstatsspeed.Text = "Speed: 0.00002"; + miningspeed = 0.00002; + break; + case 3: + lbldiggerstatsname.Text = "Name: Rock Crusher"; + lbldiggerstatsspeed.Text = "0.00004"; + miningspeed = 0.00004; + break; + case 4: + lbldiggerstatsname.Text = "Name: Massive Drill"; + lbldiggerstatsspeed.Text = "Speed: 0.00008"; + miningspeed = 0.00008; + break; + case 5: + lbldiggerstatsname.Text = "Name: Kola"; + lbldiggerstatsspeed.Text = "Speed: 0.00016"; + miningspeed = 0.00016; + break; + } + turbomodespeed.Text = (miningspeed * 2).ToString(); + } + + /// + /// Updates the digger. + /// + /// New grade. + /// Price (BTN) to subtract. + /// New name. + public void updategrade(int grade, decimal price, string name) + { + if (API.BitnoteAddress.Bitnotes >= price) + { + if (bitnotediggergrade.Level < grade) + { + bitnotediggergrade.Level = grade; + bitnotediggergrade.Name = name; + API.BitnoteAddress.Bitnotes -= price; + API.CreateInfoboxSession("Upgraded to " + name, + "Your digger has been successfully upgraded to grade " + grade + ". The '" + name + "'", + infobox.InfoboxMode.Info); + SaveDigger(); + updatestats(); + } + else { + API.CreateInfoboxSession("Aready Upgraded", + "The Bitnote Digger is already upgraded to grade " + bitnotediggergrade.Level.ToString() + ". There is no point in downgrading to grade " + grade, + infobox.InfoboxMode.Info); + } + } + else { + API.CreateInfoboxSession("Insufficient Funds", + "You do not have enough Bitnotes to complete this purchase", + infobox.InfoboxMode.Info); + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrcalcbitnotesmined_Tick(object sender, EventArgs e) + { + bitnotesmined += Convert.ToDecimal(miningspeed); + lbltotalbitcoinsmined.Text = (Math.Round(bitnotesmined, 5)).ToString("#.#####"); + } + + // ERROR: Handles clauses are not supported in C# + private void btnstart_Click(object sender, EventArgs e) + { + tmrcalcbitnotesmined.Start(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnstop_Click(object sender, EventArgs e) + { + tmrcalcbitnotesmined.Stop(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnsend_Click(object sender, EventArgs e) + { + if (txtsendaddress.Text == API.BitnoteAddress.Address) + { + API.BitnoteAddress.Bitnotes += bitnotesmined; + } + bitnotesmined = 0; + lbltotalbitcoinsmined.Text = (Math.Round(bitnotesmined, 5)).ToString("#.#####"); + } + + // ERROR: Handles clauses are not supported in C# + private void btnturbomode_Click(object sender, EventArgs e) + { + if (tmrturbomode.Enabled == false) + { + miningspeed = (miningspeed * 2); + tmrturbomode.Start(); + btnturbomode.Text = "Disable Turbo Mode"; + } + else { + miningspeed = (miningspeed / 2); + tmrturbomode.Stop(); + btnturbomode.Text = "Activate Turbo Mode"; + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrturbomode_Tick(object sender, EventArgs e) + { + if (API.Codepoints >= 1) + { + API.RemoveCodepoints(1); + } + else { + miningspeed = (miningspeed / 2); + tmrturbomode.Stop(); + btnturbomode.Text = "Activate Turbo Mode"; + API.CreateInfoboxSession("Turbo Mode disabled", + "Turbo Mode has been disabled due to your lack of Code Points.", + infobox.InfoboxMode.Info); + } + } + + private void btnupgrade_Click(object sender, EventArgs e) + { + string newname = "Surface Scratcher"; + double price = 1; + switch (bitnotediggergrade.Name) { + case "Surface Scratcher": + newname = "Name: Sediment Mover"; + price = 1.5; + break; + case "Sediment Mover": + newname = "Name: Rock Crusher"; + price = 2; + break; + case "Rock Crusher": + newname = "Name: Massive Drill"; + price = 4; + break; + case "Massive Drill": + newname = "Name: Kola"; + price = 8; + break; + + } + updategrade(bitnotediggergrade.Level + 1, (decimal)price, newname); + + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/BitnoteDigger.resx b/source/WindowsFormsApplication1/Apps/BitnoteDigger.resx new file mode 100644 index 0000000..7beae4d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteDigger.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 187, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteWallet.Designer.cs b/source/WindowsFormsApplication1/Apps/BitnoteWallet.Designer.cs new file mode 100644 index 0000000..df0b7d8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteWallet.Designer.cs @@ -0,0 +1,243 @@ +namespace ShiftOS +{ + partial class BitnoteWallet + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.fltopbar = new System.Windows.Forms.FlowLayoutPanel(); + this.btnsend = new System.Windows.Forms.Button(); + this.btnsync = new System.Windows.Forms.Button(); + this.sendpanel = new System.Windows.Forms.Panel(); + this.txtamount = new System.Windows.Forms.TextBox(); + this.txtrecipient = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnconfirmsend = new System.Windows.Forms.PictureBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lbmybitnotes = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.txtmyaddress = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.tmrrefresh = new System.Windows.Forms.Timer(this.components); + this.fltopbar.SuspendLayout(); + this.sendpanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.btnconfirmsend)).BeginInit(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // fltopbar + // + this.fltopbar.BackColor = System.Drawing.Color.Gray; + this.fltopbar.Controls.Add(this.btnsend); + this.fltopbar.Controls.Add(this.btnsync); + this.fltopbar.Dock = System.Windows.Forms.DockStyle.Top; + this.fltopbar.ForeColor = System.Drawing.Color.White; + this.fltopbar.Location = new System.Drawing.Point(0, 0); + this.fltopbar.Name = "fltopbar"; + this.fltopbar.Size = new System.Drawing.Size(551, 30); + this.fltopbar.TabIndex = 0; + // + // btnsend + // + this.btnsend.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnsend.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsend.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnsend.Location = new System.Drawing.Point(3, 3); + this.btnsend.Name = "btnsend"; + this.btnsend.Size = new System.Drawing.Size(75, 23); + this.btnsend.TabIndex = 0; + this.btnsend.Text = "Send"; + this.btnsend.UseVisualStyleBackColor = true; + this.btnsend.Click += new System.EventHandler(this.btnsend_Click); + // + // btnsync + // + this.btnsync.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsync.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnsync.Location = new System.Drawing.Point(84, 3); + this.btnsync.Name = "btnsync"; + this.btnsync.Size = new System.Drawing.Size(113, 23); + this.btnsync.TabIndex = 1; + this.btnsync.Text = "Sync My Bitnotes"; + this.btnsync.UseVisualStyleBackColor = true; + this.btnsync.Click += new System.EventHandler(this.btnsync_Click); + // + // sendpanel + // + this.sendpanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.sendpanel.Controls.Add(this.txtamount); + this.sendpanel.Controls.Add(this.txtrecipient); + this.sendpanel.Controls.Add(this.label2); + this.sendpanel.Controls.Add(this.label1); + this.sendpanel.Controls.Add(this.btnconfirmsend); + this.sendpanel.Location = new System.Drawing.Point(306, 143); + this.sendpanel.Name = "sendpanel"; + this.sendpanel.Size = new System.Drawing.Size(233, 105); + this.sendpanel.TabIndex = 1; + this.sendpanel.Visible = false; + // + // txtamount + // + this.txtamount.Location = new System.Drawing.Point(82, 34); + this.txtamount.Name = "txtamount"; + this.txtamount.Size = new System.Drawing.Size(148, 20); + this.txtamount.TabIndex = 4; + // + // txtrecipient + // + this.txtrecipient.Location = new System.Drawing.Point(82, 4); + this.txtrecipient.Name = "txtrecipient"; + this.txtrecipient.Size = new System.Drawing.Size(148, 20); + this.txtrecipient.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label2.Location = new System.Drawing.Point(4, 34); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(60, 17); + this.label2.TabIndex = 2; + this.label2.Text = "Amount:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label1.Location = new System.Drawing.Point(4, 4); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(71, 17); + this.label1.TabIndex = 1; + this.label1.Text = "Recipient:"; + // + // btnconfirmsend + // + this.btnconfirmsend.Image = global::ShiftOS.Properties.Resources.Send; + this.btnconfirmsend.Location = new System.Drawing.Point(129, 75); + this.btnconfirmsend.Name = "btnconfirmsend"; + this.btnconfirmsend.Size = new System.Drawing.Size(101, 27); + this.btnconfirmsend.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.btnconfirmsend.TabIndex = 0; + this.btnconfirmsend.TabStop = false; + this.btnconfirmsend.Click += new System.EventHandler(this.btnconfirmsend_Click); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.lbmybitnotes); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.txtmyaddress); + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.fltopbar); + this.panel1.Controls.Add(this.sendpanel); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(551, 260); + this.panel1.TabIndex = 2; + // + // lbmybitnotes + // + this.lbmybitnotes.AutoSize = true; + this.lbmybitnotes.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); + this.lbmybitnotes.Location = new System.Drawing.Point(7, 203); + this.lbmybitnotes.Name = "lbmybitnotes"; + this.lbmybitnotes.Size = new System.Drawing.Size(91, 31); + this.lbmybitnotes.TabIndex = 6; + this.lbmybitnotes.Text = "0 BTN"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label4.Location = new System.Drawing.Point(7, 177); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(50, 17); + this.label4.TabIndex = 5; + this.label4.Text = "I have:"; + // + // txtmyaddress + // + this.txtmyaddress.Location = new System.Drawing.Point(10, 136); + this.txtmyaddress.Name = "txtmyaddress"; + this.txtmyaddress.Size = new System.Drawing.Size(290, 20); + this.txtmyaddress.TabIndex = 4; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label3.Location = new System.Drawing.Point(7, 116); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(86, 17); + this.label3.TabIndex = 2; + this.label3.Text = "My Address:"; + // + // tmrrefresh + // + this.tmrrefresh.Enabled = true; + this.tmrrefresh.Tick += new System.EventHandler(this.tmrrefresh_Tick); + // + // BitnoteWallet + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(551, 260); + this.Controls.Add(this.panel1); + this.Name = "BitnoteWallet"; + this.Text = "BitnoteWallet"; + this.Load += new System.EventHandler(this.BitnoteWallet_Load); + this.fltopbar.ResumeLayout(false); + this.sendpanel.ResumeLayout(false); + this.sendpanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.btnconfirmsend)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel fltopbar; + private System.Windows.Forms.Button btnsend; + private System.Windows.Forms.Button btnsync; + private System.Windows.Forms.Panel sendpanel; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.PictureBox btnconfirmsend; + private System.Windows.Forms.TextBox txtamount; + private System.Windows.Forms.TextBox txtrecipient; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lbmybitnotes; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtmyaddress; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Timer tmrrefresh; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteWallet.cs b/source/WindowsFormsApplication1/Apps/BitnoteWallet.cs new file mode 100644 index 0000000..6d5cb9f --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteWallet.cs @@ -0,0 +1,247 @@ +using NetSockets; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class BitnoteWallet : Form + { + /// + /// GUI for the Bitnote Wallet package. + /// + public BitnoteWallet() + { + InitializeComponent(); + Clients = new List(); + foreach(var c in Package_Grabber.clients) + { + if(c.Value.IsConnected) + { + var client = new BitnoteClient(c.Key); + client.GetBank(); + Clients.Add(client); + } + } + } + + public List Clients = null; + + public bool AddBitnotesToAddress(string addr, decimal amount) + { + bool res = false; + foreach(var c in Clients) + { + if(c.Addresses != null) + { + foreach(var a in c.Addresses) + { + if(a.Address == addr) + { + if (res == false) + { + a.Bitnotes += amount; + res = true; + } + } + } + c.UploadBank(c.Addresses); + } + } + return res; + } + + private void btnsync_Click(object sender, EventArgs e) + { + try + { + var t = new BackgroundWorker(); + t.DoWork += (object s, DoWorkEventArgs a) => + { + + foreach(var c in Clients) + { + SyncBitnotes(c.Addresses); + c.UploadBank(c.Addresses); + } + }; + t.RunWorkerAsync(); + } + catch + { + SyncBitnotes(new List()); + API.CreateInfoboxSession("Error", "You cannot sync your Bitnotes as the connection to the server has failed.", infobox.InfoboxMode.Info); + } + } + + /// + /// Syncs your private address with the provided list IF yours exists in there. If not, it'll add it. + /// + /// The list to sync. + public void SyncBitnotes(List lst) + { + bool cont = false; + int my_itm = 0; + foreach (var itm in lst) + { + if(itm.Address == API.BitnoteAddress.Address) + { + cont = true; + my_itm = lst.IndexOf(itm); + } + } + if(cont == true) + { + if(lst[my_itm].Bitnotes < API.BitnoteAddress.Bitnotes) + { + lst[my_itm].Bitnotes = API.BitnoteAddress.Bitnotes; + } + else + { + API.BitnoteAddress.Bitnotes = lst[my_itm].Bitnotes; + } + } + else + { + lst.Add(API.BitnoteAddress); + } + } + + public void UploadList(BitnoteClient client, List lst) + { + client.UploadBank(lst); + } + + + private void btnsend_Click(object sender, EventArgs e) + { + sendpanel.Show(); + } + + public void Info(string message) => API.CreateInfoboxSession("Error", message, infobox.InfoboxMode.Info); + + private void btnconfirmsend_Click(object sender, EventArgs e) + { + if (txtrecipient.Text != "") + { + if (AddBitnotesToAddress(txtrecipient.Text, Convert.ToDecimal(Convert.ToDecimal(txtamount.Text).ToString("#.#####")))) + { + Info("The Bitnotes have been sent successfully."); + } + else + { + Info("That address doesn't exist in the database."); + } + } + else + { + Info("You must enter a recipient Bitnote address!"); + } + sendpanel.Hide(); + } + + private void tmrrefresh_Tick(object sender, EventArgs e) + { + if(API.BitnoteAddress == null) + { + SaveSystem.Utilities.BitnoteAddress = new SaveSystem.PrivateBitnoteAddress(); + SaveSystem.Utilities.BitnoteAddress.Bitnotes = 0; + SaveSystem.Utilities.BitnoteAddress.Address = SaveSystem.Utilities.GenerateNewBitnoteAddress(); + } + txtmyaddress.Text = API.BitnoteAddress.Address; + if(API.BitnoteAddress.Bitnotes == 0) + { + lbmybitnotes.Text = "0 BTN"; + } + else + { + lbmybitnotes.Text = API.BitnoteAddress.Bitnotes.ToString("#.#####") + " BTN"; + } + } + + private void BitnoteWallet_Load(object sender, EventArgs e) + { + fltopbar.BackColor = API.CurrentSkin.titlebarcolour; + fltopbar.ForeColor = API.CurrentSkin.titletextcolour; + } + } + + public class BitnoteClient + { + /// + /// Creates a new Bitnote Client. + /// + /// IP address of the server to look at. + public BitnoteClient(string IP) + { + try + { + var c = Package_Grabber.clients[IP]; + c.OnReceived += (object s, NetReceivedEventArgs a) => + { + var obj = (ObjectModel)a.Data.Object; + switch (obj.Command) + { + case "fail": + Addresses = new List(); + break; + case "bitnote_bank": + try + { + Addresses = JsonConvert.DeserializeObject>(API.BitnoteEncryption.Decrypt((string)obj.OptionalObject)); + if(Addresses == null) + { + Addresses = new List(); + } + } + catch { + Addresses = new List(); + } + break; + } + }; + _IP = IP; + } + catch + { + throw new ArgumentException("IP address not found in client list."); + } + } + + private string _IP = ""; + public List Addresses = null; + + public void GetBank() + { + try + { + Package_Grabber.SendMessage(_IP, "btn getbank"); + } + catch + { + + } + } + + public void UploadBank(List bank) + { + try + { + Package_Grabber.SendMessage(_IP, "btn setbank", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(bank))); + } + catch + { + + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/BitnoteWallet.resx b/source/WindowsFormsApplication1/Apps/BitnoteWallet.resx new file mode 100644 index 0000000..09c4313 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteWallet.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Dodge.Designer.cs b/source/WindowsFormsApplication1/Apps/Dodge.Designer.cs new file mode 100644 index 0000000..46fce33 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Dodge.Designer.cs @@ -0,0 +1,230 @@ +using System; + +namespace ShiftOS +{ + partial class Dodge + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.player = new System.Windows.Forms.PictureBox(); + this.QuitButton = new System.Windows.Forms.PictureBox(); + this.BeginButton = new System.Windows.Forms.PictureBox(); + this.DescriptionLabel = new System.Windows.Forms.Label(); + this.object_small2 = new System.Windows.Forms.PictureBox(); + this.object_mid2 = new System.Windows.Forms.PictureBox(); + this.object_large = new System.Windows.Forms.PictureBox(); + this.object_small = new System.Windows.Forms.PictureBox(); + this.object_mid = new System.Windows.Forms.PictureBox(); + this.scorelabel = new System.Windows.Forms.Label(); + this.PicBonus = new System.Windows.Forms.PictureBox(); + this.clock = new System.Windows.Forms.Timer(this.components); + this.pgcontents.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.player)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.QuitButton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.BeginButton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_small2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_mid2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_large)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_small)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_mid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PicBonus)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.player); + this.pgcontents.Controls.Add(this.QuitButton); + this.pgcontents.Controls.Add(this.BeginButton); + this.pgcontents.Controls.Add(this.DescriptionLabel); + this.pgcontents.Controls.Add(this.object_small2); + this.pgcontents.Controls.Add(this.object_mid2); + this.pgcontents.Controls.Add(this.object_large); + this.pgcontents.Controls.Add(this.object_small); + this.pgcontents.Controls.Add(this.object_mid); + this.pgcontents.Controls.Add(this.scorelabel); + this.pgcontents.Controls.Add(this.PicBonus); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(418, 478); + this.pgcontents.TabIndex = 20; + // + // player + // + this.player.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.player.BackColor = System.Drawing.Color.Transparent; + this.player.Image = global::ShiftOS.Properties.Resources.player_Image; + this.player.Location = new System.Drawing.Point(192, 445); + this.player.Name = "player"; + this.player.Size = new System.Drawing.Size(32, 32); + this.player.TabIndex = 18; + this.player.TabStop = false; + // + // QuitButton + // + this.QuitButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.QuitButton.Image = global::ShiftOS.Properties.Resources.QuitButton_Image; + this.QuitButton.InitialImage = global::ShiftOS.Properties.Resources.QuitButton_Image; + this.QuitButton.Location = new System.Drawing.Point(216, 424); + this.QuitButton.Name = "QuitButton"; + this.QuitButton.Size = new System.Drawing.Size(200, 50); + this.QuitButton.TabIndex = 12; + this.QuitButton.TabStop = false; + this.QuitButton.Click += new System.EventHandler(this.QuitButton_Click); + // + // BeginButton + // + this.BeginButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.BeginButton.Image = global::ShiftOS.Properties.Resources.BeginButton1; + this.BeginButton.InitialImage = global::ShiftOS.Properties.Resources.BeginButton_Image; + this.BeginButton.Location = new System.Drawing.Point(3, 424); + this.BeginButton.Name = "BeginButton"; + this.BeginButton.Size = new System.Drawing.Size(200, 50); + this.BeginButton.TabIndex = 11; + this.BeginButton.TabStop = false; + this.BeginButton.Click += new System.EventHandler(this.BeginButton_Click); + // + // DescriptionLabel + // + this.DescriptionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.DescriptionLabel.Location = new System.Drawing.Point(3, 3); + this.DescriptionLabel.Name = "DescriptionLabel"; + this.DescriptionLabel.Size = new System.Drawing.Size(413, 409); + this.DescriptionLabel.TabIndex = 10; + this.DescriptionLabel.Text = "Placeholder"; + // + // object_small2 + // + this.object_small2.Image = global::ShiftOS.Properties.Resources.object_small2_Image; + this.object_small2.Location = new System.Drawing.Point(75, 43); + this.object_small2.Name = "object_small2"; + this.object_small2.Size = new System.Drawing.Size(75, 20); + this.object_small2.TabIndex = 17; + this.object_small2.TabStop = false; + // + // object_mid2 + // + this.object_mid2.Image = global::ShiftOS.Properties.Resources.object_mid2_Image; + this.object_mid2.Location = new System.Drawing.Point(279, 134); + this.object_mid2.Name = "object_mid2"; + this.object_mid2.Size = new System.Drawing.Size(125, 20); + this.object_mid2.TabIndex = 16; + this.object_mid2.TabStop = false; + // + // object_large + // + this.object_large.Image = global::ShiftOS.Properties.Resources.object_large_Image; + this.object_large.Location = new System.Drawing.Point(49, 208); + this.object_large.Name = "object_large"; + this.object_large.Size = new System.Drawing.Size(175, 20); + this.object_large.TabIndex = 15; + this.object_large.TabStop = false; + // + // object_small + // + this.object_small.Image = global::ShiftOS.Properties.Resources.object_small_Image; + this.object_small.Location = new System.Drawing.Point(290, 294); + this.object_small.Name = "object_small"; + this.object_small.Size = new System.Drawing.Size(75, 20); + this.object_small.TabIndex = 13; + this.object_small.TabStop = false; + // + // object_mid + // + this.object_mid.Image = global::ShiftOS.Properties.Resources.object_mid_Image; + this.object_mid.Location = new System.Drawing.Point(58, 371); + this.object_mid.Name = "object_mid"; + this.object_mid.Size = new System.Drawing.Size(125, 20); + this.object_mid.TabIndex = 14; + this.object_mid.TabStop = false; + // + // scorelabel + // + this.scorelabel.AutoSize = true; + this.scorelabel.BackColor = System.Drawing.Color.Transparent; + this.scorelabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.scorelabel.Location = new System.Drawing.Point(3, 4); + this.scorelabel.Name = "scorelabel"; + this.scorelabel.Size = new System.Drawing.Size(51, 55); + this.scorelabel.TabIndex = 19; + this.scorelabel.Text = "0"; + // + // PicBonus + // + this.PicBonus.Image = global::ShiftOS.Properties.Resources.PicBonus_Image; + this.PicBonus.Location = new System.Drawing.Point(187, 84); + this.PicBonus.Name = "PicBonus"; + this.PicBonus.Size = new System.Drawing.Size(16, 11); + this.PicBonus.TabIndex = 20; + this.PicBonus.TabStop = false; + this.PicBonus.Visible = false; + // + // clock + // + this.clock.Interval = 20; + this.clock.Tick += new System.EventHandler(this.clock_Tick); + // + // Dodge + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(418, 478); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.Name = "Dodge"; + this.Text = "Dodge"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Form1_Load); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_keydown); + this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.player)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.QuitButton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.BeginButton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_small2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_mid2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_large)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_small)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_mid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PicBonus)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.PictureBox player; + internal System.Windows.Forms.PictureBox QuitButton; + internal System.Windows.Forms.PictureBox BeginButton; + internal System.Windows.Forms.Label DescriptionLabel; + internal System.Windows.Forms.PictureBox object_small2; + internal System.Windows.Forms.PictureBox object_mid2; + internal System.Windows.Forms.PictureBox object_large; + internal System.Windows.Forms.PictureBox object_small; + internal System.Windows.Forms.PictureBox object_mid; + internal System.Windows.Forms.Label scorelabel; + internal System.Windows.Forms.Timer clock; + internal System.Windows.Forms.PictureBox PicBonus; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Dodge.cs b/source/WindowsFormsApplication1/Apps/Dodge.cs new file mode 100644 index 0000000..320347d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Dodge.cs @@ -0,0 +1,291 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Dodge : Form + { + /// + /// C# port of Dodge made by william.1008 in ShiftOS 0.0.8. + /// + public Dodge() + { + InitializeComponent(); + } + + //the speed the game runs at + decimal speed; + //the score/code points the player gets + int score; + //user can use mouse or keyboard, mouse by default, chnages to true if key pressed + bool usingkeys = false; + //Records the time spent playing, used for codepoints formula + decimal time = 0; + //Number or bonus play collects + int bonusesfound; + //for smooth keyboard gameplay, 1=left, 2=right, 0=none + int keyboardinput = 0; + + //When quit clicked + // ERROR: Handles clauses are not supported in C# + private void QuitButton_Click(object sender, EventArgs e) + { + this.Close(); + } + + // ERROR: Handles clauses are not supported in C# + private void Form1_KeyUp(object sender, KeyEventArgs e) + { + keyboardinput = 0; + } + + // ERROR: Handles clauses are not supported in C# + private void Form1_Load(object sender, EventArgs e) + { + player.Visible = false; + // hide player and score until game starts + scorelabel.Visible = false; + DescriptionLabel.Text = "Welcome to Dodge. Dodge is a simple arcade game with one objective: survive the falling objects! Use the arrow or mouse to move the player and avoid as many objects as you can. The longer you survive, the more code point you will be rewarded with. Beware, it gets harder..."; + // set the description text + + //to impliment skinning, simply set the picturebox to the new skinned image. + //For example: + //player.Image = Image.FromFile("PATH TO SKINNED IMAGE") + } + + //When begin click + // ERROR: Handles clauses are not supported in C# + private void BeginButton_Click(object sender, EventArgs e) + { + + //Hide buttons + BeginButton.Visible = false; + QuitButton.Visible = false; + DescriptionLabel.Visible = false; + + player.Visible = true; + // show the player + speed = 2; + // controls speed of game, will increase as game progresses + scorelabel.Visible = true; + // show score label + bonusesfound = 0; + + //Make sure all objects are in the correct position + object_small.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 300); + object_small2.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 49); + object_mid.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 377); + object_mid2.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 140); + object_large.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 214); + PicBonus.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), -20); + + //Reset time + time = 0; + + usingkeys = false; + + System.Threading.Thread.Sleep(100); + // slight delay before game starts (in milliseconds) + + main(); + // start the main game sub + + //sig() 'infobox sigs - COMMENT THIS OUT + } + + public decimal Rnd() + { + return new Random().Next(0, pgcontents.Width); + } + + public void Form1_keydown(System.Object sender, System.Windows.Forms.KeyEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Right: + // detect right key press + usingkeys = true; + // turn off mouse control + keyboardinput = 2; + break; + case Keys.Left: + usingkeys = true; + keyboardinput = 1; + break; + } + + } + + private bool BlindMode = false; + + private void main() + { + if(BlindMode == true) + { + object_large.Image = null; + object_mid.Image = null; + object_mid2.Image = null; + object_small.Image = null; + object_small2.Image = null; + object_large.BackColor = Color.Black; + object_mid.BackColor = Color.Black; + object_mid2.BackColor = Color.Black; + object_small.BackColor = Color.Black; + object_small2.BackColor = Color.Black; + } + else + { + object_large.Image = Properties.Resources.object_large_Image; + object_mid.Image = null; + object_mid2.Image = null; + object_small.Image = null; + object_small2.Image = null; + object_large.BackColor = Color.Black; + object_mid.BackColor = Color.Black; + object_mid2.BackColor = Color.Black; + object_small.BackColor = Color.Black; + object_small2.BackColor = Color.Black; + } + + clock.Start(); + //the timer restart this sub every tick, making an endless loop between them. + + //score system + scorelabel.Text = score.ToString(); + score = Convert.ToInt16((speed / 10) + (time / 20) + bonusesfound); + + //Speed increase + speed = speed + (speed * (decimal)0.001); + + //increase time + time = time + (decimal)0.05; + //loops every 0.05 seconds so time increases by 1 every second (have I done the maths correctly?) + + //Make objects fall + object_large.Location = new Point(object_large.Location.X, object_large.Location.Y + (int)speed); + object_mid.Location = new Point(object_mid.Location.X, object_mid.Location.Y + (int)speed); + object_mid2.Location = new Point(object_mid2.Location.X, object_mid2.Location.Y + (int)speed); + object_small.Location = new Point(object_small.Location.X, object_small.Location.Y + (int)speed); + object_small2.Location = new Point(object_small2.Location.X, object_small2.Location.Y + (int)speed); + + //mouse controls + // tests if mouse control is enabled + if (usingkeys == false) + { + player.Location = new Point(MousePosition.X - this.Location.X - (player.Size.Width / 2) - 5, player.Location.Y); + //sets the x location to that of the mouse + } + + //keyboard controls + if (usingkeys == true) + { + if (keyboardinput == 1) + { + player.Location = new Point(player.Location.X - ((int)speed * 4), player.Location.Y); + } + if (keyboardinput == 2) + { + player.Location = new Point(player.Location.X + ((int)speed * 4), player.Location.Y); + // move right + } + } + + //move object back to the top of the screen + if (object_small.Location.Y > 522) + { + object_small.Location = new Point((int)(Math.Ceiling((decimal)Rnd())), -20); + //picks a random number between 0 and 453 (window width) and sets the x position to this value. uses -20 for y as it is above the top of window + } + if (object_small2.Location.Y > 522) + { + object_small2.Location = new Point((int)(Math.Ceiling((decimal)Rnd())), -20); + } + if (object_mid.Location.Y > 522) + { + object_mid.Location = new Point((int)(Math.Ceiling(Rnd())), -20); + } + if (object_mid2.Location.Y > 522) + { + object_mid2.Location = new Point((int)(Math.Ceiling(Rnd())), -20); + } + if (object_large.Location.Y > 522) + { + object_large.Location = new Point((int)(Math.Ceiling(Rnd())), -20); + } + + //Makes sure the player is on the screen (Anti-cheating) + if (player.Location.X > 375) + { + player.Location = new Point(385, player.Location.Y); + } + if (player.Location.X < 0) + { + player.Location = new Point(0, player.Location.Y); + } + + //Bonus + if (PicBonus.Visible == false) + { + int ran = (int)Math.Ceiling(Rnd() * 300); + //random 1 in 500 chance + if (ran == 1) + { + PicBonus.Visible = true; + } + } + else { + PicBonus.Location = new Point(PicBonus.Location.X, PicBonus.Location.Y + (int)speed); + if (PicBonus.Location.Y > 522) + { + PicBonus.Location = new Point((int)Math.Ceiling(Rnd()), -20); + PicBonus.Visible = false; + } + } + + //check collisions + if (player.Bounds.IntersectsWith(object_mid.Bounds) | player.Bounds.IntersectsWith(object_mid2.Bounds) | player.Bounds.IntersectsWith(object_large.Bounds) | player.Bounds.IntersectsWith(object_small.Bounds) | player.Bounds.IntersectsWith(object_small2.Bounds)) + { + clock.Stop(); + //breaks loop + System.Threading.Thread.Sleep(333); + //delay for a third of a second + player.Visible = false; + //hide game + DescriptionLabel.Text = "Sorry, you just lost the game, however, you earnt a total of " + score + " code points. To earn more code points, press the begin button now. To exit, press the quit button"; + // change the description to the die message + API.AddCodepoints(score); + DescriptionLabel.Visible = true; + //show non-game elements + BeginButton.Visible = true; + QuitButton.Visible = true; + scorelabel.Visible = false; + } + if (player.Bounds.IntersectsWith(PicBonus.Bounds)) + { + PicBonus.Visible = false; + bonusesfound = bonusesfound + 1; + PicBonus.Location = new Point((int)(Math.Ceiling(Rnd())), -20); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void clock_Tick(object sender, EventArgs e) + { + main(); + //repeat the main sub (endless loop) + } + + private void sig() + { + API.CreateInfoboxSession("FLAG", "There is no foul on the play, the punt was blocked.", infobox.InfoboxMode.Info); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Dodge.resx b/source/WindowsFormsApplication1/Apps/Dodge.resx new file mode 100644 index 0000000..f6e2b3b --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Dodge.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 48 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs b/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs new file mode 100644 index 0000000..30d41d8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs @@ -0,0 +1,245 @@ +namespace ShiftOS +{ + partial class File_Skimmer + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(File_Skimmer)); + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.toolStrip2 = new System.Windows.Forms.ToolStrip(); + this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); + this.txtfilename = new System.Windows.Forms.ToolStripTextBox(); + this.cbfiletypes = new System.Windows.Forms.ToolStripComboBox(); + this.btnperformaction = new System.Windows.Forms.ToolStripButton(); + this.btncancel = new System.Windows.Forms.ToolStripButton(); + this.lvfiles = new System.Windows.Forms.ListView(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.lbcurrentfolder = new System.Windows.Forms.ToolStripLabel(); + this.imgtypes = new System.Windows.Forms.ImageList(this.components); + this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); + this.toolStripContainer1.ContentPanel.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.toolStrip2.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // toolStripContainer1 + // + // + // toolStripContainer1.BottomToolStripPanel + // + this.toolStripContainer1.BottomToolStripPanel.Controls.Add(this.toolStrip2); + // + // toolStripContainer1.ContentPanel + // + this.toolStripContainer1.ContentPanel.Controls.Add(this.lvfiles); + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(763, 348); + this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); + this.toolStripContainer1.Name = "toolStripContainer1"; + this.toolStripContainer1.Size = new System.Drawing.Size(763, 413); + this.toolStripContainer1.TabIndex = 0; + this.toolStripContainer1.Text = "toolStripContainer1"; + // + // toolStripContainer1.TopToolStripPanel + // + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1); + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); + // + // toolStrip2 + // + this.toolStrip2.AutoSize = false; + this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripLabel1, + this.txtfilename, + this.cbfiletypes, + this.btnperformaction, + this.btncancel}); + this.toolStrip2.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; + this.toolStrip2.Location = new System.Drawing.Point(0, 0); + this.toolStrip2.Name = "toolStrip2"; + this.toolStrip2.Size = new System.Drawing.Size(763, 23); + this.toolStrip2.Stretch = true; + this.toolStrip2.TabIndex = 0; + // + // toolStripLabel1 + // + this.toolStripLabel1.Name = "toolStripLabel1"; + this.toolStripLabel1.Size = new System.Drawing.Size(63, 15); + this.toolStripLabel1.Text = "File Name:"; + // + // txtfilename + // + this.txtfilename.Name = "txtfilename"; + this.txtfilename.Size = new System.Drawing.Size(500, 23); + // + // cbfiletypes + // + this.cbfiletypes.Name = "cbfiletypes"; + this.cbfiletypes.Size = new System.Drawing.Size(75, 23); + this.cbfiletypes.Text = ".txt"; + this.cbfiletypes.SelectedIndexChanged += new System.EventHandler(this.cbfiletypes_SelectedIndexChanged); + // + // btnperformaction + // + this.btnperformaction.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btnperformaction.Image = ((System.Drawing.Image)(resources.GetObject("btnperformaction.Image"))); + this.btnperformaction.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btnperformaction.Name = "btnperformaction"; + this.btnperformaction.Size = new System.Drawing.Size(40, 19); + this.btnperformaction.Text = "Open"; + this.btnperformaction.Click += new System.EventHandler(this.btnperformaction_Click); + // + // btncancel + // + this.btncancel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btncancel.Image = ((System.Drawing.Image)(resources.GetObject("btncancel.Image"))); + this.btncancel.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btncancel.Name = "btncancel"; + this.btncancel.Size = new System.Drawing.Size(47, 19); + this.btncancel.Text = "Cancel"; + this.btncancel.Click += new System.EventHandler(this.btncancel_Click); + // + // lvfiles + // + this.lvfiles.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvfiles.Location = new System.Drawing.Point(0, 0); + this.lvfiles.Name = "lvfiles"; + this.lvfiles.Size = new System.Drawing.Size(763, 348); + this.lvfiles.TabIndex = 0; + this.lvfiles.UseCompatibleStateImageBehavior = false; + this.lvfiles.SelectedIndexChanged += new System.EventHandler(this.lvfiles_SelectedIndexChanged); + // + // menuStrip1 + // + this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newFolderToolStripMenuItem, + this.deleteToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(763, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // newFolderToolStripMenuItem + // + this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem"; + this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(79, 20); + this.newFolderToolStripMenuItem.Text = "New Folder"; + this.newFolderToolStripMenuItem.Click += new System.EventHandler(this.newFolderToolStripMenuItem_Click); + // + // deleteToolStripMenuItem + // + this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(52, 20); + this.deleteToolStripMenuItem.Text = "Delete"; + this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.lbcurrentfolder}); + this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table; + this.toolStrip1.Location = new System.Drawing.Point(0, 24); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.ShowItemToolTips = false; + this.toolStrip1.Size = new System.Drawing.Size(763, 18); + this.toolStrip1.Stretch = true; + this.toolStrip1.TabIndex = 1; + // + // lbcurrentfolder + // + this.lbcurrentfolder.Name = "lbcurrentfolder"; + this.lbcurrentfolder.Size = new System.Drawing.Size(12, 15); + this.lbcurrentfolder.Text = "/"; + // + // imgtypes + // + this.imgtypes.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgtypes.ImageStream"))); + this.imgtypes.TransparentColor = System.Drawing.Color.Transparent; + this.imgtypes.Images.SetKeyName(0, "application"); + this.imgtypes.Images.SetKeyName(1, "package"); + this.imgtypes.Images.SetKeyName(2, "none"); + this.imgtypes.Images.SetKeyName(3, "doc"); + this.imgtypes.Images.SetKeyName(4, "dir"); + this.imgtypes.Images.SetKeyName(5, "skin"); + // + // File_Skimmer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(763, 413); + this.Controls.Add(this.toolStripContainer1); + this.Name = "File_Skimmer"; + this.Text = "File_Skimmer"; + this.Load += new System.EventHandler(this.File_Skimmer_Load); + this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.ContentPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.toolStrip2.ResumeLayout(false); + this.toolStrip2.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStripContainer toolStripContainer1; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem newFolderToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ListView lvfiles; + private System.Windows.Forms.ToolStripLabel lbcurrentfolder; + private System.Windows.Forms.ImageList imgtypes; + private System.Windows.Forms.ToolStrip toolStrip2; + private System.Windows.Forms.ToolStripLabel toolStripLabel1; + private System.Windows.Forms.ToolStripTextBox txtfilename; + private System.Windows.Forms.ToolStripComboBox cbfiletypes; + private System.Windows.Forms.ToolStripButton btnperformaction; + private System.Windows.Forms.ToolStripButton btncancel; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.cs b/source/WindowsFormsApplication1/Apps/File Skimmer.cs new file mode 100644 index 0000000..4ee8531 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/File Skimmer.cs @@ -0,0 +1,602 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class File_Skimmer : Form + { + /// + /// Opens a file in the proper program. + /// + /// Path to the file. + public void OpenFile(string filepath) + { + bool success = true; + FileInfo finf = new FileInfo(filepath); + switch(finf.Extension) + { + case ".saa": + if(API.Upgrades["shiftnet"] == true) + { + API.LaunchMod(finf.FullName); + } + else + { + success = false; + } + break; + case ".txt": + if (API.Upgrades["textpadopen"] == true) + { + var pad = new TextPad(); + pad.txtuserinput.Text = File.ReadAllText(finf.FullName); + API.CreateForm(pad, "TextPad", Properties.Resources.iconTextPad); + } else + { + success = false; + } + break; + case ".pkg": + case ".stp": + if (API.Upgrades["shiftnet"] == true) + { + API.CreateInfoboxSession("Package Installation", "Would you like to install the package?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var result = API.GetInfoboxResult(); + if (result == "Yes") + { + try + { + var res = Package_Grabber.ExtractPackage(finf.FullName); + if (res == "fail") + { + throw new Exception("Michael was dumb and messed something up."); + } + else + { + Package_Grabber.InstallPackage(res + "\\"); + API.CreateInfoboxSession("Package Installer - Success", "The package has been installed successfully!", infobox.InfoboxMode.Info); + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + } + } + catch (Exception ex) + { + if (API.DeveloperMode == true) + { + API.CreateInfoboxSession("Package Installer - Error", ex.Message, infobox.InfoboxMode.Info); + } + else + { + API.CreateInfoboxSession("Package Installer - Error", "An error has occurred while installing the package.", infobox.InfoboxMode.Info); + } + } + } + }; + } + else { + success = false; + } + break; + case ".skn": + if(API.Upgrades["skinning"] == true) + { + var loader = new SkinLoader(); + API.CreateForm(loader, API.LoadedNames.SkinLoaderName, Properties.Resources.iconSkinLoader); + loader.LoadSkin(finf.FullName); + } + else + { + success = false; + } + break; + case ".spk": + if (API.Upgrades["skinning"] == true) + { + var loader = new SkinLoader(); + loader.LoadedPack = finf.FullName; + API.CreateForm(loader, API.LoadedNames.SkinLoaderName, Properties.Resources.iconSkinLoader); + loader.SetupPackUI(); + } + else + { + success = false; + } + break; + default: + success = false; + break; + } + //If we made it this far and nothing happened, tell the user. + if(success == false) + { + API.CreateInfoboxSession("File Skimmer", "File Skimmer cannot find a program to open this file.", infobox.InfoboxMode.Info); + } + } + + /// + /// The File Skimmer. + /// + public File_Skimmer() + { + MountMgr.Init(); + InitializeComponent(); + } + + public File_Skimmer(FileSkimmerMode mode, string filters) + { + InitializeComponent(); + Mode = mode; + Filters = filters.Split(';'); + } + + public string CurrentFolder = Paths.SaveRoot; + + private void File_Skimmer_Load(object sender, EventArgs e) + { + SetupUI(); + ListFiles(); + lvfiles.DoubleClick += (object s, EventArgs a) => + { + if(lvfiles.SelectedItems.Count > 0) + { + var item = lvfiles.SelectedItems[0]; + string tag = (string)item.Tag; + if(Directory.Exists(tag)) + { + txtfilename.Text = new DirectoryInfo(tag).Name; + CurrentFolder = tag; + ListFiles(); + + } else + { + if(File.Exists(tag)) + { + if(Mode == FileSkimmerMode.Open) + { + FileInfo finf = new FileInfo(tag); + txtfilename.Text = finf.Name.Replace(finf.Extension, ""); + btnperformaction_Click(s, a); + } + else if(Mode == FileSkimmerMode.Default) + { + OpenFile(tag); + } + } else + { + if(tag == "_uponedir") + { + if (lbcurrentfolder.Text != "/") + { + if (MountPoint != null && lbcurrentfolder.Text == MountPoint.Replace("\\", "/")) + { + CurrentFolder = Paths.SaveRoot; + ListFiles(); + + } + else + { + CurrentFolder = Directory.GetParent(CurrentFolder).FullName; + ListFiles(); + } + } else + { + API.CreateInfoboxSession("Can't read directory", "File Skimmer is not able to read the requested directory as it is not formatted with the ShiftFS file system.", infobox.InfoboxMode.Info); + } + } + else if(tag.StartsWith("drv:")) + { + string drivepath = tag.Remove(0, 4); + CurrentFolder = drivepath; + MountPoint = drivepath; + ListFiles(); + } + } + } + } + }; + + txtfilename.KeyDown += (object s, KeyEventArgs a) => + { + if (a.KeyCode == Keys.Enter) + { + a.SuppressKeyPress = true; + btnperformaction_Click(s, (EventArgs)a); + } + }; + } + + string MountPoint = null; + + /// + /// Lists all the files in the current folder. + /// + public void ListFiles() + { + MountMgr.Init(); + SetupImages(); + txtfilename.Text = ""; + //SetupUI(); + newFolderToolStripMenuItem.Visible = API.Upgrades["fsnewfolder"]; + deleteToolStripMenuItem.Visible = API.Upgrades["fsdelete"]; + if(newFolderToolStripMenuItem.Visible == false && deleteToolStripMenuItem.Visible == false) + { + menuStrip1.Hide(); + } else + { + menuStrip1.Show(); + } + lbcurrentfolder.Text = CurrentFolder.Replace(Paths.SaveRoot, "/").Replace("\\", "/").Replace("//", "/"); + lvfiles.Items.Clear(); + lvfiles.LargeImageList = imgtypes; + ListViewItem upone = new ListViewItem(); + upone.Text = "Up One Level"; + upone.Tag = "_uponedir"; + upone.ImageKey = "directory"; + lvfiles.Items.Add(upone); + if(CurrentFolder == Paths.SaveRoot) + { + foreach(var drive in MountMgr.links) + { + var dinf = new DirectoryInfo(drive.Key); + var item = new ListViewItem(); + item.Text = drive.Value; + item.Tag = "drv:" + dinf.FullName; + lvfiles.Items.Add(item); + item.ImageKey = "directory"; + } + } + foreach (string dir in Directory.GetDirectories(CurrentFolder)) + { + var dirinf = new DirectoryInfo(dir); + ListViewItem lvitem = new ListViewItem(); + lvitem.Text = dirinf.Name; + lvitem.Tag = dirinf.FullName; + lvitem.ImageKey = "directory"; + if (!dirinf.Name.StartsWith("_")) + { + lvfiles.Items.Add(lvitem); + } + else { + if (API.DeveloperMode == true) + { + lvfiles.Items.Add(lvitem); + } + } + } + foreach (string file in Directory.GetFiles(CurrentFolder)) + { + var dirinf = new FileInfo(file); + ListViewItem lvitem = new ListViewItem(); + lvitem.Text = dirinf.Name; + lvitem.Tag = dirinf.FullName; + lvitem.ImageKey = GetFileType(dirinf.Extension); + if (!dirinf.Name.StartsWith("_")) + { + AddItem(lvitem); + } + else { + if (API.DeveloperMode == true) + { + AddItem(lvitem); + } + } + } + + } + + public FileSkimmerMode Mode = FileSkimmerMode.Default; + public string FileName = ""; + private string[] Filters = null; + + /// + /// Sets up the user interface. + /// + private void SetupUI() + { + switch(Mode) + { + case FileSkimmerMode.Default: + Filters = null; + this.toolStrip2.Hide(); + break; + case FileSkimmerMode.Open: + this.toolStrip2.Show(); + this.btnperformaction.Text = "Open"; + cbfiletypes.Items.Clear(); + foreach (string filter in Filters) + { + cbfiletypes.Items.Add(filter); + } + selectedFilter = Filters[0]; + cbfiletypes.Text = Filters[0]; + break; + case FileSkimmerMode.Save: + this.toolStrip2.Show(); + this.btnperformaction.Text = "Save"; + cbfiletypes.Items.Clear(); + foreach (string filter in Filters) + { + cbfiletypes.Items.Add(filter); + } + selectedFilter = Filters[0]; + cbfiletypes.Text = Filters[0]; + break; + case FileSkimmerMode.OpenFolder: + this.toolStrip2.Show(); + this.btnperformaction.Text = "Open"; + cbfiletypes.Visible = false; + selectedFilter = "dir"; + break; + } + } + + /// + /// UI mode. + /// + public enum FileSkimmerMode + { + Default, + Open, + Save, + OpenFolder + } + + /// + /// Adds an item to the file list. + /// + /// Item to add. + private void AddItem(ListViewItem item) + { + if (Mode == FileSkimmerMode.Default) + { + lvfiles.Items.Add(item); + } else if(Mode == FileSkimmerMode.OpenFolder) { + if (Directory.Exists(item.Tag.ToString())) + { + lvfiles.Items.Add(item); + } + } else + { + if (item.Text.ToLower().EndsWith(selectedFilter.ToLower())) + { + lvfiles.Items.Add(item); + } + } + } + + /// + /// Adds appropriate icons from icon registry to display files. + /// + public void SetupImages() + { + imgtypes.Images.Clear(); + imgtypes.Images.Add("application", API.GetIcon("SAAFile")); + imgtypes.Images.Add("directory", API.GetIcon("Folder")); + imgtypes.Images.Add("doc", API.GetIcon("TextFile")); + imgtypes.Images.Add("skin", API.GetIcon("SkinFile")); + imgtypes.Images.Add("package", API.GetIcon("SetupPackage")); + imgtypes.Images.Add("none", API.GetIcon("UnrecognizedFile")); + } + + /// + /// Returns proper file ID based on extension + /// + /// Extension to test. + /// The File ID. + public string GetFileType(string extension) + { + SetupImages(); + switch(extension) + { + case ".owd": + case ".doc": + case ".docx": + case ".txt": + return "doc"; + case ".exe": + case ".saa": + return "application"; + case ".stp": + case ".pkg": + case ".mod": + return "package"; + case ".skn": + case ".spk": + return "skin"; + default: + return "none"; + } + } + + private void newFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Create New Folder", "Please enter the name of the folder.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string dname = API.GetInfoboxResult(); + if (dname != "" && dname != "Cancelled") + { + string dirsepchar = ""; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsepchar = "\\"; + break; + default: + dirsepchar = "/"; + break; + } + if (dname.Contains("/") || dname.Contains("\\")) + { + API.CreateInfoboxSession("Error", "Directories cannot have '\\' or '/' in their names!", infobox.InfoboxMode.Info); + } + else { + string fullname = CurrentFolder + dirsepchar + dname; + try + { + if (!Directory.Exists(fullname)) + { + Directory.CreateDirectory(fullname); + } + } + catch + { + API.CreateInfoboxSession("Error", "File Skimmer could not create the directory.", infobox.InfoboxMode.Info); + } + } + } + ListFiles(); + }; + } + + private void deleteToolStripMenuItem_Click(object sender, EventArgs e) + { + string res = "nothing"; + if(lvfiles.SelectedItems.Count > 0) + { + var lvitem = lvfiles.SelectedItems[0]; + string lvtag = (string)lvitem.Tag; + switch(lvtag) + { + + case "_upOne": + res = "up"; + break; + default: + if(Directory.Exists(lvtag)) + { + res = "dir"; + } else + { + if(File.Exists(lvtag)) + { + res = "file"; + } + } + break; + } + switch(res) + { + case "file": + API.CreateInfoboxSession("Delete File", "Are you sure you want to delete this file?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + if(API.GetInfoboxResult() == "Yes") + { + File.Delete(lvtag); + ListFiles(); + } + }; + break; + case "dir": + var fname = lvtag; + if(CheckTag(fname) == true) + { + API.CreateInfoboxSession("Permission denied", "You cannot delete this directory as you are denied permission.", infobox.InfoboxMode.Info); + } + else + { + API.CreateInfoboxSession("Delete Folder", "Are you sure you want to delete this folder? Everything inside it will be permanently lost!", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + if (API.GetInfoboxResult() == "Yes") + { + Directory.Delete(lvtag, true); + ListFiles(); + } + }; + } + break; + case "up": + API.CreateInfoboxSession("File Skimmer", "You cannot delete the 'Up One Level' file because it is not a real file.", infobox.InfoboxMode.Info); + break; + } + } + } + + /// + /// No idea what this does but it seems to be needed so don't touch it. + /// + /// Path to a file. + /// Oh NOW I know what this does. It returns whether this file can be deleted or if it's a vital save file. + private bool CheckTag(string fullpath) + { + var correct = fullpath + OSInfo.DirectorySeparator; + if (correct == Paths.SystemDir || correct == Paths.Applications || correct == Paths.Skins || correct == Paths.ToBeLoaded || correct == Paths.LoadedSkin || correct == Paths.SoftwareData || correct == Paths.Drivers || correct == Paths.Mod_AppLauncherEntries || correct == Paths.Mod_Temp) + { + return true; + } + else + { + return false; + } + } + + private string selectedFilter = null; + + private void cbfiletypes_SelectedIndexChanged(object sender, EventArgs e) + { + selectedFilter = (string)cbfiletypes.SelectedItem; + ListFiles(); + } + + private void btnperformaction_Click(object sender, EventArgs e) + { + if (txtfilename.Text != "") + { + string dirsepchar = "\\"; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsepchar = "\\"; + break; + default: + dirsepchar = "/"; + break; + } + string fullPath = null; + if (Mode == FileSkimmerMode.OpenFolder) + { + fullPath = CurrentFolder + dirsepchar + txtfilename.Text; + } + else { + fullPath = CurrentFolder + dirsepchar + txtfilename.Text.Replace(selectedFilter, "") + selectedFilter; + } + FileName = fullPath; + this.Close(); + } + } + + private void btncancel_Click(object sender, EventArgs e) + { + FileName = ""; + this.Close(); + } + + private void lvfiles_SelectedIndexChanged(object sender, EventArgs e) + { + try + { + var itm = lvfiles.SelectedItems[0]; + if(File.Exists(itm.Tag.ToString())) + { + txtfilename.Text = itm.Text; + } + } + catch + { + + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.resx b/source/WindowsFormsApplication1/Apps/File Skimmer.resx new file mode 100644 index 0000000..2d817a4 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/File Skimmer.resx @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 339, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + 17, 17 + + + 132, 17 + + + 237, 17 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAm + JwAAAk1TRnQBSQFMAgEBBgEAAVABAAFQAQABQAEAAUABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + BAABAQIAAYADAAEBAQABCAYAAYAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA + AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 + AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA + AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm + AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM + AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA + ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz + AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ + AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM + AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA + AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA + AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ + AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/ + AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA + AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm + ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ + Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz + AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA + AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM + AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM + ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM + Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA + AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM + AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ + AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz + AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm + AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw + AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEAQPTAAAH/Afc87AEH + AfTAAAH/ARQBDjoQAQ4B7AH0wAAB/wIUOuwBEAHsAfTAAAH/AhQ67AEQAewB9MAAAf8CFDrsARAB7AH0 + wAAB/wIUOuwBEAHsAfTAAAH/AhQ67AEQAewB9MAAAf8CFDrsARAB7AH0wAAB/wIUOuwBEAHsAfQ/9wHw + gAAB/wIUOuwBEAHsAfQBAAEQOxUBQwEOAeyAAAH/AhQ67AEQAewB9AEAAe088QEUAeyAAAH/AhQ67AEQ + AewB9AEAAe87/wH0ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AfI1vAHwAfQB/wH0ARIB7IAAAf8CFDrs + ARAB7AH0AQAB7wL/Afg1EQFDAQcB/wH0ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW01AAEOAe8B/wH0 + ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAEOCBEBDwEAAQ8IEQIOARAHEQEQAQ4BAAEOAe8B/wH0 + ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAESCLwB7AEAAewIvAFtARAB7we8AQcBQwEAAQ4B7wH/ + AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B9AHvBewB8AHvAQ4BkgHxBewB9wH0AfgBQwHw + AQcF7AEHAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B8wEUBQAB9wHv + AQ4BkgHvAQ4EAAEVAfEB6wFDAfAB+AUAAW0B8gEUAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEA + Ae8C/wFtFAABbQHzARQFAAH3Ae8BDgGSAe8BDgQAARUB8QHrAUMB8AH4BQABbQHyARQBAAEOAe8B/wH0 + ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAFtAfMBFAUAAfcB7wEOAZIB7wEOBAABFQHxAesBQwHw + AfgFAAFtAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B8wEUBQAB9wHv + AQ4BkgHvAQ4EAAEVAfEB6wFDAfAB+AUAAW0B8gEUAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEA + Ae8C/wFtFAABbQHzARQFAAH3Ae8BDgGSAe8BDgQAARUB8QHrAUMB8AH4BQABbQHyARQBAAEOAe8B/wH0 + ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAFtAfQB7QVtAbwB7wEOAZIB8AHrBG0B7AHzAesBQwHw + Ae8FbQHvAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0I8wH3AQ4B7Qjz + AesBEQG8B/MB8QEVAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEAAe8C/wFtFAABDwETBhQBEwFD + AQABEQETBhQBEwEQAQ4BFQETBxQBDgEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbTUA + AQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbTYOAQcB/wH0ARIB7IAAAf8CFDrsARAB7AH0 + AQAB7wL/Abw27wHzAf8B9AESAeyAAAH/ARQBQzptAQ8B7AH0AQAB7zv/AfQBEgHsgAAB/wEUPAAB7AH0 + AQAB7zv/AfQBEgHsgAAB/wG8AW0BDxNtARMBAAHsJAcB8QH0AQAB7zv/AfQBEgHsgAAC/wHsARAS7AFt + ARIB7AHxJf8B9AEAAe87/wH0ARIB7IAAAv8B7AEQEuwCFCf/AfQBAAHvO/8B9AESAeyAAAL/AewBEBLs + AhQn/wH0AQAB7wL/Abw27wHzAf8B9AESAeyAAAL/AewBEBHsARUB6wG8J/8B9AEAAe8C/wHvNuwB8QH/ + AfQBEgHsgAAC/wHsARAP7AHrARQB6wEHKP8B9AEAAe8C/wHvNuwB8QH/AfQBEgHsgAAC/wHsARAO7AHr + AeoBFAG8Kf8B9AEAAe8C/wHvFOwBbQhDARMB+AESCEMB6gHrARQHQwEVAW0C7AHxAf8B9AESAeyAAAL/ + AewBEA7sAhQr/wH0AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEUAW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAA + Av8B8QHtDhAB6wG8K/8B9AEAAe8C/wHvFOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AES + AeyAAAP/AfEO7AEHLP8B9AEAAe8C/wHvFOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AES + AeyAAD//AfQBAAHvAv8B7xTsARMIAAERAfgBQwgAARQBbQEOBwABDgFtAuwB8QH/AfQBEgHsgAA//wH0 + AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEUAW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAAP/8B9AEAAe8C/wHv + FOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AESAeyAAD//AfQBAAHvAv8B7xTsARMIAAER + AfgBQwgAARQBbQEOBwABDgFtAuwB8QH/AfQBEgHsgAA//wH0AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEU + AW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAAP/8B9AEAAe8C/wHvFOwBbQgUARIB+AHqCBQBbQHrARMIFAHr + AuwB8QH/AfQBEgHsgAA//wH0AQAB7wL/Ae827AHxAf8B9AESAeyAAD//AfQBAAHvAv8B7zbsAfEB/wH0 + ARIB7IAAP/8B9AEAAe8C/wHwNgcB8wH/AfQBEgHsgAA//wH0AQAB7zv/AfQBEgHsgAA//wH0AQAB7zv/ + AfQBEgHsgAA//wH0AQAB6jvtAewBEQHsgAA//wH0PxEBkoAAP/8B9D/yAfSAAD//AfTAAD//AfTAAD// + AfTAAD//AfTAAD//AfTAAD//AfTAAD//AfTAAD//AfT/AEEAgPSAAAH/Afc87AEHAfQB/wH3POwBBwH0 + gAAB/wEUARA6FAEOAewB9AH/ARQBEDoUAQ4B7AH0gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0 + gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0 + gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0AgAB/znzAfQFAAH/OfMB9AMAAf8BFAHsOv8BFAHs + AfQB/wEUAewc/wL2A/8B9hj/ARQB7AH0AgAB8wGSOO0BvAUAAfMBkjjtAbwDAAH/ARQB7Dr/ARQB7AH0 + Af8BFAHsGf8J9gb/AbwPFAHrAf8BFAHsAfQCAAHzAewB7zYHAe0BBwUAAfMB7AHvNgcB7QEHAwAB/wEU + Aew6/wEUAewB9AH/ARQB7Bj/CvYG/wHxD+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8 + Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsFv8M9hj/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUA + AfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsFv8M9hj/ARQB7AH0AgAB8wHsAbw1/wH0 + AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsEv8K9gH/BfYB9AT2Af8BvA8U + AesB/wEUAewB9AIAAfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAew6/wEUAewB9AH/ + ARQB7BP/CvYF/wL2Av8C9gHxD+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3 + AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsE/8J9gH0Cf8B9AH2Ev8BFAHsAfQCAAHzAewBvDX/AfQB9wEH + BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHsAfQB/wEUAewS/wT2Ev8B9hH/ARQB7AH0AgAB8wHs + Abw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsE/8D9gH0I/8BFAHs + AfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHsAfQB/wEUAewB8RXs + Ausg7AH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHs + AfQB/wEUAewBvBMUAxUhFAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMA + Af8BFAHsGf8B9iD/ARQB7AH0Af8BFAHsFP8B9gEbAfYd/wH2Bf8BFAHsAfQCAAHzAewBvDX/AfQB9wEH + BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsGP8B8AHrAeoB7wH2Hf8BFAHsAfQB/wEUAewV/wH2JP8BFAHs + AfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsF/8B9AHvARABDwHrAfMd/wEU + AewB9AH/ARQB7AHxN+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ + ARQB7Bf/AfIBkgIOAW0B8R3/ARQB7AH0Af8BFAHsAbw3FAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEH + BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsF/8B9AEHARQBQwHtAfYd/wEUAewB9AH/ARQB7BL/AfYn/wEU + AewB9AIAAfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewY/wH0ArwB8h7/ARQB7AH0 + Af8BFAHsMv8B9Af/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ + ARQB7AH0Af8BFAHsAfEx7ALrBOwB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3 + AQcDAAH/ARQB7Bj/AfMBBwHwAfMe/wEUAewB9AH/ARQB7AG8KRQCFQYUAUMBFQQUAesB/wEUAewB9AIA + AfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewX/wH0Ae8BAAESAQce/wEUAewB9AH/ + ARQB7Cr/AfMB9Ab/AfAB8gb/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ + ARQB7Bf/AfIBkgEAAeoBBx7/ARQB7AH0Af8BFAHsMv8D9AX/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUA + AfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bf/AfIB7QEAARIBBx7/ARQB7AH0Af8BFAHsAfEy7ALrA+wB9wH/ + ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bf/AfMB9wEOARQB9wH0 + Hf8BFAHsAfQB/wEUAewBvDIUAhUDFAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0 + AfcBBwMAAf8BFAHsGP8BvAEUAQ4BEgEHHf8BFAHsAfQB/wEUAewz/wH0AfMF/wEUAewB9AIAAfMB7AG8 + Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewY/wHzAQcBEwERARMBBwHzG/8BFAHsAfQB/wEU + Aewz/wH0ARsC8wP/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bn/ + AfQB9wESAREBEgHvAfQa/wEUAewB9AH/ARQB7AHxMuwF6wH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wEH + BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsGv8B9gHvARIBAAFtAQca/wEUAewB9AH/ARQB7AG8NRQCFQHr + Af8BFAHsAfQCAAHzAewBvDX/AfQB9wGSAgcB8gIAAfMB7AG8AfMBvAEHAu8CvALvAQcB9AHxAQcB9AH/ + AfME7wHwAf8BvAHwHf8B9AH3AZICBwHyAf8BFAHsHP8BBwEAASIBcwHzGf8BFAHsAfQB/wEUAew2/wHz + AfQC/wEUAewB9AIAAfMB7AG8Nf8B9AH3AewB9wHsAQcCAAHzAewBvAHzAQcB7wGSAewC7wHsAZIBBwH0 + AQcBkgHzAfQB8ALtAfcB7AHvAfQBkgH3AfIB9Bv/AfQB9wHsAfcB7AEHAf8BFAHsHP8B8QHsAREBEgHv + Gf8BFAHsAfQB/wEUAew6/wEUAewB9AIAAfMB7AG8Nf8B9AH3Ae8B9AH3AQcCAAHzAewBvAL/AfIBBwHs + AfcCBwHxAv8BBwGSAfMB8gIHAfAB8wGSAe8B9AHsAesB7wHyG/8B9AH3Ae8B9AH3AQcB/wEUAewU/wH0 + AfIB9AX/AfMB9wERARQB9xn/ARQB7AH0Af8BFAHsAfE37AH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wHv + Af8B7wEHAgAB8wHsAbwB9AHwAQcB7wMHAe8BvAHzAf8BBwGSAfMB8gIHAfEB9AHsAZIB9ALtAgcB8Br/ + AfQB9wHvAf8B7wEHAf8BFAHsFP8B8wHvAbwB8wT/AfEB7AEQARQB7xn/ARQB7AH0Af8BFAHsAbwRFAIV + JBQB6wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwIAAfMB7AG8AfIB7wGSAe8B8QHwAQcBkgHv + AfAB8wEHAe0C8QIHAfEB8wHrAe0B/wL3AfAB7wEHGv8B9AH3Ae8B/wHvAQcB/wEUAewU/wHxAewB6wEH + A/8B9AEHARQBDgETAe8Z/wEUAewB9AH/ARQB7BL/AfMB9Cb/ARQB7AH0AgAB8wHsAbw1/wH0AfcB7wH/ + Ae8BBwIAAfMB7AG8AfEB7QHvBAcBkgHvAQcB8AH3AewB7wEHAe8BBwHxAfMB6wHtAfQB7QHsAQcB9wEH + Gv8B9AH3Ae8B/wHvAQcB/wEUAewU/wHyAZIBFQFDARMC6wHqARQBDgEPAewBGxn/ARQB7AH0Af8BFAHs + Ov8BFAHsAfQCAAHzAewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbwB9AG8AgcBvALwAe8CBwG8Ae8B9wIH + AbwB8AHzAfQB7wEHAf8BBwHvAQcBvAHyGv8B9AH3Ae8B/wHvAQcB/wEUAewU/wH0AbwB7AETAREDEAER + ARUB7AG8Gv8BFAHsAfQB/wEUAewB8TfsAfcB/wEUAewB9AIAAfMB7AG8Nf8B9AH3Ae8B/wHvAQcCAAHz + AewBvAL/AfIB8AHxAfIB8wPwAfED8AHxAfIB8wH0Af8B8gHzAf8B8QHwAfEB9Bv/AfQB9wHvAf8B7wEH + Af8BFAHsFv8B8QHvAesCFAETAW0B7QHxG/8BFAHsAfQB/wEUAewBvDIUAhUDFAHrAf8BFAHsAfQCAAHz + AewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwH/ARQB7Dr/ARQB7AH0Af8BFAHs + M/8B9AHzBf8BFAHsAfQCAAHzAewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwH/ + ARQB7Dr/ARQB7AH0Af8BFAHsMv8C9Ab/ARQB7AH0AgAB8wHsAQc28gGSAe8B/wHvAQcCAAHzAewBBzby + AZIB7wH/Ae8BBwH/ARQB7Dr/ARQB7AH0Af8BFAHsAfEx7ALrBOwB9wH/ARQB7AH0AgAB8wLsNu0B7AHv + Af8B7wEHAgAB8wLsNu0B7AHvAf8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewBvCYUBBUNFAHrAf8BFAHs + AfQCAAHzK+wB6wETARQBEwHrAW0CFAHqAewBEgIUAW0B7wH/Ae8BBwIAAfMr7AHrARMBFAETAesBbQIU + AeoB7AESAhQBbQHvAf8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewn/wH0AhsB9g//ARQB7AH0AgAB8yvs + AW0BDgEAAQ4BbQEUAgABFQHrARABAAEOAeoB7wH/Ae8BBwIAAfMr7AFtAQ4BAAEOAW0BFAIAARUB6wEQ + AQABDgHqAe8B/wHvAQcB/wEUAew6/wEUAewB9AH/ARQB7Cj/AvYQ/wEUAewB9AIAAfMr7AFtAQ4BAAEO + AW0BFAIAARUB6wEQAQABDgHqAe8B/wHvAQcCAAHzK+wBbQEOAQABDgFtARQCAAEVAesBEAEAAQ4B6gHv + Af8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewB8TfsAfcB/wEUAewB9AIAAfMr7AHrARQBFQEUAesBbQIV + AeoB7AETARUBFAFtAe8B/wHvAQcCAAHzK+wB6wEUARUBFAHrAW0CFQHqAewBEwEVARQBbQHvAf8B7wEH + Af8BFAHsOv8BFAHsAfQB/wEUAewBvDcUAesB/wEUAewB9AIAAfMFkgHtAuwx7QEHAf8B7wEHAgAB8wWS + Ae0C7DHtAQcB/wHvAQcB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0AgAB/wX0AfEB7AHvMfIB8wH/ + Ae8BBwIAAf8F9AHxAewB7zHyAfMB/wHvAQcB/wEUAeww/wG8CRQBDgHsAfQB/wEUAeww/wG8CRQBDgHs + AfQIAAHzAe0BBzP/Ae8BBwgAAfMB7QEHM/8B7wEHAf8BFAHsMP8BBwEAAW0H7AEQAewB9AH/ARQB7AHx + LuwCBwEAAW0H7AEQAewB9AgAAfMB7QEHM/8B7wEHCAAB8wHtAQcz/wHvAQcB/wEUAeww/wEHAQABBwX/ + AfMBBwFtAfcB9AH/ARQB7AG8LhQB9wEHAQABBwX/AfMBBwFtAfcB9AgAAfMB7QEHM/8B7wEHCAAB8wHt + AQcz/wHvAQcB/wEUAeww/wEHAQABBwX/AQcBAAEHAf8B9AH/ARQB7DD/AQcBAAEHBf8BBwEAAQcB/wH0 + CAAB8wHtAe8zvAGSAQcIAAHzAe0B7zO8AZIBBwH/ARQB7DD/AQcBAAEHBP8B9wFtAQcB8wH/AfQB/wEU + Aeww/wEHAQABBwT/AfcBbQEHAfMB/wH0CAAB8wHtNewBBwgAAfMB7TXsAQcB/wEUAeww/wEHAQABBwP/ + AfcB7AH3A/8B9AH/ARQB7AHxLuwCBwEAAQcD/wH3AewB9wP/AfQIAAHzAe0n7AHrAUMBEAFDAW0B6gIQ + ARMB7AEVAhABbQEHCAAB8wHtJ+wB6wFDARABQwFtAeoCEAETAewBFQIQAW0BBwH/ARQB7DD/AQcBAAEH + Af8B8wEHAW0B9wT/AfQB/wEUAewBvC4UAfcBBwEAAQcB/wHzAQcBbQH3BP8B9AgAAfMB7SfsAW0BDwEA + AQ4BbQETAgABQwHsARACAAHqAQcIAAHzAe0n7AFtAQ8BAAEOAW0BEwIAAUMB7AEQAgAB6gEHAf8BFAHs + MP8BBwEAAQcB/wEHAQABBwX/AfQB/wEUAeww/wEHAQABBwH/AQcBAAEHBf8B9AgAAfMB7SfsAW0BDwEA + AQ4BbQETAgABQwHsARABAAEOAeoBBwgAAfMB7SfsAW0BDwEAAQ4BbQETAgABQwHsARABAAEOAeoBBwH/ + ARQB7DD/AQcBAAEHAfcBbQEHAfMF/wH0Af8BFAHsMP8BBwEAAQcB9wFtAQcB8wX/AfQIAAHzAe0o7AFt + AuoB6wFtAuoBbQHsAW0C6gHrAQcIAAHzAe0o7AFtAuoB6wFtAuoBbQHsAW0C6gHrAQcB/wIUMOwBbQEA + AW0B7AH3B/8B9AH/AhQw7AFtAQABbQHsAfcH/wH0CAAB9DYHAfEIAAH0NgcB8QH/Aes0FAH3CP8B9AH/ + Aes0FAH3CP8B9IAAP/8B9D//AfQBQgFNAT4HAAE+AwABKAQAAQECAAGAAwABAQEAAQEGAAEQFgAD/wkA + CP8YAAj/GAAI/xgACP8YAAj/GAAI/xgACP8YAAj/GAAI//8A/wD/AP8A/wD9AAj/GAAI/xgACP8YAAj/ + GAAI/xgACP8YAAj/GAAI/xAAEP8QABD/EAAQ/xAAEP8QABD/EAAQ/xAAEP8QAAHABgABBwHABgABBxAA + AcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYA + AQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHA + BgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEH + EAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHA + BgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEH + AcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYA + AQcQAAHABgABBwHABgABBxAAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHA + BwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHA + FwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAf8HAAH/FwAB/wcAAf8XAAH/ + BwAB/xcAAf8HAAH/FwAB/wcAAf8XAAH/BwAB/xcAAf8HAAH/FwAB/wcAAf8XAAH/BwAB/xcAAf8HAAH/ + FwAQ/xAACw== + + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/HoloChat.Designer.cs b/source/WindowsFormsApplication1/Apps/HoloChat.Designer.cs new file mode 100644 index 0000000..6f040ec --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/HoloChat.Designer.cs @@ -0,0 +1,254 @@ +namespace ShiftOS +{ + partial class HoloChat + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HoloChat)); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlintro = new System.Windows.Forms.Panel(); + this.flintrobuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnconnect = new System.Windows.Forms.Button(); + this.btnrefresh = new System.Windows.Forms.Button(); + this.lbrooms = new System.Windows.Forms.ListBox(); + this.label1 = new System.Windows.Forms.Label(); + this.lblintro = new System.Windows.Forms.Label(); + this.lblheader = new System.Windows.Forms.Label(); + this.txtchat = new System.Windows.Forms.RichTextBox(); + this.txtsend = new System.Windows.Forms.TextBox(); + this.pnlusers = new System.Windows.Forms.Panel(); + this.lbusers = new System.Windows.Forms.ListBox(); + this.lbtopic = new System.Windows.Forms.Label(); + this.tmrui = new System.Windows.Forms.Timer(this.components); + this.panel1.SuspendLayout(); + this.pnlintro.SuspendLayout(); + this.flintrobuttons.SuspendLayout(); + this.pnlusers.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.pnlintro); + this.panel1.Controls.Add(this.txtchat); + this.panel1.Controls.Add(this.txtsend); + this.panel1.Controls.Add(this.pnlusers); + this.panel1.Controls.Add(this.lbtopic); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.ForeColor = System.Drawing.Color.Black; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(772, 431); + this.panel1.TabIndex = 0; + // + // pnlintro + // + this.pnlintro.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlintro.Controls.Add(this.flintrobuttons); + this.pnlintro.Controls.Add(this.lbrooms); + this.pnlintro.Controls.Add(this.label1); + this.pnlintro.Controls.Add(this.lblintro); + this.pnlintro.Controls.Add(this.lblheader); + this.pnlintro.Location = new System.Drawing.Point(36, 35); + this.pnlintro.Name = "pnlintro"; + this.pnlintro.Size = new System.Drawing.Size(706, 341); + this.pnlintro.TabIndex = 3; + // + // flintrobuttons + // + this.flintrobuttons.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flintrobuttons.Controls.Add(this.btnconnect); + this.flintrobuttons.Controls.Add(this.btnrefresh); + this.flintrobuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.flintrobuttons.Location = new System.Drawing.Point(337, 284); + this.flintrobuttons.Name = "flintrobuttons"; + this.flintrobuttons.Size = new System.Drawing.Size(350, 42); + this.flintrobuttons.TabIndex = 4; + // + // btnconnect + // + this.btnconnect.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnconnect.Location = new System.Drawing.Point(272, 3); + this.btnconnect.Name = "btnconnect"; + this.btnconnect.Size = new System.Drawing.Size(75, 33); + this.btnconnect.TabIndex = 0; + this.btnconnect.Text = "Connect"; + this.btnconnect.UseVisualStyleBackColor = true; + this.btnconnect.Click += new System.EventHandler(this.btnconnect_Click); + // + // btnrefresh + // + this.btnrefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnrefresh.Location = new System.Drawing.Point(191, 3); + this.btnrefresh.Name = "btnrefresh"; + this.btnrefresh.Size = new System.Drawing.Size(75, 33); + this.btnrefresh.TabIndex = 1; + this.btnrefresh.Text = "Refresh"; + this.btnrefresh.UseVisualStyleBackColor = true; + this.btnrefresh.Click += new System.EventHandler(this.btnrefresh_Click); + // + // lbrooms + // + this.lbrooms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbrooms.FormattingEnabled = true; + this.lbrooms.Location = new System.Drawing.Point(337, 75); + this.lbrooms.Name = "lbrooms"; + this.lbrooms.Size = new System.Drawing.Size(350, 199); + this.lbrooms.TabIndex = 3; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.label1.Location = new System.Drawing.Point(342, 38); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(330, 34); + this.label1.TabIndex = 2; + this.label1.Text = "Choose a Room"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblintro + // + this.lblintro.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.lblintro.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lblintro.Location = new System.Drawing.Point(4, 38); + this.lblintro.Name = "lblintro"; + this.lblintro.Size = new System.Drawing.Size(289, 288); + this.lblintro.TabIndex = 1; + this.lblintro.Text = resources.GetString("lblintro.Text"); + this.lblintro.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblheader + // + this.lblheader.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblheader.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F); + this.lblheader.Location = new System.Drawing.Point(4, 4); + this.lblheader.Name = "lblheader"; + this.lblheader.Size = new System.Drawing.Size(699, 34); + this.lblheader.TabIndex = 0; + this.lblheader.Text = "Welcome to HoloChat!"; + this.lblheader.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtchat + // + this.txtchat.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtchat.Location = new System.Drawing.Point(0, 23); + this.txtchat.Name = "txtchat"; + this.txtchat.ReadOnly = true; + this.txtchat.Size = new System.Drawing.Size(641, 388); + this.txtchat.TabIndex = 2; + this.txtchat.Text = ""; + this.txtchat.TextChanged += new System.EventHandler(this.txtchat_TextChanged); + // + // txtsend + // + this.txtsend.Dock = System.Windows.Forms.DockStyle.Bottom; + this.txtsend.Location = new System.Drawing.Point(0, 411); + this.txtsend.Name = "txtsend"; + this.txtsend.Size = new System.Drawing.Size(641, 20); + this.txtsend.TabIndex = 1; + this.txtsend.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtsend_KeyDown); + // + // pnlusers + // + this.pnlusers.Controls.Add(this.lbusers); + this.pnlusers.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlusers.Location = new System.Drawing.Point(641, 23); + this.pnlusers.Name = "pnlusers"; + this.pnlusers.Size = new System.Drawing.Size(131, 408); + this.pnlusers.TabIndex = 0; + // + // lbusers + // + this.lbusers.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbusers.FormattingEnabled = true; + this.lbusers.Location = new System.Drawing.Point(0, 0); + this.lbusers.Name = "lbusers"; + this.lbusers.Size = new System.Drawing.Size(131, 408); + this.lbusers.TabIndex = 0; + // + // lbtopic + // + this.lbtopic.Dock = System.Windows.Forms.DockStyle.Top; + this.lbtopic.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbtopic.Location = new System.Drawing.Point(0, 0); + this.lbtopic.Name = "lbtopic"; + this.lbtopic.Size = new System.Drawing.Size(772, 23); + this.lbtopic.TabIndex = 4; + this.lbtopic.Text = "Welcome to HoloChat!"; + this.lbtopic.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tmrui + // + this.tmrui.Tick += new System.EventHandler(this.tmrui_Tick); + // + // HoloChat + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(772, 431); + this.Controls.Add(this.panel1); + this.Name = "HoloChat"; + this.Text = "HoloChat"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.me_Closing); + this.Load += new System.EventHandler(this.HoloChat_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.pnlintro.ResumeLayout(false); + this.flintrobuttons.ResumeLayout(false); + this.pnlusers.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.RichTextBox txtchat; + private System.Windows.Forms.TextBox txtsend; + private System.Windows.Forms.Panel pnlusers; + private System.Windows.Forms.ListBox lbusers; + private System.Windows.Forms.Panel pnlintro; + private System.Windows.Forms.FlowLayoutPanel flintrobuttons; + private System.Windows.Forms.Button btnconnect; + private System.Windows.Forms.Button btnrefresh; + private System.Windows.Forms.ListBox lbrooms; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lblintro; + private System.Windows.Forms.Label lblheader; + private System.Windows.Forms.Timer tmrui; + private System.Windows.Forms.Label lbtopic; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/HoloChat.cs b/source/WindowsFormsApplication1/Apps/HoloChat.cs new file mode 100644 index 0000000..1795d7b --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/HoloChat.cs @@ -0,0 +1,666 @@ +using NetSockets; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class HoloChat : Form + { + /// + /// Front-end for the HoloChat chat system. + /// + public HoloChat() + { + InitializeComponent(); + } + + public ChatClient Client = null; + public Dictionary IPs = null; + + private void HoloChat_Load(object sender, EventArgs e) + { + SetupUI(); + tmrui.Start(); + } + + /// + /// Sets up the HoloCHat UI. + /// + public void SetupUI() + { + if (!API.LimitedMode) + { + IPs = new Dictionary(); + lbrooms.Items.Clear(); + this.Invoke(new Action(() => + { + if (API.Upgrades["networkbrowser"] == false) + { + lbrooms.Items.Add(Hacker_Alliance.Name); + } + })); + + foreach (var client in Package_Grabber.clients) + { + if (client.Value.IsConnected) + { + client.Value.OnReceived += (object s, NetReceivedEventArgs a) => + { + try + { + if (!IPs.ContainsKey(client.Key)) + { + var obj = (ObjectModel)a.Data.Object; + if (obj.Command == "name") + { + string name = (string)obj.OptionalObject; + IPs.Add(client.Key, name); + } + } + else + { + var obj = (ObjectModel)a.Data.Object; + if (obj.Command == "name") + { + string name = (string)obj.OptionalObject; + IPs[client.Key] = name; + } + } + this.Invoke(new Action(() => + { + string r = ""; + foreach (string room in lbrooms.Items) + { + if (room == IPs[client.Key]) + { + r = room; + } + } + if (r == "") + { + lbrooms.Items.Add(IPs[client.Key]); + } + })); + } + catch + { + + } + }; + Package_Grabber.SendMessage(client.Key, "chat get_name"); + } + } + + } + else + { + if (FinalMission.EndGameHandler.FakeHoloChatRoom != null) + { + lbrooms.Items.Clear(); + lbrooms.Items.Add(FinalMission.EndGameHandler.FakeHoloChatRoom.Name); + } + } + } + + private FakeChatClient Hacker_Alliance + { + get + { + var r = new FakeChatClient(); + r.Name = "The Hacker Alliance"; + r.OtherCharacters = new List(); + if (!API.Upgrades["networkbrowser"]) + { + r.OtherCharacters.Add("Richard Ladouceur"); //Dear djdeedahx0 and other non-ShiftOS members: DEAL with the last name - I'm not creative. - Michael + r.OtherCharacters.Add("Hacker101"); + r.Messages = JsonConvert.DeserializeObject>(Properties.Resources.MidGame_Holochat); + r.Topic = "The Hacker Alliance - Please welcome our newest user!"; + } + return r; + + } + } + + private void btnconnect_Click(object sender, EventArgs e) + { + if(lbrooms.SelectedItem != null) + { + if (!API.LimitedMode) + { + string topic = (string)lbrooms.SelectedItem; + if (topic == Hacker_Alliance.Name) + { + SetupFakeClient(Hacker_Alliance); + } + else + { + string ip = ""; + foreach (var obj in IPs) + { + if (obj.Value == topic) + { + ip = obj.Key; + } + } + if (ip != "") + { + API.CreateInfoboxSession("Choose a Nickname", "Please enter a nick name.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if (res != "fail") + { + SetupClient(ip, res); + } + }; + } + } + } + else + { + if((string)lbrooms.SelectedItem == FinalMission.EndGameHandler.FakeHoloChatRoom.Name) + { + SetupFakeClient(FinalMission.EndGameHandler.FakeHoloChatRoom); + } + } + } + } + + /// + /// Set up a new client. + /// + /// IP address. + /// User nickname. + public void SetupClient(string address, string nick) + { + var c = new ChatClient(address, nick); + c.OnMessageReceive += (object s, EventArgs a) => + { + var obj = (ChatMessage)s; + this.Invoke(new Action(() => + { + txtchat.AppendText(Environment.NewLine + $"<{obj.User.Name}> {obj.Text}"); + })); + c.GetUsers(); + }; + c.OnUserListReceived += (object s, EventArgs a) => + { + var obj = (List)s; + this.Invoke(new Action(() => + { + lbusers.Items.Clear(); + foreach (var user in obj) + { + lbusers.Items.Add(user.Name); + } + })); + }; + c.OnUserJoin += (object s, EventArgs a) => + { + var obj = (ChatUser)s; + this.Invoke(new Action(() => + { + + txtchat.AppendText(Environment.NewLine + $"{obj.Name} has joined this room."); + })); + c.GetUsers(); + }; + c.OnTopicReceived += (object s, EventArgs a) => + { + string topic = (string)s; + this.Invoke(new Action(() => + { + lbtopic.Text = topic; + })); + }; + c.OnUserLeave += (object s, EventArgs a) => + { + var obj = (ChatUser)s; + this.Invoke(new Action(() => + { + txtchat.AppendText(Environment.NewLine + $"{obj.Name} has left this room."); + })); + c.GetUsers(); + }; + c.GetUsers(); + c.GetTopic(); + Client = c; + + } + + public void SetupFakeClient(FakeChatClient fClient) + { + lbtopic.Text = fClient.Topic; + var t = new System.Windows.Forms.Timer(); + t.Interval = 500; + t.Tick += (object s, EventArgs a) => + { + //userlist + lbusers.Items.Clear(); + foreach (var user in fClient.OtherCharacters) + { + lbusers.Items.Add(user); + } + }; + t.Start(); + + int m = 0; + //message buffer + var mb = new System.Windows.Forms.Timer(); + mb.Tick += (object s, EventArgs a) => + { + string message = fClient.Messages.Keys.ElementAt(m); + string user = fClient.Messages[message]; + //show message on textbox + if (message.StartsWith("install:")) + { + try + { + string upg = message.Remove(0, 8); + API.Upgrades[upg] = true; + API.CurrentSession.SetupDesktop(); + } + catch + { + + } + } + else + { + txtchat.AppendText(Environment.NewLine + $"<{user}> {message}"); + } + if (m < fClient.Messages.Count - 1) + { + m += 1; + } + else + { + mb.Stop(); + //Completed the objective! + FinalMission.EndGameHandler.GoToNextObjective(); + } + }; + mb.Interval = 4000; + mb.Start(); + tmrui.Stop(); + pnlintro.Hide(); + } + + private void txtsend_KeyDown(object sender, KeyEventArgs e) + { + if(e.KeyCode == Keys.Enter) + { + e.SuppressKeyPress = true; + if (txtsend.Text != "") + { + if (txtsend.Text.ToLower() == "/disconnect") + { + Client.Leave(); + Client = null; + txtsend.Text = ""; + } + else { + Client.Send(txtsend.Text); + txtsend.Text = ""; + } + } + } + } + + private void me_Closing(object sender, FormClosingEventArgs e) + { + if(Client != null) + { + Client.Leave(); + } + } + + private void tmrui_Tick(object sender, EventArgs e) + { + if(Client == null) + { + pnlintro.Show(); + txtsend.Enabled = false; + } + else + { + pnlintro.Hide(); + txtsend.Enabled = true; + } + } + + private void btnrefresh_Click(object sender, EventArgs e) + { + SetupUI(); + } + + private void txtchat_TextChanged(object sender, EventArgs e) + { + txtchat.Select(txtchat.TextLength, 0); + txtchat.ScrollToCaret(); + txtsend.Focus(); + } + } + + public class ChatClient + { + #region Constructors + + /// + /// Creates a new chat client. + /// + /// IP address + /// User nickname + public ChatClient(string IP, string nick) + { + NetObjectClient c = null; + foreach(var client in Package_Grabber.clients) + { + if(client.Key == IP) + { + if(client.Value.IsConnected == true) + { + c = client.Value; + IP_Address = IP; + } + } + } + if(c != null) + { + c.OnReceived += (object s, NetReceivedEventArgs a) => + { + try { + var obj = (ObjectModel)a.Data.Object; + string[] args = obj.Command.Split(' '); + if (args[0] == "chat") + { + switch (args[1]) + { + case "userbanned": + try + { + var usr = (ChatUser)obj.OptionalObject; + if(usr.Name == nick) + { + API.CurrentSession.Invoke(new Action(() => + { + API.CreateInfoboxSession("You're banned.", "You have been banned from this chat.", infobox.InfoboxMode.Info); + Leave(); + })); + } + } + catch + { + + } + break; + case "auth_req": + try + { + var usr = (ChatUser)obj.OptionalObject; + if (usr.Name == nick) + { + Thread.Sleep(1000); + API.CurrentSession.Invoke(new Action(() => + { + API.CreateInfoboxSession("Enter Password", "Please enter your password.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object sen, FormClosingEventArgs arg) => + { + var result = API.GetInfoboxResult(); + AuthenticateWithServer(usr.Name, result); + }; + })); + } + } + catch + { + + } + break; + case "auth_fail": + try + { + var usr = (ChatUser)obj.OptionalObject; + if (usr.Name == nick) + { + API.CurrentSession.Invoke(new Action(() => + { + API.CreateInfoboxSession("Error", "You have entered an incorrect password.", infobox.InfoboxMode.Info); + })); + } + } + catch + { + + } + + break; + case "joined": + try + { + var usr = (ChatUser)obj.OptionalObject; + if (usr.Name == nick) + { + if (_User == null) + { + _User = usr; + } + } + if (_User != usr) + { + var h = OnUserJoin; + if (h != null) + { + h(usr, new EventArgs()); + } + } + } + catch + { + + } + break; + case "userlist": + try + { + var lst = (List)obj.OptionalObject; + var h = OnUserListReceived; + if (h != null) + { + h(lst, new EventArgs()); + } + } + catch + { + + } + break; + case "left": + try + { + var usr = (ChatUser)obj.OptionalObject; + var h = OnUserLeave; + if (h != null) + { + h(usr, new EventArgs()); + } + } + catch + { + + } + break; + case "message_received": + try + { + var usr = (ChatMessage)obj.OptionalObject; + var h = OnMessageReceive; + if (h != null) + { + h(usr, new EventArgs()); + } + } + catch + { + + } + break; + } + } + else if (args[0] == "topic") + { + try + { + string name = (string)obj.OptionalObject; + var h = OnTopicReceived; + if(h != null) + { + h(name, new EventArgs()); + } + } + catch + { + + } + } + } + catch + { + + } + }; + Join(nick); + } + else + { + throw new ArgumentException("IP Address not found."); + } + } + #endregion + + #region Events + + public event EventHandler OnUserJoin; + public event EventHandler OnUserLeave; + public event EventHandler OnMessageReceive; + public event EventHandler OnUserListReceived; + public event EventHandler OnTopicReceived; + + + #endregion + + #region Variables + + private string IP_Address = null; + public ChatUser User { get { return _User; } } + private ChatUser _User = null; + #endregion + + #region Methods + + /// + /// Authenticates with the server. + /// + /// Password to authenticate using. + public void AuthenticateWithServer(string nick, string password) + { + var usr = new ChatUser(); + usr.Name = nick; + var msg = new ChatMessage(); + msg.Text = password; + msg.User = usr; + Package_Grabber.SendMessage(IP_Address, "chat authenticate", msg); + } + + /// + /// Joins the server. + /// + /// Nickname. + public void Join(string nick) + { + var usr = new ChatUser(); + usr.Name = nick; + var msg = new ChatMessage(); + msg.User = usr; + Package_Grabber.SendMessage(IP_Address, "chat join", msg); + } + + /// + /// Leaves the server. + /// + public void Leave() + { + if (_User != null) + { + var msg = new ChatMessage(); + msg.User = _User; + Package_Grabber.SendMessage(IP_Address, "chat leave", msg); + } + } + + /// + /// Requests a list of online users. + /// + public void GetUsers() + { + try + { + Package_Grabber.SendMessage(IP_Address, "chat get_users"); + } + catch + { + + } + } + + /// + /// Requests the topic string of the server. + /// + public void GetTopic() + { + try + { + Package_Grabber.SendMessage(IP_Address, "chat get_topic"); + } + catch + { + + } + } + + /// + /// Sends a message to the server. + /// + /// Message text. + public void Send(string Text) + { + if (_User != null) + { + var msg = new ChatMessage(); + msg.User = _User; + msg.Text = Text; + Package_Grabber.SendMessage(IP_Address, "chat normal", msg); + + } + } + + #endregion + } + + public class FakeChatClient + { + public string Name { get; set; } + public string Topic { get; set; } + public List OtherCharacters { get; set; } + public Dictionary Messages { get; set; } + } +} diff --git a/source/WindowsFormsApplication1/Apps/HoloChat.resx b/source/WindowsFormsApplication1/Apps/HoloChat.resx new file mode 100644 index 0000000..53f34aa --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/HoloChat.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + HoloChat is a revolutionary new program made only for ShiftOS. + +Come, and explore the various HoloChat communities, and meet some new friends! + +You can send text, files, and other cool things to people in a HoloChat room. + +Have fun! + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/IconManager.Designer.cs b/source/WindowsFormsApplication1/Apps/IconManager.Designer.cs new file mode 100644 index 0000000..3203088 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/IconManager.Designer.cs @@ -0,0 +1,135 @@ +namespace ShiftOS +{ + partial class IconManager + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pnlactions = new System.Windows.Forms.Panel(); + this.pnlicons = new System.Windows.Forms.FlowLayoutPanel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.btnsave = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.pnlactions.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // pnlactions + // + this.pnlactions.BackColor = System.Drawing.Color.Gray; + this.pnlactions.Controls.Add(this.button2); + this.pnlactions.Controls.Add(this.button1); + this.pnlactions.Controls.Add(this.btnsave); + this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlactions.ForeColor = System.Drawing.Color.White; + this.pnlactions.Location = new System.Drawing.Point(0, 511); + this.pnlactions.Name = "pnlactions"; + this.pnlactions.Size = new System.Drawing.Size(720, 41); + this.pnlactions.TabIndex = 0; + // + // pnlicons + // + this.pnlicons.BackColor = System.Drawing.Color.White; + this.pnlicons.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlicons.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.pnlicons.ForeColor = System.Drawing.Color.Black; + this.pnlicons.Location = new System.Drawing.Point(0, 0); + this.pnlicons.Name = "pnlicons"; + this.pnlicons.Size = new System.Drawing.Size(720, 511); + this.pnlicons.TabIndex = 1; + // + // panel1 + // + this.panel1.Controls.Add(this.pnlicons); + this.panel1.Controls.Add(this.pnlactions); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(720, 552); + this.panel1.TabIndex = 0; + // + // btnsave + // + this.btnsave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.Location = new System.Drawing.Point(3, 3); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(75, 35); + this.btnsave.TabIndex = 0; + this.btnsave.Text = "Done"; + this.btnsave.UseVisualStyleBackColor = true; + this.btnsave.Click += new System.EventHandler(this.btnsave_Click); + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(84, 3); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 35); + this.button1.TabIndex = 1; + this.button1.Text = "Load Pack"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Location = new System.Drawing.Point(165, 3); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 35); + this.button2.TabIndex = 2; + this.button2.Text = "Export"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // IconManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(720, 552); + this.Controls.Add(this.panel1); + this.Name = "IconManager"; + this.Text = "IconManager"; + this.Load += new System.EventHandler(this.IconManager_Load); + this.pnlactions.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlactions; + private System.Windows.Forms.FlowLayoutPanel pnlicons; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button btnsave; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/IconManager.cs b/source/WindowsFormsApplication1/Apps/IconManager.cs new file mode 100644 index 0000000..2ffa24a --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/IconManager.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class IconManager : Form + { + public IconManager() + { + InitializeComponent(); + } + + private void IconManager_Load(object sender, EventArgs e) + { + GetAllIcons(); + } + + public void GetAllIcons() + { + pnlicons.Controls.Clear(); + pnlicons.Margin = new Padding(0); + foreach(var kv in API.IconRegistry) + { + var ctrl = new IconControl(); + ctrl.Margin = new Padding(0); + ctrl.IconName = kv.Key; + ctrl.LargeImage = kv.Value; + pnlicons.Controls.Add(ctrl); + ctrl.Show(); + } + } + + private void btnsave_Click(object sender, EventArgs e) + { + foreach (Control ctrl in pnlicons.Controls) + { + try + { + IconControl ic = (IconControl)ctrl; + Skinning.Utilities.IconRegistry[ic.IconName] = ic.LargeImage; + } + catch + { + IconControl ic = (IconControl)ctrl; + Skinning.Utilities.IconRegistry.Add(ic.IconName, ic.LargeImage); + } + } + + var rnd = new Random(); + int cp = rnd.Next(0, 10); + Skinning.Utilities.saveimages(); + API.AddCodepoints(cp); + if(API.CurrentSession != null) + { + API.CurrentSession.SetupAppLauncher(); + API.CurrentSession.SetupDesktopIcons(); + } + GetAllIcons(); + API.CreateInfoboxSession("Icon pack set.", $"Your icon pack has been set successfully. You have earned {cp} Codepoints.", infobox.InfoboxMode.Info); + } + + private void button2_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".icn", File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + ZipFile.CreateFromDirectory(Paths.Icons, res); + } + }; + } + + private void button1_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".icn", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + if(Directory.Exists(Paths.Mod_Temp + "icn")) + { + Directory.Delete(Paths.Mod_Temp + "icn", true); + } + ZipFile.ExtractToDirectory(res, Paths.Mod_Temp + "icn"); + foreach (var f in Directory.GetFiles(Paths.Mod_Temp + "icn")) + { + var finf = new FileInfo(f); + try + { + var bytes = File.ReadAllBytes(finf.FullName); + using (var stream = new MemoryStream(bytes)) + { + API.IconRegistry[finf.Name] = Image.FromStream(stream); + } + } + catch + { + API.IconRegistry.Add(finf.Name, Image.FromFile(finf.FullName)); + } + finf = null; + } + if (API.CurrentSession != null) + { + API.CurrentSession.SetupAppLauncher(); + API.CurrentSession.SetupDesktopIcons(); + } + GetAllIcons(); + Directory.Delete(Paths.Mod_Temp + "icn", true); + } + }; + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/IconManager.resx b/source/WindowsFormsApplication1/Apps/IconManager.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/IconManager.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/KnowledgeInput.Designer.cs b/source/WindowsFormsApplication1/Apps/KnowledgeInput.Designer.cs new file mode 100644 index 0000000..3fc5f81 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/KnowledgeInput.Designer.cs @@ -0,0 +1,345 @@ +using System; + +namespace ShiftOS +{ + partial class KnowledgeInput + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //Required by the Windows Form Designer + + //NOTE: The following procedure is required by the Windows Form Designer + //It can be modified using the Windows Form Designer. + //Do not modify it using the code editor. + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(KnowledgeInput)); + this.ListBox1 = new System.Windows.Forms.ListBox(); + this.pnlintro = new System.Windows.Forms.Panel(); + this.pnlcategorydisplay = new System.Windows.Forms.Panel(); + this.lblnextreward = new System.Windows.Forms.Label(); + this.guessbox = new System.Windows.Forms.TextBox(); + this.lblcurrentlevel = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.listblistedstuff = new System.Windows.Forms.ListBox(); + this.lbltillnextlevel = new System.Windows.Forms.Label(); + this.lbltotal = new System.Windows.Forms.Label(); + this.btnstart = new System.Windows.Forms.Button(); + this.lblcatedescription = new System.Windows.Forms.Label(); + this.lblcategory = new System.Windows.Forms.Label(); + this.Label4 = new System.Windows.Forms.Label(); + this.Label3 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.decider = new System.Windows.Forms.Timer(this.components); + this.Label6 = new System.Windows.Forms.Label(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.tmrstoryline = new System.Windows.Forms.Timer(this.components); + this.pnlintro.SuspendLayout(); + this.pnlcategorydisplay.SuspendLayout(); + this.pgcontents.SuspendLayout(); + this.SuspendLayout(); + // + // ListBox1 + // + this.ListBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ListBox1.BackColor = System.Drawing.Color.White; + this.ListBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.ListBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.ListBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ListBox1.ForeColor = System.Drawing.Color.Black; + this.ListBox1.FormattingEnabled = true; + this.ListBox1.ItemHeight = 24; + this.ListBox1.Items.AddRange(new object[] { + "Animals", + "Countries", + "Fruits"}); + this.ListBox1.Location = new System.Drawing.Point(9, 49); + this.ListBox1.Name = "ListBox1"; + this.ListBox1.Size = new System.Drawing.Size(179, 240); + this.ListBox1.TabIndex = 0; + this.ListBox1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ListBox1_DrawItem); + this.ListBox1.SelectedIndexChanged += new System.EventHandler(this.ListBox1_SelectedIndexChanged); + // + // pnlintro + // + this.pnlintro.Controls.Add(this.pnlcategorydisplay); + this.pnlintro.Controls.Add(this.Label4); + this.pnlintro.Controls.Add(this.Label3); + this.pnlintro.Controls.Add(this.Label2); + this.pnlintro.Controls.Add(this.Label1); + this.pnlintro.Location = new System.Drawing.Point(190, 0); + this.pnlintro.Name = "pnlintro"; + this.pnlintro.Size = new System.Drawing.Size(479, 272); + this.pnlintro.TabIndex = 1; + // + // pnlcategorydisplay + // + this.pnlcategorydisplay.Controls.Add(this.lblnextreward); + this.pnlcategorydisplay.Controls.Add(this.guessbox); + this.pnlcategorydisplay.Controls.Add(this.lblcurrentlevel); + this.pnlcategorydisplay.Controls.Add(this.Label5); + this.pnlcategorydisplay.Controls.Add(this.listblistedstuff); + this.pnlcategorydisplay.Controls.Add(this.lbltillnextlevel); + this.pnlcategorydisplay.Controls.Add(this.lbltotal); + this.pnlcategorydisplay.Controls.Add(this.btnstart); + this.pnlcategorydisplay.Controls.Add(this.lblcatedescription); + this.pnlcategorydisplay.Controls.Add(this.lblcategory); + this.pnlcategorydisplay.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlcategorydisplay.ForeColor = System.Drawing.Color.Black; + this.pnlcategorydisplay.Location = new System.Drawing.Point(0, 0); + this.pnlcategorydisplay.Name = "pnlcategorydisplay"; + this.pnlcategorydisplay.Size = new System.Drawing.Size(479, 272); + this.pnlcategorydisplay.TabIndex = 2; + // + // lblnextreward + // + this.lblnextreward.AutoSize = true; + this.lblnextreward.Font = new System.Drawing.Font("Palatino Linotype", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblnextreward.Location = new System.Drawing.Point(36, 110); + this.lblnextreward.Name = "lblnextreward"; + this.lblnextreward.Size = new System.Drawing.Size(244, 20); + this.lblnextreward.TabIndex = 11; + this.lblnextreward.Text = "Reward for completing level 1: 5CP"; + this.lblnextreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // guessbox + // + this.guessbox.BackColor = System.Drawing.Color.White; + this.guessbox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.guessbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.guessbox.ForeColor = System.Drawing.Color.Black; + this.guessbox.Location = new System.Drawing.Point(11, 147); + this.guessbox.Multiline = true; + this.guessbox.Name = "guessbox"; + this.guessbox.Size = new System.Drawing.Size(297, 45); + this.guessbox.TabIndex = 9; + this.guessbox.Text = "Enter Guess Here"; + this.guessbox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.guessbox.Click += new System.EventHandler(this.guessbox_click); + this.guessbox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.guessbox_keydown); + // + // lblcurrentlevel + // + this.lblcurrentlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblcurrentlevel.Location = new System.Drawing.Point(-6, 77); + this.lblcurrentlevel.Name = "lblcurrentlevel"; + this.lblcurrentlevel.Size = new System.Drawing.Size(331, 42); + this.lblcurrentlevel.TabIndex = 8; + this.lblcurrentlevel.Text = "Current Level: 1"; + this.lblcurrentlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(340, 12); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(123, 18); + this.Label5.TabIndex = 7; + this.Label5.Text = "All Ready Done"; + // + // listblistedstuff + // + this.listblistedstuff.BackColor = System.Drawing.Color.Black; + this.listblistedstuff.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.listblistedstuff.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.listblistedstuff.ForeColor = System.Drawing.Color.White; + this.listblistedstuff.FormattingEnabled = true; + this.listblistedstuff.Location = new System.Drawing.Point(340, 41); + this.listblistedstuff.Name = "listblistedstuff"; + this.listblistedstuff.ScrollAlwaysVisible = true; + this.listblistedstuff.Size = new System.Drawing.Size(129, 221); + this.listblistedstuff.TabIndex = 6; + this.listblistedstuff.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listblistedstuff_DrawItem); + // + // lbltillnextlevel + // + this.lbltillnextlevel.AutoSize = true; + this.lbltillnextlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltillnextlevel.Location = new System.Drawing.Point(8, 250); + this.lbltillnextlevel.Name = "lbltillnextlevel"; + this.lbltillnextlevel.Size = new System.Drawing.Size(146, 16); + this.lbltillnextlevel.TabIndex = 5; + this.lbltillnextlevel.Text = "Words Until Next Level:"; + // + // lbltotal + // + this.lbltotal.AutoSize = true; + this.lbltotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltotal.Location = new System.Drawing.Point(191, 250); + this.lbltotal.Name = "lbltotal"; + this.lbltotal.Size = new System.Drawing.Size(66, 16); + this.lbltotal.TabIndex = 3; + this.lbltotal.Text = "Guessed:"; + // + // btnstart + // + this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstart.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnstart.Location = new System.Drawing.Point(11, 198); + this.btnstart.Name = "btnstart"; + this.btnstart.Size = new System.Drawing.Size(297, 46); + this.btnstart.TabIndex = 2; + this.btnstart.Text = "Submit Word"; + this.btnstart.UseVisualStyleBackColor = true; + this.btnstart.Click += new System.EventHandler(this.btnstart_Click); + // + // lblcatedescription + // + this.lblcatedescription.Location = new System.Drawing.Point(11, 48); + this.lblcatedescription.Name = "lblcatedescription"; + this.lblcatedescription.Size = new System.Drawing.Size(297, 26); + this.lblcatedescription.TabIndex = 1; + this.lblcatedescription.Text = "There are many animals out there! Can you list them all? Note that this is a list" + + " of common animals, not every animal!"; + this.lblcatedescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblcategory + // + this.lblcategory.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblcategory.Location = new System.Drawing.Point(11, 8); + this.lblcategory.Name = "lblcategory"; + this.lblcategory.Size = new System.Drawing.Size(297, 39); + this.lblcategory.TabIndex = 0; + this.lblcategory.Text = "Animals"; + this.lblcategory.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(52, 235); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(382, 20); + this.Label4.TabIndex = 3; + this.Label4.Text = "Select A Category On the Left To Start Playing"; + // + // Label3 + // + this.Label3.AutoSize = true; + this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(187, 72); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(112, 20); + this.Label3.TabIndex = 2; + this.Label3.Text = "How To Play:"; + // + // Label2 + // + this.Label2.AutoSize = true; + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(61, 97); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(383, 80); + this.Label2.TabIndex = 1; + this.Label2.Text = resources.GetString("Label2.Text"); + this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.ForeColor = System.Drawing.Color.Black; + this.Label1.Location = new System.Drawing.Point(75, 12); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(316, 25); + this.Label1.TabIndex = 0; + this.Label1.Text = "Welcome to Knowledge Input"; + // + // decider + // + this.decider.Interval = 500; + this.decider.Tick += new System.EventHandler(this.decider_Tick); + // + // Label6 + // + this.Label6.AutoSize = true; + this.Label6.Font = new System.Drawing.Font("Cambria", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(30, 8); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(130, 28); + this.Label6.TabIndex = 8; + this.Label6.Text = "Categories"; + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnlintro); + this.pgcontents.Controls.Add(this.Label6); + this.pgcontents.Controls.Add(this.ListBox1); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(673, 304); + this.pgcontents.TabIndex = 10; + // + // tmrstoryline + // + this.tmrstoryline.Interval = 1000; + // + // KnowledgeInput + // + this.AcceptButton = this.btnstart; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Control; + this.ClientSize = new System.Drawing.Size(673, 304); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.Name = "KnowledgeInput"; + this.Text = "Knowledge_Input"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Template_Load); + this.pnlintro.ResumeLayout(false); + this.pnlintro.PerformLayout(); + this.pnlcategorydisplay.ResumeLayout(false); + this.pnlcategorydisplay.PerformLayout(); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.ListBox ListBox1; + internal System.Windows.Forms.Panel pnlintro; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Panel pnlcategorydisplay; + internal System.Windows.Forms.Label lblcategory; + internal System.Windows.Forms.Button btnstart; + internal System.Windows.Forms.Label lblcatedescription; + internal System.Windows.Forms.Label lbltillnextlevel; + internal System.Windows.Forms.Label lbltotal; + internal System.Windows.Forms.ListBox listblistedstuff; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.TextBox guessbox; + internal System.Windows.Forms.Label lblcurrentlevel; + internal System.Windows.Forms.Timer decider; + internal System.Windows.Forms.Label lblnextreward; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Timer tmrstoryline; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/KnowledgeInput.cs b/source/WindowsFormsApplication1/Apps/KnowledgeInput.cs new file mode 100644 index 0000000..a494a93 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/KnowledgeInput.cs @@ -0,0 +1,1425 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class KnowledgeInput : Form + { + public KnowledgeInput() + { + InitializeComponent(); + } + + public int rolldownsize; + public int oldbordersize; + public int oldtitlebarheight; + public bool justopened = false; + public bool needtorollback = false; + public int minimumsizewidth = 0; + public int minimumsizeheight = 0; + + bool guessalreadydone; + bool guesscorrect; + bool levelup; + int rewardbase; + + int totalguessed; + int level; + + int tillnextlevel; + string[] animalslist = new string[227]; + string[] fruitslist = new string[76]; + string[] countrieslist = new string[205]; + string[] carbrandslist = new string[329]; + string[] gameconsoleslist = new string[125]; + + string[] elementslist = new string[118]; + + // ERROR: Handles clauses are not supported in C# + private void Template_Load(object sender, EventArgs e) + { + justopened = true; + this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; + this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; + + pnlintro.Show(); + pnlintro.BringToFront(); + pnlcategorydisplay.Hide(); + makeanimallist(); + makecarbrandslist(); + makecountrieslist(); + makeelementslist(); + makefruitlist(); + makegameconsoleslist(); + setupcategories(); + if(!Directory.Exists(Paths.KnowledgeInput)) + { + Directory.CreateDirectory(Paths.KnowledgeInput); + } + } + + // ERROR: Handles clauses are not supported in C# + private void ListBox1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) + { + e.DrawBackground(); + if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) + { + e.Graphics.FillRectangle(Brushes.Black, e.Bounds); + } + StringFormat sf = new StringFormat(); + sf.Alignment = StringAlignment.Center; + using (SolidBrush b = new SolidBrush(Color.Black)) + { + e.Graphics.DrawString(ListBox1.GetItemText(ListBox1.Items[e.Index]), e.Font, b, e.Bounds, sf); + } + e.DrawFocusRectangle(); + } + + // ERROR: Handles clauses are not supported in C# + private void listblistedstuff_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) + { + e.DrawBackground(); + if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) + { + e.Graphics.FillRectangle(Brushes.Black, e.Bounds); + } + + using (SolidBrush b = new SolidBrush(e.ForeColor)) + { + e.Graphics.DrawString(listblistedstuff.GetItemText(listblistedstuff.Items[e.Index]), e.Font, b, e.Bounds); + } + e.DrawFocusRectangle(); + } + + private void setupcategories() + { + ListBox1.Items.Clear(); + ListBox1.Items.Add("Animals"); + ListBox1.Items.Add("Fruits"); + ListBox1.Items.Add("Countries"); + if(API.Upgrades["kielements"]) + { + ListBox1.Items.Add("Elements"); + } + if (API.Upgrades["kicarbrands"]) + { + ListBox1.Items.Add("Car Brands"); + } + if (API.Upgrades["kigameconsoles"]) + { + ListBox1.Items.Add("Game Consoles"); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void ListBox1_SelectedIndexChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlcategorydisplay.Show(); + //Remember to create the files for each category in the hijack screen and add the category in the design view and make the countries list in this load event + switch (ListBox1.SelectedItem.ToString()) + { + case "Animals": + loadsavepoint("Animals", 10, Paths.KnowledgeInput + "Animals.lst", "There are many animals out there! Can you list them all?" + Environment.NewLine + "Note that you get points for listing animals... not animal breeds!", animalslist); + + break; + case "Fruits": + loadsavepoint("Fruits", 10, Paths.KnowledgeInput + "Fruits.lst", "Do you get your daily serving of fruit each day?" + Environment.NewLine + "Really...? See if you can list them then ;)", fruitslist); + + break; + case "Countries": + loadsavepoint("Countries", 10, Paths.KnowledgeInput + "Countries.lst", "Ever wanted to travel the entire world?" + Environment.NewLine + "Well before you do see if you can list every country in the world!", countrieslist); + + break; + case "Car Brands": + loadsavepoint("Car Brands", 10, Paths.KnowledgeInput + "Car Brands.lst", "Can you list every single car brand?" + Environment.NewLine + "Don't use words like automobiles, motors or cars!", carbrandslist); + + break; + case "Game Consoles": + loadsavepoint("Game Consoles", 10, Paths.KnowledgeInput + "Game Consoles.lst", "Do you call yourself a gamer?" + Environment.NewLine + "Earn that title by listing non-handheld game consoles!", gameconsoleslist); + + break; + case "Elements": + loadsavepoint("Elements", 10, Paths.KnowledgeInput + "Elements.lst", "Have you memorized the periodic table of elements?" + Environment.NewLine + "No? Well don't even attempt trying to guess them all here!", elementslist); + break; + } + + } + + + private void handleword() + { + switch (ListBox1.SelectedItem.ToString()) + { + case "Animals": + handlewordtype(animalslist, Paths.KnowledgeInput + "Animals.lst"); + break; + case "Fruits": + handlewordtype(fruitslist, Paths.KnowledgeInput + "Fruits.lst"); + break; + case "Countries": + handlewordtype(countrieslist, Paths.KnowledgeInput + "Countries.lst"); + break; + case "Car Brands": + handlewordtype(carbrandslist, Paths.KnowledgeInput + "Car Brands.lst"); + break; + case "Game Consoles": + handlewordtype(gameconsoleslist, Paths.KnowledgeInput + "Game Consoles.lst"); + break; + case "Elements": + handlewordtype(elementslist, Paths.KnowledgeInput + "Elements.lst"); + break; + } + + guessbox.Text = ""; + listblistedstuff.TopIndex = listblistedstuff.Items.Count - 1; + } + + private void btnquit_Click(object sender, EventArgs e) + { + this.Close(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnstart_Click(object sender, EventArgs e) + { + handleword(); + } + + // ERROR: Handles clauses are not supported in C# + private void guessbox_click(object sender, EventArgs e) + { + guessbox.Text = ""; + } + + // ERROR: Handles clauses are not supported in C# + private void guessbox_keydown(object sender, System.Windows.Forms.KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + e.SuppressKeyPress = true; + handleword(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void decider_Tick(object sender, EventArgs e) + { + lblcurrentlevel.Text = "Current Level: " + level; + lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; + guessalreadydone = false; + guesscorrect = false; + levelup = false; + decider.Interval = 500; + decider.Stop(); + } + + private void loadsavepoint(string title, int reward, string loadpath, string info, string[] listtype) + { + lblcategory.Text = title; + rewardbase = reward; + listblistedstuff.Items.Clear(); + if (File.Exists(loadpath)) + { + listblistedstuff.Items.AddRange(File.ReadAllLines(loadpath)); + } + totalguessed = listblistedstuff.Items.Count; + level = (int)Math.Ceiling((double)(totalguessed / 10)); + tillnextlevel = Math.Abs(totalguessed - (level * 10)); + + if (tillnextlevel == 0) + { + level = level + 1; + tillnextlevel = 10; + } + + lblcatedescription.Text = info; + pnlcategorydisplay.Show(); + lbltillnextlevel.Text = "Words Until Next Level: " + tillnextlevel; + lblcurrentlevel.Text = "Current Level: " + level; + lbltotal.Text = "Guessed: " + totalguessed + "/" + listtype.Length; + lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; + } + + + private void handlewordtype(string[] listtype, string savepath) + { + string userguess = guessbox.Text; + userguess = userguess.ToLower(); + foreach (string Str in listtype) + { + if (Str == userguess) + { + if (listblistedstuff.Items.Contains(userguess)) + { + guessalreadydone = true; + } + else { + guesscorrect = true; + listblistedstuff.Items.Add(userguess); + tillnextlevel = tillnextlevel - 1; + totalguessed = totalguessed + 1; + File.WriteAllLines(savepath, listblistedstuff.Items.Cast().ToArray()); + + if (tillnextlevel == 0) + { + levelup = true; + tillnextlevel = 10; + API.AddCodepoints(rewardbase * level); + level = level + 1; + } + } + } + } + lbltillnextlevel.Text = "Words Until Next Level: " + tillnextlevel; + lblcurrentlevel.Text = "Current Level: " + level; + lbltotal.Text = "Guessed: " + totalguessed + "/" + listtype.Length; + lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; + + if (levelup == true) + { + decider.Interval = 2000; + lblcurrentlevel.Text = "Level Up!"; + lblnextreward.Text = "You have earned " + rewardbase * (level - 1) + " Code Points!"; + decider.Start(); + } + else { + if (guessalreadydone == true) + { + lblcurrentlevel.Text = "Already Guessed"; + decider.Start(); + } + else { + if (guesscorrect == true) + { + lblcurrentlevel.Text = "Correct :)"; + decider.Start(); + } + else { + lblcurrentlevel.Text = "Wrong :("; + decider.Start(); + } + } + } + } + + + // ERROR: Handles clauses are not supported in C# + private void me_closing() + { + tmrstoryline.Stop(); + } + + private void makeanimallist() + { + animalslist[0] = "aardvark"; + animalslist[1] = "albatross"; + animalslist[2] = "alligator"; + animalslist[3] = "alpaca"; + animalslist[4] = "ant"; + animalslist[5] = "anteater"; + animalslist[6] = "antelope"; + animalslist[7] = "ape"; + animalslist[8] = "armadillo"; + animalslist[9] = "ass"; + animalslist[10] = "baboon"; + animalslist[11] = "badger"; + animalslist[12] = "barracuda"; + animalslist[13] = "bat"; + animalslist[14] = "bear"; + animalslist[15] = "beaver"; + animalslist[16] = "bee"; + animalslist[17] = "bison"; + animalslist[18] = "boar"; + animalslist[19] = "buffalo"; + animalslist[20] = "butterfly"; + animalslist[21] = "camel"; + animalslist[22] = "caribou"; + animalslist[23] = "cat"; + animalslist[24] = "caterpillar"; + animalslist[25] = "cow"; + animalslist[26] = "chamois"; + animalslist[27] = "cheetah"; + animalslist[28] = "chicken"; + animalslist[29] = "chimpanzee"; + animalslist[30] = "chinchilla"; + animalslist[31] = "chough"; + animalslist[32] = "clam"; + animalslist[33] = "cobra"; + animalslist[34] = "cockroach"; + animalslist[35] = "cod"; + animalslist[36] = "cormorant"; + animalslist[37] = "coyote"; + animalslist[38] = "crab"; + animalslist[39] = "crane"; + animalslist[40] = "crocodile"; + animalslist[41] = "crow"; + animalslist[42] = "curlew"; + animalslist[43] = "deer"; + animalslist[44] = "dinosaur"; + animalslist[45] = "dog"; + animalslist[46] = "dogfish"; + animalslist[47] = "dolphin"; + animalslist[48] = "donkey"; + animalslist[49] = "dotterel"; + animalslist[50] = "dove"; + animalslist[51] = "dragonfly"; + animalslist[52] = "duck"; + animalslist[53] = "dugong"; + animalslist[54] = "dunlin"; + animalslist[55] = "eagle"; + animalslist[56] = "echidna"; + animalslist[57] = "eel"; + animalslist[58] = "eland"; + animalslist[59] = "elephant"; + animalslist[60] = "elephant seal"; + animalslist[61] = "elk"; + animalslist[62] = "emu"; + animalslist[63] = "falcon"; + animalslist[64] = "ferret"; + animalslist[65] = "finch"; + animalslist[66] = "fish"; + animalslist[67] = "flamingo"; + animalslist[68] = "fly"; + animalslist[69] = "fox"; + animalslist[70] = "frog"; + animalslist[71] = "galago"; + animalslist[72] = "gaur"; + animalslist[73] = "gazelle"; + animalslist[74] = "gerbil"; + animalslist[75] = "giant panda"; + animalslist[76] = "giraffe"; + animalslist[77] = "gnat"; + animalslist[78] = "gnu"; + animalslist[79] = "goat"; + animalslist[80] = "goldfinch"; + animalslist[81] = "goldfish"; + animalslist[82] = "goose"; + animalslist[83] = "gorilla"; + animalslist[84] = "goshawk"; + animalslist[85] = "grasshopper"; + animalslist[86] = "grouse"; + animalslist[87] = "guanaco"; + animalslist[88] = "guineafowl"; + animalslist[89] = "guinea pig"; + animalslist[90] = "gull"; + animalslist[91] = "hamster"; + animalslist[92] = "hare"; + animalslist[93] = "hawk"; + animalslist[94] = "hedgehog"; + animalslist[95] = "heron"; + animalslist[96] = "herring"; + animalslist[97] = "hippopotamus"; + animalslist[98] = "hornet"; + animalslist[99] = "horse"; + animalslist[100] = "human"; + animalslist[101] = "humming bird"; + animalslist[102] = "hyena"; + animalslist[103] = "jackal"; + animalslist[104] = "jaguar"; + animalslist[105] = "jay"; + animalslist[106] = "jellyfish"; + animalslist[107] = "kangaroo"; + animalslist[108] = "koala"; + animalslist[109] = "komodo dragon"; + animalslist[110] = "kouprey"; + animalslist[111] = "kudu"; + animalslist[112] = "lizard"; + animalslist[113] = "lark"; + animalslist[114] = "lemur"; + animalslist[115] = "leopard"; + animalslist[116] = "lion"; + animalslist[117] = "llama"; + animalslist[118] = "lobster"; + animalslist[119] = "locust"; + animalslist[120] = "loris"; + animalslist[121] = "louse"; + animalslist[122] = "lyrebird"; + animalslist[123] = "magpie"; + animalslist[124] = "mallard"; + animalslist[125] = "manatee"; + animalslist[126] = "marten"; + animalslist[127] = "meerkat"; + animalslist[128] = "mink"; + animalslist[129] = "mole"; + animalslist[130] = "monkey"; + animalslist[131] = "moose"; + animalslist[132] = "mosquito"; + animalslist[133] = "mouse"; + animalslist[134] = "mule"; + animalslist[135] = "narwhal"; + animalslist[136] = "newt"; + animalslist[137] = "nightingale"; + animalslist[138] = "octopus"; + animalslist[139] = "okapi"; + animalslist[140] = "opossum"; + animalslist[141] = "oryx"; + animalslist[142] = "ostrich"; + animalslist[143] = "otter"; + animalslist[144] = "owl"; + animalslist[145] = "ox"; + animalslist[146] = "oyster"; + animalslist[147] = "panther"; + animalslist[148] = "parrot"; + animalslist[149] = "partridge"; + animalslist[150] = "peafowl"; + animalslist[151] = "pelican"; + animalslist[152] = "penguin"; + animalslist[153] = "pheasant"; + animalslist[154] = "pig"; + animalslist[155] = "pigeon"; + animalslist[156] = "pony"; + animalslist[157] = "porcupine"; + animalslist[158] = "porpoise"; + animalslist[159] = "prairie dog"; + animalslist[160] = "quail"; + animalslist[161] = "quelea"; + animalslist[162] = "rabbit"; + animalslist[163] = "raccoon"; + animalslist[164] = "rail"; + animalslist[165] = "ram"; + animalslist[166] = "rat"; + animalslist[167] = "raven"; + animalslist[168] = "red deer"; + animalslist[169] = "red panda"; + animalslist[170] = "reindeer"; + animalslist[171] = "rhinoceros"; + animalslist[172] = "rook"; + animalslist[173] = "ruff"; + animalslist[174] = "salamander"; + animalslist[175] = "salmon"; + animalslist[176] = "sand dollar"; + animalslist[177] = "sandpiper"; + animalslist[178] = "sardine"; + animalslist[179] = "scorpion"; + animalslist[180] = "sea lion"; + animalslist[181] = "sea urchin"; + animalslist[182] = "seahorse"; + animalslist[183] = "seal"; + animalslist[184] = "shark"; + animalslist[185] = "sheep"; + animalslist[186] = "shrew"; + animalslist[187] = "shrimp"; + animalslist[188] = "skunk"; + animalslist[189] = "snail"; + animalslist[190] = "snake"; + animalslist[191] = "spider"; + animalslist[192] = "squid"; + animalslist[193] = "squirrel"; + animalslist[194] = "starling"; + animalslist[195] = "stingray"; + animalslist[196] = "stink bug"; + animalslist[197] = "stork"; + animalslist[198] = "swallow"; + animalslist[199] = "swan"; + animalslist[200] = "tapir"; + animalslist[201] = "tarsier"; + animalslist[202] = "termite"; + animalslist[203] = "tiger"; + animalslist[204] = "toad"; + animalslist[205] = "trout"; + animalslist[206] = "turkey"; + animalslist[207] = "turtle"; + animalslist[208] = "vicuña"; + animalslist[209] = "viper"; + animalslist[210] = "vulture"; + animalslist[211] = "wallaby"; + animalslist[212] = "walrus"; + animalslist[213] = "wasp"; + animalslist[214] = "water buffalo"; + animalslist[215] = "weasel"; + animalslist[216] = "whale"; + animalslist[217] = "wolf"; + animalslist[218] = "wolverine"; + animalslist[219] = "wombat"; + animalslist[220] = "woodcock"; + animalslist[221] = "woodpecker"; + animalslist[222] = "worm"; + animalslist[223] = "wren"; + animalslist[224] = "yak"; + animalslist[225] = "zebra"; + animalslist[226] = "bird"; + } + + private void makefruitlist() + { + fruitslist[0] = "apple"; + fruitslist[1] = "apricot"; + fruitslist[2] = "avocado"; + fruitslist[3] = "banana"; + fruitslist[4] = "breadfruit"; + fruitslist[5] = "bilberry"; + fruitslist[6] = "blackberry"; + fruitslist[7] = "blackcurrant"; + fruitslist[8] = "blueberry"; + fruitslist[9] = "boysenberry"; + fruitslist[10] = "cantaloupe"; + fruitslist[11] = "currant"; + fruitslist[12] = "cherry"; + fruitslist[13] = "cherimoya"; + fruitslist[14] = "chili"; + fruitslist[15] = "cloudberry"; + fruitslist[16] = "coconut"; + fruitslist[17] = "damson"; + fruitslist[18] = "date"; + fruitslist[19] = "dragonfruit"; + fruitslist[20] = "durian"; + fruitslist[21] = "elderberry"; + fruitslist[22] = "feijoa"; + fruitslist[23] = "fig"; + fruitslist[24] = "gooseberry"; + fruitslist[25] = "grape"; + fruitslist[26] = "grapefruit"; + fruitslist[27] = "guava"; + fruitslist[28] = "huckleberry"; + fruitslist[29] = "honeydew"; + fruitslist[30] = "jackfruit"; + fruitslist[31] = "jambul"; + fruitslist[32] = "jujube"; + fruitslist[33] = "kiwi fruit"; + fruitslist[34] = "kumquat"; + fruitslist[35] = "legume"; + fruitslist[36] = "lemon"; + fruitslist[37] = "lime"; + fruitslist[38] = "loquat"; + fruitslist[39] = "lychee"; + fruitslist[40] = "mango"; + fruitslist[41] = "melon"; + fruitslist[42] = "canary melon"; + fruitslist[43] = "cantaloupe"; + fruitslist[44] = "honeydew"; + fruitslist[45] = "watermelon"; + fruitslist[46] = "rock melon"; + fruitslist[47] = "nectarine"; + fruitslist[48] = "nut"; + fruitslist[49] = "orange"; + fruitslist[50] = "clementine"; + fruitslist[51] = "mandarine"; + fruitslist[52] = "tangerine"; + fruitslist[53] = "papaya"; + fruitslist[54] = "passionfruit"; + fruitslist[55] = "peach"; + fruitslist[56] = "bell pepper"; + fruitslist[57] = "pear"; + fruitslist[58] = "persimmon"; + fruitslist[59] = "physalis"; + fruitslist[60] = "plum"; + fruitslist[61] = "pineapple"; + fruitslist[62] = "pomegranate"; + fruitslist[63] = "pomelo"; + fruitslist[64] = "purple mangosteen"; + fruitslist[65] = "quince"; + fruitslist[66] = "raspberry"; + fruitslist[67] = "rambutan"; + fruitslist[68] = "redcurrant"; + fruitslist[69] = "salal berry"; + fruitslist[70] = "satsuma"; + fruitslist[71] = "star fruit"; + fruitslist[72] = "strawberry"; + fruitslist[73] = "tamarillo"; + fruitslist[74] = "tomato"; + fruitslist[75] = "ugli fruit"; + } + + //Based off United Nations member list with additions such as Vatican City - see this video about what a coutry is: https://www.youtube.com/watch?v=4AivEQmfPpk + private void makecountrieslist() + { + countrieslist[0] = "afghanistan"; + countrieslist[1] = "albania"; + countrieslist[2] = "algeria"; + countrieslist[3] = "antigua and barbuda"; + countrieslist[4] = "andorra"; + countrieslist[5] = "angola"; + countrieslist[8] = "argentina"; + countrieslist[9] = "armenia"; + countrieslist[10] = "australia"; + countrieslist[12] = "austria"; + countrieslist[14] = "azerbaijan"; + countrieslist[15] = "bahamas"; + countrieslist[16] = "bahrain"; + countrieslist[17] = "bangladesh"; + countrieslist[18] = "barbados"; + countrieslist[19] = "belarus"; + countrieslist[20] = "belgium"; + countrieslist[21] = "belize"; + countrieslist[22] = "benin"; + countrieslist[23] = "bhutan"; + countrieslist[24] = "bolivia"; + countrieslist[25] = "bosnia"; + countrieslist[26] = "botswana"; + countrieslist[27] = "brunei darussalam"; + countrieslist[28] = "brazil"; + countrieslist[29] = "cabo verde"; + countrieslist[30] = "bulgaria"; + countrieslist[31] = "burkina faso"; + countrieslist[32] = "burundi"; + countrieslist[33] = "cambodia"; + countrieslist[34] = "cameroon"; + countrieslist[35] = "canada"; + countrieslist[36] = "central african republic"; + countrieslist[37] = "chad"; + countrieslist[38] = "chile"; + countrieslist[39] = "china"; + countrieslist[40] = "democratic people's republic of korea"; + countrieslist[41] = "colombia"; + countrieslist[42] = "comoros"; + countrieslist[43] = "congo"; + countrieslist[44] = "côte d'ivoire"; + countrieslist[45] = "cook islands"; + countrieslist[46] = "costa rica"; + countrieslist[47] = "croatia"; + countrieslist[48] = "cuba"; + countrieslist[49] = "cyprus"; + countrieslist[50] = "czech republic"; + countrieslist[51] = "denmark"; + countrieslist[52] = "djibouti"; + countrieslist[53] = "dominica"; + countrieslist[54] = "dominican republic"; + countrieslist[55] = "ecuador"; + countrieslist[56] = "egypt"; + countrieslist[57] = "el salvador"; + countrieslist[58] = "equatorial guinea"; + countrieslist[59] = "eritrea"; + countrieslist[60] = "estonia"; + countrieslist[62] = "ethiopia"; + countrieslist[63] = "fiji"; + countrieslist[64] = "finland"; + countrieslist[65] = "france"; + countrieslist[66] = "gabon"; + countrieslist[67] = "gambia"; + countrieslist[68] = "georgia"; + countrieslist[69] = "germany"; + countrieslist[70] = "ghana"; + countrieslist[71] = "greece"; + countrieslist[72] = "greenland"; + countrieslist[73] = "grenada"; + countrieslist[74] = "guatemala"; + countrieslist[75] = "guinea"; + countrieslist[76] = "guinea bissau"; + countrieslist[77] = "guyana"; + countrieslist[78] = "haiti"; + countrieslist[79] = "vatican city"; + countrieslist[80] = "honduras"; + countrieslist[81] = "hungary"; + countrieslist[82] = "iceland"; + countrieslist[83] = "india"; + countrieslist[84] = "indonesia"; + countrieslist[85] = "iran"; + countrieslist[86] = "iraq"; + countrieslist[87] = "ireland"; + countrieslist[88] = "israel"; + countrieslist[89] = "italy"; + countrieslist[90] = "jamaica"; + countrieslist[91] = "japan"; + countrieslist[92] = "jordan"; + countrieslist[93] = "kazakhstan"; + countrieslist[94] = "kenya"; + countrieslist[95] = "kiribati"; + countrieslist[96] = "kuwait"; + countrieslist[97] = "kyrgyzstan"; + countrieslist[98] = "lao people's democratic republic"; + countrieslist[99] = "latvia"; + countrieslist[100] = "lebanon"; + countrieslist[101] = "lesotho"; + countrieslist[102] = "liberia"; + countrieslist[103] = "libya"; + countrieslist[104] = "liechtenstein"; + countrieslist[105] = "lithuania"; + countrieslist[106] = "luxembourg"; + countrieslist[107] = "madagascar"; + countrieslist[108] = "malawi"; + countrieslist[109] = "malaysia"; + countrieslist[110] = "maldives"; + countrieslist[111] = "mali"; + countrieslist[112] = "malta"; + countrieslist[113] = "marshall islands"; + countrieslist[114] = "mauritania"; + countrieslist[115] = "mauritius"; + countrieslist[116] = "mexico"; + countrieslist[117] = "micronesia"; + countrieslist[118] = "monaco"; + countrieslist[119] = "mongolia"; + countrieslist[120] = "montenegro"; + countrieslist[121] = "morocco"; + countrieslist[122] = "mozambique"; + countrieslist[123] = "myanmar"; + countrieslist[124] = "namibia"; + countrieslist[125] = "nauru"; + countrieslist[126] = "nepal"; + countrieslist[127] = "netherlands"; + countrieslist[128] = "new zealand"; + countrieslist[129] = "nicaragua"; + countrieslist[130] = "niger"; + countrieslist[131] = "nigeria"; + countrieslist[132] = "north korea"; + countrieslist[133] = "norway"; + countrieslist[134] = "oman"; + countrieslist[135] = "pakistan"; + countrieslist[136] = "palau"; + countrieslist[137] = "panama"; + countrieslist[138] = "papua new guinea"; + countrieslist[139] = "paraguay"; + countrieslist[140] = "peru"; + countrieslist[141] = "philippines"; + countrieslist[142] = "republic of moldova"; + countrieslist[143] = "poland"; + countrieslist[144] = "polynesia"; + countrieslist[145] = "portugal"; + countrieslist[146] = "republic of korea"; + countrieslist[147] = "romania"; + countrieslist[148] = "russia"; + countrieslist[149] = "rwanda"; + countrieslist[150] = "saint kitts and nevis"; + countrieslist[151] = "saint lucia"; + countrieslist[152] = "saint pierre and miquelon"; + countrieslist[153] = "saint vincent and grenadines"; + countrieslist[154] = "samoa"; + countrieslist[155] = "san marino"; + countrieslist[156] = "sao tome and principe"; + countrieslist[157] = "saudi arabia"; + countrieslist[158] = "senegal"; + countrieslist[159] = "serbia"; + countrieslist[160] = "seychelles"; + countrieslist[161] = "sierra leone"; + countrieslist[162] = "singapore"; + countrieslist[163] = "slovakia"; + countrieslist[164] = "slovenia"; + countrieslist[165] = "solomon islands"; + countrieslist[166] = "somalia"; + countrieslist[167] = "south africa"; + countrieslist[168] = "south korea"; + countrieslist[169] = "south sudan"; + countrieslist[170] = "spain"; + countrieslist[171] = "sri lanka"; + countrieslist[172] = "sudan"; + countrieslist[173] = "suriname"; + countrieslist[174] = "syrian arab republic"; + countrieslist[175] = "swaziland"; + countrieslist[176] = "sweden"; + countrieslist[177] = "switzerland"; + countrieslist[178] = "syria"; + countrieslist[179] = "taiwan"; + countrieslist[180] = "tajikistan"; + countrieslist[181] = "thailand"; + countrieslist[182] = "east timor"; + countrieslist[183] = "togo"; + countrieslist[184] = "tonga"; + countrieslist[185] = "trinidad and tobago"; + countrieslist[186] = "tunisia"; + countrieslist[187] = "turkey"; + countrieslist[188] = "turkmenistan"; + countrieslist[189] = "united republic of tanzania"; + countrieslist[190] = "tuvalu"; + countrieslist[191] = "uganda"; + countrieslist[192] = "ukraine"; + countrieslist[193] = "united arab emirates"; + countrieslist[194] = "united kingdom"; + //(of Great Britian and Northern Ireland) + countrieslist[195] = "united states"; + countrieslist[196] = "uruguay"; + countrieslist[197] = "uzbekistan"; + countrieslist[198] = "vanuatu"; + countrieslist[199] = "venezuela"; + countrieslist[200] = "vietnam"; + countrieslist[201] = "palestine"; + countrieslist[202] = "yemen"; + countrieslist[203] = "zambia"; + countrieslist[204] = "zimbabwe"; + } + + public void makecarbrandslist() + { + carbrandslist[0] = "8 chinkara"; + carbrandslist[1] = "aba"; + carbrandslist[2] = "abarth"; + carbrandslist[3] = "ac"; + carbrandslist[4] = "ac schnitzer"; + carbrandslist[5] = "acura"; + carbrandslist[6] = "adam"; + carbrandslist[7] = "adams-farwell"; + carbrandslist[8] = "adler"; + carbrandslist[9] = "aero"; + carbrandslist[10] = "aga"; + carbrandslist[11] = "agrale"; + carbrandslist[12] = "aixam"; + carbrandslist[13] = "alfa romeo"; + carbrandslist[14] = "allard"; + carbrandslist[15] = "alpine"; + carbrandslist[16] = "alvis"; + carbrandslist[17] = "anadol"; + carbrandslist[18] = "anasagasti"; + carbrandslist[19] = "angkor"; + carbrandslist[20] = "apollo"; + carbrandslist[21] = "armstrong siddeley"; + carbrandslist[22] = "aro"; + carbrandslist[23] = "ascari"; + carbrandslist[24] = "ashok leyland"; + carbrandslist[25] = "aston martin"; + carbrandslist[26] = "auburn"; + carbrandslist[27] = "audi"; + carbrandslist[28] = "austin"; + carbrandslist[29] = "austin-healey"; + carbrandslist[30] = "auto-mixte"; + carbrandslist[31] = "autobianchi"; + carbrandslist[32] = "automobile dacia"; + carbrandslist[33] = "avia"; + carbrandslist[34] = "avtoframos"; + carbrandslist[35] = "awz"; + carbrandslist[36] = "bahman"; + carbrandslist[37] = "bajaj"; + carbrandslist[38] = "barkas"; + carbrandslist[39] = "bate"; + carbrandslist[40] = "bentley"; + carbrandslist[41] = "bharath benz"; + carbrandslist[42] = "bitter"; + carbrandslist[43] = "bmc"; + carbrandslist[44] = "bmw"; + carbrandslist[45] = "bollore"; + carbrandslist[46] = "borgward"; + carbrandslist[47] = "bricklin"; + carbrandslist[48] = "bristol"; + carbrandslist[49] = "british leyland"; + carbrandslist[50] = "bufori"; + carbrandslist[51] = "bugatti"; + carbrandslist[52] = "buick"; + carbrandslist[53] = "bussing"; + carbrandslist[54] = "c-fee"; + carbrandslist[55] = "cadillac"; + carbrandslist[56] = "callaway"; + carbrandslist[57] = "caterham"; + carbrandslist[58] = "cherdchai"; + carbrandslist[59] = "chevrolet"; + carbrandslist[60] = "chrysler"; + carbrandslist[61] = "citroen"; + carbrandslist[62] = "cizeta"; + carbrandslist[63] = "coda"; + carbrandslist[64] = "cord"; + carbrandslist[65] = "crespi"; + carbrandslist[66] = "crobus"; + carbrandslist[67] = "daf"; + carbrandslist[68] = "daihatsu"; + carbrandslist[69] = "daimler"; + carbrandslist[70] = "datsun"; + carbrandslist[71] = "davis"; + carbrandslist[72] = "dc design"; + carbrandslist[73] = "de tomaso"; + carbrandslist[74] = "delorean"; + carbrandslist[75] = "derby"; + carbrandslist[76] = "dina"; + carbrandslist[77] = "dkw"; + carbrandslist[78] = "knowledgeinput"; + carbrandslist[79] = "dok-ing"; + carbrandslist[80] = "dok-ing xd"; + carbrandslist[81] = "dome"; + carbrandslist[82] = "donkervoort"; + carbrandslist[83] = "dr"; + carbrandslist[84] = "duesenberg"; + carbrandslist[85] = "e-z-go"; + carbrandslist[86] = "eagle"; + carbrandslist[87] = "edsel"; + carbrandslist[88] = "eicher"; + carbrandslist[89] = "elfin"; + carbrandslist[90] = "elva"; + carbrandslist[91] = "enzmann"; + carbrandslist[92] = "essex"; + carbrandslist[93] = "esther"; + carbrandslist[94] = "exagon"; + carbrandslist[95] = "falcon"; + carbrandslist[96] = "fap"; + carbrandslist[97] = "ferrari"; + carbrandslist[98] = "fiat"; + carbrandslist[99] = "fisker"; + carbrandslist[100] = "force"; + carbrandslist[101] = "ford"; + carbrandslist[102] = "fpv"; + carbrandslist[103] = "gaz"; + carbrandslist[104] = "gengatharan"; + carbrandslist[105] = "geo"; + carbrandslist[106] = "ghandhara"; + carbrandslist[107] = "ghandhara nissan"; + carbrandslist[108] = "gillet"; + carbrandslist[109] = "ginetta"; + carbrandslist[110] = "gkd"; + carbrandslist[111] = "glas"; + carbrandslist[112] = "global electric"; + carbrandslist[113] = "gm daewoo"; + carbrandslist[114] = "gm uzbekistan"; + carbrandslist[115] = "gmc"; + carbrandslist[116] = "goliath"; + carbrandslist[117] = "gordon keeble"; + carbrandslist[118] = "graham-paige"; + carbrandslist[119] = "guleryuz karoseri"; + carbrandslist[120] = "gumpert"; + carbrandslist[121] = "gurgel"; + carbrandslist[122] = "hansa"; + carbrandslist[123] = "hattat"; + carbrandslist[124] = "heinkel"; + carbrandslist[125] = "hennessey"; + carbrandslist[126] = "hero"; + carbrandslist[127] = "hillman"; + carbrandslist[128] = "hindustan"; + carbrandslist[129] = "hino"; + carbrandslist[130] = "hinopak"; + carbrandslist[131] = "hispano-argentina"; + carbrandslist[132] = "holden"; + carbrandslist[133] = "hommell"; + carbrandslist[134] = "honda"; + carbrandslist[135] = "honda atlas"; + carbrandslist[136] = "horch"; + carbrandslist[137] = "hsv"; + carbrandslist[138] = "huet brothers"; + carbrandslist[139] = "humber"; + carbrandslist[140] = "hummer"; + carbrandslist[141] = "hupmobile"; + carbrandslist[142] = "hyundai"; + carbrandslist[143] = "iame"; + carbrandslist[144] = "icml"; + carbrandslist[145] = "ida-opel"; + carbrandslist[146] = "ika"; + carbrandslist[147] = "ikarbus"; + carbrandslist[148] = "ikco"; + carbrandslist[149] = "indus"; + carbrandslist[150] = "infiniti"; + carbrandslist[151] = "inokom"; + carbrandslist[152] = "intermeccanica"; + carbrandslist[153] = "international harvester"; + carbrandslist[154] = "isuzu"; + carbrandslist[155] = "isuzu anadolu"; + carbrandslist[156] = "italika"; + carbrandslist[157] = "izh"; + carbrandslist[158] = "jaguar cars"; + carbrandslist[159] = "jeep"; + carbrandslist[160] = "jensen"; + carbrandslist[161] = "josse"; + carbrandslist[162] = "jowett"; + carbrandslist[163] = "jv man"; + carbrandslist[164] = "kaipan"; + carbrandslist[165] = "kaiser"; + carbrandslist[166] = "karsan"; + carbrandslist[167] = "kerman"; + carbrandslist[168] = "kia"; + carbrandslist[169] = "kia"; + carbrandslist[170] = "kish khodro"; + carbrandslist[171] = "kissel"; + carbrandslist[172] = "koenigsegg"; + carbrandslist[173] = "lada"; + carbrandslist[174] = "laforza"; + carbrandslist[175] = "lamborghini"; + carbrandslist[176] = "lanchester"; + carbrandslist[177] = "lancia"; + carbrandslist[178] = "land rover"; + carbrandslist[179] = "lasalle"; + carbrandslist[180] = "lexus"; + carbrandslist[181] = "ligier"; + carbrandslist[182] = "lincoln"; + carbrandslist[183] = "lister"; + carbrandslist[184] = "lloyd"; + carbrandslist[185] = "lobini"; + carbrandslist[186] = "locomobile"; + carbrandslist[187] = "lotus"; + carbrandslist[188] = "mahindra"; + carbrandslist[189] = "man"; + carbrandslist[190] = "mansory"; + carbrandslist[191] = "marcos"; + carbrandslist[192] = "marmon"; + carbrandslist[193] = "marussia"; + carbrandslist[194] = "maruti suzuki"; + carbrandslist[195] = "maserati"; + carbrandslist[196] = "master"; + carbrandslist[197] = "mastretta"; + carbrandslist[198] = "matra"; + carbrandslist[199] = "maybach"; + carbrandslist[200] = "mazda"; + carbrandslist[201] = "mclaren"; + carbrandslist[202] = "mdi"; + carbrandslist[203] = "mercedes"; + carbrandslist[204] = "mercury"; + carbrandslist[205] = "micro"; + carbrandslist[206] = "microcar"; + carbrandslist[207] = "mini"; + carbrandslist[208] = "mini cooper"; + carbrandslist[209] = "mitsubishi"; + carbrandslist[210] = "mitsuoka"; + carbrandslist[211] = "morgan"; + carbrandslist[212] = "morris"; + carbrandslist[213] = "moskvitch"; + carbrandslist[214] = "mosler"; + carbrandslist[215] = "multicar"; + carbrandslist[216] = "mvm"; + carbrandslist[217] = "nag"; + carbrandslist[218] = "nagant"; + carbrandslist[219] = "nash"; + carbrandslist[220] = "navistar"; + carbrandslist[221] = "naza"; + carbrandslist[222] = "neobus"; + carbrandslist[223] = "neoplan"; + carbrandslist[224] = "nissan"; + carbrandslist[225] = "noble"; + carbrandslist[226] = "nsu"; + carbrandslist[227] = "oldsmobile"; + carbrandslist[228] = "oltcit"; + carbrandslist[229] = "opel"; + carbrandslist[230] = "orient"; + carbrandslist[231] = "otokar"; + carbrandslist[232] = "otosan"; + carbrandslist[233] = "oyak"; + carbrandslist[234] = "p.a.r.s moto"; + carbrandslist[235] = "packard"; + carbrandslist[236] = "pagani"; + carbrandslist[237] = "pak suzuki"; + carbrandslist[238] = "panoz"; + carbrandslist[239] = "pars khodro"; + carbrandslist[240] = "perodua"; + carbrandslist[241] = "peugeot"; + carbrandslist[242] = "pgo"; + carbrandslist[243] = "pieper"; + carbrandslist[244] = "pierce-arrow"; + carbrandslist[245] = "plymouth"; + carbrandslist[246] = "pontiac"; + carbrandslist[247] = "porsche"; + carbrandslist[248] = "praga"; + carbrandslist[249] = "premier"; + carbrandslist[250] = "proto"; + carbrandslist[251] = "proton"; + carbrandslist[252] = "puma"; + carbrandslist[253] = "ram"; + carbrandslist[254] = "ramirez"; + carbrandslist[255] = "regal"; + carbrandslist[256] = "renault"; + carbrandslist[257] = "renault samsung"; + carbrandslist[258] = "reo"; + carbrandslist[259] = "riley"; + carbrandslist[260] = "rimac"; + carbrandslist[261] = "robur"; + carbrandslist[262] = "rolls royce"; + carbrandslist[263] = "rover"; + carbrandslist[264] = "ruf"; + carbrandslist[265] = "russo-balt"; + carbrandslist[266] = "saab"; + carbrandslist[267] = "saipa"; + carbrandslist[268] = "saleen"; + carbrandslist[269] = "samavto"; + carbrandslist[270] = "saturn"; + carbrandslist[271] = "sbarro"; + carbrandslist[272] = "scania"; + carbrandslist[273] = "scion"; + carbrandslist[274] = "shane moto"; + carbrandslist[275] = "siam v.m.c."; + carbrandslist[276] = "siata"; + carbrandslist[277] = "simson"; + carbrandslist[278] = "singer"; + carbrandslist[279] = "skoda"; + carbrandslist[280] = "sound"; + carbrandslist[281] = "spyker"; + carbrandslist[282] = "ssangyong"; + carbrandslist[283] = "standard"; + carbrandslist[284] = "stealth"; + carbrandslist[285] = "sterling"; + carbrandslist[286] = "studebaker"; + carbrandslist[287] = "subaru"; + carbrandslist[288] = "sunbeam"; + carbrandslist[289] = "suzuki"; + carbrandslist[290] = "tac"; + carbrandslist[291] = "tafe"; + carbrandslist[292] = "tata"; + carbrandslist[293] = "tatra"; + carbrandslist[294] = "td2000"; + carbrandslist[295] = "temsa"; + carbrandslist[296] = "tesla"; + carbrandslist[297] = "th!nk"; + carbrandslist[298] = "thai rung"; + carbrandslist[299] = "the jamie stahley car"; + carbrandslist[300] = "tickford"; + carbrandslist[301] = "toyota"; + carbrandslist[302] = "trabant"; + carbrandslist[303] = "tranvias-cimex"; + carbrandslist[304] = "triumph"; + carbrandslist[305] = "trojan"; + carbrandslist[306] = "troller"; + carbrandslist[307] = "tucker"; + carbrandslist[308] = "turk traktor"; + carbrandslist[309] = "tvr"; + carbrandslist[310] = "tvs"; + carbrandslist[311] = "uaz"; + carbrandslist[312] = "vam sa"; + carbrandslist[313] = "vauxhall"; + carbrandslist[314] = "venturi"; + carbrandslist[315] = "vignale"; + carbrandslist[316] = "volkswagen"; + carbrandslist[317] = "volvo"; + carbrandslist[318] = "wanderer"; + carbrandslist[319] = "wartburg"; + carbrandslist[320] = "wiesmann"; + carbrandslist[321] = "willys"; + carbrandslist[322] = "wolseley"; + carbrandslist[323] = "yamaha"; + carbrandslist[324] = "yo-mobile"; + carbrandslist[325] = "zastava"; + carbrandslist[326] = "zenvo"; + carbrandslist[327] = "zil"; + carbrandslist[328] = "zoragy"; + } + + public void makegameconsoleslist() + { + gameconsoleslist[0] = "magnavox odyssey"; + gameconsoleslist[1] = "ping-o-tronic"; + gameconsoleslist[2] = "telstar"; + gameconsoleslist[3] = "apf tv fun"; + gameconsoleslist[4] = "philips odyssey"; + gameconsoleslist[5] = "radio shack tv scoreboard"; + gameconsoleslist[6] = "binatone tv master mk iv"; + gameconsoleslist[7] = "color tv game 6"; + gameconsoleslist[8] = "color tv game 15"; + gameconsoleslist[9] = "color tv racing 112"; + gameconsoleslist[10] = "color tv game block breaker"; + gameconsoleslist[11] = "computer tv game"; + gameconsoleslist[12] = "bss 01"; + gameconsoleslist[13] = "fairchild channel f"; + gameconsoleslist[14] = "fairchild channel f system ii"; + gameconsoleslist[15] = "rca studio ii"; + gameconsoleslist[16] = "atari 2600"; + gameconsoleslist[17] = "atari 2600 jr"; + gameconsoleslist[18] = "atari 2800"; + gameconsoleslist[19] = "coleco gemini"; + gameconsoleslist[20] = "bally astrocade"; + gameconsoleslist[21] = "vc 4000"; + gameconsoleslist[22] = "magnavox odyssey 2"; + gameconsoleslist[23] = "apf imagination machine"; + gameconsoleslist[24] = "intellivision"; + gameconsoleslist[25] = "playcable"; + gameconsoleslist[26] = "bandai super vision 8000"; + gameconsoleslist[27] = "intellivision ii"; + gameconsoleslist[28] = "vtech creativision"; + gameconsoleslist[29] = "epoch cassette vision"; + gameconsoleslist[30] = "super cassette vision"; + gameconsoleslist[31] = "arcadia 2001"; + gameconsoleslist[32] = "atari 5200"; + gameconsoleslist[33] = "atari 5100"; + gameconsoleslist[34] = "colecovision"; + gameconsoleslist[35] = "entex adventure vision"; + gameconsoleslist[36] = "vectrex"; + gameconsoleslist[37] = "rdi halcyon"; + gameconsoleslist[38] = "pv-1000"; + gameconsoleslist[39] = "commodore 64 games system"; + gameconsoleslist[40] = "amstrad gx4000"; + gameconsoleslist[41] = "atari 7800"; + gameconsoleslist[42] = "atari xegs"; + gameconsoleslist[43] = "sega sg-1000"; + gameconsoleslist[44] = "sega master system"; + gameconsoleslist[45] = "nintendo entertainment system"; + gameconsoleslist[46] = "sharp nintendo television"; + gameconsoleslist[47] = "nes-101"; + gameconsoleslist[48] = "family computer disk system"; + gameconsoleslist[49] = "zemmix"; + gameconsoleslist[50] = "action max"; + gameconsoleslist[51] = "sega genesis"; + gameconsoleslist[52] = "sega pico"; + gameconsoleslist[53] = "pc engine"; + gameconsoleslist[54] = "konix multisystem"; + gameconsoleslist[55] = "neo-geo"; + gameconsoleslist[56] = "neo-geo cd"; + gameconsoleslist[57] = "neo-geo cdz"; + gameconsoleslist[58] = "commodore cdtv"; + gameconsoleslist[59] = "memorex vis"; + gameconsoleslist[60] = "super nintendo entertainment system"; + gameconsoleslist[61] = "sf-1 snes tv"; + gameconsoleslist[62] = "snes 2"; + gameconsoleslist[63] = "snes-cd"; + gameconsoleslist[64] = "satellaview"; + gameconsoleslist[65] = "cd-i"; + gameconsoleslist[66] = "turboduo"; + gameconsoleslist[67] = "super a'can"; + gameconsoleslist[68] = "pioneer laseractive"; + gameconsoleslist[69] = "fm towns marty"; + gameconsoleslist[70] = "apple bandai pippin"; + gameconsoleslist[71] = "pc-fx"; + gameconsoleslist[72] = "atari panther"; + gameconsoleslist[73] = "atari jaguar"; + gameconsoleslist[74] = "atari jaguar cd"; + gameconsoleslist[75] = "playstation"; + gameconsoleslist[76] = "net yaroze"; + gameconsoleslist[77] = "sega saturn"; + gameconsoleslist[78] = "3do interactive multiplayer"; + gameconsoleslist[79] = "amiga cd32"; + gameconsoleslist[80] = "casio loopy"; + gameconsoleslist[81] = "playdia"; + gameconsoleslist[82] = "nintendo 64"; + gameconsoleslist[83] = "nintendo 64dd"; + gameconsoleslist[84] = "sega neptune"; + gameconsoleslist[85] = "apextreme"; + gameconsoleslist[86] = "atari flashback"; + gameconsoleslist[87] = "atari jaguar ii"; + gameconsoleslist[88] = "dreamcast"; + gameconsoleslist[89] = "l600"; + gameconsoleslist[90] = "gamecube"; + gameconsoleslist[91] = "nuon"; + gameconsoleslist[92] = "ique player"; + gameconsoleslist[93] = "panasonic m2"; + gameconsoleslist[94] = "panasonic q"; + gameconsoleslist[95] = "playstation 2"; + gameconsoleslist[96] = "psx"; + gameconsoleslist[97] = "v.smile"; + gameconsoleslist[98] = "xavixport gaming console"; + gameconsoleslist[99] = "xbox"; + gameconsoleslist[100] = "atari flashback 2"; + gameconsoleslist[101] = "atari flashback 3"; + gameconsoleslist[102] = "atari flashback 4"; + gameconsoleslist[103] = "evo smart console"; + gameconsoleslist[104] = "retro duo"; + gameconsoleslist[105] = "game wave"; + gameconsoleslist[106] = "mattel hyperscan"; + gameconsoleslist[107] = "onlive"; + gameconsoleslist[108] = "phantom"; + gameconsoleslist[109] = "playstation 3"; + gameconsoleslist[110] = "wii"; + gameconsoleslist[111] = "xbox 360"; + gameconsoleslist[112] = "sega firecore"; + gameconsoleslist[113] = "zeebo"; + gameconsoleslist[114] = "sega zone"; + gameconsoleslist[115] = "eedoo ct510"; + gameconsoleslist[116] = "wii u"; + gameconsoleslist[117] = "ouya"; + gameconsoleslist[118] = "gamestick"; + gameconsoleslist[119] = "mojo"; + gameconsoleslist[120] = "gamepop"; + gameconsoleslist[121] = "playstation 4"; + gameconsoleslist[122] = "steam machine"; + gameconsoleslist[123] = "xbox one"; + gameconsoleslist[124] = "xi3 piston"; + + } + + public void makeelementslist() + { + elementslist[0] = "hydrogen"; + elementslist[1] = "helium"; + elementslist[2] = "lithium"; + elementslist[3] = "beryllium"; + elementslist[4] = "boron"; + elementslist[5] = "carbon"; + elementslist[6] = "nitrogen"; + elementslist[7] = "oxygen"; + elementslist[8] = "fluorine"; + elementslist[9] = "neon"; + elementslist[10] = "sodium"; + elementslist[11] = "magnesium"; + elementslist[12] = "aluminium"; + elementslist[13] = "silicon"; + elementslist[14] = "phosphorus"; + elementslist[15] = "sulfur"; + elementslist[16] = "chlorine"; + elementslist[17] = "argon"; + elementslist[18] = "potassium"; + elementslist[19] = "calcium"; + elementslist[20] = "scandium"; + elementslist[21] = "titanium"; + elementslist[22] = "vanadium"; + elementslist[23] = "chromium"; + elementslist[24] = "manganese"; + elementslist[25] = "iron"; + elementslist[26] = "cobalt"; + elementslist[27] = "nickel"; + elementslist[28] = "copper"; + elementslist[29] = "zinc"; + elementslist[30] = "gallium"; + elementslist[31] = "germanium"; + elementslist[32] = "arsenic"; + elementslist[33] = "selenium"; + elementslist[34] = "bromine"; + elementslist[35] = "krypton"; + elementslist[36] = "rubidium"; + elementslist[37] = "strontium"; + elementslist[38] = "yttrium"; + elementslist[39] = "zirconium"; + elementslist[40] = "niobium"; + elementslist[41] = "molybdenum"; + elementslist[42] = "technetium"; + elementslist[43] = "ruthenium"; + elementslist[44] = "rhodium"; + elementslist[45] = "palladium"; + elementslist[46] = "silver"; + elementslist[47] = "cadmium"; + elementslist[48] = "indium"; + elementslist[49] = "tin"; + elementslist[50] = "antimony"; + elementslist[51] = "tellurium"; + elementslist[52] = "iodine"; + elementslist[53] = "xenon"; + elementslist[54] = "caesium"; + elementslist[55] = "barium"; + elementslist[56] = "lanthanum"; + elementslist[57] = "cerium"; + elementslist[58] = "praseodymium"; + elementslist[59] = "neodymium"; + elementslist[60] = "promethium"; + elementslist[61] = "samarium"; + elementslist[62] = "europium"; + elementslist[63] = "gadolinium"; + elementslist[64] = "terbium"; + elementslist[65] = "dysprosium"; + elementslist[66] = "holmium"; + elementslist[67] = "erbium"; + elementslist[68] = "thulium"; + elementslist[69] = "ytterbium"; + elementslist[70] = "lutetium"; + elementslist[71] = "hafnium"; + elementslist[72] = "tantalum"; + elementslist[73] = "tungsten"; + elementslist[74] = "rhenium"; + elementslist[75] = "osmium"; + elementslist[76] = "iridium"; + elementslist[77] = "platinum"; + elementslist[78] = "gold"; + elementslist[79] = "mercury"; + elementslist[80] = "thallium"; + elementslist[81] = "lead"; + elementslist[82] = "bismuth"; + elementslist[83] = "polonium"; + elementslist[84] = "astatine"; + elementslist[85] = "radon"; + elementslist[86] = "francium"; + elementslist[87] = "radium"; + elementslist[88] = "actinium"; + elementslist[89] = "thorium"; + elementslist[90] = "protactinium"; + elementslist[91] = "uranium"; + elementslist[92] = "neptunium"; + elementslist[93] = "plutonium"; + elementslist[94] = "americium"; + elementslist[95] = "curium"; + elementslist[96] = "berkelium"; + elementslist[97] = "californium"; + elementslist[98] = "einsteinium"; + elementslist[99] = "fermium"; + elementslist[100] = "mendelevium"; + elementslist[101] = "nobelium"; + elementslist[102] = "lawrencium"; + elementslist[103] = "rutherfordium"; + elementslist[104] = "dubnium"; + elementslist[105] = "seaborgium"; + elementslist[106] = "bohrium"; + elementslist[107] = "hassium"; + elementslist[108] = "meitnerium"; + elementslist[109] = "darmstadtium"; + elementslist[110] = "roentgenium"; + elementslist[111] = "copernicium"; + elementslist[112] = "ununtrium"; + elementslist[113] = "flerovium"; + elementslist[114] = "ununpentium"; + elementslist[115] = "livermorium"; + elementslist[116] = "ununseptium"; + elementslist[117] = "ununoctium"; + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/KnowledgeInput.resx b/source/WindowsFormsApplication1/Apps/KnowledgeInput.resx new file mode 100644 index 0000000..7310dd5 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/KnowledgeInput.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + - Select a category on the left to begin playing. + - Every 10 correct guesses levels you up on that category. + - Each level, the amount of codepoints you earn for levelling up +increases by 10. + - Words you have already guessed do not count. + + + 17, 17 + + + 109, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Labyrinth.Designer.cs b/source/WindowsFormsApplication1/Apps/Labyrinth.Designer.cs new file mode 100644 index 0000000..8efe097 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Labyrinth.Designer.cs @@ -0,0 +1,38 @@ +namespace ShiftOS +{ + partial class Labyrinth + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Text = "Labyrinth"; + } + + #endregion + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Labyrinth.cs b/source/WindowsFormsApplication1/Apps/Labyrinth.cs new file mode 100644 index 0000000..ade5495 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Labyrinth.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Labyrinth : Form + { + public Labyrinth() + { + InitializeComponent(); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/NameChanger.Designer.cs b/source/WindowsFormsApplication1/Apps/NameChanger.Designer.cs new file mode 100644 index 0000000..c9380a8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NameChanger.Designer.cs @@ -0,0 +1,165 @@ +namespace ShiftOS +{ + partial class NameChanger + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); + this.pnlactions = new System.Windows.Forms.FlowLayoutPanel(); + this.btnapply = new System.Windows.Forms.Button(); + this.btnload = new System.Windows.Forms.Button(); + this.btnsave = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlactions.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // propertyGrid1 + // + this.propertyGrid1.BackColor = System.Drawing.Color.White; + this.propertyGrid1.CategoryForeColor = System.Drawing.Color.Black; + this.propertyGrid1.CategorySplitterColor = System.Drawing.Color.Gray; + this.propertyGrid1.CommandsActiveLinkColor = System.Drawing.Color.Black; + this.propertyGrid1.CommandsBackColor = System.Drawing.Color.White; + this.propertyGrid1.CommandsBorderColor = System.Drawing.Color.White; + this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.Gray; + this.propertyGrid1.CommandsForeColor = System.Drawing.Color.Black; + this.propertyGrid1.CommandsLinkColor = System.Drawing.Color.Gray; + this.propertyGrid1.DisabledItemForeColor = System.Drawing.Color.Gray; + this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill; + this.propertyGrid1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.propertyGrid1.HelpVisible = false; + this.propertyGrid1.LineColor = System.Drawing.Color.White; + this.propertyGrid1.Location = new System.Drawing.Point(0, 28); + this.propertyGrid1.Name = "propertyGrid1"; + this.propertyGrid1.PropertySort = System.Windows.Forms.PropertySort.Alphabetical; + this.propertyGrid1.SelectedItemWithFocusBackColor = System.Drawing.Color.Gray; + this.propertyGrid1.SelectedItemWithFocusForeColor = System.Drawing.Color.White; + this.propertyGrid1.Size = new System.Drawing.Size(403, 400); + this.propertyGrid1.TabIndex = 0; + this.propertyGrid1.ToolbarVisible = false; + this.propertyGrid1.ViewBackColor = System.Drawing.Color.White; + this.propertyGrid1.ViewBorderColor = System.Drawing.Color.White; + this.propertyGrid1.ViewForeColor = System.Drawing.Color.Black; + // + // pnlactions + // + this.pnlactions.BackColor = System.Drawing.Color.Gray; + this.pnlactions.Controls.Add(this.btnapply); + this.pnlactions.Controls.Add(this.btnload); + this.pnlactions.Controls.Add(this.btnsave); + this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlactions.Location = new System.Drawing.Point(0, 428); + this.pnlactions.Name = "pnlactions"; + this.pnlactions.Size = new System.Drawing.Size(403, 39); + this.pnlactions.TabIndex = 1; + // + // btnapply + // + this.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapply.ForeColor = System.Drawing.Color.White; + this.btnapply.Location = new System.Drawing.Point(3, 3); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(75, 33); + this.btnapply.TabIndex = 0; + this.btnapply.Text = "Apply"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); + // + // btnload + // + this.btnload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnload.ForeColor = System.Drawing.Color.White; + this.btnload.Location = new System.Drawing.Point(84, 3); + this.btnload.Name = "btnload"; + this.btnload.Size = new System.Drawing.Size(75, 33); + this.btnload.TabIndex = 1; + this.btnload.Text = "Load Pack"; + this.btnload.UseVisualStyleBackColor = true; + this.btnload.Click += new System.EventHandler(this.btnload_Click); + // + // btnsave + // + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.ForeColor = System.Drawing.Color.White; + this.btnsave.Location = new System.Drawing.Point(165, 3); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(75, 33); + this.btnsave.TabIndex = 2; + this.btnsave.Text = "Save Pack"; + this.btnsave.UseVisualStyleBackColor = true; + this.btnsave.Click += new System.EventHandler(this.btnsave_Click); + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(403, 28); + this.label1.TabIndex = 2; + this.label1.Text = "Name Changer"; + this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.propertyGrid1); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.pnlactions); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(403, 467); + this.panel1.TabIndex = 3; + // + // NameChanger + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(403, 467); + this.Controls.Add(this.panel1); + this.Name = "NameChanger"; + this.Text = "NameChanger"; + this.Load += new System.EventHandler(this.NameChanger_Load); + this.pnlactions.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.FlowLayoutPanel pnlactions; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnapply; + private System.Windows.Forms.Button btnload; + private System.Windows.Forms.Button btnsave; + private System.Windows.Forms.Panel panel1; + public System.Windows.Forms.PropertyGrid propertyGrid1; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NameChanger.cs b/source/WindowsFormsApplication1/Apps/NameChanger.cs new file mode 100644 index 0000000..0dcac90 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NameChanger.cs @@ -0,0 +1,107 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + + public partial class NameChanger : Form + { + public NameChanger() + { + InitializeComponent(); + } + + public NamePackModel np = new NamePackModel(); + + public void LoadModel() + { + var n = Skinning.Utilities.LoadedNames; + np.ArtpadName = n.ArtpadName; + np.TextpadName = n.TextpadName; + np.PongName = n.PongName; + np.TerminalName = n.TerminalName; + np.ShutdownName = n.ShutdownName; + np.ShifterName = n.ShifterName; + np.NameChangerName = n.NameChangerName; + np.ShiftoriumName = n.ShiftoriumName; + np.UnityName = n.UnityName; + np.KnowledgeInputName = n.KnowledgeInputName; + np.SkinLoaderName = n.SkinLoaderName; + np.FileSkimmerName = n.FileSkimmerName; + } + + public void SaveModel() + { + var json = JsonConvert.SerializeObject(np); + File.WriteAllText(Paths.LoadedSkin + "names.npk", json); + } + + private void NameChanger_Load(object sender, EventArgs e) + { + LoadModel(); + propertyGrid1.SelectedObject = np; + } + + private void btnapply_Click(object sender, EventArgs e) + { + int cp = new Random().Next(1, 5); + SaveModel(); + API.CreateInfoboxSession("Name Changer", "The new Name Pack has been applied! You have earned " + cp.ToString() + " Codepoints!", infobox.InfoboxMode.Info); + Skinning.Utilities.saveskin(); + API.CurrentSession.SetupDesktop(); + API.AddCodepoints(cp); + } + + private void btnload_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".npk", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + string json = File.ReadAllText(res); + np = JsonConvert.DeserializeObject(json); + } + }; + } + + private void btnsave_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".npk", File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + string json = JsonConvert.SerializeObject(np); + File.WriteAllText(res, json); + } + }; + } + } + public class NamePackModel + { + public string TerminalName { get; set; } + public string ArtpadName { get; set; } + public string TextpadName { get; set; } + public string ShiftoriumName { get; set; } + public string KnowledgeInputName { get; set; } + public string PongName { get; set; } + public string ShifterName { get; set; } + public string FileSkimmerName { get; set; } + public string SkinLoaderName { get; set; } + public string ShutdownName { get; set; } + public string UnityName { get; set; } + public string NameChangerName { get; set; } + } +} diff --git a/source/WindowsFormsApplication1/Apps/NameChanger.resx b/source/WindowsFormsApplication1/Apps/NameChanger.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NameChanger.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NetGen.Designer.cs b/source/WindowsFormsApplication1/Apps/NetGen.Designer.cs new file mode 100644 index 0000000..b596cdb --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetGen.Designer.cs @@ -0,0 +1,628 @@ +namespace ShiftOS +{ + partial class NetGen + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetGen)); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlnetdesign = new System.Windows.Forms.Panel(); + this.pnlpcinfo = new System.Windows.Forms.Panel(); + this.btndelete = new System.Windows.Forms.Button(); + this.lbpcinfo = new System.Windows.Forms.Label(); + this.lbmoduletitle = new System.Windows.Forms.Label(); + this.btncloseinfo = new System.Windows.Forms.Button(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.btnaddmodule = new System.Windows.Forms.Button(); + this.pnlbuy = new System.Windows.Forms.Panel(); + this.txthostname = new System.Windows.Forms.TextBox(); + this.lbhostname = new System.Windows.Forms.Label(); + this.txtgrade = new System.Windows.Forms.TextBox(); + this.lbgrade = new System.Windows.Forms.Label(); + this.lbmoduleinfo = new System.Windows.Forms.Label(); + this.cmbbuyable = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.btndonebuying = new System.Windows.Forms.Button(); + this.pnlnetinf = new System.Windows.Forms.Panel(); + this.label6 = new System.Windows.Forms.Label(); + this.cbdifficulty = new System.Windows.Forms.ComboBox(); + this.txtfspeed = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtfskill = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtnetdesc = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.txtnetname = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.flbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnnext = new System.Windows.Forms.Button(); + this.btnback = new System.Windows.Forms.Button(); + this.pnlnetinfo = new System.Windows.Forms.Panel(); + this.lbdescription = new System.Windows.Forms.Label(); + this.lbtitle = new System.Windows.Forms.Label(); + this.btnloadfromtemplate = new System.Windows.Forms.Button(); + this.pnltemplates = new System.Windows.Forms.Panel(); + this.label9 = new System.Windows.Forms.Label(); + this.cbnets = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); + this.btnrecreate = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.pnlnetdesign.SuspendLayout(); + this.pnlpcinfo.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.pnlbuy.SuspendLayout(); + this.pnlnetinf.SuspendLayout(); + this.flbuttons.SuspendLayout(); + this.pnlnetinfo.SuspendLayout(); + this.pnltemplates.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.pnltemplates); + this.panel1.Controls.Add(this.pnlnetdesign); + this.panel1.Controls.Add(this.pnlnetinf); + this.panel1.Controls.Add(this.flbuttons); + this.panel1.Controls.Add(this.pnlnetinfo); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(894, 591); + this.panel1.TabIndex = 0; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); + // + // pnlnetdesign + // + this.pnlnetdesign.Controls.Add(this.pnlpcinfo); + this.pnlnetdesign.Controls.Add(this.flowLayoutPanel1); + this.pnlnetdesign.Controls.Add(this.pnlbuy); + this.pnlnetdesign.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlnetdesign.Location = new System.Drawing.Point(0, 76); + this.pnlnetdesign.Name = "pnlnetdesign"; + this.pnlnetdesign.Size = new System.Drawing.Size(894, 484); + this.pnlnetdesign.TabIndex = 6; + this.pnlnetdesign.MouseDown += new System.Windows.Forms.MouseEventHandler(this.place_module); + // + // pnlpcinfo + // + this.pnlpcinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlpcinfo.Controls.Add(this.btndelete); + this.pnlpcinfo.Controls.Add(this.lbpcinfo); + this.pnlpcinfo.Controls.Add(this.lbmoduletitle); + this.pnlpcinfo.Controls.Add(this.btncloseinfo); + this.pnlpcinfo.Location = new System.Drawing.Point(43, 167); + this.pnlpcinfo.Name = "pnlpcinfo"; + this.pnlpcinfo.Size = new System.Drawing.Size(382, 280); + this.pnlpcinfo.TabIndex = 9; + this.pnlpcinfo.Visible = false; + // + // btndelete + // + this.btndelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndelete.AutoSize = true; + this.btndelete.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndelete.Location = new System.Drawing.Point(106, 254); + this.btndelete.Name = "btndelete"; + this.btndelete.Size = new System.Drawing.Size(59, 23); + this.btndelete.TabIndex = 8; + this.btndelete.Text = "Delete"; + this.btndelete.UseVisualStyleBackColor = true; + this.btndelete.Click += new System.EventHandler(this.btndelete_Click); + // + // lbpcinfo + // + this.lbpcinfo.Location = new System.Drawing.Point(12, 41); + this.lbpcinfo.Name = "lbpcinfo"; + this.lbpcinfo.Size = new System.Drawing.Size(367, 86); + this.lbpcinfo.TabIndex = 6; + this.lbpcinfo.Text = resources.GetString("lbpcinfo.Text"); + // + // lbmoduletitle + // + this.lbmoduletitle.AutoSize = true; + this.lbmoduletitle.Location = new System.Drawing.Point(10, 12); + this.lbmoduletitle.Name = "lbmoduletitle"; + this.lbmoduletitle.Size = new System.Drawing.Size(75, 11); + this.lbmoduletitle.TabIndex = 2; + this.lbmoduletitle.Text = "Add Module"; + // + // btncloseinfo + // + this.btncloseinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btncloseinfo.AutoSize = true; + this.btncloseinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btncloseinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncloseinfo.Location = new System.Drawing.Point(327, 254); + this.btncloseinfo.Name = "btncloseinfo"; + this.btncloseinfo.Size = new System.Drawing.Size(52, 23); + this.btncloseinfo.TabIndex = 1; + this.btncloseinfo.Text = "Done."; + this.btncloseinfo.UseVisualStyleBackColor = true; + this.btncloseinfo.Click += new System.EventHandler(this.btncloseinfo_Click); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.btnaddmodule); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 453); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(894, 31); + this.flowLayoutPanel1.TabIndex = 8; + // + // btnaddmodule + // + this.btnaddmodule.AutoSize = true; + this.btnaddmodule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnaddmodule.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnaddmodule.Location = new System.Drawing.Point(3, 3); + this.btnaddmodule.Name = "btnaddmodule"; + this.btnaddmodule.Size = new System.Drawing.Size(87, 23); + this.btnaddmodule.TabIndex = 0; + this.btnaddmodule.Text = "Add Module"; + this.btnaddmodule.UseVisualStyleBackColor = true; + this.btnaddmodule.Click += new System.EventHandler(this.btnaddmodule_Click); + // + // pnlbuy + // + this.pnlbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnlbuy.Controls.Add(this.txthostname); + this.pnlbuy.Controls.Add(this.lbhostname); + this.pnlbuy.Controls.Add(this.txtgrade); + this.pnlbuy.Controls.Add(this.lbgrade); + this.pnlbuy.Controls.Add(this.lbmoduleinfo); + this.pnlbuy.Controls.Add(this.cmbbuyable); + this.pnlbuy.Controls.Add(this.label4); + this.pnlbuy.Controls.Add(this.btndonebuying); + this.pnlbuy.Location = new System.Drawing.Point(3, 148); + this.pnlbuy.Name = "pnlbuy"; + this.pnlbuy.Size = new System.Drawing.Size(382, 299); + this.pnlbuy.TabIndex = 7; + this.pnlbuy.Visible = false; + // + // txthostname + // + this.txthostname.BackColor = System.Drawing.Color.Black; + this.txthostname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txthostname.ForeColor = System.Drawing.Color.White; + this.txthostname.Location = new System.Drawing.Point(186, 236); + this.txthostname.Name = "txthostname"; + this.txthostname.Size = new System.Drawing.Size(186, 18); + this.txthostname.TabIndex = 10; + // + // lbhostname + // + this.lbhostname.AutoSize = true; + this.lbhostname.Location = new System.Drawing.Point(112, 240); + this.lbhostname.Name = "lbhostname"; + this.lbhostname.Size = new System.Drawing.Size(68, 11); + this.lbhostname.TabIndex = 9; + this.lbhostname.Text = "Hostname:"; + // + // txtgrade + // + this.txtgrade.BackColor = System.Drawing.Color.Black; + this.txtgrade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgrade.ForeColor = System.Drawing.Color.White; + this.txtgrade.Location = new System.Drawing.Point(65, 236); + this.txtgrade.Name = "txtgrade"; + this.txtgrade.Size = new System.Drawing.Size(40, 18); + this.txtgrade.TabIndex = 8; + this.txtgrade.TextChanged += new System.EventHandler(this.txtgrade_TextChanged); + // + // lbgrade + // + this.lbgrade.AutoSize = true; + this.lbgrade.Location = new System.Drawing.Point(12, 240); + this.lbgrade.Name = "lbgrade"; + this.lbgrade.Size = new System.Drawing.Size(47, 11); + this.lbgrade.TabIndex = 7; + this.lbgrade.Text = "Grade:"; + // + // lbmoduleinfo + // + this.lbmoduleinfo.Location = new System.Drawing.Point(10, 63); + this.lbmoduleinfo.Name = "lbmoduleinfo"; + this.lbmoduleinfo.Size = new System.Drawing.Size(367, 156); + this.lbmoduleinfo.TabIndex = 6; + this.lbmoduleinfo.Text = resources.GetString("lbmoduleinfo.Text"); + // + // cmbbuyable + // + this.cmbbuyable.BackColor = System.Drawing.Color.Black; + this.cmbbuyable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbbuyable.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cmbbuyable.ForeColor = System.Drawing.Color.White; + this.cmbbuyable.FormattingEnabled = true; + this.cmbbuyable.Location = new System.Drawing.Point(12, 38); + this.cmbbuyable.Name = "cmbbuyable"; + this.cmbbuyable.Size = new System.Drawing.Size(360, 19); + this.cmbbuyable.TabIndex = 3; + this.cmbbuyable.SelectedIndexChanged += new System.EventHandler(this.cmbbuyable_SelectedIndexChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(10, 12); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(75, 11); + this.label4.TabIndex = 2; + this.label4.Text = "Add Module"; + // + // btndonebuying + // + this.btndonebuying.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndonebuying.AutoSize = true; + this.btndonebuying.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndonebuying.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndonebuying.Location = new System.Drawing.Point(341, 273); + this.btndonebuying.Name = "btndonebuying"; + this.btndonebuying.Size = new System.Drawing.Size(38, 23); + this.btndonebuying.TabIndex = 1; + this.btndonebuying.Text = "Buy"; + this.btndonebuying.UseVisualStyleBackColor = true; + this.btndonebuying.Click += new System.EventHandler(this.btndonebuying_Click); + // + // pnlnetinf + // + this.pnlnetinf.Controls.Add(this.label6); + this.pnlnetinf.Controls.Add(this.cbdifficulty); + this.pnlnetinf.Controls.Add(this.txtfspeed); + this.pnlnetinf.Controls.Add(this.label5); + this.pnlnetinf.Controls.Add(this.txtfskill); + this.pnlnetinf.Controls.Add(this.label3); + this.pnlnetinf.Controls.Add(this.txtnetdesc); + this.pnlnetinf.Controls.Add(this.label2); + this.pnlnetinf.Controls.Add(this.txtnetname); + this.pnlnetinf.Controls.Add(this.label1); + this.pnlnetinf.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlnetinf.Location = new System.Drawing.Point(0, 76); + this.pnlnetinf.Name = "pnlnetinf"; + this.pnlnetinf.Size = new System.Drawing.Size(894, 484); + this.pnlnetinf.TabIndex = 0; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(40, 225); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(124, 11); + this.label6.TabIndex = 11; + this.label6.Text = "Difficulty (Tier)"; + // + // cbdifficulty + // + this.cbdifficulty.BackColor = System.Drawing.Color.Black; + this.cbdifficulty.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbdifficulty.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbdifficulty.ForeColor = System.Drawing.Color.Green; + this.cbdifficulty.FormattingEnabled = true; + this.cbdifficulty.Items.AddRange(new object[] { + "easy", + "medium", + "hard"}); + this.cbdifficulty.Location = new System.Drawing.Point(170, 222); + this.cbdifficulty.Name = "cbdifficulty"; + this.cbdifficulty.Size = new System.Drawing.Size(121, 19); + this.cbdifficulty.TabIndex = 10; + // + // txtfspeed + // + this.txtfspeed.BackColor = System.Drawing.Color.Black; + this.txtfspeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtfspeed.ForeColor = System.Drawing.Color.Green; + this.txtfspeed.Location = new System.Drawing.Point(142, 172); + this.txtfspeed.Name = "txtfspeed"; + this.txtfspeed.Size = new System.Drawing.Size(41, 18); + this.txtfspeed.TabIndex = 9; + this.txtfspeed.TextChanged += new System.EventHandler(this.txtfspeed_TextChanged); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(40, 174); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(61, 11); + this.label5.TabIndex = 8; + this.label5.Text = "F. Speed"; + // + // txtfskill + // + this.txtfskill.BackColor = System.Drawing.Color.Black; + this.txtfskill.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtfskill.ForeColor = System.Drawing.Color.Green; + this.txtfskill.Location = new System.Drawing.Point(142, 146); + this.txtfskill.Name = "txtfskill"; + this.txtfskill.Size = new System.Drawing.Size(41, 18); + this.txtfskill.TabIndex = 7; + this.txtfskill.TextChanged += new System.EventHandler(this.txtfskill_TextChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(40, 148); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(61, 11); + this.label3.TabIndex = 6; + this.label3.Text = "F. Skill"; + // + // txtnetdesc + // + this.txtnetdesc.BackColor = System.Drawing.Color.Black; + this.txtnetdesc.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtnetdesc.ForeColor = System.Drawing.Color.Green; + this.txtnetdesc.Location = new System.Drawing.Point(142, 80); + this.txtnetdesc.Name = "txtnetdesc"; + this.txtnetdesc.Size = new System.Drawing.Size(492, 18); + this.txtnetdesc.TabIndex = 5; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(40, 82); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(89, 11); + this.label2.TabIndex = 4; + this.label2.Text = "Description:"; + // + // txtnetname + // + this.txtnetname.BackColor = System.Drawing.Color.Black; + this.txtnetname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtnetname.ForeColor = System.Drawing.Color.Green; + this.txtnetname.Location = new System.Drawing.Point(142, 56); + this.txtnetname.Name = "txtnetname"; + this.txtnetname.Size = new System.Drawing.Size(231, 18); + this.txtnetname.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(40, 58); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(96, 11); + this.label1.TabIndex = 2; + this.label1.Text = "Network Name:"; + // + // flbuttons + // + this.flbuttons.Controls.Add(this.btnnext); + this.flbuttons.Controls.Add(this.btnback); + this.flbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.flbuttons.Location = new System.Drawing.Point(0, 560); + this.flbuttons.Name = "flbuttons"; + this.flbuttons.Size = new System.Drawing.Size(894, 31); + this.flbuttons.TabIndex = 0; + // + // btnnext + // + this.btnnext.AutoSize = true; + this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnnext.Location = new System.Drawing.Point(846, 3); + this.btnnext.Name = "btnnext"; + this.btnnext.Size = new System.Drawing.Size(45, 23); + this.btnnext.TabIndex = 0; + this.btnnext.Text = "Next"; + this.btnnext.UseVisualStyleBackColor = true; + this.btnnext.Click += new System.EventHandler(this.btnnext_Click); + // + // btnback + // + this.btnback.AutoSize = true; + this.btnback.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnback.Location = new System.Drawing.Point(795, 3); + this.btnback.Name = "btnback"; + this.btnback.Size = new System.Drawing.Size(45, 23); + this.btnback.TabIndex = 1; + this.btnback.Text = "Back"; + this.btnback.UseVisualStyleBackColor = true; + this.btnback.Click += new System.EventHandler(this.btnback_Click); + // + // pnlnetinfo + // + this.pnlnetinfo.Controls.Add(this.btnloadfromtemplate); + this.pnlnetinfo.Controls.Add(this.lbdescription); + this.pnlnetinfo.Controls.Add(this.lbtitle); + this.pnlnetinfo.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlnetinfo.Location = new System.Drawing.Point(0, 0); + this.pnlnetinfo.Name = "pnlnetinfo"; + this.pnlnetinfo.Size = new System.Drawing.Size(894, 76); + this.pnlnetinfo.TabIndex = 1; + // + // lbdescription + // + this.lbdescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbdescription.Location = new System.Drawing.Point(15, 31); + this.lbdescription.Name = "lbdescription"; + this.lbdescription.Size = new System.Drawing.Size(867, 36); + this.lbdescription.TabIndex = 1; + this.lbdescription.Text = "Information about the network."; + // + // lbtitle + // + this.lbtitle.AutoSize = true; + this.lbtitle.Font = new System.Drawing.Font("Lucida Console", 13F); + this.lbtitle.Location = new System.Drawing.Point(12, 9); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Size = new System.Drawing.Size(217, 18); + this.lbtitle.TabIndex = 0; + this.lbtitle.Text = "Network Information"; + // + // btnloadfromtemplate + // + this.btnloadfromtemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnloadfromtemplate.AutoSize = true; + this.btnloadfromtemplate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnloadfromtemplate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnloadfromtemplate.Location = new System.Drawing.Point(683, 47); + this.btnloadfromtemplate.Name = "btnloadfromtemplate"; + this.btnloadfromtemplate.Size = new System.Drawing.Size(199, 23); + this.btnloadfromtemplate.TabIndex = 2; + this.btnloadfromtemplate.Text = "This button breaks things."; + this.btnloadfromtemplate.UseVisualStyleBackColor = true; + this.btnloadfromtemplate.Visible = false; + this.btnloadfromtemplate.Click += new System.EventHandler(this.btnloadfromtemplate_Click); + // + // pnltemplates + // + this.pnltemplates.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnltemplates.Controls.Add(this.label9); + this.pnltemplates.Controls.Add(this.cbnets); + this.pnltemplates.Controls.Add(this.label10); + this.pnltemplates.Controls.Add(this.btnrecreate); + this.pnltemplates.Location = new System.Drawing.Point(256, 146); + this.pnltemplates.Name = "pnltemplates"; + this.pnltemplates.Size = new System.Drawing.Size(382, 299); + this.pnltemplates.TabIndex = 8; + this.pnltemplates.Visible = false; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(10, 63); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(367, 156); + this.label9.TabIndex = 6; + this.label9.Text = "Please choose a network from the above list. Net Generator will attempt to grab d" + + "ata about the network and recreate it for you."; + // + // cbnets + // + this.cbnets.BackColor = System.Drawing.Color.Black; + this.cbnets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbnets.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbnets.ForeColor = System.Drawing.Color.White; + this.cbnets.FormattingEnabled = true; + this.cbnets.Location = new System.Drawing.Point(12, 38); + this.cbnets.Name = "cbnets"; + this.cbnets.Size = new System.Drawing.Size(360, 19); + this.cbnets.TabIndex = 3; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(10, 12); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(124, 11); + this.label10.TabIndex = 2; + this.label10.Text = "Load from Network"; + // + // btnrecreate + // + this.btnrecreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnrecreate.AutoSize = true; + this.btnrecreate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnrecreate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnrecreate.Location = new System.Drawing.Point(334, 273); + this.btnrecreate.Name = "btnrecreate"; + this.btnrecreate.Size = new System.Drawing.Size(45, 23); + this.btnrecreate.TabIndex = 1; + this.btnrecreate.Text = "Done"; + this.btnrecreate.UseVisualStyleBackColor = true; + this.btnrecreate.Click += new System.EventHandler(this.btnrecreate_Click); + // + // NetGen + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(894, 591); + this.Controls.Add(this.panel1); + this.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.ForeColor = System.Drawing.Color.LightGreen; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "NetGen"; + this.Text = "NetGen"; + this.Load += new System.EventHandler(this.NetGen_Load); + this.panel1.ResumeLayout(false); + this.pnlnetdesign.ResumeLayout(false); + this.pnlpcinfo.ResumeLayout(false); + this.pnlpcinfo.PerformLayout(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.pnlbuy.ResumeLayout(false); + this.pnlbuy.PerformLayout(); + this.pnlnetinf.ResumeLayout(false); + this.pnlnetinf.PerformLayout(); + this.flbuttons.ResumeLayout(false); + this.flbuttons.PerformLayout(); + this.pnlnetinfo.ResumeLayout(false); + this.pnlnetinfo.PerformLayout(); + this.pnltemplates.ResumeLayout(false); + this.pnltemplates.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.FlowLayoutPanel flbuttons; + private System.Windows.Forms.TextBox txtnetname; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel pnlnetinfo; + private System.Windows.Forms.Label lbdescription; + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.TextBox txtnetdesc; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btnnext; + private System.Windows.Forms.Button btnback; + private System.Windows.Forms.Panel pnlnetdesign; + private System.Windows.Forms.Panel pnlnetinf; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button btnaddmodule; + private System.Windows.Forms.Panel pnlbuy; + private System.Windows.Forms.TextBox txthostname; + private System.Windows.Forms.Label lbhostname; + private System.Windows.Forms.TextBox txtgrade; + private System.Windows.Forms.Label lbgrade; + private System.Windows.Forms.Label lbmoduleinfo; + private System.Windows.Forms.ComboBox cmbbuyable; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button btndonebuying; + private System.Windows.Forms.Panel pnlpcinfo; + private System.Windows.Forms.Button btndelete; + private System.Windows.Forms.Label lbpcinfo; + private System.Windows.Forms.Label lbmoduletitle; + private System.Windows.Forms.Button btncloseinfo; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox cbdifficulty; + private System.Windows.Forms.TextBox txtfspeed; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox txtfskill; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btnloadfromtemplate; + private System.Windows.Forms.Panel pnltemplates; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.ComboBox cbnets; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Button btnrecreate; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NetGen.cs b/source/WindowsFormsApplication1/Apps/NetGen.cs new file mode 100644 index 0000000..616505d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetGen.cs @@ -0,0 +1,361 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class NetGen : Form + { + public NetGen() + { + InitializeComponent(); + } + + private EnemyHacker network = null; + private int stage = 0; + private List potentialModules = null; + private Module fmod = null; + + private void NetGen_Load(object sender, EventArgs e) + { + SetupUI(); + potentialModules = new List(); + } + + private void panel1_Paint(object sender, PaintEventArgs e) + { + + } + + public void SetupUI() + { + btnback.Hide(); + + switch(stage) + { + case 0: + lbtitle.Text = "Network Information"; + lbdescription.Text = "Information about the network."; + pnlnetinf.BringToFront(); + break; + case 1: + //clear potential + if(potentialModules != null) + { + foreach(var p in potentialModules) + { + pnlnetdesign.Controls.Remove(p); + p.Hide(); + + } + potentialModules = new List(); + } + //create net + if (overwrite_net == true) + { + network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, this.skill, this.speed, cbdifficulty.Text); + } + else + { + network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, this.skill, this.speed, cbdifficulty.Text); + network.Network = TemplateNet; + } + network.Network[0].HP = network.Network[0].GetTotalHP(); + var c = network.Network[0].Deploy(); + c.Left = (pnlnetdesign.Width - 64) / 2; + c.Top = (pnlnetdesign.Height - 64) / 2; + pnlnetdesign.Controls.Add(c); + c.Select += (s, a) => + { + ShowSysInf(c); + }; + c.Show(); + lbtitle.Text = "Playfield Designer"; + lbdescription.Text = "Design the playfield of the network. Strategically place defensive and offensive modules to protect the Core from attacks. You can have a maximum of 20 objects (minus core) on-screen."; + pnlnetdesign.BringToFront(); + btnnext.Text = "Finish"; + break; + case 2: + var tp = new TextPad(); + var core = network.Network[0]; + core.X = 0; + core.Y = 0; + foreach (var pc in potentialModules) + { + var m = new Module(pc.Type, pc.Grade, pc.Hostname); + m.X = pc.Left; + m.Y = pc.Top; + network.AddModule(m); + } + var json = JsonConvert.SerializeObject(network); + API.CreateForm(tp, "Network JSON", API.GetIcon("TextPad")); + tp.txtuserinput.Text = json; + this.Close(); + break; + } + + } + + private void btnnext_Click(object sender, EventArgs e) + { + stage += 1; + SetupUI(); + } + + private void btnback_Click(object sender, EventArgs e) + { + stage -= 1; + } + + private void btnaddmodule_Click(object sender, EventArgs e) + { + SetupBuyable(); + pnlbuy.Visible = !pnlbuy.Visible; + } + + List BuyableModules = null; + + public void SetupBuyable() + { + BuyableModules = Hacking.GetFutureModules(); + cmbbuyable.Items.Clear(); + foreach (var m in BuyableModules) + { + cmbbuyable.Items.Add(m.Name); + } + lbmoduleinfo.Text = ""; + txtgrade.Text = "1"; + } + + private void SetupModuleInfo() + { + bool cont = false; + FutureModule m = null; + foreach (var mod in BuyableModules) + { + if (mod.Name == cmbbuyable.Text) + { + m = mod; + cont = true; + } + } + if (cont == true) + { + lbmoduleinfo.Text = m.Name; + lbmoduleinfo.Text += Environment.NewLine + $"Cost: {m.Cost * Convert.ToInt32(txtgrade.Text)} CP"; + lbmoduleinfo.Text += Environment.NewLine + $"Description: {Environment.NewLine}{m.Description}"; + } + } + + private void cmbbuyable_SelectedIndexChanged(object sender, EventArgs e) + { + SetupModuleInfo(); + } + + private void txtgrade_TextChanged(object sender, EventArgs e) + { + int grade = 0; + int.TryParse(txtgrade.Text, out grade); + if(grade < 1) + { + txtgrade.Text = "1"; + } + else if(grade > 4) + { + txtgrade.Text = "4"; + } + } + + bool PlacingNewModule = false; + + private void btndonebuying_Click(object sender, EventArgs e) + { + if(!string.IsNullOrEmpty(cmbbuyable.Text)) + { + if(!string.IsNullOrEmpty(cmbbuyable.Text)) + { + int grade = Convert.ToInt32(txtgrade.Text); + string hostname = txthostname.Text; + FutureModule m = null; + foreach(var mod in BuyableModules) + { + if(mod.Name == cmbbuyable.Text) + { + m = mod; + } + } + if(m != null) + { + bool cont = true; + if (potentialModules.Count <= 20) + { + foreach (var pc in potentialModules) + { + if (pc.Hostname == hostname) + { + cont = false; + } + } + } + else + { + cont = false; + } + if(cont) + { + var newModule = new Module(m.Type, grade, hostname); + fmod = newModule; + PlacingNewModule = true; + pnlbuy.Hide(); + } + else + { + API.CreateInfoboxSession("Can't place new module", "Either an existing module with the same hostname already exists in the field, or you have hit the maximum.", infobox.InfoboxMode.Info); + } + } + } + } + } + + private void place_module(object sender, MouseEventArgs e) + { + if (PlacingNewModule == true) + { + if (e.Button == MouseButtons.Left) + { + var coordinates = pnlnetdesign.PointToClient(Cursor.Position); + int x = coordinates.X; + int y = coordinates.Y; + fmod.HP = fmod.GetTotalHP(); + var computerToPlace = fmod.Deploy(); + computerToPlace.Location = new Point(x, y); + pnlnetdesign.Controls.Add(computerToPlace); + potentialModules.Add(computerToPlace); + computerToPlace.Select += (s, a) => + { + ShowSysInf(computerToPlace); + }; + computerToPlace.Show(); + } + else + { + PlacingNewModule = false; + } + } + } + + private Computer SelectedSystem = null; + + public void ShowSysInf(Computer pc) + { + pnlpcinfo.Left = pnlbuy.Left; + var nl = Environment.NewLine; + SelectedSystem = pc; + pnlpcinfo.Show(); + lbpcinfo.Text = $"Hostname: {SelectedSystem.Hostname}"; + lbpcinfo.Text += $"{nl}Max HP: {SelectedSystem.HP}"; + lbpcinfo.Text += $"{nl}Grade: {SelectedSystem.Grade}"; + lbpcinfo.Text += $"{nl}Type: {SelectedSystem.Type}"; + } + + private void btndelete_Click(object sender, EventArgs e) + { + if(SelectedSystem != null) + { + potentialModules.Remove(SelectedSystem); + pnlnetdesign.Controls.Remove(SelectedSystem); + SelectedSystem.Dispose(); + } + SelectedSystem = null; + pnlpcinfo.Hide(); + } + + private void btncloseinfo_Click(object sender, EventArgs e) + { + SelectedSystem = null; + pnlpcinfo.Hide(); + } + + int skill = 0; + int speed = 0; + + private void txtfskill_TextChanged(object sender, EventArgs e) + { + try + { + skill = Convert.ToInt32(txtfskill.Text); + } + catch + { + txtfskill.Text = skill.ToString(); + } + } + + private void txtfspeed_TextChanged(object sender, EventArgs e) + { + try + { + speed = Convert.ToInt32(txtfspeed.Text); + } + catch + { + txtfspeed.Text = speed.ToString(); + } + } + + Dictionary Templates = null; + + public void SetupTemplates() + { + Templates = JsonConvert.DeserializeObject>(Properties.Resources.NetBrowser_Enemies); + cbnets.Items.Clear(); + foreach(var t in Templates) + { + cbnets.Items.Add(t.Key); + } + } + + private void btnloadfromtemplate_Click(object sender, EventArgs e) + { + SetupTemplates(); + pnltemplates.BringToFront(); + pnltemplates.Visible = !pnltemplates.Visible; + } + + bool overwrite_net = true; + List TemplateNet = null; + + public void SetupTemplate(EnemyHacker t) + { + txtnetname.Text = t.Name; + txtnetdesc.Text = t.Description; + txtfskill.Text = t.FriendSkill.ToString(); + txtfspeed.Text = t.FriendSpeed.ToString(); + cbdifficulty.SelectedItem = t.Difficulty; + stage = 0; + overwrite_net = false; + TemplateNet = t.Network; + SetupUI(); + } + + private void btnrecreate_Click(object sender, EventArgs e) + { + try + { + SetupTemplate(Templates[cbnets.Text]); + pnltemplates.Hide(); + } + catch + { + + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/NetGen.resx b/source/WindowsFormsApplication1/Apps/NetGen.resx new file mode 100644 index 0000000..c6bdcd8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetGen.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. + +Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. + +To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. + +If you would like to buy a new module, click 'Buy new module'. + + + When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. + +Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. + +To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. + +If you would like to buy a new module, click 'Buy new module'. + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NetworkBrowser.Designer.cs b/source/WindowsFormsApplication1/Apps/NetworkBrowser.Designer.cs new file mode 100644 index 0000000..cf9468d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetworkBrowser.Designer.cs @@ -0,0 +1,290 @@ +namespace ShiftOS +{ + partial class NetworkBrowser + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); + this.btnscreen = new System.Windows.Forms.Button(); + this.pnlmynet = new System.Windows.Forms.Panel(); + this.flmodules = new System.Windows.Forms.FlowLayoutPanel(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.btntier = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnstartbattle = new System.Windows.Forms.Button(); + this.lbnets = new System.Windows.Forms.ListBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lbnetdesc = new System.Windows.Forms.Label(); + this.lbtitle = new System.Windows.Forms.Label(); + this.pgtotalhealth = new ShiftOS.ProgressBarEX(); + this.tmrcalctotal = new System.Windows.Forms.Timer(this.components); + this.panel1.SuspendLayout(); + this.pnlmynet.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.btnscreen); + this.panel1.Controls.Add(this.pnlmynet); + this.panel1.Controls.Add(this.btntier); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.btnstartbattle); + this.panel1.Controls.Add(this.lbnets); + this.panel1.Controls.Add(this.panel2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(725, 495); + this.panel1.TabIndex = 0; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(282, 470); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(44, 13); + this.label3.TabIndex = 8; + this.label3.Text = "Screen:"; + // + // btnscreen + // + this.btnscreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnscreen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnscreen.Location = new System.Drawing.Point(332, 465); + this.btnscreen.Name = "btnscreen"; + this.btnscreen.Size = new System.Drawing.Size(84, 23); + this.btnscreen.TabIndex = 7; + this.btnscreen.Text = "Network List"; + this.btnscreen.UseVisualStyleBackColor = true; + this.btnscreen.Click += new System.EventHandler(this.btnscreen_Click); + // + // pnlmynet + // + this.pnlmynet.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlmynet.Controls.Add(this.pgtotalhealth); + this.pnlmynet.Controls.Add(this.flmodules); + this.pnlmynet.Controls.Add(this.label5); + this.pnlmynet.Controls.Add(this.label4); + this.pnlmynet.Location = new System.Drawing.Point(12, 12); + this.pnlmynet.Name = "pnlmynet"; + this.pnlmynet.Size = new System.Drawing.Size(404, 447); + this.pnlmynet.TabIndex = 6; + // + // flmodules + // + this.flmodules.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flmodules.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flmodules.Location = new System.Drawing.Point(7, 140); + this.flmodules.Name = "flmodules"; + this.flmodules.Size = new System.Drawing.Size(394, 298); + this.flmodules.TabIndex = 3; + this.flmodules.WrapContents = false; + // + // label5 + // + this.label5.Location = new System.Drawing.Point(4, 37); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(397, 58); + this.label5.TabIndex = 2; + this.label5.Text = "Below you can see your network\'s total health, as well as a list of any damaged m" + + "odules\' health. If \'localhost\' is on the list and it\'s health is 0, you cannot p" + + "articipate in any battles."; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.label4.Location = new System.Drawing.Point(3, 5); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(91, 20); + this.label4.TabIndex = 1; + this.label4.Text = "My Network"; + // + // btntier + // + this.btntier.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btntier.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntier.Location = new System.Drawing.Point(47, 465); + this.btntier.Name = "btntier"; + this.btntier.Size = new System.Drawing.Size(75, 23); + this.btntier.TabIndex = 5; + this.btntier.Text = "1"; + this.btntier.UseVisualStyleBackColor = true; + this.btntier.Click += new System.EventHandler(this.btntier_Click); + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(13, 470); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(28, 13); + this.label2.TabIndex = 4; + this.label2.Text = "Tier:"; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Location = new System.Drawing.Point(419, 354); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(294, 71); + this.label1.TabIndex = 3; + this.label1.Text = "When you\'re ready, click \'Start Battle\' to begin the hacker battle."; + // + // btnstartbattle + // + this.btnstartbattle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnstartbattle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstartbattle.Location = new System.Drawing.Point(638, 465); + this.btnstartbattle.Name = "btnstartbattle"; + this.btnstartbattle.Size = new System.Drawing.Size(75, 23); + this.btnstartbattle.TabIndex = 2; + this.btnstartbattle.Text = "Start Battle"; + this.btnstartbattle.UseVisualStyleBackColor = true; + this.btnstartbattle.Click += new System.EventHandler(this.btnstartbattle_Click); + // + // lbnets + // + this.lbnets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbnets.BackColor = System.Drawing.Color.Black; + this.lbnets.ForeColor = System.Drawing.Color.White; + this.lbnets.FormattingEnabled = true; + this.lbnets.Location = new System.Drawing.Point(13, 17); + this.lbnets.Name = "lbnets"; + this.lbnets.Size = new System.Drawing.Size(403, 433); + this.lbnets.TabIndex = 1; + this.lbnets.SelectedIndexChanged += new System.EventHandler(this.lbnets_SelectedIndexChanged); + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel2.Controls.Add(this.lbnetdesc); + this.panel2.Controls.Add(this.lbtitle); + this.panel2.Location = new System.Drawing.Point(422, 13); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(291, 326); + this.panel2.TabIndex = 0; + // + // lbnetdesc + // + this.lbnetdesc.Location = new System.Drawing.Point(5, 36); + this.lbnetdesc.Name = "lbnetdesc"; + this.lbnetdesc.Size = new System.Drawing.Size(283, 290); + this.lbnetdesc.TabIndex = 1; + this.lbnetdesc.Text = "No network selected."; + // + // lbtitle + // + this.lbtitle.AutoSize = true; + this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbtitle.Location = new System.Drawing.Point(4, 4); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Size = new System.Drawing.Size(129, 20); + this.lbtitle.TabIndex = 0; + this.lbtitle.Text = "Network Browser"; + // + // pgtotalhealth + // + this.pgtotalhealth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pgtotalhealth.BackColor = System.Drawing.Color.Black; + this.pgtotalhealth.BlockSeparation = 3; + this.pgtotalhealth.BlockWidth = 5; + this.pgtotalhealth.Color = System.Drawing.Color.Gray; + this.pgtotalhealth.Location = new System.Drawing.Point(7, 98); + this.pgtotalhealth.MaxValue = 100; + this.pgtotalhealth.MinValue = 0; + this.pgtotalhealth.Name = "pgtotalhealth"; + this.pgtotalhealth.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal; + this.pgtotalhealth.ShowValue = true; + this.pgtotalhealth.Size = new System.Drawing.Size(394, 32); + this.pgtotalhealth.Step = 10; + this.pgtotalhealth.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Continuous; + this.pgtotalhealth.TabIndex = 4; + this.pgtotalhealth.Value = 0; + // + // tmrcalctotal + // + this.tmrcalctotal.Enabled = true; + this.tmrcalctotal.Tick += new System.EventHandler(this.tmrcalctotal_Tick); + // + // NetworkBrowser + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(725, 495); + this.Controls.Add(this.panel1); + this.ForeColor = System.Drawing.Color.Black; + this.Name = "NetworkBrowser"; + this.Text = "NetworkBrowser"; + this.Load += new System.EventHandler(this.NetworkBrowser_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.pnlmynet.ResumeLayout(false); + this.pnlmynet.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnstartbattle; + private System.Windows.Forms.ListBox lbnets; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label lbnetdesc; + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.Button btntier; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btnscreen; + private System.Windows.Forms.Panel pnlmynet; + private System.Windows.Forms.FlowLayoutPanel flmodules; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private ProgressBarEX pgtotalhealth; + private System.Windows.Forms.Timer tmrcalctotal; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs b/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs new file mode 100644 index 0000000..127140f --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs @@ -0,0 +1,301 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class NetworkBrowser : Form + { + public NetworkBrowser() + { + InitializeComponent(); + } + + public Dictionary Networks = null; + + private void NetworkBrowser_Load(object sender, EventArgs e) + { + LoadNetworks(); + SetupSidePane(); + pnlmynet.Hide(); + } + + public string CurrentTier = "easy"; + public EnemyHacker SelectedNet = null; + + public void LoadNetworks() + { + switch(CurrentTier) + { + case "easy": + btntier.Text = "1"; + break; + case "medium": + btntier.Text = "2"; + break; + case "hard": + btntier.Text = "3"; + break; + } + Networks = JsonConvert.DeserializeObject>(Properties.Resources.NetBrowser_Enemies); + lbnets.Items.Clear(); + var Tier1 = new List(); + var Tier2 = new List(); + var Tier3 = new List(); + + foreach (var net in Networks) + { + if (!API.CurrentSave.CompletedNets.Contains(net.Key)) + { + switch (net.Value.Difficulty) + { + case "easy": + Tier1.Add(net.Key); + break; + case "medium": + Tier2.Add(net.Key); + break; + case "hard": + Tier3.Add(net.Key); + break; + } + } + } + + switch (CurrentTier) + { + case "easy": + SetupUI(Tier1); + break; + case "medium": + SetupUI(Tier2); + break; + case "hard": + SetupUI(Tier3); + break; + } + } + + public void SetupSidePane() + { + if(SelectedNet != null) + { + lbtitle.Text = SelectedNet.Name; + lbnetdesc.Text = SelectedNet.Description + @" + +Leader hack speed: " + SelectedNet.FriendSpeed.ToString() + @" +Leader hack skill: " + SelectedNet.FriendSkill.ToString() + @" + +Those above values only matter if the leader decides to become a friend. If they do, you can hire them for free to hack into certain ShiftOS applications."; + btnstartbattle.Enabled = true; + } + else + { + lbtitle.Text = "Network Browser"; + lbnetdesc.Text = "No network selected."; + btnstartbattle.Enabled = false; + } + } + + public void SetupUI(List tier) + { + if (tier.Count > 0) + { + foreach (var t in tier) + { + lbnets.Items.Add(t); + } + } + else + { + AddLeader(CurrentTier); + } + } + + public void AddLeader(string tier) + { + if (API.Upgrades["nb_tier_" + tier] == false) + { + var enemy = JsonConvert.DeserializeObject(Get_Leader_JSON(tier)); + Networks.Add(enemy.Name, enemy); + lbnets.Items.Add(enemy.Name); + } + } + + public string Get_Leader_JSON(string tier) + { + switch(tier) + { + case "easy": + return Properties.Resources.Hacker_DanaRoss; + case "medium": + return Properties.Resources.Hacker_AustinWalker; + case "hard": + return Properties.Resources.Hacker_JonathanRivard; + default: + return null; + + } + } + + private void btntier_Click(object sender, EventArgs e) + { + switch(btntier.Text) + { + case "1": + if(API.Upgrades["nb_tier_easy"] == true) + { + CurrentTier = "medium"; + } + break; + case "2": + if (API.Upgrades["nb_tier_medium"] == true) + { + CurrentTier = "hard"; + } + else + { + CurrentTier = "easy"; + } + break; + case "3": + CurrentTier = "easy"; + break; + } + LoadNetworks(); + } + + private void lbnets_SelectedIndexChanged(object sender, EventArgs e) + { + var t = lbnets.SelectedItem as string; + foreach(var net in Networks) + { + if(net.Key == t) + { + SelectedNet = net.Value; + } + } + SetupSidePane(); + } + + private void btnstartbattle_Click(object sender, EventArgs e) + { + if (Hacking.MyCore.HP == 0) + { + SetupMyNet(); + pnlmynet.Show(); + btnscreen.Text = "My Network"; + API.CreateInfoboxSession("Your Core isn't ready.", "Your Core (hostname \"localhost\") has 0 HP, and cannot fight. Please wait until your Core regenerates.", infobox.InfoboxMode.Info); + } + else + { + string tier_upgrade = null; + if (SelectedNet.IsLeader == true) + { + tier_upgrade = "nb_tier_" + CurrentTier; + } + var hui = new HackUI(SelectedNet); + hui.OnWin += (object s, EventArgs a) => + { + if (tier_upgrade != null) + { + API.Upgrades[tier_upgrade] = true; + if(CurrentTier == "easy") + { + if(API.Upgrades["midgamebridge"] == false) + { + var term = new Terminal(); + API.CreateForm(term, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); + term.StartDanaRossStory(); + } + } + else if(CurrentTier == "medium") + { + var h = new HoloChat(); + var fakeroom = new FakeChatClient(); + fakeroom.Name = "The Hacker Alliance"; + fakeroom.Topic = "The Hacker Alliance - We are the masters. DevX cannot control us."; + fakeroom.OtherCharacters = new List(new [] {"Richard Ladouceur"}); + fakeroom.Messages = JsonConvert.DeserializeObject>(Properties.Resources.AustinWalkerCompletionStory); + API.CreateForm(h, "QuickChat", API.GetIcon("QuickChat")); + var t = new Thread(new ThreadStart(new Action(() => + { + Thread.Sleep(200); + h.Invoke(new Action(() => + { + h.SetupFakeClient(fakeroom); + })); + }))); + + } + foreach(var mod in SelectedNet.Network) + { + if (mod.Type != SystemType.Core) + { + mod.HP = 0; + Hacking.MyNetwork.Add(mod); + } + } + SetupMyNet(); + } + API.CurrentSave.CompletedNets.Add(SelectedNet.Name); + SelectedNet = null; + LoadNetworks(); + SetupSidePane(); + }; + hui.Show(); + } + } + + public void SetupMyNet() + { + flmodules.Controls.Clear(); + foreach(var m in Hacking.MyNetwork) + { + var mStatus = new NetModuleStatus(m); + flmodules.Controls.Add(mStatus); + mStatus.Show(); + } + } + + private void btnscreen_Click(object sender, EventArgs e) + { + switch (btnscreen.Text) + { + case "My Network": + LoadNetworks(); + SetupSidePane(); + pnlmynet.Hide(); + btnscreen.Text = "Network List"; + break; + case "Network List": + SetupMyNet(); + pnlmynet.Show(); + btnscreen.Text = "My Network"; + break; + } + + } + + private void tmrcalctotal_Tick(object sender, EventArgs e) + { + int total = 0; + int hp = 0; + foreach(var mod in Hacking.MyNetwork) + { + total += mod.GetTotalHP(); + hp += mod.HP; + } + pgtotalhealth.MaxValue = total; + pgtotalhealth.Value = hp; + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/NetworkBrowser.resx b/source/WindowsFormsApplication1/Apps/NetworkBrowser.resx new file mode 100644 index 0000000..fa83c0a --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetworkBrowser.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/PanelManager.Designer.cs b/source/WindowsFormsApplication1/Apps/PanelManager.Designer.cs new file mode 100644 index 0000000..2ae44a8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/PanelManager.Designer.cs @@ -0,0 +1,132 @@ +namespace ShiftOS +{ + partial class PanelManager + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pnlmain = new System.Windows.Forms.Panel(); + this.btndone = new System.Windows.Forms.Button(); + this.pnlbgcolor = new System.Windows.Forms.Panel(); + this.Label40 = new System.Windows.Forms.Label(); + this.Label36 = new System.Windows.Forms.Label(); + this.txtheight = new System.Windows.Forms.TextBox(); + this.pnlmain.SuspendLayout(); + this.SuspendLayout(); + // + // pnlmain + // + this.pnlmain.BackColor = System.Drawing.Color.White; + this.pnlmain.Controls.Add(this.txtheight); + this.pnlmain.Controls.Add(this.Label36); + this.pnlmain.Controls.Add(this.pnlbgcolor); + this.pnlmain.Controls.Add(this.Label40); + this.pnlmain.Controls.Add(this.btndone); + this.pnlmain.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlmain.ForeColor = System.Drawing.Color.Black; + this.pnlmain.Location = new System.Drawing.Point(0, 0); + this.pnlmain.Name = "pnlmain"; + this.pnlmain.Size = new System.Drawing.Size(360, 378); + this.pnlmain.TabIndex = 0; + // + // btndone + // + this.btndone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndone.Location = new System.Drawing.Point(273, 343); + this.btndone.Name = "btndone"; + this.btndone.Size = new System.Drawing.Size(75, 23); + this.btndone.TabIndex = 0; + this.btndone.Text = "Done"; + this.btndone.UseVisualStyleBackColor = true; + this.btndone.Click += new System.EventHandler(this.btndone_Click); + // + // pnlbgcolor + // + this.pnlbgcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbgcolor.Location = new System.Drawing.Point(307, 101); + this.pnlbgcolor.Name = "pnlbgcolor"; + this.pnlbgcolor.Size = new System.Drawing.Size(41, 20); + this.pnlbgcolor.TabIndex = 22; + this.pnlbgcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.setbgcolor); + // + // Label40 + // + this.Label40.AutoSize = true; + this.Label40.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label40.Location = new System.Drawing.Point(12, 101); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(259, 16); + this.Label40.TabIndex = 23; + this.Label40.Text = "Background Color (right-click to set image)"; + // + // Label36 + // + this.Label36.AutoSize = true; + this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label36.Location = new System.Drawing.Point(12, 136); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(50, 16); + this.Label36.TabIndex = 24; + this.Label36.Text = "Height:"; + // + // txtheight + // + this.txtheight.BackColor = System.Drawing.Color.White; + this.txtheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtheight.ForeColor = System.Drawing.Color.Black; + this.txtheight.Location = new System.Drawing.Point(325, 134); + this.txtheight.Name = "txtheight"; + this.txtheight.Size = new System.Drawing.Size(23, 22); + this.txtheight.TabIndex = 25; + this.txtheight.TextChanged += new System.EventHandler(this.txtheight_TextChanged); + // + // PanelManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(360, 378); + this.Controls.Add(this.pnlmain); + this.Name = "PanelManager"; + this.Text = "PanelManager"; + this.Load += new System.EventHandler(this.PanelManager_Load); + this.pnlmain.ResumeLayout(false); + this.pnlmain.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlmain; + private System.Windows.Forms.Button btndone; + private System.Windows.Forms.Panel pnlbgcolor; + private System.Windows.Forms.Label Label40; + private System.Windows.Forms.Label Label36; + private System.Windows.Forms.TextBox txtheight; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/PanelManager.cs b/source/WindowsFormsApplication1/Apps/PanelManager.cs new file mode 100644 index 0000000..d347fb5 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/PanelManager.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class PanelManager : Form + { + public PanelManager(Skinning.DesktopPanel newPanel) + { + pnl = newPanel; + InitializeComponent(); + } + + private Skinning.DesktopPanel pnl = null; + + private void setbgcolor(object sender, MouseEventArgs e) + { + if(e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Background", pnl.BackgroundColor); + API.ColorPickerSession.FormClosing += (s, a) => + { + var c = API.GetLastColorFromSession(); + pnl.BackgroundColor = c; + pnl.BackgroundImage = null; + pnl.ImagePath = null; + }; + } + else if(e.Button == MouseButtons.Right) + { + API.CreateGraphicPickerSession("Panel Background", false); + API.GraphicPickerSession.FormClosing += (s, a) => + { + var img = API.GraphicPickerSession.IdleImage; + pnl.BackgroundImage = img; + }; + } + } + + private void txtheight_TextChanged(object sender, EventArgs e) + { + try + { + int height = Convert.ToInt32(txtheight.Text); + pnl.Height = height; + } + catch + { + txtheight.Text = pnl.Height.ToString(); + } + } + + private void btndone_Click(object sender, EventArgs e) + { + API.CurrentSession.SetupDesktopPanel(); + Skinning.Utilities.saveskin(); + this.Close(); + } + + private void PanelManager_Load(object sender, EventArgs e) + { + pnlbgcolor.BackColor = pnl.BackgroundColor; + pnlbgcolor.BackgroundImage = pnl.BackgroundImage; + txtheight.Text = pnl.Height.ToString(); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/PanelManager.resx b/source/WindowsFormsApplication1/Apps/PanelManager.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/PanelManager.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Pong.Designer.cs b/source/WindowsFormsApplication1/Apps/Pong.Designer.cs new file mode 100644 index 0000000..d7d7bdb --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Pong.Designer.cs @@ -0,0 +1,588 @@ +using System; +using System.Windows.Forms; + +namespace ShiftOS +{ + partial class Pong + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Pong)); + this.pgcontents = new System.Windows.Forms.Panel(); + this.pnlgamestats = new System.Windows.Forms.Panel(); + this.lblnextstats = new System.Windows.Forms.Label(); + this.Label7 = new System.Windows.Forms.Label(); + this.lblpreviousstats = new System.Windows.Forms.Label(); + this.Label4 = new System.Windows.Forms.Label(); + this.btnplayon = new System.Windows.Forms.Button(); + this.Label3 = new System.Windows.Forms.Label(); + this.btncashout = new System.Windows.Forms.Button(); + this.Label2 = new System.Windows.Forms.Label(); + this.lbllevelreached = new System.Windows.Forms.Label(); + this.pnllose = new System.Windows.Forms.Panel(); + this.lblmissedout = new System.Windows.Forms.Label(); + this.btnlosetryagain = new System.Windows.Forms.Button(); + this.Label5 = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.pnlintro = new System.Windows.Forms.Panel(); + this.Label6 = new System.Windows.Forms.Label(); + this.btnstartgame = new System.Windows.Forms.Button(); + this.Label8 = new System.Windows.Forms.Label(); + this.pnlfinalstats = new System.Windows.Forms.Panel(); + this.btnplayagain = new System.Windows.Forms.Button(); + this.lblfinalcodepoints = new System.Windows.Forms.Label(); + this.Label11 = new System.Windows.Forms.Label(); + this.lblfinalcomputerreward = new System.Windows.Forms.Label(); + this.Label9 = new System.Windows.Forms.Label(); + this.lblfinallevelreward = new System.Windows.Forms.Label(); + this.lblfinallevelreached = new System.Windows.Forms.Label(); + this.lblfinalcodepointswithtext = new System.Windows.Forms.Label(); + this.lblbeatai = new System.Windows.Forms.Label(); + this.lblcountdown = new System.Windows.Forms.Label(); + this.ball = new System.Windows.Forms.Panel(); + this.paddleHuman = new System.Windows.Forms.PictureBox(); + this.paddleComputer = new System.Windows.Forms.Panel(); + this.lbllevelandtime = new System.Windows.Forms.Label(); + this.lblstatscodepoints = new System.Windows.Forms.Label(); + this.lblstatsY = new System.Windows.Forms.Label(); + this.lblstatsX = new System.Windows.Forms.Label(); + this.gameTimer = new System.Windows.Forms.Timer(this.components); + this.counter = new System.Windows.Forms.Timer(this.components); + this.tmrcountdown = new System.Windows.Forms.Timer(this.components); + this.tmrstoryline = new System.Windows.Forms.Timer(this.components); + this.pgcontents.SuspendLayout(); + this.pnlgamestats.SuspendLayout(); + this.pnllose.SuspendLayout(); + this.pnlintro.SuspendLayout(); + this.pnlfinalstats.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnlgamestats); + this.pgcontents.Controls.Add(this.pnllose); + this.pgcontents.Controls.Add(this.pnlintro); + this.pgcontents.Controls.Add(this.pnlfinalstats); + this.pgcontents.Controls.Add(this.lblbeatai); + this.pgcontents.Controls.Add(this.lblcountdown); + this.pgcontents.Controls.Add(this.ball); + this.pgcontents.Controls.Add(this.paddleHuman); + this.pgcontents.Controls.Add(this.paddleComputer); + this.pgcontents.Controls.Add(this.lbllevelandtime); + this.pgcontents.Controls.Add(this.lblstatscodepoints); + this.pgcontents.Controls.Add(this.lblstatsY); + this.pgcontents.Controls.Add(this.lblstatsX); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(700, 400); + this.pgcontents.TabIndex = 20; + this.pgcontents.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); + // + // pnlgamestats + // + this.pnlgamestats.Controls.Add(this.lblnextstats); + this.pnlgamestats.Controls.Add(this.Label7); + this.pnlgamestats.Controls.Add(this.lblpreviousstats); + this.pnlgamestats.Controls.Add(this.Label4); + this.pnlgamestats.Controls.Add(this.btnplayon); + this.pnlgamestats.Controls.Add(this.Label3); + this.pnlgamestats.Controls.Add(this.btncashout); + this.pnlgamestats.Controls.Add(this.Label2); + this.pnlgamestats.Controls.Add(this.lbllevelreached); + this.pnlgamestats.Location = new System.Drawing.Point(56, 76); + this.pnlgamestats.Name = "pnlgamestats"; + this.pnlgamestats.Size = new System.Drawing.Size(466, 206); + this.pnlgamestats.TabIndex = 6; + this.pnlgamestats.Visible = false; + // + // lblnextstats + // + this.lblnextstats.AutoSize = true; + this.lblnextstats.Location = new System.Drawing.Point(278, 136); + this.lblnextstats.Name = "lblnextstats"; + this.lblnextstats.Size = new System.Drawing.Size(0, 13); + this.lblnextstats.TabIndex = 8; + // + // Label7 + // + this.Label7.AutoSize = true; + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(278, 119); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(124, 16); + this.Label7.TabIndex = 7; + this.Label7.Text = "Next Level Stats:"; + // + // lblpreviousstats + // + this.lblpreviousstats.AutoSize = true; + this.lblpreviousstats.Location = new System.Drawing.Point(278, 54); + this.lblpreviousstats.Name = "lblpreviousstats"; + this.lblpreviousstats.Size = new System.Drawing.Size(0, 13); + this.lblpreviousstats.TabIndex = 6; + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(278, 37); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(154, 16); + this.Label4.TabIndex = 5; + this.Label4.Text = "Previous Level Stats:"; + // + // btnplayon + // + this.btnplayon.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnplayon.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnplayon.Location = new System.Drawing.Point(32, 162); + this.btnplayon.Name = "btnplayon"; + this.btnplayon.Size = new System.Drawing.Size(191, 35); + this.btnplayon.TabIndex = 4; + this.btnplayon.Text = "Play on for 3 codepoints!"; + this.btnplayon.UseVisualStyleBackColor = true; + this.btnplayon.Click += new System.EventHandler(this.btnplayon_Click); + // + // Label3 + // + this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(8, 126); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(245, 33); + this.Label3.TabIndex = 3; + this.Label3.Text = "Or do you want to try your luck on the next level to increase your reward?"; + this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btncashout + // + this.btncashout.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncashout.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btncashout.Location = new System.Drawing.Point(32, 73); + this.btncashout.Name = "btncashout"; + this.btncashout.Size = new System.Drawing.Size(191, 35); + this.btncashout.TabIndex = 2; + this.btncashout.Text = "Cash out with 1 codepoint!"; + this.btncashout.UseVisualStyleBackColor = true; + this.btncashout.Click += new System.EventHandler(this.btncashout_Click); + // + // Label2 + // + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(8, 37); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(245, 33); + this.Label2.TabIndex = 1; + this.Label2.Text = "Would you like the end the game now and cash out with your reward?"; + this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbllevelreached + // + this.lbllevelreached.AutoSize = true; + this.lbllevelreached.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbllevelreached.Location = new System.Drawing.Point(149, 6); + this.lbllevelreached.Name = "lbllevelreached"; + this.lbllevelreached.Size = new System.Drawing.Size(185, 20); + this.lbllevelreached.TabIndex = 0; + this.lbllevelreached.Text = "You Reached Level 2!"; + // + // pnllose + // + this.pnllose.Controls.Add(this.lblmissedout); + this.pnllose.Controls.Add(this.btnlosetryagain); + this.pnllose.Controls.Add(this.Label5); + this.pnllose.Controls.Add(this.Label1); + this.pnllose.Location = new System.Drawing.Point(209, 71); + this.pnllose.Name = "pnllose"; + this.pnllose.Size = new System.Drawing.Size(266, 214); + this.pnllose.TabIndex = 10; + this.pnllose.Visible = false; + // + // lblmissedout + // + this.lblmissedout.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblmissedout.Location = new System.Drawing.Point(3, 175); + this.lblmissedout.Name = "lblmissedout"; + this.lblmissedout.Size = new System.Drawing.Size(146, 35); + this.lblmissedout.TabIndex = 3; + this.lblmissedout.Text = "You Missed Out On: 500 Codepoints"; + this.lblmissedout.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnlosetryagain + // + this.btnlosetryagain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnlosetryagain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnlosetryagain.Location = new System.Drawing.Point(155, 176); + this.btnlosetryagain.Name = "btnlosetryagain"; + this.btnlosetryagain.Size = new System.Drawing.Size(106, 35); + this.btnlosetryagain.TabIndex = 2; + this.btnlosetryagain.Text = "Try Again"; + this.btnlosetryagain.UseVisualStyleBackColor = true; + this.btnlosetryagain.Click += new System.EventHandler(this.btnlosetryagain_Click); + // + // Label5 + // + this.Label5.Location = new System.Drawing.Point(7, 26); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(260, 163); + this.Label5.TabIndex = 1; + // + // Label1 + // + this.Label1.Dock = System.Windows.Forms.DockStyle.Top; + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(0, 0); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(266, 16); + this.Label1.TabIndex = 0; + this.Label1.Text = "You lose!"; + this.Label1.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlintro + // + this.pnlintro.Controls.Add(this.Label6); + this.pnlintro.Controls.Add(this.btnstartgame); + this.pnlintro.Controls.Add(this.Label8); + this.pnlintro.Location = new System.Drawing.Point(52, 29); + this.pnlintro.Name = "pnlintro"; + this.pnlintro.Size = new System.Drawing.Size(595, 303); + this.pnlintro.TabIndex = 13; + // + // Label6 + // + this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(3, 39); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(589, 227); + this.Label6.TabIndex = 15; + this.Label6.Text = resources.GetString("Label6.Text"); + this.Label6.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // btnstartgame + // + this.btnstartgame.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstartgame.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnstartgame.Location = new System.Drawing.Point(186, 273); + this.btnstartgame.Name = "btnstartgame"; + this.btnstartgame.Size = new System.Drawing.Size(242, 28); + this.btnstartgame.TabIndex = 15; + this.btnstartgame.Text = "Click this button to play pong!"; + this.btnstartgame.UseVisualStyleBackColor = true; + this.btnstartgame.Click += new System.EventHandler(this.btnstartgame_Click); + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label8.ForeColor = System.Drawing.Color.Black; + this.Label8.Location = new System.Drawing.Point(179, 5); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(250, 31); + this.Label8.TabIndex = 14; + this.Label8.Text = "Welcome to Pong!"; + // + // pnlfinalstats + // + this.pnlfinalstats.Controls.Add(this.btnplayagain); + this.pnlfinalstats.Controls.Add(this.lblfinalcodepoints); + this.pnlfinalstats.Controls.Add(this.Label11); + this.pnlfinalstats.Controls.Add(this.lblfinalcomputerreward); + this.pnlfinalstats.Controls.Add(this.Label9); + this.pnlfinalstats.Controls.Add(this.lblfinallevelreward); + this.pnlfinalstats.Controls.Add(this.lblfinallevelreached); + this.pnlfinalstats.Controls.Add(this.lblfinalcodepointswithtext); + this.pnlfinalstats.Location = new System.Drawing.Point(172, 74); + this.pnlfinalstats.Name = "pnlfinalstats"; + this.pnlfinalstats.Size = new System.Drawing.Size(362, 226); + this.pnlfinalstats.TabIndex = 9; + this.pnlfinalstats.Visible = false; + // + // btnplayagain + // + this.btnplayagain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnplayagain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnplayagain.Location = new System.Drawing.Point(5, 194); + this.btnplayagain.Name = "btnplayagain"; + this.btnplayagain.Size = new System.Drawing.Size(352, 29); + this.btnplayagain.TabIndex = 16; + this.btnplayagain.Text = "Click this button to play again!"; + this.btnplayagain.UseVisualStyleBackColor = true; + this.btnplayagain.Click += new System.EventHandler(this.btnplayagain_Click); + // + // lblfinalcodepoints + // + this.lblfinalcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinalcodepoints.Location = new System.Drawing.Point(3, 124); + this.lblfinalcodepoints.Name = "lblfinalcodepoints"; + this.lblfinalcodepoints.Size = new System.Drawing.Size(356, 73); + this.lblfinalcodepoints.TabIndex = 15; + this.lblfinalcodepoints.Text = "134 CP"; + this.lblfinalcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label11.Location = new System.Drawing.Point(162, 82); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(33, 33); + this.Label11.TabIndex = 14; + this.Label11.Text = "+"; + this.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblfinalcomputerreward + // + this.lblfinalcomputerreward.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinalcomputerreward.Location = new System.Drawing.Point(193, 72); + this.lblfinalcomputerreward.Name = "lblfinalcomputerreward"; + this.lblfinalcomputerreward.Size = new System.Drawing.Size(151, 52); + this.lblfinalcomputerreward.TabIndex = 12; + this.lblfinalcomputerreward.Text = "34"; + this.lblfinalcomputerreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label9 + // + this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label9.Location = new System.Drawing.Point(179, 31); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(180, 49); + this.Label9.TabIndex = 11; + this.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblfinallevelreward + // + this.lblfinallevelreward.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinallevelreward.Location = new System.Drawing.Point(12, 72); + this.lblfinallevelreward.Name = "lblfinallevelreward"; + this.lblfinallevelreward.Size = new System.Drawing.Size(151, 52); + this.lblfinallevelreward.TabIndex = 10; + this.lblfinallevelreward.Text = "100"; + this.lblfinallevelreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblfinallevelreached + // + this.lblfinallevelreached.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinallevelreached.Location = new System.Drawing.Point(3, 31); + this.lblfinallevelreached.Name = "lblfinallevelreached"; + this.lblfinallevelreached.Size = new System.Drawing.Size(170, 49); + this.lblfinallevelreached.TabIndex = 9; + this.lblfinallevelreached.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblfinalcodepointswithtext + // + this.lblfinalcodepointswithtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinalcodepointswithtext.Location = new System.Drawing.Point(3, 2); + this.lblfinalcodepointswithtext.Name = "lblfinalcodepointswithtext"; + this.lblfinalcodepointswithtext.Size = new System.Drawing.Size(356, 26); + this.lblfinalcodepointswithtext.TabIndex = 1; + this.lblfinalcodepointswithtext.Text = "You cashed out with 134 codepoints!"; + this.lblfinalcodepointswithtext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblbeatai + // + this.lblbeatai.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblbeatai.Location = new System.Drawing.Point(47, 41); + this.lblbeatai.Name = "lblbeatai"; + this.lblbeatai.Size = new System.Drawing.Size(600, 30); + this.lblbeatai.TabIndex = 8; + this.lblbeatai.Text = "You got 2 codepoints for beating the Computer!"; + this.lblbeatai.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblbeatai.Visible = false; + // + // lblcountdown + // + this.lblcountdown.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblcountdown.Location = new System.Drawing.Point(182, 152); + this.lblcountdown.Name = "lblcountdown"; + this.lblcountdown.Size = new System.Drawing.Size(315, 49); + this.lblcountdown.TabIndex = 7; + this.lblcountdown.Text = "3"; + this.lblcountdown.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblcountdown.Visible = false; + // + // ball + // + this.ball.BackColor = System.Drawing.Color.Black; + this.ball.Location = new System.Drawing.Point(300, 152); + this.ball.Name = "ball"; + this.ball.Size = new System.Drawing.Size(20, 20); + this.ball.TabIndex = 2; + // + // paddleHuman + // + this.paddleHuman.BackColor = System.Drawing.Color.Black; + this.paddleHuman.Location = new System.Drawing.Point(10, 134); + this.paddleHuman.Name = "paddleHuman"; + this.paddleHuman.Size = new System.Drawing.Size(20, 100); + this.paddleHuman.TabIndex = 3; + this.paddleHuman.TabStop = false; + // + // paddleComputer + // + this.paddleComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.paddleComputer.BackColor = System.Drawing.Color.Black; + this.paddleComputer.Location = new System.Drawing.Point(666, 134); + this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 100); + this.paddleComputer.Name = "paddleComputer"; + this.paddleComputer.Size = new System.Drawing.Size(20, 100); + this.paddleComputer.TabIndex = 1; + // + // lbllevelandtime + // + this.lbllevelandtime.Dock = System.Windows.Forms.DockStyle.Top; + this.lbllevelandtime.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbllevelandtime.Location = new System.Drawing.Point(0, 0); + this.lbllevelandtime.Name = "lbllevelandtime"; + this.lbllevelandtime.Size = new System.Drawing.Size(700, 22); + this.lbllevelandtime.TabIndex = 4; + this.lbllevelandtime.Text = "Level: 1 - 58 Seconds Left"; + this.lbllevelandtime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblstatscodepoints + // + this.lblstatscodepoints.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblstatscodepoints.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblstatscodepoints.Location = new System.Drawing.Point(239, 356); + this.lblstatscodepoints.Name = "lblstatscodepoints"; + this.lblstatscodepoints.Size = new System.Drawing.Size(219, 35); + this.lblstatscodepoints.TabIndex = 12; + this.lblstatscodepoints.Text = "Codepoints: "; + this.lblstatscodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblstatsY + // + this.lblstatsY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.lblstatsY.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblstatsY.Location = new System.Drawing.Point(542, 356); + this.lblstatsY.Name = "lblstatsY"; + this.lblstatsY.Size = new System.Drawing.Size(144, 35); + this.lblstatsY.TabIndex = 11; + this.lblstatsY.Text = "Yspeed:"; + this.lblstatsY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblstatsX + // + this.lblstatsX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lblstatsX.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblstatsX.Location = new System.Drawing.Point(3, 356); + this.lblstatsX.Name = "lblstatsX"; + this.lblstatsX.Size = new System.Drawing.Size(144, 35); + this.lblstatsX.TabIndex = 5; + this.lblstatsX.Text = "Xspeed: "; + this.lblstatsX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // gameTimer + // + this.gameTimer.Interval = 30; + this.gameTimer.Tick += new System.EventHandler(this.gameTimer_Tick); + // + // counter + // + this.counter.Interval = 1000; + this.counter.Tick += new System.EventHandler(this.counter_Tick); + // + // tmrcountdown + // + this.tmrcountdown.Interval = 1000; + this.tmrcountdown.Tick += new System.EventHandler(this.countdown_Tick); + // + // tmrstoryline + // + this.tmrstoryline.Interval = 1000; + this.tmrstoryline.Tick += new System.EventHandler(this.tmrstoryline_Tick); + // + // Pong + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(700, 400); + this.Controls.Add(this.pgcontents); + this.DoubleBuffered = true; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Pong"; + this.Text = "Pong"; + this.TopMost = true; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.me_closing); + this.Load += new System.EventHandler(this.Pong_Load); + this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); + this.pgcontents.ResumeLayout(false); + this.pnlgamestats.ResumeLayout(false); + this.pnlgamestats.PerformLayout(); + this.pnllose.ResumeLayout(false); + this.pnlintro.ResumeLayout(false); + this.pnlintro.PerformLayout(); + this.pnlfinalstats.ResumeLayout(false); + this.pnlfinalstats.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Panel ball; + internal System.Windows.Forms.Panel paddleComputer; + internal System.Windows.Forms.Timer gameTimer; + internal System.Windows.Forms.PictureBox paddleHuman; + internal System.Windows.Forms.Label lbllevelandtime; + internal System.Windows.Forms.Label lblstatsX; + internal System.Windows.Forms.Timer counter; + internal System.Windows.Forms.Panel pnlgamestats; + internal System.Windows.Forms.Label lblnextstats; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.Label lblpreviousstats; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Button btnplayon; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Button btncashout; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label lbllevelreached; + internal System.Windows.Forms.Label lblcountdown; + internal System.Windows.Forms.Timer tmrcountdown; + internal System.Windows.Forms.Label lblbeatai; + internal System.Windows.Forms.Panel pnlfinalstats; + internal System.Windows.Forms.Button btnplayagain; + internal System.Windows.Forms.Label lblfinalcodepoints; + internal System.Windows.Forms.Label Label11; + internal System.Windows.Forms.Label lblfinalcomputerreward; + internal System.Windows.Forms.Label Label9; + internal System.Windows.Forms.Label lblfinallevelreward; + internal System.Windows.Forms.Label lblfinallevelreached; + internal System.Windows.Forms.Label lblfinalcodepointswithtext; + internal System.Windows.Forms.Panel pnllose; + internal System.Windows.Forms.Label lblmissedout; + internal System.Windows.Forms.Button btnlosetryagain; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Label lblstatscodepoints; + internal System.Windows.Forms.Label lblstatsY; + internal System.Windows.Forms.Panel pnlintro; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.Button btnstartgame; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.Timer tmrstoryline; + + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Pong.cs b/source/WindowsFormsApplication1/Apps/Pong.cs new file mode 100644 index 0000000..c685100 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Pong.cs @@ -0,0 +1,481 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Pong : Form + { + int xVel = 7; + int yVel = 8; + int computerspeed = 8; + int level = 1; + int secondsleft = 60; + int casualposition; + double xveldec = 3.0; + double yveldec = 3.0; + double incrementx = 0.4; + double incrementy = 0.2; + int levelxspeed = 3; + int levelyspeed = 3; + int beatairewardtotal; + int beataireward = 1; + int[] levelrewards = new int[50]; + int totalreward; + int countdown = 3; + + public Pong() + { + InitializeComponent(); + } + + private void Pong_Load(object sender, EventArgs e) + { + setuplevelrewards(); + + if(API.Upgrades["customgrayshades"] == true && API.Upgrades["multitasking"] == true) + { + if(API.Upgrades["shiftnet"] == false) + { + tmrstoryline.Start(); + } + } + } + + // Move the paddle according to the mouse position. + private void pongMain_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) + { + paddleHuman.Location = new Point(paddleHuman.Location.X, (MousePosition.Y - this.Location.Y) - (paddleHuman.Height / 2)); + } + + + // ERROR: Handles clauses are not supported in C# + private void gameTimer_Tick(object sender, EventArgs e) + { + if (this.Left < Screen.PrimaryScreen.Bounds.Width) + { + if (this.Height != API.CurrentSkin.titlebarheight) + { + //Set the computer player to move according to the ball's position. + if (ball.Location.X > 500 - xVel * 10 && xVel > 0) + { + if (ball.Location.Y > paddleComputer.Location.Y + 50) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed); + } + if (ball.Location.Y < paddleComputer.Location.Y + 50) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed); + } + casualposition = rand.Next(-150, 201); + } + else { + //used to be me.location.y + if (paddleComputer.Location.Y > this.Size.Height / 2 - paddleComputer.Height + casualposition) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed); + } + //used to be me.location.y + if (paddleComputer.Location.Y < this.Size.Height / 2 - paddleComputer.Height + casualposition) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed); + } + } + + //Set Xvel and Yvel speeds from decimal + if (xVel > 0) + xVel = (int)Math.Round(xveldec); + if (xVel < 0) + xVel = (int)-Math.Round(xveldec); + if (yVel > 0) + yVel = (int)Math.Round(yveldec); + if (yVel < 0) + yVel = (int)-Math.Round(yveldec); + + // Move the game ball. + ball.Location = new Point(ball.Location.X + xVel, ball.Location.Y + yVel); + + // Check for top wall. + if (ball.Location.Y < 0) + { + ball.Location = new Point(ball.Location.X, 0); + yVel = -yVel; + } + + // Check for bottom wall. + if (ball.Location.Y > pgcontents.Height - ball.Height) + { + ball.Location = new Point(ball.Location.X, pgcontents.Height - ball.Size.Height); + yVel = -yVel; + } + + // Check for player paddle. + if (ball.Bounds.IntersectsWith(paddleHuman.Bounds)) + { + ball.Location = new Point(paddleHuman.Location.X + ball.Size.Width, ball.Location.Y); + //randomly increase x or y speed of ball + switch (rand.Next(1, 3)) + { + case 1: + xveldec = xveldec + incrementx; + break; + case 2: + if (yveldec > 0) + yveldec = yveldec + incrementy; + if (yveldec < 0) + yveldec = yveldec - incrementy; + break; + } + xVel = -xVel; + API.PlaySound(Properties.Resources.typesound); + } + + // Check for computer paddle. + if (ball.Bounds.IntersectsWith(paddleComputer.Bounds)) + { + ball.Location = new Point(paddleComputer.Location.X - paddleComputer.Size.Width + 1, ball.Location.Y); + xveldec = xveldec + incrementx; + xVel = -xVel; + API.PlaySound(Properties.Resources.typesound); + } + + // Check for left wall. + if (ball.Location.X < -100) + { + ball.Location = new Point(this.Size.Width / 2 + 200, this.Size.Height / 2); + paddleComputer.Location = new Point(paddleComputer.Location.X, ball.Location.Y); + if (xVel > 0) + xVel = -xVel; + pnllose.Show(); + gameTimer.Stop(); + counter.Stop(); + lblmissedout.Text = "You Missed Out On:" + Environment.NewLine + lblstatscodepoints.Text.Replace("Codepoints earned: ", "") + " Codepoints"; + } + + // Check for right wall. + if (ball.Location.X > this.Width - ball.Size.Width - paddleComputer.Width + 100) + { + ball.Location = new Point(this.Size.Width / 2 + 200, this.Size.Height / 2); + paddleComputer.Location = new Point(paddleComputer.Location.X, ball.Location.Y); + if (xVel > 0) + xVel = -xVel; + beatairewardtotal = beatairewardtotal + beataireward; + lblbeatai.Show(); + lblbeatai.Text = "You got " + beataireward + " codepoints for beating the Computer!"; + tmrcountdown.Start(); + gameTimer.Stop(); + counter.Stop(); + } + + //lblstats.Text = "Xspeed: " & Math.Abs(xVel) & " Yspeed: " & Math.Abs(yVel) & " Human Location: " & paddleHuman.Location.ToString & " Computer Location: " & paddleComputer.Location.ToString & Environment.NewLine & " Ball Location: " & ball.Location.ToString & " Xdec: " & xveldec & " Ydec: " & yveldec & " Xinc: " & incrementx & " Yinc: " & incrementy + lblstatsX.Text = "Xspeed: " + xveldec; + lblstatsY.Text = "Yspeed: " + yveldec; + lblstatscodepoints.Text = "Codepoints earned: " + (levelrewards[level - 1] + beatairewardtotal).ToString(); + + lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " Seconds Left"; + + if (xVel > 20 || xVel < -20) + { + paddleHuman.Width = Math.Abs(xVel); + paddleComputer.Width = Math.Abs(xVel); + } + else { + paddleHuman.Width = 20; + paddleComputer.Width = 20; + } + + computerspeed = Math.Abs(yVel); + + // pgcontents.Refresh() + // pgcontents.CreateGraphics.FillRectangle(Brushes.Black, ball.Location.X, ball.Location.Y, ball.Width, ball.Height) + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void counter_Tick(object sender, EventArgs e) + { + if (this.Left < Screen.PrimaryScreen.Bounds.Width) + { + if (this.Height != API.CurrentSkin.titlebarheight) + { + secondsleft = secondsleft - 1; + if (secondsleft == -1) + { + secondsleft = 60; + level = level + 1; + generatenextlevel(); + pnlgamestats.Show(); + pnlgamestats.BringToFront(); + pnlgamestats.Location = new Point((pgcontents.Width / 2) - (pnlgamestats.Width / 2), (pgcontents.Height / 2) - (pnlgamestats.Height / 2)); + + counter.Stop(); + gameTimer.Stop(); + } + lblstatscodepoints.Text = "Codepoints earned: " + (levelrewards[level - 1] + beatairewardtotal).ToString(); + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnplayon_Click(object sender, EventArgs e) + { + xveldec = levelxspeed; + yveldec = levelyspeed; + + secondsleft = 60; + + tmrcountdown.Start(); + lblbeatai.Text = "Get " + beataireward + " codepoints for beating the Computer!"; + pnlgamestats.Hide(); + lblbeatai.Show(); + ball.Location = new Point(paddleHuman.Location.X + paddleHuman.Width + 50, paddleHuman.Location.Y + paddleHuman.Height / 2); + if (xVel < 0) + xVel = Math.Abs(xVel); + lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " Seconds Left"; + } + + //Increase the ball speed stats for the next level + private void generatenextlevel() + { + lbllevelreached.Text = "You Reached Level " + level + "!"; + + lblpreviousstats.Text = "Initial Ball X Speed: " + levelxspeed + Environment.NewLine + "Initial Ball Y Speed: " + levelyspeed + Environment.NewLine + "Increment X Speed: " + incrementx + Environment.NewLine + "Increment Y Speed: " + incrementy; + + switch (rand.Next(1, 3)) + { + case 1: + levelxspeed = levelxspeed + 1; + break; + case 2: + levelxspeed = levelxspeed + 2; + break; + } + + switch (rand.Next(1, 3)) + { + case 1: + levelyspeed = levelyspeed + 1; + break; + case 2: + levelyspeed = levelyspeed + 2; + break; + } + + switch (rand.Next(1, 6)) + { + case 1: + incrementx = incrementx + 0.1; + break; + case 2: + incrementx = incrementx + 0.2; + break; + case 3: + incrementy = incrementy + 0.1; + break; + case 4: + incrementy = incrementy + 0.2; + break; + case 5: + incrementy = incrementy + 0.3; + break; + } + + lblnextstats.Text = "Initial Ball X Speed: " + levelxspeed + Environment.NewLine + "Initial Ball Y Speed: " + levelyspeed + Environment.NewLine + "Increment X Speed: " + incrementx + Environment.NewLine + "Increment Y Speed: " + incrementy; + + if (level < 15) + { + beataireward = level * 2; + } + else { + double br = levelrewards[level - 1] / 10; + beataireward = (int)Math.Round(br); + } + + totalreward = levelrewards[level - 1] + beatairewardtotal; + + btncashout.Text = "Cash out with " + totalreward.ToString() + " codepoints!"; + btnplayon.Text = "Play on for " + (levelrewards[level] + beatairewardtotal).ToString() + " codepoints!"; + } + + private void setuplevelrewards() + { + levelrewards[0] = 0; + levelrewards[1] = 1; + levelrewards[2] = 3; + levelrewards[3] = 7; + levelrewards[4] = 13; + levelrewards[5] = 20; + levelrewards[6] = 30; + levelrewards[7] = 45; + levelrewards[8] = 60; + levelrewards[9] = 80; + levelrewards[10] = 100; + levelrewards[11] = 125; + levelrewards[12] = 150; + levelrewards[13] = 200; + levelrewards[14] = 250; + levelrewards[15] = 300; + levelrewards[16] = 400; + levelrewards[17] = 500; + levelrewards[18] = 650; + levelrewards[19] = 800; + levelrewards[20] = 1000; + levelrewards[21] = 1250; + levelrewards[22] = 1600; + levelrewards[23] = 2000; + levelrewards[24] = 2500; + levelrewards[25] = 3000; + levelrewards[26] = 3750; + levelrewards[27] = 4500; + levelrewards[28] = 5500; + levelrewards[29] = 7000; + levelrewards[30] = 9000; + levelrewards[31] = 11000; + levelrewards[32] = 13500; + levelrewards[33] = 16000; + levelrewards[34] = 20000; + levelrewards[35] = 25000; + levelrewards[36] = 32000; + levelrewards[37] = 40000; + levelrewards[38] = 50000; + levelrewards[39] = 75000; + levelrewards[40] = 100000; + } + + // ERROR: Handles clauses are not supported in C# + private void countdown_Tick(object sender, EventArgs e) + { + if (this.Left < Screen.PrimaryScreen.Bounds.Width) + { + if (this.Height != API.CurrentSkin.titlebarheight) + { + switch (countdown) + { + case 0: + countdown = 3; + lblcountdown.Hide(); + lblbeatai.Hide(); + API.PlaySound(Properties.Resources.writesound); + gameTimer.Start(); + counter.Start(); + tmrcountdown.Stop(); + break; + case 1: + lblcountdown.Text = "1"; + countdown = countdown - 1; + API.PlaySound(Properties.Resources.writesound); + break; + case 2: + lblcountdown.Text = "2"; + countdown = countdown - 1; + API.PlaySound(Properties.Resources.writesound); + break; + case 3: + lblcountdown.Text = "3"; + countdown = countdown - 1; + API.PlaySound(Properties.Resources.writesound); + lblcountdown.Show(); + break; + } + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void btncashout_Click(object sender, EventArgs e) + { + pnlgamestats.Hide(); + pnlfinalstats.Show(); + lblfinalcodepointswithtext.Text = "You cashed out with " + totalreward + " codepoints!"; + lblfinallevelreached.Text = "Codepoints rewarded for reaching level " + (level - 1).ToString(); + lblfinallevelreward.Text = levelrewards[level - 1].ToString(); + lblfinalcomputerreward.Text = beatairewardtotal.ToString(); + lblfinalcodepoints.Text = totalreward + " CP"; + API.AddCodepoints(totalreward); + } + + private void newgame() + { + pnlfinalstats.Hide(); + pnllose.Hide(); + pnlintro.Hide(); + + level = 1; + totalreward = 0; + beataireward = 2; + beatairewardtotal = 0; + secondsleft = 60; + lblstatscodepoints.Text = "Codepoints: "; + //reset stats text + lblstatsX.Text = "Xspeed: "; + lblstatsY.Text = "Yspeed: "; + + levelxspeed = 3; + levelyspeed = 3; + + incrementx = 0.4; + incrementy = 0.2; + + xveldec = levelxspeed; + yveldec = levelyspeed; + + tmrcountdown.Start(); + lblbeatai.Text = "Get " + beataireward + " codepoints for beating the Computer!"; + pnlgamestats.Hide(); + lblbeatai.Show(); + ball.Location = new Point(paddleHuman.Location.X + paddleHuman.Width + 50, paddleHuman.Location.Y + paddleHuman.Height / 2); + if (xVel < 0) + xVel = Math.Abs(xVel); + lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " Seconds Left"; + } + + // ERROR: Handles clauses are not supported in C# + private void btnplayagain_Click(object sender, EventArgs e) + { + newgame(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnlosetryagain_Click(object sender, EventArgs e) + { + newgame(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnstartgame_Click(object sender, EventArgs e) + { + newgame(); + } + + Random rand = new Random(); + // ERROR: Handles clauses are not supported in C# + private void tmrstoryline_Tick(object sender, EventArgs e) + { + // Random chance of showing getshiftnet storyline + int i = rand.Next(0, 100); + + if (i >= 25 && i <= 50) + { + Terminal term = new Terminal(); + API.CreateForm(term, "Terminal", Properties.Resources.iconTerminal); + term.StartShiftnetStory(); + tmrstoryline.Stop(); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void me_closing(object sender, FormClosingEventArgs e) + { + tmrstoryline.Stop(); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Pong.resx b/source/WindowsFormsApplication1/Apps/Pong.resx new file mode 100644 index 0000000..cedb787 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Pong.resx @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Pong is a classic arcade game from the late 20th century, ported over to ShiftOS. + +In Pong, two players move a paddle up and down to keep the ball from hitting their edge of the screen. If the ball hits a player's side of the screen, the other player gains a point. + +In ShiftOS, the second player is controlled by the computer. You can earn Codepoints by making him miss the ball. If you miss the ball, it's game over, and you don't gain any Codepoints. + +Each level is 60 seconds long, and the game gets progressively harder. At the end of each level, you can either decide to cash out your Codepoints and start over at Level 1, or you can proceed up a level and gain even more CP. + +Be careful, because missing the ball will reset you back to Level 1 and you will not be able to cash out your Codepoints! + + + 17, 17 + + + 130, 17 + + + 223, 17 + + + 355, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shifter.Designer.cs b/source/WindowsFormsApplication1/Apps/Shifter.Designer.cs new file mode 100644 index 0000000..d49294e --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shifter.Designer.cs @@ -0,0 +1,5620 @@ +using System; +using System.Windows.Forms; + +namespace ShiftOS +{ + partial class Shifter + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Shifter)); + this.ColorDialog1 = new System.Windows.Forms.ColorDialog(); + this.clocktick = new System.Windows.Forms.Timer(this.components); + this.customizationtime = new System.Windows.Forms.Timer(this.components); + this.timerearned = new System.Windows.Forms.Timer(this.components); + this.Label1 = new System.Windows.Forms.Label(); + this.btnapply = new System.Windows.Forms.Button(); + this.catholder = new System.Windows.Forms.Panel(); + this.btnmore = new System.Windows.Forms.Button(); + this.btnreset = new System.Windows.Forms.Button(); + this.btnwindowcomposition = new System.Windows.Forms.Button(); + this.btndesktopicons = new System.Windows.Forms.Button(); + this.btnmenus = new System.Windows.Forms.Button(); + this.btnwindows = new System.Windows.Forms.Button(); + this.btndesktop = new System.Windows.Forms.Button(); + this.pnlshifterintro = new System.Windows.Forms.Panel(); + this.Label66 = new System.Windows.Forms.Label(); + this.Label65 = new System.Windows.Forms.Label(); + this.Label64 = new System.Windows.Forms.Label(); + this.Label63 = new System.Windows.Forms.Label(); + this.pnldesktopoptions = new System.Windows.Forms.Panel(); + this.pnldesktoppaneloptions = new System.Windows.Forms.Panel(); + this.btnpanelbuttons = new System.Windows.Forms.Button(); + this.lbwarning = new System.Windows.Forms.Label(); + this.combodesktoppanelposition = new System.Windows.Forms.ComboBox(); + this.lbposition = new System.Windows.Forms.Label(); + this.Label47 = new System.Windows.Forms.Label(); + this.txtdesktoppanelheight = new System.Windows.Forms.NumericUpDown(); + this.lbheight = new System.Windows.Forms.Label(); + this.pnldesktoppanelcolour = new System.Windows.Forms.Panel(); + this.lbpanelcolor = new System.Windows.Forms.Label(); + this.pnlapplauncheroptions = new System.Windows.Forms.Panel(); + this.pnlalhover = new System.Windows.Forms.Panel(); + this.label119 = new System.Windows.Forms.Label(); + this.Label71 = new System.Windows.Forms.Label(); + this.txtapplauncherwidth = new System.Windows.Forms.TextBox(); + this.Label72 = new System.Windows.Forms.Label(); + this.txtappbuttonlabel = new System.Windows.Forms.TextBox(); + this.Label51 = new System.Windows.Forms.Label(); + this.Label50 = new System.Windows.Forms.Label(); + this.pnlmaintextcolour = new System.Windows.Forms.Panel(); + this.comboappbuttontextstyle = new System.Windows.Forms.ComboBox(); + this.comboappbuttontextfont = new System.Windows.Forms.ComboBox(); + this.Label37 = new System.Windows.Forms.Label(); + this.Label38 = new System.Windows.Forms.Label(); + this.txtappbuttontextsize = new System.Windows.Forms.TextBox(); + this.Label39 = new System.Windows.Forms.Label(); + this.Label40 = new System.Windows.Forms.Label(); + this.pnlmainbuttonactivated = new System.Windows.Forms.Panel(); + this.Label28 = new System.Windows.Forms.Label(); + this.Label35 = new System.Windows.Forms.Label(); + this.txtapplicationsbuttonheight = new System.Windows.Forms.TextBox(); + this.Label36 = new System.Windows.Forms.Label(); + this.pnlmainbuttoncolour = new System.Windows.Forms.Panel(); + this.Label43 = new System.Windows.Forms.Label(); + this.pnldesktopintro = new System.Windows.Forms.Panel(); + this.Label69 = new System.Windows.Forms.Label(); + this.Label70 = new System.Windows.Forms.Label(); + this.pnlpanelbuttonsoptions = new System.Windows.Forms.Panel(); + this.pnlpanelbuttontextcolour = new System.Windows.Forms.Panel(); + this.Label101 = new System.Windows.Forms.Label(); + this.txtpanelbuttontexttop = new System.Windows.Forms.TextBox(); + this.Label104 = new System.Windows.Forms.Label(); + this.txtpanelbuttontextside = new System.Windows.Forms.TextBox(); + this.Label106 = new System.Windows.Forms.Label(); + this.Label93 = new System.Windows.Forms.Label(); + this.txtpanelbuttontop = new System.Windows.Forms.TextBox(); + this.Label94 = new System.Windows.Forms.Label(); + this.txtpanelbuttoninitalgap = new System.Windows.Forms.TextBox(); + this.Label108 = new System.Windows.Forms.Label(); + this.txtpanelbuttonicontop = new System.Windows.Forms.TextBox(); + this.Label110 = new System.Windows.Forms.Label(); + this.txtpanelbuttoniconside = new System.Windows.Forms.TextBox(); + this.Label112 = new System.Windows.Forms.Label(); + this.txtpanelbuttoniconsize = new System.Windows.Forms.TextBox(); + this.Label105 = new System.Windows.Forms.Label(); + this.cbpanelbuttontextstyle = new System.Windows.Forms.ComboBox(); + this.cbpanelbuttonfont = new System.Windows.Forms.ComboBox(); + this.Label100 = new System.Windows.Forms.Label(); + this.txtpaneltextbuttonsize = new System.Windows.Forms.TextBox(); + this.Label102 = new System.Windows.Forms.Label(); + this.Label103 = new System.Windows.Forms.Label(); + this.Label98 = new System.Windows.Forms.Label(); + this.txtpanelbuttongap = new System.Windows.Forms.TextBox(); + this.Label99 = new System.Windows.Forms.Label(); + this.Label96 = new System.Windows.Forms.Label(); + this.txtpanelbuttonheight = new System.Windows.Forms.TextBox(); + this.Label97 = new System.Windows.Forms.Label(); + this.Label92 = new System.Windows.Forms.Label(); + this.txtpanelbuttonwidth = new System.Windows.Forms.TextBox(); + this.Label91 = new System.Windows.Forms.Label(); + this.pnlpanelbuttoncolour = new System.Windows.Forms.Panel(); + this.Label95 = new System.Windows.Forms.Label(); + this.pnldesktopbackgroundoptions = new System.Windows.Forms.Panel(); + this.pnldesktopcolour = new System.Windows.Forms.Panel(); + this.Label45 = new System.Windows.Forms.Label(); + this.pnlpanelclockoptions = new System.Windows.Forms.Panel(); + this.pnlclockbackgroundcolour = new System.Windows.Forms.Panel(); + this.Label44 = new System.Windows.Forms.Label(); + this.comboclocktextstyle = new System.Windows.Forms.ComboBox(); + this.comboclocktextfont = new System.Windows.Forms.ComboBox(); + this.Label26 = new System.Windows.Forms.Label(); + this.Label29 = new System.Windows.Forms.Label(); + this.txtclocktextfromtop = new System.Windows.Forms.TextBox(); + this.Label30 = new System.Windows.Forms.Label(); + this.Label31 = new System.Windows.Forms.Label(); + this.txtclocktextsize = new System.Windows.Forms.TextBox(); + this.Label32 = new System.Windows.Forms.Label(); + this.Label33 = new System.Windows.Forms.Label(); + this.pnlpanelclocktextcolour = new System.Windows.Forms.Panel(); + this.Label34 = new System.Windows.Forms.Label(); + this.pnldesktoppreview = new System.Windows.Forms.Panel(); + this.predesktoppanel = new System.Windows.Forms.Panel(); + this.prepnlpanelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); + this.prepnlpanelbutton = new System.Windows.Forms.Panel(); + this.pretbicon = new System.Windows.Forms.PictureBox(); + this.pretbctext = new System.Windows.Forms.Label(); + this.pretimepanel = new System.Windows.Forms.Panel(); + this.prepaneltimetext = new System.Windows.Forms.Label(); + this.preapplaunchermenuholder = new System.Windows.Forms.Panel(); + this.predesktopappmenu = new System.Windows.Forms.MenuStrip(); + this.ApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.KnowledgeInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShiftoriumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ClockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.ShutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.Panel10 = new System.Windows.Forms.Panel(); + this.btndesktopitself = new System.Windows.Forms.Button(); + this.btnpanelclock = new System.Windows.Forms.Button(); + this.btnapplauncher = new System.Windows.Forms.Button(); + this.btndesktoppanel = new System.Windows.Forms.Button(); + this.txtpanelbuttoniconheight = new System.Windows.Forms.TextBox(); + this.pnlwindowsoptions = new System.Windows.Forms.Panel(); + this.pnlwindowsintro = new System.Windows.Forms.Panel(); + this.Label68 = new System.Windows.Forms.Label(); + this.Label67 = new System.Windows.Forms.Label(); + this.pnlbuttonoptions = new System.Windows.Forms.Panel(); + this.pnlclosebuttonoptions = new System.Windows.Forms.Panel(); + this.Label8 = new System.Windows.Forms.Label(); + this.Label11 = new System.Windows.Forms.Label(); + this.pnlclosebuttoncolour = new System.Windows.Forms.Panel(); + this.txtclosebuttonfromside = new System.Windows.Forms.TextBox(); + this.Label7 = new System.Windows.Forms.Label(); + this.Label12 = new System.Windows.Forms.Label(); + this.txtclosebuttonheight = new System.Windows.Forms.TextBox(); + this.Label13 = new System.Windows.Forms.Label(); + this.Label6 = new System.Windows.Forms.Label(); + this.txtclosebuttonfromtop = new System.Windows.Forms.TextBox(); + this.Label10 = new System.Windows.Forms.Label(); + this.Label14 = new System.Windows.Forms.Label(); + this.txtclosebuttonwidth = new System.Windows.Forms.TextBox(); + this.Label9 = new System.Windows.Forms.Label(); + this.pnlrollupbuttonoptions = new System.Windows.Forms.Panel(); + this.Label54 = new System.Windows.Forms.Label(); + this.Label55 = new System.Windows.Forms.Label(); + this.pnlrollupbuttoncolour = new System.Windows.Forms.Panel(); + this.txtrollupbuttonside = new System.Windows.Forms.TextBox(); + this.Label56 = new System.Windows.Forms.Label(); + this.Label57 = new System.Windows.Forms.Label(); + this.txtrollupbuttonheight = new System.Windows.Forms.TextBox(); + this.Label58 = new System.Windows.Forms.Label(); + this.Label59 = new System.Windows.Forms.Label(); + this.txtrollupbuttontop = new System.Windows.Forms.TextBox(); + this.Label60 = new System.Windows.Forms.Label(); + this.Label61 = new System.Windows.Forms.Label(); + this.txtrollupbuttonwidth = new System.Windows.Forms.TextBox(); + this.Label62 = new System.Windows.Forms.Label(); + this.pnlminimizebuttonoptions = new System.Windows.Forms.Panel(); + this.Label82 = new System.Windows.Forms.Label(); + this.Label83 = new System.Windows.Forms.Label(); + this.pnlminimizebuttoncolour = new System.Windows.Forms.Panel(); + this.txtminimizebuttonside = new System.Windows.Forms.TextBox(); + this.Label84 = new System.Windows.Forms.Label(); + this.Label85 = new System.Windows.Forms.Label(); + this.txtminimizebuttonheight = new System.Windows.Forms.TextBox(); + this.Label86 = new System.Windows.Forms.Label(); + this.Label87 = new System.Windows.Forms.Label(); + this.txtminimizebuttontop = new System.Windows.Forms.TextBox(); + this.Label88 = new System.Windows.Forms.Label(); + this.Label89 = new System.Windows.Forms.Label(); + this.txtminimizebuttonwidth = new System.Windows.Forms.TextBox(); + this.Label90 = new System.Windows.Forms.Label(); + this.combobuttonoption = new System.Windows.Forms.ComboBox(); + this.Label52 = new System.Windows.Forms.Label(); + this.pnltitlebaroptions = new System.Windows.Forms.Panel(); + this.Label80 = new System.Windows.Forms.Label(); + this.txticonfromtop = new System.Windows.Forms.TextBox(); + this.Label81 = new System.Windows.Forms.Label(); + this.Label78 = new System.Windows.Forms.Label(); + this.txticonfromside = new System.Windows.Forms.TextBox(); + this.Label79 = new System.Windows.Forms.Label(); + this.lbcornerwidthpx = new System.Windows.Forms.Label(); + this.txttitlebarcornerwidth = new System.Windows.Forms.TextBox(); + this.lbcornerwidth = new System.Windows.Forms.Label(); + this.pnltitlebarrightcornercolour = new System.Windows.Forms.Panel(); + this.pnltitlebarleftcornercolour = new System.Windows.Forms.Panel(); + this.lbrightcornercolor = new System.Windows.Forms.Label(); + this.lbleftcornercolor = new System.Windows.Forms.Label(); + this.cboxtitlebarcorners = new System.Windows.Forms.CheckBox(); + this.Label5 = new System.Windows.Forms.Label(); + this.txttitlebarheight = new System.Windows.Forms.TextBox(); + this.Label4 = new System.Windows.Forms.Label(); + this.pnltitlebarcolour = new System.Windows.Forms.Panel(); + this.Label2 = new System.Windows.Forms.Label(); + this.pnlborderoptions = new System.Windows.Forms.Panel(); + this.cbindividualbordercolours = new System.Windows.Forms.CheckBox(); + this.pnlborderbottomrightcolour = new System.Windows.Forms.Panel(); + this.lbbright = new System.Windows.Forms.Label(); + this.pnlborderbottomcolour = new System.Windows.Forms.Panel(); + this.lbbottom = new System.Windows.Forms.Label(); + this.pnlborderbottomleftcolour = new System.Windows.Forms.Panel(); + this.lbbleft = new System.Windows.Forms.Label(); + this.pnlborderrightcolour = new System.Windows.Forms.Panel(); + this.lbright = new System.Windows.Forms.Label(); + this.pnlborderleftcolour = new System.Windows.Forms.Panel(); + this.lbleft = new System.Windows.Forms.Label(); + this.Label15 = new System.Windows.Forms.Label(); + this.pnlbordercolour = new System.Windows.Forms.Panel(); + this.txtbordersize = new System.Windows.Forms.TextBox(); + this.Label3 = new System.Windows.Forms.Label(); + this.Label16 = new System.Windows.Forms.Label(); + this.pnltitletextoptions = new System.Windows.Forms.Panel(); + this.combotitletextposition = new System.Windows.Forms.ComboBox(); + this.Label53 = new System.Windows.Forms.Label(); + this.combotitletextstyle = new System.Windows.Forms.ComboBox(); + this.combotitletextfont = new System.Windows.Forms.ComboBox(); + this.Label23 = new System.Windows.Forms.Label(); + this.Label17 = new System.Windows.Forms.Label(); + this.txttitletextside = new System.Windows.Forms.TextBox(); + this.Label18 = new System.Windows.Forms.Label(); + this.Label19 = new System.Windows.Forms.Label(); + this.txttitletexttop = new System.Windows.Forms.TextBox(); + this.Label20 = new System.Windows.Forms.Label(); + this.Label21 = new System.Windows.Forms.Label(); + this.txttitletextsize = new System.Windows.Forms.TextBox(); + this.Label22 = new System.Windows.Forms.Label(); + this.Label24 = new System.Windows.Forms.Label(); + this.pnltitletextcolour = new System.Windows.Forms.Panel(); + this.Label25 = new System.Windows.Forms.Label(); + this.pnlwindowsobjects = new System.Windows.Forms.Panel(); + this.btnborders = new System.Windows.Forms.Button(); + this.btnbuttons = new System.Windows.Forms.Button(); + this.btntitletext = new System.Windows.Forms.Button(); + this.btntitlebar = new System.Windows.Forms.Button(); + this.pnlwindowpreview = new System.Windows.Forms.Panel(); + this.prepgcontent = new System.Windows.Forms.Panel(); + this.prepgbottom = new System.Windows.Forms.Panel(); + this.prepgleft = new System.Windows.Forms.Panel(); + this.prepgbottomlcorner = new System.Windows.Forms.Panel(); + this.prepgright = new System.Windows.Forms.Panel(); + this.prepgbottomrcorner = new System.Windows.Forms.Panel(); + this.pretitlebar = new System.Windows.Forms.Panel(); + this.preminimizebutton = new System.Windows.Forms.Panel(); + this.prepnlicon = new System.Windows.Forms.PictureBox(); + this.prerollupbutton = new System.Windows.Forms.Panel(); + this.preclosebutton = new System.Windows.Forms.Panel(); + this.pretitletext = new System.Windows.Forms.Label(); + this.prepgtoplcorner = new System.Windows.Forms.Panel(); + this.prepgtoprcorner = new System.Windows.Forms.Panel(); + this.pnlreset = new System.Windows.Forms.Panel(); + this.Label113 = new System.Windows.Forms.Label(); + this.btnresetallsettings = new System.Windows.Forms.Button(); + this.Label109 = new System.Windows.Forms.Label(); + this.Label111 = new System.Windows.Forms.Label(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.pnldesktopcomposition = new System.Windows.Forms.Panel(); + this.pnlfancywindows = new System.Windows.Forms.Panel(); + this.txtwinfadedec = new System.Windows.Forms.TextBox(); + this.label150 = new System.Windows.Forms.Label(); + this.txtwinfadespeed = new System.Windows.Forms.TextBox(); + this.label151 = new System.Windows.Forms.Label(); + this.cbdrageffect = new System.Windows.Forms.ComboBox(); + this.label141 = new System.Windows.Forms.Label(); + this.cbcloseanim = new System.Windows.Forms.ComboBox(); + this.label128 = new System.Windows.Forms.Label(); + this.cbopenanim = new System.Windows.Forms.ComboBox(); + this.label127 = new System.Windows.Forms.Label(); + this.label149 = new System.Windows.Forms.Label(); + this.pnlfancydragging = new System.Windows.Forms.Panel(); + this.txtshakeminoffset = new System.Windows.Forms.TextBox(); + this.label148 = new System.Windows.Forms.Label(); + this.txtshakemax = new System.Windows.Forms.TextBox(); + this.label146 = new System.Windows.Forms.Label(); + this.txtdragopacitydec = new System.Windows.Forms.TextBox(); + this.label144 = new System.Windows.Forms.Label(); + this.txtdragfadedec = new System.Windows.Forms.TextBox(); + this.label143 = new System.Windows.Forms.Label(); + this.txtfadespeed = new System.Windows.Forms.TextBox(); + this.label155 = new System.Windows.Forms.Label(); + this.label156 = new System.Windows.Forms.Label(); + this.pnlfancyintro = new System.Windows.Forms.Panel(); + this.label174 = new System.Windows.Forms.Label(); + this.label175 = new System.Windows.Forms.Label(); + this.panel18 = new System.Windows.Forms.Panel(); + this.panel19 = new System.Windows.Forms.Panel(); + this.label157 = new System.Windows.Forms.Label(); + this.panel20 = new System.Windows.Forms.Panel(); + this.label158 = new System.Windows.Forms.Label(); + this.panel21 = new System.Windows.Forms.Panel(); + this.label159 = new System.Windows.Forms.Label(); + this.panel22 = new System.Windows.Forms.Panel(); + this.label160 = new System.Windows.Forms.Label(); + this.panel23 = new System.Windows.Forms.Panel(); + this.label161 = new System.Windows.Forms.Label(); + this.panel24 = new System.Windows.Forms.Panel(); + this.label162 = new System.Windows.Forms.Label(); + this.label163 = new System.Windows.Forms.Label(); + this.panel25 = new System.Windows.Forms.Panel(); + this.panel26 = new System.Windows.Forms.Panel(); + this.label164 = new System.Windows.Forms.Label(); + this.panel27 = new System.Windows.Forms.Panel(); + this.label165 = new System.Windows.Forms.Label(); + this.panel28 = new System.Windows.Forms.Panel(); + this.label166 = new System.Windows.Forms.Label(); + this.panel29 = new System.Windows.Forms.Panel(); + this.label167 = new System.Windows.Forms.Label(); + this.panel30 = new System.Windows.Forms.Panel(); + this.label168 = new System.Windows.Forms.Label(); + this.panel31 = new System.Windows.Forms.Panel(); + this.label169 = new System.Windows.Forms.Label(); + this.panel32 = new System.Windows.Forms.Panel(); + this.label170 = new System.Windows.Forms.Label(); + this.panel33 = new System.Windows.Forms.Panel(); + this.label171 = new System.Windows.Forms.Label(); + this.panel34 = new System.Windows.Forms.Panel(); + this.label172 = new System.Windows.Forms.Label(); + this.label173 = new System.Windows.Forms.Label(); + this.panel36 = new System.Windows.Forms.Panel(); + this.btnfancydragging = new System.Windows.Forms.Button(); + this.btnfancywindows = new System.Windows.Forms.Button(); + this.label176 = new System.Windows.Forms.Label(); + this.pnlmenus = new System.Windows.Forms.Panel(); + this.pnladvanced = new System.Windows.Forms.Panel(); + this.btnmorebuttons = new System.Windows.Forms.Button(); + this.pnlbuttonchecked = new System.Windows.Forms.Panel(); + this.label136 = new System.Windows.Forms.Label(); + this.pnlitemselectedend = new System.Windows.Forms.Panel(); + this.label129 = new System.Windows.Forms.Label(); + this.pnlbuttonpressed = new System.Windows.Forms.Panel(); + this.label130 = new System.Windows.Forms.Label(); + this.pnlitemselectedbegin = new System.Windows.Forms.Panel(); + this.label131 = new System.Windows.Forms.Label(); + this.pnlitemselected = new System.Windows.Forms.Panel(); + this.label132 = new System.Windows.Forms.Label(); + this.pnlbuttonselected = new System.Windows.Forms.Panel(); + this.label133 = new System.Windows.Forms.Label(); + this.pnlcheckbg = new System.Windows.Forms.Panel(); + this.label134 = new System.Windows.Forms.Label(); + this.label135 = new System.Windows.Forms.Label(); + this.pnlmore = new System.Windows.Forms.Panel(); + this.pnlpressedbegin = new System.Windows.Forms.Panel(); + this.btnback = new System.Windows.Forms.Button(); + this.label138 = new System.Windows.Forms.Label(); + this.pnlselectedbegin = new System.Windows.Forms.Panel(); + this.pnlpressedend = new System.Windows.Forms.Panel(); + this.label137 = new System.Windows.Forms.Label(); + this.label139 = new System.Windows.Forms.Label(); + this.pnlselectedend = new System.Windows.Forms.Panel(); + this.pnlpressedmiddle = new System.Windows.Forms.Panel(); + this.label140 = new System.Windows.Forms.Label(); + this.label142 = new System.Windows.Forms.Label(); + this.pnlselectedmiddle = new System.Windows.Forms.Panel(); + this.label145 = new System.Windows.Forms.Label(); + this.label147 = new System.Windows.Forms.Label(); + this.pnldropdown = new System.Windows.Forms.Panel(); + this.pnlddborder = new System.Windows.Forms.Panel(); + this.label117 = new System.Windows.Forms.Label(); + this.pnlmarginend = new System.Windows.Forms.Panel(); + this.label120 = new System.Windows.Forms.Label(); + this.pnlmarginmiddle = new System.Windows.Forms.Panel(); + this.label121 = new System.Windows.Forms.Label(); + this.pnlmarginbegin = new System.Windows.Forms.Panel(); + this.label122 = new System.Windows.Forms.Label(); + this.pnlhcolor = new System.Windows.Forms.Panel(); + this.label123 = new System.Windows.Forms.Label(); + this.pnlhborder = new System.Windows.Forms.Panel(); + this.label125 = new System.Windows.Forms.Label(); + this.label126 = new System.Windows.Forms.Label(); + this.pnlbasic = new System.Windows.Forms.Panel(); + this.pnlmenutextcolor = new System.Windows.Forms.Panel(); + this.label118 = new System.Windows.Forms.Label(); + this.pnldropdownbg = new System.Windows.Forms.Panel(); + this.label115 = new System.Windows.Forms.Label(); + this.pnlstatusend = new System.Windows.Forms.Panel(); + this.label114 = new System.Windows.Forms.Label(); + this.pnlstatusbegin = new System.Windows.Forms.Panel(); + this.label107 = new System.Windows.Forms.Label(); + this.pnltoolbarend = new System.Windows.Forms.Panel(); + this.label77 = new System.Windows.Forms.Label(); + this.pnltoolbarmiddle = new System.Windows.Forms.Panel(); + this.label76 = new System.Windows.Forms.Label(); + this.pnltoolbarbegin = new System.Windows.Forms.Panel(); + this.label75 = new System.Windows.Forms.Label(); + this.pnlmenubarend = new System.Windows.Forms.Panel(); + this.label73 = new System.Windows.Forms.Label(); + this.pnlmenubarbegin = new System.Windows.Forms.Panel(); + this.label42 = new System.Windows.Forms.Label(); + this.label41 = new System.Windows.Forms.Label(); + this.pnlmenusintro = new System.Windows.Forms.Panel(); + this.label116 = new System.Windows.Forms.Label(); + this.label124 = new System.Windows.Forms.Label(); + this.pnlmenucategories = new System.Windows.Forms.Panel(); + this.btnmisc = new System.Windows.Forms.Button(); + this.btnadvanced = new System.Windows.Forms.Button(); + this.btndropdown = new System.Windows.Forms.Button(); + this.btnbasic = new System.Windows.Forms.Button(); + this.label74 = new System.Windows.Forms.Label(); + this.tmrfix = new System.Windows.Forms.Timer(this.components); + this.tmrdelay = new System.Windows.Forms.Timer(this.components); + this.pnlluaoptions = new System.Windows.Forms.Panel(); + this.flmorebuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.pnlluafield = new System.Windows.Forms.Panel(); + this.catholder.SuspendLayout(); + this.pnlshifterintro.SuspendLayout(); + this.pnldesktopoptions.SuspendLayout(); + this.pnldesktoppaneloptions.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.txtdesktoppanelheight)).BeginInit(); + this.pnlapplauncheroptions.SuspendLayout(); + this.pnldesktopintro.SuspendLayout(); + this.pnlpanelbuttonsoptions.SuspendLayout(); + this.pnldesktopbackgroundoptions.SuspendLayout(); + this.pnlpanelclockoptions.SuspendLayout(); + this.pnldesktoppreview.SuspendLayout(); + this.predesktoppanel.SuspendLayout(); + this.prepnlpanelbuttonholder.SuspendLayout(); + this.prepnlpanelbutton.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).BeginInit(); + this.pretimepanel.SuspendLayout(); + this.preapplaunchermenuholder.SuspendLayout(); + this.predesktopappmenu.SuspendLayout(); + this.Panel10.SuspendLayout(); + this.pnlwindowsoptions.SuspendLayout(); + this.pnlwindowsintro.SuspendLayout(); + this.pnlbuttonoptions.SuspendLayout(); + this.pnlclosebuttonoptions.SuspendLayout(); + this.pnlrollupbuttonoptions.SuspendLayout(); + this.pnlminimizebuttonoptions.SuspendLayout(); + this.pnltitlebaroptions.SuspendLayout(); + this.pnlborderoptions.SuspendLayout(); + this.pnltitletextoptions.SuspendLayout(); + this.pnlwindowsobjects.SuspendLayout(); + this.pnlwindowpreview.SuspendLayout(); + this.prepgleft.SuspendLayout(); + this.prepgright.SuspendLayout(); + this.pretitlebar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).BeginInit(); + this.pnlreset.SuspendLayout(); + this.pgcontents.SuspendLayout(); + this.pnldesktopcomposition.SuspendLayout(); + this.pnlfancywindows.SuspendLayout(); + this.pnlfancydragging.SuspendLayout(); + this.pnlfancyintro.SuspendLayout(); + this.panel18.SuspendLayout(); + this.panel25.SuspendLayout(); + this.panel36.SuspendLayout(); + this.pnlmenus.SuspendLayout(); + this.pnladvanced.SuspendLayout(); + this.pnlmore.SuspendLayout(); + this.pnldropdown.SuspendLayout(); + this.pnlbasic.SuspendLayout(); + this.pnlmenusintro.SuspendLayout(); + this.pnlmenucategories.SuspendLayout(); + this.pnlluaoptions.SuspendLayout(); + this.SuspendLayout(); + // + // clocktick + // + this.clocktick.Enabled = true; + this.clocktick.Interval = 1000; + // + // customizationtime + // + this.customizationtime.Enabled = true; + this.customizationtime.Interval = 10000; + // + // timerearned + // + this.timerearned.Interval = 3000; + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.ForeColor = System.Drawing.Color.White; + this.Label1.Location = new System.Drawing.Point(597, 3); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(39, 13); + this.Label1.TabIndex = 1; + this.Label1.Text = "Label1"; + // + // btnapply + // + this.btnapply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapply.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnapply.Location = new System.Drawing.Point(7, 286); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(119, 29); + this.btnapply.TabIndex = 3; + this.btnapply.TabStop = false; + this.btnapply.Text = "Apply Changes"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); + // + // catholder + // + this.catholder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.catholder.BackColor = System.Drawing.Color.White; + this.catholder.Controls.Add(this.btnmore); + this.catholder.Controls.Add(this.btnreset); + this.catholder.Controls.Add(this.btnwindowcomposition); + this.catholder.Controls.Add(this.btndesktopicons); + this.catholder.Controls.Add(this.btnmenus); + this.catholder.Controls.Add(this.btnwindows); + this.catholder.Controls.Add(this.btndesktop); + this.catholder.Location = new System.Drawing.Point(7, 9); + this.catholder.Name = "catholder"; + this.catholder.Size = new System.Drawing.Size(119, 271); + this.catholder.TabIndex = 5; + // + // btnmore + // + this.btnmore.BackColor = System.Drawing.Color.White; + this.btnmore.Dock = System.Windows.Forms.DockStyle.Top; + this.btnmore.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmore.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnmore.Location = new System.Drawing.Point(0, 174); + this.btnmore.Name = "btnmore"; + this.btnmore.Size = new System.Drawing.Size(119, 29); + this.btnmore.TabIndex = 11; + this.btnmore.TabStop = false; + this.btnmore.Text = "More"; + this.btnmore.UseVisualStyleBackColor = false; + this.btnmore.Click += new System.EventHandler(this.btnmore_Click); + // + // btnreset + // + this.btnreset.BackColor = System.Drawing.Color.White; + this.btnreset.Dock = System.Windows.Forms.DockStyle.Top; + this.btnreset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnreset.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnreset.Location = new System.Drawing.Point(0, 145); + this.btnreset.Name = "btnreset"; + this.btnreset.Size = new System.Drawing.Size(119, 29); + this.btnreset.TabIndex = 8; + this.btnreset.TabStop = false; + this.btnreset.Text = "Reset"; + this.btnreset.UseVisualStyleBackColor = false; + this.btnreset.Click += new System.EventHandler(this.btnreset_Click); + // + // btnwindowcomposition + // + this.btnwindowcomposition.BackColor = System.Drawing.Color.White; + this.btnwindowcomposition.Dock = System.Windows.Forms.DockStyle.Top; + this.btnwindowcomposition.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnwindowcomposition.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnwindowcomposition.Location = new System.Drawing.Point(0, 116); + this.btnwindowcomposition.Name = "btnwindowcomposition"; + this.btnwindowcomposition.Size = new System.Drawing.Size(119, 29); + this.btnwindowcomposition.TabIndex = 10; + this.btnwindowcomposition.TabStop = false; + this.btnwindowcomposition.Text = "Fancy Effects"; + this.btnwindowcomposition.UseVisualStyleBackColor = false; + this.btnwindowcomposition.Visible = false; + this.btnwindowcomposition.Click += new System.EventHandler(this.btnwindowcomposition_Click); + // + // btndesktopicons + // + this.btndesktopicons.BackColor = System.Drawing.Color.White; + this.btndesktopicons.Dock = System.Windows.Forms.DockStyle.Top; + this.btndesktopicons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndesktopicons.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndesktopicons.Location = new System.Drawing.Point(0, 87); + this.btndesktopicons.Name = "btndesktopicons"; + this.btndesktopicons.Size = new System.Drawing.Size(119, 29); + this.btndesktopicons.TabIndex = 9; + this.btndesktopicons.TabStop = false; + this.btndesktopicons.Text = "Desktop Icons"; + this.btndesktopicons.UseVisualStyleBackColor = false; + this.btndesktopicons.Visible = false; + // + // btnmenus + // + this.btnmenus.BackColor = System.Drawing.Color.White; + this.btnmenus.Dock = System.Windows.Forms.DockStyle.Top; + this.btnmenus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmenus.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnmenus.Location = new System.Drawing.Point(0, 58); + this.btnmenus.Name = "btnmenus"; + this.btnmenus.Size = new System.Drawing.Size(119, 29); + this.btnmenus.TabIndex = 6; + this.btnmenus.TabStop = false; + this.btnmenus.Text = "Menus"; + this.btnmenus.UseVisualStyleBackColor = false; + this.btnmenus.Visible = false; + this.btnmenus.Click += new System.EventHandler(this.btnmenus_Click_1); + // + // btnwindows + // + this.btnwindows.BackColor = System.Drawing.Color.White; + this.btnwindows.Dock = System.Windows.Forms.DockStyle.Top; + this.btnwindows.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnwindows.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnwindows.Location = new System.Drawing.Point(0, 29); + this.btnwindows.Name = "btnwindows"; + this.btnwindows.Size = new System.Drawing.Size(119, 29); + this.btnwindows.TabIndex = 5; + this.btnwindows.TabStop = false; + this.btnwindows.Text = "Windows"; + this.btnwindows.UseVisualStyleBackColor = false; + this.btnwindows.Click += new System.EventHandler(this.btnwindows_Click); + // + // btndesktop + // + this.btndesktop.BackColor = System.Drawing.Color.White; + this.btndesktop.Dock = System.Windows.Forms.DockStyle.Top; + this.btndesktop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndesktop.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndesktop.Location = new System.Drawing.Point(0, 0); + this.btndesktop.Name = "btndesktop"; + this.btndesktop.Size = new System.Drawing.Size(119, 29); + this.btndesktop.TabIndex = 4; + this.btndesktop.TabStop = false; + this.btndesktop.Text = "Desktop"; + this.btndesktop.UseVisualStyleBackColor = false; + this.btndesktop.Click += new System.EventHandler(this.btndesktop_Click); + // + // pnlshifterintro + // + this.pnlshifterintro.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlshifterintro.BackColor = System.Drawing.Color.White; + this.pnlshifterintro.Controls.Add(this.Label66); + this.pnlshifterintro.Controls.Add(this.Label65); + this.pnlshifterintro.Controls.Add(this.Label64); + this.pnlshifterintro.Controls.Add(this.Label63); + this.pnlshifterintro.Location = new System.Drawing.Point(134, 9); + this.pnlshifterintro.Name = "pnlshifterintro"; + this.pnlshifterintro.Size = new System.Drawing.Size(457, 306); + this.pnlshifterintro.TabIndex = 17; + // + // Label66 + // + this.Label66.BackColor = System.Drawing.Color.Transparent; + this.Label66.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label66.Location = new System.Drawing.Point(3, 227); + this.Label66.Name = "Label66"; + this.Label66.Size = new System.Drawing.Size(451, 65); + this.Label66.TabIndex = 3; + this.Label66.Text = "That\'s right! As you make customizations to ShiftOS, you can earn Codepoints. The" + + " more you shift it, the more CP you earn. Just hit the \'Apply Changes\' button, a" + + "nd you\'ll recieve your codepoints."; + this.Label66.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label65 + // + this.Label65.AutoSize = true; + this.Label65.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label65.Location = new System.Drawing.Point(53, 204); + this.Label65.Name = "Label65"; + this.Label65.Size = new System.Drawing.Size(352, 20); + this.Label65.TabIndex = 2; + this.Label65.Text = "You can earn codepoints using the Shifter!"; + // + // Label64 + // + this.Label64.BackColor = System.Drawing.Color.Transparent; + this.Label64.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label64.Location = new System.Drawing.Point(4, 32); + this.Label64.Name = "Label64"; + this.Label64.Size = new System.Drawing.Size(451, 167); + this.Label64.TabIndex = 1; + this.Label64.Text = resources.GetString("Label64.Text"); + this.Label64.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label63 + // + this.Label63.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label63.Location = new System.Drawing.Point(72, 0); + this.Label63.Name = "Label63"; + this.Label63.Size = new System.Drawing.Size(332, 29); + this.Label63.TabIndex = 0; + this.Label63.Text = "Welcome to the Shifter!"; + // + // pnldesktopoptions + // + this.pnldesktopoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktopoptions.BackColor = System.Drawing.Color.White; + this.pnldesktopoptions.Controls.Add(this.pnlapplauncheroptions); + this.pnldesktopoptions.Controls.Add(this.pnldesktoppaneloptions); + this.pnldesktopoptions.Controls.Add(this.pnldesktopintro); + this.pnldesktopoptions.Controls.Add(this.pnlpanelbuttonsoptions); + this.pnldesktopoptions.Controls.Add(this.pnldesktopbackgroundoptions); + this.pnldesktopoptions.Controls.Add(this.pnlpanelclockoptions); + this.pnldesktopoptions.Controls.Add(this.pnldesktoppreview); + this.pnldesktopoptions.Controls.Add(this.Panel10); + this.pnldesktopoptions.Location = new System.Drawing.Point(134, 9); + this.pnldesktopoptions.Name = "pnldesktopoptions"; + this.pnldesktopoptions.Size = new System.Drawing.Size(457, 306); + this.pnldesktopoptions.TabIndex = 16; + this.pnldesktopoptions.Visible = false; + // + // pnldesktoppaneloptions + // + this.pnldesktoppaneloptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktoppaneloptions.Controls.Add(this.btnpanelbuttons); + this.pnldesktoppaneloptions.Controls.Add(this.lbwarning); + this.pnldesktoppaneloptions.Controls.Add(this.combodesktoppanelposition); + this.pnldesktoppaneloptions.Controls.Add(this.lbposition); + this.pnldesktoppaneloptions.Controls.Add(this.Label47); + this.pnldesktoppaneloptions.Controls.Add(this.txtdesktoppanelheight); + this.pnldesktoppaneloptions.Controls.Add(this.lbheight); + this.pnldesktoppaneloptions.Controls.Add(this.pnldesktoppanelcolour); + this.pnldesktoppaneloptions.Controls.Add(this.lbpanelcolor); + this.pnldesktoppaneloptions.Location = new System.Drawing.Point(135, 159); + this.pnldesktoppaneloptions.Name = "pnldesktoppaneloptions"; + this.pnldesktoppaneloptions.Size = new System.Drawing.Size(317, 140); + this.pnldesktoppaneloptions.TabIndex = 9; + this.pnldesktoppaneloptions.Visible = false; + // + // btnpanelbuttons + // + this.btnpanelbuttons.BackColor = System.Drawing.Color.White; + this.btnpanelbuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpanelbuttons.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpanelbuttons.Location = new System.Drawing.Point(193, 101); + this.btnpanelbuttons.Name = "btnpanelbuttons"; + this.btnpanelbuttons.Size = new System.Drawing.Size(119, 29); + this.btnpanelbuttons.TabIndex = 8; + this.btnpanelbuttons.Text = "Panel Buttons >"; + this.btnpanelbuttons.UseVisualStyleBackColor = false; + this.btnpanelbuttons.Click += new System.EventHandler(this.btnpanelbuttons_Click); + // + // lbwarning + // + this.lbwarning.Location = new System.Drawing.Point(3, 52); + this.lbwarning.Name = "lbwarning"; + this.lbwarning.Size = new System.Drawing.Size(290, 42); + this.lbwarning.TabIndex = 8; + this.lbwarning.Text = "Warning: If you set the panel position to the bottom you must hide your windows t" + + "askbar and restart ShiftOS on your host operating system to prevent a visual bug" + + "."; + // + // combodesktoppanelposition + // + this.combodesktoppanelposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combodesktoppanelposition.FormattingEnabled = true; + this.combodesktoppanelposition.Items.AddRange(new object[] { + "Top", + "Bottom"}); + this.combodesktoppanelposition.Location = new System.Drawing.Point(103, 28); + this.combodesktoppanelposition.Name = "combodesktoppanelposition"; + this.combodesktoppanelposition.Size = new System.Drawing.Size(59, 24); + this.combodesktoppanelposition.TabIndex = 7; + this.combodesktoppanelposition.SelectedIndexChanged += new System.EventHandler(this.combodesktoppanelposition_SelectedIndexChanged); + // + // lbposition + // + this.lbposition.AutoSize = true; + this.lbposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbposition.Location = new System.Drawing.Point(3, 31); + this.lbposition.Name = "lbposition"; + this.lbposition.Size = new System.Drawing.Size(97, 16); + this.lbposition.TabIndex = 6; + this.lbposition.Text = "Panel Position:"; + // + // Label47 + // + this.Label47.AutoSize = true; + this.Label47.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label47.Location = new System.Drawing.Point(226, 8); + this.Label47.Name = "Label47"; + this.Label47.Size = new System.Drawing.Size(22, 16); + this.Label47.TabIndex = 5; + this.Label47.Text = "px"; + // + // txtdesktoppanelheight + // + this.txtdesktoppanelheight.BackColor = System.Drawing.Color.White; + this.txtdesktoppanelheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdesktoppanelheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtdesktoppanelheight.ForeColor = System.Drawing.Color.Black; + this.txtdesktoppanelheight.Location = new System.Drawing.Point(189, 5); + this.txtdesktoppanelheight.Name = "txtdesktoppanelheight"; + this.txtdesktoppanelheight.Size = new System.Drawing.Size(37, 22); + this.txtdesktoppanelheight.TabIndex = 4; + this.txtdesktoppanelheight.ValueChanged += new System.EventHandler(this.txtdesktoppanelheight_ValueChanged); + // + // lbheight + // + this.lbheight.AutoSize = true; + this.lbheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbheight.Location = new System.Drawing.Point(138, 7); + this.lbheight.Name = "lbheight"; + this.lbheight.Size = new System.Drawing.Size(50, 16); + this.lbheight.TabIndex = 2; + this.lbheight.Text = "Height:"; + // + // pnldesktoppanelcolour + // + this.pnldesktoppanelcolour.Location = new System.Drawing.Point(92, 5); + this.pnldesktoppanelcolour.Name = "pnldesktoppanelcolour"; + this.pnldesktoppanelcolour.Size = new System.Drawing.Size(41, 20); + this.pnldesktoppanelcolour.TabIndex = 1; + this.pnldesktoppanelcolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ChangeDesktopPanelColor); + // + // lbpanelcolor + // + this.lbpanelcolor.AutoSize = true; + this.lbpanelcolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbpanelcolor.Location = new System.Drawing.Point(3, 7); + this.lbpanelcolor.Name = "lbpanelcolor"; + this.lbpanelcolor.Size = new System.Drawing.Size(88, 16); + this.lbpanelcolor.TabIndex = 0; + this.lbpanelcolor.Text = "Panel Colour:"; + // + // pnlapplauncheroptions + // + this.pnlapplauncheroptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlapplauncheroptions.Controls.Add(this.pnlalhover); + this.pnlapplauncheroptions.Controls.Add(this.label119); + this.pnlapplauncheroptions.Controls.Add(this.Label71); + this.pnlapplauncheroptions.Controls.Add(this.txtapplauncherwidth); + this.pnlapplauncheroptions.Controls.Add(this.Label72); + this.pnlapplauncheroptions.Controls.Add(this.txtappbuttonlabel); + this.pnlapplauncheroptions.Controls.Add(this.Label51); + this.pnlapplauncheroptions.Controls.Add(this.Label50); + this.pnlapplauncheroptions.Controls.Add(this.pnlmaintextcolour); + this.pnlapplauncheroptions.Controls.Add(this.comboappbuttontextstyle); + this.pnlapplauncheroptions.Controls.Add(this.comboappbuttontextfont); + this.pnlapplauncheroptions.Controls.Add(this.Label37); + this.pnlapplauncheroptions.Controls.Add(this.Label38); + this.pnlapplauncheroptions.Controls.Add(this.txtappbuttontextsize); + this.pnlapplauncheroptions.Controls.Add(this.Label39); + this.pnlapplauncheroptions.Controls.Add(this.Label40); + this.pnlapplauncheroptions.Controls.Add(this.pnlmainbuttonactivated); + this.pnlapplauncheroptions.Controls.Add(this.Label28); + this.pnlapplauncheroptions.Controls.Add(this.Label35); + this.pnlapplauncheroptions.Controls.Add(this.txtapplicationsbuttonheight); + this.pnlapplauncheroptions.Controls.Add(this.Label36); + this.pnlapplauncheroptions.Controls.Add(this.pnlmainbuttoncolour); + this.pnlapplauncheroptions.Controls.Add(this.Label43); + this.pnlapplauncheroptions.Location = new System.Drawing.Point(135, 159); + this.pnlapplauncheroptions.Name = "pnlapplauncheroptions"; + this.pnlapplauncheroptions.Size = new System.Drawing.Size(317, 140); + this.pnlapplauncheroptions.TabIndex = 10; + this.pnlapplauncheroptions.Visible = false; + // + // pnlalhover + // + this.pnlalhover.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlalhover.Location = new System.Drawing.Point(90, 29); + this.pnlalhover.Name = "pnlalhover"; + this.pnlalhover.Size = new System.Drawing.Size(41, 20); + this.pnlalhover.TabIndex = 3; + this.pnlalhover.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetALHoverColor); + // + // label119 + // + this.label119.AutoSize = true; + this.label119.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label119.Location = new System.Drawing.Point(3, 31); + this.label119.Name = "label119"; + this.label119.Size = new System.Drawing.Size(84, 16); + this.label119.TabIndex = 2; + this.label119.Text = "Mouse Over:"; + // + // Label71 + // + this.Label71.AutoSize = true; + this.Label71.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label71.Location = new System.Drawing.Point(203, 103); + this.Label71.Name = "Label71"; + this.Label71.Size = new System.Drawing.Size(22, 16); + this.Label71.TabIndex = 33; + this.Label71.Text = "px"; + // + // txtapplauncherwidth + // + this.txtapplauncherwidth.BackColor = System.Drawing.Color.White; + this.txtapplauncherwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtapplauncherwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtapplauncherwidth.ForeColor = System.Drawing.Color.Black; + this.txtapplauncherwidth.Location = new System.Drawing.Point(148, 101); + this.txtapplauncherwidth.Name = "txtapplauncherwidth"; + this.txtapplauncherwidth.Size = new System.Drawing.Size(54, 22); + this.txtapplauncherwidth.TabIndex = 32; + this.txtapplauncherwidth.TextChanged += new System.EventHandler(this.txtapplauncherwidth_TextChanged); + // + // Label72 + // + this.Label72.AutoSize = true; + this.Label72.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label72.Location = new System.Drawing.Point(103, 103); + this.Label72.Name = "Label72"; + this.Label72.Size = new System.Drawing.Size(45, 16); + this.Label72.TabIndex = 31; + this.Label72.Text = "Width:"; + // + // txtappbuttonlabel + // + this.txtappbuttonlabel.BackColor = System.Drawing.Color.White; + this.txtappbuttonlabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtappbuttonlabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtappbuttonlabel.ForeColor = System.Drawing.Color.Black; + this.txtappbuttonlabel.Location = new System.Drawing.Point(53, 76); + this.txtappbuttonlabel.Name = "txtappbuttonlabel"; + this.txtappbuttonlabel.Size = new System.Drawing.Size(81, 22); + this.txtappbuttonlabel.TabIndex = 30; + this.txtappbuttonlabel.TextChanged += new System.EventHandler(this.txtappbuttonlabel_KeyDown); + // + // Label51 + // + this.Label51.AutoSize = true; + this.Label51.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label51.Location = new System.Drawing.Point(2, 79); + this.Label51.Name = "Label51"; + this.Label51.Size = new System.Drawing.Size(45, 16); + this.Label51.TabIndex = 29; + this.Label51.Text = "Label:"; + // + // Label50 + // + this.Label50.AutoSize = true; + this.Label50.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label50.Location = new System.Drawing.Point(140, 79); + this.Label50.Name = "Label50"; + this.Label50.Size = new System.Drawing.Size(37, 16); + this.Label50.TabIndex = 28; + this.Label50.Text = "Font:"; + // + // pnlmaintextcolour + // + this.pnlmaintextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmaintextcolour.Location = new System.Drawing.Point(155, 51); + this.pnlmaintextcolour.Name = "pnlmaintextcolour"; + this.pnlmaintextcolour.Size = new System.Drawing.Size(41, 20); + this.pnlmaintextcolour.TabIndex = 19; + this.pnlmaintextcolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetAppLauncherTextColor); + // + // comboappbuttontextstyle + // + this.comboappbuttontextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboappbuttontextstyle.FormattingEnabled = true; + this.comboappbuttontextstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.comboappbuttontextstyle.Location = new System.Drawing.Point(243, 49); + this.comboappbuttontextstyle.Name = "comboappbuttontextstyle"; + this.comboappbuttontextstyle.Size = new System.Drawing.Size(64, 24); + this.comboappbuttontextstyle.TabIndex = 27; + this.comboappbuttontextstyle.SelectedIndexChanged += new System.EventHandler(this.comboappbuttontextstyle_SelectedIndexChanged); + // + // comboappbuttontextfont + // + this.comboappbuttontextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboappbuttontextfont.FormattingEnabled = true; + this.comboappbuttontextfont.Location = new System.Drawing.Point(181, 75); + this.comboappbuttontextfont.Name = "comboappbuttontextfont"; + this.comboappbuttontextfont.Size = new System.Drawing.Size(125, 24); + this.comboappbuttontextfont.TabIndex = 26; + this.comboappbuttontextfont.SelectedIndexChanged += new System.EventHandler(this.comboappbuttontextfont_SelectedIndexChanged); + // + // Label37 + // + this.Label37.AutoSize = true; + this.Label37.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label37.Location = new System.Drawing.Point(200, 52); + this.Label37.Name = "Label37"; + this.Label37.Size = new System.Drawing.Size(41, 16); + this.Label37.TabIndex = 25; + this.Label37.Text = "Style:"; + // + // Label38 + // + this.Label38.AutoSize = true; + this.Label38.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label38.Location = new System.Drawing.Point(75, 52); + this.Label38.Name = "Label38"; + this.Label38.Size = new System.Drawing.Size(22, 16); + this.Label38.TabIndex = 24; + this.Label38.Text = "px"; + // + // txtappbuttontextsize + // + this.txtappbuttontextsize.BackColor = System.Drawing.Color.White; + this.txtappbuttontextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtappbuttontextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtappbuttontextsize.ForeColor = System.Drawing.Color.Black; + this.txtappbuttontextsize.Location = new System.Drawing.Point(51, 50); + this.txtappbuttontextsize.Name = "txtappbuttontextsize"; + this.txtappbuttontextsize.Size = new System.Drawing.Size(23, 22); + this.txtappbuttontextsize.TabIndex = 23; + this.txtappbuttontextsize.TextChanged += new System.EventHandler(this.txtappbuttontextsize_TextChanged); + // + // Label39 + // + this.Label39.AutoSize = true; + this.Label39.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label39.Location = new System.Drawing.Point(1, 52); + this.Label39.Name = "Label39"; + this.Label39.Size = new System.Drawing.Size(49, 16); + this.Label39.TabIndex = 22; + this.Label39.Text = "T Size:"; + // + // Label40 + // + this.Label40.AutoSize = true; + this.Label40.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label40.Location = new System.Drawing.Point(101, 53); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(50, 16); + this.Label40.TabIndex = 21; + this.Label40.Text = "Colour:"; + // + // pnlmainbuttonactivated + // + this.pnlmainbuttonactivated.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmainbuttonactivated.Location = new System.Drawing.Point(267, 6); + this.pnlmainbuttonactivated.Name = "pnlmainbuttonactivated"; + this.pnlmainbuttonactivated.Size = new System.Drawing.Size(41, 20); + this.pnlmainbuttonactivated.TabIndex = 16; + this.pnlmainbuttonactivated.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetALButtonClickedColor); + // + // Label28 + // + this.Label28.AutoSize = true; + this.Label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label28.Location = new System.Drawing.Point(177, 7); + this.Label28.Name = "Label28"; + this.Label28.Size = new System.Drawing.Size(67, 16); + this.Label28.TabIndex = 15; + this.Label28.Text = "Activated:"; + // + // Label35 + // + this.Label35.AutoSize = true; + this.Label35.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label35.Location = new System.Drawing.Point(77, 103); + this.Label35.Name = "Label35"; + this.Label35.Size = new System.Drawing.Size(22, 16); + this.Label35.TabIndex = 14; + this.Label35.Text = "px"; + // + // txtapplicationsbuttonheight + // + this.txtapplicationsbuttonheight.BackColor = System.Drawing.Color.White; + this.txtapplicationsbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtapplicationsbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtapplicationsbuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtapplicationsbuttonheight.Location = new System.Drawing.Point(53, 101); + this.txtapplicationsbuttonheight.Name = "txtapplicationsbuttonheight"; + this.txtapplicationsbuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtapplicationsbuttonheight.TabIndex = 13; + this.txtapplicationsbuttonheight.TextChanged += new System.EventHandler(this.txtapplicationsbuttonheight_TextChanged); + // + // Label36 + // + this.Label36.AutoSize = true; + this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label36.Location = new System.Drawing.Point(2, 103); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(50, 16); + this.Label36.TabIndex = 12; + this.Label36.Text = "Height:"; + // + // pnlmainbuttoncolour + // + this.pnlmainbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmainbuttoncolour.Location = new System.Drawing.Point(128, 4); + this.pnlmainbuttoncolour.Name = "pnlmainbuttoncolour"; + this.pnlmainbuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlmainbuttoncolour.TabIndex = 1; + this.pnlmainbuttoncolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetALButtonColor); + // + // Label43 + // + this.Label43.AutoSize = true; + this.Label43.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label43.Location = new System.Drawing.Point(3, 7); + this.Label43.Name = "Label43"; + this.Label43.Size = new System.Drawing.Size(122, 16); + this.Label43.TabIndex = 0; + this.Label43.Text = "Main Button Colour:"; + // + // pnldesktopintro + // + this.pnldesktopintro.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktopintro.Controls.Add(this.Label69); + this.pnldesktopintro.Controls.Add(this.Label70); + this.pnldesktopintro.Location = new System.Drawing.Point(135, 159); + this.pnldesktopintro.Name = "pnldesktopintro"; + this.pnldesktopintro.Size = new System.Drawing.Size(317, 140); + this.pnldesktopintro.TabIndex = 17; + // + // Label69 + // + this.Label69.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label69.Location = new System.Drawing.Point(3, 20); + this.Label69.Name = "Label69"; + this.Label69.Size = new System.Drawing.Size(312, 113); + this.Label69.TabIndex = 1; + this.Label69.Text = "The Desktop Settings allow you to customize various desktop-related settings such" + + " as the desktop background. Go ahead and explore!"; + this.Label69.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label70 + // + this.Label70.AutoSize = true; + this.Label70.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label70.Location = new System.Drawing.Point(86, -2); + this.Label70.Name = "Label70"; + this.Label70.Size = new System.Drawing.Size(148, 20); + this.Label70.TabIndex = 0; + this.Label70.Text = "Desktop Settings"; + // + // pnlpanelbuttonsoptions + // + this.pnlpanelbuttonsoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlpanelbuttonsoptions.Controls.Add(this.pnlpanelbuttontextcolour); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label101); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontexttop); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label104); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontextside); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label106); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label93); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontop); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label94); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoninitalgap); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label108); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonicontop); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label110); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoniconside); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label112); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoniconsize); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label105); + this.pnlpanelbuttonsoptions.Controls.Add(this.cbpanelbuttontextstyle); + this.pnlpanelbuttonsoptions.Controls.Add(this.cbpanelbuttonfont); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label100); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpaneltextbuttonsize); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label102); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label103); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label98); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttongap); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label99); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label96); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonheight); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label97); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label92); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonwidth); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label91); + this.pnlpanelbuttonsoptions.Controls.Add(this.pnlpanelbuttoncolour); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label95); + this.pnlpanelbuttonsoptions.Location = new System.Drawing.Point(135, 159); + this.pnlpanelbuttonsoptions.Name = "pnlpanelbuttonsoptions"; + this.pnlpanelbuttonsoptions.Size = new System.Drawing.Size(317, 140); + this.pnlpanelbuttonsoptions.TabIndex = 10; + this.pnlpanelbuttonsoptions.Visible = false; + // + // pnlpanelbuttontextcolour + // + this.pnlpanelbuttontextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpanelbuttontextcolour.Location = new System.Drawing.Point(270, 57); + this.pnlpanelbuttontextcolour.Name = "pnlpanelbuttontextcolour"; + this.pnlpanelbuttontextcolour.Size = new System.Drawing.Size(41, 20); + this.pnlpanelbuttontextcolour.TabIndex = 50; + this.pnlpanelbuttontextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetPanelButtonTextColor); + // + // Label101 + // + this.Label101.AutoSize = true; + this.Label101.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label101.Location = new System.Drawing.Point(219, 59); + this.Label101.Name = "Label101"; + this.Label101.Size = new System.Drawing.Size(50, 16); + this.Label101.TabIndex = 49; + this.Label101.Text = "Colour:"; + // + // txtpanelbuttontexttop + // + this.txtpanelbuttontexttop.BackColor = System.Drawing.Color.White; + this.txtpanelbuttontexttop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttontexttop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttontexttop.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttontexttop.Location = new System.Drawing.Point(225, 82); + this.txtpanelbuttontexttop.Name = "txtpanelbuttontexttop"; + this.txtpanelbuttontexttop.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttontexttop.TabIndex = 48; + this.txtpanelbuttontexttop.TextChanged += new System.EventHandler(this.txtpanelbuttontexttop_TextChanged); + // + // Label104 + // + this.Label104.AutoSize = true; + this.Label104.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label104.Location = new System.Drawing.Point(191, 84); + this.Label104.Name = "Label104"; + this.Label104.Size = new System.Drawing.Size(36, 16); + this.Label104.TabIndex = 47; + this.Label104.Text = "Top:"; + // + // txtpanelbuttontextside + // + this.txtpanelbuttontextside.BackColor = System.Drawing.Color.White; + this.txtpanelbuttontextside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttontextside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttontextside.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttontextside.Location = new System.Drawing.Point(165, 82); + this.txtpanelbuttontextside.Name = "txtpanelbuttontextside"; + this.txtpanelbuttontextside.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttontextside.TabIndex = 46; + this.txtpanelbuttontextside.TextChanged += new System.EventHandler(this.txtpanelbuttontextside_TextChanged); + // + // Label106 + // + this.Label106.AutoSize = true; + this.Label106.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label106.Location = new System.Drawing.Point(128, 84); + this.Label106.Name = "Label106"; + this.Label106.Size = new System.Drawing.Size(39, 16); + this.Label106.TabIndex = 45; + this.Label106.Text = "Side:"; + // + // Label93 + // + this.Label93.AutoSize = true; + this.Label93.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label93.Location = new System.Drawing.Point(292, 7); + this.Label93.Name = "Label93"; + this.Label93.Size = new System.Drawing.Size(22, 16); + this.Label93.TabIndex = 43; + this.Label93.Text = "px"; + // + // txtpanelbuttontop + // + this.txtpanelbuttontop.BackColor = System.Drawing.Color.White; + this.txtpanelbuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttontop.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttontop.Location = new System.Drawing.Point(268, 5); + this.txtpanelbuttontop.Name = "txtpanelbuttontop"; + this.txtpanelbuttontop.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttontop.TabIndex = 42; + this.txtpanelbuttontop.TextChanged += new System.EventHandler(this.txtpanelbuttontop_TextChanged); + // + // Label94 + // + this.Label94.AutoSize = true; + this.Label94.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label94.Location = new System.Drawing.Point(233, 7); + this.Label94.Name = "Label94"; + this.Label94.Size = new System.Drawing.Size(36, 16); + this.Label94.TabIndex = 41; + this.Label94.Text = "Top:"; + // + // txtpanelbuttoninitalgap + // + this.txtpanelbuttoninitalgap.BackColor = System.Drawing.Color.White; + this.txtpanelbuttoninitalgap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttoninitalgap.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttoninitalgap.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttoninitalgap.Location = new System.Drawing.Point(207, 5); + this.txtpanelbuttoninitalgap.Name = "txtpanelbuttoninitalgap"; + this.txtpanelbuttoninitalgap.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttoninitalgap.TabIndex = 40; + this.txtpanelbuttoninitalgap.TextChanged += new System.EventHandler(this.txtpanelbuttoninitalgap_TextChanged); + // + // Label108 + // + this.Label108.AutoSize = true; + this.Label108.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label108.Location = new System.Drawing.Point(137, 7); + this.Label108.Name = "Label108"; + this.Label108.Size = new System.Drawing.Size(70, 16); + this.Label108.TabIndex = 39; + this.Label108.Text = "Initial Gap:"; + // + // txtpanelbuttonicontop + // + this.txtpanelbuttonicontop.BackColor = System.Drawing.Color.White; + this.txtpanelbuttonicontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttonicontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttonicontop.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttonicontop.Location = new System.Drawing.Point(287, 108); + this.txtpanelbuttonicontop.Name = "txtpanelbuttonicontop"; + this.txtpanelbuttonicontop.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttonicontop.TabIndex = 37; + this.txtpanelbuttonicontop.TextChanged += new System.EventHandler(this.txtpanelbuttonicontop_TextChanged); + // + // Label110 + // + this.Label110.AutoSize = true; + this.Label110.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label110.Location = new System.Drawing.Point(221, 110); + this.Label110.Name = "Label110"; + this.Label110.Size = new System.Drawing.Size(64, 16); + this.Label110.TabIndex = 36; + this.Label110.Text = "Icon Top:"; + // + // txtpanelbuttoniconside + // + this.txtpanelbuttoniconside.BackColor = System.Drawing.Color.White; + this.txtpanelbuttoniconside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttoniconside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttoniconside.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttoniconside.Location = new System.Drawing.Point(180, 108); + this.txtpanelbuttoniconside.Name = "txtpanelbuttoniconside"; + this.txtpanelbuttoniconside.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttoniconside.TabIndex = 34; + this.txtpanelbuttoniconside.TextChanged += new System.EventHandler(this.txtpanelbuttoniconside_TextChanged); + // + // Label112 + // + this.Label112.AutoSize = true; + this.Label112.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label112.Location = new System.Drawing.Point(113, 110); + this.Label112.Name = "Label112"; + this.Label112.Size = new System.Drawing.Size(67, 16); + this.Label112.TabIndex = 33; + this.Label112.Text = "Icon Side:"; + // + // txtpanelbuttoniconsize + // + this.txtpanelbuttoniconsize.BackColor = System.Drawing.Color.White; + this.txtpanelbuttoniconsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttoniconsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttoniconsize.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttoniconsize.Location = new System.Drawing.Point(70, 108); + this.txtpanelbuttoniconsize.Name = "txtpanelbuttoniconsize"; + this.txtpanelbuttoniconsize.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttoniconsize.TabIndex = 27; + this.txtpanelbuttoniconsize.TextChanged += new System.EventHandler(this.txtpanelbuttoniconsize_TextChanged); + // + // Label105 + // + this.Label105.AutoSize = true; + this.Label105.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label105.Location = new System.Drawing.Point(3, 110); + this.Label105.Name = "Label105"; + this.Label105.Size = new System.Drawing.Size(65, 16); + this.Label105.TabIndex = 26; + this.Label105.Text = "Icon Size:"; + // + // cbpanelbuttontextstyle + // + this.cbpanelbuttontextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbpanelbuttontextstyle.FormattingEnabled = true; + this.cbpanelbuttontextstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.cbpanelbuttontextstyle.Location = new System.Drawing.Point(46, 83); + this.cbpanelbuttontextstyle.Name = "cbpanelbuttontextstyle"; + this.cbpanelbuttontextstyle.Size = new System.Drawing.Size(80, 24); + this.cbpanelbuttontextstyle.TabIndex = 25; + this.cbpanelbuttontextstyle.SelectedIndexChanged += new System.EventHandler(this.cbpanelbuttontextstyle_SelectedIndexChanged); + // + // cbpanelbuttonfont + // + this.cbpanelbuttonfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbpanelbuttonfont.FormattingEnabled = true; + this.cbpanelbuttonfont.Location = new System.Drawing.Point(70, 56); + this.cbpanelbuttonfont.Name = "cbpanelbuttonfont"; + this.cbpanelbuttonfont.Size = new System.Drawing.Size(147, 24); + this.cbpanelbuttonfont.TabIndex = 24; + this.cbpanelbuttonfont.SelectedIndexChanged += new System.EventHandler(this.cbpanelbuttonfont_SelectedIndexChanged); + // + // Label100 + // + this.Label100.AutoSize = true; + this.Label100.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label100.Location = new System.Drawing.Point(3, 86); + this.Label100.Name = "Label100"; + this.Label100.Size = new System.Drawing.Size(41, 16); + this.Label100.TabIndex = 23; + this.Label100.Text = "Style:"; + // + // txtpaneltextbuttonsize + // + this.txtpaneltextbuttonsize.BackColor = System.Drawing.Color.White; + this.txtpaneltextbuttonsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpaneltextbuttonsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpaneltextbuttonsize.ForeColor = System.Drawing.Color.Black; + this.txtpaneltextbuttonsize.Location = new System.Drawing.Point(287, 82); + this.txtpaneltextbuttonsize.Name = "txtpaneltextbuttonsize"; + this.txtpaneltextbuttonsize.Size = new System.Drawing.Size(23, 22); + this.txtpaneltextbuttonsize.TabIndex = 21; + this.txtpaneltextbuttonsize.TextChanged += new System.EventHandler(this.txtpaneltextbuttonsize_TextChanged); + // + // Label102 + // + this.Label102.AutoSize = true; + this.Label102.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label102.Location = new System.Drawing.Point(252, 84); + this.Label102.Name = "Label102"; + this.Label102.Size = new System.Drawing.Size(37, 16); + this.Label102.TabIndex = 20; + this.Label102.Text = "Size:"; + // + // Label103 + // + this.Label103.AutoSize = true; + this.Label103.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label103.Location = new System.Drawing.Point(3, 60); + this.Label103.Name = "Label103"; + this.Label103.Size = new System.Drawing.Size(66, 16); + this.Label103.TabIndex = 19; + this.Label103.Text = "Text Font:"; + // + // Label98 + // + this.Label98.AutoSize = true; + this.Label98.BackColor = System.Drawing.Color.Transparent; + this.Label98.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label98.Location = new System.Drawing.Point(292, 33); + this.Label98.Name = "Label98"; + this.Label98.Size = new System.Drawing.Size(22, 16); + this.Label98.TabIndex = 14; + this.Label98.Text = "px"; + // + // txtpanelbuttongap + // + this.txtpanelbuttongap.BackColor = System.Drawing.Color.White; + this.txtpanelbuttongap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttongap.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttongap.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttongap.Location = new System.Drawing.Point(268, 31); + this.txtpanelbuttongap.Name = "txtpanelbuttongap"; + this.txtpanelbuttongap.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttongap.TabIndex = 13; + this.txtpanelbuttongap.TextChanged += new System.EventHandler(this.txtpanelbuttongap_TextChanged); + // + // Label99 + // + this.Label99.AutoSize = true; + this.Label99.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label99.Location = new System.Drawing.Point(232, 33); + this.Label99.Name = "Label99"; + this.Label99.Size = new System.Drawing.Size(37, 16); + this.Label99.TabIndex = 12; + this.Label99.Text = "Gap:"; + // + // Label96 + // + this.Label96.AutoSize = true; + this.Label96.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label96.Location = new System.Drawing.Point(209, 34); + this.Label96.Name = "Label96"; + this.Label96.Size = new System.Drawing.Size(22, 16); + this.Label96.TabIndex = 11; + this.Label96.Text = "px"; + // + // txtpanelbuttonheight + // + this.txtpanelbuttonheight.BackColor = System.Drawing.Color.White; + this.txtpanelbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttonheight.Location = new System.Drawing.Point(185, 32); + this.txtpanelbuttonheight.Name = "txtpanelbuttonheight"; + this.txtpanelbuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttonheight.TabIndex = 10; + this.txtpanelbuttonheight.TextChanged += new System.EventHandler(this.txtpanelbuttonheight_TextChanged); + // + // Label97 + // + this.Label97.AutoSize = true; + this.Label97.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label97.Location = new System.Drawing.Point(135, 34); + this.Label97.Name = "Label97"; + this.Label97.Size = new System.Drawing.Size(50, 16); + this.Label97.TabIndex = 9; + this.Label97.Text = "Height:"; + // + // Label92 + // + this.Label92.AutoSize = true; + this.Label92.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label92.Location = new System.Drawing.Point(114, 33); + this.Label92.Name = "Label92"; + this.Label92.Size = new System.Drawing.Size(22, 16); + this.Label92.TabIndex = 8; + this.Label92.Text = "px"; + // + // txtpanelbuttonwidth + // + this.txtpanelbuttonwidth.BackColor = System.Drawing.Color.White; + this.txtpanelbuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttonwidth.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttonwidth.Location = new System.Drawing.Point(88, 31); + this.txtpanelbuttonwidth.Name = "txtpanelbuttonwidth"; + this.txtpanelbuttonwidth.Size = new System.Drawing.Size(26, 22); + this.txtpanelbuttonwidth.TabIndex = 7; + this.txtpanelbuttonwidth.TextChanged += new System.EventHandler(this.txtpanelbuttonwidth_TextChanged); + // + // Label91 + // + this.Label91.AutoSize = true; + this.Label91.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label91.Location = new System.Drawing.Point(3, 33); + this.Label91.Name = "Label91"; + this.Label91.Size = new System.Drawing.Size(85, 16); + this.Label91.TabIndex = 6; + this.Label91.Text = "Button Width:"; + // + // pnlpanelbuttoncolour + // + this.pnlpanelbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpanelbuttoncolour.Location = new System.Drawing.Point(94, 5); + this.pnlpanelbuttoncolour.Name = "pnlpanelbuttoncolour"; + this.pnlpanelbuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlpanelbuttoncolour.TabIndex = 1; + this.pnlpanelbuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetPanelButtonColor); + // + // Label95 + // + this.Label95.AutoSize = true; + this.Label95.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label95.Location = new System.Drawing.Point(3, 7); + this.Label95.Name = "Label95"; + this.Label95.Size = new System.Drawing.Size(90, 16); + this.Label95.TabIndex = 0; + this.Label95.Text = "Button Colour:"; + // + // pnldesktopbackgroundoptions + // + this.pnldesktopbackgroundoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktopbackgroundoptions.Controls.Add(this.pnldesktopcolour); + this.pnldesktopbackgroundoptions.Controls.Add(this.Label45); + this.pnldesktopbackgroundoptions.Location = new System.Drawing.Point(135, 159); + this.pnldesktopbackgroundoptions.Name = "pnldesktopbackgroundoptions"; + this.pnldesktopbackgroundoptions.Size = new System.Drawing.Size(317, 140); + this.pnldesktopbackgroundoptions.TabIndex = 10; + this.pnldesktopbackgroundoptions.Visible = false; + // + // pnldesktopcolour + // + this.pnldesktopcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnldesktopcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnldesktopcolour.Location = new System.Drawing.Point(112, 5); + this.pnldesktopcolour.Name = "pnldesktopcolour"; + this.pnldesktopcolour.Size = new System.Drawing.Size(41, 20); + this.pnldesktopcolour.TabIndex = 3; + this.pnldesktopcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ChangeDesktopBackground); + // + // Label45 + // + this.Label45.AutoSize = true; + this.Label45.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label45.Location = new System.Drawing.Point(3, 7); + this.Label45.Name = "Label45"; + this.Label45.Size = new System.Drawing.Size(104, 16); + this.Label45.TabIndex = 2; + this.Label45.Text = "Desktop Colour:"; + // + // pnlpanelclockoptions + // + this.pnlpanelclockoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlpanelclockoptions.Controls.Add(this.pnlclockbackgroundcolour); + this.pnlpanelclockoptions.Controls.Add(this.Label44); + this.pnlpanelclockoptions.Controls.Add(this.comboclocktextstyle); + this.pnlpanelclockoptions.Controls.Add(this.comboclocktextfont); + this.pnlpanelclockoptions.Controls.Add(this.Label26); + this.pnlpanelclockoptions.Controls.Add(this.Label29); + this.pnlpanelclockoptions.Controls.Add(this.txtclocktextfromtop); + this.pnlpanelclockoptions.Controls.Add(this.Label30); + this.pnlpanelclockoptions.Controls.Add(this.Label31); + this.pnlpanelclockoptions.Controls.Add(this.txtclocktextsize); + this.pnlpanelclockoptions.Controls.Add(this.Label32); + this.pnlpanelclockoptions.Controls.Add(this.Label33); + this.pnlpanelclockoptions.Controls.Add(this.pnlpanelclocktextcolour); + this.pnlpanelclockoptions.Controls.Add(this.Label34); + this.pnlpanelclockoptions.Location = new System.Drawing.Point(135, 159); + this.pnlpanelclockoptions.Name = "pnlpanelclockoptions"; + this.pnlpanelclockoptions.Size = new System.Drawing.Size(317, 140); + this.pnlpanelclockoptions.TabIndex = 15; + this.pnlpanelclockoptions.Visible = false; + // + // pnlclockbackgroundcolour + // + this.pnlclockbackgroundcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlclockbackgroundcolour.Location = new System.Drawing.Point(261, 5); + this.pnlclockbackgroundcolour.Name = "pnlclockbackgroundcolour"; + this.pnlclockbackgroundcolour.Size = new System.Drawing.Size(41, 20); + this.pnlclockbackgroundcolour.TabIndex = 20; + this.pnlclockbackgroundcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetClockBG); + // + // Label44 + // + this.Label44.AutoSize = true; + this.Label44.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label44.Location = new System.Drawing.Point(173, 7); + this.Label44.Name = "Label44"; + this.Label44.Size = new System.Drawing.Size(84, 16); + this.Label44.TabIndex = 19; + this.Label44.Text = "Background:"; + // + // comboclocktextstyle + // + this.comboclocktextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboclocktextstyle.FormattingEnabled = true; + this.comboclocktextstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.comboclocktextstyle.Location = new System.Drawing.Point(209, 54); + this.comboclocktextstyle.Name = "comboclocktextstyle"; + this.comboclocktextstyle.Size = new System.Drawing.Size(99, 24); + this.comboclocktextstyle.TabIndex = 18; + this.comboclocktextstyle.SelectedIndexChanged += new System.EventHandler(this.comboclocktextstyle_SelectedIndexChanged); + // + // comboclocktextfont + // + this.comboclocktextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboclocktextfont.FormattingEnabled = true; + this.comboclocktextfont.Location = new System.Drawing.Point(114, 28); + this.comboclocktextfont.Name = "comboclocktextfont"; + this.comboclocktextfont.Size = new System.Drawing.Size(192, 24); + this.comboclocktextfont.TabIndex = 17; + this.comboclocktextfont.SelectedIndexChanged += new System.EventHandler(this.comboclocktextfont_SelectedIndexChanged); + // + // Label26 + // + this.Label26.AutoSize = true; + this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label26.Location = new System.Drawing.Point(166, 57); + this.Label26.Name = "Label26"; + this.Label26.Size = new System.Drawing.Size(41, 16); + this.Label26.TabIndex = 15; + this.Label26.Text = "Style:"; + // + // Label29 + // + this.Label29.AutoSize = true; + this.Label29.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label29.Location = new System.Drawing.Point(163, 82); + this.Label29.Name = "Label29"; + this.Label29.Size = new System.Drawing.Size(22, 16); + this.Label29.TabIndex = 11; + this.Label29.Text = "px"; + // + // txtclocktextfromtop + // + this.txtclocktextfromtop.BackColor = System.Drawing.Color.White; + this.txtclocktextfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclocktextfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclocktextfromtop.ForeColor = System.Drawing.Color.Black; + this.txtclocktextfromtop.Location = new System.Drawing.Point(139, 80); + this.txtclocktextfromtop.Name = "txtclocktextfromtop"; + this.txtclocktextfromtop.Size = new System.Drawing.Size(23, 22); + this.txtclocktextfromtop.TabIndex = 10; + this.txtclocktextfromtop.TextChanged += new System.EventHandler(this.txtclocktextfromtop_TextChanged); + // + // Label30 + // + this.Label30.AutoSize = true; + this.Label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label30.Location = new System.Drawing.Point(3, 82); + this.Label30.Name = "Label30"; + this.Label30.Size = new System.Drawing.Size(136, 16); + this.Label30.TabIndex = 9; + this.Label30.Text = "Clock Text From Top:"; + // + // Label31 + // + this.Label31.AutoSize = true; + this.Label31.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label31.Location = new System.Drawing.Point(138, 57); + this.Label31.Name = "Label31"; + this.Label31.Size = new System.Drawing.Size(22, 16); + this.Label31.TabIndex = 8; + this.Label31.Text = "px"; + // + // txtclocktextsize + // + this.txtclocktextsize.BackColor = System.Drawing.Color.White; + this.txtclocktextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclocktextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclocktextsize.ForeColor = System.Drawing.Color.Black; + this.txtclocktextsize.Location = new System.Drawing.Point(114, 55); + this.txtclocktextsize.Name = "txtclocktextsize"; + this.txtclocktextsize.Size = new System.Drawing.Size(23, 22); + this.txtclocktextsize.TabIndex = 7; + this.txtclocktextsize.Validated += new System.EventHandler(this.txtclocktextsize_TextChanged); + // + // Label32 + // + this.Label32.AutoSize = true; + this.Label32.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label32.Location = new System.Drawing.Point(3, 57); + this.Label32.Name = "Label32"; + this.Label32.Size = new System.Drawing.Size(103, 16); + this.Label32.TabIndex = 6; + this.Label32.Text = "Clock Text Size:"; + // + // Label33 + // + this.Label33.AutoSize = true; + this.Label33.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label33.Location = new System.Drawing.Point(3, 32); + this.Label33.Name = "Label33"; + this.Label33.Size = new System.Drawing.Size(103, 16); + this.Label33.TabIndex = 2; + this.Label33.Text = "Clock Text Font:"; + // + // pnlpanelclocktextcolour + // + this.pnlpanelclocktextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpanelclocktextcolour.Location = new System.Drawing.Point(121, 5); + this.pnlpanelclocktextcolour.Name = "pnlpanelclocktextcolour"; + this.pnlpanelclocktextcolour.Size = new System.Drawing.Size(41, 20); + this.pnlpanelclocktextcolour.TabIndex = 1; + this.pnlpanelclocktextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetClockTextColor); + // + // Label34 + // + this.Label34.AutoSize = true; + this.Label34.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label34.Location = new System.Drawing.Point(3, 7); + this.Label34.Name = "Label34"; + this.Label34.Size = new System.Drawing.Size(116, 16); + this.Label34.TabIndex = 0; + this.Label34.Text = "Clock Text Colour:"; + // + // pnldesktoppreview + // + this.pnldesktoppreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktoppreview.Controls.Add(this.predesktoppanel); + this.pnldesktoppreview.Location = new System.Drawing.Point(5, 3); + this.pnldesktoppreview.Name = "pnldesktoppreview"; + this.pnldesktoppreview.Size = new System.Drawing.Size(448, 148); + this.pnldesktoppreview.TabIndex = 0; + // + // predesktoppanel + // + this.predesktoppanel.BackColor = System.Drawing.Color.Gray; + this.predesktoppanel.Controls.Add(this.prepnlpanelbuttonholder); + this.predesktoppanel.Controls.Add(this.pretimepanel); + this.predesktoppanel.Controls.Add(this.preapplaunchermenuholder); + this.predesktoppanel.Dock = System.Windows.Forms.DockStyle.Top; + this.predesktoppanel.Location = new System.Drawing.Point(0, 0); + this.predesktoppanel.Name = "predesktoppanel"; + this.predesktoppanel.Size = new System.Drawing.Size(448, 25); + this.predesktoppanel.TabIndex = 1; + // + // prepnlpanelbuttonholder + // + this.prepnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; + this.prepnlpanelbuttonholder.Controls.Add(this.prepnlpanelbutton); + this.prepnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Fill; + this.prepnlpanelbuttonholder.Location = new System.Drawing.Point(116, 0); + this.prepnlpanelbuttonholder.Name = "prepnlpanelbuttonholder"; + this.prepnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); + this.prepnlpanelbuttonholder.Size = new System.Drawing.Size(235, 25); + this.prepnlpanelbuttonholder.TabIndex = 6; + // + // prepnlpanelbutton + // + this.prepnlpanelbutton.BackColor = System.Drawing.Color.Black; + this.prepnlpanelbutton.Controls.Add(this.pretbicon); + this.prepnlpanelbutton.Controls.Add(this.pretbctext); + this.prepnlpanelbutton.Location = new System.Drawing.Point(5, 3); + this.prepnlpanelbutton.Name = "prepnlpanelbutton"; + this.prepnlpanelbutton.Size = new System.Drawing.Size(126, 20); + this.prepnlpanelbutton.TabIndex = 18; + this.prepnlpanelbutton.Visible = false; + // + // pretbicon + // + this.pretbicon.BackColor = System.Drawing.Color.Transparent; + this.pretbicon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pretbicon.Location = new System.Drawing.Point(4, 2); + this.pretbicon.Name = "pretbicon"; + this.pretbicon.Size = new System.Drawing.Size(16, 16); + this.pretbicon.TabIndex = 1; + this.pretbicon.TabStop = false; + // + // pretbctext + // + this.pretbctext.AutoSize = true; + this.pretbctext.BackColor = System.Drawing.Color.Transparent; + this.pretbctext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pretbctext.ForeColor = System.Drawing.Color.White; + this.pretbctext.Location = new System.Drawing.Point(24, 2); + this.pretbctext.Name = "pretbctext"; + this.pretbctext.Size = new System.Drawing.Size(45, 16); + this.pretbctext.TabIndex = 0; + this.pretbctext.Text = "Shifter"; + // + // pretimepanel + // + this.pretimepanel.Controls.Add(this.prepaneltimetext); + this.pretimepanel.Dock = System.Windows.Forms.DockStyle.Right; + this.pretimepanel.Location = new System.Drawing.Point(351, 0); + this.pretimepanel.Name = "pretimepanel"; + this.pretimepanel.Size = new System.Drawing.Size(97, 25); + this.pretimepanel.TabIndex = 5; + // + // prepaneltimetext + // + this.prepaneltimetext.AutoSize = true; + this.prepaneltimetext.BackColor = System.Drawing.Color.Transparent; + this.prepaneltimetext.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.prepaneltimetext.Location = new System.Drawing.Point(5, 0); + this.prepaneltimetext.Name = "prepaneltimetext"; + this.prepaneltimetext.Size = new System.Drawing.Size(80, 24); + this.prepaneltimetext.TabIndex = 1; + this.prepaneltimetext.Text = "5000023"; + this.prepaneltimetext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // preapplaunchermenuholder + // + this.preapplaunchermenuholder.Controls.Add(this.predesktopappmenu); + this.preapplaunchermenuholder.Dock = System.Windows.Forms.DockStyle.Left; + this.preapplaunchermenuholder.Location = new System.Drawing.Point(0, 0); + this.preapplaunchermenuholder.Name = "preapplaunchermenuholder"; + this.preapplaunchermenuholder.Size = new System.Drawing.Size(116, 25); + this.preapplaunchermenuholder.TabIndex = 4; + // + // predesktopappmenu + // + this.predesktopappmenu.AutoSize = false; + this.predesktopappmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ApplicationsToolStripMenuItem}); + this.predesktopappmenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; + this.predesktopappmenu.Location = new System.Drawing.Point(0, 0); + this.predesktopappmenu.Name = "predesktopappmenu"; + this.predesktopappmenu.Padding = new System.Windows.Forms.Padding(0); + this.predesktopappmenu.Size = new System.Drawing.Size(116, 24); + this.predesktopappmenu.TabIndex = 0; + this.predesktopappmenu.Text = "MenuStrip1"; + // + // ApplicationsToolStripMenuItem + // + this.ApplicationsToolStripMenuItem.AutoSize = false; + this.ApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.KnowledgeInputToolStripMenuItem, + this.ShiftoriumToolStripMenuItem, + this.ClockToolStripMenuItem, + this.TerminalToolStripMenuItem, + this.ShifterToolStripMenuItem, + this.ToolStripSeparator1, + this.ShutdownToolStripMenuItem}); + this.ApplicationsToolStripMenuItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"; + this.ApplicationsToolStripMenuItem.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ApplicationsToolStripMenuItem.ShowShortcutKeys = false; + this.ApplicationsToolStripMenuItem.Size = new System.Drawing.Size(102, 24); + this.ApplicationsToolStripMenuItem.Text = "Applications"; + this.ApplicationsToolStripMenuItem.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; + this.ApplicationsToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // KnowledgeInputToolStripMenuItem + // + this.KnowledgeInputToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.KnowledgeInputToolStripMenuItem.Name = "KnowledgeInputToolStripMenuItem"; + this.KnowledgeInputToolStripMenuItem.ShowShortcutKeys = false; + this.KnowledgeInputToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.KnowledgeInputToolStripMenuItem.Text = "Knowledge Input"; + // + // ShiftoriumToolStripMenuItem + // + this.ShiftoriumToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShiftoriumToolStripMenuItem.Name = "ShiftoriumToolStripMenuItem"; + this.ShiftoriumToolStripMenuItem.ShowShortcutKeys = false; + this.ShiftoriumToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShiftoriumToolStripMenuItem.Text = "Shiftorium"; + // + // ClockToolStripMenuItem + // + this.ClockToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ClockToolStripMenuItem.Name = "ClockToolStripMenuItem"; + this.ClockToolStripMenuItem.ShowShortcutKeys = false; + this.ClockToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ClockToolStripMenuItem.Text = "Clock"; + // + // TerminalToolStripMenuItem + // + this.TerminalToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.TerminalToolStripMenuItem.Name = "TerminalToolStripMenuItem"; + this.TerminalToolStripMenuItem.ShowShortcutKeys = false; + this.TerminalToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.TerminalToolStripMenuItem.Text = "Terminal"; + // + // ShifterToolStripMenuItem + // + this.ShifterToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShifterToolStripMenuItem.Name = "ShifterToolStripMenuItem"; + this.ShifterToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShifterToolStripMenuItem.Text = "Shifter"; + // + // ToolStripSeparator1 + // + this.ToolStripSeparator1.BackColor = System.Drawing.Color.Transparent; + this.ToolStripSeparator1.ForeColor = System.Drawing.Color.White; + this.ToolStripSeparator1.Name = "ToolStripSeparator1"; + this.ToolStripSeparator1.Size = new System.Drawing.Size(178, 6); + // + // ShutdownToolStripMenuItem + // + this.ShutdownToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"; + this.ShutdownToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShutdownToolStripMenuItem.Text = "Shut Down"; + // + // Panel10 + // + this.Panel10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.Panel10.Controls.Add(this.btndesktopitself); + this.Panel10.Controls.Add(this.btnpanelclock); + this.Panel10.Controls.Add(this.btnapplauncher); + this.Panel10.Controls.Add(this.btndesktoppanel); + this.Panel10.Location = new System.Drawing.Point(1, 168); + this.Panel10.Name = "Panel10"; + this.Panel10.Size = new System.Drawing.Size(128, 135); + this.Panel10.TabIndex = 8; + // + // btndesktopitself + // + this.btndesktopitself.BackColor = System.Drawing.Color.White; + this.btndesktopitself.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndesktopitself.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndesktopitself.Location = new System.Drawing.Point(4, 105); + this.btndesktopitself.Name = "btndesktopitself"; + this.btndesktopitself.Size = new System.Drawing.Size(119, 29); + this.btndesktopitself.TabIndex = 7; + this.btndesktopitself.Text = "Desktop"; + this.btndesktopitself.UseVisualStyleBackColor = false; + this.btndesktopitself.Click += new System.EventHandler(this.btndesktopitself_Click); + // + // btnpanelclock + // + this.btnpanelclock.BackColor = System.Drawing.Color.White; + this.btnpanelclock.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpanelclock.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpanelclock.Location = new System.Drawing.Point(4, 70); + this.btnpanelclock.Name = "btnpanelclock"; + this.btnpanelclock.Size = new System.Drawing.Size(119, 29); + this.btnpanelclock.TabIndex = 6; + this.btnpanelclock.Text = "Panel Clock"; + this.btnpanelclock.UseVisualStyleBackColor = false; + this.btnpanelclock.Click += new System.EventHandler(this.btnpanelclock_Click); + // + // btnapplauncher + // + this.btnapplauncher.BackColor = System.Drawing.Color.White; + this.btnapplauncher.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapplauncher.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnapplauncher.Location = new System.Drawing.Point(4, 35); + this.btnapplauncher.Name = "btnapplauncher"; + this.btnapplauncher.Size = new System.Drawing.Size(119, 29); + this.btnapplauncher.TabIndex = 5; + this.btnapplauncher.Text = "App Launcher"; + this.btnapplauncher.UseVisualStyleBackColor = false; + this.btnapplauncher.Click += new System.EventHandler(this.btnapplauncher_Click); + // + // btndesktoppanel + // + this.btndesktoppanel.BackColor = System.Drawing.Color.White; + this.btndesktoppanel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndesktoppanel.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndesktoppanel.Location = new System.Drawing.Point(4, 0); + this.btndesktoppanel.Name = "btndesktoppanel"; + this.btndesktoppanel.Size = new System.Drawing.Size(119, 29); + this.btndesktoppanel.TabIndex = 4; + this.btndesktoppanel.Text = "Desktop Panel"; + this.btndesktoppanel.UseVisualStyleBackColor = false; + this.btndesktoppanel.Click += new System.EventHandler(this.btndesktoppanel_Click); + // + // txtpanelbuttoniconheight + // + this.txtpanelbuttoniconheight.Location = new System.Drawing.Point(0, 0); + this.txtpanelbuttoniconheight.Name = "txtpanelbuttoniconheight"; + this.txtpanelbuttoniconheight.Size = new System.Drawing.Size(100, 20); + this.txtpanelbuttoniconheight.TabIndex = 0; + // + // pnlwindowsoptions + // + this.pnlwindowsoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlwindowsoptions.BackColor = System.Drawing.Color.White; + this.pnlwindowsoptions.Controls.Add(this.pnlwindowsintro); + this.pnlwindowsoptions.Controls.Add(this.pnlbuttonoptions); + this.pnlwindowsoptions.Controls.Add(this.pnltitlebaroptions); + this.pnlwindowsoptions.Controls.Add(this.pnlborderoptions); + this.pnlwindowsoptions.Controls.Add(this.pnltitletextoptions); + this.pnlwindowsoptions.Controls.Add(this.pnlwindowsobjects); + this.pnlwindowsoptions.Controls.Add(this.pnlwindowpreview); + this.pnlwindowsoptions.Location = new System.Drawing.Point(134, 9); + this.pnlwindowsoptions.Name = "pnlwindowsoptions"; + this.pnlwindowsoptions.Size = new System.Drawing.Size(457, 306); + this.pnlwindowsoptions.TabIndex = 4; + // + // pnlwindowsintro + // + this.pnlwindowsintro.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlwindowsintro.Controls.Add(this.Label68); + this.pnlwindowsintro.Controls.Add(this.Label67); + this.pnlwindowsintro.Location = new System.Drawing.Point(135, 159); + this.pnlwindowsintro.Name = "pnlwindowsintro"; + this.pnlwindowsintro.Size = new System.Drawing.Size(325, 139); + this.pnlwindowsintro.TabIndex = 16; + // + // Label68 + // + this.Label68.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label68.Location = new System.Drawing.Point(3, 20); + this.Label68.Name = "Label68"; + this.Label68.Size = new System.Drawing.Size(312, 113); + this.Label68.TabIndex = 1; + this.Label68.Text = "Welcome to the Windows category. Here, you may skin various aspects of windows in" + + " ShiftOS."; + this.Label68.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.Label68.Click += new System.EventHandler(this.Label68_Click); + // + // Label67 + // + this.Label67.AutoSize = true; + this.Label67.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label67.Location = new System.Drawing.Point(89, -2); + this.Label67.Name = "Label67"; + this.Label67.Size = new System.Drawing.Size(143, 20); + this.Label67.TabIndex = 0; + this.Label67.Text = "Window Settings"; + // + // pnlbuttonoptions + // + this.pnlbuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlbuttonoptions.Controls.Add(this.pnlclosebuttonoptions); + this.pnlbuttonoptions.Controls.Add(this.pnlrollupbuttonoptions); + this.pnlbuttonoptions.Controls.Add(this.pnlminimizebuttonoptions); + this.pnlbuttonoptions.Controls.Add(this.combobuttonoption); + this.pnlbuttonoptions.Controls.Add(this.Label52); + this.pnlbuttonoptions.Location = new System.Drawing.Point(135, 159); + this.pnlbuttonoptions.Name = "pnlbuttonoptions"; + this.pnlbuttonoptions.Size = new System.Drawing.Size(325, 139); + this.pnlbuttonoptions.TabIndex = 10; + this.pnlbuttonoptions.Visible = false; + // + // pnlclosebuttonoptions + // + this.pnlclosebuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlclosebuttonoptions.Controls.Add(this.Label8); + this.pnlclosebuttonoptions.Controls.Add(this.Label11); + this.pnlclosebuttonoptions.Controls.Add(this.pnlclosebuttoncolour); + this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonfromside); + this.pnlclosebuttonoptions.Controls.Add(this.Label7); + this.pnlclosebuttonoptions.Controls.Add(this.Label12); + this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonheight); + this.pnlclosebuttonoptions.Controls.Add(this.Label13); + this.pnlclosebuttonoptions.Controls.Add(this.Label6); + this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonfromtop); + this.pnlclosebuttonoptions.Controls.Add(this.Label10); + this.pnlclosebuttonoptions.Controls.Add(this.Label14); + this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonwidth); + this.pnlclosebuttonoptions.Controls.Add(this.Label9); + this.pnlclosebuttonoptions.Location = new System.Drawing.Point(4, 29); + this.pnlclosebuttonoptions.Name = "pnlclosebuttonoptions"; + this.pnlclosebuttonoptions.Size = new System.Drawing.Size(311, 105); + this.pnlclosebuttonoptions.TabIndex = 15; + this.pnlclosebuttonoptions.Visible = false; + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label8.Location = new System.Drawing.Point(3, 6); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(128, 16); + this.Label8.TabIndex = 0; + this.Label8.Text = "Close Button Colour:"; + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label11.Location = new System.Drawing.Point(177, 82); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(22, 16); + this.Label11.TabIndex = 14; + this.Label11.Text = "px"; + // + // pnlclosebuttoncolour + // + this.pnlclosebuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlclosebuttoncolour.Location = new System.Drawing.Point(132, 4); + this.pnlclosebuttoncolour.Name = "pnlclosebuttoncolour"; + this.pnlclosebuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlclosebuttoncolour.TabIndex = 1; + this.pnlclosebuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetcloseColor); + // + // txtclosebuttonfromside + // + this.txtclosebuttonfromside.BackColor = System.Drawing.Color.White; + this.txtclosebuttonfromside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclosebuttonfromside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclosebuttonfromside.ForeColor = System.Drawing.Color.Black; + this.txtclosebuttonfromside.Location = new System.Drawing.Point(153, 80); + this.txtclosebuttonfromside.Name = "txtclosebuttonfromside"; + this.txtclosebuttonfromside.Size = new System.Drawing.Size(23, 22); + this.txtclosebuttonfromside.TabIndex = 13; + this.txtclosebuttonfromside.TextChanged += new System.EventHandler(this.txtclosebuttonfromside_TextChanged); + // + // Label7 + // + this.Label7.AutoSize = true; + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(3, 32); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(128, 16); + this.Label7.TabIndex = 2; + this.Label7.Text = "Close Button Height:"; + // + // Label12 + // + this.Label12.AutoSize = true; + this.Label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label12.Location = new System.Drawing.Point(3, 82); + this.Label12.Name = "Label12"; + this.Label12.Size = new System.Drawing.Size(151, 16); + this.Label12.TabIndex = 12; + this.Label12.Text = "Close Button From Side:"; + // + // txtclosebuttonheight + // + this.txtclosebuttonheight.BackColor = System.Drawing.Color.White; + this.txtclosebuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclosebuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclosebuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtclosebuttonheight.Location = new System.Drawing.Point(132, 30); + this.txtclosebuttonheight.Name = "txtclosebuttonheight"; + this.txtclosebuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtclosebuttonheight.TabIndex = 4; + this.txtclosebuttonheight.TextChanged += new System.EventHandler(this.txtclosebuttonheight_TextChanged); + // + // Label13 + // + this.Label13.AutoSize = true; + this.Label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label13.Location = new System.Drawing.Point(177, 57); + this.Label13.Name = "Label13"; + this.Label13.Size = new System.Drawing.Size(22, 16); + this.Label13.TabIndex = 11; + this.Label13.Text = "px"; + // + // Label6 + // + this.Label6.AutoSize = true; + this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(156, 32); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(22, 16); + this.Label6.TabIndex = 5; + this.Label6.Text = "px"; + // + // txtclosebuttonfromtop + // + this.txtclosebuttonfromtop.BackColor = System.Drawing.Color.White; + this.txtclosebuttonfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclosebuttonfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclosebuttonfromtop.ForeColor = System.Drawing.Color.Black; + this.txtclosebuttonfromtop.Location = new System.Drawing.Point(153, 55); + this.txtclosebuttonfromtop.Name = "txtclosebuttonfromtop"; + this.txtclosebuttonfromtop.Size = new System.Drawing.Size(23, 22); + this.txtclosebuttonfromtop.TabIndex = 10; + this.txtclosebuttonfromtop.TextChanged += new System.EventHandler(this.txtclosebuttonfromtop_TextChanged); + // + // Label10 + // + this.Label10.AutoSize = true; + this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label10.Location = new System.Drawing.Point(184, 32); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(45, 16); + this.Label10.TabIndex = 6; + this.Label10.Text = "Width:"; + // + // Label14 + // + this.Label14.AutoSize = true; + this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label14.Location = new System.Drawing.Point(3, 57); + this.Label14.Name = "Label14"; + this.Label14.Size = new System.Drawing.Size(148, 16); + this.Label14.TabIndex = 9; + this.Label14.Text = "Close Button From Top:"; + // + // txtclosebuttonwidth + // + this.txtclosebuttonwidth.BackColor = System.Drawing.Color.White; + this.txtclosebuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclosebuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclosebuttonwidth.ForeColor = System.Drawing.Color.Black; + this.txtclosebuttonwidth.Location = new System.Drawing.Point(234, 30); + this.txtclosebuttonwidth.Name = "txtclosebuttonwidth"; + this.txtclosebuttonwidth.Size = new System.Drawing.Size(23, 22); + this.txtclosebuttonwidth.TabIndex = 7; + this.txtclosebuttonwidth.TextChanged += new System.EventHandler(this.txtclosebuttonwidth_TextChanged); + // + // Label9 + // + this.Label9.AutoSize = true; + this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label9.Location = new System.Drawing.Point(258, 32); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(22, 16); + this.Label9.TabIndex = 8; + this.Label9.Text = "px"; + // + // pnlrollupbuttonoptions + // + this.pnlrollupbuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlrollupbuttonoptions.Controls.Add(this.Label54); + this.pnlrollupbuttonoptions.Controls.Add(this.Label55); + this.pnlrollupbuttonoptions.Controls.Add(this.pnlrollupbuttoncolour); + this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonside); + this.pnlrollupbuttonoptions.Controls.Add(this.Label56); + this.pnlrollupbuttonoptions.Controls.Add(this.Label57); + this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonheight); + this.pnlrollupbuttonoptions.Controls.Add(this.Label58); + this.pnlrollupbuttonoptions.Controls.Add(this.Label59); + this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttontop); + this.pnlrollupbuttonoptions.Controls.Add(this.Label60); + this.pnlrollupbuttonoptions.Controls.Add(this.Label61); + this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonwidth); + this.pnlrollupbuttonoptions.Controls.Add(this.Label62); + this.pnlrollupbuttonoptions.Location = new System.Drawing.Point(4, 29); + this.pnlrollupbuttonoptions.Name = "pnlrollupbuttonoptions"; + this.pnlrollupbuttonoptions.Size = new System.Drawing.Size(311, 105); + this.pnlrollupbuttonoptions.TabIndex = 16; + this.pnlrollupbuttonoptions.Visible = false; + // + // Label54 + // + this.Label54.AutoSize = true; + this.Label54.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label54.Location = new System.Drawing.Point(3, 6); + this.Label54.Name = "Label54"; + this.Label54.Size = new System.Drawing.Size(138, 16); + this.Label54.TabIndex = 0; + this.Label54.Text = "Roll Up Button Colour:"; + // + // Label55 + // + this.Label55.AutoSize = true; + this.Label55.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label55.Location = new System.Drawing.Point(188, 82); + this.Label55.Name = "Label55"; + this.Label55.Size = new System.Drawing.Size(22, 16); + this.Label55.TabIndex = 14; + this.Label55.Text = "px"; + // + // pnlrollupbuttoncolour + // + this.pnlrollupbuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlrollupbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlrollupbuttoncolour.Location = new System.Drawing.Point(143, 4); + this.pnlrollupbuttoncolour.Name = "pnlrollupbuttoncolour"; + this.pnlrollupbuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlrollupbuttoncolour.TabIndex = 1; + this.pnlrollupbuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetrollupColor); + // + // txtrollupbuttonside + // + this.txtrollupbuttonside.BackColor = System.Drawing.Color.White; + this.txtrollupbuttonside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrollupbuttonside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtrollupbuttonside.ForeColor = System.Drawing.Color.Black; + this.txtrollupbuttonside.Location = new System.Drawing.Point(164, 80); + this.txtrollupbuttonside.Name = "txtrollupbuttonside"; + this.txtrollupbuttonside.Size = new System.Drawing.Size(23, 22); + this.txtrollupbuttonside.TabIndex = 13; + this.txtrollupbuttonside.TextChanged += new System.EventHandler(this.txtrollupbuttonside_TextChanged); + // + // Label56 + // + this.Label56.AutoSize = true; + this.Label56.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label56.Location = new System.Drawing.Point(3, 32); + this.Label56.Name = "Label56"; + this.Label56.Size = new System.Drawing.Size(138, 16); + this.Label56.TabIndex = 2; + this.Label56.Text = "Roll Up Button Height:"; + // + // Label57 + // + this.Label57.AutoSize = true; + this.Label57.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label57.Location = new System.Drawing.Point(3, 82); + this.Label57.Name = "Label57"; + this.Label57.Size = new System.Drawing.Size(161, 16); + this.Label57.TabIndex = 12; + this.Label57.Text = "Roll Up Button From Side:"; + // + // txtrollupbuttonheight + // + this.txtrollupbuttonheight.BackColor = System.Drawing.Color.White; + this.txtrollupbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrollupbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtrollupbuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtrollupbuttonheight.Location = new System.Drawing.Point(143, 30); + this.txtrollupbuttonheight.Name = "txtrollupbuttonheight"; + this.txtrollupbuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtrollupbuttonheight.TabIndex = 4; + this.txtrollupbuttonheight.TextChanged += new System.EventHandler(this.txtrollupbuttonheight_TextChanged); + // + // Label58 + // + this.Label58.AutoSize = true; + this.Label58.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label58.Location = new System.Drawing.Point(188, 57); + this.Label58.Name = "Label58"; + this.Label58.Size = new System.Drawing.Size(22, 16); + this.Label58.TabIndex = 11; + this.Label58.Text = "px"; + // + // Label59 + // + this.Label59.AutoSize = true; + this.Label59.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label59.Location = new System.Drawing.Point(167, 32); + this.Label59.Name = "Label59"; + this.Label59.Size = new System.Drawing.Size(22, 16); + this.Label59.TabIndex = 5; + this.Label59.Text = "px"; + // + // txtrollupbuttontop + // + this.txtrollupbuttontop.BackColor = System.Drawing.Color.White; + this.txtrollupbuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrollupbuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtrollupbuttontop.ForeColor = System.Drawing.Color.Black; + this.txtrollupbuttontop.Location = new System.Drawing.Point(164, 55); + this.txtrollupbuttontop.Name = "txtrollupbuttontop"; + this.txtrollupbuttontop.Size = new System.Drawing.Size(23, 22); + this.txtrollupbuttontop.TabIndex = 10; + this.txtrollupbuttontop.TextChanged += new System.EventHandler(this.txtrollupbuttontop_TextChanged); + // + // Label60 + // + this.Label60.AutoSize = true; + this.Label60.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label60.Location = new System.Drawing.Point(195, 32); + this.Label60.Name = "Label60"; + this.Label60.Size = new System.Drawing.Size(45, 16); + this.Label60.TabIndex = 6; + this.Label60.Text = "Width:"; + // + // Label61 + // + this.Label61.AutoSize = true; + this.Label61.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label61.Location = new System.Drawing.Point(3, 57); + this.Label61.Name = "Label61"; + this.Label61.Size = new System.Drawing.Size(158, 16); + this.Label61.TabIndex = 9; + this.Label61.Text = "Roll Up Button From Top:"; + // + // txtrollupbuttonwidth + // + this.txtrollupbuttonwidth.BackColor = System.Drawing.Color.White; + this.txtrollupbuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrollupbuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtrollupbuttonwidth.ForeColor = System.Drawing.Color.Black; + this.txtrollupbuttonwidth.Location = new System.Drawing.Point(245, 30); + this.txtrollupbuttonwidth.Name = "txtrollupbuttonwidth"; + this.txtrollupbuttonwidth.Size = new System.Drawing.Size(23, 22); + this.txtrollupbuttonwidth.TabIndex = 7; + this.txtrollupbuttonwidth.TextChanged += new System.EventHandler(this.txtrollupbuttonwidth_TextChanged); + // + // Label62 + // + this.Label62.AutoSize = true; + this.Label62.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label62.Location = new System.Drawing.Point(269, 32); + this.Label62.Name = "Label62"; + this.Label62.Size = new System.Drawing.Size(22, 16); + this.Label62.TabIndex = 8; + this.Label62.Text = "px"; + // + // pnlminimizebuttonoptions + // + this.pnlminimizebuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlminimizebuttonoptions.Controls.Add(this.Label82); + this.pnlminimizebuttonoptions.Controls.Add(this.Label83); + this.pnlminimizebuttonoptions.Controls.Add(this.pnlminimizebuttoncolour); + this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonside); + this.pnlminimizebuttonoptions.Controls.Add(this.Label84); + this.pnlminimizebuttonoptions.Controls.Add(this.Label85); + this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonheight); + this.pnlminimizebuttonoptions.Controls.Add(this.Label86); + this.pnlminimizebuttonoptions.Controls.Add(this.Label87); + this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttontop); + this.pnlminimizebuttonoptions.Controls.Add(this.Label88); + this.pnlminimizebuttonoptions.Controls.Add(this.Label89); + this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonwidth); + this.pnlminimizebuttonoptions.Controls.Add(this.Label90); + this.pnlminimizebuttonoptions.Location = new System.Drawing.Point(4, 29); + this.pnlminimizebuttonoptions.Name = "pnlminimizebuttonoptions"; + this.pnlminimizebuttonoptions.Size = new System.Drawing.Size(311, 105); + this.pnlminimizebuttonoptions.TabIndex = 18; + this.pnlminimizebuttonoptions.Visible = false; + // + // Label82 + // + this.Label82.AutoSize = true; + this.Label82.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label82.Location = new System.Drawing.Point(3, 6); + this.Label82.Name = "Label82"; + this.Label82.Size = new System.Drawing.Size(145, 16); + this.Label82.TabIndex = 0; + this.Label82.Text = "Minimize Button Colour:"; + // + // Label83 + // + this.Label83.AutoSize = true; + this.Label83.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label83.Location = new System.Drawing.Point(196, 82); + this.Label83.Name = "Label83"; + this.Label83.Size = new System.Drawing.Size(22, 16); + this.Label83.TabIndex = 14; + this.Label83.Text = "px"; + // + // pnlminimizebuttoncolour + // + this.pnlminimizebuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlminimizebuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlminimizebuttoncolour.Location = new System.Drawing.Point(149, 4); + this.pnlminimizebuttoncolour.Name = "pnlminimizebuttoncolour"; + this.pnlminimizebuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlminimizebuttoncolour.TabIndex = 1; + this.pnlminimizebuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetMinimizeColor); + // + // txtminimizebuttonside + // + this.txtminimizebuttonside.BackColor = System.Drawing.Color.White; + this.txtminimizebuttonside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtminimizebuttonside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtminimizebuttonside.ForeColor = System.Drawing.Color.Black; + this.txtminimizebuttonside.Location = new System.Drawing.Point(172, 80); + this.txtminimizebuttonside.Name = "txtminimizebuttonside"; + this.txtminimizebuttonside.Size = new System.Drawing.Size(23, 22); + this.txtminimizebuttonside.TabIndex = 13; + this.txtminimizebuttonside.TextChanged += new System.EventHandler(this.txtminimizebuttonside_TextChanged); + // + // Label84 + // + this.Label84.AutoSize = true; + this.Label84.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label84.Location = new System.Drawing.Point(3, 32); + this.Label84.Name = "Label84"; + this.Label84.Size = new System.Drawing.Size(145, 16); + this.Label84.TabIndex = 2; + this.Label84.Text = "Minimize Button Height:"; + // + // Label85 + // + this.Label85.AutoSize = true; + this.Label85.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label85.Location = new System.Drawing.Point(3, 82); + this.Label85.Name = "Label85"; + this.Label85.Size = new System.Drawing.Size(168, 16); + this.Label85.TabIndex = 12; + this.Label85.Text = "Minimize Button From Side:"; + // + // txtminimizebuttonheight + // + this.txtminimizebuttonheight.BackColor = System.Drawing.Color.White; + this.txtminimizebuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtminimizebuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtminimizebuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtminimizebuttonheight.Location = new System.Drawing.Point(150, 30); + this.txtminimizebuttonheight.Name = "txtminimizebuttonheight"; + this.txtminimizebuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtminimizebuttonheight.TabIndex = 4; + this.txtminimizebuttonheight.TextChanged += new System.EventHandler(this.txtminimizebuttonheight_TextChanged); + // + // Label86 + // + this.Label86.AutoSize = true; + this.Label86.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label86.Location = new System.Drawing.Point(196, 57); + this.Label86.Name = "Label86"; + this.Label86.Size = new System.Drawing.Size(22, 16); + this.Label86.TabIndex = 11; + this.Label86.Text = "px"; + // + // Label87 + // + this.Label87.AutoSize = true; + this.Label87.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label87.Location = new System.Drawing.Point(174, 32); + this.Label87.Name = "Label87"; + this.Label87.Size = new System.Drawing.Size(22, 16); + this.Label87.TabIndex = 5; + this.Label87.Text = "px"; + // + // txtminimizebuttontop + // + this.txtminimizebuttontop.BackColor = System.Drawing.Color.White; + this.txtminimizebuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtminimizebuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtminimizebuttontop.ForeColor = System.Drawing.Color.Black; + this.txtminimizebuttontop.Location = new System.Drawing.Point(172, 55); + this.txtminimizebuttontop.Name = "txtminimizebuttontop"; + this.txtminimizebuttontop.Size = new System.Drawing.Size(23, 22); + this.txtminimizebuttontop.TabIndex = 10; + this.txtminimizebuttontop.TextChanged += new System.EventHandler(this.txtminimizebuttontop_TextChanged); + // + // Label88 + // + this.Label88.AutoSize = true; + this.Label88.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label88.Location = new System.Drawing.Point(198, 32); + this.Label88.Name = "Label88"; + this.Label88.Size = new System.Drawing.Size(45, 16); + this.Label88.TabIndex = 6; + this.Label88.Text = "Width:"; + // + // Label89 + // + this.Label89.AutoSize = true; + this.Label89.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label89.Location = new System.Drawing.Point(3, 57); + this.Label89.Name = "Label89"; + this.Label89.Size = new System.Drawing.Size(165, 16); + this.Label89.TabIndex = 9; + this.Label89.Text = "Minimize Button From Top:"; + // + // txtminimizebuttonwidth + // + this.txtminimizebuttonwidth.BackColor = System.Drawing.Color.White; + this.txtminimizebuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtminimizebuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtminimizebuttonwidth.ForeColor = System.Drawing.Color.Black; + this.txtminimizebuttonwidth.Location = new System.Drawing.Point(247, 30); + this.txtminimizebuttonwidth.Name = "txtminimizebuttonwidth"; + this.txtminimizebuttonwidth.Size = new System.Drawing.Size(23, 22); + this.txtminimizebuttonwidth.TabIndex = 7; + this.txtminimizebuttonwidth.TextChanged += new System.EventHandler(this.txtminimizebuttonwidth_TextChanged); + // + // Label90 + // + this.Label90.AutoSize = true; + this.Label90.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label90.Location = new System.Drawing.Point(269, 32); + this.Label90.Name = "Label90"; + this.Label90.Size = new System.Drawing.Size(22, 16); + this.Label90.TabIndex = 8; + this.Label90.Text = "px"; + // + // combobuttonoption + // + this.combobuttonoption.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combobuttonoption.FormattingEnabled = true; + this.combobuttonoption.Items.AddRange(new object[] { + "Close Button", + "Roll Up Button"}); + this.combobuttonoption.Location = new System.Drawing.Point(157, 4); + this.combobuttonoption.Name = "combobuttonoption"; + this.combobuttonoption.Size = new System.Drawing.Size(121, 24); + this.combobuttonoption.TabIndex = 17; + this.combobuttonoption.SelectedIndexChanged += new System.EventHandler(this.combobuttonoption_SelectedIndexChanged); + // + // Label52 + // + this.Label52.AutoSize = true; + this.Label52.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label52.Location = new System.Drawing.Point(40, 6); + this.Label52.Name = "Label52"; + this.Label52.Size = new System.Drawing.Size(111, 16); + this.Label52.TabIndex = 15; + this.Label52.Text = "Button To Modify:"; + // + // pnltitlebaroptions + // + this.pnltitlebaroptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnltitlebaroptions.Controls.Add(this.Label80); + this.pnltitlebaroptions.Controls.Add(this.txticonfromtop); + this.pnltitlebaroptions.Controls.Add(this.Label81); + this.pnltitlebaroptions.Controls.Add(this.Label78); + this.pnltitlebaroptions.Controls.Add(this.txticonfromside); + this.pnltitlebaroptions.Controls.Add(this.Label79); + this.pnltitlebaroptions.Controls.Add(this.lbcornerwidthpx); + this.pnltitlebaroptions.Controls.Add(this.txttitlebarcornerwidth); + this.pnltitlebaroptions.Controls.Add(this.lbcornerwidth); + this.pnltitlebaroptions.Controls.Add(this.pnltitlebarrightcornercolour); + this.pnltitlebaroptions.Controls.Add(this.pnltitlebarleftcornercolour); + this.pnltitlebaroptions.Controls.Add(this.lbrightcornercolor); + this.pnltitlebaroptions.Controls.Add(this.lbleftcornercolor); + this.pnltitlebaroptions.Controls.Add(this.cboxtitlebarcorners); + this.pnltitlebaroptions.Controls.Add(this.Label5); + this.pnltitlebaroptions.Controls.Add(this.txttitlebarheight); + this.pnltitlebaroptions.Controls.Add(this.Label4); + this.pnltitlebaroptions.Controls.Add(this.pnltitlebarcolour); + this.pnltitlebaroptions.Controls.Add(this.Label2); + this.pnltitlebaroptions.Location = new System.Drawing.Point(135, 159); + this.pnltitlebaroptions.Name = "pnltitlebaroptions"; + this.pnltitlebaroptions.Size = new System.Drawing.Size(325, 139); + this.pnltitlebaroptions.TabIndex = 9; + this.pnltitlebaroptions.Visible = false; + // + // Label80 + // + this.Label80.AutoSize = true; + this.Label80.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label80.Location = new System.Drawing.Point(277, 105); + this.Label80.Name = "Label80"; + this.Label80.Size = new System.Drawing.Size(22, 16); + this.Label80.TabIndex = 19; + this.Label80.Text = "px"; + // + // txticonfromtop + // + this.txticonfromtop.BackColor = System.Drawing.Color.White; + this.txticonfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txticonfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txticonfromtop.ForeColor = System.Drawing.Color.Black; + this.txticonfromtop.Location = new System.Drawing.Point(253, 103); + this.txticonfromtop.Name = "txticonfromtop"; + this.txticonfromtop.Size = new System.Drawing.Size(23, 22); + this.txticonfromtop.TabIndex = 18; + this.txticonfromtop.TextChanged += new System.EventHandler(this.txticonfromtop_TextChanged); + // + // Label81 + // + this.Label81.AutoSize = true; + this.Label81.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label81.Location = new System.Drawing.Point(157, 105); + this.Label81.Name = "Label81"; + this.Label81.Size = new System.Drawing.Size(98, 16); + this.Label81.TabIndex = 17; + this.Label81.Text = "Icon From Top:"; + // + // Label78 + // + this.Label78.AutoSize = true; + this.Label78.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label78.Location = new System.Drawing.Point(128, 105); + this.Label78.Name = "Label78"; + this.Label78.Size = new System.Drawing.Size(22, 16); + this.Label78.TabIndex = 16; + this.Label78.Text = "px"; + // + // txticonfromside + // + this.txticonfromside.BackColor = System.Drawing.Color.White; + this.txticonfromside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txticonfromside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txticonfromside.ForeColor = System.Drawing.Color.Black; + this.txticonfromside.Location = new System.Drawing.Point(104, 103); + this.txticonfromside.Name = "txticonfromside"; + this.txticonfromside.Size = new System.Drawing.Size(23, 22); + this.txticonfromside.TabIndex = 15; + this.txticonfromside.TextChanged += new System.EventHandler(this.txticonfromside_TextChanged); + // + // Label79 + // + this.Label79.AutoSize = true; + this.Label79.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label79.Location = new System.Drawing.Point(3, 105); + this.Label79.Name = "Label79"; + this.Label79.Size = new System.Drawing.Size(101, 16); + this.Label79.TabIndex = 14; + this.Label79.Text = "Icon From Side:"; + // + // lbcornerwidthpx + // + this.lbcornerwidthpx.AutoSize = true; + this.lbcornerwidthpx.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcornerwidthpx.Location = new System.Drawing.Point(277, 32); + this.lbcornerwidthpx.Name = "lbcornerwidthpx"; + this.lbcornerwidthpx.Size = new System.Drawing.Size(22, 16); + this.lbcornerwidthpx.TabIndex = 13; + this.lbcornerwidthpx.Text = "px"; + // + // txttitlebarcornerwidth + // + this.txttitlebarcornerwidth.BackColor = System.Drawing.Color.White; + this.txttitlebarcornerwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitlebarcornerwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitlebarcornerwidth.ForeColor = System.Drawing.Color.Black; + this.txttitlebarcornerwidth.Location = new System.Drawing.Point(253, 30); + this.txttitlebarcornerwidth.Name = "txttitlebarcornerwidth"; + this.txttitlebarcornerwidth.Size = new System.Drawing.Size(23, 22); + this.txttitlebarcornerwidth.TabIndex = 12; + this.txttitlebarcornerwidth.TextChanged += new System.EventHandler(this.txttitlebarcornerwidth_TextChanged); + // + // lbcornerwidth + // + this.lbcornerwidth.AutoSize = true; + this.lbcornerwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcornerwidth.Location = new System.Drawing.Point(163, 32); + this.lbcornerwidth.Name = "lbcornerwidth"; + this.lbcornerwidth.Size = new System.Drawing.Size(88, 16); + this.lbcornerwidth.TabIndex = 11; + this.lbcornerwidth.Text = "Corner Width:"; + // + // pnltitlebarrightcornercolour + // + this.pnltitlebarrightcornercolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnltitlebarrightcornercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltitlebarrightcornercolour.Location = new System.Drawing.Point(136, 80); + this.pnltitlebarrightcornercolour.Name = "pnltitlebarrightcornercolour"; + this.pnltitlebarrightcornercolour.Size = new System.Drawing.Size(41, 20); + this.pnltitlebarrightcornercolour.TabIndex = 10; + this.pnltitlebarrightcornercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetRightCornerColor); + // + // pnltitlebarleftcornercolour + // + this.pnltitlebarleftcornercolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnltitlebarleftcornercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltitlebarleftcornercolour.Location = new System.Drawing.Point(126, 56); + this.pnltitlebarleftcornercolour.Name = "pnltitlebarleftcornercolour"; + this.pnltitlebarleftcornercolour.Size = new System.Drawing.Size(41, 20); + this.pnltitlebarleftcornercolour.TabIndex = 8; + this.pnltitlebarleftcornercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetLeftCornerColor); + // + // lbrightcornercolor + // + this.lbrightcornercolor.AutoSize = true; + this.lbrightcornercolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbrightcornercolor.Location = new System.Drawing.Point(3, 81); + this.lbrightcornercolor.Name = "lbrightcornercolor"; + this.lbrightcornercolor.Size = new System.Drawing.Size(127, 16); + this.lbrightcornercolor.TabIndex = 9; + this.lbrightcornercolor.Text = "Right Corner Colour:"; + // + // lbleftcornercolor + // + this.lbleftcornercolor.AutoSize = true; + this.lbleftcornercolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbleftcornercolor.Location = new System.Drawing.Point(3, 57); + this.lbleftcornercolor.Name = "lbleftcornercolor"; + this.lbleftcornercolor.Size = new System.Drawing.Size(117, 16); + this.lbleftcornercolor.TabIndex = 7; + this.lbleftcornercolor.Text = "Left Corner Colour:"; + // + // cboxtitlebarcorners + // + this.cboxtitlebarcorners.AutoSize = true; + this.cboxtitlebarcorners.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.cboxtitlebarcorners.FlatAppearance.CheckedBackColor = System.Drawing.Color.Black; + this.cboxtitlebarcorners.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cboxtitlebarcorners.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F); + this.cboxtitlebarcorners.Location = new System.Drawing.Point(166, 4); + this.cboxtitlebarcorners.Name = "cboxtitlebarcorners"; + this.cboxtitlebarcorners.Size = new System.Drawing.Size(131, 21); + this.cboxtitlebarcorners.TabIndex = 6; + this.cboxtitlebarcorners.Text = "Title Bar Corners"; + this.cboxtitlebarcorners.UseVisualStyleBackColor = true; + this.cboxtitlebarcorners.CheckedChanged += new System.EventHandler(this.cboxtitlebarcorners_CheckedChanged); + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(136, 32); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(22, 16); + this.Label5.TabIndex = 5; + this.Label5.Text = "px"; + // + // txttitlebarheight + // + this.txttitlebarheight.BackColor = System.Drawing.Color.White; + this.txttitlebarheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitlebarheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitlebarheight.ForeColor = System.Drawing.Color.Black; + this.txttitlebarheight.Location = new System.Drawing.Point(112, 30); + this.txttitlebarheight.Name = "txttitlebarheight"; + this.txttitlebarheight.Size = new System.Drawing.Size(23, 22); + this.txttitlebarheight.TabIndex = 4; + this.txttitlebarheight.TextChanged += new System.EventHandler(this.txttitlebarheight_TextChanged); + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(3, 32); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(103, 16); + this.Label4.TabIndex = 2; + this.Label4.Text = "Title Bar Height:"; + // + // pnltitlebarcolour + // + this.pnltitlebarcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnltitlebarcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltitlebarcolour.Location = new System.Drawing.Point(112, 5); + this.pnltitlebarcolour.Name = "pnltitlebarcolour"; + this.pnltitlebarcolour.Size = new System.Drawing.Size(41, 20); + this.pnltitlebarcolour.TabIndex = 1; + this.pnltitlebarcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetTitlebarColor); + // + // Label2 + // + this.Label2.AutoSize = true; + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(3, 7); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(103, 16); + this.Label2.TabIndex = 0; + this.Label2.Text = "Title Bar Colour:"; + // + // pnlborderoptions + // + this.pnlborderoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlborderoptions.Controls.Add(this.cbindividualbordercolours); + this.pnlborderoptions.Controls.Add(this.pnlborderbottomrightcolour); + this.pnlborderoptions.Controls.Add(this.lbbright); + this.pnlborderoptions.Controls.Add(this.pnlborderbottomcolour); + this.pnlborderoptions.Controls.Add(this.lbbottom); + this.pnlborderoptions.Controls.Add(this.pnlborderbottomleftcolour); + this.pnlborderoptions.Controls.Add(this.lbbleft); + this.pnlborderoptions.Controls.Add(this.pnlborderrightcolour); + this.pnlborderoptions.Controls.Add(this.lbright); + this.pnlborderoptions.Controls.Add(this.pnlborderleftcolour); + this.pnlborderoptions.Controls.Add(this.lbleft); + this.pnlborderoptions.Controls.Add(this.Label15); + this.pnlborderoptions.Controls.Add(this.pnlbordercolour); + this.pnlborderoptions.Controls.Add(this.txtbordersize); + this.pnlborderoptions.Controls.Add(this.Label3); + this.pnlborderoptions.Controls.Add(this.Label16); + this.pnlborderoptions.Location = new System.Drawing.Point(135, 159); + this.pnlborderoptions.Name = "pnlborderoptions"; + this.pnlborderoptions.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.pnlborderoptions.Size = new System.Drawing.Size(325, 139); + this.pnlborderoptions.TabIndex = 10; + this.pnlborderoptions.Visible = false; + // + // cbindividualbordercolours + // + this.cbindividualbordercolours.AutoSize = true; + this.cbindividualbordercolours.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.cbindividualbordercolours.FlatAppearance.CheckedBackColor = System.Drawing.Color.Black; + this.cbindividualbordercolours.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbindividualbordercolours.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F); + this.cbindividualbordercolours.Location = new System.Drawing.Point(161, 4); + this.cbindividualbordercolours.Name = "cbindividualbordercolours"; + this.cbindividualbordercolours.Size = new System.Drawing.Size(135, 21); + this.cbindividualbordercolours.TabIndex = 28; + this.cbindividualbordercolours.Text = "Individual Colours"; + this.cbindividualbordercolours.UseVisualStyleBackColor = true; + this.cbindividualbordercolours.CheckedChanged += new System.EventHandler(this.cbindividualbordercolours_CheckedChanged); + // + // pnlborderbottomrightcolour + // + this.pnlborderbottomrightcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderbottomrightcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderbottomrightcolour.Location = new System.Drawing.Point(132, 101); + this.pnlborderbottomrightcolour.Name = "pnlborderbottomrightcolour"; + this.pnlborderbottomrightcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderbottomrightcolour.TabIndex = 27; + this.pnlborderbottomrightcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomRBorderColor); + // + // lbbright + // + this.lbbright.AutoSize = true; + this.lbbright.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbbright.Location = new System.Drawing.Point(3, 103); + this.lbbright.Name = "lbbright"; + this.lbbright.Size = new System.Drawing.Size(129, 16); + this.lbbright.TabIndex = 26; + this.lbbright.Text = "Bottom Right Colour:"; + // + // pnlborderbottomcolour + // + this.pnlborderbottomcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderbottomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderbottomcolour.Location = new System.Drawing.Point(263, 31); + this.pnlborderbottomcolour.Name = "pnlborderbottomcolour"; + this.pnlborderbottomcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderbottomcolour.TabIndex = 25; + this.pnlborderbottomcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomBorderColor); + // + // lbbottom + // + this.lbbottom.AutoSize = true; + this.lbbottom.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbbottom.Location = new System.Drawing.Point(158, 32); + this.lbbottom.Name = "lbbottom"; + this.lbbottom.Size = new System.Drawing.Size(95, 16); + this.lbbottom.TabIndex = 24; + this.lbbottom.Text = "Bottom Colour:"; + // + // pnlborderbottomleftcolour + // + this.pnlborderbottomleftcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderbottomleftcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderbottomleftcolour.Location = new System.Drawing.Point(124, 78); + this.pnlborderbottomleftcolour.Name = "pnlborderbottomleftcolour"; + this.pnlborderbottomleftcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderbottomleftcolour.TabIndex = 23; + this.pnlborderbottomleftcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomLColor); + // + // lbbleft + // + this.lbbleft.AutoSize = true; + this.lbbleft.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbbleft.Location = new System.Drawing.Point(3, 80); + this.lbbleft.Name = "lbbleft"; + this.lbbleft.Size = new System.Drawing.Size(119, 16); + this.lbbleft.TabIndex = 22; + this.lbbleft.Text = "Bottom Left Colour:"; + // + // pnlborderrightcolour + // + this.pnlborderrightcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderrightcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderrightcolour.Location = new System.Drawing.Point(263, 54); + this.pnlborderrightcolour.Name = "pnlborderrightcolour"; + this.pnlborderrightcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderrightcolour.TabIndex = 21; + this.pnlborderrightcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetRightBorderColor); + // + // lbright + // + this.lbright.AutoSize = true; + this.lbright.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbright.Location = new System.Drawing.Point(157, 56); + this.lbright.Name = "lbright"; + this.lbright.Size = new System.Drawing.Size(84, 16); + this.lbright.TabIndex = 20; + this.lbright.Text = "Right Colour:"; + // + // pnlborderleftcolour + // + this.pnlborderleftcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderleftcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderleftcolour.Location = new System.Drawing.Point(102, 54); + this.pnlborderleftcolour.Name = "pnlborderleftcolour"; + this.pnlborderleftcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderleftcolour.TabIndex = 19; + this.pnlborderleftcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetLeftBorderColor); + // + // lbleft + // + this.lbleft.AutoSize = true; + this.lbleft.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbleft.Location = new System.Drawing.Point(3, 56); + this.lbleft.Name = "lbleft"; + this.lbleft.Size = new System.Drawing.Size(74, 16); + this.lbleft.TabIndex = 18; + this.lbleft.Text = "Left Colour:"; + // + // Label15 + // + this.Label15.AutoSize = true; + this.Label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label15.Location = new System.Drawing.Point(126, 31); + this.Label15.Name = "Label15"; + this.Label15.Size = new System.Drawing.Size(22, 16); + this.Label15.TabIndex = 17; + this.Label15.Text = "px"; + // + // pnlbordercolour + // + this.pnlbordercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbordercolour.Location = new System.Drawing.Point(102, 5); + this.pnlbordercolour.Name = "pnlbordercolour"; + this.pnlbordercolour.Size = new System.Drawing.Size(41, 20); + this.pnlbordercolour.TabIndex = 3; + this.pnlbordercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetMainBorderColor); + // + // txtbordersize + // + this.txtbordersize.BackColor = System.Drawing.Color.White; + this.txtbordersize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbordersize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbordersize.ForeColor = System.Drawing.Color.Black; + this.txtbordersize.Location = new System.Drawing.Point(102, 29); + this.txtbordersize.Name = "txtbordersize"; + this.txtbordersize.Size = new System.Drawing.Size(23, 22); + this.txtbordersize.TabIndex = 16; + this.txtbordersize.TextChanged += new System.EventHandler(this.txtbordersize_TextChanged); + // + // Label3 + // + this.Label3.AutoSize = true; + this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(3, 7); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(94, 16); + this.Label3.TabIndex = 2; + this.Label3.Text = "Border Colour:"; + // + // Label16 + // + this.Label16.AutoSize = true; + this.Label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label16.Location = new System.Drawing.Point(3, 31); + this.Label16.Name = "Label16"; + this.Label16.Size = new System.Drawing.Size(81, 16); + this.Label16.TabIndex = 15; + this.Label16.Text = "Border Size:"; + // + // pnltitletextoptions + // + this.pnltitletextoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnltitletextoptions.Controls.Add(this.combotitletextposition); + this.pnltitletextoptions.Controls.Add(this.Label53); + this.pnltitletextoptions.Controls.Add(this.combotitletextstyle); + this.pnltitletextoptions.Controls.Add(this.combotitletextfont); + this.pnltitletextoptions.Controls.Add(this.Label23); + this.pnltitletextoptions.Controls.Add(this.Label17); + this.pnltitletextoptions.Controls.Add(this.txttitletextside); + this.pnltitletextoptions.Controls.Add(this.Label18); + this.pnltitletextoptions.Controls.Add(this.Label19); + this.pnltitletextoptions.Controls.Add(this.txttitletexttop); + this.pnltitletextoptions.Controls.Add(this.Label20); + this.pnltitletextoptions.Controls.Add(this.Label21); + this.pnltitletextoptions.Controls.Add(this.txttitletextsize); + this.pnltitletextoptions.Controls.Add(this.Label22); + this.pnltitletextoptions.Controls.Add(this.Label24); + this.pnltitletextoptions.Controls.Add(this.pnltitletextcolour); + this.pnltitletextoptions.Controls.Add(this.Label25); + this.pnltitletextoptions.Location = new System.Drawing.Point(135, 159); + this.pnltitletextoptions.Name = "pnltitletextoptions"; + this.pnltitletextoptions.Size = new System.Drawing.Size(325, 139); + this.pnltitletextoptions.TabIndex = 15; + this.pnltitletextoptions.Visible = false; + // + // combotitletextposition + // + this.combotitletextposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combotitletextposition.FormattingEnabled = true; + this.combotitletextposition.Items.AddRange(new object[] { + "Left", + "Centre"}); + this.combotitletextposition.Location = new System.Drawing.Point(211, 54); + this.combotitletextposition.Name = "combotitletextposition"; + this.combotitletextposition.Size = new System.Drawing.Size(95, 24); + this.combotitletextposition.TabIndex = 21; + this.combotitletextposition.SelectedIndexChanged += new System.EventHandler(this.combotitletextposition_SelectedIndexChanged); + // + // Label53 + // + this.Label53.AutoSize = true; + this.Label53.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label53.Location = new System.Drawing.Point(149, 57); + this.Label53.Name = "Label53"; + this.Label53.Size = new System.Drawing.Size(59, 16); + this.Label53.TabIndex = 20; + this.Label53.Text = "Position:"; + // + // combotitletextstyle + // + this.combotitletextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combotitletextstyle.FormattingEnabled = true; + this.combotitletextstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.combotitletextstyle.Location = new System.Drawing.Point(207, 3); + this.combotitletextstyle.Name = "combotitletextstyle"; + this.combotitletextstyle.Size = new System.Drawing.Size(99, 24); + this.combotitletextstyle.TabIndex = 18; + this.combotitletextstyle.SelectedIndexChanged += new System.EventHandler(this.combotitletextstyle_SelectedIndexChanged); + // + // combotitletextfont + // + this.combotitletextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combotitletextfont.FormattingEnabled = true; + this.combotitletextfont.Location = new System.Drawing.Point(100, 30); + this.combotitletextfont.Name = "combotitletextfont"; + this.combotitletextfont.Size = new System.Drawing.Size(202, 24); + this.combotitletextfont.TabIndex = 17; + this.combotitletextfont.SelectedIndexChanged += new System.EventHandler(this.combotitletextfont_SelectedIndexChanged); + // + // Label23 + // + this.Label23.AutoSize = true; + this.Label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label23.Location = new System.Drawing.Point(164, 7); + this.Label23.Name = "Label23"; + this.Label23.Size = new System.Drawing.Size(41, 16); + this.Label23.TabIndex = 15; + this.Label23.Text = "Style:"; + // + // Label17 + // + this.Label17.AutoSize = true; + this.Label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label17.Location = new System.Drawing.Point(159, 107); + this.Label17.Name = "Label17"; + this.Label17.Size = new System.Drawing.Size(22, 16); + this.Label17.TabIndex = 14; + this.Label17.Text = "px"; + // + // txttitletextside + // + this.txttitletextside.BackColor = System.Drawing.Color.White; + this.txttitletextside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitletextside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitletextside.ForeColor = System.Drawing.Color.Black; + this.txttitletextside.Location = new System.Drawing.Point(135, 105); + this.txttitletextside.Name = "txttitletextside"; + this.txttitletextside.Size = new System.Drawing.Size(23, 22); + this.txttitletextside.TabIndex = 13; + this.txttitletextside.TextChanged += new System.EventHandler(this.txttitletextside_TextChanged); + // + // Label18 + // + this.Label18.AutoSize = true; + this.Label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label18.Location = new System.Drawing.Point(3, 107); + this.Label18.Name = "Label18"; + this.Label18.Size = new System.Drawing.Size(131, 16); + this.Label18.TabIndex = 12; + this.Label18.Text = "Title Text From Side:"; + // + // Label19 + // + this.Label19.AutoSize = true; + this.Label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label19.Location = new System.Drawing.Point(159, 82); + this.Label19.Name = "Label19"; + this.Label19.Size = new System.Drawing.Size(22, 16); + this.Label19.TabIndex = 11; + this.Label19.Text = "px"; + // + // txttitletexttop + // + this.txttitletexttop.BackColor = System.Drawing.Color.White; + this.txttitletexttop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitletexttop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitletexttop.ForeColor = System.Drawing.Color.Black; + this.txttitletexttop.Location = new System.Drawing.Point(135, 80); + this.txttitletexttop.Name = "txttitletexttop"; + this.txttitletexttop.Size = new System.Drawing.Size(23, 22); + this.txttitletexttop.TabIndex = 10; + this.txttitletexttop.TextChanged += new System.EventHandler(this.txttitletexttop_TextChanged); + // + // Label20 + // + this.Label20.AutoSize = true; + this.Label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label20.Location = new System.Drawing.Point(3, 82); + this.Label20.Name = "Label20"; + this.Label20.Size = new System.Drawing.Size(128, 16); + this.Label20.TabIndex = 9; + this.Label20.Text = "Title Text From Top:"; + // + // Label21 + // + this.Label21.AutoSize = true; + this.Label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label21.Location = new System.Drawing.Point(124, 57); + this.Label21.Name = "Label21"; + this.Label21.Size = new System.Drawing.Size(22, 16); + this.Label21.TabIndex = 8; + this.Label21.Text = "px"; + // + // txttitletextsize + // + this.txttitletextsize.BackColor = System.Drawing.Color.White; + this.txttitletextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitletextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitletextsize.ForeColor = System.Drawing.Color.Black; + this.txttitletextsize.Location = new System.Drawing.Point(100, 55); + this.txttitletextsize.Name = "txttitletextsize"; + this.txttitletextsize.Size = new System.Drawing.Size(23, 22); + this.txttitletextsize.TabIndex = 7; + this.txttitletextsize.TextChanged += new System.EventHandler(this.txttitletextsize_TextChanged); + // + // Label22 + // + this.Label22.AutoSize = true; + this.Label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label22.Location = new System.Drawing.Point(3, 57); + this.Label22.Name = "Label22"; + this.Label22.Size = new System.Drawing.Size(95, 16); + this.Label22.TabIndex = 6; + this.Label22.Text = "Title Text Size:"; + // + // Label24 + // + this.Label24.AutoSize = true; + this.Label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label24.Location = new System.Drawing.Point(3, 33); + this.Label24.Name = "Label24"; + this.Label24.Size = new System.Drawing.Size(95, 16); + this.Label24.TabIndex = 2; + this.Label24.Text = "Title Text Font:"; + // + // pnltitletextcolour + // + this.pnltitletextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltitletextcolour.Location = new System.Drawing.Point(114, 5); + this.pnltitletextcolour.Name = "pnltitletextcolour"; + this.pnltitletextcolour.Size = new System.Drawing.Size(41, 20); + this.pnltitletextcolour.TabIndex = 1; + this.pnltitletextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetTitleTextColor); + // + // Label25 + // + this.Label25.AutoSize = true; + this.Label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label25.Location = new System.Drawing.Point(3, 7); + this.Label25.Name = "Label25"; + this.Label25.Size = new System.Drawing.Size(108, 16); + this.Label25.TabIndex = 0; + this.Label25.Text = "Title Text Colour:"; + // + // pnlwindowsobjects + // + this.pnlwindowsobjects.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnlwindowsobjects.Controls.Add(this.btnborders); + this.pnlwindowsobjects.Controls.Add(this.btnbuttons); + this.pnlwindowsobjects.Controls.Add(this.btntitletext); + this.pnlwindowsobjects.Controls.Add(this.btntitlebar); + this.pnlwindowsobjects.Location = new System.Drawing.Point(1, 159); + this.pnlwindowsobjects.Name = "pnlwindowsobjects"; + this.pnlwindowsobjects.Size = new System.Drawing.Size(128, 135); + this.pnlwindowsobjects.TabIndex = 8; + // + // btnborders + // + this.btnborders.BackColor = System.Drawing.Color.White; + this.btnborders.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnborders.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnborders.Location = new System.Drawing.Point(4, 105); + this.btnborders.Name = "btnborders"; + this.btnborders.Size = new System.Drawing.Size(119, 29); + this.btnborders.TabIndex = 7; + this.btnborders.TabStop = false; + this.btnborders.Text = "Borders"; + this.btnborders.UseVisualStyleBackColor = false; + this.btnborders.Click += new System.EventHandler(this.btnborders_Click); + // + // btnbuttons + // + this.btnbuttons.BackColor = System.Drawing.Color.White; + this.btnbuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbuttons.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnbuttons.Location = new System.Drawing.Point(4, 70); + this.btnbuttons.Name = "btnbuttons"; + this.btnbuttons.Size = new System.Drawing.Size(119, 29); + this.btnbuttons.TabIndex = 6; + this.btnbuttons.TabStop = false; + this.btnbuttons.Text = "Buttons"; + this.btnbuttons.UseVisualStyleBackColor = false; + this.btnbuttons.Click += new System.EventHandler(this.btnbuttons_Click); + // + // btntitletext + // + this.btntitletext.BackColor = System.Drawing.Color.White; + this.btntitletext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntitletext.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btntitletext.Location = new System.Drawing.Point(4, 35); + this.btntitletext.Name = "btntitletext"; + this.btntitletext.Size = new System.Drawing.Size(119, 29); + this.btntitletext.TabIndex = 5; + this.btntitletext.TabStop = false; + this.btntitletext.Text = "Title Text"; + this.btntitletext.UseVisualStyleBackColor = false; + this.btntitletext.Click += new System.EventHandler(this.btntitletext_Click_1); + // + // btntitlebar + // + this.btntitlebar.BackColor = System.Drawing.Color.White; + this.btntitlebar.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntitlebar.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btntitlebar.Location = new System.Drawing.Point(4, 0); + this.btntitlebar.Name = "btntitlebar"; + this.btntitlebar.Size = new System.Drawing.Size(119, 29); + this.btntitlebar.TabIndex = 4; + this.btntitlebar.TabStop = false; + this.btntitlebar.Text = "Title Bar"; + this.btntitlebar.UseVisualStyleBackColor = false; + this.btntitlebar.Click += new System.EventHandler(this.btntitlebar_Click); + // + // pnlwindowpreview + // + this.pnlwindowpreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlwindowpreview.Controls.Add(this.prepgcontent); + this.pnlwindowpreview.Controls.Add(this.prepgbottom); + this.pnlwindowpreview.Controls.Add(this.prepgleft); + this.pnlwindowpreview.Controls.Add(this.prepgright); + this.pnlwindowpreview.Controls.Add(this.pretitlebar); + this.pnlwindowpreview.Location = new System.Drawing.Point(5, 3); + this.pnlwindowpreview.Name = "pnlwindowpreview"; + this.pnlwindowpreview.Size = new System.Drawing.Size(448, 148); + this.pnlwindowpreview.TabIndex = 0; + // + // prepgcontent + // + this.prepgcontent.Dock = System.Windows.Forms.DockStyle.Fill; + this.prepgcontent.Location = new System.Drawing.Point(2, 30); + this.prepgcontent.Name = "prepgcontent"; + this.prepgcontent.Size = new System.Drawing.Size(444, 116); + this.prepgcontent.TabIndex = 20; + // + // prepgbottom + // + this.prepgbottom.BackColor = System.Drawing.Color.Gray; + this.prepgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottom.Location = new System.Drawing.Point(2, 146); + this.prepgbottom.Name = "prepgbottom"; + this.prepgbottom.Size = new System.Drawing.Size(444, 2); + this.prepgbottom.TabIndex = 23; + // + // prepgleft + // + this.prepgleft.BackColor = System.Drawing.Color.Gray; + this.prepgleft.Controls.Add(this.prepgbottomlcorner); + this.prepgleft.Dock = System.Windows.Forms.DockStyle.Left; + this.prepgleft.Location = new System.Drawing.Point(0, 30); + this.prepgleft.Name = "prepgleft"; + this.prepgleft.Size = new System.Drawing.Size(2, 118); + this.prepgleft.TabIndex = 21; + // + // prepgbottomlcorner + // + this.prepgbottomlcorner.BackColor = System.Drawing.Color.Red; + this.prepgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottomlcorner.Location = new System.Drawing.Point(0, 116); + this.prepgbottomlcorner.Name = "prepgbottomlcorner"; + this.prepgbottomlcorner.Size = new System.Drawing.Size(2, 2); + this.prepgbottomlcorner.TabIndex = 14; + // + // prepgright + // + this.prepgright.BackColor = System.Drawing.Color.Gray; + this.prepgright.Controls.Add(this.prepgbottomrcorner); + this.prepgright.Dock = System.Windows.Forms.DockStyle.Right; + this.prepgright.Location = new System.Drawing.Point(446, 30); + this.prepgright.Name = "prepgright"; + this.prepgright.Size = new System.Drawing.Size(2, 118); + this.prepgright.TabIndex = 22; + // + // prepgbottomrcorner + // + this.prepgbottomrcorner.BackColor = System.Drawing.Color.Red; + this.prepgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottomrcorner.Location = new System.Drawing.Point(0, 116); + this.prepgbottomrcorner.Name = "prepgbottomrcorner"; + this.prepgbottomrcorner.Size = new System.Drawing.Size(2, 2); + this.prepgbottomrcorner.TabIndex = 15; + // + // pretitlebar + // + this.pretitlebar.BackColor = System.Drawing.Color.Gray; + this.pretitlebar.Controls.Add(this.preminimizebutton); + this.pretitlebar.Controls.Add(this.prepnlicon); + this.pretitlebar.Controls.Add(this.prerollupbutton); + this.pretitlebar.Controls.Add(this.preclosebutton); + this.pretitlebar.Controls.Add(this.pretitletext); + this.pretitlebar.Controls.Add(this.prepgtoplcorner); + this.pretitlebar.Controls.Add(this.prepgtoprcorner); + this.pretitlebar.Dock = System.Windows.Forms.DockStyle.Top; + this.pretitlebar.ForeColor = System.Drawing.Color.White; + this.pretitlebar.Location = new System.Drawing.Point(0, 0); + this.pretitlebar.Name = "pretitlebar"; + this.pretitlebar.Size = new System.Drawing.Size(448, 30); + this.pretitlebar.TabIndex = 19; + // + // preminimizebutton + // + this.preminimizebutton.BackColor = System.Drawing.Color.Black; + this.preminimizebutton.Location = new System.Drawing.Point(185, 5); + this.preminimizebutton.Name = "preminimizebutton"; + this.preminimizebutton.Size = new System.Drawing.Size(22, 22); + this.preminimizebutton.TabIndex = 31; + // + // prepnlicon + // + this.prepnlicon.BackColor = System.Drawing.Color.Transparent; + this.prepnlicon.Location = new System.Drawing.Point(8, 8); + this.prepnlicon.Name = "prepnlicon"; + this.prepnlicon.Size = new System.Drawing.Size(16, 16); + this.prepnlicon.TabIndex = 32; + this.prepnlicon.TabStop = false; + this.prepnlicon.Visible = false; + // + // prerollupbutton + // + this.prerollupbutton.BackColor = System.Drawing.Color.Black; + this.prerollupbutton.Location = new System.Drawing.Point(213, 5); + this.prerollupbutton.Name = "prerollupbutton"; + this.prerollupbutton.Size = new System.Drawing.Size(22, 22); + this.prerollupbutton.TabIndex = 31; + // + // preclosebutton + // + this.preclosebutton.BackColor = System.Drawing.Color.Black; + this.preclosebutton.Location = new System.Drawing.Point(251, 5); + this.preclosebutton.Name = "preclosebutton"; + this.preclosebutton.Size = new System.Drawing.Size(22, 22); + this.preclosebutton.TabIndex = 20; + // + // pretitletext + // + this.pretitletext.AutoSize = true; + this.pretitletext.BackColor = System.Drawing.Color.Transparent; + this.pretitletext.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pretitletext.Location = new System.Drawing.Point(29, 7); + this.pretitletext.Name = "pretitletext"; + this.pretitletext.Size = new System.Drawing.Size(77, 18); + this.pretitletext.TabIndex = 19; + this.pretitletext.Text = "Template"; + // + // prepgtoplcorner + // + this.prepgtoplcorner.BackColor = System.Drawing.Color.Red; + this.prepgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; + this.prepgtoplcorner.Location = new System.Drawing.Point(0, 0); + this.prepgtoplcorner.Name = "prepgtoplcorner"; + this.prepgtoplcorner.Size = new System.Drawing.Size(2, 30); + this.prepgtoplcorner.TabIndex = 17; + // + // prepgtoprcorner + // + this.prepgtoprcorner.BackColor = System.Drawing.Color.Red; + this.prepgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; + this.prepgtoprcorner.Location = new System.Drawing.Point(446, 0); + this.prepgtoprcorner.Name = "prepgtoprcorner"; + this.prepgtoprcorner.Size = new System.Drawing.Size(2, 30); + this.prepgtoprcorner.TabIndex = 16; + // + // pnlreset + // + this.pnlreset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlreset.Controls.Add(this.Label113); + this.pnlreset.Controls.Add(this.btnresetallsettings); + this.pnlreset.Controls.Add(this.Label109); + this.pnlreset.Controls.Add(this.Label111); + this.pnlreset.Location = new System.Drawing.Point(134, 9); + this.pnlreset.Name = "pnlreset"; + this.pnlreset.Size = new System.Drawing.Size(457, 306); + this.pnlreset.TabIndex = 18; + // + // Label113 + // + this.Label113.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label113.Location = new System.Drawing.Point(57, 231); + this.Label113.Name = "Label113"; + this.Label113.Size = new System.Drawing.Size(332, 33); + this.Label113.TabIndex = 5; + this.Label113.Text = "Warning! A Global Reset Is Irreversible!"; + this.Label113.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnresetallsettings + // + this.btnresetallsettings.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnresetallsettings.Font = new System.Drawing.Font("Cambria", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnresetallsettings.Location = new System.Drawing.Point(101, 145); + this.btnresetallsettings.Name = "btnresetallsettings"; + this.btnresetallsettings.Size = new System.Drawing.Size(255, 83); + this.btnresetallsettings.TabIndex = 4; + this.btnresetallsettings.TabStop = false; + this.btnresetallsettings.Text = "Reset All Settings"; + this.btnresetallsettings.UseVisualStyleBackColor = true; + this.btnresetallsettings.Click += new System.EventHandler(this.btnresetallsettings_Click); + // + // Label109 + // + this.Label109.BackColor = System.Drawing.Color.Transparent; + this.Label109.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label109.Location = new System.Drawing.Point(4, 40); + this.Label109.Name = "Label109"; + this.Label109.Size = new System.Drawing.Size(451, 66); + this.Label109.TabIndex = 3; + this.Label109.Text = resources.GetString("Label109.Text"); + this.Label109.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label111 + // + this.Label111.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label111.Location = new System.Drawing.Point(68, 4); + this.Label111.Name = "Label111"; + this.Label111.Size = new System.Drawing.Size(332, 33); + this.Label111.TabIndex = 2; + this.Label111.Text = "Global Settings Reset!"; + this.Label111.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnldesktopoptions); + this.pgcontents.Controls.Add(this.pnlluaoptions); + this.pgcontents.Controls.Add(this.pnldesktopcomposition); + this.pgcontents.Controls.Add(this.pnlreset); + this.pgcontents.Controls.Add(this.pnlwindowsoptions); + this.pgcontents.Controls.Add(this.pnlmenus); + this.pgcontents.Controls.Add(this.pnlshifterintro); + this.pgcontents.Controls.Add(this.catholder); + this.pgcontents.Controls.Add(this.btnapply); + this.pgcontents.Controls.Add(this.Label1); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(600, 323); + this.pgcontents.TabIndex = 0; + // + // pnldesktopcomposition + // + this.pnldesktopcomposition.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktopcomposition.BackColor = System.Drawing.Color.White; + this.pnldesktopcomposition.Controls.Add(this.pnlfancywindows); + this.pnldesktopcomposition.Controls.Add(this.pnlfancydragging); + this.pnldesktopcomposition.Controls.Add(this.pnlfancyintro); + this.pnldesktopcomposition.Controls.Add(this.panel18); + this.pnldesktopcomposition.Controls.Add(this.panel25); + this.pnldesktopcomposition.Controls.Add(this.panel36); + this.pnldesktopcomposition.Controls.Add(this.label176); + this.pnldesktopcomposition.Location = new System.Drawing.Point(134, 9); + this.pnldesktopcomposition.Name = "pnldesktopcomposition"; + this.pnldesktopcomposition.Size = new System.Drawing.Size(457, 306); + this.pnldesktopcomposition.TabIndex = 20; + // + // pnlfancywindows + // + this.pnlfancywindows.Controls.Add(this.txtwinfadedec); + this.pnlfancywindows.Controls.Add(this.label150); + this.pnlfancywindows.Controls.Add(this.txtwinfadespeed); + this.pnlfancywindows.Controls.Add(this.label151); + this.pnlfancywindows.Controls.Add(this.cbdrageffect); + this.pnlfancywindows.Controls.Add(this.label141); + this.pnlfancywindows.Controls.Add(this.cbcloseanim); + this.pnlfancywindows.Controls.Add(this.label128); + this.pnlfancywindows.Controls.Add(this.cbopenanim); + this.pnlfancywindows.Controls.Add(this.label127); + this.pnlfancywindows.Controls.Add(this.label149); + this.pnlfancywindows.Location = new System.Drawing.Point(139, 43); + this.pnlfancywindows.Name = "pnlfancywindows"; + this.pnlfancywindows.Size = new System.Drawing.Size(311, 256); + this.pnlfancywindows.TabIndex = 13; + // + // txtwinfadedec + // + this.txtwinfadedec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtwinfadedec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtwinfadedec.Location = new System.Drawing.Point(225, 189); + this.txtwinfadedec.Name = "txtwinfadedec"; + this.txtwinfadedec.Size = new System.Drawing.Size(35, 23); + this.txtwinfadedec.TabIndex = 26; + this.txtwinfadedec.TextChanged += new System.EventHandler(this.txtwinfadedec_TextChanged); + // + // label150 + // + this.label150.AutoSize = true; + this.label150.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label150.Location = new System.Drawing.Point(153, 191); + this.label150.Name = "label150"; + this.label150.Size = new System.Drawing.Size(71, 16); + this.label150.TabIndex = 25; + this.label150.Text = "Fade Dec."; + // + // txtwinfadespeed + // + this.txtwinfadespeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtwinfadespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtwinfadespeed.Location = new System.Drawing.Point(109, 185); + this.txtwinfadespeed.Name = "txtwinfadespeed"; + this.txtwinfadespeed.Size = new System.Drawing.Size(35, 23); + this.txtwinfadespeed.TabIndex = 24; + this.txtwinfadespeed.TextChanged += new System.EventHandler(this.txtwinfadespeed_TextChanged); + // + // label151 + // + this.label151.AutoSize = true; + this.label151.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label151.Location = new System.Drawing.Point(13, 189); + this.label151.Name = "label151"; + this.label151.Size = new System.Drawing.Size(84, 16); + this.label151.TabIndex = 23; + this.label151.Text = "Fade Speed"; + // + // cbdrageffect + // + this.cbdrageffect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cbdrageffect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbdrageffect.FormattingEnabled = true; + this.cbdrageffect.Location = new System.Drawing.Point(6, 153); + this.cbdrageffect.Name = "cbdrageffect"; + this.cbdrageffect.Size = new System.Drawing.Size(294, 21); + this.cbdrageffect.TabIndex = 22; + this.cbdrageffect.SelectedIndexChanged += new System.EventHandler(this.cbdrageffect_SelectedIndexChanged); + // + // label141 + // + this.label141.AutoSize = true; + this.label141.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label141.Location = new System.Drawing.Point(7, 132); + this.label141.Name = "label141"; + this.label141.Size = new System.Drawing.Size(125, 16); + this.label141.TabIndex = 21; + this.label141.Text = "Window Drag Effect"; + // + // cbcloseanim + // + this.cbcloseanim.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cbcloseanim.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbcloseanim.FormattingEnabled = true; + this.cbcloseanim.Location = new System.Drawing.Point(8, 102); + this.cbcloseanim.Name = "cbcloseanim"; + this.cbcloseanim.Size = new System.Drawing.Size(294, 21); + this.cbcloseanim.TabIndex = 20; + this.cbcloseanim.SelectedIndexChanged += new System.EventHandler(this.cbcloseanim_SelectedIndexChanged); + // + // label128 + // + this.label128.AutoSize = true; + this.label128.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label128.Location = new System.Drawing.Point(9, 81); + this.label128.Name = "label128"; + this.label128.Size = new System.Drawing.Size(156, 16); + this.label128.TabIndex = 19; + this.label128.Text = "Window Close Animation"; + // + // cbopenanim + // + this.cbopenanim.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cbopenanim.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbopenanim.FormattingEnabled = true; + this.cbopenanim.Location = new System.Drawing.Point(9, 50); + this.cbopenanim.Name = "cbopenanim"; + this.cbopenanim.Size = new System.Drawing.Size(294, 21); + this.cbopenanim.TabIndex = 18; + this.cbopenanim.SelectedIndexChanged += new System.EventHandler(this.cbopenanim_SelectedIndexChanged); + // + // label127 + // + this.label127.AutoSize = true; + this.label127.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label127.Location = new System.Drawing.Point(10, 29); + this.label127.Name = "label127"; + this.label127.Size = new System.Drawing.Size(154, 16); + this.label127.TabIndex = 17; + this.label127.Text = "Window Open Animation"; + // + // label149 + // + this.label149.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label149.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label149.Location = new System.Drawing.Point(6, 0); + this.label149.Name = "label149"; + this.label149.Size = new System.Drawing.Size(301, 29); + this.label149.TabIndex = 1; + this.label149.Text = "Animations"; + this.label149.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlfancydragging + // + this.pnlfancydragging.Controls.Add(this.txtshakeminoffset); + this.pnlfancydragging.Controls.Add(this.label148); + this.pnlfancydragging.Controls.Add(this.txtshakemax); + this.pnlfancydragging.Controls.Add(this.label146); + this.pnlfancydragging.Controls.Add(this.txtdragopacitydec); + this.pnlfancydragging.Controls.Add(this.label144); + this.pnlfancydragging.Controls.Add(this.txtdragfadedec); + this.pnlfancydragging.Controls.Add(this.label143); + this.pnlfancydragging.Controls.Add(this.txtfadespeed); + this.pnlfancydragging.Controls.Add(this.label155); + this.pnlfancydragging.Controls.Add(this.label156); + this.pnlfancydragging.Location = new System.Drawing.Point(139, 43); + this.pnlfancydragging.Name = "pnlfancydragging"; + this.pnlfancydragging.Size = new System.Drawing.Size(311, 256); + this.pnlfancydragging.TabIndex = 14; + // + // txtshakeminoffset + // + this.txtshakeminoffset.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtshakeminoffset.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtshakeminoffset.Location = new System.Drawing.Point(167, 189); + this.txtshakeminoffset.Name = "txtshakeminoffset"; + this.txtshakeminoffset.Size = new System.Drawing.Size(35, 23); + this.txtshakeminoffset.TabIndex = 13; + this.txtshakeminoffset.TextChanged += new System.EventHandler(this.txtshakeminoffset_TextChanged); + // + // label148 + // + this.label148.AutoSize = true; + this.label148.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label148.Location = new System.Drawing.Point(17, 192); + this.label148.Name = "label148"; + this.label148.Size = new System.Drawing.Size(140, 16); + this.label148.TabIndex = 12; + this.label148.Text = "Shake Minimum Offset"; + // + // txtshakemax + // + this.txtshakemax.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtshakemax.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtshakemax.Location = new System.Drawing.Point(167, 159); + this.txtshakemax.Name = "txtshakemax"; + this.txtshakemax.Size = new System.Drawing.Size(35, 23); + this.txtshakemax.TabIndex = 11; + this.txtshakemax.TextChanged += new System.EventHandler(this.txtshakemax_TextChanged); + // + // label146 + // + this.label146.AutoSize = true; + this.label146.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label146.Location = new System.Drawing.Point(17, 162); + this.label146.Name = "label146"; + this.label146.Size = new System.Drawing.Size(144, 16); + this.label146.TabIndex = 10; + this.label146.Text = "Shake Maximum Offset"; + // + // txtdragopacitydec + // + this.txtdragopacitydec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdragopacitydec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtdragopacitydec.Location = new System.Drawing.Point(104, 116); + this.txtdragopacitydec.Name = "txtdragopacitydec"; + this.txtdragopacitydec.Size = new System.Drawing.Size(35, 23); + this.txtdragopacitydec.TabIndex = 9; + this.txtdragopacitydec.TextChanged += new System.EventHandler(this.txtdragopacitydec_TextChanged); + // + // label144 + // + this.label144.AutoSize = true; + this.label144.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label144.Location = new System.Drawing.Point(18, 119); + this.label144.Name = "label144"; + this.label144.Size = new System.Drawing.Size(85, 16); + this.label144.TabIndex = 8; + this.label144.Text = "Opacity Dec."; + // + // txtdragfadedec + // + this.txtdragfadedec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdragfadedec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtdragfadedec.Location = new System.Drawing.Point(89, 88); + this.txtdragfadedec.Name = "txtdragfadedec"; + this.txtdragfadedec.Size = new System.Drawing.Size(35, 23); + this.txtdragfadedec.TabIndex = 7; + this.txtdragfadedec.TextChanged += new System.EventHandler(this.txtdragfadedec_TextChanged); + // + // label143 + // + this.label143.AutoSize = true; + this.label143.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label143.Location = new System.Drawing.Point(17, 90); + this.label143.Name = "label143"; + this.label143.Size = new System.Drawing.Size(71, 16); + this.label143.TabIndex = 6; + this.label143.Text = "Fade Dec."; + // + // txtfadespeed + // + this.txtfadespeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtfadespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtfadespeed.Location = new System.Drawing.Point(114, 54); + this.txtfadespeed.Name = "txtfadespeed"; + this.txtfadespeed.Size = new System.Drawing.Size(35, 23); + this.txtfadespeed.TabIndex = 5; + this.txtfadespeed.TextChanged += new System.EventHandler(this.txtfadespeed_TextChanged); + // + // label155 + // + this.label155.AutoSize = true; + this.label155.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label155.Location = new System.Drawing.Point(18, 58); + this.label155.Name = "label155"; + this.label155.Size = new System.Drawing.Size(84, 16); + this.label155.TabIndex = 4; + this.label155.Text = "Fade Speed"; + // + // label156 + // + this.label156.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label156.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label156.Location = new System.Drawing.Point(6, 0); + this.label156.Name = "label156"; + this.label156.Size = new System.Drawing.Size(301, 29); + this.label156.TabIndex = 1; + this.label156.Text = "Fancy Dragging"; + this.label156.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlfancyintro + // + this.pnlfancyintro.Controls.Add(this.label174); + this.pnlfancyintro.Controls.Add(this.label175); + this.pnlfancyintro.Location = new System.Drawing.Point(139, 43); + this.pnlfancyintro.Name = "pnlfancyintro"; + this.pnlfancyintro.Size = new System.Drawing.Size(311, 256); + this.pnlfancyintro.TabIndex = 11; + // + // label174 + // + this.label174.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label174.BackColor = System.Drawing.Color.Transparent; + this.label174.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label174.Location = new System.Drawing.Point(6, 29); + this.label174.Name = "label174"; + this.label174.Size = new System.Drawing.Size(300, 221); + this.label174.TabIndex = 4; + this.label174.Text = "This section allows you to customize various Fancy Effects throughout ShiftOS suc" + + "h as animations, speeds, etc.\r\n\r\nGo ahead and explore!"; + this.label174.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label175 + // + this.label175.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label175.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label175.Location = new System.Drawing.Point(6, 0); + this.label175.Name = "label175"; + this.label175.Size = new System.Drawing.Size(301, 29); + this.label175.TabIndex = 1; + this.label175.Text = "Fancy Effects - Intro"; + this.label175.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel18 + // + this.panel18.Controls.Add(this.panel19); + this.panel18.Controls.Add(this.label157); + this.panel18.Controls.Add(this.panel20); + this.panel18.Controls.Add(this.label158); + this.panel18.Controls.Add(this.panel21); + this.panel18.Controls.Add(this.label159); + this.panel18.Controls.Add(this.panel22); + this.panel18.Controls.Add(this.label160); + this.panel18.Controls.Add(this.panel23); + this.panel18.Controls.Add(this.label161); + this.panel18.Controls.Add(this.panel24); + this.panel18.Controls.Add(this.label162); + this.panel18.Controls.Add(this.label163); + this.panel18.Location = new System.Drawing.Point(139, 43); + this.panel18.Name = "panel18"; + this.panel18.Size = new System.Drawing.Size(311, 256); + this.panel18.TabIndex = 12; + // + // panel19 + // + this.panel19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel19.Location = new System.Drawing.Point(216, 80); + this.panel19.Name = "panel19"; + this.panel19.Size = new System.Drawing.Size(41, 20); + this.panel19.TabIndex = 11; + // + // label157 + // + this.label157.AutoSize = true; + this.label157.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label157.Location = new System.Drawing.Point(167, 81); + this.label157.Name = "label157"; + this.label157.Size = new System.Drawing.Size(49, 16); + this.label157.TabIndex = 10; + this.label157.Text = "Border"; + // + // panel20 + // + this.panel20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel20.Location = new System.Drawing.Point(224, 55); + this.panel20.Name = "panel20"; + this.panel20.Size = new System.Drawing.Size(41, 20); + this.panel20.TabIndex = 9; + // + // label158 + // + this.label158.AutoSize = true; + this.label158.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label158.Location = new System.Drawing.Point(148, 56); + this.label158.Name = "label158"; + this.label158.Size = new System.Drawing.Size(76, 16); + this.label158.TabIndex = 8; + this.label158.Text = "Margin End"; + // + // panel21 + // + this.panel21.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel21.Location = new System.Drawing.Point(117, 80); + this.panel21.Name = "panel21"; + this.panel21.Size = new System.Drawing.Size(41, 20); + this.panel21.TabIndex = 7; + // + // label159 + // + this.label159.AutoSize = true; + this.label159.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label159.Location = new System.Drawing.Point(12, 80); + this.label159.Name = "label159"; + this.label159.Size = new System.Drawing.Size(93, 16); + this.label159.TabIndex = 6; + this.label159.Text = "Margin Middle"; + // + // panel22 + // + this.panel22.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel22.Location = new System.Drawing.Point(101, 55); + this.panel22.Name = "panel22"; + this.panel22.Size = new System.Drawing.Size(41, 20); + this.panel22.TabIndex = 5; + // + // label160 + // + this.label160.AutoSize = true; + this.label160.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label160.Location = new System.Drawing.Point(12, 55); + this.label160.Name = "label160"; + this.label160.Size = new System.Drawing.Size(87, 16); + this.label160.TabIndex = 4; + this.label160.Text = "Margin Begin"; + // + // panel23 + // + this.panel23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel23.Location = new System.Drawing.Point(249, 29); + this.panel23.Name = "panel23"; + this.panel23.Size = new System.Drawing.Size(41, 20); + this.panel23.TabIndex = 5; + // + // label161 + // + this.label161.AutoSize = true; + this.label161.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label161.Location = new System.Drawing.Point(156, 29); + this.label161.Name = "label161"; + this.label161.Size = new System.Drawing.Size(95, 16); + this.label161.TabIndex = 4; + this.label161.Text = "Highlight Color"; + // + // panel24 + // + this.panel24.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel24.Location = new System.Drawing.Point(115, 29); + this.panel24.Name = "panel24"; + this.panel24.Size = new System.Drawing.Size(41, 20); + this.panel24.TabIndex = 3; + // + // label162 + // + this.label162.AutoSize = true; + this.label162.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label162.Location = new System.Drawing.Point(10, 29); + this.label162.Name = "label162"; + this.label162.Size = new System.Drawing.Size(104, 16); + this.label162.TabIndex = 2; + this.label162.Text = "Highlight Border"; + // + // label163 + // + this.label163.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label163.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label163.Location = new System.Drawing.Point(6, 0); + this.label163.Name = "label163"; + this.label163.Size = new System.Drawing.Size(301, 29); + this.label163.TabIndex = 1; + this.label163.Text = "Drop-Down Menus"; + this.label163.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel25 + // + this.panel25.Controls.Add(this.panel26); + this.panel25.Controls.Add(this.label164); + this.panel25.Controls.Add(this.panel27); + this.panel25.Controls.Add(this.label165); + this.panel25.Controls.Add(this.panel28); + this.panel25.Controls.Add(this.label166); + this.panel25.Controls.Add(this.panel29); + this.panel25.Controls.Add(this.label167); + this.panel25.Controls.Add(this.panel30); + this.panel25.Controls.Add(this.label168); + this.panel25.Controls.Add(this.panel31); + this.panel25.Controls.Add(this.label169); + this.panel25.Controls.Add(this.panel32); + this.panel25.Controls.Add(this.label170); + this.panel25.Controls.Add(this.panel33); + this.panel25.Controls.Add(this.label171); + this.panel25.Controls.Add(this.panel34); + this.panel25.Controls.Add(this.label172); + this.panel25.Controls.Add(this.label173); + this.panel25.Location = new System.Drawing.Point(139, 43); + this.panel25.Name = "panel25"; + this.panel25.Size = new System.Drawing.Size(311, 256); + this.panel25.TabIndex = 10; + // + // panel26 + // + this.panel26.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel26.Location = new System.Drawing.Point(85, 129); + this.panel26.Name = "panel26"; + this.panel26.Size = new System.Drawing.Size(41, 20); + this.panel26.TabIndex = 17; + // + // label164 + // + this.label164.AutoSize = true; + this.label164.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label164.Location = new System.Drawing.Point(11, 131); + this.label164.Name = "label164"; + this.label164.Size = new System.Drawing.Size(69, 16); + this.label164.TabIndex = 16; + this.label164.Text = "Text Color"; + // + // panel27 + // + this.panel27.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel27.Location = new System.Drawing.Point(228, 104); + this.panel27.Name = "panel27"; + this.panel27.Size = new System.Drawing.Size(41, 20); + this.panel27.TabIndex = 15; + // + // label165 + // + this.label165.AutoSize = true; + this.label165.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label165.Location = new System.Drawing.Point(132, 106); + this.label165.Name = "label165"; + this.label165.Size = new System.Drawing.Size(92, 16); + this.label165.TabIndex = 14; + this.label165.Text = "Dropdown BG"; + // + // panel28 + // + this.panel28.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel28.Location = new System.Drawing.Point(84, 104); + this.panel28.Name = "panel28"; + this.panel28.Size = new System.Drawing.Size(41, 20); + this.panel28.TabIndex = 13; + // + // label166 + // + this.label166.AutoSize = true; + this.label166.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label166.Location = new System.Drawing.Point(10, 106); + this.label166.Name = "label166"; + this.label166.Size = new System.Drawing.Size(72, 16); + this.label166.TabIndex = 12; + this.label166.Text = "Status End"; + // + // panel29 + // + this.panel29.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel29.Location = new System.Drawing.Point(254, 81); + this.panel29.Name = "panel29"; + this.panel29.Size = new System.Drawing.Size(41, 20); + this.panel29.TabIndex = 11; + // + // label167 + // + this.label167.AutoSize = true; + this.label167.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label167.Location = new System.Drawing.Point(169, 81); + this.label167.Name = "label167"; + this.label167.Size = new System.Drawing.Size(83, 16); + this.label167.TabIndex = 10; + this.label167.Text = "Status Begin"; + // + // panel30 + // + this.panel30.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel30.Location = new System.Drawing.Point(254, 55); + this.panel30.Name = "panel30"; + this.panel30.Size = new System.Drawing.Size(41, 20); + this.panel30.TabIndex = 9; + // + // label168 + // + this.label168.AutoSize = true; + this.label168.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label168.Location = new System.Drawing.Point(161, 55); + this.label168.Name = "label168"; + this.label168.Size = new System.Drawing.Size(87, 16); + this.label168.TabIndex = 8; + this.label168.Text = "Tool Bar End"; + // + // panel31 + // + this.panel31.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel31.Location = new System.Drawing.Point(117, 80); + this.panel31.Name = "panel31"; + this.panel31.Size = new System.Drawing.Size(41, 20); + this.panel31.TabIndex = 7; + // + // label169 + // + this.label169.AutoSize = true; + this.label169.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label169.Location = new System.Drawing.Point(12, 80); + this.label169.Name = "label169"; + this.label169.Size = new System.Drawing.Size(104, 16); + this.label169.TabIndex = 6; + this.label169.Text = "Tool Bar Middle"; + // + // panel32 + // + this.panel32.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel32.Location = new System.Drawing.Point(117, 55); + this.panel32.Name = "panel32"; + this.panel32.Size = new System.Drawing.Size(41, 20); + this.panel32.TabIndex = 5; + // + // label170 + // + this.label170.AutoSize = true; + this.label170.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label170.Location = new System.Drawing.Point(12, 55); + this.label170.Name = "label170"; + this.label170.Size = new System.Drawing.Size(98, 16); + this.label170.TabIndex = 4; + this.label170.Text = "Tool Bar Begin"; + // + // panel33 + // + this.panel33.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel33.Location = new System.Drawing.Point(249, 29); + this.panel33.Name = "panel33"; + this.panel33.Size = new System.Drawing.Size(41, 20); + this.panel33.TabIndex = 5; + // + // label171 + // + this.label171.AutoSize = true; + this.label171.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label171.Location = new System.Drawing.Point(156, 29); + this.label171.Name = "label171"; + this.label171.Size = new System.Drawing.Size(92, 16); + this.label171.TabIndex = 4; + this.label171.Text = "Menu Bar End"; + // + // panel34 + // + this.panel34.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel34.Location = new System.Drawing.Point(115, 29); + this.panel34.Name = "panel34"; + this.panel34.Size = new System.Drawing.Size(41, 20); + this.panel34.TabIndex = 3; + // + // label172 + // + this.label172.AutoSize = true; + this.label172.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label172.Location = new System.Drawing.Point(10, 29); + this.label172.Name = "label172"; + this.label172.Size = new System.Drawing.Size(103, 16); + this.label172.TabIndex = 2; + this.label172.Text = "Menu Bar Begin"; + // + // label173 + // + this.label173.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label173.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label173.Location = new System.Drawing.Point(6, 0); + this.label173.Name = "label173"; + this.label173.Size = new System.Drawing.Size(301, 29); + this.label173.TabIndex = 1; + this.label173.Text = "The Basics"; + this.label173.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel36 + // + this.panel36.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.panel36.Controls.Add(this.btnfancydragging); + this.panel36.Controls.Add(this.btnfancywindows); + this.panel36.Location = new System.Drawing.Point(6, 42); + this.panel36.Name = "panel36"; + this.panel36.Size = new System.Drawing.Size(128, 257); + this.panel36.TabIndex = 9; + // + // btnfancydragging + // + this.btnfancydragging.BackColor = System.Drawing.Color.White; + this.btnfancydragging.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnfancydragging.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnfancydragging.Location = new System.Drawing.Point(4, 35); + this.btnfancydragging.Name = "btnfancydragging"; + this.btnfancydragging.Size = new System.Drawing.Size(119, 29); + this.btnfancydragging.TabIndex = 5; + this.btnfancydragging.Text = "Fancy Dragging"; + this.btnfancydragging.UseVisualStyleBackColor = false; + this.btnfancydragging.Click += new System.EventHandler(this.btnfancydragging_Click); + // + // btnfancywindows + // + this.btnfancywindows.BackColor = System.Drawing.Color.White; + this.btnfancywindows.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnfancywindows.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnfancywindows.Location = new System.Drawing.Point(4, 0); + this.btnfancywindows.Name = "btnfancywindows"; + this.btnfancywindows.Size = new System.Drawing.Size(119, 29); + this.btnfancywindows.TabIndex = 4; + this.btnfancywindows.Text = "Animations"; + this.btnfancywindows.UseVisualStyleBackColor = false; + this.btnfancywindows.Click += new System.EventHandler(this.btnfancywindows_Click); + // + // label176 + // + this.label176.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label176.Location = new System.Drawing.Point(72, 0); + this.label176.Name = "label176"; + this.label176.Size = new System.Drawing.Size(332, 29); + this.label176.TabIndex = 0; + this.label176.Text = "Fancy Effects"; + // + // pnlmenus + // + this.pnlmenus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlmenus.BackColor = System.Drawing.Color.White; + this.pnlmenus.Controls.Add(this.pnladvanced); + this.pnlmenus.Controls.Add(this.pnlmore); + this.pnlmenus.Controls.Add(this.pnldropdown); + this.pnlmenus.Controls.Add(this.pnlbasic); + this.pnlmenus.Controls.Add(this.pnlmenusintro); + this.pnlmenus.Controls.Add(this.pnlmenucategories); + this.pnlmenus.Controls.Add(this.label74); + this.pnlmenus.Location = new System.Drawing.Point(134, 9); + this.pnlmenus.Name = "pnlmenus"; + this.pnlmenus.Size = new System.Drawing.Size(457, 306); + this.pnlmenus.TabIndex = 19; + // + // pnladvanced + // + this.pnladvanced.Controls.Add(this.btnmorebuttons); + this.pnladvanced.Controls.Add(this.pnlbuttonchecked); + this.pnladvanced.Controls.Add(this.label136); + this.pnladvanced.Controls.Add(this.pnlitemselectedend); + this.pnladvanced.Controls.Add(this.label129); + this.pnladvanced.Controls.Add(this.pnlbuttonpressed); + this.pnladvanced.Controls.Add(this.label130); + this.pnladvanced.Controls.Add(this.pnlitemselectedbegin); + this.pnladvanced.Controls.Add(this.label131); + this.pnladvanced.Controls.Add(this.pnlitemselected); + this.pnladvanced.Controls.Add(this.label132); + this.pnladvanced.Controls.Add(this.pnlbuttonselected); + this.pnladvanced.Controls.Add(this.label133); + this.pnladvanced.Controls.Add(this.pnlcheckbg); + this.pnladvanced.Controls.Add(this.label134); + this.pnladvanced.Controls.Add(this.label135); + this.pnladvanced.Location = new System.Drawing.Point(139, 43); + this.pnladvanced.Name = "pnladvanced"; + this.pnladvanced.Size = new System.Drawing.Size(311, 256); + this.pnladvanced.TabIndex = 13; + // + // btnmorebuttons + // + this.btnmorebuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmorebuttons.Font = new System.Drawing.Font("Cambria", 11.25F); + this.btnmorebuttons.Location = new System.Drawing.Point(216, 195); + this.btnmorebuttons.Name = "btnmorebuttons"; + this.btnmorebuttons.Size = new System.Drawing.Size(90, 32); + this.btnmorebuttons.TabIndex = 18; + this.btnmorebuttons.Text = "More >>"; + this.btnmorebuttons.UseVisualStyleBackColor = true; + this.btnmorebuttons.Click += new System.EventHandler(this.btnmorebuttons_Click); + // + // pnlbuttonchecked + // + this.pnlbuttonchecked.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbuttonchecked.Location = new System.Drawing.Point(115, 153); + this.pnlbuttonchecked.Name = "pnlbuttonchecked"; + this.pnlbuttonchecked.Size = new System.Drawing.Size(41, 20); + this.pnlbuttonchecked.TabIndex = 11; + this.pnlbuttonchecked.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonCheckBG); + // + // label136 + // + this.label136.AutoSize = true; + this.label136.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label136.Location = new System.Drawing.Point(10, 153); + this.label136.Name = "label136"; + this.label136.Size = new System.Drawing.Size(102, 16); + this.label136.TabIndex = 10; + this.label136.Text = "Button Checked"; + // + // pnlitemselectedend + // + this.pnlitemselectedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlitemselectedend.Location = new System.Drawing.Point(134, 83); + this.pnlitemselectedend.Name = "pnlitemselectedend"; + this.pnlitemselectedend.Size = new System.Drawing.Size(41, 20); + this.pnlitemselectedend.TabIndex = 11; + this.pnlitemselectedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelectedEnd); + // + // label129 + // + this.label129.AutoSize = true; + this.label129.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label129.Location = new System.Drawing.Point(12, 85); + this.label129.Name = "label129"; + this.label129.Size = new System.Drawing.Size(117, 16); + this.label129.TabIndex = 10; + this.label129.Text = "Item Selected End"; + // + // pnlbuttonpressed + // + this.pnlbuttonpressed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbuttonpressed.Location = new System.Drawing.Point(117, 207); + this.pnlbuttonpressed.Name = "pnlbuttonpressed"; + this.pnlbuttonpressed.Size = new System.Drawing.Size(41, 20); + this.pnlbuttonpressed.TabIndex = 9; + this.pnlbuttonpressed.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonPressedBG); + // + // label130 + // + this.label130.AutoSize = true; + this.label130.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label130.Location = new System.Drawing.Point(12, 207); + this.label130.Name = "label130"; + this.label130.Size = new System.Drawing.Size(99, 16); + this.label130.TabIndex = 8; + this.label130.Text = "Button Pressed"; + // + // pnlitemselectedbegin + // + this.pnlitemselectedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlitemselectedbegin.Location = new System.Drawing.Point(143, 56); + this.pnlitemselectedbegin.Name = "pnlitemselectedbegin"; + this.pnlitemselectedbegin.Size = new System.Drawing.Size(41, 20); + this.pnlitemselectedbegin.TabIndex = 7; + this.pnlitemselectedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelectedBegin); + // + // label131 + // + this.label131.AutoSize = true; + this.label131.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label131.Location = new System.Drawing.Point(10, 58); + this.label131.Name = "label131"; + this.label131.Size = new System.Drawing.Size(128, 16); + this.label131.TabIndex = 6; + this.label131.Text = "Item Selected Begin"; + // + // pnlitemselected + // + this.pnlitemselected.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlitemselected.Location = new System.Drawing.Point(240, 29); + this.pnlitemselected.Name = "pnlitemselected"; + this.pnlitemselected.Size = new System.Drawing.Size(41, 20); + this.pnlitemselected.TabIndex = 5; + this.pnlitemselected.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelected); + // + // label132 + // + this.label132.AutoSize = true; + this.label132.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label132.Location = new System.Drawing.Point(147, 32); + this.label132.Name = "label132"; + this.label132.Size = new System.Drawing.Size(90, 16); + this.label132.TabIndex = 4; + this.label132.Text = "Item Selected"; + // + // pnlbuttonselected + // + this.pnlbuttonselected.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbuttonselected.Location = new System.Drawing.Point(110, 181); + this.pnlbuttonselected.Name = "pnlbuttonselected"; + this.pnlbuttonselected.Size = new System.Drawing.Size(41, 20); + this.pnlbuttonselected.TabIndex = 5; + this.pnlbuttonselected.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonSelectedBG); + // + // label133 + // + this.label133.AutoSize = true; + this.label133.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label133.Location = new System.Drawing.Point(7, 181); + this.label133.Name = "label133"; + this.label133.Size = new System.Drawing.Size(102, 16); + this.label133.TabIndex = 4; + this.label133.Text = "Button Selected"; + // + // pnlcheckbg + // + this.pnlcheckbg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlcheckbg.Location = new System.Drawing.Point(79, 29); + this.pnlcheckbg.Name = "pnlcheckbg"; + this.pnlcheckbg.Size = new System.Drawing.Size(41, 20); + this.pnlcheckbg.TabIndex = 3; + this.pnlcheckbg.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetCheckBG); + // + // label134 + // + this.label134.AutoSize = true; + this.label134.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label134.Location = new System.Drawing.Point(10, 29); + this.label134.Name = "label134"; + this.label134.Size = new System.Drawing.Size(68, 16); + this.label134.TabIndex = 2; + this.label134.Text = "Check BG"; + // + // label135 + // + this.label135.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label135.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label135.Location = new System.Drawing.Point(6, 0); + this.label135.Name = "label135"; + this.label135.Size = new System.Drawing.Size(301, 29); + this.label135.TabIndex = 1; + this.label135.Text = "Advanced"; + this.label135.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlmore + // + this.pnlmore.Controls.Add(this.pnlpressedbegin); + this.pnlmore.Controls.Add(this.btnback); + this.pnlmore.Controls.Add(this.label138); + this.pnlmore.Controls.Add(this.pnlselectedbegin); + this.pnlmore.Controls.Add(this.pnlpressedend); + this.pnlmore.Controls.Add(this.label137); + this.pnlmore.Controls.Add(this.label139); + this.pnlmore.Controls.Add(this.pnlselectedend); + this.pnlmore.Controls.Add(this.pnlpressedmiddle); + this.pnlmore.Controls.Add(this.label140); + this.pnlmore.Controls.Add(this.label142); + this.pnlmore.Controls.Add(this.pnlselectedmiddle); + this.pnlmore.Controls.Add(this.label145); + this.pnlmore.Controls.Add(this.label147); + this.pnlmore.Location = new System.Drawing.Point(139, 43); + this.pnlmore.Name = "pnlmore"; + this.pnlmore.Size = new System.Drawing.Size(311, 256); + this.pnlmore.TabIndex = 14; + // + // pnlpressedbegin + // + this.pnlpressedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpressedbegin.Location = new System.Drawing.Point(170, 107); + this.pnlpressedbegin.Name = "pnlpressedbegin"; + this.pnlpressedbegin.Size = new System.Drawing.Size(41, 20); + this.pnlpressedbegin.TabIndex = 17; + this.pnlpressedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedBegin); + // + // btnback + // + this.btnback.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnback.Font = new System.Drawing.Font("Cambria", 11.25F); + this.btnback.Location = new System.Drawing.Point(6, 184); + this.btnback.Name = "btnback"; + this.btnback.Size = new System.Drawing.Size(90, 32); + this.btnback.TabIndex = 18; + this.btnback.Text = "<< Back"; + this.btnback.UseVisualStyleBackColor = true; + this.btnback.Click += new System.EventHandler(this.btnadvanced_Click); + // + // label138 + // + this.label138.AutoSize = true; + this.label138.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label138.Location = new System.Drawing.Point(13, 108); + this.label138.Name = "label138"; + this.label138.Size = new System.Drawing.Size(151, 16); + this.label138.TabIndex = 16; + this.label138.Text = "Pressed Gradient Begin"; + // + // pnlselectedbegin + // + this.pnlselectedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlselectedbegin.Location = new System.Drawing.Point(169, 29); + this.pnlselectedbegin.Name = "pnlselectedbegin"; + this.pnlselectedbegin.Size = new System.Drawing.Size(41, 20); + this.pnlselectedbegin.TabIndex = 11; + this.pnlselectedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedBegin); + // + // pnlpressedend + // + this.pnlpressedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpressedend.Location = new System.Drawing.Point(162, 159); + this.pnlpressedend.Name = "pnlpressedend"; + this.pnlpressedend.Size = new System.Drawing.Size(41, 20); + this.pnlpressedend.TabIndex = 15; + this.pnlpressedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedEnd); + // + // label137 + // + this.label137.AutoSize = true; + this.label137.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label137.Location = new System.Drawing.Point(12, 30); + this.label137.Name = "label137"; + this.label137.Size = new System.Drawing.Size(154, 16); + this.label137.TabIndex = 10; + this.label137.Text = "Selected Gradient Begin"; + // + // label139 + // + this.label139.AutoSize = true; + this.label139.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label139.Location = new System.Drawing.Point(15, 162); + this.label139.Name = "label139"; + this.label139.Size = new System.Drawing.Size(140, 16); + this.label139.TabIndex = 14; + this.label139.Text = "Pressed Gradient End"; + // + // pnlselectedend + // + this.pnlselectedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlselectedend.Location = new System.Drawing.Point(161, 81); + this.pnlselectedend.Name = "pnlselectedend"; + this.pnlselectedend.Size = new System.Drawing.Size(41, 20); + this.pnlselectedend.TabIndex = 9; + this.pnlselectedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedEnd); + // + // pnlpressedmiddle + // + this.pnlpressedmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpressedmiddle.Location = new System.Drawing.Point(179, 134); + this.pnlpressedmiddle.Name = "pnlpressedmiddle"; + this.pnlpressedmiddle.Size = new System.Drawing.Size(41, 20); + this.pnlpressedmiddle.TabIndex = 13; + this.pnlpressedmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedMiddle); + // + // label140 + // + this.label140.AutoSize = true; + this.label140.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label140.Location = new System.Drawing.Point(16, 138); + this.label140.Name = "label140"; + this.label140.Size = new System.Drawing.Size(157, 16); + this.label140.TabIndex = 12; + this.label140.Text = "Pressed Gradient Middle"; + // + // label142 + // + this.label142.AutoSize = true; + this.label142.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label142.Location = new System.Drawing.Point(14, 84); + this.label142.Name = "label142"; + this.label142.Size = new System.Drawing.Size(143, 16); + this.label142.TabIndex = 8; + this.label142.Text = "Selected Gradient End"; + // + // pnlselectedmiddle + // + this.pnlselectedmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlselectedmiddle.Location = new System.Drawing.Point(182, 56); + this.pnlselectedmiddle.Name = "pnlselectedmiddle"; + this.pnlselectedmiddle.Size = new System.Drawing.Size(41, 20); + this.pnlselectedmiddle.TabIndex = 5; + this.pnlselectedmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedMiddle); + // + // label145 + // + this.label145.AutoSize = true; + this.label145.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label145.Location = new System.Drawing.Point(18, 58); + this.label145.Name = "label145"; + this.label145.Size = new System.Drawing.Size(160, 16); + this.label145.TabIndex = 4; + this.label145.Text = "Selected Gradient Middle"; + // + // label147 + // + this.label147.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label147.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label147.Location = new System.Drawing.Point(6, 0); + this.label147.Name = "label147"; + this.label147.Size = new System.Drawing.Size(301, 29); + this.label147.TabIndex = 1; + this.label147.Text = "Advanced"; + this.label147.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnldropdown + // + this.pnldropdown.Controls.Add(this.pnlddborder); + this.pnldropdown.Controls.Add(this.label117); + this.pnldropdown.Controls.Add(this.pnlmarginend); + this.pnldropdown.Controls.Add(this.label120); + this.pnldropdown.Controls.Add(this.pnlmarginmiddle); + this.pnldropdown.Controls.Add(this.label121); + this.pnldropdown.Controls.Add(this.pnlmarginbegin); + this.pnldropdown.Controls.Add(this.label122); + this.pnldropdown.Controls.Add(this.pnlhcolor); + this.pnldropdown.Controls.Add(this.label123); + this.pnldropdown.Controls.Add(this.pnlhborder); + this.pnldropdown.Controls.Add(this.label125); + this.pnldropdown.Controls.Add(this.label126); + this.pnldropdown.Location = new System.Drawing.Point(139, 43); + this.pnldropdown.Name = "pnldropdown"; + this.pnldropdown.Size = new System.Drawing.Size(311, 256); + this.pnldropdown.TabIndex = 12; + // + // pnlddborder + // + this.pnlddborder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlddborder.Location = new System.Drawing.Point(216, 80); + this.pnlddborder.Name = "pnlddborder"; + this.pnlddborder.Size = new System.Drawing.Size(41, 20); + this.pnlddborder.TabIndex = 11; + this.pnlddborder.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuBorder); + // + // label117 + // + this.label117.AutoSize = true; + this.label117.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label117.Location = new System.Drawing.Point(167, 81); + this.label117.Name = "label117"; + this.label117.Size = new System.Drawing.Size(49, 16); + this.label117.TabIndex = 10; + this.label117.Text = "Border"; + // + // pnlmarginend + // + this.pnlmarginend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmarginend.Location = new System.Drawing.Point(224, 55); + this.pnlmarginend.Name = "pnlmarginend"; + this.pnlmarginend.Size = new System.Drawing.Size(41, 20); + this.pnlmarginend.TabIndex = 9; + this.pnlmarginend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginEnd); + // + // label120 + // + this.label120.AutoSize = true; + this.label120.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label120.Location = new System.Drawing.Point(148, 56); + this.label120.Name = "label120"; + this.label120.Size = new System.Drawing.Size(76, 16); + this.label120.TabIndex = 8; + this.label120.Text = "Margin End"; + // + // pnlmarginmiddle + // + this.pnlmarginmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmarginmiddle.Location = new System.Drawing.Point(117, 80); + this.pnlmarginmiddle.Name = "pnlmarginmiddle"; + this.pnlmarginmiddle.Size = new System.Drawing.Size(41, 20); + this.pnlmarginmiddle.TabIndex = 7; + this.pnlmarginmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginMiddle); + // + // label121 + // + this.label121.AutoSize = true; + this.label121.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label121.Location = new System.Drawing.Point(12, 80); + this.label121.Name = "label121"; + this.label121.Size = new System.Drawing.Size(93, 16); + this.label121.TabIndex = 6; + this.label121.Text = "Margin Middle"; + // + // pnlmarginbegin + // + this.pnlmarginbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmarginbegin.Location = new System.Drawing.Point(101, 55); + this.pnlmarginbegin.Name = "pnlmarginbegin"; + this.pnlmarginbegin.Size = new System.Drawing.Size(41, 20); + this.pnlmarginbegin.TabIndex = 5; + this.pnlmarginbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginBegin); + // + // label122 + // + this.label122.AutoSize = true; + this.label122.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label122.Location = new System.Drawing.Point(12, 55); + this.label122.Name = "label122"; + this.label122.Size = new System.Drawing.Size(87, 16); + this.label122.TabIndex = 4; + this.label122.Text = "Margin Begin"; + // + // pnlhcolor + // + this.pnlhcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlhcolor.Location = new System.Drawing.Point(249, 29); + this.pnlhcolor.Name = "pnlhcolor"; + this.pnlhcolor.Size = new System.Drawing.Size(41, 20); + this.pnlhcolor.TabIndex = 5; + this.pnlhcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.HighlightColor); + // + // label123 + // + this.label123.AutoSize = true; + this.label123.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label123.Location = new System.Drawing.Point(156, 29); + this.label123.Name = "label123"; + this.label123.Size = new System.Drawing.Size(95, 16); + this.label123.TabIndex = 4; + this.label123.Text = "Highlight Color"; + // + // pnlhborder + // + this.pnlhborder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlhborder.Location = new System.Drawing.Point(115, 29); + this.pnlhborder.Name = "pnlhborder"; + this.pnlhborder.Size = new System.Drawing.Size(41, 20); + this.pnlhborder.TabIndex = 3; + this.pnlhborder.MouseDown += new System.Windows.Forms.MouseEventHandler(this.HighlightBorder); + // + // label125 + // + this.label125.AutoSize = true; + this.label125.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label125.Location = new System.Drawing.Point(10, 29); + this.label125.Name = "label125"; + this.label125.Size = new System.Drawing.Size(104, 16); + this.label125.TabIndex = 2; + this.label125.Text = "Highlight Border"; + // + // label126 + // + this.label126.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label126.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label126.Location = new System.Drawing.Point(6, 0); + this.label126.Name = "label126"; + this.label126.Size = new System.Drawing.Size(301, 29); + this.label126.TabIndex = 1; + this.label126.Text = "Drop-Down Menus"; + this.label126.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlbasic + // + this.pnlbasic.Controls.Add(this.pnlmenutextcolor); + this.pnlbasic.Controls.Add(this.label118); + this.pnlbasic.Controls.Add(this.pnldropdownbg); + this.pnlbasic.Controls.Add(this.label115); + this.pnlbasic.Controls.Add(this.pnlstatusend); + this.pnlbasic.Controls.Add(this.label114); + this.pnlbasic.Controls.Add(this.pnlstatusbegin); + this.pnlbasic.Controls.Add(this.label107); + this.pnlbasic.Controls.Add(this.pnltoolbarend); + this.pnlbasic.Controls.Add(this.label77); + this.pnlbasic.Controls.Add(this.pnltoolbarmiddle); + this.pnlbasic.Controls.Add(this.label76); + this.pnlbasic.Controls.Add(this.pnltoolbarbegin); + this.pnlbasic.Controls.Add(this.label75); + this.pnlbasic.Controls.Add(this.pnlmenubarend); + this.pnlbasic.Controls.Add(this.label73); + this.pnlbasic.Controls.Add(this.pnlmenubarbegin); + this.pnlbasic.Controls.Add(this.label42); + this.pnlbasic.Controls.Add(this.label41); + this.pnlbasic.Location = new System.Drawing.Point(139, 43); + this.pnlbasic.Name = "pnlbasic"; + this.pnlbasic.Size = new System.Drawing.Size(311, 256); + this.pnlbasic.TabIndex = 10; + // + // pnlmenutextcolor + // + this.pnlmenutextcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmenutextcolor.Location = new System.Drawing.Point(85, 129); + this.pnlmenutextcolor.Name = "pnlmenutextcolor"; + this.pnlmenutextcolor.Size = new System.Drawing.Size(41, 20); + this.pnlmenutextcolor.TabIndex = 17; + this.pnlmenutextcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetMenuTextColor); + // + // label118 + // + this.label118.AutoSize = true; + this.label118.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label118.Location = new System.Drawing.Point(11, 131); + this.label118.Name = "label118"; + this.label118.Size = new System.Drawing.Size(69, 16); + this.label118.TabIndex = 16; + this.label118.Text = "Text Color"; + // + // pnldropdownbg + // + this.pnldropdownbg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnldropdownbg.Location = new System.Drawing.Point(228, 104); + this.pnldropdownbg.Name = "pnldropdownbg"; + this.pnldropdownbg.Size = new System.Drawing.Size(41, 20); + this.pnldropdownbg.TabIndex = 15; + this.pnldropdownbg.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DropDownBG); + // + // label115 + // + this.label115.AutoSize = true; + this.label115.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label115.Location = new System.Drawing.Point(132, 106); + this.label115.Name = "label115"; + this.label115.Size = new System.Drawing.Size(92, 16); + this.label115.TabIndex = 14; + this.label115.Text = "Dropdown BG"; + // + // pnlstatusend + // + this.pnlstatusend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlstatusend.Location = new System.Drawing.Point(84, 104); + this.pnlstatusend.Name = "pnlstatusend"; + this.pnlstatusend.Size = new System.Drawing.Size(41, 20); + this.pnlstatusend.TabIndex = 13; + this.pnlstatusend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.StatusEnd); + // + // label114 + // + this.label114.AutoSize = true; + this.label114.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label114.Location = new System.Drawing.Point(10, 106); + this.label114.Name = "label114"; + this.label114.Size = new System.Drawing.Size(72, 16); + this.label114.TabIndex = 12; + this.label114.Text = "Status End"; + // + // pnlstatusbegin + // + this.pnlstatusbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlstatusbegin.Location = new System.Drawing.Point(254, 81); + this.pnlstatusbegin.Name = "pnlstatusbegin"; + this.pnlstatusbegin.Size = new System.Drawing.Size(41, 20); + this.pnlstatusbegin.TabIndex = 11; + this.pnlstatusbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.StatusBegin); + // + // label107 + // + this.label107.AutoSize = true; + this.label107.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label107.Location = new System.Drawing.Point(169, 81); + this.label107.Name = "label107"; + this.label107.Size = new System.Drawing.Size(83, 16); + this.label107.TabIndex = 10; + this.label107.Text = "Status Begin"; + // + // pnltoolbarend + // + this.pnltoolbarend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltoolbarend.Location = new System.Drawing.Point(254, 55); + this.pnltoolbarend.Name = "pnltoolbarend"; + this.pnltoolbarend.Size = new System.Drawing.Size(41, 20); + this.pnltoolbarend.TabIndex = 9; + this.pnltoolbarend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarEnd); + // + // label77 + // + this.label77.AutoSize = true; + this.label77.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label77.Location = new System.Drawing.Point(161, 55); + this.label77.Name = "label77"; + this.label77.Size = new System.Drawing.Size(87, 16); + this.label77.TabIndex = 8; + this.label77.Text = "Tool Bar End"; + // + // pnltoolbarmiddle + // + this.pnltoolbarmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltoolbarmiddle.Location = new System.Drawing.Point(117, 80); + this.pnltoolbarmiddle.Name = "pnltoolbarmiddle"; + this.pnltoolbarmiddle.Size = new System.Drawing.Size(41, 20); + this.pnltoolbarmiddle.TabIndex = 7; + this.pnltoolbarmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarMiddle); + // + // label76 + // + this.label76.AutoSize = true; + this.label76.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label76.Location = new System.Drawing.Point(12, 80); + this.label76.Name = "label76"; + this.label76.Size = new System.Drawing.Size(104, 16); + this.label76.TabIndex = 6; + this.label76.Text = "Tool Bar Middle"; + // + // pnltoolbarbegin + // + this.pnltoolbarbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltoolbarbegin.Location = new System.Drawing.Point(117, 55); + this.pnltoolbarbegin.Name = "pnltoolbarbegin"; + this.pnltoolbarbegin.Size = new System.Drawing.Size(41, 20); + this.pnltoolbarbegin.TabIndex = 5; + this.pnltoolbarbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarBegin); + // + // label75 + // + this.label75.AutoSize = true; + this.label75.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label75.Location = new System.Drawing.Point(12, 55); + this.label75.Name = "label75"; + this.label75.Size = new System.Drawing.Size(98, 16); + this.label75.TabIndex = 4; + this.label75.Text = "Tool Bar Begin"; + // + // pnlmenubarend + // + this.pnlmenubarend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmenubarend.Location = new System.Drawing.Point(249, 29); + this.pnlmenubarend.Name = "pnlmenubarend"; + this.pnlmenubarend.Size = new System.Drawing.Size(41, 20); + this.pnlmenubarend.TabIndex = 5; + this.pnlmenubarend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuEnd); + // + // label73 + // + this.label73.AutoSize = true; + this.label73.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label73.Location = new System.Drawing.Point(156, 29); + this.label73.Name = "label73"; + this.label73.Size = new System.Drawing.Size(92, 16); + this.label73.TabIndex = 4; + this.label73.Text = "Menu Bar End"; + // + // pnlmenubarbegin + // + this.pnlmenubarbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmenubarbegin.Location = new System.Drawing.Point(115, 29); + this.pnlmenubarbegin.Name = "pnlmenubarbegin"; + this.pnlmenubarbegin.Size = new System.Drawing.Size(41, 20); + this.pnlmenubarbegin.TabIndex = 3; + this.pnlmenubarbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuBegin); + // + // label42 + // + this.label42.AutoSize = true; + this.label42.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label42.Location = new System.Drawing.Point(10, 29); + this.label42.Name = "label42"; + this.label42.Size = new System.Drawing.Size(103, 16); + this.label42.TabIndex = 2; + this.label42.Text = "Menu Bar Begin"; + // + // label41 + // + this.label41.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label41.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label41.Location = new System.Drawing.Point(6, 0); + this.label41.Name = "label41"; + this.label41.Size = new System.Drawing.Size(301, 29); + this.label41.TabIndex = 1; + this.label41.Text = "The Basics"; + this.label41.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlmenusintro + // + this.pnlmenusintro.Controls.Add(this.label116); + this.pnlmenusintro.Controls.Add(this.label124); + this.pnlmenusintro.Location = new System.Drawing.Point(139, 43); + this.pnlmenusintro.Name = "pnlmenusintro"; + this.pnlmenusintro.Size = new System.Drawing.Size(311, 256); + this.pnlmenusintro.TabIndex = 11; + // + // label116 + // + this.label116.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label116.BackColor = System.Drawing.Color.Transparent; + this.label116.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label116.Location = new System.Drawing.Point(6, 29); + this.label116.Name = "label116"; + this.label116.Size = new System.Drawing.Size(300, 221); + this.label116.TabIndex = 4; + this.label116.Text = resources.GetString("label116.Text"); + this.label116.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label124 + // + this.label124.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label124.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label124.Location = new System.Drawing.Point(6, 0); + this.label124.Name = "label124"; + this.label124.Size = new System.Drawing.Size(301, 29); + this.label124.TabIndex = 1; + this.label124.Text = "Menus - Intro"; + this.label124.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlmenucategories + // + this.pnlmenucategories.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.pnlmenucategories.Controls.Add(this.btnmisc); + this.pnlmenucategories.Controls.Add(this.btnadvanced); + this.pnlmenucategories.Controls.Add(this.btndropdown); + this.pnlmenucategories.Controls.Add(this.btnbasic); + this.pnlmenucategories.Location = new System.Drawing.Point(6, 42); + this.pnlmenucategories.Name = "pnlmenucategories"; + this.pnlmenucategories.Size = new System.Drawing.Size(128, 257); + this.pnlmenucategories.TabIndex = 9; + // + // btnmisc + // + this.btnmisc.BackColor = System.Drawing.Color.White; + this.btnmisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmisc.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnmisc.Location = new System.Drawing.Point(4, 105); + this.btnmisc.Name = "btnmisc"; + this.btnmisc.Size = new System.Drawing.Size(119, 29); + this.btnmisc.TabIndex = 7; + this.btnmisc.Text = "Misc."; + this.btnmisc.UseVisualStyleBackColor = false; + // + // btnadvanced + // + this.btnadvanced.BackColor = System.Drawing.Color.White; + this.btnadvanced.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnadvanced.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnadvanced.Location = new System.Drawing.Point(4, 70); + this.btnadvanced.Name = "btnadvanced"; + this.btnadvanced.Size = new System.Drawing.Size(119, 29); + this.btnadvanced.TabIndex = 6; + this.btnadvanced.Text = "Advanced"; + this.btnadvanced.UseVisualStyleBackColor = false; + this.btnadvanced.Click += new System.EventHandler(this.btnadvanced_Click); + // + // btndropdown + // + this.btndropdown.BackColor = System.Drawing.Color.White; + this.btndropdown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndropdown.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndropdown.Location = new System.Drawing.Point(4, 35); + this.btndropdown.Name = "btndropdown"; + this.btndropdown.Size = new System.Drawing.Size(119, 29); + this.btndropdown.TabIndex = 5; + this.btndropdown.Text = "Drop-Downs"; + this.btndropdown.UseVisualStyleBackColor = false; + this.btndropdown.Click += new System.EventHandler(this.btndropdown_Click); + // + // btnbasic + // + this.btnbasic.BackColor = System.Drawing.Color.White; + this.btnbasic.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbasic.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnbasic.Location = new System.Drawing.Point(4, 0); + this.btnbasic.Name = "btnbasic"; + this.btnbasic.Size = new System.Drawing.Size(119, 29); + this.btnbasic.TabIndex = 4; + this.btnbasic.Text = "Basic Customization"; + this.btnbasic.UseVisualStyleBackColor = false; + this.btnbasic.Click += new System.EventHandler(this.btnbasic_Click); + // + // label74 + // + this.label74.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label74.Location = new System.Drawing.Point(72, 0); + this.label74.Name = "label74"; + this.label74.Size = new System.Drawing.Size(332, 29); + this.label74.TabIndex = 0; + this.label74.Text = "Menu Customization"; + // + // tmrfix + // + this.tmrfix.Interval = 5000; + // + // pnlluaoptions + // + this.pnlluaoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlluaoptions.BackColor = System.Drawing.Color.White; + this.pnlluaoptions.Controls.Add(this.pnlluafield); + this.pnlluaoptions.Controls.Add(this.flmorebuttons); + this.pnlluaoptions.Location = new System.Drawing.Point(139, 9); + this.pnlluaoptions.Name = "pnlluaoptions"; + this.pnlluaoptions.Size = new System.Drawing.Size(457, 306); + this.pnlluaoptions.TabIndex = 21; + this.pnlluaoptions.Visible = false; + // + // flmorebuttons + // + this.flmorebuttons.AutoSize = true; + this.flmorebuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flmorebuttons.Dock = System.Windows.Forms.DockStyle.Top; + this.flmorebuttons.Location = new System.Drawing.Point(0, 0); + this.flmorebuttons.Name = "flmorebuttons"; + this.flmorebuttons.Size = new System.Drawing.Size(457, 0); + this.flmorebuttons.TabIndex = 0; + // + // pnlluafield + // + this.pnlluafield.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlluafield.Location = new System.Drawing.Point(0, 0); + this.pnlluafield.Name = "pnlluafield"; + this.pnlluafield.Size = new System.Drawing.Size(457, 306); + this.pnlluafield.TabIndex = 1; + // + // Shifter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(600, 323); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Shifter"; + this.Text = "Shifter"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Shifter_Load); + this.catholder.ResumeLayout(false); + this.pnlshifterintro.ResumeLayout(false); + this.pnlshifterintro.PerformLayout(); + this.pnldesktopoptions.ResumeLayout(false); + this.pnldesktoppaneloptions.ResumeLayout(false); + this.pnldesktoppaneloptions.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.txtdesktoppanelheight)).EndInit(); + this.pnlapplauncheroptions.ResumeLayout(false); + this.pnlapplauncheroptions.PerformLayout(); + this.pnldesktopintro.ResumeLayout(false); + this.pnldesktopintro.PerformLayout(); + this.pnlpanelbuttonsoptions.ResumeLayout(false); + this.pnlpanelbuttonsoptions.PerformLayout(); + this.pnldesktopbackgroundoptions.ResumeLayout(false); + this.pnldesktopbackgroundoptions.PerformLayout(); + this.pnlpanelclockoptions.ResumeLayout(false); + this.pnlpanelclockoptions.PerformLayout(); + this.pnldesktoppreview.ResumeLayout(false); + this.predesktoppanel.ResumeLayout(false); + this.prepnlpanelbuttonholder.ResumeLayout(false); + this.prepnlpanelbutton.ResumeLayout(false); + this.prepnlpanelbutton.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).EndInit(); + this.pretimepanel.ResumeLayout(false); + this.pretimepanel.PerformLayout(); + this.preapplaunchermenuholder.ResumeLayout(false); + this.predesktopappmenu.ResumeLayout(false); + this.predesktopappmenu.PerformLayout(); + this.Panel10.ResumeLayout(false); + this.pnlwindowsoptions.ResumeLayout(false); + this.pnlwindowsintro.ResumeLayout(false); + this.pnlwindowsintro.PerformLayout(); + this.pnlbuttonoptions.ResumeLayout(false); + this.pnlbuttonoptions.PerformLayout(); + this.pnlclosebuttonoptions.ResumeLayout(false); + this.pnlclosebuttonoptions.PerformLayout(); + this.pnlrollupbuttonoptions.ResumeLayout(false); + this.pnlrollupbuttonoptions.PerformLayout(); + this.pnlminimizebuttonoptions.ResumeLayout(false); + this.pnlminimizebuttonoptions.PerformLayout(); + this.pnltitlebaroptions.ResumeLayout(false); + this.pnltitlebaroptions.PerformLayout(); + this.pnlborderoptions.ResumeLayout(false); + this.pnlborderoptions.PerformLayout(); + this.pnltitletextoptions.ResumeLayout(false); + this.pnltitletextoptions.PerformLayout(); + this.pnlwindowsobjects.ResumeLayout(false); + this.pnlwindowpreview.ResumeLayout(false); + this.prepgleft.ResumeLayout(false); + this.prepgright.ResumeLayout(false); + this.pretitlebar.ResumeLayout(false); + this.pretitlebar.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).EndInit(); + this.pnlreset.ResumeLayout(false); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.pnldesktopcomposition.ResumeLayout(false); + this.pnlfancywindows.ResumeLayout(false); + this.pnlfancywindows.PerformLayout(); + this.pnlfancydragging.ResumeLayout(false); + this.pnlfancydragging.PerformLayout(); + this.pnlfancyintro.ResumeLayout(false); + this.panel18.ResumeLayout(false); + this.panel18.PerformLayout(); + this.panel25.ResumeLayout(false); + this.panel25.PerformLayout(); + this.panel36.ResumeLayout(false); + this.pnlmenus.ResumeLayout(false); + this.pnladvanced.ResumeLayout(false); + this.pnladvanced.PerformLayout(); + this.pnlmore.ResumeLayout(false); + this.pnlmore.PerformLayout(); + this.pnldropdown.ResumeLayout(false); + this.pnldropdown.PerformLayout(); + this.pnlbasic.ResumeLayout(false); + this.pnlbasic.PerformLayout(); + this.pnlmenusintro.ResumeLayout(false); + this.pnlmenucategories.ResumeLayout(false); + this.pnlluaoptions.ResumeLayout(false); + this.pnlluaoptions.PerformLayout(); + this.ResumeLayout(false); + + } + private System.Windows.Forms.ColorDialog ColorDialog1; + private System.Windows.Forms.Timer clocktick; + private System.Windows.Forms.Timer customizationtime; + private System.Windows.Forms.Timer timerearned; + private System.Windows.Forms.Label Label1; + private System.Windows.Forms.Button btnapply; + private System.Windows.Forms.Panel catholder; + private System.Windows.Forms.Button btnreset; + private System.Windows.Forms.Button btnmenus; + private System.Windows.Forms.Button btnwindows; + private System.Windows.Forms.Button btndesktop; + private System.Windows.Forms.Panel pnlshifterintro; + private System.Windows.Forms.Label Label66; + private System.Windows.Forms.Label Label65; + private System.Windows.Forms.Label Label64; + private System.Windows.Forms.Label Label63; + private System.Windows.Forms.Panel pnldesktopoptions; + private System.Windows.Forms.Panel pnlpanelbuttonsoptions; + private System.Windows.Forms.Panel pnlpanelbuttontextcolour; + private System.Windows.Forms.Label Label101; + private System.Windows.Forms.TextBox txtpanelbuttontexttop; + private System.Windows.Forms.Label Label104; + private System.Windows.Forms.TextBox txtpanelbuttontextside; + private System.Windows.Forms.Label Label106; + private System.Windows.Forms.Label Label93; + private System.Windows.Forms.TextBox txtpanelbuttontop; + private System.Windows.Forms.Label Label94; + private System.Windows.Forms.TextBox txtpanelbuttoninitalgap; + private System.Windows.Forms.Label Label108; + private System.Windows.Forms.TextBox txtpanelbuttonicontop; + private System.Windows.Forms.Label Label110; + private System.Windows.Forms.TextBox txtpanelbuttoniconside; + private System.Windows.Forms.Label Label112; + private System.Windows.Forms.TextBox txtpanelbuttoniconsize; + private System.Windows.Forms.TextBox txtpanelbuttoniconheight; + private System.Windows.Forms.Label Label105; + private System.Windows.Forms.ComboBox cbpanelbuttontextstyle; + private System.Windows.Forms.ComboBox cbpanelbuttonfont; + private System.Windows.Forms.Label Label100; + private System.Windows.Forms.TextBox txtpaneltextbuttonsize; + private System.Windows.Forms.Label Label102; + private System.Windows.Forms.Label Label103; + private System.Windows.Forms.Label Label98; + private System.Windows.Forms.TextBox txtpanelbuttongap; + private System.Windows.Forms.Label Label99; + private System.Windows.Forms.Label Label96; + private System.Windows.Forms.TextBox txtpanelbuttonheight; + private System.Windows.Forms.Label Label97; + private System.Windows.Forms.Label Label92; + private System.Windows.Forms.TextBox txtpanelbuttonwidth; + private System.Windows.Forms.Label Label91; + private System.Windows.Forms.Panel pnlpanelbuttoncolour; + private System.Windows.Forms.Label Label95; + private System.Windows.Forms.Panel pnldesktoppaneloptions; + private System.Windows.Forms.Button btnpanelbuttons; + private System.Windows.Forms.Label lbwarning; + private System.Windows.Forms.ComboBox combodesktoppanelposition; + private System.Windows.Forms.Label lbposition; + private System.Windows.Forms.Label Label47; + private System.Windows.Forms.NumericUpDown txtdesktoppanelheight; + private System.Windows.Forms.Label lbheight; + private System.Windows.Forms.Panel pnldesktoppanelcolour; + private System.Windows.Forms.Label lbpanelcolor; + private System.Windows.Forms.Panel pnlapplauncheroptions; + private System.Windows.Forms.Label Label71; + private System.Windows.Forms.TextBox txtapplauncherwidth; + private System.Windows.Forms.Label Label72; + private System.Windows.Forms.TextBox txtappbuttonlabel; + private System.Windows.Forms.Label Label51; + private System.Windows.Forms.Label Label50; + private System.Windows.Forms.Panel pnlmaintextcolour; + private System.Windows.Forms.ComboBox comboappbuttontextstyle; + private System.Windows.Forms.ComboBox comboappbuttontextfont; + private System.Windows.Forms.Label Label37; + private System.Windows.Forms.Label Label38; + private System.Windows.Forms.TextBox txtappbuttontextsize; + private System.Windows.Forms.Label Label39; + private System.Windows.Forms.Label Label40; + private System.Windows.Forms.Panel pnlmainbuttonactivated; + private System.Windows.Forms.Label Label28; + private System.Windows.Forms.Label Label35; + private System.Windows.Forms.TextBox txtapplicationsbuttonheight; + private System.Windows.Forms.Label Label36; + private System.Windows.Forms.Panel pnlmainbuttoncolour; + private System.Windows.Forms.Label Label43; + private System.Windows.Forms.Panel pnldesktopintro; + private System.Windows.Forms.Label Label69; + private System.Windows.Forms.Label Label70; + private System.Windows.Forms.Panel pnlpanelclockoptions; + private System.Windows.Forms.Panel pnlclockbackgroundcolour; + private System.Windows.Forms.Label Label44; + private System.Windows.Forms.ComboBox comboclocktextstyle; + private System.Windows.Forms.ComboBox comboclocktextfont; + private System.Windows.Forms.Label Label26; + private System.Windows.Forms.Label Label29; + private System.Windows.Forms.TextBox txtclocktextfromtop; + private System.Windows.Forms.Label Label30; + private System.Windows.Forms.Label Label31; + private System.Windows.Forms.TextBox txtclocktextsize; + private System.Windows.Forms.Label Label32; + private System.Windows.Forms.Label Label33; + private System.Windows.Forms.Panel pnlpanelclocktextcolour; + private System.Windows.Forms.Label Label34; + private System.Windows.Forms.Panel pnldesktopbackgroundoptions; + private System.Windows.Forms.Panel pnldesktopcolour; + private System.Windows.Forms.Label Label45; + private System.Windows.Forms.Panel Panel10; + private System.Windows.Forms.Button btndesktopitself; + private System.Windows.Forms.Button btnpanelclock; + private System.Windows.Forms.Button btnapplauncher; + private System.Windows.Forms.Button btndesktoppanel; + private System.Windows.Forms.Panel pnldesktoppreview; + private System.Windows.Forms.Panel predesktoppanel; + private System.Windows.Forms.FlowLayoutPanel prepnlpanelbuttonholder; + private System.Windows.Forms.Panel prepnlpanelbutton; + private System.Windows.Forms.PictureBox pretbicon; + private System.Windows.Forms.Label pretbctext; + private System.Windows.Forms.Panel pretimepanel; + private System.Windows.Forms.Label prepaneltimetext; + private System.Windows.Forms.Panel preapplaunchermenuholder; + private System.Windows.Forms.MenuStrip predesktopappmenu; + private System.Windows.Forms.ToolStripMenuItem ApplicationsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem KnowledgeInputToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ShiftoriumToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ClockToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem TerminalToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ShifterToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator ToolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem ShutdownToolStripMenuItem; + private System.Windows.Forms.Panel pnlwindowsoptions; + private System.Windows.Forms.Panel pnlbuttonoptions; + private System.Windows.Forms.Panel pnlminimizebuttonoptions; + private System.Windows.Forms.Label Label82; + private System.Windows.Forms.Label Label83; + private System.Windows.Forms.Panel pnlminimizebuttoncolour; + private System.Windows.Forms.TextBox txtminimizebuttonside; + private System.Windows.Forms.Label Label84; + private System.Windows.Forms.Label Label85; + private System.Windows.Forms.TextBox txtminimizebuttonheight; + private System.Windows.Forms.Label Label86; + private System.Windows.Forms.Label Label87; + private System.Windows.Forms.TextBox txtminimizebuttontop; + private System.Windows.Forms.Label Label88; + private System.Windows.Forms.Label Label89; + private System.Windows.Forms.TextBox txtminimizebuttonwidth; + private System.Windows.Forms.Label Label90; + private System.Windows.Forms.Panel pnlrollupbuttonoptions; + private System.Windows.Forms.Label Label54; + private System.Windows.Forms.Label Label55; + private System.Windows.Forms.Panel pnlrollupbuttoncolour; + private System.Windows.Forms.TextBox txtrollupbuttonside; + private System.Windows.Forms.Label Label56; + private System.Windows.Forms.Label Label57; + private System.Windows.Forms.TextBox txtrollupbuttonheight; + private System.Windows.Forms.Label Label58; + private System.Windows.Forms.Label Label59; + private System.Windows.Forms.TextBox txtrollupbuttontop; + private System.Windows.Forms.Label Label60; + private System.Windows.Forms.Label Label61; + private System.Windows.Forms.TextBox txtrollupbuttonwidth; + private System.Windows.Forms.Label Label62; + private System.Windows.Forms.ComboBox combobuttonoption; + private System.Windows.Forms.Label Label52; + private System.Windows.Forms.Panel pnlclosebuttonoptions; + private System.Windows.Forms.Label Label8; + private System.Windows.Forms.Label Label11; + private System.Windows.Forms.Panel pnlclosebuttoncolour; + private System.Windows.Forms.TextBox txtclosebuttonfromside; + private System.Windows.Forms.Label Label7; + private System.Windows.Forms.Label Label12; + private System.Windows.Forms.TextBox txtclosebuttonheight; + private System.Windows.Forms.Label Label13; + private System.Windows.Forms.Label Label6; + private System.Windows.Forms.TextBox txtclosebuttonfromtop; + private System.Windows.Forms.Label Label10; + private System.Windows.Forms.Label Label14; + private System.Windows.Forms.TextBox txtclosebuttonwidth; + private System.Windows.Forms.Label Label9; + private System.Windows.Forms.Panel pnltitlebaroptions; + private System.Windows.Forms.Label Label80; + private System.Windows.Forms.TextBox txticonfromtop; + private System.Windows.Forms.Label Label81; + private System.Windows.Forms.Label Label78; + private System.Windows.Forms.TextBox txticonfromside; + private System.Windows.Forms.Label Label79; + private System.Windows.Forms.Label lbcornerwidthpx; + private System.Windows.Forms.TextBox txttitlebarcornerwidth; + private System.Windows.Forms.Label lbcornerwidth; + private System.Windows.Forms.Panel pnltitlebarrightcornercolour; + private System.Windows.Forms.Panel pnltitlebarleftcornercolour; + private System.Windows.Forms.Label lbrightcornercolor; + private System.Windows.Forms.Label lbleftcornercolor; + private System.Windows.Forms.CheckBox cboxtitlebarcorners; + private System.Windows.Forms.Label Label5; + private System.Windows.Forms.TextBox txttitlebarheight; + private System.Windows.Forms.Label Label4; + private System.Windows.Forms.Panel pnltitlebarcolour; + private System.Windows.Forms.Label Label2; + private System.Windows.Forms.Panel pnlborderoptions; + private System.Windows.Forms.CheckBox cbindividualbordercolours; + private System.Windows.Forms.Panel pnlborderbottomrightcolour; + private System.Windows.Forms.Label lbbright; + private System.Windows.Forms.Panel pnlborderbottomcolour; + private System.Windows.Forms.Label lbbottom; + private System.Windows.Forms.Panel pnlborderbottomleftcolour; + private System.Windows.Forms.Label lbbleft; + private System.Windows.Forms.Panel pnlborderrightcolour; + private System.Windows.Forms.Label lbright; + private System.Windows.Forms.Panel pnlborderleftcolour; + private System.Windows.Forms.Label lbleft; + private System.Windows.Forms.Label Label15; + private System.Windows.Forms.Panel pnlbordercolour; + private System.Windows.Forms.TextBox txtbordersize; + private System.Windows.Forms.Label Label3; + private System.Windows.Forms.Label Label16; + private System.Windows.Forms.Panel pnltitletextoptions; + private System.Windows.Forms.ComboBox combotitletextposition; + private System.Windows.Forms.Label Label53; + private System.Windows.Forms.ComboBox combotitletextstyle; + private System.Windows.Forms.ComboBox combotitletextfont; + private System.Windows.Forms.Label Label23; + private System.Windows.Forms.Label Label17; + private System.Windows.Forms.TextBox txttitletextside; + private System.Windows.Forms.Label Label18; + private System.Windows.Forms.Label Label19; + private System.Windows.Forms.TextBox txttitletexttop; + private System.Windows.Forms.Label Label20; + private System.Windows.Forms.Label Label21; + private System.Windows.Forms.TextBox txttitletextsize; + private System.Windows.Forms.Label Label22; + private System.Windows.Forms.Label Label24; + private System.Windows.Forms.Panel pnltitletextcolour; + private System.Windows.Forms.Label Label25; + private System.Windows.Forms.Panel pnlwindowsintro; + private System.Windows.Forms.Label Label68; + private System.Windows.Forms.Label Label67; + private System.Windows.Forms.Panel pnlwindowsobjects; + private System.Windows.Forms.Button btnborders; + private System.Windows.Forms.Button btnbuttons; + private System.Windows.Forms.Button btntitletext; + private System.Windows.Forms.Button btntitlebar; + private System.Windows.Forms.Panel pnlwindowpreview; + private System.Windows.Forms.Panel prepgcontent; + private System.Windows.Forms.Panel prepgbottom; + private System.Windows.Forms.Panel prepgleft; + private System.Windows.Forms.Panel prepgbottomlcorner; + private System.Windows.Forms.Panel prepgright; + private System.Windows.Forms.Panel prepgbottomrcorner; + private System.Windows.Forms.Panel pretitlebar; + private System.Windows.Forms.Panel preminimizebutton; + private System.Windows.Forms.PictureBox prepnlicon; + private System.Windows.Forms.Panel prerollupbutton; + private System.Windows.Forms.Panel preclosebutton; + private System.Windows.Forms.Label pretitletext; + private System.Windows.Forms.Panel prepgtoplcorner; + private System.Windows.Forms.Panel prepgtoprcorner; + private System.Windows.Forms.Panel pnlreset; + private System.Windows.Forms.Label Label113; + private System.Windows.Forms.Button btnresetallsettings; + private System.Windows.Forms.Label Label109; + private System.Windows.Forms.Label Label111; + private System.Windows.Forms.Panel pgcontents; + private System.Windows.Forms.Timer tmrfix; + private System.Windows.Forms.Timer tmrdelay; + private Panel pnlmenus; + private Label label74; + private Panel pnlmenucategories; + private Button btnmisc; + private Button btnadvanced; + private Button btndropdown; + private Button btnbasic; + private Panel pnlbasic; + private Panel pnlmenubarend; + private Label label73; + private Panel pnlmenubarbegin; + private Label label42; + private Label label41; + private Panel pnltoolbarend; + private Label label77; + private Panel pnltoolbarmiddle; + private Label label76; + private Panel pnltoolbarbegin; + private Label label75; + private Panel pnlstatusend; + private Label label114; + private Panel pnlstatusbegin; + private Label label107; + private Panel pnldropdownbg; + private Label label115; + private Panel pnlmenusintro; + private Label label116; + private Label label124; + private Panel pnldropdown; + private Panel pnlmarginend; + private Label label120; + private Panel pnlmarginmiddle; + private Label label121; + private Panel pnlmarginbegin; + private Label label122; + private Panel pnlhcolor; + private Label label123; + private Panel pnlhborder; + private Label label125; + private Label label126; + private Panel pnlddborder; + private Label label117; + private Panel pnlmenutextcolor; + private Label label118; + private Panel pnladvanced; + private Panel pnlitemselectedend; + private Label label129; + private Panel pnlbuttonpressed; + private Label label130; + private Panel pnlitemselectedbegin; + private Label label131; + private Panel pnlitemselected; + private Label label132; + private Panel pnlbuttonselected; + private Label label133; + private Panel pnlcheckbg; + private Label label134; + private Label label135; + private Panel pnlbuttonchecked; + private Label label136; + private Button btnmorebuttons; + private Panel pnlmore; + private Panel pnlpressedbegin; + private Button btnback; + private Label label138; + private Panel pnlselectedbegin; + private Panel pnlpressedend; + private Label label137; + private Label label139; + private Panel pnlselectedend; + private Panel pnlpressedmiddle; + private Label label140; + private Label label142; + private Panel pnlselectedmiddle; + private Label label145; + private Label label147; + private Panel pnlalhover; + private Label label119; + private Button btndesktopicons; + private Button btnwindowcomposition; + private Panel pnldesktopcomposition; + private Panel pnlfancywindows; + private Label label149; + private Panel pnlfancydragging; + private Label label156; + private Panel panel18; + private Panel panel19; + private Label label157; + private Panel panel20; + private Label label158; + private Panel panel21; + private Label label159; + private Panel panel22; + private Label label160; + private Panel panel23; + private Label label161; + private Panel panel24; + private Label label162; + private Label label163; + private Panel panel25; + private Panel panel26; + private Label label164; + private Panel panel27; + private Label label165; + private Panel panel28; + private Label label166; + private Panel panel29; + private Label label167; + private Panel panel30; + private Label label168; + private Panel panel31; + private Label label169; + private Panel panel32; + private Label label170; + private Panel panel33; + private Label label171; + private Panel panel34; + private Label label172; + private Label label173; + private Panel pnlfancyintro; + private Label label174; + private Label label175; + private Panel panel36; + private Button btnfancydragging; + private Button btnfancywindows; + private Label label176; + private ComboBox cbcloseanim; + private Label label128; + private ComboBox cbopenanim; + private Label label127; + private ComboBox cbdrageffect; + private Label label141; + private TextBox txtfadespeed; + private Label label155; + private TextBox txtdragfadedec; + private Label label143; + private TextBox txtdragopacitydec; + private Label label144; + private TextBox txtshakeminoffset; + private Label label148; + private TextBox txtshakemax; + private Label label146; + private TextBox txtwinfadedec; + private Label label150; + private TextBox txtwinfadespeed; + private Label label151; + private Button btnmore; + private Panel pnlluaoptions; + private FlowLayoutPanel flmorebuttons; + private Panel pnlluafield; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shifter.cs b/source/WindowsFormsApplication1/Apps/Shifter.cs new file mode 100644 index 0000000..3aad889 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shifter.cs @@ -0,0 +1,3093 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Shifter : Form + { + public Shifter() + { + InitializeComponent(); + } + + public Skinning.Skin CustomizingSkin = null; + public Skinning.Images CustomizingImages = null; + private bool EarnCP = false; + + public void AddCP(int amount) + { + if (EarnCP == true) + { + codepointstogive += amount; + } + } + + private void btndesktop_Click(object sender, EventArgs e) + { + HideAll(); + pnldesktopoptions.Show(); + pnldesktopoptions.BringToFront(); + SetPreviewSkin(true); + } + + private void SetPreviewSkin(bool updateValues) + { + EarnCP = false; + predesktopappmenu.Renderer = new Skinning.MyToolStripRenderer(new AppLauncherColorTable()); + //fix apply button + btnapply.BackColor = Color.White; + btnapply.ForeColor = Color.Black; + btnapply.Text = "Apply Changes"; + + //Set Available Title Buttons + combobuttonoption.Items.Clear(); + if(API.Upgrades["closebutton"]) + { + combobuttonoption.Items.Add("Close"); + } + if (API.Upgrades["rollupbutton"]) + { + combobuttonoption.Items.Add("Roll Up"); + } + if (API.Upgrades["minimizebutton"]) + { + combobuttonoption.Items.Add("Minimize"); + } + //set available options + SetAvailableOptions(); + + //windows + setuptitlebar(); + setskin(); + + //desktop + SetupDesktop(); + + //Setting Values + if (updateValues == true) + { + EarnCP = false; + SetupDesktopPanelValues(); + SetupAppLauncherValues(); + SetupPanelButtonValues(); + SetClockValues(); + SetupTitleTextValues(); + SetupBorderValues(); + SetupTitleBarValues(); + SetupButtonValues(); + SetupBasicMenuValues(); + SetupDropdownValues(); + SetupAdvancedMenuValues(); + SetupAnimationStyleValues(); + } + EarnCP = true; + } + + #region Preview Skinning + + public void SetupDesktop() + { + + if (API.Upgrades["desktoppanel"] == true) + { + if (CustomizingImages.desktoppanel == null) + { + predesktoppanel.BackColor = CustomizingSkin.desktoppanelcolour; + predesktoppanel.BackgroundImage = null; + } + else { + predesktoppanel.BackgroundImage = CustomizingImages.desktoppanel; + predesktoppanel.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktoppanellayout; + predesktoppanel.BackColor = Color.Transparent; + } + + predesktoppanel.Size = new Size(predesktoppanel.Size.Width, CustomizingSkin.desktoppanelheight); + switch (CustomizingSkin.desktoppanelposition) + { + case "Top": + predesktoppanel.Dock = DockStyle.Top; + predesktopappmenu.Dock = DockStyle.Top; + break; + case "Bottom": + predesktoppanel.Dock = DockStyle.Bottom; + predesktopappmenu.Dock = DockStyle.Bottom; + break; + } + predesktoppanel.Show(); + } + else { + predesktoppanel.Hide(); + } + + + if (API.Upgrades["applaunchermenu"] == true) + { + ApplicationsToolStripMenuItem.Font = new Font(CustomizingSkin.applicationbuttontextfont, CustomizingSkin.applicationbuttontextsize, CustomizingSkin.applicationbuttontextstyle); + ApplicationsToolStripMenuItem.Text = CustomizingSkin.applicationlaunchername; + + + + ApplicationsToolStripMenuItem.Height = CustomizingSkin.applicationbuttonheight; + if (CustomizingImages.applauncher != null) + { + ApplicationsToolStripMenuItem.Text = ""; + ApplicationsToolStripMenuItem.BackColor = Color.Transparent; + } + else { + ApplicationsToolStripMenuItem.Text = CustomizingSkin.applicationlaunchername; + ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImage = null; + } + + preapplaunchermenuholder.Width = CustomizingSkin.applaunchermenuholderwidth; + predesktopappmenu.Width = CustomizingSkin.applaunchermenuholderwidth; + ApplicationsToolStripMenuItem.Width = CustomizingSkin.applaunchermenuholderwidth; + preapplaunchermenuholder.Height = CustomizingSkin.applicationbuttonheight; + predesktopappmenu.Height = CustomizingSkin.applicationbuttonheight; + ApplicationsToolStripMenuItem.Height = CustomizingSkin.applicationbuttonheight; + + if (CustomizingImages.applauncher != null) + { + ApplicationsToolStripMenuItem.BackgroundImage = CustomizingImages.applauncher; + } + else { + ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImageLayout = (ImageLayout)CustomizingSkin.applauncherlayout; + } + } + else { + ApplicationsToolStripMenuItem.Visible = false; + } + + if (API.Upgrades["desktoppanelclock"] == true) + { + + prepaneltimetext.ForeColor = CustomizingSkin.clocktextcolour; + + if (CustomizingImages.panelclock == null) + { + pretimepanel.BackColor = CustomizingSkin.clockbackgroundcolor; + pretimepanel.BackgroundImage = null; + } + else { + pretimepanel.BackColor = Color.Transparent; + pretimepanel.BackgroundImage = CustomizingImages.panelclock; + pretimepanel.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelclocklayout; + } + prepaneltimetext.Font = new Font(CustomizingSkin.panelclocktextfont, CustomizingSkin.panelclocktextsize, CustomizingSkin.panelclocktextstyle); + pretimepanel.Size = new Size(prepaneltimetext.Width + 3, pretimepanel.Height); + prepaneltimetext.Location = new Point(0, CustomizingSkin.panelclocktexttop); + pretimepanel.Show(); + } + else { + pretimepanel.Hide(); + } + + + ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbuttoncolour; + + pnldesktoppreview.BackColor = CustomizingSkin.desktopbackgroundcolour; + pnldesktoppreview.BackgroundImage = CustomizingImages.desktopbackground; + pnldesktoppreview.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktopbackgroundlayout; + + if (API.Upgrades["panelbuttons"] == true) + { + prepnlpanelbutton.Visible = API.Upgrades["panelbuttons"]; + + pretbicon.Image = Properties.Resources.iconTerminal; + pretbctext.Text = "Terminal"; + + prepnlpanelbutton.Margin = new Padding(0, CustomizingSkin.panelbuttonfromtop, CustomizingSkin.panelbuttongap, 0); + + if (API.Upgrades["appicons"] == true) + { + pretbicon.Show(); + } + else + { + pretbicon.Hide(); + } + pretbicon.Location = new Point(CustomizingSkin.panelbuttoniconside, CustomizingSkin.panelbuttonicontop); + pretbicon.Size = new Size(CustomizingSkin.panelbuttoniconsize, CustomizingSkin.panelbuttoniconsize); + prepnlpanelbutton.Size = new Size(CustomizingSkin.panelbuttonwidth, CustomizingSkin.panelbuttonheight); + prepnlpanelbutton.BackColor = CustomizingSkin.panelbuttoncolour; + prepnlpanelbutton.BackgroundImage = CustomizingImages.panelbutton; + prepnlpanelbutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelbuttonlayout; + pretbctext.ForeColor = CustomizingSkin.panelbuttontextcolour; + pretbctext.Font = new Font(CustomizingSkin.panelbuttontextfont, CustomizingSkin.panelbuttontextsize, CustomizingSkin.panelbuttontextstyle); + pretbctext.Location = new Point(CustomizingSkin.panelbuttontextside, CustomizingSkin.panelbuttontexttop); + + + pretbicon.Size = new Size(CustomizingSkin.panelbuttoniconsize, CustomizingSkin.panelbuttoniconsize); + + } + prepnlpanelbuttonholder.Padding = new Padding(CustomizingSkin.panelbuttoninitialgap, 0, 0, 0); + + + } + + + + public void setskin() + { + + //disposals + preclosebutton.BackgroundImage = null; + pretitlebar.BackgroundImage = null; + prerollupbutton.BackgroundImage = null; + prepgtoplcorner.BackgroundImage = null; + prepgtoprcorner.BackgroundImage = null; + preminimizebutton.BackgroundImage = null; + //apply new skin + if (CustomizingImages.closebtn == null) + preclosebutton.BackColor = CustomizingSkin.closebtncolour; + else + preclosebutton.BackgroundImage = CustomizingImages.closebtn; + preclosebutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.closebtnlayout; + if (CustomizingImages.titlebar == null) + pretitlebar.BackColor = CustomizingSkin.titlebarcolour; + else + pretitlebar.BackgroundImage = CustomizingImages.titlebar; + pretitlebar.BackgroundImageLayout = (ImageLayout)CustomizingSkin.titlebarlayout; + if (CustomizingImages.rollbtn == null) + prerollupbutton.BackColor = CustomizingSkin.rollbtncolour; + else + prerollupbutton.BackgroundImage = CustomizingImages.rollbtn; + prerollupbutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rollbtnlayout; + if (CustomizingImages.leftcorner == null) + prepgtoplcorner.BackColor = CustomizingSkin.leftcornercolour; + else + prepgtoplcorner.BackgroundImage = CustomizingImages.leftcorner; + prepgtoplcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.leftcornerlayout; + if (CustomizingImages.rightcorner == null) + prepgtoprcorner.BackColor = CustomizingSkin.rightcornercolour; + else + prepgtoprcorner.BackgroundImage = CustomizingImages.rightcorner; + prepgtoprcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rightcornerlayout; + if (CustomizingImages.minbtn == null) + preminimizebutton.BackColor = CustomizingSkin.minbtncolour; + else + preminimizebutton.BackgroundImage = CustomizingImages.minbtn; + preminimizebutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.minbtnlayout; + if (CustomizingImages.borderleft == null) + prepgleft.BackColor = CustomizingSkin.borderleftcolour; + else + prepgleft.BackgroundImage = CustomizingImages.borderleft; + prepgleft.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; + if (CustomizingImages.borderright == null) + prepgright.BackColor = CustomizingSkin.borderrightcolour; + else + prepgright.BackgroundImage = CustomizingImages.borderright; + prepgleft.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; + if (CustomizingImages.borderbottom == null) + prepgbottom.BackColor = CustomizingSkin.borderbottomcolour; + else + prepgbottom.BackgroundImage = CustomizingImages.borderbottom; + prepgbottom.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderbottomlayout; + if (CustomizingSkin.enablebordercorners == true) + { + if (CustomizingImages.bottomleftcorner == null) + prepgbottomlcorner.BackColor = CustomizingSkin.bottomleftcornercolour; + else + prepgbottomlcorner.BackgroundImage = CustomizingImages.bottomleftcorner; + prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; + if (CustomizingImages.bottomrightcorner == null) + prepgbottomrcorner.BackColor = CustomizingSkin.bottomrightcornercolour; + else + prepgbottomrcorner.BackgroundImage = CustomizingImages.bottomrightcorner; + prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; + } + else { + prepgbottomlcorner.BackColor = CustomizingSkin.borderrightcolour; + prepgbottomrcorner.BackColor = CustomizingSkin.borderrightcolour; + prepgbottomlcorner.BackgroundImage = null; + prepgbottomrcorner.BackgroundImage = null; + } + + //set bottom border corner size + prepgbottomlcorner.Size = new Size(CustomizingSkin.borderwidth, CustomizingSkin.borderwidth); + prepgbottomrcorner.Size = new Size(CustomizingSkin.borderwidth, CustomizingSkin.borderwidth); + prepgbottomlcorner.Location = new Point(0, pnlwindowpreview.Height - CustomizingSkin.borderwidth); + prepgbottomrcorner.Location = new Point(pnlwindowpreview.Width, pnlwindowpreview.Height - CustomizingSkin.borderwidth); + + prepgright.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; + prepgbottomrcorner.BackgroundImage = CustomizingImages.bottomrightcorner; + prepgbottomlcorner.BackgroundImage = CustomizingImages.bottomleftcorner; + prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; + prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; + + } + + private void setupborders() + { + if (API.Upgrades["windowborders"] == false) + { + prepgleft.Hide(); + prepgbottom.Hide(); + prepgright.Hide(); + } + } + + private void setuptitlebar() + { + setupborders(); + + prepgleft.Width = CustomizingSkin.borderwidth; + prepgright.Width = CustomizingSkin.borderwidth; + prepgbottom.Height = CustomizingSkin.borderwidth; + pretitlebar.Height = CustomizingSkin.titlebarheight; + + if (CustomizingSkin.enablecorners == true) + { + prepgtoplcorner.Show(); + prepgtoprcorner.Show(); + prepgtoprcorner.Width = CustomizingSkin.titlebarcornerwidth; + prepgtoplcorner.Width = CustomizingSkin.titlebarcornerwidth; + } + else { + prepgtoplcorner.Hide(); + prepgtoprcorner.Hide(); + } + + if (API.Upgrades["titlebar"] == false) + { + pretitlebar.Hide(); + } + + if (API.Upgrades["titletext"] == false) + { + pretitletext.Hide(); + } + else { + pretitletext.Font = new Font(CustomizingSkin.titletextfontfamily, CustomizingSkin.titletextfontsize, CustomizingSkin.titletextfontstyle, GraphicsUnit.Point); + pretitletext.Text = "Preview"; + pretitletext.Show(); + } + + if (API.Upgrades["closebutton"] == false) + { + preclosebutton.Hide(); + } + else { + preclosebutton.BackColor = CustomizingSkin.closebtncolour; + preclosebutton.Size = CustomizingSkin.closebtnsize; + preclosebutton.Show(); + } + + if (API.Upgrades["rollupbutton"] == false) + { + prerollupbutton.Hide(); + } + else { + prerollupbutton.BackColor = CustomizingSkin.rollbtncolour; + prerollupbutton.Size = CustomizingSkin.rollbtnsize; + prerollupbutton.Show(); + } + + if (API.Upgrades["minimizebutton"] == false) + { + preminimizebutton.Hide(); + } + else { + preminimizebutton.BackColor = CustomizingSkin.minbtncolour; + preminimizebutton.Size = CustomizingSkin.minbtnsize; + preminimizebutton.Show(); + } + + if (API.Upgrades["windowborders"] == true) + { + preclosebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.closebtnfromside - preclosebutton.Size.Width, CustomizingSkin.closebtnfromtop); + prerollupbutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.rollbtnfromside - prerollupbutton.Size.Width, CustomizingSkin.rollbtnfromtop); + preminimizebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.minbtnfromside - preminimizebutton.Size.Width, CustomizingSkin.minbtnfromtop); + switch (CustomizingSkin.titletextpos) + { + case "Left": + pretitletext.Location = new Point(CustomizingSkin.titletextfromside, CustomizingSkin.titletextfromtop); + break; + case "Centre": + pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, CustomizingSkin.titletextfromtop); + break; + } + pretitletext.ForeColor = CustomizingSkin.titletextcolour; + } + else { + preclosebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.closebtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preclosebutton.Size.Width, CustomizingSkin.closebtnfromtop); + prerollupbutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.rollbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - prerollupbutton.Size.Width, CustomizingSkin.rollbtnfromtop); + preminimizebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.minbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preminimizebutton.Size.Width, CustomizingSkin.minbtnfromtop); + switch (CustomizingSkin.titletextpos) + { + case "Left": + pretitletext.Location = new Point(CustomizingSkin.titletextfromside + prepgtoplcorner.Width, CustomizingSkin.titletextfromtop); + break; + case "Centre": + pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, CustomizingSkin.titletextfromtop); + break; + } + pretitletext.ForeColor = CustomizingSkin.titletextcolour; + } + + //Change when Icon skinning complete + // Change to program's icon + if (API.Upgrades["appicons"] == true) + { + prepnlicon.Visible = true; + prepnlicon.Location = new Point(CustomizingSkin.titleiconfromside, CustomizingSkin.titleiconfromtop); + prepnlicon.Size = new Size(CustomizingSkin.titlebariconsize, CustomizingSkin.titlebariconsize); + prepnlicon.Image = Properties.Resources.iconShifter; + + } + + } + + #endregion + + #region Other things... + + private void HideAll() + { + pnlshifterintro.Hide(); + pnldesktopoptions.Hide(); + pnlwindowsoptions.Hide(); + pnlreset.Hide(); + //pnlmenuoptions.Hide(); + } + + private void btnreset_Click(object sender, EventArgs e) + { + HideAll(); + pnlreset.Show(); + pnlreset.BringToFront(); + SetPreviewSkin(true); + } + + private void btnwindows_Click(object sender, EventArgs e) + { + HideAll(); + pnlwindowsoptions.Show(); + pnlwindowsoptions.BringToFront(); + SetPreviewSkin(true); + pnlwindowpreview.Show(); + pnlwindowpreview.BringToFront(); + pnlwindowsintro.Show(); + pnlwindowsintro.BringToFront(); + } + + public void GrabSkinData() + { + Skinning.Utilities.SavePanels(); + string json = JsonConvert.SerializeObject(API.CurrentSkin); + CustomizingSkin = JsonConvert.DeserializeObject(json); + GetAllImages(); + } + + public void GetAllImages() + { + CustomizingImages = new Skinning.Images(); + CustomizingImages.applauncherclick = Skinning.Utilities.GetImage(CustomizingSkin.applauncherclickpath); + CustomizingImages.panelbutton = Skinning.Utilities.GetImage(CustomizingSkin.panelbuttonpath); + CustomizingImages.applaunchermouseover = Skinning.Utilities.GetImage(CustomizingSkin.applaunchermouseoverpath); + CustomizingImages.applauncher = Skinning.Utilities.GetImage(CustomizingSkin.applauncherpath); + CustomizingImages.panelclock = Skinning.Utilities.GetImage(CustomizingSkin.panelclockpath); + CustomizingImages.desktopbackground = Skinning.Utilities.GetImage(CustomizingSkin.desktopbackgroundpath); + CustomizingImages.desktoppanel = Skinning.Utilities.GetImage(CustomizingSkin.desktoppanelpath); + CustomizingImages.minbtnhover = Skinning.Utilities.GetImage(CustomizingSkin.minbtnhoverpath); + CustomizingImages.minbtnclick = Skinning.Utilities.GetImage(CustomizingSkin.minbtnclickpath); + CustomizingImages.rightcorner = Skinning.Utilities.GetImage(CustomizingSkin.rightcornerpath); + CustomizingImages.titlebar = Skinning.Utilities.GetImage(CustomizingSkin.titlebarpath); + CustomizingImages.borderright = Skinning.Utilities.GetImage(CustomizingSkin.borderrightpath); + CustomizingImages.borderleft = Skinning.Utilities.GetImage(CustomizingSkin.borderleftpath); + CustomizingImages.borderbottom = Skinning.Utilities.GetImage(CustomizingSkin.borderbottompath); + CustomizingImages.closebtn = Skinning.Utilities.GetImage(CustomizingSkin.closebtnpath); + CustomizingImages.closebtnhover = Skinning.Utilities.GetImage(CustomizingSkin.closebtnhoverpath); + CustomizingImages.closebtnclick = Skinning.Utilities.GetImage(CustomizingSkin.closebtnclickpath); + CustomizingImages.rollbtn = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnpath); + CustomizingImages.rollbtnhover = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnhoverpath); + CustomizingImages.rollbtnclick = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnclickpath); + CustomizingImages.minbtn = Skinning.Utilities.GetImage(CustomizingSkin.minbtnpath); + CustomizingImages.leftcorner = Skinning.Utilities.GetImage(CustomizingSkin.leftcornerpath); + CustomizingImages.bottomleftcorner = Skinning.Utilities.GetImage(CustomizingSkin.bottomleftcornerpath); + CustomizingImages.bottomrightcorner = Skinning.Utilities.GetImage(CustomizingSkin.bottomrightcornerpath); + + } + + private void Shifter_Load(object sender, EventArgs e) + { + GrabSkinData(); + HideAll(); + pnlshifterintro.Show(); + pnlshifterintro.BringToFront(); + SetPreviewSkin(true); + codepointstogive = 0; + } + + #endregion + + + private void SetAvailableOptions () + { + btntitlebar.Visible = API.Upgrades["shifttitlebar"]; + btntitletext.Visible = API.Upgrades["shifttitletext"]; + btnbuttons.Visible = API.Upgrades["shifttitlebuttons"]; + btnpanelbuttons.Visible = API.Upgrades["shiftpanelbuttons"]; + btnpanelclock.Visible = API.Upgrades["shiftpanelclock"]; + btndesktoppanel.Visible = API.Upgrades["shiftdesktoppanel"]; + btnapplauncher.Visible = API.Upgrades["shiftapplauncher"]; + btndesktopitself.Visible = API.Upgrades["shiftdesktop"]; + btnmenus.Visible = API.Upgrades["shiftsystemmenus"]; + btndesktopicons.Visible = API.Upgrades["shiftdesktopicons"]; + btnwindowcomposition.Visible = API.Upgrades["shiftfancyeffects"]; + } + #region Desktop, Reset, Intro, Apply + private Random rand = new Random(); + + private int codepointstogive = 0; + + private void btnresetallsettings_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Reset all settings - Are you SURE?", "Are you absolutely sure you want to reset your ShiftOS to the default settings? You will lose the currently loaded settings and the action is NOT reversable.", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetInfoboxResult(); + if(result == "Yes") + { + Skinning.Utilities.loadedSkin = new Skinning.Skin(); + Skinning.Utilities.loadedskin_images = new Skinning.Images(); + Skinning.Utilities.saveskin(); + Skinning.Utilities.GenDefaultIconPack(); + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + API.CreateInfoboxSession("Settings reset.", "ShiftOS has tried to reset all settings and as far is it's aware, it succeeded. You may have to re-open some apps before the reset takes effect on them", infobox.InfoboxMode.Info); + codepointstogive = 0; + } + }; + } + + + + private void txtdesktoppanelheight_ValueChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.desktoppanelheight = Convert.ToInt16(txtdesktoppanelheight.Text); + SetPreviewSkin(false); + AddCP(1); + } + catch + { + txtdesktoppanelheight.Text = CustomizingSkin.desktoppanelheight.ToString(); + } + } + + private void SetupDesktopPanelValues() + { + txtdesktoppanelheight.Text = CustomizingSkin.desktoppanelheight.ToString(); + combodesktoppanelposition.Items.Clear(); + combodesktoppanelposition.Items.Add("Top"); + combodesktoppanelposition.Items.Add("Bottom"); + combodesktoppanelposition.Text = CustomizingSkin.desktoppanelposition; + pnldesktoppanelcolour.BackColor = CustomizingSkin.desktoppanelcolour; + pnldesktoppanelcolour.BackgroundImage = CustomizingImages.desktoppanel; + pnldesktoppanelcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktoppanellayout; + pnldesktopcolour.BackColor = CustomizingSkin.desktopbackgroundcolour; + pnldesktopcolour.BackgroundImage = CustomizingImages.desktopbackground; + pnldesktopcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktopbackgroundlayout; + } + + private void btndesktoppanel_Click(object sender, EventArgs e) + { + pnldesktoppaneloptions.Show(); + pnldesktoppaneloptions.BringToFront(); + SetupDesktopPanelValues(); + if(API.Upgrades["advanceddesktop"]) + { + lbpanelcolor.Hide(); + pnldesktoppanelcolour.Hide(); + lbheight.Hide(); + txtdesktoppanelheight.Hide(); + lbposition.Hide(); + combodesktoppanelposition.Hide(); + lbwarning.Text = "Desktop Panel customization has been moved from the Shifter! You can right-click panels to change their settings and add/remove widgets."; + } + } + + private void btnapply_Click(object sender, EventArgs e) + { + btnapply.BackColor = Color.Black; + btnapply.ForeColor = Color.White; + btnapply.Text = "Codepoints: " + codepointstogive.ToString(); + + Skinning.Utilities.loadedSkin = CustomizingSkin; + Skinning.Utilities.loadedskin_images = CustomizingImages; + API.CurrentSkin.DesktopPanels = JsonConvert.DeserializeObject>(File.ReadAllText(Paths.LoadedSkin + "panels.json")); + Skinning.Utilities.LoadPanels(); + Skinning.Utilities.saveimages(); + Skinning.Utilities.saveskin(); + API.AddCodepoints(codepointstogive); + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + codepointstogive = 0; + } + + private void combodesktoppanelposition_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.desktoppanelposition = combodesktoppanelposition.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private Color ColorToChange + { + get + { + return ctc; + } + } + + private Color ctc = Color.Black; + + private void ChangeDesktopPanelColor(object sender, MouseEventArgs e) + { + if(e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Desktop Panel Color", CustomizingSkin.desktoppanelcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.desktoppanelcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if(API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Desktop Panel", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if(result == "OK") + { + CustomizingImages.desktoppanel = API.GraphicPickerSession.IdleImage; + CustomizingSkin.desktoppanellayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetupAppLauncherValues() + { + txtappbuttonlabel.Text = CustomizingSkin.applicationlaunchername; + txtappbuttontextsize.Text = CustomizingSkin.applicationbuttontextsize.ToString(); + AddFonts(ref comboappbuttontextfont); + comboappbuttontextfont.Text = CustomizingSkin.applicationbuttontextfont; + ListFontStyles(ref comboappbuttontextstyle, CustomizingSkin.applicationbuttontextstyle); + txtapplauncherwidth.Text = CustomizingSkin.applaunchermenuholderwidth.ToString(); + txtapplicationsbuttonheight.Text = CustomizingSkin.applicationbuttonheight.ToString(); + pnlmaintextcolour.BackColor = CustomizingSkin.applicationsbuttontextcolour; + pnlmainbuttoncolour.BackColor = CustomizingSkin.applauncherbuttoncolour; + pnlmainbuttoncolour.BackgroundImage = CustomizingImages.applauncher; + pnlmainbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.applauncherlayout; + pnlmainbuttonactivated.BackColor = CustomizingSkin.Menu_MenuItemPressedGradientBegin; + pnlalhover.BackColor = CustomizingSkin.applaunchermouseovercolour; + } + + private void SetAppLauncherTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("App Launcher Button Text Color", CustomizingSkin.applicationsbuttontextcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.applicationsbuttontextcolour = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetFontStyle(string newStyle, ref FontStyle oldStyle) + { + switch (newStyle) + { + case "Regular": + oldStyle = FontStyle.Regular; + break; + case "Bold": + oldStyle = FontStyle.Bold; + break; + case "Italic": + oldStyle = FontStyle.Italic; + break; + case "Underline": + oldStyle = FontStyle.Underline; + break; + } + } + + private void ListFontStyles(ref ComboBox list, FontStyle currentFontStyle) + { + list.Items.Clear(); + list.Items.Add("Regular"); + list.Items.Add("Bold"); + list.Items.Add("Italic"); + list.Items.Add("Underline"); + switch(currentFontStyle) + { + case FontStyle.Regular: + list.Text = "Regular"; + break; + case FontStyle.Bold: + list.Text = "Bold"; + break; + case FontStyle.Italic: + list.Text = "Italic"; + break; + case FontStyle.Underline: + list.Text = "Underline"; + break; + + } + } + + + private void txtappbuttonlabel_KeyDown(object sender, EventArgs e) + { + CustomizingSkin.applicationlaunchername = txtappbuttonlabel.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private void AddFonts(ref ComboBox fontList) + { + // Get the installed fonts collection. + System.Drawing.Text.InstalledFontCollection allFonts = new System.Drawing.Text.InstalledFontCollection(); + + // Get an array of the system's font families. + FontFamily[] fontFamilies = allFonts.Families; + + // Display the font families. + foreach (FontFamily myFont in fontFamilies) + { + fontList.Items.Add(myFont.Name); + } + //font_family + } + + private void btnapplauncher_Click(object sender, EventArgs e) + { + pnlapplauncheroptions.Show(); + pnlapplauncheroptions.BringToFront(); + SetPreviewSkin(true); + } + + private void txtappbuttontextsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.applicationbuttontextsize = Convert.ToInt16(txtappbuttontextsize.Text); + SetPreviewSkin(false); + AddCP(1); + } + catch + { + txtappbuttontextsize.Text = CustomizingSkin.applicationbuttontextsize.ToString(); + } + } + + private void comboappbuttontextfont_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.applicationbuttontextfont = comboappbuttontextfont.Text; + SetPreviewSkin(false); + AddCP(1); + } + + private void comboappbuttontextstyle_SelectedIndexChanged(object sender, EventArgs e) + { + SetFontStyle(comboappbuttontextstyle.Text, ref CustomizingSkin.applicationbuttontextstyle); + AddCP(1); + SetPreviewSkin(false); + } + + private void txtapplicationsbuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.applicationbuttonheight = Convert.ToInt16(txtapplicationsbuttonheight.Text); + SetPreviewSkin(false); + AddCP(1); + } + catch + { + txtapplicationsbuttonheight.Text = CustomizingSkin.applicationbuttonheight.ToString(); + } + } + + private void txtapplauncherwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.applaunchermenuholderwidth = Convert.ToInt16(txtapplauncherwidth.Text); + SetPreviewSkin(false); + AddCP(1); + } + catch + { + txtapplauncherwidth.Text = CustomizingSkin.applaunchermenuholderwidth.ToString(); + } + } + + private void ChangeMenuItemColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Color", CustomizingSkin.Menu_ToolStripDropDownBackground); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripDropDownBackground = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void ChangeMenuHighlight(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Mouse Over Color", CustomizingSkin.Menu_MenuItemSelected); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetALButtonColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Desktop Panel Color", CustomizingSkin.applauncherbuttoncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.applauncherbuttoncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("App Launcher Button", true); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.applauncher = API.GraphicPickerSession.IdleImage; + CustomizingSkin.applauncherlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.applauncherclick = API.GraphicPickerSession.MouseDownImage; + CustomizingImages.applaunchermouseover = API.GraphicPickerSession.MouseOverImage; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetALButtonClickedColor(object sender, MouseEventArgs e) + { + if(CustomizingImages.applauncherclick != null) + { + API.CreateInfoboxSession("Shifter - Error", "It appears you've set an image as the 'Activated' property of the App Launcher button, thus this setting is overidden by it. Please un-set the image to change this setting.", infobox.InfoboxMode.Info); + + } + else + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Button Activated", CustomizingSkin.Menu_MenuItemPressedGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemPressedGradientBegin = API.GetLastColorFromSession(); + CustomizingSkin.Menu_MenuItemPressedGradientMiddle = CustomizingSkin.Menu_MenuItemPressedGradientBegin; + CustomizingSkin.Menu_MenuItemPressedGradientEnd = CustomizingSkin.Menu_MenuItemPressedGradientBegin; + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + } + + private void ChangeDesktopBackground(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Desktop Background", CustomizingSkin.desktopbackgroundcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.desktopbackgroundcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Desktop Background", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.desktopbackground = API.GraphicPickerSession.IdleImage; + CustomizingSkin.desktopbackgroundlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void btndesktopitself_Click(object sender, EventArgs e) + { + pnldesktopbackgroundoptions.Show(); + pnldesktopbackgroundoptions.BringToFront(); + SetPreviewSkin(true); + } + + private void btnpanelbuttons_Click(object sender, EventArgs e) + { + pnlpanelbuttonsoptions.Show(); + pnlpanelbuttonsoptions.BringToFront(); + } + + public void SetupPanelButtonValues() + { + txtpanelbuttonwidth.Text = CustomizingSkin.panelbuttonwidth.ToString(); + pnlpanelbuttoncolour.BackColor = CustomizingSkin.panelbuttoncolour; + pnlpanelbuttoncolour.BackgroundImage = CustomizingImages.panelbutton; + pnlpanelbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelbuttonlayout; + txtpanelbuttoninitalgap.Text = CustomizingSkin.panelbuttoninitialgap.ToString(); + txtpanelbuttonheight.Text = CustomizingSkin.panelbuttonheight.ToString(); + txtpanelbuttongap.Text = CustomizingSkin.panelbuttongap.ToString(); + AddFonts(ref cbpanelbuttonfont); + cbpanelbuttonfont.Text = CustomizingSkin.panelbuttontextfont; + ListFontStyles(ref cbpanelbuttontextstyle, CustomizingSkin.panelbuttontextstyle); + pnlpanelbuttontextcolour.BackColor = CustomizingSkin.panelbuttontextcolour; + txtpanelbuttoniconsize.Text = CustomizingSkin.panelbuttoniconsize.ToString(); + txtpanelbuttoniconside.Text = CustomizingSkin.panelbuttoniconside.ToString(); + txtpanelbuttonicontop.Text = CustomizingSkin.panelbuttonicontop.ToString(); + txtpaneltextbuttonsize.Text = CustomizingSkin.panelbuttontextsize.ToString(); + txtpanelbuttontextside.Text = CustomizingSkin.panelbuttontextside.ToString(); + txtpanelbuttontexttop.Text = CustomizingSkin.panelbuttontexttop.ToString(); + txtpanelbuttontop.Text = CustomizingSkin.panelbuttonfromtop.ToString(); + } + + private void txtpanelbuttonwidth_TextChanged(object sender, EventArgs e) + { + try { + CustomizingSkin.panelbuttonwidth = Convert.ToInt16(txtpanelbuttonwidth.Text); + AddCP(1); + } + catch{ + txtpanelbuttonwidth.Text = CustomizingSkin.panelbuttonwidth.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttoninitalgap_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttoninitialgap = Convert.ToInt16(txtpanelbuttoninitalgap.Text); + AddCP(1); + } + catch + { + txtpanelbuttoninitalgap.Text = CustomizingSkin.panelbuttoninitialgap.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttonheight = Convert.ToInt16(txtpanelbuttonheight.Text); + AddCP(1); + } + catch + { + txtpanelbuttonheight.Text = CustomizingSkin.panelbuttonheight.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttongap_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttongap = Convert.ToInt16(txtpanelbuttongap.Text); + AddCP(1); + } + catch + { + txtpanelbuttongap.Text = CustomizingSkin.panelbuttongap.ToString(); + } + SetPreviewSkin(false); + } + + private void cbpanelbuttonfont_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.panelbuttontextfont = (string)cbpanelbuttonfont.SelectedItem; + AddCP(1); + SetPreviewSkin(false); + } + + private void cbpanelbuttontextstyle_SelectedIndexChanged(object sender, EventArgs e) + { + SetFontStyle(cbpanelbuttontextstyle.SelectedItem.ToString(), ref CustomizingSkin.panelbuttontextstyle); + SetPreviewSkin(false); + + } + + private void SetPanelButtonTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Button Text", CustomizingSkin.panelbuttontextcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.panelbuttontextcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + + } + + private void SetPanelButtonColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Button", CustomizingSkin.panelbuttoncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.panelbuttoncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Panel Button", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.panelbutton = API.GraphicPickerSession.IdleImage; + CustomizingSkin.panelbuttonlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtpanelbuttoniconsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttoniconsize = Convert.ToInt16(txtpanelbuttoniconsize.Text); + AddCP(1); + } + catch + { + txtpanelbuttoniconsize.Text = CustomizingSkin.panelbuttoniconsize.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttoniconside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttoniconside = Convert.ToInt16(txtpanelbuttoniconside.Text); + AddCP(1); + } + catch + { + txtpanelbuttoniconside.Text = CustomizingSkin.panelbuttoniconside.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttonicontop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttonicontop = Convert.ToInt16(txtpanelbuttonicontop.Text); + AddCP(1); + } + catch + { + txtpanelbuttonicontop.Text = CustomizingSkin.panelbuttonicontop.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttontextside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttontextside = Convert.ToInt16(txtpanelbuttontextside.Text); + AddCP(1); + } + catch + { + txtpanelbuttontextside.Text = CustomizingSkin.panelbuttontextside.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttontexttop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttontexttop = Convert.ToInt16(txtpanelbuttontexttop.Text); + AddCP(1); + } + catch + { + txtpanelbuttontexttop.Text = CustomizingSkin.panelbuttontexttop.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpaneltextbuttonsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttontextsize = Convert.ToInt16(txtpaneltextbuttonsize.Text); + AddCP(1); + } + catch + { + txtpaneltextbuttonsize.Text = CustomizingSkin.panelbuttontextsize.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttontop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttonfromtop = Convert.ToInt16(txtpanelbuttontop.Text); + AddCP(1); + } + catch + { + txtpanelbuttontop.Text = CustomizingSkin.panelbuttonfromtop.ToString(); + } + SetPreviewSkin(false); + } + + public void SetClockValues() + { + pnlpanelclocktextcolour.BackColor = CustomizingSkin.clocktextcolour; + pnlclockbackgroundcolour.BackColor = CustomizingSkin.clockbackgroundcolor; + pnlclockbackgroundcolour.BackgroundImage = CustomizingImages.panelclock; + pnlclockbackgroundcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelclocklayout; + AddFonts(ref comboclocktextfont); + comboclocktextfont.Text = CustomizingSkin.panelclocktextfont; + ListFontStyles(ref comboclocktextstyle, CustomizingSkin.panelclocktextstyle); + txtclocktextfromtop.Text = CustomizingSkin.panelclocktexttop.ToString(); + txtclocktextsize.Text = CustomizingSkin.panelclocktextsize.ToString(); + } + + private void SetClockTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Clock Text", CustomizingSkin.clocktextcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.clocktextcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetClockBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Clock", CustomizingSkin.clockbackgroundcolor); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.clockbackgroundcolor = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Panel Clock", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.panelclock = API.GraphicPickerSession.IdleImage; + CustomizingSkin.panelclocklayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void btnpanelclock_Click(object sender, EventArgs e) + { + pnlpanelclockoptions.Show(); + pnlpanelclockoptions.BringToFront(); + } + + private void comboclocktextfont_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.panelclocktextfont = comboclocktextfont.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private void comboclocktextstyle_SelectedIndexChanged(object sender, EventArgs e) + { + SetFontStyle(comboclocktextstyle.Text, ref CustomizingSkin.panelclocktextstyle); + AddCP(1); + SetPreviewSkin(false); + } + + private void txtclocktextsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelclocktextsize = Convert.ToInt16(txtclocktextsize.Text); + AddCP(1); + } + catch + { + txtclocktextsize.Text = CustomizingSkin.panelclocktextsize.ToString(); + } + SetPreviewSkin(false); + } + + private void txtclocktextfromtop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelclocktexttop = Convert.ToInt16(txtclocktextfromtop.Text); + AddCP(1); + } + catch + { + txtclocktextfromtop.Text = CustomizingSkin.panelclocktexttop.ToString(); //Funny story: I accidentally assigned 'panelcocktexttop' to that property. xD - Michael VanOverbeek + } + SetPreviewSkin(false); + } + + private void SetALHoverColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("App Launcher Mouse Over", CustomizingSkin.applaunchermouseovercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.applaunchermouseovercolour = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + #endregion + + #region Title Text + public void SetupTitleTextValues() + { + txttitletexttop.Text = CustomizingSkin.titletextfromtop.ToString(); + txttitletextside.Text = CustomizingSkin.titletextfromside.ToString(); + combotitletextposition.Items.Clear(); + combotitletextposition.Items.Add("Left"); + combotitletextposition.Items.Add("Centre"); + combotitletextposition.Text = CustomizingSkin.titletextpos; + AddFonts(ref combotitletextfont); + combotitletextfont.Text = CustomizingSkin.titletextfontfamily; + ListFontStyles(ref combotitletextstyle, CustomizingSkin.titletextfontstyle); + pnltitletextcolour.BackColor = CustomizingSkin.titletextcolour; + txttitletextsize.Text = CustomizingSkin.titletextfontsize.ToString(); + } + + private void txttitletexttop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titletextfromtop = Convert.ToInt16(txttitletexttop.Text); + AddCP(1); + } + catch + { + txttitletexttop.Text = CustomizingSkin.titletextfromtop.ToString(); + } + SetPreviewSkin(false); + } + + private void txttitletextside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titletextfromside = Convert.ToInt16(txttitletextside.Text); + AddCP(1); + } + catch + { + txttitletextside.Text = CustomizingSkin.titletextfromside.ToString(); + } + SetPreviewSkin(false); + } + + private void combotitletextposition_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.titletextpos = combotitletextposition.Text; + CustomizingSkin.titletextposition = combotitletextposition.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private void combotitletextfont_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.titletextfontfamily = combotitletextfont.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private void combotitletextstyle_SelectedIndexChanged(object sender, EventArgs e) + { + SetFontStyle(combotitletextstyle.Text, ref CustomizingSkin.titletextfontstyle); + SetPreviewSkin(false); + } + + private void txttitletextsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titletextfontsize = Convert.ToInt16(txttitletextsize.Text); + AddCP(1); + } + catch + { + txttitletextsize.Text = CustomizingSkin.titletextfontsize.ToString(); + } + SetPreviewSkin(false); + } + + private void SetTitleTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Title Text", CustomizingSkin.titletextcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.titletextcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void btntitletext_Click(object sender, EventArgs e) + { + pnltitletextoptions.Show(); + pnltitletextoptions.BringToFront(); + } + #endregion + + #region Main Buttons + + private void btnmenus_Click(object sender, EventArgs e) + { + /*API.CreateInfoboxSession("Test", "Test", infobox.InfoboxMode.Info); + HideAll(); + pnlmenuoptions.Show(); + pnlmenuoptions.BringToFront(); + SetPreviewSkin(true);*/ + } + + private void Button2_Click(object sender, EventArgs e) + { + } + + private void Label68_Click(object sender, EventArgs e) + { + + } + + private void btntitlebar_Click(object sender, EventArgs e) + { + pnltitlebaroptions.Show(); + pnltitlebaroptions.BringToFront(); + SetPreviewSkin(true); + } + + private void btntitletext_Click_1(object sender, EventArgs e) + { + pnltitletextoptions.Show(); + pnltitletextoptions.BringToFront(); + SetPreviewSkin(true); + } + + private void btnbuttons_Click(object sender, EventArgs e) + { + pnlbuttonoptions.Show(); + pnlbuttonoptions.BringToFront(); + SetPreviewSkin(true); + } + + private void btnborders_Click(object sender, EventArgs e) + { + pnlborderoptions.Show(); + pnlborderoptions.BringToFront(); + SetPreviewSkin(true); + } + + #endregion + + #region Window Borders + + public void SetupBorderValues() + { + cbindividualbordercolours.Checked = IndividualBorders; + //hide/show labels + lbleft.Visible = IndividualBorders; + lbright.Visible = IndividualBorders; + lbbottom.Visible = IndividualBorders; + lbbright.Visible = IndividualBorders; + lbbleft.Visible = IndividualBorders; + //hide/show individual colors + pnlborderleftcolour.Visible = IndividualBorders; + pnlborderrightcolour.Visible = IndividualBorders; + pnlborderbottomcolour.Visible = IndividualBorders; + pnlborderbottomleftcolour.Visible = IndividualBorders; + pnlborderbottomrightcolour.Visible = IndividualBorders; + //main color + pnlbordercolour.BackColor = CustomizingSkin.borderleftcolour; + pnlbordercolour.BackgroundImage = CustomizingImages.borderleft; + pnlbordercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; + //individual color + //left + pnlborderleftcolour.BackColor = CustomizingSkin.borderleftcolour; + pnlborderleftcolour.BackgroundImage = CustomizingImages.borderleft; + pnlborderleftcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; + //right + pnlborderrightcolour.BackColor = CustomizingSkin.borderrightcolour; + pnlborderrightcolour.BackgroundImage = CustomizingImages.borderright; + pnlborderrightcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; + //bottom + pnlborderbottomcolour.BackColor = CustomizingSkin.borderbottomcolour; + pnlborderbottomcolour.BackgroundImage = CustomizingImages.borderbottom; + pnlborderbottomcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderbottomlayout; + //bottom corners + pnlborderbottomleftcolour.BackColor = CustomizingSkin.bottomleftcornercolour; + pnlborderbottomleftcolour.BackgroundImage = CustomizingImages.bottomleftcorner; + pnlborderbottomleftcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; + + pnlborderbottomrightcolour.BackColor = CustomizingSkin.bottomrightcornercolour; + pnlborderbottomrightcolour.BackgroundImage = CustomizingImages.bottomrightcorner; + pnlborderbottomrightcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; + + + //border width + txtbordersize.Text = CustomizingSkin.borderwidth.ToString(); + } + + private bool IndividualBorders = false; + + private void cbindividualbordercolours_CheckedChanged(object sender, EventArgs e) + { + IndividualBorders = cbindividualbordercolours.Checked; + SetPreviewSkin(true); + } + + private void SetMainBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.borderleftcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.borderleftcolour = API.GetLastColorFromSession(); + CustomizingSkin.borderrightcolour = API.GetLastColorFromSession(); + CustomizingSkin.borderbottomcolour = API.GetLastColorFromSession(); + CustomizingSkin.bottomleftcornercolour = API.GetLastColorFromSession(); + CustomizingSkin.bottomrightcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.borderleft = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderleftlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.borderright = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderrightlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.borderbottom = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderbottomlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.bottomleftcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.bottomleftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.bottomrightcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.bottomrightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetLeftBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.borderleftcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.borderleftcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.borderleft = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderleftlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetBottomBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.borderbottomcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.borderbottomcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.borderbottom = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderbottomlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetRightBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.borderrightcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.borderrightcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.borderright = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderrightlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetBottomLColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.bottomleftcornercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.bottomleftcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.bottomleftcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.bottomleftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetBottomRBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.bottomrightcornercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.bottomrightcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.bottomrightcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.bottomrightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtbordersize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.borderwidth = Convert.ToInt16(txtbordersize.Text); + AddCP(1); + } + catch + { + txtbordersize.Text = CustomizingSkin.borderwidth.ToString(); + } + SetPreviewSkin(false); + } + #endregion + + #region Title Bar + + public void SetupTitleBarValues() + { + //Main color + pnltitlebarcolour.BackColor = CustomizingSkin.titlebarcolour; + pnltitlebarcolour.BackgroundImage = CustomizingImages.titlebar; + pnltitlebarcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.titlebarlayout; + //Corners + cboxtitlebarcorners.Checked = CustomizingSkin.enablecorners; + //Hide some options if corners are disabled. + lbcornerwidth.Visible = CustomizingSkin.enablecorners; + lbcornerwidthpx.Visible = CustomizingSkin.enablecorners; + lbleftcornercolor.Visible = CustomizingSkin.enablecorners; + lbrightcornercolor.Visible = CustomizingSkin.enablecorners; + pnltitlebarleftcornercolour.Visible = CustomizingSkin.enablecorners; + pnltitlebarrightcornercolour.Visible = CustomizingSkin.enablecorners; + txttitlebarcornerwidth.Visible = CustomizingSkin.enablecorners; + //Corner Width + txttitlebarcornerwidth.Text = CustomizingSkin.titlebarcornerwidth.ToString(); + //Left/Right colors + pnltitlebarleftcornercolour.BackColor = CustomizingSkin.leftcornercolour; + pnltitlebarleftcornercolour.BackgroundImage = CustomizingImages.leftcorner; + pnltitlebarleftcornercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.leftcornerlayout; + + pnltitlebarrightcornercolour.BackColor = CustomizingSkin.rightcornercolour; + pnltitlebarrightcornercolour.BackgroundImage = CustomizingImages.rightcorner; + pnltitlebarrightcornercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rightcornerlayout; + + //Height + txttitlebarheight.Text = CustomizingSkin.titlebarheight.ToString(); + + //Icon + txticonfromside.Text = CustomizingSkin.titleiconfromside.ToString(); + txticonfromtop.Text = CustomizingSkin.titleiconfromtop.ToString(); + + } + + private void SetTitlebarColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Titlebar Color", CustomizingSkin.titlebarcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.titlebarcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Titlebar", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.titlebar = API.GraphicPickerSession.IdleImage; + CustomizingSkin.titlebarlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void cboxtitlebarcorners_CheckedChanged(object sender, EventArgs e) + { + CustomizingSkin.enablecorners = cboxtitlebarcorners.Checked; + SetPreviewSkin(true); + } + + private void txttitlebarheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titlebarheight = Convert.ToInt16(txttitlebarheight.Text); + AddCP(1); + } + catch + { + txttitlebarheight.Text = CustomizingSkin.titlebarheight.ToString(); + } + SetPreviewSkin(false); + } + + private void txttitlebarcornerwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titlebarcornerwidth = Convert.ToInt16(txttitlebarcornerwidth.Text); + AddCP(1); + } + catch + { + txttitlebarcornerwidth.Text = CustomizingSkin.titlebarcornerwidth.ToString(); + } + SetPreviewSkin(false); + } + + private void SetLeftCornerColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Left Corner", CustomizingSkin.leftcornercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.leftcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Left Corner", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.leftcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.leftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetRightCornerColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Right Corner", CustomizingSkin.rightcornercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.rightcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Right Corner", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.rightcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.rightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txticonfromside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titleiconfromside = Convert.ToInt16(txticonfromside.Text); + AddCP(1); + } + catch + { + txticonfromside.Text = CustomizingSkin.titleiconfromside.ToString(); + } + SetPreviewSkin(false); + } + + private void txticonfromtop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titleiconfromtop = Convert.ToInt16(txticonfromtop.Text); + AddCP(1); + } + catch + { + txticonfromtop.Text = CustomizingSkin.titleiconfromtop.ToString(); + } + SetPreviewSkin(false); + } + + #endregion + + #region Title Button Prep + private void combobuttonoption_SelectedIndexChanged(object sender, EventArgs e) + { + SetupButtonUI(combobuttonoption.Text); + } + + public void SetupButtonUI(string button) + { + pnlminimizebuttonoptions.Hide(); + pnlclosebuttonoptions.Hide(); + pnlrollupbuttonoptions.Hide(); + switch(button) + { + case "Close": + pnlclosebuttonoptions.Show(); + pnlclosebuttonoptions.BringToFront(); + break; + case "Roll Up": + pnlrollupbuttonoptions.Show(); + pnlrollupbuttonoptions.BringToFront(); + break; + case "Minimize": + pnlminimizebuttonoptions.Show(); + pnlminimizebuttonoptions.BringToFront(); + break; + } + SetPreviewSkin(true); + } + + public void SetupButtonValues() + { + ///Minimize + //Color + pnlminimizebuttoncolour.BackColor = CustomizingSkin.minbtncolour; + pnlminimizebuttoncolour.BackgroundImage = CustomizingImages.minbtn; + pnlminimizebuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.minbtnlayout; + //Width, Height + txtminimizebuttonheight.Text = CustomizingSkin.minbtnsize.Height.ToString(); + txtminimizebuttonwidth.Text = CustomizingSkin.minbtnsize.Width.ToString(); + //Side, Top + txtminimizebuttonside.Text = CustomizingSkin.minbtnfromside.ToString(); + txtminimizebuttontop.Text = CustomizingSkin.minbtnfromtop.ToString(); + + ///Rollup + //Color + pnlrollupbuttoncolour.BackColor = CustomizingSkin.rollbtncolour; + pnlrollupbuttoncolour.BackgroundImage = CustomizingImages.rollbtn; + pnlrollupbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rollbtnlayout; + //Width, Height + txtrollupbuttonheight.Text = CustomizingSkin.rollbtnsize.Height.ToString(); + txtrollupbuttonwidth.Text = CustomizingSkin.rollbtnsize.Width.ToString(); + //Side, Top + txtrollupbuttonside.Text = CustomizingSkin.rollbtnfromside.ToString(); + txtrollupbuttontop.Text = CustomizingSkin.rollbtnfromtop.ToString(); + + + ///Close + //Color + pnlclosebuttoncolour.BackColor = CustomizingSkin.closebtncolour; + pnlclosebuttoncolour.BackgroundImage = CustomizingImages.closebtn; + pnlclosebuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.closebtnlayout; + //Width, Height + txtclosebuttonheight.Text = CustomizingSkin.closebtnsize.Height.ToString(); + txtclosebuttonwidth.Text = CustomizingSkin.closebtnsize.Width.ToString(); + //Side, Top + txtclosebuttonfromside.Text = CustomizingSkin.closebtnfromside.ToString(); + txtclosebuttonfromtop.Text = CustomizingSkin.closebtnfromtop.ToString(); + + } + + + #endregion + + + #region Minimize + private void SetMinimizeColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Minimize Color", CustomizingSkin.minbtncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.minbtncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Minimize Button", true); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.minbtn = API.GraphicPickerSession.IdleImage; + CustomizingImages.minbtnclick = API.GraphicPickerSession.MouseDownImage; + CustomizingImages.minbtnhover = API.GraphicPickerSession.MouseOverImage; + CustomizingSkin.minbtnlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtminimizebuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.minbtnsize.Height = Convert.ToInt16(txtminimizebuttonheight.Text); + AddCP(1); + } + catch + { + txtminimizebuttonheight.Text = CustomizingSkin.minbtnsize.Height.ToString(); + } + SetPreviewSkin(true); + } + + private void txtminimizebuttonwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.minbtnsize.Width = Convert.ToInt16(txtminimizebuttonwidth.Text); + AddCP(1); + } + catch + { + txtminimizebuttonwidth.Text = CustomizingSkin.minbtnsize.Width.ToString(); + } + SetPreviewSkin(true); + } + + private void txtminimizebuttontop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.minbtnfromtop = Convert.ToInt16(txtminimizebuttontop.Text); + AddCP(1); + } + catch + { + txtminimizebuttontop.Text = CustomizingSkin.minbtnfromtop.ToString(); + } + SetPreviewSkin(true); + } + + private void txtminimizebuttonside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.minbtnfromside = Convert.ToInt16(txtminimizebuttonside.Text); + AddCP(1); + } + catch + { + txtminimizebuttonside.Text = CustomizingSkin.minbtnfromside.ToString(); + } + SetPreviewSkin(true); + } + #endregion + + #region Rollup + private void SetrollupColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("rollup Color", CustomizingSkin.rollbtncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.rollbtncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("rollup Button", true); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.rollbtn = API.GraphicPickerSession.IdleImage; + CustomizingImages.rollbtnclick = API.GraphicPickerSession.MouseDownImage; + CustomizingImages.rollbtnhover = API.GraphicPickerSession.MouseOverImage; + CustomizingSkin.rollbtnlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtrollupbuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.rollbtnsize.Height = Convert.ToInt16(txtrollupbuttonheight.Text); + AddCP(1); + } + catch + { + txtrollupbuttonheight.Text = CustomizingSkin.rollbtnsize.Height.ToString(); + } + SetPreviewSkin(true); + } + + private void txtrollupbuttonwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.rollbtnsize.Width = Convert.ToInt16(txtrollupbuttonwidth.Text); + AddCP(1); + } + catch + { + txtrollupbuttonwidth.Text = CustomizingSkin.rollbtnsize.Width.ToString(); + } + SetPreviewSkin(true); + } + + private void txtrollupbuttontop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.rollbtnfromtop = Convert.ToInt16(txtrollupbuttontop.Text); + AddCP(1); + } + catch + { + txtrollupbuttontop.Text = CustomizingSkin.rollbtnfromtop.ToString(); + } + SetPreviewSkin(true); + } + + private void txtrollupbuttonside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.rollbtnfromside = Convert.ToInt16(txtrollupbuttonside.Text); + AddCP(1); + } + catch + { + txtrollupbuttonside.Text = CustomizingSkin.rollbtnfromside.ToString(); + } + SetPreviewSkin(true); + } + #endregion + + #region Close + private void SetcloseColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("close Color", CustomizingSkin.closebtncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.closebtncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("close Button", true); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.closebtn = API.GraphicPickerSession.IdleImage; + CustomizingImages.closebtnclick = API.GraphicPickerSession.MouseDownImage; + CustomizingImages.closebtnhover = API.GraphicPickerSession.MouseOverImage; + CustomizingSkin.closebtnlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtclosebuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.closebtnsize.Height = Convert.ToInt16(txtclosebuttonheight.Text); + AddCP(1); + } + catch + { + txtclosebuttonheight.Text = CustomizingSkin.closebtnsize.Height.ToString(); + } + SetPreviewSkin(true); + } + + private void txtclosebuttonwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.closebtnsize.Width = Convert.ToInt16(txtclosebuttonwidth.Text); + AddCP(1); + } + catch + { + txtclosebuttonwidth.Text = CustomizingSkin.closebtnsize.Width.ToString(); + } + SetPreviewSkin(true); + } + + private void txtclosebuttonfromtop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.closebtnfromtop = Convert.ToInt16(txtclosebuttonfromtop.Text); + AddCP(1); + } + catch + { + txtclosebuttonfromtop.Text = CustomizingSkin.closebtnfromtop.ToString(); + } + SetPreviewSkin(true); + } + + private void txtclosebuttonfromside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.closebtnfromside = Convert.ToInt16(txtclosebuttonfromside.Text); + AddCP(1); + } + catch + { + txtclosebuttonfromside.Text = CustomizingSkin.closebtnfromside.ToString(); + } + SetPreviewSkin(true); + } + #endregion + + #region Menus - Basic Tier + private void btnmenus_Click_1(object sender, EventArgs e) + { + HideAll(); + pnlmenus.Show(); + pnlmenus.BringToFront(); + SetPreviewSkin(true); + pnlmenusintro.BringToFront(); + } + + public void SetupBasicMenuValues() + { + //Menu strip + pnlmenubarbegin.BackColor = CustomizingSkin.Menu_MenuStripGradientBegin; + pnlmenubarend.BackColor = CustomizingSkin.Menu_MenuStripGradientEnd; + + //Toolstrip + pnltoolbarbegin.BackColor = CustomizingSkin.Menu_ToolStripGradientBegin; + pnltoolbarmiddle.BackColor = CustomizingSkin.Menu_ToolStripGradientMiddle; + pnltoolbarend.BackColor = CustomizingSkin.Menu_ToolStripGradientEnd; + + //Status + pnlstatusbegin.BackColor = CustomizingSkin.Menu_StatusStripGradientBegin; + pnlstatusend.BackColor = CustomizingSkin.Menu_StatusStripGradientEnd; + + //Dropdown BG + pnldropdownbg.BackColor = CustomizingSkin.Menu_ToolStripDropDownBackground; + + //Text Color + pnlmenutextcolor.BackColor = CustomizingSkin.Menu_TextColor; + } + + private void MenuBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Bar Begin", CustomizingSkin.Menu_MenuStripGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuStripGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MenuEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Bar End", CustomizingSkin.Menu_MenuStripGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuStripGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void ToolBarBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Tool Bar Begin", CustomizingSkin.Menu_ToolStripGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void ToolBarEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Tool Bar End", CustomizingSkin.Menu_ToolStripGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void ToolBarMiddle(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Tool Bar Middle", CustomizingSkin.Menu_ToolStripGradientMiddle); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripGradientMiddle = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void StatusBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Status Bar Begin", CustomizingSkin.Menu_StatusStripGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_StatusStripGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void StatusEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Status Bar End", CustomizingSkin.Menu_StatusStripGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_StatusStripGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void DropDownBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Dropdown BG", CustomizingSkin.Menu_ToolStripDropDownBackground); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripDropDownBackground = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void btnbasic_Click(object sender, EventArgs e) + { + pnlbasic.Show(); + pnlbasic.BringToFront(); + } + + private void SetMenuTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Text Color", CustomizingSkin.Menu_TextColor); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_TextColor = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + #endregion + + #region Menus - Dropdowns + private void btndropdown_Click(object sender, EventArgs e) + { + pnldropdown.Show(); + pnldropdown.BringToFront(); + SetPreviewSkin(true); + } + + public void SetupDropdownValues() + { + //Highlight Color - Basic + pnlhborder.BackColor = CustomizingSkin.Menu_MenuItemBorder; + pnlhcolor.BackColor = CustomizingSkin.Menu_MenuItemSelected; + + //Image Margin + pnlmarginbegin.BackColor = CustomizingSkin.Menu_ImageMarginGradientBegin; + pnlmarginmiddle.BackColor = CustomizingSkin.Menu_ImageMarginGradientMiddle; + pnlmarginend.BackColor = CustomizingSkin.Menu_ImageMarginGradientEnd; + + //Drop-Down Border + pnlddborder.BackColor = CustomizingSkin.Menu_MenuBorder; + } + + private void HighlightBorder(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Highlight Border", CustomizingSkin.Menu_MenuItemBorder); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemBorder = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void HighlightColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Highlight Color", CustomizingSkin.Menu_MenuItemSelected); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MarginBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Margin Begin", CustomizingSkin.Menu_ImageMarginGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ImageMarginGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MarginEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Margin End", CustomizingSkin.Menu_ImageMarginGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ImageMarginGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MarginMiddle(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Margin Middle", CustomizingSkin.Menu_ImageMarginGradientMiddle); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ImageMarginGradientMiddle = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MenuBorder(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Border", CustomizingSkin.Menu_MenuBorder); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuBorder = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + #endregion + + public void SetupAdvancedMenuValues() + { + //Checkboxes + pnlcheckbg.BackColor = CustomizingSkin.Menu_CheckBackground; + + //Buttons - Highlight + pnlbuttonselected.BackColor = CustomizingSkin.Menu_ButtonSelectedHighlight; + pnlbuttonpressed.BackColor = CustomizingSkin.Menu_ButtonPressedHighlight; + pnlbuttonchecked.BackColor = CustomizingSkin.Menu_ButtonCheckedHighlight; + + //Advanced Buttons + pnlselectedbegin.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientBegin; + pnlselectedmiddle.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientMiddle; + pnlselectedend.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientEnd; + + pnlpressedbegin.BackColor = CustomizingSkin.Menu_ButtonPressedGradientBegin; + pnlpressedmiddle.BackColor = CustomizingSkin.Menu_ButtonPressedGradientMiddle; + pnlpressedend.BackColor = CustomizingSkin.Menu_ButtonPressedGradientEnd; + + //Menu Items + pnlitemselected.BackColor = CustomizingSkin.Menu_MenuItemSelected; + pnlitemselectedbegin.BackColor = CustomizingSkin.Menu_MenuItemSelectedGradientBegin; + pnlitemselectedend.BackColor = CustomizingSkin.Menu_MenuItemSelectedGradientEnd; + + } + + private void btnadvanced_Click(object sender, EventArgs e) + { + pnladvanced.Show(); + pnladvanced.BringToFront(); + SetPreviewSkin(true); + } + + private void SetSelectedBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Selected Begin", CustomizingSkin.Menu_ButtonSelectedGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonSelectedGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetSelectedMiddle(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Selected Middle", CustomizingSkin.Menu_ButtonSelectedGradientMiddle); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonSelectedGradientMiddle = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetSelectedEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Selected End", CustomizingSkin.Menu_ButtonSelectedGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonSelectedGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetPressedBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Pressed Begin", CustomizingSkin.Menu_ButtonPressedGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonPressedGradientBegin = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonCheckedGradientBegin = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetPressedMiddle(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Pressed Middle", CustomizingSkin.Menu_ButtonPressedGradientMiddle); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonPressedGradientMiddle = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonCheckedGradientMiddle = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetPressedEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Pressed End", CustomizingSkin.Menu_ButtonPressedGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonPressedGradientEnd = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonCheckedGradientEnd = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void btnmorebuttons_Click(object sender, EventArgs e) + { + pnlmore.Show(); + pnlmore.BringToFront(); + SetPreviewSkin(true); + } + + private void SetCheckBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Checkbox Background", CustomizingSkin.Menu_CheckBackground); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_CheckBackground = API.GetLastColorFromSession(); + CustomizingSkin.Menu_CheckPressedBackground = API.GetLastColorFromSession(); + CustomizingSkin.Menu_CheckSelectedBackground = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetButtonCheckBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Checked Background", CustomizingSkin.Menu_ButtonCheckedHighlight); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonCheckedHighlight = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonCheckedHighlightBorder = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetButtonSelectedBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Selected Background", CustomizingSkin.Menu_ButtonSelectedHighlight); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonSelectedHighlight = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonSelectedHighlightBorder = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonSelectedBorder = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetButtonPressedBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Pressed Background", CustomizingSkin.Menu_ButtonPressedHighlight); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonPressedHighlight = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonPressedHighlightBorder = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonPressedBorder = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetItemSelected(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Selected", CustomizingSkin.Menu_MenuItemSelected); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetItemSelectedBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Selected Begin", CustomizingSkin.Menu_MenuItemSelectedGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelectedGradientBegin = API.GetLastColorFromSession(); + CustomizingSkin.Menu_MenuItemPressedGradientMiddle = API.GetLastColorFromSession(); + CustomizingSkin.Menu_MenuItemPressedGradientBegin = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetItemSelectedEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Selected End", CustomizingSkin.Menu_MenuItemSelectedGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelectedGradientEnd = API.GetLastColorFromSession(); + CustomizingSkin.Menu_MenuItemPressedGradientEnd = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void btnwindowcomposition_Click(object sender, EventArgs e) + { + HideAll(); + pnldesktopcomposition.Show(); + pnldesktopcomposition.BringToFront(); + pnlfancyintro.BringToFront(); + SetPreviewSkin(true); + } + + public void SetupWindowEffect(ComboBox cb, T style) + { + cb.Items.Clear(); + var vals = Enum.GetValues(typeof(T)).Cast(); + foreach(var item in vals) + { + cb.Items.Add(item.ToString()); + } + cb.SelectedItem = style.ToString(); + } + + public void SetAnimation(ComboBox cb, ref T objToSet) + { + string text = cb.SelectedItem.ToString(); + var vals = Enum.GetValues(typeof(T)).Cast(); + foreach (var item in vals) + { + if(item.ToString() == text) + { + objToSet = item; + codepointstogive += 1; + } + } + + } + + public void SetupAnimationStyleValues() + { + SetupWindowEffect(cbopenanim, CustomizingSkin.WindowOpenAnimation); + SetupWindowEffect(cbcloseanim, CustomizingSkin.WindowCloseAnimation); + SetupWindowEffect(cbdrageffect, CustomizingSkin.DragAnimation); + + //Drag fade. + txtfadespeed.Text = CustomizingSkin.DragFadeInterval.ToString(); + txtdragfadedec.Text = ((decimal)CustomizingSkin.DragFadeSpeed).ToString(); + txtdragopacitydec.Text = ((decimal)CustomizingSkin.DragFadeLevel).ToString(); + + //Drag Shake + txtshakeminoffset.Text = CustomizingSkin.ShakeMinOffset.ToString(); + txtshakemax.Text = CustomizingSkin.ShakeMaxOffset.ToString(); + + //Window Fade + txtwinfadespeed.Text = CustomizingSkin.WindowFadeTime.ToString(); + txtwinfadedec.Text = CustomizingSkin.WindowFadeSpeed.ToString(); + + } + + + private void btnfancywindows_Click(object sender, EventArgs e) + { + pnlfancywindows.BringToFront(); + SetPreviewSkin(true); + } + + private void cbopenanim_SelectedIndexChanged(object sender, EventArgs e) + { + SetAnimation(cbopenanim, ref CustomizingSkin.WindowOpenAnimation); + } + + private void cbcloseanim_SelectedIndexChanged(object sender, EventArgs e) + { + SetAnimation(cbcloseanim, ref CustomizingSkin.WindowCloseAnimation); + } + + private void cbdrageffect_SelectedIndexChanged(object sender, EventArgs e) + { + SetAnimation(cbdrageffect, ref CustomizingSkin.DragAnimation); + } + + private void txtfadespeed_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.DragFadeInterval = Convert.ToInt32(txtfadespeed.Text); + AddCP(1); + } + catch + { + txtfadespeed.Text = CustomizingSkin.DragFadeInterval.ToString(); + } + } + + private void txtdragfadedec_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.DragFadeSpeed = Convert.ToDouble(txtdragfadedec.Text); + AddCP(1); + } + catch + { + txtdragfadedec.Text = CustomizingSkin.DragFadeSpeed.ToString(); + } + } + + private void btnfancydragging_Click(object sender, EventArgs e) + { + pnlfancydragging.Show(); + pnlfancydragging.BringToFront(); + SetPreviewSkin(true); + } + + private void txtdragopacitydec_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.DragFadeLevel = Convert.ToDouble(txtdragopacitydec.Text); + AddCP(1); + } + catch + { + txtdragopacitydec.Text = CustomizingSkin.DragFadeLevel.ToString(); + } + } + + private void txtshakemax_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.ShakeMaxOffset = Convert.ToInt32(txtshakemax.Text); + AddCP(1); + } + catch + { + txtshakemax.Text = CustomizingSkin.ShakeMaxOffset.ToString(); + } + } + + private void txtshakeminoffset_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.ShakeMinOffset = Convert.ToInt32(txtshakeminoffset.Text); + AddCP(1); + } + catch + { + txtshakeminoffset.Text = CustomizingSkin.ShakeMinOffset.ToString(); + } + } + + private void txtwinfadespeed_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.WindowFadeTime = Convert.ToInt32(txtwinfadespeed.Text); + AddCP(1); + } + catch + { + txtwinfadespeed.Text = CustomizingSkin.WindowFadeTime.ToString(); + } + } + + private void txtwinfadedec_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.WindowFadeSpeed = Convert.ToDecimal(txtwinfadedec.Text); + AddCP(1); + } + catch + { + txtwinfadedec.Text = CustomizingSkin.WindowFadeSpeed.ToString(); + } + } + + private void btnmore_Click(object sender, EventArgs e) + { + pnlluaoptions.Show(); + pnlluaoptions.BringToFront(); + SetupLuaUI(); + + } + + public void SetupLuaUI() + { + pnlluafield.Controls.Clear(); + flmorebuttons.Controls.Clear(); + if (API.LuaShifterRegistry == null) + { + var l = new Label(); + l.Dock = DockStyle.Fill; + l.TextAlign = ContentAlignment.MiddleCenter; + l.Font = new Font("Microsoft Sans Serif", 12); + l.Text = @"Nothing to show here. + +There are no options to show here yet. + +You can add options in the Lua interpreter using the shifter_add_category(string name), shifter_add_value(string category, string name, value), and shifter_remove_category(string name) methods. Applications may also add their own values."; + pnlluafield.Controls.Add(l); + l.Show(); + } + else + { + foreach (var kv in API.LuaShifterRegistry) + { + var b = new Button(); + b.Text = kv.Key; + b.FlatStyle = FlatStyle.Flat; + b.AutoSize = true; + b.AutoSizeMode = AutoSizeMode.GrowAndShrink; + flmorebuttons.Controls.Add(b); + b.Show(); + b.Click += (object s, EventArgs a) => + { + SetupLuaForm(kv.Value); + }; + } + } + } + + public void SetupLuaForm(Dictionary d) + { + pnlluafield.Controls.Clear(); + foreach(var kv in d) + { + IShifterSetting l = new ShifterTextInput(); + if (kv.Value is string) + l = new ShifterTextInput(); + if (kv.Value is Image) + l = new ShifterGraphicInput(); + if (kv.Value is Color) + l = new ShifterColorInput(); + if (kv.Value is int || kv.Value is float || kv.Value is double || kv.Value is decimal) + l = new ShifterIntInput(); + if(l is ShifterIntInput) + { + var i = l as ShifterIntInput; + if (kv.Value is int) + i.NoDecimal = true; + else + i.NoDecimal = false; + } + if (pnlluafield.Controls.Count > 0) + { + var ctrl = pnlluafield.Controls[pnlluafield.Controls.Count - 1]; + l.Location = new Point(ctrl.Left + ctrl.Width + 5, ctrl.Top); + if(l.Left + l.Width > pnlluafield.Width) + { + l.Left = 2; + l.Top = ctrl.Top + ctrl.Height + 2; + } + } + else + { + l.Location = new Point(2, 2); + } + + pnlluafield.Controls.Add(l); + l.Show(); + l.Font = new Font("Microsoft Sans Serif", 9); + l.Text = kv.Key; + l.Value = kv.Value; + l.OnValueChange += (hello, its_me) => + { + foreach(var dict in API.LuaShifterRegistry) + { + if(API.LuaShifterRegistry[dict.Key] == d) + { + API.LuaShifterRegistry[dict.Key][kv.Key] = l.Value; + } + } + }; + + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Shifter.resx b/source/WindowsFormsApplication1/Apps/Shifter.resx new file mode 100644 index 0000000..2b9e8c1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shifter.resx @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 140, 17 + + + 238, 17 + + + 390, 17 + + + The Shifter is your one-stop shop for customizing every aspect of ShiftOS. From colors to fonts, from images to sizes and locations, we have it all! + +Simply click the buttons on the right to choose a category, and then from there, choose a sub-category, and have fun customizing! In ShiftOS, the sky and your hard drive space is the limit! + + + 508, 17 + + + 508, 17 + + + Have you made a nice skin and want a clean slate to make another? Do you want to reverse back to regular ShiftOS? Well, fear not, the 'Reset' button is here. Just click it, and ShiftOS will wok it's magic. + + + The Advanced Shifter allows you to customize even more of ShiftOS by letting you customize virtually every aspect of the various menus in ShiftOS. + +These menus include the App Launcher menu, any context menus, and any toolbars within applications. + +There's a lot to customize, so we've grouped everything into categories on the left. + +Customize to your heart's content! + + + 673, 17 + + + 756, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs b/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs new file mode 100644 index 0000000..5d20f14 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs @@ -0,0 +1,144 @@ +namespace ShiftOS +{ + partial class Shiftnet + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pnlcontrols = new System.Windows.Forms.Panel(); + this.btngo = new System.Windows.Forms.Button(); + this.btnhome = new System.Windows.Forms.Button(); + this.txtaddress = new System.Windows.Forms.TextBox(); + this.wbshiftnet = new System.Windows.Forms.WebBrowser(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlcontrols.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // pnlcontrols + // + this.pnlcontrols.BackColor = System.Drawing.Color.Gray; + this.pnlcontrols.Controls.Add(this.btngo); + this.pnlcontrols.Controls.Add(this.btnhome); + this.pnlcontrols.Controls.Add(this.txtaddress); + this.pnlcontrols.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlcontrols.Location = new System.Drawing.Point(0, 0); + this.pnlcontrols.Name = "pnlcontrols"; + this.pnlcontrols.Size = new System.Drawing.Size(792, 42); + this.pnlcontrols.TabIndex = 0; + // + // btngo + // + this.btngo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btngo.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btngo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btngo.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btngo.ForeColor = System.Drawing.Color.White; + this.btngo.Location = new System.Drawing.Point(731, 9); + this.btngo.Name = "btngo"; + this.btngo.Size = new System.Drawing.Size(45, 23); + this.btngo.TabIndex = 2; + this.btngo.Text = "Go"; + this.btngo.UseVisualStyleBackColor = true; + this.btngo.Click += new System.EventHandler(this.btngo_Click); + // + // btnhome + // + this.btnhome.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnhome.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnhome.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnhome.ForeColor = System.Drawing.Color.White; + this.btnhome.Location = new System.Drawing.Point(4, 12); + this.btnhome.Name = "btnhome"; + this.btnhome.Size = new System.Drawing.Size(75, 23); + this.btnhome.TabIndex = 1; + this.btnhome.Text = "Home"; + this.btnhome.UseVisualStyleBackColor = true; + this.btnhome.Click += new System.EventHandler(this.btnhome_Click); + // + // txtaddress + // + this.txtaddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtaddress.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtaddress.Font = new System.Drawing.Font("Times New Roman", 13F); + this.txtaddress.Location = new System.Drawing.Point(85, 12); + this.txtaddress.Name = "txtaddress"; + this.txtaddress.Size = new System.Drawing.Size(640, 20); + this.txtaddress.TabIndex = 0; + this.txtaddress.Text = "shiftnet://main"; + // + // wbshiftnet + // + this.wbshiftnet.AllowWebBrowserDrop = false; + this.wbshiftnet.Dock = System.Windows.Forms.DockStyle.Fill; + this.wbshiftnet.IsWebBrowserContextMenuEnabled = false; + this.wbshiftnet.Location = new System.Drawing.Point(0, 42); + this.wbshiftnet.MinimumSize = new System.Drawing.Size(20, 20); + this.wbshiftnet.Name = "wbshiftnet"; + this.wbshiftnet.Size = new System.Drawing.Size(792, 463); + this.wbshiftnet.TabIndex = 1; + this.wbshiftnet.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.LinkInterceptor); + // + // panel1 + // + this.panel1.Controls.Add(this.wbshiftnet); + this.panel1.Controls.Add(this.pnlcontrols); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(792, 505); + this.panel1.TabIndex = 2; + // + // Shiftnet + // + this.AcceptButton = this.btngo; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnhome; + this.ClientSize = new System.Drawing.Size(792, 505); + this.Controls.Add(this.panel1); + this.Name = "Shiftnet"; + this.Text = "MainForm"; + this.Load += new System.EventHandler(this.MainForm_Load); + this.pnlcontrols.ResumeLayout(false); + this.pnlcontrols.PerformLayout(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlcontrols; + private System.Windows.Forms.WebBrowser wbshiftnet; + private System.Windows.Forms.Button btngo; + private System.Windows.Forms.Button btnhome; + private System.Windows.Forms.TextBox txtaddress; + private System.Windows.Forms.Panel panel1; + + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.cs b/source/WindowsFormsApplication1/Apps/Shiftnet.cs new file mode 100644 index 0000000..cbcab1b --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftnet.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Net; + +namespace ShiftOS +{ + public partial class Shiftnet : Form + { + public Shiftnet() + { + InitializeComponent(); + } + + private void MainForm_Load(object sender, EventArgs e) + { + InitialSetup(); + } + + public void InitialSetup() + { + pnlcontrols.BackColor = API.CurrentSkin.titlebarcolour; + wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); + txtaddress.Text = WebLayer.LastUrl; + } + + private void LinkInterceptor(object sender, WebBrowserNavigatingEventArgs e) + { + var url = e.Url.OriginalString; + if (url != "about:blank") + { + var surl = url.Replace("http://", "shiftnet://"); + wbshiftnet.DocumentText = WebLayer.VisitSite(surl); + txtaddress.Text = WebLayer.LastUrl; + } + } + + private void btngo_Click(object sender, EventArgs e) + { + if (txtaddress.Text.ToLower().StartsWith("shiftnet://")) + { + wbshiftnet.DocumentText = WebLayer.VisitSite(txtaddress.Text); + txtaddress.Text = WebLayer.LastUrl; + } + else + { + wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://not_found"); + txtaddress.Text = WebLayer.LastUrl; + } + } + + private void btnhome_Click(object sender, EventArgs e) + { + wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); + txtaddress.Text = WebLayer.LastUrl; + } + } + + public class WebLayer + { + private static string HtmlTemplate = "Shiftnet Page#BODY#"; + public static string LastUrl = null; + + public static string VisitSite(string url) + { + var wc = new WebClient(); + if (url.ToLower().EndsWith(".stml") || url.ToLower().EndsWith(".rnp")) + { + try + { + string content = wc.DownloadString(url.Replace("shiftnet://", "http://www.playshiftos.ml/shiftnet/www/")); + if (content.StartsWith("")) + { + LastUrl = url; + return HtmlTemplate.Replace("#BODY#", content.Replace("", "")); + } + else + { + LastUrl = "shiftnet:not_found"; + + return HtmlTemplate.Replace("#BODY#", "That page was not found."); + } + } + catch + { + LastUrl = "shiftnet://not_found"; + return HtmlTemplate.Replace("#BODY#", "That page was not found."); + } + } + else + { + if (url.EndsWith("/")) + { + return VisitSite(url + "home.rnp"); + } + else + { + return VisitSite(url + "/home.rnp"); + } + + } + } + } + +} diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.resx b/source/WindowsFormsApplication1/Apps/Shiftnet.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftnet.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.Designer.cs b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.Designer.cs new file mode 100644 index 0000000..3f7d4a7 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.Designer.cs @@ -0,0 +1,170 @@ +namespace ShiftOS +{ + partial class ShiftnetDecryptor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.label1 = new System.Windows.Forms.Label(); + this.txtstatus = new System.Windows.Forms.RichTextBox(); + this.txtaddress = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnstart = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.tmrdecrypt = new System.Windows.Forms.Timer(this.components); + this.pgstatus = new ShiftOS.ProgressBarEX(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(744, 43); + this.label1.TabIndex = 1; + this.label1.Text = " == Decryption Status =="; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtstatus + // + this.txtstatus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtstatus.BackColor = System.Drawing.Color.Black; + this.txtstatus.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtstatus.ForeColor = System.Drawing.Color.White; + this.txtstatus.Location = new System.Drawing.Point(17, 151); + this.txtstatus.Name = "txtstatus"; + this.txtstatus.ReadOnly = true; + this.txtstatus.Size = new System.Drawing.Size(740, 280); + this.txtstatus.TabIndex = 2; + this.txtstatus.Text = ""; + // + // txtaddress + // + this.txtaddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtaddress.BackColor = System.Drawing.Color.Gray; + this.txtaddress.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtaddress.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtaddress.Location = new System.Drawing.Point(100, 121); + this.txtaddress.Name = "txtaddress"; + this.txtaddress.Size = new System.Drawing.Size(590, 16); + this.txtaddress.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(18, 124); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(48, 13); + this.label2.TabIndex = 4; + this.label2.Text = "Address:"; + // + // btnstart + // + this.btnstart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstart.Location = new System.Drawing.Point(697, 119); + this.btnstart.Name = "btnstart"; + this.btnstart.Size = new System.Drawing.Size(60, 23); + this.btnstart.TabIndex = 5; + this.btnstart.Text = "Start"; + this.btnstart.UseVisualStyleBackColor = true; + this.btnstart.Click += new System.EventHandler(this.btnstart_Click); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.btnstart); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.txtaddress); + this.panel1.Controls.Add(this.txtstatus); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.pgstatus); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(769, 443); + this.panel1.TabIndex = 6; + // + // tmrdecrypt + // + this.tmrdecrypt.Tick += new System.EventHandler(this.tmrdecrypt_Tick); + // + // pgstatus + // + this.pgstatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pgstatus.BackColor = System.Drawing.Color.Black; + this.pgstatus.BlockSeparation = 3; + this.pgstatus.BlockWidth = 5; + this.pgstatus.Color = System.Drawing.Color.Gray; + this.pgstatus.ForeColor = System.Drawing.Color.White; + this.pgstatus.Location = new System.Drawing.Point(13, 59); + this.pgstatus.MaxValue = 100; + this.pgstatus.MinValue = 0; + this.pgstatus.Name = "pgstatus"; + this.pgstatus.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal; + this.pgstatus.ShowValue = true; + this.pgstatus.Size = new System.Drawing.Size(744, 32); + this.pgstatus.Step = 10; + this.pgstatus.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Blocks; + this.pgstatus.TabIndex = 0; + this.pgstatus.Value = 0; + // + // ShiftnetDecryptor + // + this.AcceptButton = this.btnstart; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(769, 443); + this.Controls.Add(this.panel1); + this.Name = "ShiftnetDecryptor"; + this.Text = "ShiftnetDecryptor"; + this.Load += new System.EventHandler(this.ShiftnetDecryptor_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private ProgressBarEX pgstatus; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.RichTextBox txtstatus; + private System.Windows.Forms.TextBox txtaddress; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btnstart; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Timer tmrdecrypt; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.cs b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.cs new file mode 100644 index 0000000..dbf086e --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class ShiftnetDecryptor : Form + { + public ShiftnetDecryptor() + { + InitializeComponent(); + } + + int i = 0; + string currentaddress = null; + string encrypted_contents = null; + + public void WriteLine(string line) + { + if(txtstatus.Text == "") + { + txtstatus.Text = line; + } + else + { + txtstatus.Text += Environment.NewLine + line; + } + } + + private void RecursiveControlSetup(Control ctrl) + { + ctrl.Font = new Font(OSInfo.GetMonospaceFont(), ctrl.Font.Size); + try + { + var pnl = (Panel)ctrl; + foreach (Control c in pnl.Controls) + { + RecursiveControlSetup(c); + } + } + catch + { + + } + } + + private void tmrdecrypt_Tick(object sender, EventArgs e) + { + switch (i) + { + case 0: + currentaddress = txtaddress.Text; + WriteLine("Checking URL..."); + if(!currentaddress.StartsWith("shiftnet://")) + { + WriteLine(" *** ERROR: Invalid URL."); + tmrdecrypt.Stop(); + btnstart.Enabled = true; + txtaddress.Enabled = true; + } + break; + case 5: + WriteLine("Making connection to Shiftnet..."); + currentaddress = currentaddress.Replace("shiftnet://", "http://playshiftos.ml/shiftnet/www/"); + break; + case 25: + WriteLine("Checking file..."); + if(!currentaddress.EndsWith(".enc")) + { + WriteLine(" *** ERROR: File not valid, must be of type .enc (encrypted file)"); + tmrdecrypt.Stop(); + btnstart.Enabled = true; + txtaddress.Enabled = true; + } + break; + case 27: + WriteLine("Downloading file contents..."); + try + { + encrypted_contents = new WebClient().DownloadString(currentaddress); + } + catch + { + WriteLine(" *** ERROR: Remote file could not be accessed."); + tmrdecrypt.Stop(); + btnstart.Enabled = true; + txtaddress.Enabled = true; + } + break; + case 30: + WriteLine("Download successful. Determining encryption algorithm. This may take a bit..."); + break; + case 75: + int r = new Random().Next(0, 100); + if(r >= 25 && r <= 75) + { + WriteLine("Encryption algorithm determined, beginning decryption."); + } + else + { + WriteLine("Decryption failed."); + tmrdecrypt.Stop(); + btnstart.Enabled = true; + txtaddress.Enabled = true; + } + break; + case 95: + string decrypted = API.Encryption.Decrypt(encrypted_contents); + int lastslash = currentaddress.LastIndexOf("/"); + int len = currentaddress.Length - lastslash; + string fname = currentaddress.Substring(lastslash, len).Replace(".enc", ".lua"); + WriteLine("Decryption successful. Saving to /Home/Decryptions/" + fname + "..."); + if(!Directory.Exists(Paths.Home + "Decryptions")) + { + Directory.CreateDirectory(Paths.Home + "Decryptions"); + } + File.WriteAllText(Paths.Home + $"Decryptions{OSInfo.DirectorySeparator}{fname}", decrypted); + break; + case 100: + WriteLine("Decryption successful."); + tmrdecrypt.Stop(); + currentaddress = null; + i = 0; + encrypted_contents = null; + btnstart.Enabled = true; + txtaddress.Enabled = true; + + break; + } + + i += 1; + pgstatus.Value = i; + } + + private void btnstart_Click(object sender, EventArgs e) + { + i = 0; + tmrdecrypt.Start(); + btnstart.Enabled = false; + txtaddress.Enabled = false; + } + + private void ShiftnetDecryptor_Load(object sender, EventArgs e) + { + RecursiveControlSetup(panel1); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.resx b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.resx new file mode 100644 index 0000000..34bb249 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shiftorium.Designer.cs b/source/WindowsFormsApplication1/Apps/Shiftorium.Designer.cs new file mode 100644 index 0000000..e5b4498 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftorium.Designer.cs @@ -0,0 +1,322 @@ +using System; + +namespace Shiftorium +{ + partial class Frontend + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Frontend)); + this.pgcontents = new System.Windows.Forms.Panel(); + this.lbcodepoints = new System.Windows.Forms.Label(); + this.lbupgrades = new System.Windows.Forms.ListView(); + this.Label1 = new System.Windows.Forms.Label(); + this.pnlinfo = new System.Windows.Forms.Panel(); + this.pnlintro = new System.Windows.Forms.Panel(); + this.Label4 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.btnbuy = new System.Windows.Forms.Button(); + this.lbprice = new System.Windows.Forms.Label(); + this.picpreview = new System.Windows.Forms.PictureBox(); + this.lbudescription = new System.Windows.Forms.Label(); + this.lbupgradename = new System.Windows.Forms.Label(); + this.tmrcodepointsupdate = new System.Windows.Forms.Timer(this.components); + this.btnback = new System.Windows.Forms.Button(); + this.btnforward = new System.Windows.Forms.Button(); + this.lbcategory = new System.Windows.Forms.Label(); + this.btnhack = new System.Windows.Forms.Button(); + this.pgcontents.SuspendLayout(); + this.pnlinfo.SuspendLayout(); + this.pnlintro.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picpreview)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.btnhack); + this.pgcontents.Controls.Add(this.lbcategory); + this.pgcontents.Controls.Add(this.btnforward); + this.pgcontents.Controls.Add(this.btnback); + this.pgcontents.Controls.Add(this.lbcodepoints); + this.pgcontents.Controls.Add(this.lbupgrades); + this.pgcontents.Controls.Add(this.Label1); + this.pgcontents.Controls.Add(this.pnlinfo); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(701, 462); + this.pgcontents.TabIndex = 0; + this.pgcontents.TabStop = true; + // + // lbcodepoints + // + this.lbcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcodepoints.ForeColor = System.Drawing.Color.Black; + this.lbcodepoints.Location = new System.Drawing.Point(16, 372); + this.lbcodepoints.Name = "lbcodepoints"; + this.lbcodepoints.Size = new System.Drawing.Size(309, 43); + this.lbcodepoints.TabIndex = 8; + this.lbcodepoints.Text = "Codepoints: 25"; + this.lbcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbupgrades + // + this.lbupgrades.BackColor = System.Drawing.Color.White; + this.lbupgrades.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.lbupgrades.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbupgrades.ForeColor = System.Drawing.Color.Black; + this.lbupgrades.Location = new System.Drawing.Point(21, 101); + this.lbupgrades.MultiSelect = false; + this.lbupgrades.Name = "lbupgrades"; + this.lbupgrades.Size = new System.Drawing.Size(304, 254); + this.lbupgrades.TabIndex = 0; + this.lbupgrades.UseCompatibleStateImageBehavior = false; + this.lbupgrades.View = System.Windows.Forms.View.Details; + this.lbupgrades.SelectedIndexChanged += new System.EventHandler(this.lbupgrades_SelectedIndexChanged); + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.ForeColor = System.Drawing.Color.Black; + this.Label1.Location = new System.Drawing.Point(85, 17); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(175, 39); + this.Label1.TabIndex = 1; + this.Label1.Text = "Upgrades"; + // + // pnlinfo + // + this.pnlinfo.Controls.Add(this.pnlintro); + this.pnlinfo.Controls.Add(this.btnbuy); + this.pnlinfo.Controls.Add(this.lbprice); + this.pnlinfo.Controls.Add(this.picpreview); + this.pnlinfo.Controls.Add(this.lbudescription); + this.pnlinfo.Controls.Add(this.lbupgradename); + this.pnlinfo.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlinfo.Location = new System.Drawing.Point(332, 0); + this.pnlinfo.Name = "pnlinfo"; + this.pnlinfo.Size = new System.Drawing.Size(369, 462); + this.pnlinfo.TabIndex = 0; + // + // pnlintro + // + this.pnlintro.Controls.Add(this.Label4); + this.pnlintro.Controls.Add(this.Label2); + this.pnlintro.Controls.Add(this.Label5); + this.pnlintro.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlintro.Location = new System.Drawing.Point(0, 0); + this.pnlintro.Name = "pnlintro"; + this.pnlintro.Size = new System.Drawing.Size(369, 462); + this.pnlintro.TabIndex = 8; + this.pnlintro.TabStop = true; + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(-3, 397); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(358, 18); + this.Label4.TabIndex = 7; + this.Label4.Text = "Select an upgrade on the left to view its details"; + // + // Label2 + // + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(3, 53); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(340, 341); + this.Label2.TabIndex = 5; + this.Label2.Text = resources.GetString("Label2.Text"); + this.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.ForeColor = System.Drawing.Color.Black; + this.Label5.Location = new System.Drawing.Point(-4, 14); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(355, 31); + this.Label5.TabIndex = 4; + this.Label5.Text = "Welcome to the Shiftorium"; + // + // btnbuy + // + this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnbuy.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbuy.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnbuy.ForeColor = System.Drawing.Color.Black; + this.btnbuy.Location = new System.Drawing.Point(160, 362); + this.btnbuy.Name = "btnbuy"; + this.btnbuy.Size = new System.Drawing.Size(185, 56); + this.btnbuy.TabIndex = 7; + this.btnbuy.Text = "Buy"; + this.btnbuy.UseVisualStyleBackColor = true; + this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click); + // + // lbprice + // + this.lbprice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lbprice.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold); + this.lbprice.ForeColor = System.Drawing.Color.Black; + this.lbprice.Location = new System.Drawing.Point(15, 362); + this.lbprice.Name = "lbprice"; + this.lbprice.Size = new System.Drawing.Size(127, 59); + this.lbprice.TabIndex = 6; + this.lbprice.Text = "50 CP"; + this.lbprice.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // picpreview + // + this.picpreview.Image = global::ShiftOS.Properties.Resources.upgradegray; + this.picpreview.Location = new System.Drawing.Point(25, 218); + this.picpreview.Name = "picpreview"; + this.picpreview.Size = new System.Drawing.Size(320, 130); + this.picpreview.TabIndex = 5; + this.picpreview.TabStop = false; + // + // lbudescription + // + this.lbudescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbudescription.ForeColor = System.Drawing.Color.Black; + this.lbudescription.Location = new System.Drawing.Point(24, 63); + this.lbudescription.Name = "lbudescription"; + this.lbudescription.Size = new System.Drawing.Size(321, 144); + this.lbudescription.TabIndex = 4; + this.lbudescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbupgradename + // + this.lbupgradename.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbupgradename.ForeColor = System.Drawing.Color.Black; + this.lbupgradename.Location = new System.Drawing.Point(5, 17); + this.lbupgradename.Name = "lbupgradename"; + this.lbupgradename.Size = new System.Drawing.Size(361, 43); + this.lbupgradename.TabIndex = 3; + this.lbupgradename.Text = "Upgradename"; + this.lbupgradename.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tmrcodepointsupdate + // + this.tmrcodepointsupdate.Enabled = true; + this.tmrcodepointsupdate.Interval = 1000; + this.tmrcodepointsupdate.Tick += new System.EventHandler(this.tmrcodepointsupdate_Tick); + // + // btnback + // + this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnback.Location = new System.Drawing.Point(22, 72); + this.btnback.Name = "btnback"; + this.btnback.Size = new System.Drawing.Size(36, 23); + this.btnback.TabIndex = 9; + this.btnback.Text = "<<"; + this.btnback.UseVisualStyleBackColor = true; + this.btnback.Click += new System.EventHandler(this.btnback_Click); + // + // btnforward + // + this.btnforward.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnforward.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnforward.Location = new System.Drawing.Point(289, 72); + this.btnforward.Name = "btnforward"; + this.btnforward.Size = new System.Drawing.Size(36, 23); + this.btnforward.TabIndex = 10; + this.btnforward.Text = ">>"; + this.btnforward.UseVisualStyleBackColor = true; + this.btnforward.Click += new System.EventHandler(this.btnforward_Click); + // + // lbcategory + // + this.lbcategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbcategory.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.lbcategory.ForeColor = System.Drawing.Color.Black; + this.lbcategory.Location = new System.Drawing.Point(64, 72); + this.lbcategory.Name = "lbcategory"; + this.lbcategory.Size = new System.Drawing.Size(219, 26); + this.lbcategory.TabIndex = 11; + this.lbcategory.Text = "Upgrades"; + this.lbcategory.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // btnhack + // + this.btnhack.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnhack.AutoSize = true; + this.btnhack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnhack.Location = new System.Drawing.Point(143, 218); + this.btnhack.Name = "btnhack"; + this.btnhack.Size = new System.Drawing.Size(68, 25); + this.btnhack.TabIndex = 12; + this.btnhack.Text = "Hack it."; + this.btnhack.UseVisualStyleBackColor = true; + this.btnhack.Visible = false; + this.btnhack.Click += new System.EventHandler(this.btnhack_Click); + // + // Frontend + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(701, 462); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.Name = "Frontend"; + this.Text = "Shiftorium"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Frontend_Load); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.pnlinfo.ResumeLayout(false); + this.pnlintro.ResumeLayout(false); + this.pnlintro.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picpreview)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.ListView lbupgrades; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Panel pnlinfo; + internal System.Windows.Forms.Label lbcodepoints; + internal System.Windows.Forms.Button btnbuy; + internal System.Windows.Forms.Label lbprice; + internal System.Windows.Forms.PictureBox picpreview; + internal System.Windows.Forms.Label lbudescription; + internal System.Windows.Forms.Label lbupgradename; + internal System.Windows.Forms.Panel pnlintro; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Timer tmrcodepointsupdate; + internal System.Windows.Forms.Label lbcategory; + private System.Windows.Forms.Button btnforward; + private System.Windows.Forms.Button btnback; + private System.Windows.Forms.Button btnhack; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shiftorium.cs b/source/WindowsFormsApplication1/Apps/Shiftorium.cs new file mode 100644 index 0000000..ce9dbfc --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftorium.cs @@ -0,0 +1,215 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS; +using SaveSystem; + +namespace Shiftorium +{ + public partial class Frontend : Form + { + public Frontend() + { + InitializeComponent(); + } + + List AvailableUpgrades = new List(); + Upgrade selectedUpgrade = null; + + private void tmrcodepointsupdate_Tick(object sender, EventArgs e) + { + lbcodepoints.Text = "Codepoints: " + API.Codepoints.ToString(); + } + + private void Frontend_Load(object sender, EventArgs e) + { + ColumnHeader name = new ColumnHeader(); + name.Text = "Upgrade Name"; + name.Width = lbupgrades.Width; + + lbupgrades.Columns.Add(name); + GetUpgrades(); + } + + public void GetUpgrades() + { + bool ShowUpgrades = true; + lbupgrades.Items.Clear(); + AvailableUpgrades.Clear(); + Categories.Clear(); + foreach (Upgrade upgrade in Utilities.GetAvailable()) + { + AvailableUpgrades.Add(upgrade); + } + GetCategories(); + try { + lbcategory.Text = Categories[SelectedCategory].ToUpper(); + if(lbcategory.Text != "FUNDAMENTAL") { + if(API.Upgrades["hacking"] == false) + { + Hacking.StartTutorial(); + PreviousCategory(); + } + else + { + if(API.Upgrades.ContainsKey(lbcategory.Text.ToLower())) + { + if(API.Upgrades[lbcategory.Text.ToLower()] == false) + { + btnhack.Show(); + ShowUpgrades = false; + } + else + { + btnhack.Hide(); + } + } + } + } + else + { + btnhack.Hide(); + } + } + catch + { + lbcategory.Text = "No upgrades!"; + } + foreach(Upgrade upg in AvailableUpgrades) + { + if (ShowUpgrades == true) + { + AddItem(upg); + } + } + } + + public void AddItem(Upgrade upgrade) + { + ListViewItem lv = new ListViewItem(); + var c = upgrade.Cost / API.CurrentSave.PriceDivider; + lv.Text = upgrade.Name.Replace(upgrade.Cost.ToString(), c.ToString()); + lv.Tag = upgrade.id; + if (upgrade.Category.ToUpper() == lbcategory.Text.ToUpper()) + { + if (!upgrade.id.Contains("dummy")) + { + lbupgrades.Items.Add(lv); + } + } + } + + public void GetCategories() + { + foreach(var upg in AvailableUpgrades) + { + if(Categories.Contains(upg.Category)) + { + } + else + { + Categories.Add(upg.Category); + } + } + } + + private void lbupgrades_SelectedIndexChanged(object sender, EventArgs e) + { + try { + ListViewItem item = lbupgrades.SelectedItems[0]; + string upg = (string)item.Tag; + foreach (Upgrade upgrade in AvailableUpgrades) + { + if (upgrade.id == upg) + { + pnlintro.Hide(); + lbupgradename.Text = upgrade.Name.Replace($" - {upgrade.Cost} CP", ""); + lbudescription.Text = upgrade.Description; + btnbuy.Show(); + lbprice.Text = (upgrade.Cost / API.CurrentSave.PriceDivider).ToString() + " CP"; + picpreview.Image = upgrade.Preview; + selectedUpgrade = upgrade; + } + } + } catch + { + //do nothing. + } + + } + + private void btnbuy_Click(object sender, EventArgs e) + { + if(Utilities.Buy(selectedUpgrade) == true) + { + btnbuy.Hide(); + lbprice.Text = "Upgrade installed."; + } + else + { + lbprice.Text = "Can't afford!"; + } + GetUpgrades(); + lbupgrades.Focus(); + } + + public List Categories = new List(); + public int SelectedCategory = 0; + + public void PreviousCategory() + { + if(SelectedCategory > 0) + { + SelectedCategory -= 1; + GetUpgrades(); + } + else + { + API.PlaySound(ShiftOS.Properties.Resources._3beepvirus); + } + } + + public void NextCategory() + { + if (SelectedCategory < Categories.Count - 1) + { + SelectedCategory += 1; + GetUpgrades(); + } + else + { + API.PlaySound(ShiftOS.Properties.Resources._3beepvirus); + } + } + + private void btnback_Click(object sender, EventArgs e) + { + PreviousCategory(); + } + + private void btnforward_Click(object sender, EventArgs e) + { + NextCategory(); + } + + private void btnhack_Click(object sender, EventArgs e) + { + if(API.Upgrades["multitasking"] == true) + { + var t = new Terminal(); + API.CreateForm(t, API.LoadedNames.TerminalName, ShiftOS.Properties.Resources.iconTerminal); + t.StartHackingSession(lbcategory.Text.ToLower()); + } + else + { + API.CreateInfoboxSession("Dependencies not met.", "You need the following upgrades: Multitasking to embark on this activity.", infobox.InfoboxMode.Info); + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Shiftorium.resx b/source/WindowsFormsApplication1/Apps/Shiftorium.resx new file mode 100644 index 0000000..c732bd4 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftorium.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Welcome to the Shiftorium. The Shiftorium is a place where you can spend Codepoints to upgrade the operating system and buy new applications. + +Codepoints can be earned by performing various tasks and using apps in ShiftOS, like playing Knowledge Input. + +It is generally recommended to invest in new applications instead of GUI upgrades, because more apps equal more ways to earn Codepoints. Investing in GUI upgrades first may make the OS more user-friendly, but it may become harder to get Codepoints. + +Some GUI upgrades may require you to close applications to take effect. Just close and re-open applications and the upgrades will be applied. + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/SkinLoader.Designer.cs b/source/WindowsFormsApplication1/Apps/SkinLoader.Designer.cs new file mode 100644 index 0000000..72561f6 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/SkinLoader.Designer.cs @@ -0,0 +1,739 @@ +using System; + +namespace ShiftOS +{ + partial class SkinLoader + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SkinLoader)); + this.pgcontents = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); + this.btnapplyskin = new System.Windows.Forms.Button(); + this.btnsaveskin = new System.Windows.Forms.Button(); + this.btnloadskin = new System.Windows.Forms.Button(); + this.Label2 = new System.Windows.Forms.Label(); + this.btnclose = new System.Windows.Forms.Button(); + this.pnldesktoppreview = new System.Windows.Forms.Panel(); + this.predesktoppanel = new System.Windows.Forms.Panel(); + this.prepnlpanelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); + this.prepnlpanelbutton = new System.Windows.Forms.Panel(); + this.pretbicon = new System.Windows.Forms.PictureBox(); + this.pretbctext = new System.Windows.Forms.Label(); + this.pretimepanel = new System.Windows.Forms.Panel(); + this.prepaneltimetext = new System.Windows.Forms.Label(); + this.preapplaunchermenuholder = new System.Windows.Forms.Panel(); + this.predesktopappmenu = new System.Windows.Forms.MenuStrip(); + this.ApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.KnowledgeInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShiftoriumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ClockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.ShutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.Label1 = new System.Windows.Forms.Label(); + this.pnlwindowpreview = new System.Windows.Forms.Panel(); + this.prepgcontent = new System.Windows.Forms.Panel(); + this.prepgbottom = new System.Windows.Forms.Panel(); + this.prepgleft = new System.Windows.Forms.Panel(); + this.prepgbottomlcorner = new System.Windows.Forms.Panel(); + this.prepgright = new System.Windows.Forms.Panel(); + this.prepgbottomrcorner = new System.Windows.Forms.Panel(); + this.pretitlebar = new System.Windows.Forms.Panel(); + this.preminimizebutton = new System.Windows.Forms.Panel(); + this.prepnlicon = new System.Windows.Forms.PictureBox(); + this.prerollupbutton = new System.Windows.Forms.Panel(); + this.preclosebutton = new System.Windows.Forms.Panel(); + this.pretitletext = new System.Windows.Forms.Label(); + this.prepgtoplcorner = new System.Windows.Forms.Panel(); + this.prepgtoprcorner = new System.Windows.Forms.Panel(); + this.pnlskinpacks = new System.Windows.Forms.Panel(); + this.btnapplypackskin = new System.Windows.Forms.Button(); + this.label6 = new System.Windows.Forms.Label(); + this.cbpackfiles = new System.Windows.Forms.ComboBox(); + this.btnbrowse = new System.Windows.Forms.Button(); + this.txtpackpath = new System.Windows.Forms.TextBox(); + this.btnbacktoskinloader = new System.Windows.Forms.Button(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pgcontents.SuspendLayout(); + this.pnldesktoppreview.SuspendLayout(); + this.predesktoppanel.SuspendLayout(); + this.prepnlpanelbuttonholder.SuspendLayout(); + this.prepnlpanelbutton.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).BeginInit(); + this.pretimepanel.SuspendLayout(); + this.preapplaunchermenuholder.SuspendLayout(); + this.predesktopappmenu.SuspendLayout(); + this.pnlwindowpreview.SuspendLayout(); + this.prepgleft.SuspendLayout(); + this.prepgright.SuspendLayout(); + this.pretitlebar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).BeginInit(); + this.pnlskinpacks.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.label3); + this.pgcontents.Controls.Add(this.btnapplyskin); + this.pgcontents.Controls.Add(this.btnsaveskin); + this.pgcontents.Controls.Add(this.btnloadskin); + this.pgcontents.Controls.Add(this.Label2); + this.pgcontents.Controls.Add(this.btnclose); + this.pgcontents.Controls.Add(this.pnldesktoppreview); + this.pgcontents.Controls.Add(this.Label1); + this.pgcontents.Controls.Add(this.pnlwindowpreview); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(476, 462); + this.pgcontents.TabIndex = 20; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label3.Location = new System.Drawing.Point(10, 384); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(454, 31); + this.label3.TabIndex = 10; + this.label3.Text = "The preview is based on the currently loaded skin, not the one selected by the \"L" + + "oad Skin\" button."; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnapplyskin + // + this.btnapplyskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnapplyskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapplyskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnapplyskin.Location = new System.Drawing.Point(352, 418); + this.btnapplyskin.Name = "btnapplyskin"; + this.btnapplyskin.Size = new System.Drawing.Size(107, 32); + this.btnapplyskin.TabIndex = 9; + this.btnapplyskin.Text = "Apply Skin"; + this.btnapplyskin.UseVisualStyleBackColor = true; + this.btnapplyskin.Click += new System.EventHandler(this.btnapplyskin_Click); + // + // btnsaveskin + // + this.btnsaveskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnsaveskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsaveskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsaveskin.Location = new System.Drawing.Point(239, 418); + this.btnsaveskin.Name = "btnsaveskin"; + this.btnsaveskin.Size = new System.Drawing.Size(107, 32); + this.btnsaveskin.TabIndex = 8; + this.btnsaveskin.Text = "Save Skin"; + this.btnsaveskin.UseVisualStyleBackColor = true; + this.btnsaveskin.Click += new System.EventHandler(this.btnsaveskin_Click); + // + // btnloadskin + // + this.btnloadskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnloadskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnloadskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnloadskin.Location = new System.Drawing.Point(126, 418); + this.btnloadskin.Name = "btnloadskin"; + this.btnloadskin.Size = new System.Drawing.Size(107, 32); + this.btnloadskin.TabIndex = 7; + this.btnloadskin.Text = "Load Skin"; + this.btnloadskin.UseVisualStyleBackColor = true; + this.btnloadskin.Click += new System.EventHandler(this.btnloadskin_Click); + // + // Label2 + // + this.Label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(4, 200); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(464, 30); + this.Label2.TabIndex = 6; + this.Label2.Text = "Desktop Preview"; + this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnclose + // + this.btnclose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnclose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnclose.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnclose.Location = new System.Drawing.Point(13, 418); + this.btnclose.Name = "btnclose"; + this.btnclose.Size = new System.Drawing.Size(107, 32); + this.btnclose.TabIndex = 5; + this.btnclose.Text = "Close"; + this.btnclose.UseVisualStyleBackColor = true; + this.btnclose.Click += new System.EventHandler(this.btnclose_Click); + // + // pnldesktoppreview + // + this.pnldesktoppreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktoppreview.Controls.Add(this.predesktoppanel); + this.pnldesktoppreview.Location = new System.Drawing.Point(13, 233); + this.pnldesktoppreview.Name = "pnldesktoppreview"; + this.pnldesktoppreview.Size = new System.Drawing.Size(448, 148); + this.pnldesktoppreview.TabIndex = 4; + // + // predesktoppanel + // + this.predesktoppanel.BackColor = System.Drawing.Color.Gray; + this.predesktoppanel.Controls.Add(this.prepnlpanelbuttonholder); + this.predesktoppanel.Controls.Add(this.pretimepanel); + this.predesktoppanel.Controls.Add(this.preapplaunchermenuholder); + this.predesktoppanel.Dock = System.Windows.Forms.DockStyle.Top; + this.predesktoppanel.Location = new System.Drawing.Point(0, 0); + this.predesktoppanel.Name = "predesktoppanel"; + this.predesktoppanel.Size = new System.Drawing.Size(448, 25); + this.predesktoppanel.TabIndex = 1; + // + // prepnlpanelbuttonholder + // + this.prepnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; + this.prepnlpanelbuttonholder.Controls.Add(this.prepnlpanelbutton); + this.prepnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Fill; + this.prepnlpanelbuttonholder.Location = new System.Drawing.Point(116, 0); + this.prepnlpanelbuttonholder.Name = "prepnlpanelbuttonholder"; + this.prepnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); + this.prepnlpanelbuttonholder.Size = new System.Drawing.Size(235, 25); + this.prepnlpanelbuttonholder.TabIndex = 7; + // + // prepnlpanelbutton + // + this.prepnlpanelbutton.BackColor = System.Drawing.Color.Black; + this.prepnlpanelbutton.Controls.Add(this.pretbicon); + this.prepnlpanelbutton.Controls.Add(this.pretbctext); + this.prepnlpanelbutton.Location = new System.Drawing.Point(5, 3); + this.prepnlpanelbutton.Name = "prepnlpanelbutton"; + this.prepnlpanelbutton.Size = new System.Drawing.Size(126, 20); + this.prepnlpanelbutton.TabIndex = 18; + this.prepnlpanelbutton.Visible = false; + // + // pretbicon + // + this.pretbicon.BackColor = System.Drawing.Color.Transparent; + this.pretbicon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pretbicon.Image = global::ShiftOS.Properties.Resources.iconShifter; + this.pretbicon.Location = new System.Drawing.Point(4, 2); + this.pretbicon.Name = "pretbicon"; + this.pretbicon.Size = new System.Drawing.Size(16, 16); + this.pretbicon.TabIndex = 1; + this.pretbicon.TabStop = false; + // + // pretbctext + // + this.pretbctext.AutoSize = true; + this.pretbctext.BackColor = System.Drawing.Color.Transparent; + this.pretbctext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pretbctext.ForeColor = System.Drawing.Color.White; + this.pretbctext.Location = new System.Drawing.Point(24, 2); + this.pretbctext.Name = "pretbctext"; + this.pretbctext.Size = new System.Drawing.Size(45, 16); + this.pretbctext.TabIndex = 0; + this.pretbctext.Text = "Shifter"; + // + // pretimepanel + // + this.pretimepanel.Controls.Add(this.prepaneltimetext); + this.pretimepanel.Dock = System.Windows.Forms.DockStyle.Right; + this.pretimepanel.Location = new System.Drawing.Point(351, 0); + this.pretimepanel.Name = "pretimepanel"; + this.pretimepanel.Size = new System.Drawing.Size(97, 25); + this.pretimepanel.TabIndex = 5; + // + // prepaneltimetext + // + this.prepaneltimetext.AutoSize = true; + this.prepaneltimetext.BackColor = System.Drawing.Color.Transparent; + this.prepaneltimetext.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.prepaneltimetext.Location = new System.Drawing.Point(5, 0); + this.prepaneltimetext.Name = "prepaneltimetext"; + this.prepaneltimetext.Size = new System.Drawing.Size(80, 24); + this.prepaneltimetext.TabIndex = 1; + this.prepaneltimetext.Text = "5000023"; + this.prepaneltimetext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // preapplaunchermenuholder + // + this.preapplaunchermenuholder.Controls.Add(this.predesktopappmenu); + this.preapplaunchermenuholder.Dock = System.Windows.Forms.DockStyle.Left; + this.preapplaunchermenuholder.Location = new System.Drawing.Point(0, 0); + this.preapplaunchermenuholder.Name = "preapplaunchermenuholder"; + this.preapplaunchermenuholder.Size = new System.Drawing.Size(116, 25); + this.preapplaunchermenuholder.TabIndex = 4; + // + // predesktopappmenu + // + this.predesktopappmenu.AutoSize = false; + this.predesktopappmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ApplicationsToolStripMenuItem}); + this.predesktopappmenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; + this.predesktopappmenu.Location = new System.Drawing.Point(0, 0); + this.predesktopappmenu.Name = "predesktopappmenu"; + this.predesktopappmenu.Padding = new System.Windows.Forms.Padding(0); + this.predesktopappmenu.Size = new System.Drawing.Size(116, 24); + this.predesktopappmenu.TabIndex = 0; + this.predesktopappmenu.Text = "MenuStrip1"; + // + // ApplicationsToolStripMenuItem + // + this.ApplicationsToolStripMenuItem.AutoSize = false; + this.ApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.KnowledgeInputToolStripMenuItem, + this.ShiftoriumToolStripMenuItem, + this.ClockToolStripMenuItem, + this.TerminalToolStripMenuItem, + this.ShifterToolStripMenuItem, + this.ToolStripSeparator1, + this.ShutdownToolStripMenuItem}); + this.ApplicationsToolStripMenuItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"; + this.ApplicationsToolStripMenuItem.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ApplicationsToolStripMenuItem.ShowShortcutKeys = false; + this.ApplicationsToolStripMenuItem.Size = new System.Drawing.Size(102, 24); + this.ApplicationsToolStripMenuItem.Text = "Applications"; + this.ApplicationsToolStripMenuItem.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; + this.ApplicationsToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // KnowledgeInputToolStripMenuItem + // + this.KnowledgeInputToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.KnowledgeInputToolStripMenuItem.Name = "KnowledgeInputToolStripMenuItem"; + this.KnowledgeInputToolStripMenuItem.ShowShortcutKeys = false; + this.KnowledgeInputToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.KnowledgeInputToolStripMenuItem.Text = "Knowledge Input"; + // + // ShiftoriumToolStripMenuItem + // + this.ShiftoriumToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShiftoriumToolStripMenuItem.Name = "ShiftoriumToolStripMenuItem"; + this.ShiftoriumToolStripMenuItem.ShowShortcutKeys = false; + this.ShiftoriumToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShiftoriumToolStripMenuItem.Text = "Shiftorium"; + // + // ClockToolStripMenuItem + // + this.ClockToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ClockToolStripMenuItem.Name = "ClockToolStripMenuItem"; + this.ClockToolStripMenuItem.ShowShortcutKeys = false; + this.ClockToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ClockToolStripMenuItem.Text = "Clock"; + // + // TerminalToolStripMenuItem + // + this.TerminalToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.TerminalToolStripMenuItem.Name = "TerminalToolStripMenuItem"; + this.TerminalToolStripMenuItem.ShowShortcutKeys = false; + this.TerminalToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.TerminalToolStripMenuItem.Text = "Terminal"; + // + // ShifterToolStripMenuItem + // + this.ShifterToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShifterToolStripMenuItem.Name = "ShifterToolStripMenuItem"; + this.ShifterToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShifterToolStripMenuItem.Text = "Shifter"; + // + // ToolStripSeparator1 + // + this.ToolStripSeparator1.BackColor = System.Drawing.Color.Transparent; + this.ToolStripSeparator1.ForeColor = System.Drawing.Color.White; + this.ToolStripSeparator1.Name = "ToolStripSeparator1"; + this.ToolStripSeparator1.Size = new System.Drawing.Size(178, 6); + // + // ShutdownToolStripMenuItem + // + this.ShutdownToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"; + this.ShutdownToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShutdownToolStripMenuItem.Text = "Shut Down"; + // + // Label1 + // + this.Label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(4, 6); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(464, 30); + this.Label1.TabIndex = 2; + this.Label1.Text = "Window Preview"; + this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlwindowpreview + // + this.pnlwindowpreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlwindowpreview.Controls.Add(this.prepgcontent); + this.pnlwindowpreview.Controls.Add(this.prepgbottom); + this.pnlwindowpreview.Controls.Add(this.prepgleft); + this.pnlwindowpreview.Controls.Add(this.prepgright); + this.pnlwindowpreview.Controls.Add(this.pretitlebar); + this.pnlwindowpreview.Location = new System.Drawing.Point(13, 39); + this.pnlwindowpreview.Name = "pnlwindowpreview"; + this.pnlwindowpreview.Size = new System.Drawing.Size(448, 148); + this.pnlwindowpreview.TabIndex = 1; + // + // prepgcontent + // + this.prepgcontent.Dock = System.Windows.Forms.DockStyle.Fill; + this.prepgcontent.Location = new System.Drawing.Point(2, 30); + this.prepgcontent.Name = "prepgcontent"; + this.prepgcontent.Size = new System.Drawing.Size(444, 116); + this.prepgcontent.TabIndex = 20; + // + // prepgbottom + // + this.prepgbottom.BackColor = System.Drawing.Color.Gray; + this.prepgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottom.Location = new System.Drawing.Point(2, 146); + this.prepgbottom.Name = "prepgbottom"; + this.prepgbottom.Size = new System.Drawing.Size(444, 2); + this.prepgbottom.TabIndex = 23; + // + // prepgleft + // + this.prepgleft.BackColor = System.Drawing.Color.Gray; + this.prepgleft.Controls.Add(this.prepgbottomlcorner); + this.prepgleft.Dock = System.Windows.Forms.DockStyle.Left; + this.prepgleft.Location = new System.Drawing.Point(0, 30); + this.prepgleft.Name = "prepgleft"; + this.prepgleft.Size = new System.Drawing.Size(2, 118); + this.prepgleft.TabIndex = 21; + // + // prepgbottomlcorner + // + this.prepgbottomlcorner.BackColor = System.Drawing.Color.Red; + this.prepgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottomlcorner.Location = new System.Drawing.Point(0, 116); + this.prepgbottomlcorner.Name = "prepgbottomlcorner"; + this.prepgbottomlcorner.Size = new System.Drawing.Size(2, 2); + this.prepgbottomlcorner.TabIndex = 14; + // + // prepgright + // + this.prepgright.BackColor = System.Drawing.Color.Gray; + this.prepgright.Controls.Add(this.prepgbottomrcorner); + this.prepgright.Dock = System.Windows.Forms.DockStyle.Right; + this.prepgright.Location = new System.Drawing.Point(446, 30); + this.prepgright.Name = "prepgright"; + this.prepgright.Size = new System.Drawing.Size(2, 118); + this.prepgright.TabIndex = 22; + // + // prepgbottomrcorner + // + this.prepgbottomrcorner.BackColor = System.Drawing.Color.Red; + this.prepgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottomrcorner.Location = new System.Drawing.Point(0, 116); + this.prepgbottomrcorner.Name = "prepgbottomrcorner"; + this.prepgbottomrcorner.Size = new System.Drawing.Size(2, 2); + this.prepgbottomrcorner.TabIndex = 15; + // + // pretitlebar + // + this.pretitlebar.BackColor = System.Drawing.Color.Gray; + this.pretitlebar.Controls.Add(this.preminimizebutton); + this.pretitlebar.Controls.Add(this.prepnlicon); + this.pretitlebar.Controls.Add(this.prerollupbutton); + this.pretitlebar.Controls.Add(this.preclosebutton); + this.pretitlebar.Controls.Add(this.pretitletext); + this.pretitlebar.Controls.Add(this.prepgtoplcorner); + this.pretitlebar.Controls.Add(this.prepgtoprcorner); + this.pretitlebar.Dock = System.Windows.Forms.DockStyle.Top; + this.pretitlebar.ForeColor = System.Drawing.Color.White; + this.pretitlebar.Location = new System.Drawing.Point(0, 0); + this.pretitlebar.Name = "pretitlebar"; + this.pretitlebar.Size = new System.Drawing.Size(448, 30); + this.pretitlebar.TabIndex = 19; + // + // preminimizebutton + // + this.preminimizebutton.BackColor = System.Drawing.Color.Black; + this.preminimizebutton.Location = new System.Drawing.Point(362, 5); + this.preminimizebutton.Name = "preminimizebutton"; + this.preminimizebutton.Size = new System.Drawing.Size(22, 22); + this.preminimizebutton.TabIndex = 32; + // + // prepnlicon + // + this.prepnlicon.BackColor = System.Drawing.Color.Transparent; + this.prepnlicon.Image = global::ShiftOS.Properties.Resources.iconSkinLoader; + this.prepnlicon.Location = new System.Drawing.Point(8, 8); + this.prepnlicon.Name = "prepnlicon"; + this.prepnlicon.Size = new System.Drawing.Size(16, 16); + this.prepnlicon.TabIndex = 32; + this.prepnlicon.TabStop = false; + this.prepnlicon.Visible = false; + // + // prerollupbutton + // + this.prerollupbutton.BackColor = System.Drawing.Color.Black; + this.prerollupbutton.Location = new System.Drawing.Point(390, 5); + this.prerollupbutton.Name = "prerollupbutton"; + this.prerollupbutton.Size = new System.Drawing.Size(22, 22); + this.prerollupbutton.TabIndex = 31; + // + // preclosebutton + // + this.preclosebutton.BackColor = System.Drawing.Color.Black; + this.preclosebutton.Location = new System.Drawing.Point(419, 5); + this.preclosebutton.Name = "preclosebutton"; + this.preclosebutton.Size = new System.Drawing.Size(22, 22); + this.preclosebutton.TabIndex = 20; + // + // pretitletext + // + this.pretitletext.AutoSize = true; + this.pretitletext.BackColor = System.Drawing.Color.Transparent; + this.pretitletext.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pretitletext.Location = new System.Drawing.Point(29, 7); + this.pretitletext.Name = "pretitletext"; + this.pretitletext.Size = new System.Drawing.Size(77, 18); + this.pretitletext.TabIndex = 19; + this.pretitletext.Text = "Template"; + // + // prepgtoplcorner + // + this.prepgtoplcorner.BackColor = System.Drawing.Color.Red; + this.prepgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; + this.prepgtoplcorner.Location = new System.Drawing.Point(0, 0); + this.prepgtoplcorner.Name = "prepgtoplcorner"; + this.prepgtoplcorner.Size = new System.Drawing.Size(2, 30); + this.prepgtoplcorner.TabIndex = 17; + // + // prepgtoprcorner + // + this.prepgtoprcorner.BackColor = System.Drawing.Color.Red; + this.prepgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; + this.prepgtoprcorner.Location = new System.Drawing.Point(446, 0); + this.prepgtoprcorner.Name = "prepgtoprcorner"; + this.prepgtoprcorner.Size = new System.Drawing.Size(2, 30); + this.prepgtoprcorner.TabIndex = 16; + // + // pnlskinpacks + // + this.pnlskinpacks.BackColor = System.Drawing.Color.White; + this.pnlskinpacks.Controls.Add(this.btnapplypackskin); + this.pnlskinpacks.Controls.Add(this.label6); + this.pnlskinpacks.Controls.Add(this.cbpackfiles); + this.pnlskinpacks.Controls.Add(this.btnbrowse); + this.pnlskinpacks.Controls.Add(this.txtpackpath); + this.pnlskinpacks.Controls.Add(this.btnbacktoskinloader); + this.pnlskinpacks.Controls.Add(this.label5); + this.pnlskinpacks.Controls.Add(this.label4); + this.pnlskinpacks.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlskinpacks.Location = new System.Drawing.Point(0, 0); + this.pnlskinpacks.Name = "pnlskinpacks"; + this.pnlskinpacks.Size = new System.Drawing.Size(476, 462); + this.pnlskinpacks.TabIndex = 11; + // + // btnapplypackskin + // + this.btnapplypackskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnapplypackskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapplypackskin.Location = new System.Drawing.Point(379, 418); + this.btnapplypackskin.Name = "btnapplypackskin"; + this.btnapplypackskin.Size = new System.Drawing.Size(94, 41); + this.btnapplypackskin.TabIndex = 7; + this.btnapplypackskin.Text = "Apply Skin"; + this.btnapplypackskin.UseVisualStyleBackColor = true; + this.btnapplypackskin.Click += new System.EventHandler(this.btnapplyskin_Click); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(15, 192); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(71, 13); + this.label6.TabIndex = 6; + this.label6.Text = "Select a skin:"; + // + // cbpackfiles + // + this.cbpackfiles.FormattingEnabled = true; + this.cbpackfiles.Location = new System.Drawing.Point(126, 188); + this.cbpackfiles.Name = "cbpackfiles"; + this.cbpackfiles.Size = new System.Drawing.Size(328, 21); + this.cbpackfiles.TabIndex = 5; + this.cbpackfiles.SelectedIndexChanged += new System.EventHandler(this.cbpackfiles_SelectedIndexChanged); + // + // btnbrowse + // + this.btnbrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnbrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbrowse.Location = new System.Drawing.Point(389, 138); + this.btnbrowse.Name = "btnbrowse"; + this.btnbrowse.Size = new System.Drawing.Size(75, 23); + this.btnbrowse.TabIndex = 4; + this.btnbrowse.Text = "Browse..."; + this.btnbrowse.UseVisualStyleBackColor = true; + this.btnbrowse.Click += new System.EventHandler(this.btnbrowse_Click); + // + // txtpackpath + // + this.txtpackpath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtpackpath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpackpath.Location = new System.Drawing.Point(13, 141); + this.txtpackpath.Name = "txtpackpath"; + this.txtpackpath.Size = new System.Drawing.Size(370, 20); + this.txtpackpath.TabIndex = 3; + // + // btnbacktoskinloader + // + this.btnbacktoskinloader.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnbacktoskinloader.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbacktoskinloader.Location = new System.Drawing.Point(3, 418); + this.btnbacktoskinloader.Name = "btnbacktoskinloader"; + this.btnbacktoskinloader.Size = new System.Drawing.Size(94, 41); + this.btnbacktoskinloader.TabIndex = 2; + this.btnbacktoskinloader.Text = "Back to Skin Loader"; + this.btnbacktoskinloader.UseVisualStyleBackColor = true; + this.btnbacktoskinloader.Click += new System.EventHandler(this.btnbacktoskinloader_Click); + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label5.Location = new System.Drawing.Point(5, 28); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(470, 110); + this.label5.TabIndex = 1; + this.label5.Text = resources.GetString("label5.Text"); + this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label4 + // + this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.label4.Location = new System.Drawing.Point(3, 6); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(470, 22); + this.label4.TabIndex = 0; + this.label4.Text = "Skin Packs"; + this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel1 + // + this.panel1.Controls.Add(this.pgcontents); + this.panel1.Controls.Add(this.pnlskinpacks); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(476, 462); + this.panel1.TabIndex = 8; + // + // SkinLoader + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(476, 462); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "SkinLoader"; + this.Text = "Skin_Loader"; + this.TopMost = true; + this.Load += new System.EventHandler(this.SkinLoader_Load); + this.pgcontents.ResumeLayout(false); + this.pnldesktoppreview.ResumeLayout(false); + this.predesktoppanel.ResumeLayout(false); + this.prepnlpanelbuttonholder.ResumeLayout(false); + this.prepnlpanelbutton.ResumeLayout(false); + this.prepnlpanelbutton.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).EndInit(); + this.pretimepanel.ResumeLayout(false); + this.pretimepanel.PerformLayout(); + this.preapplaunchermenuholder.ResumeLayout(false); + this.predesktopappmenu.ResumeLayout(false); + this.predesktopappmenu.PerformLayout(); + this.pnlwindowpreview.ResumeLayout(false); + this.prepgleft.ResumeLayout(false); + this.prepgright.ResumeLayout(false); + this.pretitlebar.ResumeLayout(false); + this.pretitlebar.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).EndInit(); + this.pnlskinpacks.ResumeLayout(false); + this.pnlskinpacks.PerformLayout(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Panel pnlwindowpreview; + internal System.Windows.Forms.Panel prepgcontent; + internal System.Windows.Forms.Panel prepgbottom; + internal System.Windows.Forms.Panel prepgleft; + internal System.Windows.Forms.Panel prepgbottomlcorner; + internal System.Windows.Forms.Panel prepgright; + internal System.Windows.Forms.Panel prepgbottomrcorner; + internal System.Windows.Forms.Panel pretitlebar; + internal System.Windows.Forms.PictureBox prepnlicon; + internal System.Windows.Forms.Panel prerollupbutton; + internal System.Windows.Forms.Panel preclosebutton; + internal System.Windows.Forms.Label pretitletext; + internal System.Windows.Forms.Panel prepgtoplcorner; + internal System.Windows.Forms.Panel prepgtoprcorner; + internal System.Windows.Forms.Button btnapplyskin; + internal System.Windows.Forms.Button btnsaveskin; + internal System.Windows.Forms.Button btnloadskin; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Button btnclose; + internal System.Windows.Forms.Panel pnldesktoppreview; + internal System.Windows.Forms.Panel predesktoppanel; + internal System.Windows.Forms.Panel pretimepanel; + internal System.Windows.Forms.Label prepaneltimetext; + internal System.Windows.Forms.Panel preapplaunchermenuholder; + internal System.Windows.Forms.MenuStrip predesktopappmenu; + internal System.Windows.Forms.ToolStripMenuItem ApplicationsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem KnowledgeInputToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ShiftoriumToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ClockToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem TerminalToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ShifterToolStripMenuItem; + internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator1; + internal System.Windows.Forms.ToolStripMenuItem ShutdownToolStripMenuItem; + internal System.Windows.Forms.Panel preminimizebutton; + internal System.Windows.Forms.FlowLayoutPanel prepnlpanelbuttonholder; + internal System.Windows.Forms.Panel prepnlpanelbutton; + internal System.Windows.Forms.PictureBox pretbicon; + internal System.Windows.Forms.Label pretbctext; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Panel pnlskinpacks; + private System.Windows.Forms.Button btnbacktoskinloader; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button btnbrowse; + private System.Windows.Forms.TextBox txtpackpath; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox cbpackfiles; + private System.Windows.Forms.Button btnapplypackskin; + private System.Windows.Forms.Panel panel1; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/SkinLoader.cs b/source/WindowsFormsApplication1/Apps/SkinLoader.cs new file mode 100644 index 0000000..e6d5328 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/SkinLoader.cs @@ -0,0 +1,652 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class SkinLoader : Form + { + public SkinLoader() + { + InitializeComponent(); + } + + public Skinning.Skin PreviewSkin = null; + public Skinning.Images PreviewImages = null; + + private void btnclose_Click(object sender, EventArgs e) + { + this.Close(); + } + + public string LoadedSkinFile = "fail"; + + public void LoadSkin(string res) + { + LoadedSkinFile = res; + ExtractSkin(res); + SetupDesktop(); + setupborders(); + setuptitlebar(); + setskin(); + } + + private void ExtractSkin(string file) + { + if(Directory.Exists(Paths.ToBeLoaded)) + { + Directory.Delete(Paths.ToBeLoaded, true); + } + API.ExtractFile(file, Paths.ToBeLoaded, false); + PreviewSkin = JsonConvert.DeserializeObject(File.ReadAllText(Paths.ToBeLoaded + "data.json")); + LoadImages(); + } + + private void LoadImages() + { + PreviewImages = new Skinning.Images(); + PreviewImages.applauncherclick = GetImage(PreviewSkin.applauncherclickpath); + PreviewImages.panelbutton = GetImage(PreviewSkin.panelbuttonpath); + PreviewImages.applaunchermouseover = GetImage(PreviewSkin.applaunchermouseoverpath); + PreviewImages.applauncher = GetImage(PreviewSkin.applauncherpath); + PreviewImages.panelclock = GetImage(PreviewSkin.panelclockpath); + PreviewImages.desktopbackground = GetImage(PreviewSkin.desktopbackgroundpath); + PreviewImages.desktoppanel = GetImage(PreviewSkin.desktoppanelpath); + PreviewImages.minbtnhover = GetImage(PreviewSkin.minbtnhoverpath); + PreviewImages.minbtnclick = GetImage(PreviewSkin.minbtnclickpath); + PreviewImages.rightcorner = GetImage(PreviewSkin.rightcornerpath); + PreviewImages.titlebar = GetImage(PreviewSkin.titlebarpath); + PreviewImages.borderright = GetImage(PreviewSkin.borderrightpath); + PreviewImages.borderleft = GetImage(PreviewSkin.borderleftpath); + PreviewImages.borderbottom = GetImage(PreviewSkin.borderbottompath); + PreviewImages.closebtn = GetImage(PreviewSkin.closebtnpath); + PreviewImages.closebtnhover = GetImage(PreviewSkin.closebtnhoverpath); + PreviewImages.closebtnclick = GetImage(PreviewSkin.closebtnclickpath); + PreviewImages.rollbtn = GetImage(PreviewSkin.rollbtnpath); + PreviewImages.rollbtnhover = GetImage(PreviewSkin.rollbtnhoverpath); + PreviewImages.rollbtnclick = GetImage(PreviewSkin.rollbtnclickpath); + PreviewImages.minbtn = GetImage(PreviewSkin.minbtnpath); + PreviewImages.leftcorner = GetImage(PreviewSkin.leftcornerpath); + PreviewImages.bottomleftcorner = GetImage(PreviewSkin.bottomleftcornerpath); + PreviewImages.bottomrightcorner = GetImage(PreviewSkin.bottomrightcornerpath); + } + + private Bitmap GetImage(string fileName) + { + Bitmap ret; + if (File.Exists(Paths.ToBeLoaded + fileName)) + { + using (Image img = Image.FromFile(Paths.ToBeLoaded + fileName)) + { + ret = new Bitmap(img); + } + } + else + { + ret = null; + } + return ret; + } + + private void btnloadskin_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".skn;.spk", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string res = API.GetFSResult(); + if(res != "fail") + { + if(res.EndsWith(".skn")) + { + LoadedSkinFile = res; + ExtractSkin(res); + SetupDesktop(); + setupborders(); + setuptitlebar(); + setskin(); + } + else if(res.EndsWith(".spk")) + { + LoadedPack = res; + SetupPackUI(); + } + } + }; + } + + public string LoadedPack = ""; + + public void SetupPackUI() + { + pgcontents.Hide(); + pnlskinpacks.Show(); + + txtpackpath.Text = LoadedPack; + + if(Directory.Exists(Paths.SkinDir + "_packdata")) + { + Directory.Delete(Paths.SkinDir + "_packdata", true); + } + API.ExtractFile(LoadedPack, Paths.SkinDir + "_packdata", false); + cbpackfiles.Items.Clear(); + foreach (string file in Directory.GetFiles(Paths.SkinDir + "_packdata")) + { + var finf = new FileInfo(file); + cbpackfiles.Items.Add(finf.Name); + + } + } + + private void ScanForSkinFiles(string dir, ref List files) + { + foreach(string file in Directory.GetFiles(dir)) + { + var finf = new FileInfo(file); + if(finf.Extension == ".skn") + { + files.Add(finf.FullName); + } + } + foreach(string dirname in Directory.GetDirectories(dir)) + { + ScanForSkinFiles(dirname, ref files); + } + } + + private void btnapplyskin_Click(object sender, EventArgs e) + { + if(LoadedSkinFile != "fail") + { + try + { + if (Viruses.InfectedWith("skininceptor")) + { + var rnd = new Random(); + switch(rnd.Next(0, 10)) + { + case 1: + case 3: + case 5: + case 7: + case 9: + //Load another random skin. + List skinfiles = new List(); + ScanForSkinFiles(Paths.SaveRoot, ref skinfiles); + string fname = skinfiles[rnd.Next(0, skinfiles.Count - 1)]; + Skinning.Utilities.loadsknfile(fname); + Skinning.Utilities.loadskin(); + API.CurrentSession.SetupDesktop(); + API.UpdateWindows(); + break; + default: + File.Delete(LoadedSkinFile); + //Corrupting binary is fun. + API.CreateInfoboxSession("Skin Loader - Error", "It appears that the provided skin file is either corrupted or not supported by this version of ShiftOS.", infobox.InfoboxMode.Info); + Skinning.Utilities.loadedSkin = new Skinning.Skin(); + Skinning.Utilities.loadedskin_images = new Skinning.Images(); + API.UpdateWindows(); + break; + } + } + else { + Skinning.Utilities.loadsknfile(LoadedSkinFile); + Skinning.Utilities.loadskin(); + API.CurrentSession.SetupDesktop(); + API.UpdateWindows(); + PreviewSkin = API.CurrentSkin; + PreviewImages = API.CurrentSkinImages; + SetupDesktop(); + setupborders(); + setuptitlebar(); + setskin(); + } + } + catch (Exception ex) + { + if (API.DeveloperMode == false) + { + API.CreateInfoboxSession("Skin Loader - Error", "It appears that the provided skin file is either corrupted or not supported by this version of ShiftOS.", infobox.InfoboxMode.Info); + } + else + { + API.CreateInfoboxSession("Skin Loader - Error", ex.Message, infobox.InfoboxMode.Info); + } + } + } + else + { + API.CreateInfoboxSession("Skin Loader - Error", "You have not selected a skin file to load! Try pressing \"Load Skin\" and selecting a .skn file.", infobox.InfoboxMode.Info); + } + } + + private void SkinLoader_Load(object sender, EventArgs e) + { + + PreviewSkin = API.CurrentSkin; + PreviewImages = API.CurrentSkinImages; + LoadPreview(); + pnlskinpacks.Hide(); + pgcontents.Show(); + } + + private void LoadPreview() + { + SetupDesktop(); + setupborders(); + setuptitlebar(); + setskin(); + + } + + #region Preview Skinning + + public void SetupDesktop() + { + + if (API.Upgrades["desktoppanel"] == true) + { + if (PreviewImages.desktoppanel == null) + { + predesktoppanel.BackColor = PreviewSkin.desktoppanelcolour; + predesktoppanel.BackgroundImage = null; + } + else { + predesktoppanel.BackgroundImage = PreviewImages.desktoppanel; + predesktoppanel.BackgroundImageLayout = (ImageLayout)PreviewSkin.desktoppanellayout; + predesktoppanel.BackColor = Color.Transparent; + } + + predesktoppanel.Size = new Size(predesktoppanel.Size.Width, PreviewSkin.desktoppanelheight); + switch (PreviewSkin.desktoppanelposition) + { + case "Top": + predesktoppanel.Dock = DockStyle.Top; + predesktopappmenu.Dock = DockStyle.Top; + break; + case "Bottom": + predesktoppanel.Dock = DockStyle.Bottom; + predesktopappmenu.Dock = DockStyle.Bottom; + break; + } + predesktoppanel.Show(); + } + else { + predesktoppanel.Hide(); + } + + + if (API.Upgrades["applaunchermenu"] == true) + { + ApplicationsToolStripMenuItem.Font = new Font(PreviewSkin.applicationbuttontextfont, PreviewSkin.applicationbuttontextsize, PreviewSkin.applicationbuttontextstyle); + ApplicationsToolStripMenuItem.Text = PreviewSkin.applicationlaunchername; + + + + ApplicationsToolStripMenuItem.Height = PreviewSkin.applicationbuttonheight; + if (PreviewImages.applauncher != null) + { + ApplicationsToolStripMenuItem.Text = ""; + ApplicationsToolStripMenuItem.BackColor = Color.Transparent; + } + else { + ApplicationsToolStripMenuItem.Text = PreviewSkin.applicationlaunchername; + ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImage = null; + } + + preapplaunchermenuholder.Width = PreviewSkin.applaunchermenuholderwidth; + predesktopappmenu.Width = PreviewSkin.applaunchermenuholderwidth; + ApplicationsToolStripMenuItem.Width = PreviewSkin.applaunchermenuholderwidth; + preapplaunchermenuholder.Height = PreviewSkin.applicationbuttonheight; + predesktopappmenu.Height = PreviewSkin.applicationbuttonheight; + ApplicationsToolStripMenuItem.Height = PreviewSkin.applicationbuttonheight; + + if (PreviewImages.applauncher != null) + { + ApplicationsToolStripMenuItem.BackgroundImage = PreviewImages.applauncher; + } + else { + ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImageLayout = (ImageLayout)PreviewSkin.applauncherlayout; + } + } + else { + ApplicationsToolStripMenuItem.Visible = false; + } + + if (API.Upgrades["desktoppanelclock"] == true) + { + + prepaneltimetext.ForeColor = PreviewSkin.clocktextcolour; + + if (PreviewImages.panelclock == null) + { + pretimepanel.BackColor = PreviewSkin.clockbackgroundcolor; + pretimepanel.BackgroundImage = null; + } + else { + pretimepanel.BackColor = Color.Transparent; + pretimepanel.BackgroundImage = PreviewImages.panelclock; + pretimepanel.BackgroundImageLayout = (ImageLayout)PreviewSkin.panelclocklayout; + } + prepaneltimetext.Font = new Font(PreviewSkin.panelclocktextfont, PreviewSkin.panelclocktextsize, PreviewSkin.panelclocktextstyle); + pretimepanel.Size = new Size(prepaneltimetext.Width + 3, pretimepanel.Height); + prepaneltimetext.Location = new Point(0, PreviewSkin.panelclocktexttop); + pretimepanel.Show(); + } + else { + pretimepanel.Hide(); + } + + + ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbuttoncolour; + + pnldesktoppreview.BackColor = PreviewSkin.desktopbackgroundcolour; + pnldesktoppreview.BackgroundImage = PreviewImages.desktopbackground; + pnldesktoppreview.BackgroundImageLayout = (ImageLayout)PreviewSkin.desktopbackgroundlayout; + + if (API.Upgrades["panelbuttons"] == true) + { + prepnlpanelbutton.Visible = API.Upgrades["panelbuttons"]; + + pretbicon.Image = Properties.Resources.iconTerminal; + pretbctext.Text = "Terminal"; + + prepnlpanelbutton.Margin = new Padding(0, PreviewSkin.panelbuttonfromtop, PreviewSkin.panelbuttongap, 0); + + if (API.Upgrades["appicons"] == true) + { + pretbicon.Show(); + } + else + { + pretbicon.Hide(); + } + pretbicon.Location = new Point(PreviewSkin.panelbuttoniconside, PreviewSkin.panelbuttonicontop); + pretbicon.Size = new Size(PreviewSkin.panelbuttoniconsize, PreviewSkin.panelbuttoniconsize); + prepnlpanelbutton.Size = new Size(PreviewSkin.panelbuttonwidth, PreviewSkin.panelbuttonheight); + prepnlpanelbutton.BackColor = PreviewSkin.panelbuttoncolour; + prepnlpanelbutton.BackgroundImage = PreviewImages.panelbutton; + prepnlpanelbutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.panelbuttonlayout; + pretbctext.ForeColor = PreviewSkin.panelbuttontextcolour; + pretbctext.Font = new Font(PreviewSkin.panelbuttontextfont, PreviewSkin.panelbuttontextsize, PreviewSkin.panelbuttontextstyle); + pretbctext.Location = new Point(PreviewSkin.panelbuttontextside, PreviewSkin.panelbuttontexttop); + + + pretbicon.Size = new Size(PreviewSkin.panelbuttoniconsize, PreviewSkin.panelbuttoniconsize); + + } + prepnlpanelbuttonholder.Padding = new Padding(PreviewSkin.panelbuttoninitialgap, 0, 0, 0); + + + } + + + + public void setskin() + { + + //disposals + preclosebutton.BackgroundImage = null; + pretitlebar.BackgroundImage = null; + prerollupbutton.BackgroundImage = null; + prepgtoplcorner.BackgroundImage = null; + prepgtoprcorner.BackgroundImage = null; + preminimizebutton.BackgroundImage = null; + //apply new skin + if (PreviewImages.closebtn == null) + preclosebutton.BackColor = PreviewSkin.closebtncolour; + else + preclosebutton.BackgroundImage = PreviewImages.closebtn; + preclosebutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.closebtnlayout; + if (PreviewImages.titlebar == null) + pretitlebar.BackColor = PreviewSkin.titlebarcolour; + else + pretitlebar.BackgroundImage = PreviewImages.titlebar; + pretitlebar.BackgroundImageLayout = (ImageLayout)PreviewSkin.titlebarlayout; + if (PreviewImages.rollbtn == null) + prerollupbutton.BackColor = PreviewSkin.rollbtncolour; + else + prerollupbutton.BackgroundImage = PreviewImages.rollbtn; + prerollupbutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.rollbtnlayout; + if (PreviewImages.leftcorner == null) + prepgtoplcorner.BackColor = PreviewSkin.leftcornercolour; + else + prepgtoplcorner.BackgroundImage = PreviewImages.leftcorner; + prepgtoplcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.leftcornerlayout; + if (PreviewImages.rightcorner == null) + prepgtoprcorner.BackColor = PreviewSkin.rightcornercolour; + else + prepgtoprcorner.BackgroundImage = PreviewImages.rightcorner; + prepgtoprcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.rightcornerlayout; + if (PreviewImages.minbtn == null) + preminimizebutton.BackColor = PreviewSkin.minbtncolour; + else + preminimizebutton.BackgroundImage = PreviewImages.minbtn; + preminimizebutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.minbtnlayout; + if (PreviewImages.borderleft == null) + prepgleft.BackColor = PreviewSkin.borderleftcolour; + else + prepgleft.BackgroundImage = PreviewImages.borderleft; + prepgleft.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderleftlayout; + if (PreviewImages.borderright == null) + prepgright.BackColor = PreviewSkin.borderrightcolour; + else + prepgright.BackgroundImage = PreviewImages.borderright; + prepgleft.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderrightlayout; + if (PreviewImages.borderbottom == null) + prepgbottom.BackColor = PreviewSkin.borderbottomcolour; + else + prepgbottom.BackgroundImage = PreviewImages.borderbottom; + prepgbottom.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderbottomlayout; + if (PreviewSkin.enablebordercorners == true) + { + if (PreviewImages.bottomleftcorner == null) + prepgbottomlcorner.BackColor = PreviewSkin.bottomleftcornercolour; + else + prepgbottomlcorner.BackgroundImage = PreviewImages.bottomleftcorner; + prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.bottomleftcornerlayout; + if (PreviewImages.bottomrightcorner == null) + prepgbottomrcorner.BackColor = PreviewSkin.bottomrightcornercolour; + else + prepgbottomrcorner.BackgroundImage = PreviewImages.bottomrightcorner; + prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.bottomrightcornerlayout; + } + else { + prepgbottomlcorner.BackColor = PreviewSkin.borderrightcolour; + prepgbottomrcorner.BackColor = PreviewSkin.borderrightcolour; + prepgbottomlcorner.BackgroundImage = null; + prepgbottomrcorner.BackgroundImage = null; + } + + //set bottom border corner size + prepgbottomlcorner.Size = new Size(PreviewSkin.borderwidth, PreviewSkin.borderwidth); + prepgbottomrcorner.Size = new Size(PreviewSkin.borderwidth, PreviewSkin.borderwidth); + prepgbottomlcorner.Location = new Point(0, pnlwindowpreview.Height - PreviewSkin.borderwidth); + prepgbottomrcorner.Location = new Point(pnlwindowpreview.Width, pnlwindowpreview.Height - PreviewSkin.borderwidth); + } + + private void setupborders() + { + if (API.Upgrades["windowborders"] == false) + { + prepgleft.Hide(); + prepgbottom.Hide(); + prepgright.Hide(); + } + } + + private void setuptitlebar() + { + setupborders(); + + prepgleft.Width = PreviewSkin.borderwidth; + prepgright.Width = PreviewSkin.borderwidth; + prepgbottom.Height = PreviewSkin.borderwidth; + pretitlebar.Height = PreviewSkin.titlebarheight; + + if (PreviewSkin.enablecorners == true) + { + prepgtoplcorner.Show(); + prepgtoprcorner.Show(); + prepgtoprcorner.Width = PreviewSkin.titlebarcornerwidth; + prepgtoplcorner.Width = PreviewSkin.titlebarcornerwidth; + } + else { + prepgtoplcorner.Hide(); + prepgtoprcorner.Hide(); + } + + if (API.Upgrades["titlebar"] == false) + { + pretitlebar.Hide(); + } + + if (API.Upgrades["titletext"] == false) + { + pretitletext.Hide(); + } + else { + pretitletext.Font = new Font(PreviewSkin.titletextfontfamily, PreviewSkin.titletextfontsize, PreviewSkin.titletextfontstyle, GraphicsUnit.Point); + pretitletext.Text = "Your app name here"; + pretitletext.Show(); + } + + if (API.Upgrades["closebutton"] == false) + { + preclosebutton.Hide(); + } + else { + preclosebutton.BackColor = PreviewSkin.closebtncolour; + preclosebutton.Size = PreviewSkin.closebtnsize; + preclosebutton.Show(); + } + + if (API.Upgrades["rollupbutton"] == false) + { + prerollupbutton.Hide(); + } + else { + prerollupbutton.BackColor = PreviewSkin.rollbtncolour; + prerollupbutton.Size = PreviewSkin.rollbtnsize; + prerollupbutton.Show(); + } + + if (API.Upgrades["minimizebutton"] == false) + { + preminimizebutton.Hide(); + } + else { + preminimizebutton.BackColor = PreviewSkin.minbtncolour; + preminimizebutton.Size = PreviewSkin.minbtnsize; + preminimizebutton.Show(); + } + + if (API.Upgrades["windowborders"] == true) + { + preclosebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.closebtnfromside - preclosebutton.Size.Width, PreviewSkin.closebtnfromtop); + prerollupbutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.rollbtnfromside - prerollupbutton.Size.Width, PreviewSkin.rollbtnfromtop); + preminimizebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.minbtnfromside - preminimizebutton.Size.Width, PreviewSkin.minbtnfromtop); + switch (PreviewSkin.titletextpos) + { + case "Left": + pretitletext.Location = new Point(PreviewSkin.titletextfromside, PreviewSkin.titletextfromtop); + break; + case "Centre": + pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, PreviewSkin.titletextfromtop); + break; + } + pretitletext.ForeColor = PreviewSkin.titletextcolour; + } + else { + preclosebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.closebtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preclosebutton.Size.Width, PreviewSkin.closebtnfromtop); + prerollupbutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.rollbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - prerollupbutton.Size.Width, PreviewSkin.rollbtnfromtop); + preminimizebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.minbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preminimizebutton.Size.Width, PreviewSkin.minbtnfromtop); + switch (PreviewSkin.titletextpos) + { + case "Left": + pretitletext.Location = new Point(PreviewSkin.titletextfromside + prepgtoplcorner.Width, PreviewSkin.titletextfromtop); + break; + case "Centre": + pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, PreviewSkin.titletextfromtop); + break; + } + pretitletext.ForeColor = PreviewSkin.titletextcolour; + } + + //Change when Icon skinning complete + // Change to program's icon + if (API.Upgrades["appicons"] == true) + { + prepnlicon.Visible = true; + prepnlicon.Location = new Point(PreviewSkin.titleiconfromside, PreviewSkin.titleiconfromtop); + prepnlicon.Size = new Size(PreviewSkin.titlebariconsize, PreviewSkin.titlebariconsize); + prepnlicon.Image = Properties.Resources.iconShifter; + + } + + } + + #endregion + + private void btnsaveskin_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".skn", File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string res = API.GetFSResult(); + if (res != "fail") + { + Skinning.Utilities.saveskintofile(res); + API.CreateInfoboxSession("Skin Loader", "The skin has been saved successfully.", infobox.InfoboxMode.Info); + } + }; + } + + private void btnbacktoskinloader_Click(object sender, EventArgs e) + { + pnlskinpacks.Hide(); + pgcontents.Show(); + } + + private void cbpackfiles_SelectedIndexChanged(object sender, EventArgs e) + { + if(cbpackfiles.Text.EndsWith(".skn")) + { + string dirsepchar = "\\"; + switch(OSInfo.GetPlatformID()) + { + case "microsoft": + dirsepchar = "\\"; + break; + default: + dirsepchar = "/"; + break; + } + LoadedSkinFile = Paths.SkinDir + "_packdata" + dirsepchar + cbpackfiles.Text; + } + } + + private void btnbrowse_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".spk", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string res = API.GetFSResult(); + if(res != "fail") + { + LoadedPack = res; + SetupPackUI(); + } + }; + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/SkinLoader.resx b/source/WindowsFormsApplication1/Apps/SkinLoader.resx new file mode 100644 index 0000000..a4bf070 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/SkinLoader.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + Skin Packs are a handy way of grouping your skins together into one file so that you don't have to load separate .skn files. You can simply select any skin in the loaded pack, hit Apply and be on your way! + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Terminal.Designer.cs b/source/WindowsFormsApplication1/Apps/Terminal.Designer.cs new file mode 100644 index 0000000..5f7ba27 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Terminal.Designer.cs @@ -0,0 +1,126 @@ +using System; + +namespace ShiftOS +{ + partial class Terminal + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.txtterm = new System.Windows.Forms.TextBox(); + this.tmrfirstrun = new System.Windows.Forms.Timer(this.components); + this.tmrshutdown = new System.Windows.Forms.Timer(this.components); + this.pullbs = new System.Windows.Forms.Timer(this.components); + this.pullbottom = new System.Windows.Forms.Timer(this.components); + this.pullside = new System.Windows.Forms.Timer(this.components); + this.tmrstorylineupdate = new System.Windows.Forms.Timer(this.components); + this.panel2 = new System.Windows.Forms.Panel(); + this.tmrsetfont = new System.Windows.Forms.Timer(this.components); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // txtterm + // + this.txtterm.BackColor = System.Drawing.Color.Black; + this.txtterm.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtterm.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtterm.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtterm.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtterm.ForeColor = System.Drawing.Color.White; + this.txtterm.Location = new System.Drawing.Point(0, 0); + this.txtterm.Multiline = true; + this.txtterm.Name = "txtterm"; + this.txtterm.Size = new System.Drawing.Size(650, 396); + this.txtterm.TabIndex = 0; + this.txtterm.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ScrollDeactivate); + this.txtterm.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ScrollTerm); + // + // tmrfirstrun + // + this.tmrfirstrun.Interval = 1000; + // + // pullbs + // + this.pullbs.Interval = 1; + // + // pullbottom + // + this.pullbottom.Interval = 1; + // + // pullside + // + this.pullside.Interval = 1; + // + // tmrstorylineupdate + // + this.tmrstorylineupdate.Interval = 1000; + // + // panel2 + // + this.panel2.Controls.Add(this.txtterm); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(650, 396); + this.panel2.TabIndex = 3; + // + // tmrsetfont + // + this.tmrsetfont.Tick += new System.EventHandler(this.tmrsetfont_Tick); + // + // Terminal + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(650, 396); + this.Controls.Add(this.panel2); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.MinimumSize = new System.Drawing.Size(350, 200); + this.Name = "Terminal"; + this.Text = "Terminal"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Terminal_Load); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.TextBox txtterm; + internal System.Windows.Forms.Timer tmrfirstrun; + internal System.Windows.Forms.Timer tmrshutdown; + internal System.Windows.Forms.Timer pullbs; + internal System.Windows.Forms.Timer pullbottom; + internal System.Windows.Forms.Timer pullside; + internal System.Windows.Forms.Timer tmrstorylineupdate; + + #endregion + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Timer tmrsetfont; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Terminal.cs b/source/WindowsFormsApplication1/Apps/Terminal.cs new file mode 100644 index 0000000..944b333 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Terminal.cs @@ -0,0 +1,2757 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Drawing.Text; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Terminal : Form + { + string current_dir = ""; + + public Terminal() + { + InitializeComponent(); + current_dir = Paths.SaveRoot; + } + + public Terminal(bool modlog) + { + ModLogger = modlog; + InitializeComponent(); + API.LoggerTerminal = this; + current_dir = Paths.SaveRoot; + } + + public void StartOtherPlayerStory() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("IP Address is connecting as '???'..."); + break; + case 1: + WriteLine("Connection established."); + break; + case 2: + WriteLine("???: Hi, ShiftOS user. I have something to tell you."); + break; + case 3: + WriteLine("???: I'm not a hacker. I'm not a programmer. I am just like you."); + break; + case 4: + WriteLine("???: I am... the Other Player."); + break; + case 5: + WriteLine("???: I too have heard DevX's story about ShiftOS being an experimental operating system."); + break; + case 6: + WriteLine("???: I have also met another user. We'll call him... I don't know... Robert."); + break; + case 7: + WriteLine("???: And this Robert guy, well, he knows a lot about ShiftOS, and DevX."); + break; + case 8: + WriteLine("???: Robert is a fake name I'm calling him. You might know him as Hacker101."); + break; + case 9: + WriteLine("???: Anyways, He told me about you, so I figured I would help you get out of this mess."); + break; + case 10: + WriteLine("???: He said he'll help me get my hard drive back, and get ShiftOS off my system. Once he does, I'll tell you."); + break; + case 11: + WriteLine("???: In the meantime, I have one word for you. Survive. Do NOT let DevX get to you. Do not fall for his tricks. Just play along until I contact you."); + break; + case 12: + WriteLine("???: I'll talk to you about this soon."); + break; + case 13: + t.Stop(); + this.Close(); + API.Upgrades["otherplayerstory1"] = true; + break; + } + i += 1; + }; + t.Start(); + } + + public bool ModLogger = false; + + private void Terminal_Load(object sender, EventArgs e) + { + objToWriteTo = this.txtterm; + SaveSystem.Utilities.LoadedSave.newgame = false; + if(API.Upgrades["windowedterminal"] == true) + { + this.WindowState = FormWindowState.Normal; + } else + { + this.WindowState = FormWindowState.Maximized; + } + + txtterm.KeyDown += new KeyEventHandler(txtterm_KeyPress); + txtterm.Click += new EventHandler(txtterm_Click); + tmrfirstrun.Tick += new EventHandler(tmrfirstrun_Tick); + tmrshutdown.Tick += new EventHandler(tmrshutdown_Tick); + if (Hacking == false) + { + WriteLine(prefix); + } + txtterm.Select(txtterm.TextLength, 0); + if (API.Upgrades["terminalscrollbar"] == true) + { + txtterm.ScrollBars = ScrollBars.Vertical; + } + else + { + txtterm.ScrollBars = ScrollBars.None; + + } + txtterm.MouseWheel += (object s, MouseEventArgs a) => + { + if (Zooming == true) + { + txtterm.ScrollBars = ScrollBars.None; + if (ZoomMultiplier > 0) + { + if (a.Delta > 0) + { + ZoomMultiplier += 1; + } else + { + ZoomMultiplier -= 1; + } + ResetTerminalFont(); + } + else + { + ZoomMultiplier = 1; + } + } + }; + ResetTerminalFont(); + StartLogCheck(); + tmrsetfont.Start(); + + + } + + + private void StartLogCheck() + { + if(ModLogger == true) + { + var tmrlog = new System.Windows.Forms.Timer(); + tmrlog.Interval = 500; + tmrlog.Tick += (object s, EventArgs a) => + { + if (File.Exists(Paths.Mod_Temp + "cmdlog")) + { + string log = File.ReadAllText(Paths.Mod_Temp + "cmdlog"); + API.CreateInfoboxSession("test", log, infobox.InfoboxMode.Info); + } + }; + tmrlog.Start(); + } + } + + public string[] cmds; + public int rolldownsize; + public int oldbordersize; + public int oldtitlebarheight; + public bool justopened = false; + public bool needtorollback = false; + public int minimumsizewidth = 350; + + public int minimumsizeheight = 200; + + public string EndOfAlias; + public string command; + int trackpos; + int firstrun; + public bool sendinputtomod = false; + + string prefix = $"{API.Username}@{API.OSName} $> "; + + private void ReadCommand() + { + command = txtterm.Lines[txtterm.Lines.Length - 1]; + command = command.Replace(prefix, ""); + command = command.ToLower(); + } + + internal void StartDanaRossStory() + { + var t = new Thread(new ThreadStart(new Action(() => + { + WriteLine("User <65.48.121.24> connecting as 'Dana'"); + API.PlaySound(Properties.Resources.dial_up_modem_02); + WriteLine("Dana: Hey! That was quite the battle, huh?"); + BeepSleep(1000); + WriteLine("Dana: Well - since you beat me, let me let you in on a little secret."); + BeepSleep(3000); + WriteLine("Dana: ShiftOS's desktop may seem pretty complicated and customizable for you right now, but trust me. It gets better."); + BeepSleep(2500); + WriteLine("Dana: I'm gonna patch your Shiftorium so you can get some neat upgrades!"); + BeepSleep(3000); + WriteLine("Dana: Also, if you feel like doing more hacker battles, why not check out Tier 2 in the Network Browser?"); + BeepSleep(2750); + WriteLine("Dana: I've also added my network modules to your network - you'll just have to wait for them to regenerate."); + BeepSleep(500); + WriteLine("Dana: Well, talk to you some other time!"); + BeepSleep(1000); + this.Invoke(new Action(() => + { + API.Upgrades["midgamebridge"] = true; + this.Close(); + })); + }))); + t.Start(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtterm_Click(object sender, EventArgs e) + { + txtterm.Select(txtterm.TextLength, 0); + txtterm.ScrollToCaret(); + } + + public void SelectBottom() + { + txtterm.Focus(); + txtterm.Select(txtterm.TextLength, 0); + } + + // ERROR: Handles clauses are not supported in C# + private void txtterm_KeyPress(object sender, System.Windows.Forms.KeyEventArgs e) + { + if(e.Control) { + if(API.Upgrades["zoomableterminal"] == true) + { + Zooming = true; + } + } + + if (e.KeyCode == Keys.T && e.Control && blockctrlt == false) + { + this.Close(); + e.SuppressKeyPress = true; + } + + switch (e.KeyCode) + { + case Keys.ShiftKey: + trackpos = trackpos - 1; + break; + case Keys.Alt: + trackpos = trackpos - 1; + break; + case Keys.CapsLock: + trackpos = trackpos - 1; + break; + case Keys.ControlKey: + trackpos = trackpos - 1; + break; + case Keys.LWin: + trackpos = trackpos - 1; + break; + case Keys.RWin: + trackpos = trackpos - 1; + break; + case Keys.Right: + if (Hacking == false) + { + if (txtterm.SelectionStart == txtterm.TextLength) + { + trackpos = trackpos - 1; + } + } + else + { + switch (SelectedMode) + { + case 1: + if (SelectedCharacter < ShiftOS.Hacking.Tools.Count - 1) + { + SelectedCharacter += 1; + ShowTools(); + } + break; + case 2: + if (SelectedCharacter < ShiftOS.Hacking.Characters.Count - 1) + { + SelectedCharacter += 1; + ShowChar(); + } + break; + } + } + break; + case Keys.Left: + if (Hacking == false) + { + if (trackpos < 1) + { + e.SuppressKeyPress = true; + trackpos = trackpos - 1; + } + else { + trackpos = trackpos - 2; + } + } + else + { + switch(SelectedMode) + { + case 1: + if (SelectedCharacter > 0) + { + SelectedCharacter -= 1; + ShowTools(); + } + + break; + case 2: + if (SelectedCharacter > 0) + { + SelectedCharacter -= 1; + ShowChar(); + } + break; + + } + } + break; + case Keys.Up: + e.SuppressKeyPress = true; + ReadCommand(); + if (API.LastRanCommand != "" && command == "") + { + txtterm.Text += API.LastRanCommand; + trackpos += API.LastRanCommand.Length; + txtterm.Select(txtterm.TextLength, 0); + } + else { + trackpos = trackpos - 1; + } + break; + case Keys.Down: + e.SuppressKeyPress = true; + trackpos = trackpos - 1; + break; + case Keys.D1: + if (Hacking == true) + { + SelectedMode = 1; + Hack_ShowCharacters(); + e.SuppressKeyPress = true; + } + else + { + trackpos -= 1; + } + break; + case Keys.D2: + if (Hacking == true && SelectedMode == 0) + { + SelectedMode = 2; + Hack_ShowCharacters(); + e.SuppressKeyPress = true; + } + else + { + trackpos -= 1; + } + break; + } + + if (e.KeyCode == Keys.Enter) + { + e.SuppressKeyPress = true; + if (LuaMode == false) + { + if (Hacking == false) + { + ReadCommand(); + if (command != "") + { + DoCommand(); + } + + if (command == "clear") + { + txtterm.Text = txtterm.Text + prefix; + txtterm.Select(txtterm.Text.Length, 0); + } + else + { + txtterm.Text = txtterm.Text + Environment.NewLine + prefix; + txtterm.Select(txtterm.Text.Length, 0); + } + trackpos = 0; + } + else + { + switch(SelectedMode) + { + case 1: + ShiftOS.Hacking.StartHack(SelectedCharacter, UpgradeToHack); + this.Close(); + break; + case 2: + var c = ShiftOS.Hacking.Characters[SelectedCharacter].Cost; + if(API.Codepoints >= c) + { + API.RemoveCodepoints(c); + ShiftOS.Hacking.StartHackWithCharacter(SelectedCharacter, UpgradeToHack); + this.Close(); + } + else + { + WriteLine("You can't afford to pay this partner. Please choose another."); + } + break; + } + } + } + else + { + trackpos = 0; + var lua = txtterm.Lines[txtterm.Lines.Length - 1]; + try { + Interpreter.mod(lua); + } + catch(Exception ex) + { + WriteLine(ex.Message); + } + if (LuaMode == true) + { + WriteLine(""); + } + txtterm.Select(txtterm.TextLength, 0); + } + } + else { + if (e.KeyCode == Keys.Back) + { + } + else { + if (Viruses.InfectedWith("keyboardfucker")) { + var rnd = new Random(); + if(rnd.Next(0, 20) == 10) + { + e.Handled = true; + txtterm.Text += Viruses.KeyboardInceptor.Intercept(); + trackpos += 1; + } + else + { + trackpos += 1; + } + } + else { + trackpos = trackpos + 1; + } + } + } + + if (e.KeyCode == Keys.Back) + { + if (trackpos < 1) + { + e.SuppressKeyPress = true; + } + else { + if (txtterm.SelectedText.Length < 1) + { + trackpos = trackpos - 1; + } + else { + e.SuppressKeyPress = true; + } + } + } + + if (SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades["autoscrollterminal"] == true) + { + txtterm.Select(txtterm.TextLength, 0); + txtterm.ScrollToCaret(); + } + + } + + internal void StartShellShock() + { + var t = new Thread(new ThreadStart(new Action(() => + { + Thread.Sleep(300); + WriteLine("Sending false packet to shiftnet://devx/tracker..."); + Thread.Sleep(100); + WriteLine("Awaiting reply from server..."); + Thread.Sleep(5000); + WriteLine("Got reply with header \"SOS_TRK_GET\"."); + Thread.Sleep(50); + WriteLine("[kernel] Sending usage log to server..."); + WriteLine("Intercepting outgoing request..."); + Thread.Sleep(200); + WriteLine("Got packet contents..."); + Thread.Sleep(25); + WriteLine("Sifting..."); + Thread.Sleep(500); + WriteLine("Found connection data for shiftnet://devx/tracker."); + Thread.Sleep(100); + WriteLine(@"Username: devx +Password: z7fjsd3"); + Thread.Sleep(100); + WriteLine("Authenticating with SSH server on shiftnet://devx/tracker running Arch Linux x86_64..."); + Thread.Sleep(1000); + WriteLine("[SSH] Access granted."); + Thread.Sleep(100); + WriteLine($"[Message] ???: We're in. In about 75 seconds DevX's server will go down. It'll be quite cool actually, Don't know if you've ever seen a forkbomb in action, but because you're in an SSH session with DevX's server and I'm also controlling the same session you're gonna see one. Oh, yeah, this server's the only one of his that doesn't actually run ShiftOS."); + Thread.Sleep(25000); + this.Invoke(new Action(() => + { + txtterm.Text = ""; + })); + int i = 60; + while(i >= 1) + { + Thread.Sleep(1000); + WriteLine($"Beginning attack on server in {i} seconds."); + i -= 1; + } + WriteLine("[devx@tracker ~]$ "); + string cmd = ":`(`)`{` `:`|`:` `&` `}`;`:"; //yep. I'm pretending to use a forkbomb on DevX's server. This'll be FUN to code. + foreach(string c in cmd.Split('`')) + { + Thread.Sleep(100); + this.Invoke(new Action(() => + { + txtterm.Text += c; + })); + } + WriteLine("[devx@tracker ~]$ "); + WriteLine("[Message] ???: Alright. I entered the command for you. Looks like it did nothing. DevX wouldn't even know what's happening... but keep your terminal open for 30 seconds."); + Thread.Sleep(30000); + this.Invoke(new Action(() => + { + FinalMission.EndGameHandler.GoToNextObjective(); + })); + int progress = 0; + while(progress <= 10000) + { + int r = new Random().Next(0, 1); + switch(r) + { + case 0: + WriteLine("-bash: fork: Resource temporarily unavailable"); + break; + case 1: + WriteLine("-bash: fork: retry: Resource temporarily unavailable"); + break; + } + Thread.Sleep(progress / 10); + progress++; + } + WriteLine("[SSH] Connection to server dropped."); + this.Invoke(new Action(() => + { + FinalMission.EndGameHandler.GoToNextObjective(); + })); + this.Invoke(new Action(() => { this.Close(); })); + }))); + t.Start(); + } + + public void SetPrefix(string _prefix) + { + prefix = _prefix; + } + + internal void StartBridgeToMidGame() + { + var t2 = new System.Windows.Forms.Timer(); + t2.Interval = 4000; + int i2 = 0; + t2.Tick += (object s, EventArgs e) => + { + switch (i2) + { + case 0: + if(API.Upgrades["hacker101"] == true) + { + WriteLine("Hacker101: Hello. We meet again. The Other Player told me about your situation."); + } + else + { + API.Upgrades["hacker101"] = true; + WriteLine("Hacker101: The Other Player told me about your situation."); + } + break; + case 1: + WriteLine("Hacker101: Lemme guess. DevX found out about you having the Shiftnet, didn't he..."); + break; + case 2: + WriteLine("Hacker101: Well I guess we'll have to fight fire with fire. You remember that person who told you about Hacker Battles?"); + break; + case 3: + WriteLine("Hacker101: It's time you know who he is. He is, in fact, me, and to continue on about Hacker Battles..."); + break; + case 4: + WriteLine("Hacker101: I can help you take down DevX, but we'll need to take down his defenses and get into his network."); + break; + case 5: + WriteLine("Hacker101: DevX's network of servers is larger than any datacenter on Earth, and it'll take time to plan the perfect attack."); + break; + case 6: + WriteLine("Hacker101: Think of it this way. DevX has a network of networks, each with their own leader."); + break; + case 7: + WriteLine("Hacker101: I can help you find these networks, but it's up to you to take 'em down."); + break; + case 8: + WriteLine("Hacker101: Of course, it's hard to hack a network if you don't know how to start a battle."); + break; + case 9: + WriteLine("Hacker101: Introducing the Battle Preparation Screen."); + break; + case 10: + WriteLine("Hacker101: It'll show you any network I've found, and it'll tell you some useful info about it."); + break; + case 11: + WriteLine("Hacker101: However the spkg package for this thing is HUGE, and will require lots of tweaks to the ShiftOS desktop. spkg will hopefully administer the tweaks for you, but here's a rundown of what'll happen."); + break; + case 12: + WriteLine("Hacker101: For one, you'll be able to have multiple desktop panels to fit more widgets on them."); + break; + case 13: + WriteLine("Hacker101: And if you have the App Launcher, it will get sorted so it doesn't take up the entire screen when you get so many applications installed."); + break; + case 14: + WriteLine("Hacker101: And the rest is a surprise. I'll initiate the install sequence."); + break; + case 15: + InstallMidGameDesktop(); + break; + } + i2 += 1; + }; + + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + + t.Tick += (object s, EventArgs a) => + { + + + switch (i) + { + case 0: + WriteLine("IP connecting as Hacker101..."); + break; + case 1: + WriteLine("Hacker101: Hello, ShiftOS user. I am a hacker."); + break; + case 2: + if (API.BitnoteAddress != null) + { + WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, your Bitnote Address is {API.BitnoteAddress.Address}, and you have {API.BitnoteAddress.Bitnotes}. That's your private address, by the way."); + } + else + { + WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, and you do not have a Bitnote Address."); + } + break; + case 3: + WriteLine("Hacker101: Enough fun in games. Listen. There are two things you need to know."); + break; + case 4: + WriteLine("Hacker101: Thing #1. DevX isn't real."); + break; + case 5: + WriteLine("Hacker101: I've decompiled parts of ShiftOS. And you know what I found?"); + break; + case 6: + WriteLine("Hacker101: Everything DevX says. Everything he does. Everything he THINKS. It's all hardcoded directly into ShiftOS's core."); + break; + case 7: + WriteLine("Hacker101: Want proof? Here. I'll run a quick Lua script for you."); + string DecompiledCode = Properties.Resources.DecompiledCode; + var l = new LuaInterpreter(); + Form win = l.mod.create_window("Decompiled Code", null, 720, 480); + TextBox txt = new TextBox(); + txt.Multiline = true; + txt.Text = Properties.Resources.DecompiledCode; + txt.BorderStyle = BorderStyle.None; + txt.BackColor = Color.Black; + txt.ForeColor = Color.White; + txt.Font = new Font(OSInfo.GetMonospaceFont(), 9); + l.mod.set_dock(txt, "fill"); + l.mod.add_widget_to_window(win, txt); + break; + case 8: + WriteLine("Hacker101: Not only is that some nice, smokin' fresh C# code directly from ShiftOS, but that's a nice steaming pile of bird poop on DevX's doorstep."); + break; + case 9: + WriteLine("Hacker101: Thing #2. The Shiftnet holds some secrets."); + break; + case 10: + WriteLine("Hacker101: What kind of secrets, I hear you ask through your microphone (jesus, do you seriously talk to us with your voice? Are you that bored?)"); + break; + case 11: + WriteLine("Hacker101: Well. I'm talking, pieces of a Lua script that could help stop DevX dead in his digital tracks."); + break; + case 12: + WriteLine("Hacker101: All you gotta do is use my decryption utilities to find the pieces of this encrypted script, download them, decrypt them, and the utility will automatically piece them together for you."); + break; + case 13: + WriteLine("Hacker101: Shiftnet pages ending with .enc are your best bet."); + break; + case 14: + WriteLine("Hacker101: You can install the utilities using spkg install secret."); + break; + case 15: + WriteLine("Hacker101: Then, when the application installs, run it, and use the password 'binary_hell' to install the REAL utilities."); + break; + case 16: + WriteLine("Hacker101: Anyways, that wraps that up. But hang on. One more thing..."); + t.Stop(); + ShiftOS.Hacking.AddCharacter(new Character("Hacker101", "Let's get the job done.", 75, 45, 5)); + t2.Start(); + break; + } + i += 1; + }; + if(API.Upgrades["hacker101"] == true) + { + t2.Start(); + } + else + { + t.Start(); + } + + + } + + private void InstallMidGameDesktop() + { + //throw new NotImplementedException(); + } + + int SelectedMode = 0; + int SelectedCharacter = 0; + + public void ShowChar() + { + txtterm.Text = ""; + var h = ShiftOS.Hacking.Characters[SelectedCharacter]; + WriteLine(" == Partner Select =="); + WriteLine($"Partner: {SelectedCharacter + 1}/{ShiftOS.Hacking.Characters.Count}"); + WriteLine($"Name: {h.Name}"); + WriteLine($"Skill: {h.Skill}/100"); + WriteLine($"Speed: {h.Speed}/100"); + WriteLine($"Cost: {h.Cost}"); + WriteLine($"Bio: {h.Bio}"); + WriteLine(Environment.NewLine + "LEFT: Previous Partner, RIGHT: Next Partner, ENTER: Confirm"); + } + + public void ShowTools() + { + txtterm.Text = ""; + try + { + var h = ShiftOS.Hacking.Tools[SelectedCharacter]; + WriteLine(" == Attack Select =="); + WriteLine($"Attack: {SelectedCharacter + 1}/{ShiftOS.Hacking.Tools.Count}"); + WriteLine($"Name: {h.Name}"); + WriteLine($"Effectiveness: {h.Effectiveness}"); + WriteLine($"Description: {h.Description}"); + WriteLine(Environment.NewLine + "LEFT: Previous Attack, RIGHT: Next Attack, ENTER: Confirm"); + } + catch + { + WriteLine("There are no entries to display in this list."); + } + } + + private void Hack_ShowCharacters() + { + switch(SelectedMode) + { + case 1: + ShiftOS.Hacking.GetCharacters(); + SelectedCharacter = 0; + ShowTools(); + break; + case 2: + ShiftOS.Hacking.GetCharacters(); + SelectedCharacter = 0; + ShowChar(); + break; + } + } + + internal void StartAidenNirhStory() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("User 151.43.85.33 connecting as \"Aiden\"..."); + break; + case 2: + WriteLine($"Aiden: Hey there, {API.Username}1 I'm Aiden Nirh."); + break; + case 3: + WriteLine("Aiden: Have you seen Appscape?"); + break; + case 4: + WriteLine("Aiden: It's my package manager for ShiftOS. It's pretty neat."); + break; + case 5: + WriteLine("Aiden: You should check it out, it's on the Shiftnet at shiftnet://main/appscape!"); + break; + case 6: + WriteLine("Aiden: But remember, when browsing the Shiftnet try not to venture from the main server!"); + break; + case 7: + API.Upgrades["aidennirh"] = true; + t.Stop(); + this.Close(); + break; + } + i += 1; + }; + t.Start(); + } + + internal void StartHacker101Story() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("IP connecting as Hacker101..."); + break; + case 1: + WriteLine("Hacker101: Hello, ShiftOS user. I am a hacker."); + break; + case 2: + if (API.BitnoteAddress != null) + { + WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, your Bitnote Address is {API.BitnoteAddress.Address}, and you have {API.BitnoteAddress.Bitnotes}. That's your private address, by the way."); + } + else + { + WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, and you do not have a Bitnote Address."); + } + break; + case 3: + WriteLine("Hacker101: Enough fun in games. Listen. There are two things you need to know."); + break; + case 4: + WriteLine("Hacker101: Thing #1. DevX isn't real."); + break; + case 5: + WriteLine("Hacker101: I've decompiled parts of ShiftOS. And you know what I found?"); + break; + case 6: + WriteLine("Hacker101: Everything DevX says. Everything he does. Everything he THINKS. It's all hardcoded directly into ShiftOS's core."); + break; + case 7: + WriteLine("Hacker101: Want proof? Here. I'll run a quick Lua script for you."); + string DecompiledCode = Properties.Resources.DecompiledCode; + var l = new LuaInterpreter(); + Form win = l.mod.create_window("Decompiled Code", null, 720, 480); + TextBox txt = new TextBox(); + txt.Multiline = true; + txt.Text = Properties.Resources.DecompiledCode; + txt.BorderStyle = BorderStyle.None; + txt.BackColor = Color.Black; + txt.ForeColor = Color.White; + txt.Font = new Font(OSInfo.GetMonospaceFont(), 9); + l.mod.set_dock(txt, "fill"); + l.mod.add_widget_to_window(win, txt); + break; + case 8: + WriteLine("Hacker101: Not only is that some nice, smokin' fresh C# code directly from ShiftOS, but that's a nice steaming pile of bird poop on DevX's doorstep."); + break; + case 9: + WriteLine("Hacker101: Thing #2. The Shiftnet holds some secrets."); + break; + case 10: + WriteLine("Hacker101: What kind of secrets, I hear you ask through your microphone (jesus, do you seriously talk to us with your voice? Are you that bored?)"); + break; + case 11: + WriteLine("Hacker101: Well. I'm talking, pieces of a Lua script that could help stop DevX dead in his digital tracks."); + break; + case 12: + WriteLine("Hacker101: All you gotta do is use my decryption utilities to find the pieces of this encrypted script, download them, decrypt them, and the utility will automatically piece them together for you."); + break; + case 13: + WriteLine("Hacker101: Shiftnet pages ending with .enc are your best bet."); + break; + case 14: + WriteLine("Hacker101: You can install the utilities using spkg install secret."); + break; + case 15: + WriteLine("Hacker101: Then, when the application installs, run it, and use the password 'binary_hell' to install the REAL utilities."); + break; + case 16: + WriteLine("Hacker101: Now go. We need that script. I know a friend who will help you get your hard drive back from DevX if you can do this."); + t.Stop(); + ShiftOS.Hacking.AddCharacter(new Character("Hacker101", "Let's get the job done.", 75, 45, 5)); + API.Upgrades["hacker101"] = true; + this.Close(); + break; + } + i += 1; + }; + t.Start(); + } + + internal void StartOtherPlayerSysFix() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("User connected as ???."); + break; + case 1: + if(API.Upgrades["otherplayerstory"] == true) + { + WriteLine($"???: {API.Username}! Did he find out? Oh God, I hope he can see this..."); + } + else + { + WriteLine("???: Hello? Uhhhh, is this stupid thing working?"); + } + break; + case 2: + if(API.Upgrades["otherplayerstory"] == true) + { + WriteLine("???: Ahh. Good. You can read this. It's me, the other player."); + } + else + { + WriteLine("???: Thank heaven. You can hear me. Don't ask who I am."); + } + break; + case 3: + WriteLine("???: Looks like DevX hit you hard. Guess he found out you had the Shiftnet."); + break; + case 4: + WriteLine("???: Relax. It's not your fault."); + break; + case 5: + WriteLine("???: Actually, the Shiftnet regularly sends data about it's usage, unencrypted, directly to DevX."); + break; + case 6: + WriteLine("???: This code seems to be embedded into all .saa files. It's actually how I found out about you."); + break; + case 7: + WriteLine("???: It seems weird, I know, but everytime you run a .saa file, an uplink is made to DevX's servers"); + break; + case 8: + if (API.Upgrades["otherplayerstory"] == true) + { + WriteLine("???: And, well, I think we could use this. I'll see if Hacker101 can track this uplink. If he can, you will know it the next time you run a .saa."); + } + else + { + WriteLine("???: And, well, I think we could use this. I have a friend who's good with his hacking skills. I'll see if he can help you stop DevX dead. If he can, he will contact you next time you run a .saa."); + } + break; + case 9: + WriteLine("???: Anyways, connected to your system, I can see your desktop. Looks pretty messed up, huh?"); + break; + case 10: + WriteLine("???: You're lucky you don't have the Windows Everywhere virus."); + break; + case 11: + Viruses.InfectFile(Paths.Drivers + "Keyboard.dri", Viruses.VirusID.WindowsEverywhere); + Viruses.CheckForInfected(); + WriteLine("???: Crap! I spoke too soon."); + break; + case 12: + WriteLine("???: Alright. I'll see if I can hijack your Shiftorium Registry, install a virus scanner, and get rid of the viruses."); + break; + case 13: + API.Upgrades["virusscanner"] = true; + var trm = new Terminal(); + API.CreateForm(trm, API.LoadedNames.TerminalName, Properties.Resources.iconTerminal); + trm.command = "vscan"; + trm.DoCommand(); + break; + case 14: + WriteLine("???: All better. I hope. As for those random files on your desktop, well, it seems DevX dropped some sort of secret message onto your system."); + break; + case 15: + WriteLine("???: Go ahead and try to decrypt it. The Shiftnet Lua API is very useful."); + break; + case 16: + if(API.Upgrades["otherplayerstory"] == true) + { + WriteLine("???: Anyways, I'm gonna go work with Hacker101, discuss those .saa uplinks, and see if we can come up with a suitable attack plan."); + } + else + { + WriteLine("???: Well, your system is all better. You don't have to thank me. Just, when you open a .saa file, I'll try to contact you if I'm not busy."); + } + break; + case 17: + WriteLine("???: Talk to you soon. And, remember. ShiftOS is like a forest. DevX is the predator, you are the prey. Watch your back."); + break; + case 18: + t.Stop(); + this.Close(); + API.Upgrades["otherplayerrescue"] = true; + break; + } + i += 1; + }; + t.Start(); + } + + internal void StartHackerBattleIntro() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + API.Upgrades["hackerbattles"] = true; + API.Upgrades["hackcommand"] = true; + WriteLine("IP address connecting with no identity..."); + break; + case 1: + WriteLine("Hey there. So I see you're into hacking."); + break; + case 2: + WriteLine("Oh, how rude of me. You don't know if I'm DevX or not."); + break; + case 3: + WriteLine("Well now you do. I will not show my identity, but I am not DevX."); + break; + case 4: + WriteLine("Anyways. There are two things you must know about hacking within ShiftOS."); + break; + case 5: + WriteLine("1. You can hack more than just the Shiftorium. Look around the user interface for any 'Hack it' buttons."); + break; + case 6: + WriteLine("Also, running 'hack' in the Terminal will let you do even more damage to DevX's security systems as well as give you some advantages."); + break; + case 7: + WriteLine("Ever wanted to make the Shiftorium have a bit of a sale, or even better, make all applications pay out more Codepoints than DevX intends?"); + break; + case 8: + WriteLine("Well that 'hack' command is useful then. Go ahead. Try it in another Terminal window. But good God do not close this one."); + break; + case 9: + WriteLine("Because there's one more thing you need to know."); + break; + case 10: + WriteLine("You are not the only person DevX has contacted with ShiftOS."); + break; + case 11: + WriteLine("There are others. Some of them, friendly. Some of them, knowledgable enough to help you."); + break; + case 12: + WriteLine("ShiftOS is like a private community. Anyone can contact anyone provided they have the skill to get in."); + break; + case 13: + WriteLine("Meaning, you may meet some very cool people."); + break; + case 14: + WriteLine("But some of us are... how do you say it... hostile."); + break; + case 15: + WriteLine("Enter the era of Hacker Battles."); + break; + case 16: + WriteLine("It's a network-vs-network every-man-for-himself affair. You'll meet criminals, hackers, agencies and much more."); + break; + case 17: + WriteLine("All offering a little surprise if you can take their network down."); + break; + case 18: + WriteLine("And it's best you get trained, for at any time, anyone could challenge you to one."); + break; + case 19: + WriteLine("And the amount of networks devastated due to untrained users picking a fight with the wrong person is alarmingly huge."); + break; + case 20: + WriteLine("I'll launch a practice program which will teach you the Hacker Battle interface and the fundamentals."); + break; + case 21: + WriteLine("And if you can complete the entire training session, you will be able to defend against anyone who dare battle you."); + break; + case 22: + WriteLine("Starting training session #53D8G in 5 seconds...."); + break; + case 23: + WriteLine("Don't worry. It shouldn't be too difficult for you."); + t.Stop(); + ShiftOS.Hacking.StartBattleTutorial(); + break; + } + i += 1; + }; + t.Start(); + } + + internal void StartDevXFuriousStory() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch (i) + { + case 0: + WriteLine("IP 199.108.232.1 Connecting..."); + break; + case 1: + WriteLine("DevX: WHAT HAVE YOU DONE?"); + break; + case 2: + WriteLine("DevX: How the HELL did you get the Shiftnet?"); + break; + case 3: + WriteLine("DevX: What sites have you seen? TALK TO ME."); + break; + case 4: + WriteLine("DevX: Alright, got nothing to say? Fine. You will pay for this..."); + break; + case 5: + WriteLine("DevX: I don't know what I'll do... I don't know when I'll do it... but you will wish you never touched a computer in your life..."); + break; + case 6: + t.Stop(); + Viruses.DropDevXPayload(); + this.Close(); + var trm = new Terminal(); + API.CreateForm(trm, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); + trm.StartDevXFuriousStory2(); + break; + } + i += 1; + }; + t.Start(); + } + + private void StartDevXFuriousStory2() + { + var t = new Thread(new ThreadStart(new Action(() => + { + WriteLine("User '???' connecting..."); + API.PlaySound(Properties.Resources.dial_up_modem_02); + WriteLine("???: Hello? Ummm... this is awkward..."); + BeepSleep(3000); + WriteLine("???: Listen - I'm a hacker. Well, not really. I'm friends with one."); + BeepSleep(3000); + WriteLine("???: Seems like DevX completely obliterated your system with one of his viruses."); + BeepSleep(2500); + WriteLine("???: I'll fix that for you."); + API.Upgrades["virusscanner"] = true; + this.Invoke(new Action(() => + { + this.command = "vscan"; + this.DoCommand(); + })); + BeepSleep(1000); + WriteLine("???: Better? Cool. Now, I need your help."); + BeepSleep(1250); + WriteLine("???: I can't reveal my identity yet - but I co-own this chat-room..."); + BeepSleep(1175); + WriteLine("???: It's called the 'Hacker Alliance'."); + BeepSleep(1000); + WriteLine("???: I'm going to install something called 'HoloChat' on your system. It'll be quick."); + BeepSleep(2000); + WriteLine("Installing HoloChat..."); + API.Upgrades["holochat"] = true; + Thread.Sleep(100); + WriteLine("Done. Resetting desktop..."); + this.Invoke(new Action(() => { API.CurrentSession.SetupDesktop(); })); + WriteLine("Done."); + Thread.Sleep(3000); + WriteLine("???: Alright - I'll talk to you soon. Just join that chat room when you're ready."); + BeepSleep(1000); + this.Invoke(new Action(() => + { + this.Close(); + })); + }))); + t.Start(); + } + + private LuaInterpreter Interpreter = null; + private bool blockctrlt = false; + + /// + /// Call after creating a Terminal to let Maureen Fenn talk + /// to the player about the Shiftnet and the Appscape Package Manager. + /// + public void StartShiftnetStory() + { + System.Windows.Forms.Timer tmrstory = new System.Windows.Forms.Timer(); + tmrstory.Interval = 10000; + WriteLine("IP connecting as 'Maureen Fenn'..."); + API.PlaySound(Properties.Resources.dial_up_modem_02); + var t = new Thread(new ThreadStart(new Action(() => + { + WriteLine("Maureen Fenn: Hey there, user! I have something to show you."); + BeepSleep(4000); + WriteLine("Maureen Fenn: So, there's this thing called the 'Shiftnet'"); + BeepSleep(3750); + WriteLine("Maureen Fenn: Turns out, that DevX wants to keep it a secret, as such he only installed it on his and my systems."); + BeepSleep(4250); + WriteLine("Maureen Fenn: But what's the point of listening to DevX when we have people like you who like to experiment?"); + BeepSleep(4000); + WriteLine("Maureen Fenn: Well, to be fair - he can destroy whatever he wants. Just like he did my company, Minimatch."); + BeepSleep(3000); + WriteLine("Maureen Fenn: But who cares! I'm going to install a few things on your system."); + API.Upgrades["shiftnet"] = true; + this.Invoke(new Action(() => + { + this.command = "spkg install shiftnet"; + this.DoCommand(); + })); + WriteLine("Shiftnet installed on system..."); + Thread.Sleep(4000); + WriteLine("Maureen Fenn: All done! Oh - just before I leave... go ahead and explore the Shiftnet!"); + BeepSleep(3000); + WriteLine("Maureen Fenn: But, be careful. Don't venture off the main server. You never know what's elsewhere..."); + BeepSleep(1000); + WriteLine("Maureen Fenn: Well, bye!"); + this.Invoke(new Action(() => + { + API.CurrentSession.SetupDesktop(); + this.Close(); + })); + }))); + t.Start(); + } + + /// + /// *BEEP* ZZZZZZZZzzzzzzzzzzz....... + /// + /// Time to sleep. + private void BeepSleep(int time) + { + API.PlaySound(Properties.Resources.writesound); + Thread.Sleep(time); + } + + private List GetFonts() + { + var lst = new List(); + // Get the installed fonts collection. + InstalledFontCollection allFonts = new InstalledFontCollection(); + + // Get an array of the system's font familiies. + FontFamily[] fontFamilies = allFonts.Families; + + // Display the font families. + foreach (FontFamily myFont in fontFamilies) + { + lst.Add(myFont.Name.ToLower()); + } + //font_family + + return lst; + } + + public List GetColorList() + { + var lst = new List(); + if(API.Upgrades["red"] == true) + lst.Add("red"); + if (API.Upgrades["green"] == true) + lst.Add("green"); + if (API.Upgrades["blue"] == true) + lst.Add("blue"); + if (API.Upgrades["brown"] == true) + lst.Add("brown"); + if (API.Upgrades["purple"] == true) + lst.Add("purple"); + if (API.Upgrades["yellow"] == true) + lst.Add("yellow"); + if (API.Upgrades["orange"] == true) + lst.Add("orange"); + if (API.Upgrades["pink"] == true) + lst.Add("pink"); + if (API.Upgrades["gray"] == true) + lst.Add("gray"); + lst.Add("black"); + lst.Add("white"); + return lst; + } + + public Color SetColor(string name) + { + Color col = Color.White; + switch(name) + { + case "black": + col = Color.Black; + break; + case "white": + col = Color.White; + break; + case "gray": + col = Color.Gray; + break; + case "red": + col = Color.Red; + break; + case "green": + col = Color.Green; + break; + case "blue": + col = Color.Blue; + break; + case "brown": + col = Color.Brown; + break; + case "purple": + col = Color.Purple; + break; + case "yellow": + col = Color.Yellow; + break; + case "orange": + col = Color.Orange; + break; + } + return col; + } + + private bool LuaMode = false; + + public string GetPath(string path) + { + return path.Replace(Paths.SaveRoot, "").Replace(OSInfo.DirectorySeparator, "/"); + } + + public string GetParent(string path) + { + var d = new DirectoryInfo(path); + return d.Parent.FullName; + } + + public void DoCommand() + { + API.LastRanCommand = command; + string[] args = command.ToLower().Split(' '); + switch (args[0]) + { + case "ls": + case "dir": + if(API.Upgrades["fileskimmer"]) + { + foreach(var d in Directory.GetDirectories(current_dir)) + { + WriteLine($"[DIR] {new DirectoryInfo(d).Name}"); + } + foreach (var d in Directory.GetFiles(current_dir)) + { + WriteLine($"{new FileInfo(d).Name}"); + } + } + else + { + wrongcommand(); + } + break; + case "cd": + if (API.Upgrades["fileskimmer"]) + { + if (args[1] == "..") + { + if (GetPath(current_dir) != "/") + { + current_dir = GetParent(current_dir); + SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> "); + } + else + { + WriteLine("cd: Can't go up past the root."); + } + } + else + { + string newdir = current_dir + OSInfo.DirectorySeparator; + foreach (var dir in Directory.GetDirectories(current_dir)) + { + if (new DirectoryInfo(dir).Name.ToLower() == args[1]) + newdir = dir; + } + current_dir = newdir; + SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> "); + } + } + break; + case "upg": + if(API.DeveloperMode) + { + try + { + switch(args[1]) + { + case "get": + WriteLine(API.Upgrades[args[2]].ToString()); + break; + } + } + catch + { + + } + } + else + { + wrongcommand(); + } + break; + case "endgame_test": + if (API.DeveloperMode) + { + try + { + switch (args[1]) + { + case "choice_screen": + var cscreen = new ShiftOS.FinalMission.ChooseYourApproach(); + cscreen.WindowState = FormWindowState.Maximized; + //cscreen.TopMost = true; + cscreen.Show(); + break; + case "limitedmode": + API.LimitedMode = !API.LimitedMode; + WriteLine($"Limited mode set to {API.LimitedMode}."); + break; + } + } + catch + { + WriteLine("Invalid arguments."); + } + } + else + { + wrongcommand(); + } + break; + case "htutorial": + ShiftOS.Hacking.StartBattleTutorial(); + break; + case "fake_buy": + if (API.DeveloperMode) + { + try + { + if (API.Upgrades.ContainsKey(args[1])) + { + API.Upgrades[args[1]] = true; + WriteLine($"Bought upgrade {args[1]}."); + API.CurrentSession.SetupAppLauncher(); + API.UpdateWindows(); + SaveSystem.Utilities.saveGame(); + } + else + { + WriteLine("Upgrade not found."); + } + } + catch + { + WriteLine("fake_buy: Bad arguments."); + } + } + else + { + wrongcommand(); + } + break; + case "connections": + try + { + switch(args[1]) + { + case "list": + foreach(var client in Package_Grabber.clients) + { + WriteLine($"Hostname: {client.Key}, Port: {client.Value.RemotePort}, Online: {client.Value.IsConnected}"); + } + break; + case "gui": + API.CreateForm(new ConnectionManager(), "Connections", API.GetIcon("Connections")); + break; + case "drop": + foreach(var client in Package_Grabber.clients) + { + Package_Grabber.Disconnect(client.Key); + } + break; + case "add": + string host = args[2]; + int port = 0; + int.TryParse(args[3], out port); + if (!Package_Grabber.clients.ContainsKey(host)) + { + Package_Grabber.ConnectToServer(host, port); + WriteLine("Connection to host established successfully."); + } + else + { + var c = Package_Grabber.clients[host]; + if (c.IsConnected == false) + { + c.Connect(host, port); + WriteLine("Re-established connection with host."); + } + else { + WriteLine("This host has been connected to already."); + } + } + break; + } + } + catch + { + WriteLine("connections: Missing arguments."); + } + break; + case "story": + if(API.DeveloperMode == true && API.Upgrades["shiftnet"]) + { + try + { + switch(args[1]) + { + case "aidennirh": + StartAidenNirhStory(); + break; + case "devxfurious": + StartDevXFuriousStory(); + break; + case "battletut": + StartHackerBattleIntro(); + break; + case "otherplayer": + StartDevXFuriousStory(); + break; + case "hacker101": + StartHacker101Story(); + break; + } + } + catch + { + WriteLine("Missing arguments."); + } + } + else { wrongcommand(); } + break; + case "make": + try + { + string path = command.Replace("make ", ""); + string realpath = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; + if (File.Exists(realpath + OSInfo.DirectorySeparator + "main.lua")) + { + WriteLine("Compiling to " + path + ".saa"); + ZipFile.CreateFromDirectory(realpath, realpath + ".saa"); + } + else + { + WriteLine($"make: *** No rule to make target \"{realpath}\". Stop."); + } + } + catch + { + WriteLine("make: Invalid arguments."); + } + break; + case "linux": + if(API.DeveloperMode) + { + WriteLine("Upgrading your system..."); + foreach(var upg in Shiftorium.Utilities.GetAvailable()) + { + API.Upgrades[upg.id] = true; + WriteLine("Installed upgrade \"" + upg.Name + "\"..."); + } + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + } + else + { + wrongcommand(); + } + break; + case "netgen": + WriteLine("Starting netgen..."); + API.CreateForm(new NetGen(), "Network Generator", API.GetIcon("Terminal")); + break; + case "lua": + if(API.DeveloperMode == true) + { + try + { + string f = args[1]; + WriteLine(f); + f = command.Remove(0, 4); + WriteLine(f); + string real = $"{Paths.SaveRoot}{f.Replace("/", OSInfo.DirectorySeparator)}"; + WriteLine(real); + if (File.Exists(real)) + { + WriteLine("Running Lua script at " + f + "."); + var l = new LuaInterpreter(real); + } + else + { + WriteLine("Lua script file not found."); + } + } + catch + { + this.LuaMode = true; + this.Interpreter = new LuaInterpreter(); + this.Interpreter.mod.print = new Action((text) => WriteLine(text)); + this.Interpreter.mod.exit = new Action(() => + { + this.LuaMode = false; + this.Interpreter = null; + WriteLine($"{API.CurrentSave.username}@{API.CurrentSave.osname} $> "); + }); + WriteLine("ShiftOS Lua Interpreter - v1.0"); + WriteLine("Created by Michael VanOverbeek"); + WriteLine(Environment.NewLine + "How to use: Simply type some Lua code and watch it come to life. Code can be executed on one line, and unlike most interpreters, you can access code from one line in another."); + WriteLine(Environment.NewLine + "When you're done, simply press the Enter key to execute the code." + Environment.NewLine); + } + } + else + { + wrongcommand(); + } + break; + case "hack": + if(API.Upgrades["hacking"] == true) + { + StartHackingSession("random"); + } + else + { + wrongcommand(); + } + break; + case "virusscanner": + case "vscan": + if(API.Upgrades["virusscanner"] == true) + { + WriteLine("Scanning for infected files..."); + var goodList = new Dictionary(); + foreach (KeyValuePair kv in Viruses.Infections) + { + if(kv.Value.Contains(";")) + { + foreach(string file in kv.Value.Split(';')) + { + if (goodList.ContainsKey(file)) + { + goodList[file] += ", " + kv.Key; + } + else { + goodList.Add(file, kv.Key); + } + } + } + else + { + if (goodList.ContainsKey(kv.Value)) + { + goodList[kv.Value] += ", " + kv.Key; + } + else { + goodList.Add(kv.Value, kv.Key); + } + } + } + WriteLine("Scan complete."); + if (goodList.Count > 0) + { + foreach (KeyValuePair kv in goodList) + { + WriteLine("File " + kv.Key + " is infected with " + kv.Value + ". Disinfecting..."); + Viruses.DisInfect(kv.Key); + } + WriteLine("Disinfection complete."); + } + else + { + WriteLine("No infections found. You are safe."); + } + } + break; + case "infections": + if (API.DeveloperMode == true) + { + foreach (KeyValuePair kv in Viruses.Infections) + { + WriteLine(kv.Key + " @ " + kv.Value); + } + } + else + { + wrongcommand(); + } + break; + case "binarywater": + if (API.DeveloperMode) + { + ShiftOS.Hacking.AddCharacter(new Character("Philip Adams", "Hello, and welcome to another episode of OSFirstTimer.", 100, 100, 0)); + WriteLine("Philip Adams is now in the list of hirable hackers."); + } + else + { + WriteLine("I see you went in the ShiftOS source code... ummm yeah... this isn't a developer mode release so I can't just give you a full-skilled hacker even if you beg."); + } + break; + case "color": + try + { + if(API.Upgrades["setterminalcolors"] == true) + { + + Color bcol = SetColor(args[1]); + Color tcol = SetColor(args[2]); + API.CurrentSkin.TerminalTextColor = tcol; + API.CurrentSkin.TerminalBackColor = bcol; + + } + } + catch(Exception) + { + WriteLine("color: Missing arguments."); + } + break; + case "encrypt": + if (API.DeveloperMode == true) + { + string messageToEncrypt = command.Replace("encrypt ", ""); + string encryptedMessage = API.Encryption.Encrypt(messageToEncrypt); + WriteLine("Encrypted Message: " + encryptedMessage); + } + else + { + wrongcommand(); + } + break; + case "font": + if(API.Upgrades["setterminalfont"] == true) + { + var fname = command.Replace("font ", ""); + if(GetFonts().Contains(fname)) + { + API.CurrentSkin.TerminalFontStyle = fname; + } + else + { + WriteLine("font: Unrecognized font name \"" + fname + "\". Note: Font names are case sensitive."); + } + } + else + { + wrongcommand(); + } + break; + case "colorlist": + if(API.Upgrades["setterminalcolors"] == true) + { + foreach(string itm in GetColorList()) + { + WriteLine(itm); + } + } + else + { + wrongcommand(); + } + break; + case "spkg": + if (!API.LimitedMode) + { + if (API.Upgrades["shiftnet"] == true) + { + try + { + switch (args[1].ToLower()) + { + case "install": + if (args[2] != null && args[2] != "") + { + string pkgname = args[2].ToLower().Replace(".pkg", ""); + if (Package_Grabber.GetPackage(pkgname) == true) + { + WriteLine("Downloaded package '" + pkgname + "' from shiftnet://main/spkg/ successfully. Installing now."); + string r = Package_Grabber.ExtractPackage(); + if (r == "fail") + { + WriteLine("[FATAL] Could not install package."); + WriteLine("spkg: Killed."); + } + else + { + WriteLine("Extracted " + pkgname + " to " + r + "..."); + var res2 = Package_Grabber.InstallPackage(r + "\\"); + if (res2 != "success") + { + WriteLine("[FATAL] Could not install package. " + res2); + WriteLine("spkg: Killed."); + } + else + { + WriteLine("[DONE] Package installed."); + } + } + } + else + { + WriteLine("spkg: Package '" + args[2] + "' not found."); + } + } + break; + default: + WriteLine("spkg: Invalid argument: " + args[1]); + break; + } + } + catch (Exception ex) + { + WriteLine("spkg: " + ex.Message); + } + } + else + { + wrongcommand(); + } + } + else + { + try + { + if(args[2] == "god_utils") + { + if(FinalMission.EndGameHandler.GodModeInstallEnabled == true) + { + var t = new Thread(new ThreadStart(new Action(() => + { + WriteLine("Downloading package 'god_utils'... Please wait."); + Thread.Sleep(10000); + WriteLine("Download complete."); + Thread.Sleep(100); + WriteLine("Beginning installation."); + Thread.Sleep(1000); + WriteLine(@" == GOD MODE == + +God Mode gives you FULL control of ShiftOS. You can add/remove Codepoints, buy or unbuy Shiftorium upgrades, and can do whatever you want. + +Installing core applications..."); + Thread.Sleep(250); + WriteLine("Installing subpackage 'json_edit'..."); + Thread.Sleep(250); + WriteLine("Installing subpackage 'upgrade_mod'..."); + Thread.Sleep(100); + WriteLine("Installing subpackage 'hijacker'..."); + Thread.Sleep(500); + WriteLine(@" == HIJACKER by DevX == + +HIJACKER is a utility that allows you to hijack any system and install ShiftOS on it during a hacker battle."); + Thread.Sleep(100); + WriteLine("[hijacker] Injecting HIJACKER code into hbattleui.sft..."); + Thread.Sleep(150); + WriteLine("[hijacker] Done."); + this.Invoke(new Action(() => + { + StartChoice1EndStory(); + })); + }))); + t.Start(); + } + else + { + WriteLine("spkg: Package '" + args[2] + "' not found."); + } + } + else + { + WriteLine("spkg: Package '" + args[2] + "' not found."); + } + } + catch + { + WriteLine("spkg: Missing arguments."); + } + } + break; + case "alias": + try + { + switch(args[1]) + { + case "-?": + case "--help": + WriteLine("Aliases Help" + Environment.NewLine); + WriteLine("Alias is a command that lets you create aliases for other commands. You could make a command 'upgrade' alias 'shiftorium' if you wanted." + Environment.NewLine); + WriteLine("Arguments:"); + WriteLine(" -h, --help: Displays this screen."); + WriteLine("-a, --add : Adds a new alias."); + WriteLine("-d, --delete : Deletes an alias."); + WriteLine("-l, --list: Shows all available aliases."); + break; + case "--add": + case "-a": + if(API.AddAlias(args[2], command.Replace("alias " + args[1] + " " + args[2] + " ", ""))) + { + WriteLine("Alias added successfully."); + API.SaveAliases(); + } + else + { + WriteLine("That alias already exists."); + } + break; + case "--delete": + case "-d": + if(API.RemoveAlias(args[2]) == true) + { + WriteLine("Alias \"" + args[2] + "\" removed successfully."); + API.SaveAliases(); + } + else + { + WriteLine("That alias doesn't exist."); + } + break; + case "-l": + case "--list": + WriteLine("Aliases:"); + foreach(KeyValuePair kv in API.CommandAliases) + { + WriteLine(kv.Key + " => " + kv.Value); + } + break; + default: + WriteLine("alias: Invalid argument. Try alias --help for help with the Alias command."); + break; + } + } + catch + { + WriteLine("alias: Missing arguments. Try alias --help for help with the Alias command."); + } + break; + case "username": + if(API.Upgrades["customusername"] == true) + { + try + { + API.CurrentSave.username = args[1]; + } + catch + { + WriteLine("username: Missing arguments."); + } + } + else + { + wrongcommand(); + } + break; + case "osname": + if (API.Upgrades["customusername"] == true) + { + try + { + API.CurrentSave.osname = args[1]; + } + catch + { + WriteLine("osname: Missing arguments."); + } + } + else + { + wrongcommand(); + } + break; + + case "unity": + if (API.Upgrades["unitymode"] == true) + { + API.CurrentSession.SetUnityMode(); + API.CurrentSession.SetupDesktop(); + txtterm.Focus(); + } else + { + wrongcommand(); + } + break; + case "time": + if (API.Upgrades["pmandam"] == false) + { + if (API.Upgrades["hourssincemidnight"] == false) + { + if (API.Upgrades["minutessincemidnight"] == false) + { + if (API.Upgrades["secondssincemidnight"] == true) { + WriteLine("Since midnight, " + API.GetTime() + " seconds have passed."); + } else { + wrongcommand(); + } + } else + { + WriteLine("Since midnight, " + API.GetTime() + " minutes have passed."); + } + } + else + { + WriteLine("Since Midnight, " + API.GetTime() + " hours have passed."); + } + } else + { + WriteLine("Current time: " + API.GetTime()); + } + break; + case "saa": + if (API.Upgrades["shiftnet"]) { + var f = command.Replace("saa ", ""); + if (f.StartsWith("/")) + { + var withoutslash = f.Remove(0, 1); + var dirsep = OSInfo.DirectorySeparator; + var rightdir = $"{Paths.SaveRoot}{dirsep}{f.Replace("/", dirsep)}"; + if (File.Exists(rightdir)) + { + var finf = new FileInfo(rightdir); + if (finf.Extension == ".saa") + { + API.LaunchMod(finf.FullName); + } + else + { + WriteLine("saa: Cannot launch the file '" + finf.FullName + " because it isn't a valid stand-alone app."); + } + } + else + { + WriteLine("saa: Cannot launch the file '" + f + "' because it doesn't exist."); + } + } + else + { + WriteLine("saa: Cannot launch the file '" + f + "' because it doesn't exist."); + } + } + else + { + wrongcommand(); + } + break; + case "help": + try + { + showhelp(args[1]); + } + catch + { + showhelp(); + } + break; + case "codepoints": + case "cp": + WriteLine("You have " + API.Codepoints.ToString() + " Codepoints."); + break; + case "shutdown": + API.ShutDownShiftOS(); + break; + case "clear": + txtterm.Text = ""; + break; + case "close": + if (command.Contains("close ")) + { + var pid = command.Replace("close ", ""); + if (API.CloseProgram(pid) == true) + { + WriteLine("Closed all running " + pid + "s."); + } + else + { + WriteLine("No processes with id '" + pid + "' were found!"); + } + } + else + { + WriteLine("Insufficient arguments."); + } + break; + case "05tray": + if (API.DeveloperMode == true) + { + API.AddCodepoints(500); + WriteLine("You've been granted 500 Codepoints."); + } else + { + wrongcommand(); + } + + break; + case "debug": + if (API.DeveloperMode == true) + { + try + { + switch (args[1].ToLower()) + { + case "shiftnet-story": + WriteLine("Debugging Shiftnet Story..."); + StartShiftnetStory(); + break; + case "devmode": + API.DeveloperMode = false; + WriteLine("Turned off developer mode. Use the passcode to turn it back on."); + break; + default: + WriteLine("Invalid argument: " + args[1] + ". Debug can only debug the following: 'shiftnet-story'."); + break; + } + + } + catch (Exception ex) + { + WriteLine("debug: " + ex.Message); + } + } else { + try + { + switch (args[1].ToLower()) + { + case "developers123": + WriteLine("Turned Developer Mode on!"); + API.DeveloperMode = true; + break; + default: + wrongcommand(); + break; + } + } catch + { + wrongcommand(); //Debug command pretends to be an invalid command if an exception is thrown. + } + } + break; + case "echo": + if(command.Contains("echo ")) + { + WriteLine(command.Replace("echo ", "")); + } + else + { + WriteLine("echo: Insufficient Parameters."); + } + break; + case "syncsave": + WriteLine("Command removed."); + break; + + default: + if (API.OpenProgram(args[0]) == false) + { + if (API.Upgrades["trmfiles"] == false) + { + bool done = false; + foreach(KeyValuePair kv in API.CommandAliases) + { + if(kv.Key == command) + { + command = kv.Value; + done = true; + DoCommand(); + } + + } + if(done == false) + { + wrongcommand(); + } + } + else + { + var f = command.Replace("\\", "/"); + if (f.StartsWith("/")) + { + var withoutslash = f.Remove(0, 1); + var dirsep = OSInfo.DirectorySeparator; + var proper = $"{Paths.SaveRoot}{dirsep}{withoutslash.Replace("/", dirsep)}"; + if (File.Exists(proper)) + { + runterminalfile(proper); + } + else + { + wrongcommand(); + } + } + else + { + bool done = false; + foreach (KeyValuePair kv in API.CommandAliases) + { + if (kv.Key == command) + { + command = kv.Value; + done = true; + DoCommand(); + } + + } + if (done == false) + { + wrongcommand(); + } + } + } + } + break; + } + } + + private void StartChoice1EndStory() + { + var t = new System.Windows.Forms.Timer(); + int i = 0; + t.Interval = 4000; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("User '' connected as '???'"); + break; + case 1: + WriteLine($"???: {API.Username}! What are you doing!?"); + break; + case 2: + WriteLine("???: I went onto the Hacker Alliance room earlier and DevX was on there..."); + break; + case 3: + WriteLine("???: And he told me you SIDED WITH HIM."); + break; + case 4: + WriteLine("???: This is a HUGE mistake! Listen!"); + break; + case 5: + WriteLine("???: He's lying to you. Listen. DevX is not what you think he is."); + break; + case 6: + WriteLine("???: He isn't a human! He's an AI! We were all played!"); + break; + case 7: + WriteLine("???: I'm telling the truth, I swear!"); + break; + case 8: + WriteLine("???: You want proof? - holochat_cmd: ERROR: Remote host closed connection."); + break; + case 9: + WriteLine("spkg: Rebooting system in 8 seconds."); + break; + case 11: + API.Upgrades["titlebar"] = false; + API.Upgrades["windowedterminal"] = false; //terminals must be fullscreen + var trm = new Terminal(); + this.Close(); + API.CreateForm(trm, "Terminal", API.GetIcon("Terminal")); + trm.StartReboot(); + break; + } + i += 1; + }; + t.Start(); + } + + public void StartReboot() + { + txtterm.Text = ""; + var t1 = new Thread(new ThreadStart(new Action(() => + { + Thread.Sleep(500); + WriteLine("ShiftOS: Kernel deactivated."); + Thread.Sleep(1000); + this.Invoke(new Action(() => + { + txtterm.Text = ""; + })); + Thread.Sleep(1000); + WriteLine("Welcome to ShiftOS."); + Thread.Sleep(500); + WriteLine("Starting core..."); + API.Upgrades["windowedterminal"] = true; + Thread.Sleep(450); + WriteLine($"Your username is {API.Username}."); + Thread.Sleep(100); + WriteLine($"You have {API.Codepoints} Codepoints."); + WriteLine("Loading modules..."); + Thread.Sleep(750); + foreach(var upg in API.Upgrades) + { + if(upg.Value == true) + { + WriteLine($"Loaded module {upg.Key}..."); + } + Thread.Sleep(100); + } + WriteLine("Starting desktop."); + this.Invoke(new Action(() => + { + var s = new ShiftOSDesktop(); + s.Show(); + s.EndGame_AttachEvents(); + })); + Thread.Sleep(1000); + this.Invoke(new Action(() => + { + FinalMission.EndGameHandler.GoToNextObjective(); + })); + API.Upgrades["titlebar"] = true; + }))); + t1.Start(); + } + + public void Crash() + { + txtterm.Text = ""; + WriteLine(" *** SYSTEM PANIC *** "); + WriteLine(Environment.NewLine); + WriteLine("PANIC_ID: 750_15_4W3S0M3"); + WriteLine("PANIC_DESC: System became too unstable to function properly. In 5 seconds, your session will be resumed."); + var t = new System.Windows.Forms.Timer(); + t.Interval = 1000; + int p = 0; + t.Tick += (object s, EventArgs a) => + { + if(p == 4) + { + t.Stop(); + this.Close(); + } + p += 1; + }; + t.Start(); + } + + private void wrongcommand() + { + txtterm.Text = txtterm.Text + Environment.NewLine + "Command not recognized - Type 'help' for a list of commands!" + Environment.NewLine; + } + + bool Hacking = false; + + private Control objToWriteTo = null; + private string UpgradeToHack = null; + + public void StartHackingSession(string id) + { + UpgradeToHack = id; + objToWriteTo = txtterm; + Hacking = true; + txtterm.ReadOnly = true; + WriteLine("To continue, choose which way you "); + WriteLine("would like to go about this. "); + WriteLine(" "); + WriteLine("1. Go it alone. "); + WriteLine("2. Hire someone. "); + WriteLine(" "); + WriteLine("Press the key that corresponds to "); + WriteLine("the option you want. "); + + } + + public void showhackinghelp() + { + WriteLine(" - Hacking - "); + WriteLine(Environment.NewLine + "Hacking allows you to gain more features and upgrades by unlocking more of the OS's capabilities."); + WriteLine(Environment.NewLine + "There are two ways you can execute a hack:"); + WriteLine(" - On your own: It'll take skill, and time, but if you have the correct tools you can do it on your own."); + WriteLine(" - With a more competent partner: You have the option of employing a partner from a list of various hackers. The speed and success of the hack depends on their skill, and how fast they can pull it off. You will need to pay them a fee of Codepoints however. They can also grant you tools to do it on your own."); + WriteLine(Environment.NewLine + "Some hacks are capable of:"); + WriteLine(" - Decreasing or increasing the price of Shiftorium Upgrades"); + WriteLine(" - Decreasing or increasing the amount of Codepoints earned by doing various tasks."); + WriteLine(" - Unlocking more upgrades."); + WriteLine(Environment.NewLine + "To start a hack, go to a locked or empty Shiftorium category and click the \"Hack It\" button."); + API.Upgrades["hacking"] = true; + } + + public void showhelp(string topic) + { + switch(topic) + { + case "hacking": + showhackinghelp(); + break; + default: + WriteLine("No help available for this topic. Try 'help' for general help."); + break; + } + } + + public void showhelp() + { + listinfo(); + WriteLine(" "); + listcommands(); + listprograms(); + } + + private void listprograms() + { + WriteLine("Programs installed: " + Environment.NewLine); + WriteLine(" - terminal: A command-line application that lets you run programs in ShiftOS"); + WriteLine(" - shiftorium: An application where you can buy upgrades and new apps using codepoints."); + /* TEMP-REMOVED - I just can't get it to work. + WriteLine(" - jumper: A simple 'jump over the obstacle' game."); + */ + WriteLine(" - knowledge_input: Test your knowledge, and gain some Codepoints too."); + if (API.Upgrades["shifter"] == true) + WriteLine(" - shifter: Allows you to customize ShiftOS."); + if (API.Upgrades["skinning"] == true) + WriteLine(" - skinloader: Load and save ShiftOS skins."); + if (API.Upgrades["pong"] == true) + WriteLine(" - pong: A good ole' game of Pong."); + if (API.Upgrades["fileskimmer"] == true) + WriteLine(" - fileskimmer: Browse the files on your computer."); + if (API.Upgrades["textpad"] == true) + WriteLine(" - textpad: \"Write, save, and open a text document.\" - Philip Adams"); + if (API.Upgrades["artpad"] == true) + WriteLine(" - artpad: A simple, but useful drawing application."); + if (API.Upgrades["shiftnet"] == true) + WriteLine("Also, more apps can be run by opening .saa files. Apps can also be installed using spkg or by double clicking .pkg or .stp files."); + } + + public void listcommands() + { + WriteLine(" == Commands == " + Environment.NewLine); + WriteLine(" - clear: Clears the screen."); + WriteLine(" - shutdown: Shuts down your PC."); + WriteLine(" - codepoints: Shows how many codepoints you have."); + WriteLine(" - help: Shows this screen."); + if(API.Upgrades["secondssincemidnight"] == true) + { + WriteLine(" - time: Shows the current time."); + } + if (API.Upgrades["unitymode"] == true) + WriteLine(" - unity: Toggles Unity Mode."); + if (API.Upgrades["customusername"] == true) + { + WriteLine(" - username : Changes your username."); + WriteLine(" - osname : Changes the operating system name."); + } + if(API.Upgrades["shiftnet"] == true) + { + WriteLine(" - saa: Runs a specified .saa file."); + WriteLine(" - spkg: Shiftnet Package Manager (more info at shiftnet://main/spkg"); + } + } + + public void listinfo() + { + WriteLine(SaveSystem.Utilities.LoadedSave.osname + " - Version " + SaveSystem.Utilities.LoadedSave.ingameversion); + WriteLine("==========================" + Environment.NewLine); + WriteLine(" == Info == " + Environment.NewLine); + if(API.Upgrades["applaunchermenu"] == true) + { + WriteLine(" - Apps can be run using the App Launcher on the desktop."); + } else + { + WriteLine(" - Apps can be run by typing their name in the Terminal."); + } + if (API.Upgrades["windowedterminal"] == true) + { + WriteLine(" - The Terminal runs in a window."); + } + else + { + WriteLine(" - The Terminal runs fullscreen at all times."); + } + if(API.Upgrades["titlebar"] == true) + { + WriteLine(" - Applications have a titlebar to help distinguish between other apps."); + } + if(API.Upgrades["windowborders"] == true) + { + WriteLine(" - Applications have a window border to help distinguish between other apps."); + } + if(API.Upgrades["multitasking"] == true) + { + WriteLine(" - Multiple apps can be run at the same time, and you can even run more than one of the same app!"); + } + if(API.Upgrades["movablewindows"] == true) + { + WriteLine(" - Applications can be moved using CTRL+W,A,S,D."); + } + if(API.Upgrades["draggablewindows"] == true) + { + WriteLine(" - You can drag apps around the screen by dragging their titlebars."); + } + if(API.Upgrades["resizablewindows"] == true) + { + WriteLine(" - You can resize windows by dragging their borders."); + } + if(API.Upgrades["panelbuttons"] == true) + { + WriteLine($" - A list of open apps is shown at the {API.CurrentSkin.desktoppanelposition.ToLower()} of the screen."); + } + if(API.Upgrades["usefulpanelbuttons"] == true) + { + WriteLine(" - You can minimize and restore apps using the panel buttons."); + } + if(API.Upgrades["titletext"] == true) + { + WriteLine(" - Apps display their names on the titlebar."); + } + if(API.Upgrades["appicons"] == true) + { + WriteLine(" - Apps display their icons, and they are displayed in their titlebars."); + } + if(API.Upgrades["autoscrollterminal"] == true) + { + WriteLine(" - The Terminal will automatically scroll to the bottom."); + } + if(API.Upgrades["terminalscrollbar"] == true) + { + WriteLine(" - You can scroll up and down the Terminal's buffer."); + } + if(API.Upgrades["zoomableterminal"] == true) + { + WriteLine(" - You can zoom the Terminal in and out by holding CTRL and scrolling up or down."); + } + } + + + // ERROR: Handles clauses are not supported in C# + private void tmrfirstrun_Tick(object sender, EventArgs e) + { + switch (firstrun) + { + case 1: + txtterm.Text = txtterm.Text + "Installation Successfull" + Environment.NewLine; + blockctrlt = true; + break; + case 2: + txtterm.Text = txtterm.Text + "IP 199.108.232.1 Connecting..." + Environment.NewLine + "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; + API.PlaySound(Properties.Resources.dial_up_modem_02); + break; + case 12: + txtterm.Text = txtterm.Text + "IP 199.108.232.1 Connected!" + Environment.NewLine + "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 15: + txtterm.Text = txtterm.Text + "DevX: Hi, my name is DevX and you are now using an early version of my operating system \"ShiftOS\"." + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 22: + txtterm.Text = txtterm.Text + "DevX: Currently the terminal is open and I am using it to communicate with you remotely." + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 28: + txtterm.Text = txtterm.Text + "DevX: ShiftOS is going to be the most revolutionary operating system in the world that will run on every electronic device you can think of." + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 36: + txtterm.Text = txtterm.Text + "DevX: I can't tell you much about my future plans right now but if you can help me then I may tell you more in future" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 44: + txtterm.Text = txtterm.Text + "DevX: ShiftOS is barely usable in it's current state so I need you to help me evolve it using codepoints" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 50: + txtterm.Text = txtterm.Text + "DevX: Once you acquire codepoints you can use them to upgrade certain components of ShiftOS or add new software" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 59: + txtterm.Text = txtterm.Text + "DevX: I'll close the terminal now and send you to the blank ShiftOS desktop" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 65: + txtterm.Text = txtterm.Text + "DevX: You can open and close the terminal at any time by pressing CTRL + T" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 70: + txtterm.Text = txtterm.Text + "DevX: Once you are on the desktop open the terminal, type \"help\" and then press enter for a guide on using ShiftOS" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 80: + txtterm.Text = txtterm.Text + "DevX: Gotta run now but I'll contact you soon to see how you are going with evolving ShiftOS for me while I... Work on something else" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 89: + txtterm.Text = txtterm.Text + "DevX: Remember to always click the black desktop first and then press press CTRL + T to open the terminal otherwise the terminal won't open!" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 94: + API.PlaySound(Properties.Resources.typesound); + txtterm.Text = "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; + tmrfirstrun.Stop(); + this.Close(); + blockctrlt = false; + SaveSystem.Utilities.saveGame(); + break; + } + firstrun = firstrun + 1; + txtterm.SelectionStart = txtterm.TextLength; + } + + public void runterminalfile(string path) + { + if(File.Exists(path)) + { + string[] cmds = File.ReadAllLines(path); + foreach(string cmd in cmds) + { + command = cmd; + DoCommand(); + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrshutdown_Tick(object sender, EventArgs e) + { + Application.Exit(); + } + + public void WriteLine(string text) + { + API.CurrentSession.Invoke(new Action(() => + { + if (txtterm.Text.Length > 0) + { + txtterm.Text += Environment.NewLine + text; + } + else + { + txtterm.Text += text; + } + txtterm.Select(txtterm.TextLength, 0); + txtterm.ScrollToCaret(); + })); + } + private bool Zooming = false; + + private void ScrollDeactivate(object sender, KeyEventArgs e) + { + if(Zooming == true) + { + Zooming = false; + } + } + + private int ZoomMultiplier = 1; + + private void ResetTerminalFont() + { + string fname = "Font"; + if(API.Upgrades["setterminalfont"] == true) + { + fname = API.CurrentSkin.TerminalFontStyle; + } + else + { + fname = OSInfo.GetMonospaceFont(); + } + int fsize = 9 * ZoomMultiplier; + try { + txtterm.Font = new Font(fname, fsize); + } + catch + { + txtterm.Font = new Font(fname, 9); + } + } + + private void Zoom(object sender, ScrollEventArgs e) + { + + } + + private void ScrollTerm(object sender, MouseEventArgs e) + { + if(Zooming == true) + { + + } else + { + if(API.Upgrades["terminalscrollbar"] == true) + { + txtterm.ScrollBars = ScrollBars.Vertical; + } + } + } + + private void tmrsetfont_Tick(object sender, EventArgs e) + { + ResetTerminalFont(); + if(API.Upgrades["setterminalcolors"] == true) + { + txtterm.BackColor = API.CurrentSkin.TerminalBackColor; + txtterm.ForeColor = API.CurrentSkin.TerminalTextColor; + } + } + } + +} diff --git a/source/WindowsFormsApplication1/Apps/Terminal.resx b/source/WindowsFormsApplication1/Apps/Terminal.resx new file mode 100644 index 0000000..d0442f6 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Terminal.resx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 127, 17 + + + 250, 102 + + + 254, 22 + + + 449, 17 + + + 543, 17 + + + 334, 3 + + + 78 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs b/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs new file mode 100644 index 0000000..3ac11b4 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs @@ -0,0 +1,181 @@ +using System; +using System.Windows.Forms; + +namespace ShiftOS +{ + partial class TextPad + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.txtuserinput = new System.Windows.Forms.TextBox(); + this.pnlbreak = new System.Windows.Forms.Panel(); + this.pnloptions = new System.Windows.Forms.Panel(); + this.btnsave = new System.Windows.Forms.Button(); + this.btnopen = new System.Windows.Forms.Button(); + this.btnnew = new System.Windows.Forms.Button(); + this.tmrcodepointcooldown = new System.Windows.Forms.Timer(this.components); + this.tmrshowearnedcodepoints = new System.Windows.Forms.Timer(this.components); + this.pgcontents.SuspendLayout(); + this.pnloptions.SuspendLayout(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.Controls.Add(this.txtuserinput); + this.pgcontents.Controls.Add(this.pnlbreak); + this.pgcontents.Controls.Add(this.pnloptions); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(530, 330); + this.pgcontents.TabIndex = 20; + // + // txtuserinput + // + this.txtuserinput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtuserinput.BackColor = System.Drawing.Color.White; + this.txtuserinput.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtuserinput.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtuserinput.ForeColor = System.Drawing.Color.Black; + this.txtuserinput.Location = new System.Drawing.Point(4, 2); + this.txtuserinput.Multiline = true; + this.txtuserinput.Name = "txtuserinput"; + this.txtuserinput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.txtuserinput.Size = new System.Drawing.Size(528, 272); + this.txtuserinput.TabIndex = 0; + // + // pnlbreak + // + this.pnlbreak.BackColor = System.Drawing.Color.White; + this.pnlbreak.BackgroundImage = global::ShiftOS.Properties.Resources.uparrow; + this.pnlbreak.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pnlbreak.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlbreak.ForeColor = System.Drawing.Color.Black; + this.pnlbreak.Location = new System.Drawing.Point(0, 277); + this.pnlbreak.Name = "pnlbreak"; + this.pnlbreak.Size = new System.Drawing.Size(530, 15); + this.pnlbreak.TabIndex = 2; + // + // pnloptions + // + this.pnloptions.BackColor = System.Drawing.Color.White; + this.pnloptions.Controls.Add(this.btnsave); + this.pnloptions.Controls.Add(this.btnopen); + this.pnloptions.Controls.Add(this.btnnew); + this.pnloptions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnloptions.Location = new System.Drawing.Point(0, 292); + this.pnloptions.Name = "pnloptions"; + this.pnloptions.Size = new System.Drawing.Size(530, 38); + this.pnloptions.TabIndex = 1; + this.pnloptions.Visible = false; + // + // btnsave + // + this.btnsave.BackColor = System.Drawing.Color.White; + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsave.Image = global::ShiftOS.Properties.Resources.saveicon; + this.btnsave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnsave.Location = new System.Drawing.Point(168, 4); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(76, 31); + this.btnsave.TabIndex = 2; + this.btnsave.Text = "Save"; + this.btnsave.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnsave.UseVisualStyleBackColor = false; + // + // btnopen + // + this.btnopen.BackColor = System.Drawing.Color.White; + this.btnopen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnopen.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnopen.Image = global::ShiftOS.Properties.Resources.openicon; + this.btnopen.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnopen.Location = new System.Drawing.Point(86, 4); + this.btnopen.Name = "btnopen"; + this.btnopen.Size = new System.Drawing.Size(76, 31); + this.btnopen.TabIndex = 1; + this.btnopen.Text = "Open"; + this.btnopen.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnopen.UseVisualStyleBackColor = false; + // + // btnnew + // + this.btnnew.BackColor = System.Drawing.Color.White; + this.btnnew.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnnew.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnnew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnnew.Location = new System.Drawing.Point(4, 4); + this.btnnew.Name = "btnnew"; + this.btnnew.Size = new System.Drawing.Size(76, 31); + this.btnnew.TabIndex = 0; + this.btnnew.Text = "New"; + this.btnnew.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnnew.UseVisualStyleBackColor = false; + // + // tmrcodepointcooldown + // + this.tmrcodepointcooldown.Interval = 10000; + // + // tmrshowearnedcodepoints + // + this.tmrshowearnedcodepoints.Interval = 3000; + // + // TextPad + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(530, 330); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MinimumSize = new System.Drawing.Size(230, 230); + this.Name = "TextPad"; + this.Text = "TextPad"; + this.TopMost = true; + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.pnloptions.ResumeLayout(false); + this.ResumeLayout(false); + this.txtuserinput.TextChanged += new EventHandler(this.txtuserinput_TextChanged); + this.btnsave.Click += new EventHandler(this.btnsave_Click); + this.btnnew.Click += new EventHandler(this.btnnew_Click); + this.btnopen.Click += new EventHandler(this.btnopen_Click); + this.Load += new EventHandler(this.TextPad_Load); + this.tmrcodepointcooldown.Tick += new EventHandler(tmrcodepointcooldown_Tick); + this.tmrshowearnedcodepoints.Tick += new EventHandler(tmrshowearnedcodepoints_Tick); + this.pnlbreak.MouseEnter += new EventHandler(this.pnlbreak_MouseEnter); + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.TextBox txtuserinput; + internal System.Windows.Forms.Panel pnloptions; + internal System.Windows.Forms.Button btnnew; + internal System.Windows.Forms.Button btnsave; + internal System.Windows.Forms.Button btnopen; + internal System.Windows.Forms.Panel pnlbreak; + internal System.Windows.Forms.Timer tmrcodepointcooldown; + internal System.Windows.Forms.Timer tmrshowearnedcodepoints; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/TextPad.cs b/source/WindowsFormsApplication1/Apps/TextPad.cs new file mode 100644 index 0000000..1b49129 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/TextPad.cs @@ -0,0 +1,239 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class TextPad : Form + { + private bool codepointscooldown = false; + private int codepointsearned = 0; + private bool needtosave = false; + + public TextPad() + { + InitializeComponent(); + } + + private void TextPad_Load(object sender, EventArgs e) + { + txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height + pnloptions.Height); + setupoptions(); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbreak_MouseEnter(object sender, EventArgs e) + { + if (pnloptions.Visible == false) + { + pnlbreak.BackgroundImage = Properties.Resources.downarrow; + pnloptions.Show(); + txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height - pnloptions.Height); + } + else { + pnlbreak.BackgroundImage = Properties.Resources.uparrow; + pnloptions.Hide(); + txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height + pnloptions.Height); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnnew_Click(object sender, EventArgs e) + { + if (needtosave == true) + { + API.CreateInfoboxSession("Textpad - Save?", "It appears that your text document currently contains unsaved changes." + Environment.NewLine + Environment.NewLine + "Are you sure you want to start a new document without saving the changes?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetInfoboxResult(); + switch(result) + { + case "Yes": + codepointsearned = 0; + this.txtuserinput.Text = ""; + break; + case "No": + SaveFile(); + break; + } + }; + } + else { + makenewdoc(); + } + } + + private void SaveFile() + { + if (API.Upgrades["trmfiles"] == true) + { + API.CreateFileSkimmerSession(".txt;.trm", File_Skimmer.FileSkimmerMode.Save); + + } + else + { + API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Save); + } + API.FileSkimmerSession.FormClosing += (object se, FormClosingEventArgs ea) => + { + string res = API.GetFSResult(); + if (res != "fail") + { + File.WriteAllText(res, txtuserinput.Text); + } + }; + } + + private void SaveFile(string text) + { + if (API.Upgrades["trmfiles"] == true) + { + API.CreateFileSkimmerSession(".txt;.trm", File_Skimmer.FileSkimmerMode.Save); + + } + else + { + API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Save); + } + API.FileSkimmerSession.FormClosing += (object se, FormClosingEventArgs ea) => + { + string res = API.GetFSResult(); + if (res != "fail") + { + File.WriteAllText(res, text); + } + }; + } + + public void makenewdoc() + { + txtuserinput.Text = ""; + needtosave = false; + codepointsearned = 0; + } + + // ERROR: Handles clauses are not supported in C# + private void btnsave_Click(object sender, EventArgs e) + { + SaveFile(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnopen_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + if (needtosave == true) + { + API.CreateInfoboxSession("Textpad - Save?", "It appears that your text document currently contains unsaved changes." + Environment.NewLine + Environment.NewLine + "Are you sure you want to start a new document without saving the changes?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object se, FormClosingEventArgs ea) => + { + string result = API.GetInfoboxResult(); + switch (result) + { + case "Yes": + codepointsearned = 0; + string res = API.GetFSResult(); + if (res != "fail") + { + string fContents = File.ReadAllText(res); + + txtuserinput.Text = fContents; + } + break; + case "No": + string fcontents = txtuserinput.Text; + SaveFile(fcontents); + string res2 = API.GetFSResult(); + if (res2 != "fail") + { + string fContents = File.ReadAllText(res2); + + txtuserinput.Text = fContents; + } + break; + } + }; + } + else { + string res = API.GetFSResult(); + if (res != "fail") + { + try { + string fContents = File.ReadAllText(res); + + txtuserinput.Text = fContents; + } + catch(Exception ex) + { + txtuserinput.Text = ex.Message; + } + } + } + }; + } + + public void setupoptions() + { + if (API.Upgrades["textpadnew"] == true) + btnnew.Show(); + else + btnnew.Hide(); + if (API.Upgrades["textpadopen"] == true) + btnopen.Show(); + else + btnopen.Hide(); + if (API.Upgrades["textpadsave"] == true) + btnsave.Show(); + else + btnsave.Hide(); + if (API.Upgrades["textpadnew"] == false && API.Upgrades["textpadsave"] == false && API.Upgrades["textpadopen"] == false) + pnlbreak.Hide(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtuserinput_TextChanged(object sender, EventArgs e) + { + needtosave = true; + if (codepointscooldown == true) + { + } + else { + codepointsearned = codepointsearned + 1; + codepointscooldown = true; + tmrcodepointcooldown.Start(); + } + if (Viruses.InfectedWith("keyboardfucker")) + { + var rnd = new Random(); + if (rnd.Next(0, 20) == 10) + { + txtuserinput.Text += Viruses.KeyboardInceptor.Intercept(); + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrcodepointcooldown_Tick(object sender, EventArgs e) + { + codepointscooldown = false; + tmrcodepointcooldown.Stop(); + } + + // ERROR: Handles clauses are not supported in C# + private void tmrshowearnedcodepoints_Tick(object sender, EventArgs e) + { + API.CreateInfoboxSession("TextPad", "You have earned " + codepointsearned.ToString() + " Codepoints from typing up and saving that document!", infobox.InfoboxMode.Info); + API.AddCodepoints(codepointsearned); + tmrshowearnedcodepoints.Stop(); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/TextPad.resx b/source/WindowsFormsApplication1/Apps/TextPad.resx new file mode 100644 index 0000000..6994a67 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/TextPad.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 197, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/WidgetManager.Designer.cs b/source/WindowsFormsApplication1/Apps/WidgetManager.Designer.cs new file mode 100644 index 0000000..4140581 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/WidgetManager.Designer.cs @@ -0,0 +1,252 @@ +namespace ShiftOS +{ + partial class WidgetManager + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btndone = new System.Windows.Forms.Button(); + this.btnadd = new System.Windows.Forms.Button(); + this.cbpanel = new System.Windows.Forms.ComboBox(); + this.txtwidth = new System.Windows.Forms.TextBox(); + this.lbwidth = new System.Windows.Forms.Label(); + this.txtx = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.lbtitle = new System.Windows.Forms.Label(); + this.lvwidgets = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.listView1 = new System.Windows.Forms.ListView(); + this.tmrcheckvalid = new System.Windows.Forms.Timer(this.components); + this.btninstallwidgets = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.pnlbuttons.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.pnlbuttons); + this.panel1.Controls.Add(this.lbtitle); + this.panel1.Controls.Add(this.lvwidgets); + this.panel1.Controls.Add(this.listView1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.ForeColor = System.Drawing.Color.Black; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(697, 459); + this.panel1.TabIndex = 0; + // + // pnlbuttons + // + this.pnlbuttons.BackColor = System.Drawing.Color.Gray; + this.pnlbuttons.Controls.Add(this.btndone); + this.pnlbuttons.Controls.Add(this.btnadd); + this.pnlbuttons.Controls.Add(this.cbpanel); + this.pnlbuttons.Controls.Add(this.txtwidth); + this.pnlbuttons.Controls.Add(this.lbwidth); + this.pnlbuttons.Controls.Add(this.txtx); + this.pnlbuttons.Controls.Add(this.label1); + this.pnlbuttons.Controls.Add(this.btninstallwidgets); + this.pnlbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.pnlbuttons.ForeColor = System.Drawing.Color.White; + this.pnlbuttons.Location = new System.Drawing.Point(0, 429); + this.pnlbuttons.Name = "pnlbuttons"; + this.pnlbuttons.Size = new System.Drawing.Size(697, 30); + this.pnlbuttons.TabIndex = 3; + // + // btndone + // + this.btndone.AutoSize = true; + this.btndone.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndone.Location = new System.Drawing.Point(649, 3); + this.btndone.Name = "btndone"; + this.btndone.Size = new System.Drawing.Size(45, 25); + this.btndone.TabIndex = 0; + this.btndone.Text = "Done"; + this.btndone.UseVisualStyleBackColor = true; + this.btndone.Click += new System.EventHandler(this.btndone_Click); + // + // btnadd + // + this.btnadd.AutoSize = true; + this.btnadd.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnadd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnadd.Location = new System.Drawing.Point(605, 3); + this.btnadd.Name = "btnadd"; + this.btnadd.Size = new System.Drawing.Size(38, 25); + this.btnadd.TabIndex = 2; + this.btnadd.Text = "Add"; + this.btnadd.UseVisualStyleBackColor = true; + this.btnadd.Click += new System.EventHandler(this.btnadd_Click); + // + // cbpanel + // + this.cbpanel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbpanel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbpanel.FormattingEnabled = true; + this.cbpanel.Location = new System.Drawing.Point(478, 3); + this.cbpanel.Name = "cbpanel"; + this.cbpanel.Size = new System.Drawing.Size(121, 21); + this.cbpanel.TabIndex = 1; + // + // txtwidth + // + this.txtwidth.Location = new System.Drawing.Point(443, 3); + this.txtwidth.Name = "txtwidth"; + this.txtwidth.Size = new System.Drawing.Size(29, 20); + this.txtwidth.TabIndex = 3; + // + // lbwidth + // + this.lbwidth.Location = new System.Drawing.Point(393, 0); + this.lbwidth.Name = "lbwidth"; + this.lbwidth.Size = new System.Drawing.Size(44, 28); + this.lbwidth.TabIndex = 5; + this.lbwidth.Text = "Width:"; + this.lbwidth.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // txtx + // + this.txtx.Location = new System.Drawing.Point(355, 3); + this.txtx.Name = "txtx"; + this.txtx.Size = new System.Drawing.Size(32, 20); + this.txtx.TabIndex = 4; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(246, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(103, 28); + this.label1.TabIndex = 6; + this.label1.Text = "Horizontal Location:"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lbtitle + // + this.lbtitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.lbtitle.Location = new System.Drawing.Point(12, 9); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Size = new System.Drawing.Size(673, 32); + this.lbtitle.TabIndex = 2; + this.lbtitle.Text = "Desktop Panel Widgets"; + this.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lvwidgets + // + this.lvwidgets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lvwidgets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.lvwidgets.FullRowSelect = true; + this.lvwidgets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvwidgets.Location = new System.Drawing.Point(12, 44); + this.lvwidgets.Name = "lvwidgets"; + this.lvwidgets.Size = new System.Drawing.Size(673, 381); + this.lvwidgets.TabIndex = 1; + this.lvwidgets.UseCompatibleStateImageBehavior = false; + this.lvwidgets.View = System.Windows.Forms.View.Details; + this.lvwidgets.SelectedIndexChanged += new System.EventHandler(this.lvwidgets_SelectedIndexChanged); + // + // columnHeader1 + // + this.columnHeader1.Text = "Name"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Description"; + // + // listView1 + // + this.listView1.Location = new System.Drawing.Point(212, 76); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(121, 97); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + // + // tmrcheckvalid + // + this.tmrcheckvalid.Enabled = true; + this.tmrcheckvalid.Tick += new System.EventHandler(this.tmrcheckvalid_Tick); + // + // btninstallwidgets + // + this.btninstallwidgets.AutoSize = true; + this.btninstallwidgets.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btninstallwidgets.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btninstallwidgets.Location = new System.Drawing.Point(152, 3); + this.btninstallwidgets.Name = "btninstallwidgets"; + this.btninstallwidgets.Size = new System.Drawing.Size(88, 25); + this.btninstallwidgets.TabIndex = 7; + this.btninstallwidgets.Text = "Install Widgets"; + this.btninstallwidgets.UseVisualStyleBackColor = true; + this.btninstallwidgets.Click += new System.EventHandler(this.btninstallwidgets_Click); + // + // WidgetManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(697, 459); + this.Controls.Add(this.panel1); + this.Name = "WidgetManager"; + this.Text = "WidgetManager"; + this.Load += new System.EventHandler(this.WidgetManager_Load); + this.panel1.ResumeLayout(false); + this.pnlbuttons.ResumeLayout(false); + this.pnlbuttons.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.FlowLayoutPanel pnlbuttons; + private System.Windows.Forms.Button btndone; + private System.Windows.Forms.Button btnadd; + private System.Windows.Forms.ComboBox cbpanel; + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.ListView lvwidgets; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.TextBox txtwidth; + private System.Windows.Forms.Label lbwidth; + private System.Windows.Forms.TextBox txtx; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Timer tmrcheckvalid; + private System.Windows.Forms.Button btninstallwidgets; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/WidgetManager.cs b/source/WindowsFormsApplication1/Apps/WidgetManager.cs new file mode 100644 index 0000000..2a3954f --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/WidgetManager.cs @@ -0,0 +1,174 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class WidgetManager : Form + { + public WidgetManager() + { + InitializeComponent(); + } + + private void WidgetManager_Load(object sender, EventArgs e) + { + SetupList(); + } + + public void SetupList() + { + lvwidgets.Items.Clear(); + foreach(ColumnHeader c in lvwidgets.Columns) + { + c.Width = lvwidgets.Width / 2; + } + if(!Directory.Exists(Paths.WidgetFiles)) + { + Directory.CreateDirectory(Paths.WidgetFiles); + } + foreach(var f in Directory.GetFiles(Paths.WidgetFiles)) + { + var finf = new FileInfo(f); + if(finf.Extension == ".json") + { + var json = File.ReadAllText(finf.FullName); + var widget = JsonConvert.DeserializeObject(json); + var lv = new ListViewItem(); + lv.Text = widget.Name; + lv.Tag = widget; + lvwidgets.Items.Add(lv); + lv.SubItems.Add(widget.Description); + } + } + } + + private DesktopWidgetModel SelectedFutureWidget = null; + + private void lvwidgets_SelectedIndexChanged(object sender, EventArgs e) + { + SelectedFutureWidget = (DesktopWidgetModel)lvwidgets.SelectedItems[0].Tag; + cbpanel.Items.Clear(); + foreach(var p in API.CurrentSkin.DesktopPanels) + { + cbpanel.Items.Add(p.Position); + } + cbpanel.Text = (string)cbpanel.Items[0]; + } + + private void btndone_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void btnadd_Click(object sender, EventArgs e) + { + try { + if (cbpanel.Text != null) + { + var w = new Skinning.DesktopWidget(); + w.Name = SelectedFutureWidget.Name; + w.Panel = cbpanel.Text; + w.XLocation = Convert.ToInt32(txtx.Text); + w.Width = Convert.ToInt32(txtwidth.Text); + w.Lua = SelectedFutureWidget.Lua; + w.Type = SelectedFutureWidget.Type; + API.CurrentSkin.Widgets.Add(w); + GC.Collect(); + API.CurrentSession.SetupWidgets(); + Skinning.Utilities.saveskin(); + } + else + { + API.CreateInfoboxSession("Please select a location.", "Please select a desktop panel for the new widget!", infobox.InfoboxMode.Info); + } + } + catch + { + API.CreateInfoboxSession("Missing information", "Not enough valid info was given for the new widget. Remember, the width and location must be valid integers and the position must be either \"Top\" or \"Bottom\".", infobox.InfoboxMode.Info); + } + GC.Collect(); + } + + private void tmrcheckvalid_Tick(object sender, EventArgs e) + { + if(SelectedFutureWidget != null) + { + btnadd.Show(); + lbwidth.Show(); + txtwidth.Show(); + cbpanel.Show(); + label1.Show(); + txtx.Show(); + } + else + { + btnadd.Hide(); + lbwidth.Hide(); + txtwidth.Hide(); + cbpanel.Hide(); + label1.Hide(); + txtx.Hide(); + } + } + + private void btninstallwidgets_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".wgt", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + try + { + if(!Directory.Exists(Paths.WidgetFiles)) + { + Directory.CreateDirectory(Paths.WidgetFiles); + } + if(Directory.Exists(Paths.Mod_Temp + "_newwidget")) + { + Directory.Delete(Paths.Mod_Temp + "_newwidget", true); + } + ZipFile.ExtractToDirectory(res, Paths.Mod_Temp + "_newwidget"); + foreach(var f in Directory.GetFiles(Paths.Mod_Temp + "_newwidget")) + { + var finf = new FileInfo(f); + File.Copy(f, res + OSInfo.DirectorySeparator + finf.Name, true); + } + SetupList(); + } + catch + { + API.CreateInfoboxSession("Invalid widget pack.", "The widget pack you selected is not a valid widget pack.", infobox.InfoboxMode.Info); + } + } + }; + } + } + + public class DesktopWidgetModel + { + public string Name { get; set; } + public string Description { get; set; } + public WidgetType Type { get; set; } + public string Lua { get; set; } + } + + public enum WidgetType + { + Icon, + Menu, + DisplayText, + FreePanel + } +} diff --git a/source/WindowsFormsApplication1/Apps/WidgetManager.resx b/source/WindowsFormsApplication1/Apps/WidgetManager.resx new file mode 100644 index 0000000..27fa601 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/WidgetManager.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Appscape.Designer.cs b/source/WindowsFormsApplication1/Appscape.Designer.cs deleted file mode 100644 index e8ef295..0000000 --- a/source/WindowsFormsApplication1/Appscape.Designer.cs +++ /dev/null @@ -1,862 +0,0 @@ -namespace ShiftOS -{ - partial class Appscape - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Appscape)); - this.panel3 = new System.Windows.Forms.Panel(); - this.pnlchoosenetwork = new System.Windows.Forms.Panel(); - this.btnrequest = new System.Windows.Forms.Button(); - this.label14 = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); - this.lvnets = new System.Windows.Forms.ListView(); - this.clhostnameheader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.pnlpackageeditor = new System.Windows.Forms.Panel(); - this.label12 = new System.Windows.Forms.Label(); - this.btndonecustomizing = new System.Windows.Forms.Button(); - this.btnsaa = new System.Windows.Forms.Button(); - this.txtprice = new System.Windows.Forms.TextBox(); - this.lbprice = new System.Windows.Forms.Label(); - this.lbaddress = new System.Windows.Forms.Label(); - this.cbsell = new System.Windows.Forms.CheckBox(); - this.txtpackagedescription = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.txtpackagename = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.pnllounge = new System.Windows.Forms.Panel(); - this.btnedit = new System.Windows.Forms.Button(); - this.btnupload = new System.Windows.Forms.Button(); - this.btnsave = new System.Windows.Forms.Button(); - this.txtbitnoteaddress = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.txtbio = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.txtmoddername = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.lbmybio = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.lbmyname = new System.Windows.Forms.Label(); - this.lvmypackages = new System.Windows.Forms.ListView(); - this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.pnlpackageinfo = new System.Windows.Forms.Panel(); - this.pnlauthordetails = new System.Windows.Forms.Panel(); - this.lbauthordescription = new System.Windows.Forms.Label(); - this.lbauthorname = new System.Windows.Forms.Label(); - this.pbappicon = new System.Windows.Forms.PictureBox(); - this.pbappscreenshot = new System.Windows.Forms.PictureBox(); - this.pnldownload = new System.Windows.Forms.Panel(); - this.lbdownloadpath = new System.Windows.Forms.Label(); - this.btndownload = new System.Windows.Forms.Button(); - this.lbpkgdescription = new System.Windows.Forms.Label(); - this.lbpkgname = new System.Windows.Forms.Label(); - this.pnllist = new System.Windows.Forms.Panel(); - this.lvpackages = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.pnlsearch = new System.Windows.Forms.Panel(); - this.btnlounge = new System.Windows.Forms.Button(); - this.label2 = new System.Windows.Forms.Label(); - this.btngetkey = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.txtsearch = new System.Windows.Forms.TextBox(); - this.btnskins = new System.Windows.Forms.Button(); - this.btnapps = new System.Windows.Forms.Button(); - this.imgpackageicons = new System.Windows.Forms.ImageList(this.components); - this.panel3.SuspendLayout(); - this.pnlchoosenetwork.SuspendLayout(); - this.pnlpackageeditor.SuspendLayout(); - this.pnllounge.SuspendLayout(); - this.pnlpackageinfo.SuspendLayout(); - this.pnlauthordetails.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbappicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbappscreenshot)).BeginInit(); - this.pnldownload.SuspendLayout(); - this.pnllist.SuspendLayout(); - this.pnlsearch.SuspendLayout(); - this.SuspendLayout(); - // - // panel3 - // - this.panel3.Controls.Add(this.pnlchoosenetwork); - this.panel3.Controls.Add(this.pnlpackageeditor); - this.panel3.Controls.Add(this.pnllounge); - this.panel3.Controls.Add(this.pnlpackageinfo); - this.panel3.Controls.Add(this.pnllist); - this.panel3.Controls.Add(this.pnlsearch); - this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel3.Location = new System.Drawing.Point(0, 0); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(886, 469); - this.panel3.TabIndex = 3; - // - // pnlchoosenetwork - // - this.pnlchoosenetwork.Controls.Add(this.lvnets); - this.pnlchoosenetwork.Controls.Add(this.btnrequest); - this.pnlchoosenetwork.Controls.Add(this.label14); - this.pnlchoosenetwork.Controls.Add(this.label13); - this.pnlchoosenetwork.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlchoosenetwork.Location = new System.Drawing.Point(0, 47); - this.pnlchoosenetwork.Name = "pnlchoosenetwork"; - this.pnlchoosenetwork.Size = new System.Drawing.Size(886, 422); - this.pnlchoosenetwork.TabIndex = 16; - // - // btnrequest - // - this.btnrequest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnrequest.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnrequest.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnrequest.Location = new System.Drawing.Point(799, 385); - this.btnrequest.Name = "btnrequest"; - this.btnrequest.Size = new System.Drawing.Size(75, 23); - this.btnrequest.TabIndex = 7; - this.btnrequest.Text = "Request Key"; - this.btnrequest.UseVisualStyleBackColor = true; - this.btnrequest.Click += new System.EventHandler(this.btnrequest_Click); - // - // label14 - // - this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label14.Location = new System.Drawing.Point(17, 31); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(857, 30); - this.label14.TabIndex = 6; - this.label14.Text = resources.GetString("label14.Text"); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Times New Roman", 13F); - this.label13.Location = new System.Drawing.Point(16, 7); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(157, 20); - this.label13.TabIndex = 5; - this.label13.Text = "Choose a repository."; - // - // lvnets - // - this.lvnets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lvnets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.clhostnameheader}); - this.lvnets.FullRowSelect = true; - this.lvnets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.lvnets.Location = new System.Drawing.Point(12, 64); - this.lvnets.Name = "lvnets"; - this.lvnets.Size = new System.Drawing.Size(868, 307); - this.lvnets.TabIndex = 0; - this.lvnets.UseCompatibleStateImageBehavior = false; - this.lvnets.View = System.Windows.Forms.View.Details; - // - // clhostnameheader - // - this.clhostnameheader.Text = "Hostname"; - // - // pnlpackageeditor - // - this.pnlpackageeditor.Controls.Add(this.label12); - this.pnlpackageeditor.Controls.Add(this.btndonecustomizing); - this.pnlpackageeditor.Controls.Add(this.btnsaa); - this.pnlpackageeditor.Controls.Add(this.txtprice); - this.pnlpackageeditor.Controls.Add(this.lbprice); - this.pnlpackageeditor.Controls.Add(this.lbaddress); - this.pnlpackageeditor.Controls.Add(this.cbsell); - this.pnlpackageeditor.Controls.Add(this.txtpackagedescription); - this.pnlpackageeditor.Controls.Add(this.label10); - this.pnlpackageeditor.Controls.Add(this.txtpackagename); - this.pnlpackageeditor.Controls.Add(this.label11); - this.pnlpackageeditor.Controls.Add(this.label9); - this.pnlpackageeditor.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlpackageeditor.Location = new System.Drawing.Point(0, 47); - this.pnlpackageeditor.Name = "pnlpackageeditor"; - this.pnlpackageeditor.Size = new System.Drawing.Size(886, 422); - this.pnlpackageeditor.TabIndex = 15; - // - // label12 - // - this.label12.Location = new System.Drawing.Point(96, 349); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(275, 22); - this.label12.TabIndex = 19; - this.label12.Text = "This allows you to release a patch for your application."; - this.label12.Visible = false; - // - // btndonecustomizing - // - this.btndonecustomizing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btndonecustomizing.AutoSize = true; - this.btndonecustomizing.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btndonecustomizing.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndonecustomizing.Font = new System.Drawing.Font("Times New Roman", 10F); - this.btndonecustomizing.Location = new System.Drawing.Point(824, 385); - this.btndonecustomizing.Name = "btndonecustomizing"; - this.btndonecustomizing.Size = new System.Drawing.Size(50, 28); - this.btndonecustomizing.TabIndex = 18; - this.btndonecustomizing.Text = "Done"; - this.btndonecustomizing.UseVisualStyleBackColor = true; - this.btndonecustomizing.Click += new System.EventHandler(this.btndonecustomizing_Click); - // - // btnsaa - // - this.btnsaa.AutoSize = true; - this.btnsaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnsaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsaa.Font = new System.Drawing.Font("Times New Roman", 10F); - this.btnsaa.Location = new System.Drawing.Point(99, 318); - this.btnsaa.Name = "btnsaa"; - this.btnsaa.Size = new System.Drawing.Size(123, 28); - this.btnsaa.TabIndex = 17; - this.btnsaa.Text = "Release New SAA"; - this.btnsaa.UseVisualStyleBackColor = true; - this.btnsaa.Click += new System.EventHandler(this.btnsaa_Click); - // - // txtprice - // - this.txtprice.Location = new System.Drawing.Point(541, 267); - this.txtprice.Name = "txtprice"; - this.txtprice.Size = new System.Drawing.Size(89, 20); - this.txtprice.TabIndex = 16; - this.txtprice.Visible = false; - // - // lbprice - // - this.lbprice.AutoSize = true; - this.lbprice.Location = new System.Drawing.Point(504, 270); - this.lbprice.Name = "lbprice"; - this.lbprice.Size = new System.Drawing.Size(34, 13); - this.lbprice.TabIndex = 15; - this.lbprice.Text = "Price:"; - this.lbprice.Visible = false; - // - // lbaddress - // - this.lbaddress.Location = new System.Drawing.Point(210, 270); - this.lbaddress.Name = "lbaddress"; - this.lbaddress.Size = new System.Drawing.Size(275, 45); - this.lbaddress.TabIndex = 14; - this.lbaddress.Text = "All profit made from this package will be sent to the Bitnote Address defined in " + - "your Dev Lounge; if it is non-existent, Bitnotes simply won\'t arrive."; - this.lbaddress.Visible = false; - // - // cbsell - // - this.cbsell.Appearance = System.Windows.Forms.Appearance.Button; - this.cbsell.AutoSize = true; - this.cbsell.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cbsell.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.cbsell.Location = new System.Drawing.Point(97, 263); - this.cbsell.Name = "cbsell"; - this.cbsell.Size = new System.Drawing.Size(92, 24); - this.cbsell.TabIndex = 13; - this.cbsell.Text = "Sell for Bitnotes"; - this.cbsell.UseVisualStyleBackColor = true; - this.cbsell.CheckedChanged += new System.EventHandler(this.cbsell_CheckedChanged); - // - // txtpackagedescription - // - this.txtpackagedescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtpackagedescription.Location = new System.Drawing.Point(99, 72); - this.txtpackagedescription.Multiline = true; - this.txtpackagedescription.Name = "txtpackagedescription"; - this.txtpackagedescription.Size = new System.Drawing.Size(591, 189); - this.txtpackagedescription.TabIndex = 12; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(12, 75); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(60, 13); - this.label10.TabIndex = 11; - this.label10.Text = "Description"; - // - // txtpackagename - // - this.txtpackagename.Location = new System.Drawing.Point(99, 43); - this.txtpackagename.Name = "txtpackagename"; - this.txtpackagename.Size = new System.Drawing.Size(258, 20); - this.txtpackagename.TabIndex = 10; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(12, 46); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(81, 13); - this.label11.TabIndex = 9; - this.label11.Text = "Package Name"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Times New Roman", 13F); - this.label9.Location = new System.Drawing.Point(12, 17); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(118, 20); - this.label9.TabIndex = 0; - this.label9.Text = "Package Editor"; - // - // pnllounge - // - this.pnllounge.Controls.Add(this.btnedit); - this.pnllounge.Controls.Add(this.btnupload); - this.pnllounge.Controls.Add(this.btnsave); - this.pnllounge.Controls.Add(this.txtbitnoteaddress); - this.pnllounge.Controls.Add(this.label8); - this.pnllounge.Controls.Add(this.txtbio); - this.pnllounge.Controls.Add(this.label7); - this.pnllounge.Controls.Add(this.txtmoddername); - this.pnllounge.Controls.Add(this.label6); - this.pnllounge.Controls.Add(this.label5); - this.pnllounge.Controls.Add(this.label4); - this.pnllounge.Controls.Add(this.lbmybio); - this.pnllounge.Controls.Add(this.label3); - this.pnllounge.Controls.Add(this.lbmyname); - this.pnllounge.Controls.Add(this.lvmypackages); - this.pnllounge.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnllounge.Location = new System.Drawing.Point(0, 47); - this.pnllounge.Name = "pnllounge"; - this.pnllounge.Size = new System.Drawing.Size(886, 422); - this.pnllounge.TabIndex = 1; - // - // btnedit - // - this.btnedit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnedit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnedit.Location = new System.Drawing.Point(239, 377); - this.btnedit.Name = "btnedit"; - this.btnedit.Size = new System.Drawing.Size(75, 23); - this.btnedit.TabIndex = 14; - this.btnedit.Text = "Edit"; - this.btnedit.UseVisualStyleBackColor = true; - this.btnedit.Click += new System.EventHandler(this.btnedit_Click); - // - // btnupload - // - this.btnupload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnupload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnupload.Location = new System.Drawing.Point(320, 377); - this.btnupload.Name = "btnupload"; - this.btnupload.Size = new System.Drawing.Size(75, 23); - this.btnupload.TabIndex = 13; - this.btnupload.Text = "Add"; - this.btnupload.UseVisualStyleBackColor = true; - this.btnupload.Click += new System.EventHandler(this.btnupload_Click); - // - // btnsave - // - this.btnsave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsave.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnsave.Location = new System.Drawing.Point(799, 390); - this.btnsave.Name = "btnsave"; - this.btnsave.Size = new System.Drawing.Size(75, 23); - this.btnsave.TabIndex = 12; - this.btnsave.Text = "Save"; - this.btnsave.UseVisualStyleBackColor = true; - this.btnsave.Click += new System.EventHandler(this.btnsave_Click); - // - // txtbitnoteaddress - // - this.txtbitnoteaddress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txtbitnoteaddress.Location = new System.Drawing.Point(490, 333); - this.txtbitnoteaddress.Name = "txtbitnoteaddress"; - this.txtbitnoteaddress.Size = new System.Drawing.Size(384, 20); - this.txtbitnoteaddress.TabIndex = 11; - this.txtbitnoteaddress.TextChanged += new System.EventHandler(this.txtbitnoteaddress_TextChanged); - // - // label8 - // - this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(407, 339); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(73, 13); - this.label8.TabIndex = 10; - this.label8.Text = "BTN Address:"; - // - // txtbio - // - this.txtbio.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txtbio.Location = new System.Drawing.Point(490, 110); - this.txtbio.Multiline = true; - this.txtbio.Name = "txtbio"; - this.txtbio.Size = new System.Drawing.Size(384, 217); - this.txtbio.TabIndex = 9; - this.txtbio.TextChanged += new System.EventHandler(this.txtbio_TextChanged); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(407, 116); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(22, 13); - this.label7.TabIndex = 8; - this.label7.Text = "Bio"; - // - // txtmoddername - // - this.txtmoddername.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txtmoddername.Location = new System.Drawing.Point(490, 84); - this.txtmoddername.Name = "txtmoddername"; - this.txtmoddername.Size = new System.Drawing.Size(384, 20); - this.txtmoddername.TabIndex = 7; - this.txtmoddername.TextChanged += new System.EventHandler(this.txtmoddername_TextChanged); - // - // label6 - // - this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(407, 90); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(77, 13); - this.label6.TabIndex = 6; - this.label6.Text = "Modder Name:"; - // - // label5 - // - this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label5.Location = new System.Drawing.Point(404, 31); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(378, 32); - this.label5.TabIndex = 5; - this.label5.Text = "This screen allows you to customize your profile, add a biography, modder name an" + - "d Bitnote Address for your profile."; - // - // label4 - // - this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Times New Roman", 13F); - this.label4.Location = new System.Drawing.Point(403, 11); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(112, 20); - this.label4.TabIndex = 4; - this.label4.Text = "Customization"; - // - // lbmybio - // - this.lbmybio.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.lbmybio.Location = new System.Drawing.Point(17, 46); - this.lbmybio.Name = "lbmybio"; - this.lbmybio.Size = new System.Drawing.Size(378, 110); - this.lbmybio.TabIndex = 3; - this.lbmybio.Text = "label4"; - // - // label3 - // - this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(17, 156); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(208, 13); - this.label3.TabIndex = 2; - this.label3.Text = "This is a list of all packages owned by you."; - // - // lbmyname - // - this.lbmyname.AutoSize = true; - this.lbmyname.Font = new System.Drawing.Font("Times New Roman", 13F); - this.lbmyname.Location = new System.Drawing.Point(13, 11); - this.lbmyname.Name = "lbmyname"; - this.lbmyname.Size = new System.Drawing.Size(51, 20); - this.lbmyname.TabIndex = 1; - this.lbmyname.Text = "label3"; - // - // lvmypackages - // - this.lvmypackages.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lvmypackages.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader4}); - this.lvmypackages.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.lvmypackages.Location = new System.Drawing.Point(20, 172); - this.lvmypackages.Name = "lvmypackages"; - this.lvmypackages.Size = new System.Drawing.Size(375, 199); - this.lvmypackages.TabIndex = 0; - this.lvmypackages.UseCompatibleStateImageBehavior = false; - this.lvmypackages.View = System.Windows.Forms.View.Details; - // - // columnHeader4 - // - this.columnHeader4.Text = "Name"; - // - // pnlpackageinfo - // - this.pnlpackageinfo.Controls.Add(this.pnlauthordetails); - this.pnlpackageinfo.Controls.Add(this.pbappicon); - this.pnlpackageinfo.Controls.Add(this.pbappscreenshot); - this.pnlpackageinfo.Controls.Add(this.pnldownload); - this.pnlpackageinfo.Controls.Add(this.lbpkgdescription); - this.pnlpackageinfo.Controls.Add(this.lbpkgname); - this.pnlpackageinfo.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlpackageinfo.Location = new System.Drawing.Point(0, 47); - this.pnlpackageinfo.Name = "pnlpackageinfo"; - this.pnlpackageinfo.Size = new System.Drawing.Size(886, 422); - this.pnlpackageinfo.TabIndex = 1; - // - // pnlauthordetails - // - this.pnlauthordetails.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.pnlauthordetails.Controls.Add(this.lbauthordescription); - this.pnlauthordetails.Controls.Add(this.lbauthorname); - this.pnlauthordetails.Location = new System.Drawing.Point(12, 213); - this.pnlauthordetails.Name = "pnlauthordetails"; - this.pnlauthordetails.Size = new System.Drawing.Size(468, 197); - this.pnlauthordetails.TabIndex = 5; - // - // lbauthordescription - // - this.lbauthordescription.Location = new System.Drawing.Point(13, 46); - this.lbauthordescription.Name = "lbauthordescription"; - this.lbauthordescription.Size = new System.Drawing.Size(452, 141); - this.lbauthordescription.TabIndex = 5; - this.lbauthordescription.Text = "label4"; - // - // lbauthorname - // - this.lbauthorname.AutoSize = true; - this.lbauthorname.Font = new System.Drawing.Font("Times New Roman", 13F); - this.lbauthorname.Location = new System.Drawing.Point(9, 11); - this.lbauthorname.Name = "lbauthorname"; - this.lbauthorname.Size = new System.Drawing.Size(51, 20); - this.lbauthorname.TabIndex = 4; - this.lbauthorname.Text = "label3"; - // - // pbappicon - // - this.pbappicon.Location = new System.Drawing.Point(12, 11); - this.pbappicon.Name = "pbappicon"; - this.pbappicon.Size = new System.Drawing.Size(32, 32); - this.pbappicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbappicon.TabIndex = 4; - this.pbappicon.TabStop = false; - // - // pbappscreenshot - // - this.pbappscreenshot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pbappscreenshot.Location = new System.Drawing.Point(500, 213); - this.pbappscreenshot.Name = "pbappscreenshot"; - this.pbappscreenshot.Size = new System.Drawing.Size(374, 197); - this.pbappscreenshot.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbappscreenshot.TabIndex = 3; - this.pbappscreenshot.TabStop = false; - // - // pnldownload - // - this.pnldownload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.pnldownload.Controls.Add(this.lbdownloadpath); - this.pnldownload.Controls.Add(this.btndownload); - this.pnldownload.Location = new System.Drawing.Point(646, 7); - this.pnldownload.Name = "pnldownload"; - this.pnldownload.Size = new System.Drawing.Size(237, 97); - this.pnldownload.TabIndex = 2; - // - // lbdownloadpath - // - this.lbdownloadpath.Location = new System.Drawing.Point(4, 57); - this.lbdownloadpath.Name = "lbdownloadpath"; - this.lbdownloadpath.Size = new System.Drawing.Size(224, 31); - this.lbdownloadpath.TabIndex = 1; - this.lbdownloadpath.Text = "label1"; - this.lbdownloadpath.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // btndownload - // - this.btndownload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndownload.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btndownload.Location = new System.Drawing.Point(112, 13); - this.btndownload.Name = "btndownload"; - this.btndownload.Size = new System.Drawing.Size(116, 39); - this.btndownload.TabIndex = 0; - this.btndownload.Text = "Download This Package"; - this.btndownload.UseVisualStyleBackColor = true; - this.btndownload.Click += new System.EventHandler(this.btndownload_Click); - // - // lbpkgdescription - // - this.lbpkgdescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.lbpkgdescription.Location = new System.Drawing.Point(17, 47); - this.lbpkgdescription.Name = "lbpkgdescription"; - this.lbpkgdescription.Size = new System.Drawing.Size(347, 156); - this.lbpkgdescription.TabIndex = 1; - this.lbpkgdescription.Text = "label1"; - // - // lbpkgname - // - this.lbpkgname.AutoSize = true; - this.lbpkgname.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F); - this.lbpkgname.Location = new System.Drawing.Point(50, 19); - this.lbpkgname.Name = "lbpkgname"; - this.lbpkgname.Size = new System.Drawing.Size(60, 24); - this.lbpkgname.TabIndex = 0; - this.lbpkgname.Text = "label1"; - // - // pnllist - // - this.pnllist.Controls.Add(this.lvpackages); - this.pnllist.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnllist.Location = new System.Drawing.Point(0, 47); - this.pnllist.Name = "pnllist"; - this.pnllist.Size = new System.Drawing.Size(886, 422); - this.pnllist.TabIndex = 3; - // - // lvpackages - // - this.lvpackages.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2, - this.columnHeader3}); - this.lvpackages.Dock = System.Windows.Forms.DockStyle.Fill; - this.lvpackages.FullRowSelect = true; - this.lvpackages.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.lvpackages.Location = new System.Drawing.Point(0, 0); - this.lvpackages.Name = "lvpackages"; - this.lvpackages.Size = new System.Drawing.Size(886, 422); - this.lvpackages.TabIndex = 0; - this.lvpackages.UseCompatibleStateImageBehavior = false; - this.lvpackages.View = System.Windows.Forms.View.Details; - this.lvpackages.SelectedIndexChanged += new System.EventHandler(this.lvpackages_SelectedIndexChanged); - this.lvpackages.DoubleClick += new System.EventHandler(this.lvpackages_DoubleClick); - // - // columnHeader1 - // - this.columnHeader1.Text = "Name"; - // - // columnHeader2 - // - this.columnHeader2.Text = "Author"; - // - // columnHeader3 - // - this.columnHeader3.Text = "Cost (BTN)"; - // - // pnlsearch - // - this.pnlsearch.BackColor = System.Drawing.Color.Gray; - this.pnlsearch.Controls.Add(this.btnlounge); - this.pnlsearch.Controls.Add(this.label2); - this.pnlsearch.Controls.Add(this.btngetkey); - this.pnlsearch.Controls.Add(this.label1); - this.pnlsearch.Controls.Add(this.txtsearch); - this.pnlsearch.Controls.Add(this.btnskins); - this.pnlsearch.Controls.Add(this.btnapps); - this.pnlsearch.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlsearch.ForeColor = System.Drawing.Color.White; - this.pnlsearch.Location = new System.Drawing.Point(0, 0); - this.pnlsearch.Name = "pnlsearch"; - this.pnlsearch.Size = new System.Drawing.Size(886, 47); - this.pnlsearch.TabIndex = 0; - // - // btnlounge - // - this.btnlounge.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnlounge.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnlounge.Location = new System.Drawing.Point(377, 14); - this.btnlounge.Name = "btnlounge"; - this.btnlounge.Size = new System.Drawing.Size(114, 23); - this.btnlounge.TabIndex = 6; - this.btnlounge.Text = "Access My Lounge"; - this.btnlounge.UseVisualStyleBackColor = true; - this.btnlounge.Click += new System.EventHandler(this.btnlounge_Click); - // - // label2 - // - this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(643, 16); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(71, 13); - this.label2.TabIndex = 5; - this.label2.Text = "Search (slow)"; - // - // btngetkey - // - this.btngetkey.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btngetkey.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btngetkey.Location = new System.Drawing.Point(296, 14); - this.btngetkey.Name = "btngetkey"; - this.btngetkey.Size = new System.Drawing.Size(75, 23); - this.btngetkey.TabIndex = 4; - this.btngetkey.Text = "Get one!"; - this.btngetkey.UseVisualStyleBackColor = true; - this.btngetkey.Click += new System.EventHandler(this.btngetkey_Click); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(169, 19); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(121, 13); - this.label1.TabIndex = 3; - this.label1.Text = "Need a Developer Key?"; - // - // txtsearch - // - this.txtsearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txtsearch.Location = new System.Drawing.Point(721, 13); - this.txtsearch.Name = "txtsearch"; - this.txtsearch.Size = new System.Drawing.Size(153, 20); - this.txtsearch.TabIndex = 2; - this.txtsearch.TextChanged += new System.EventHandler(this.txtsearch_TextChanged); - // - // btnskins - // - this.btnskins.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnskins.Font = new System.Drawing.Font("Times New Roman", 10F); - this.btnskins.Location = new System.Drawing.Point(86, 4); - this.btnskins.Name = "btnskins"; - this.btnskins.Size = new System.Drawing.Size(76, 40); - this.btnskins.TabIndex = 1; - this.btnskins.Text = "Skins"; - this.btnskins.UseVisualStyleBackColor = true; - this.btnskins.Click += new System.EventHandler(this.btnskins_Click); - // - // btnapps - // - this.btnapps.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnapps.Font = new System.Drawing.Font("Times New Roman", 10F); - this.btnapps.Location = new System.Drawing.Point(4, 4); - this.btnapps.Name = "btnapps"; - this.btnapps.Size = new System.Drawing.Size(76, 40); - this.btnapps.TabIndex = 0; - this.btnapps.Text = "Apps"; - this.btnapps.UseVisualStyleBackColor = true; - this.btnapps.Click += new System.EventHandler(this.btnapps_Click); - // - // imgpackageicons - // - this.imgpackageicons.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; - this.imgpackageicons.ImageSize = new System.Drawing.Size(16, 16); - this.imgpackageicons.TransparentColor = System.Drawing.Color.Transparent; - // - // Appscape - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.Control; - this.ClientSize = new System.Drawing.Size(886, 469); - this.Controls.Add(this.panel3); - this.Name = "Appscape"; - this.Text = "Form1"; - this.Load += new System.EventHandler(this.Form1_Load); - this.panel3.ResumeLayout(false); - this.pnlchoosenetwork.ResumeLayout(false); - this.pnlchoosenetwork.PerformLayout(); - this.pnlpackageeditor.ResumeLayout(false); - this.pnlpackageeditor.PerformLayout(); - this.pnllounge.ResumeLayout(false); - this.pnllounge.PerformLayout(); - this.pnlpackageinfo.ResumeLayout(false); - this.pnlpackageinfo.PerformLayout(); - this.pnlauthordetails.ResumeLayout(false); - this.pnlauthordetails.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbappicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbappscreenshot)).EndInit(); - this.pnldownload.ResumeLayout(false); - this.pnllist.ResumeLayout(false); - this.pnlsearch.ResumeLayout(false); - this.pnlsearch.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.ImageList imgpackageicons; - private System.Windows.Forms.Panel pnlsearch; - private System.Windows.Forms.Button btnskins; - private System.Windows.Forms.Button btnapps; - private System.Windows.Forms.Panel pnlpackageinfo; - private System.Windows.Forms.Label lbpkgname; - private System.Windows.Forms.Label lbpkgdescription; - private System.Windows.Forms.Panel pnldownload; - private System.Windows.Forms.Label lbdownloadpath; - private System.Windows.Forms.Button btndownload; - private System.Windows.Forms.Panel pnllist; - private System.Windows.Forms.ListView lvpackages; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; - private System.Windows.Forms.ColumnHeader columnHeader3; - private System.Windows.Forms.PictureBox pbappscreenshot; - private System.Windows.Forms.PictureBox pbappicon; - private System.Windows.Forms.TextBox txtsearch; - private System.Windows.Forms.Button btnlounge; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button btngetkey; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Panel pnllounge; - private System.Windows.Forms.ListView lvmypackages; - private System.Windows.Forms.ColumnHeader columnHeader4; - private System.Windows.Forms.Label lbmyname; - private System.Windows.Forms.Label lbmybio; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox txtbitnoteaddress; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.TextBox txtbio; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.TextBox txtmoddername; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Button btnsave; - private System.Windows.Forms.Button btnupload; - private System.Windows.Forms.Button btnedit; - private System.Windows.Forms.Panel pnlpackageeditor; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox txtprice; - private System.Windows.Forms.Label lbprice; - private System.Windows.Forms.Label lbaddress; - private System.Windows.Forms.CheckBox cbsell; - private System.Windows.Forms.TextBox txtpackagedescription; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox txtpackagename; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Button btndonecustomizing; - private System.Windows.Forms.Button btnsaa; - private System.Windows.Forms.Panel pnlauthordetails; - private System.Windows.Forms.Label lbauthordescription; - private System.Windows.Forms.Label lbauthorname; - private System.Windows.Forms.Panel pnlchoosenetwork; - private System.Windows.Forms.Button btnrequest; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.ListView lvnets; - private System.Windows.Forms.ColumnHeader clhostnameheader; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Appscape.cs b/source/WindowsFormsApplication1/Appscape.cs deleted file mode 100644 index 92171d9..0000000 --- a/source/WindowsFormsApplication1/Appscape.cs +++ /dev/null @@ -1,976 +0,0 @@ -using NetSockets; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Appscape : Form - { - /// - /// Front-end for the Appscape Package Manager. - /// - public Appscape() - { - InitializeComponent(); - } - - private List clients = null; - - private void Form1_Load(object sender, EventArgs e) - { - clients = new List(); - foreach(var ip in Package_Grabber.clients.Keys) - { - if (Package_Grabber.clients[ip].IsConnected) - { - var client = new AppscapeClient(ip); - client.OnSuccessfulDownload += (object s, EventArgs a) => - { - this.Invoke(new Action(() => - { - if (AddressToSendTo != null) - { - var w = new BitnoteWallet(); - while(w.Clients == null) - { - - } - if (API.BitnoteAddress.Bitnotes >= CurrentItemCost) - { - if (w.AddBitnotesToAddress(AddressToSendTo, CurrentItemCost)) - { - API.CreateInfoboxSession("Package downloaded.", "The package has been successfully downloaded to your system.", infobox.InfoboxMode.Info); - API.BitnoteAddress.Bitnotes -= CurrentItemCost; - } - else - { - API.CreateInfoboxSession("Server-side Bitnote Error", "We couldn't complete the transaction, but the package was still downloaded. No Bitnotes have been taken from your account.", infobox.InfoboxMode.Info); - } - } - else - { - File.Delete((string)s); - API.CreateInfoboxSession("Insufficient funds.", "You do not have enough Bitnotes to complete the transaction.", infobox.InfoboxMode.Info); - } - } - })); - }; - client.OnPackagesReceived += (object s, EventArgs a) => - { - this.Invoke(new Action(() => { lvmypackages.Items.Clear(); })); - foreach (AppscapePackage package in client.Packages) - { - ListViewItem lvitem = new ListViewItem(); - lvitem.Text = package.Name; - package.Server = client.IP; - lvitem.Tag = package; - this.Invoke(new Action(() => - { - lvmypackages.Columns[0].Width = lvmypackages.Width; - if (MyDevProfile != null && LoungeClient != null) - { - if (package.DevKey == MyDevProfile.DevKey) - { - var lvmy = new ListViewItem(); - lvmy.Text = package.Name; - lvmy.Tag = package; - lvmypackages.Items.Add(lvmy); - lvmy.SubItems.Add(package.Cost.ToString()); - } - } - lvpackages.Items.Add(lvitem); - if (package.DevKey != null) - { - client.GetDevList(); - try { - var obj = client.DevList[package.DevKey]; - if (obj != null) - { - lvitem.SubItems.Add(obj.Name); - } - else - { - lvitem.SubItems.Add("Unknown"); - } - } - catch - { - lvitem.SubItems.Add("Unknown"); - } - - } - else { - lvitem.SubItems.Add("Unknown"); - } - lvitem.SubItems.Add(package.Cost.ToString()); - })); - } - }; - client.OnSkinDataReceived += (object s, EventArgs a) => - { - foreach (SkinData skin in client.Skins) - { - var item = new ListViewItem(); - item.Text = skin.Name; - skin.Server = client.IP; - item.Tag = skin; - this.Invoke(new Action(() => - { - lvpackages.Items.Add(item); - item.SubItems.Add(""); - item.SubItems.Add(skin.Cost.ToString()); - })); - } - }; - client.OnDevListSync += (object s, EventArgs a) => - { - API.CurrentSession.Invoke(new Action(() => - { - foreach (ListViewItem itm in lvpackages.Items) - { - if (DataType == "apps") - { - var pkg = (AppscapePackage)itm.Tag; - foreach (ListViewItem.ListViewSubItem subItem in itm.SubItems) - { - if (subItem.Text == "Unknown") - { /********************************************************************************************************************************************************************************/ - if (client.DevList != null && pkg.DevKey != null) - { - if (client.DevList.ContainsKey(pkg.DevKey)) - { - var dev = client.DevList[pkg.DevKey]; - subItem.Text = dev.Name; - } - } - } - } - } - } - })); - }; - client.GetDevList(); - clients.Add(client); - } - } - SetupList(); - pnllist.BringToFront(); - - } - - - /// - /// Sets up Appscape's package listing. - /// - public void SetupList() - { - if (DataType == "apps") - { - btnapps.BackColor = Color.Black; - btnapps.ForeColor = Color.White; - btnskins.BackColor = Color.White; - btnskins.ForeColor = Color.Black; - } - else - { - btnapps.BackColor = Color.White; - btnapps.ForeColor = Color.Black; - btnskins.BackColor = Color.Black; - btnskins.ForeColor = Color.White; - } - columnHeader1.Width = lvpackages.Width / 3; - columnHeader2.Width = lvpackages.Width / 3; - columnHeader3.Width = lvpackages.Width / 3; - - lvpackages.Items.Clear(); - pnlsearch.BackColor = API.CurrentSkin.titlebarcolour; - pnlsearch.ForeColor = API.CurrentSkin.titletextcolour; - if (DataType == "apps") - { - foreach (var client in clients) - { - client.GetDevList(); - client.GetPackageData(); - } - - } - else - { - foreach (var client in clients) - { - client.GetSkinData(); - } - - } - } - - private string DownloadPath = ""; - - private void lvpackages_SelectedIndexChanged(object sender, EventArgs e) - { - if (lvpackages.SelectedItems.Count > 0) - { - lvpackages.SelectedItems[0].BackColor = Color.Gray; - pnldownload.Show(); - foreach (ListViewItem lv in lvpackages.Items) - { - lv.BackColor = Color.White; - } - if (DataType == "apps") - { - AppscapePackage pkg = (AppscapePackage)lvpackages.SelectedItems[0].Tag; - lbpkgname.Text = pkg.Name; - lbpkgdescription.Text = pkg.Description; - try { - pbappscreenshot.Show(); - pbappscreenshot.Load(pkg.ScreenshotPath); - } - catch - { - pbappscreenshot.Hide(); - } - if (pkg.SetupFile == "" || pkg.SetupFile == null) - { - pnldownload.Hide(); - } - else - { - pnldownload.Show(); - lbdownloadpath.Text = "This package will download to: " + pkg.Name + ".stp."; - if (!pkg.SetupFile.EndsWith(".stp")) - { - pkg.SetupFile = pkg.SetupFile + ".stp"; - } - - foreach(var c in clients) - { - if(c.IP == pkg.Server) - { - DownloadClient = c; - } - } - DownloadPath = pkg.SetupFile; - } - try { - pbappicon.Show(); - pbappicon.Load("http://playshiftos.ml/appscape/packages/" + pkg.PkgIconPath); - } - catch - { - pbappicon.Hide(); - } - if (pkg.Cost == 0) - { - CurrentItemCost = Convert.ToDecimal(pkg.Cost); - } - else { - CurrentItemCost = Convert.ToDecimal(pkg.Cost.ToString("#.#####")); - } - if(pkg.DevKey != null) - { - pnlauthordetails.Show(); - lbauthorname.Text = "Author: " + GetModderByDevID(pkg.DevKey).Key.Name; - lbauthordescription.Text = GetModderByDevID(pkg.DevKey).Key.Bio; - AddressToSendTo = GetModderByDevID(pkg.DevKey).Key.BitnoteAddress; - } - else - { - pnlauthordetails.Hide(); - //Classic packages. - if(pkg.Address != null) - { - AddressToSendTo = pkg.Address; - } - else - { - AddressToSendTo = null; - } - } - } - else - { - var skin = (SkinData)lvpackages.SelectedItems[0].Tag; - lbpkgname.Text = skin.Name; - lbpkgdescription.Text = "Author: " + skin.Author + Environment.NewLine; - if (skin.Download.EndsWith(".skn")) - { - lbpkgdescription.Text += "Type: Single Skin (.skn)" + Environment.NewLine; - } - else - { - lbpkgdescription.Text += "Type: Skin Pack (.spk)" + Environment.NewLine; - } - if (skin.Screenshot != null) - { - pbappscreenshot.Show(); - pbappscreenshot.Load(skin.Screenshot); - } - else - { - pbappscreenshot.Hide(); - } - if (skin.Icon != null) - { - pbappicon.Show(); - pbappicon.Load("http://shiftos.shiftgames.ml/appscape/skins/" + skin.Icon); - } - else - { - pbappicon.Hide(); - } - if (skin.Cost == 0) - { - CurrentItemCost = Convert.ToDecimal(skin.Cost); - } - else { - CurrentItemCost = Convert.ToDecimal(skin.Cost.ToString("#.#####")); - } - lbpkgdescription.Text += Environment.NewLine + skin.Description; - lbdownloadpath.Text = "This skin will download to C:\\ShiftOS\\Home\\Downloads\\" + skin.Download; - foreach(var c in clients) - { - if(c.IP == skin.Server) - { - DownloadClient = c; - } - } - DownloadPath = skin.Download; - } - } - } - - public decimal CurrentItemCost = 0; - public string AddressToSendTo = null; - public AppscapeClient DownloadClient = null; - public AppscapeClient LoungeClient = null; - - private void btndownload_Click(object sender, EventArgs e) - { - if (API.BitnoteAddress != null) - { - try - { - if (API.BitnoteAddress.Bitnotes >= CurrentItemCost) - { - WebClient wc = new WebClient(); - if (!Directory.Exists(Paths.Home + OSInfo.DirectorySeparator + "Downloads")) - { - Directory.CreateDirectory(Paths.Home + OSInfo.DirectorySeparator + "Downloads"); - } - switch(DataType) - { - case "apps": - DownloadClient.DownloadPackage(DownloadPath); - break; - default: - DownloadClient.DownloadSkin(DownloadPath); - break; - } - - } - else - { - API.CreateInfoboxSession("Appscape - Not enough bitnotes!", "You do not have enough Bitnotes to buy this package.", infobox.InfoboxMode.Info); - } - } - catch (Exception wex) - { - API.CreateInfoboxSession("Error", "An error has occurred while downloading the package." + Environment.NewLine + Environment.NewLine + wex.Message, infobox.InfoboxMode.Info); - } - } - else - { - API.CreateInfoboxSession("No Bitnote Address Found", "It seems that your computer is not linked with a Bitnote address. Please go to shiftnet://main/bitnote/home.rnp for more information.", infobox.InfoboxMode.Info); - } - } - - private void btnupload_Click(object sender, EventArgs e) - { - var u = new AppscapeUploader(MyDevProfile, LoungeClient); - API.CreateForm(u, "Appscape Uploader", Properties.Resources.iconAppscape); - } - - public string DataType = "apps"; - - private void btnapps_Click(object sender, EventArgs e) - { - pnllist.BringToFront(); - DataType = "apps"; - SetupList(); - } - - private void btnskins_Click(object sender, EventArgs e) - { - pnllist.BringToFront(); - DataType = "skins"; - SetupList(); - } - - private void lvpackages_DoubleClick(object sender, EventArgs e) - { - if(lvpackages.SelectedItems.Count > 0) - { - pnlpackageinfo.BringToFront(); - } - } - - private void txtsearch_TextChanged(object sender, EventArgs e) - { - var bw = new BackgroundWorker(); - bw.DoWork += (object s, DoWorkEventArgs a) => - { - this.Invoke(new Action(() => - { - SetupList(); - })); - if (txtsearch.Text != "") - { - this.Invoke(new Action(() => - { - pnllist.BringToFront(); - })); - var newlst = new List(); - this.Invoke(new Action(() => - { - foreach (ListViewItem item in lvpackages.Items) - { - if (item.Text.ToLower().Replace(" ", "").Contains(txtsearch.Text.ToLower().Replace(" ", ""))) - { - newlst.Add(item); - } - } - lvpackages.Items.Clear(); - })); - foreach (ListViewItem itm in newlst) - { - this.Invoke(new Action(() => - { - lvpackages.Items.Add(itm); - })); - } - } - }; - bw.RunWorkerAsync(); - } - - /// - /// Gets developer info using the specified key. - /// - /// Bugs: If two servers contain the same key, the first key the method sees will be returned. - /// - /// The key to search for. - /// A pair containing the developer info as well as the client that contained the key. - public KeyValuePair GetModderByDevID(string DevID) - { - AppscapeModder dev = null; - AppscapeClient clt = null; - foreach (var client in clients) - { - if (client.DevList.ContainsKey(DevID)) - { - if (dev == null) - { - dev = client.DevList[DevID]; - clt = client; - } - } - - } - return new KeyValuePair(dev, clt); - } - - /// - /// Adds a new developer key to the specified client's listing. - /// - /// The client to add to. - public void GenerateNewDevKey(AppscapeClient client) - { - if(client.DevList == null) - { - client.DevList = new Dictionary(); - } - var rnd = new Random(); - int key = rnd.Next(1, 99999999); - var dev = new AppscapeModder(); - dev.DevKey = key.ToString(); - dev.Name = "Modder"; - bool done = false; - if (!client.DevList.ContainsKey(key.ToString())) - { - if (done != true) - { - client.DevList.Add(dev.DevKey, dev); - client.UploadDevList(client.DevList); - done = true; - API.CreateInfoboxSession("Success.", $"Your new developer key is {dev.DevKey}. As long as you are connected to the {client.IP} repository, you can use this key to enter the Appscape Lounge, make a name for yourself, and start uploading.", infobox.InfoboxMode.Info); - } - } - } - - private void btngetkey_Click(object sender, EventArgs e) - { - pnlchoosenetwork.BringToFront(); - SetupNetworks(); - } - - /// - /// Lists all available Appscape repositories a key can be added to. - /// - private void SetupNetworks() - { - clhostnameheader.Width = lvnets.Width; - lvnets.Items.Clear(); - foreach(var c in clients) - { - var lv = new ListViewItem(); - lv.Text = c.IP; - lv.Tag = c; - lvnets.Items.Add(lv); - } - } - - private AppscapeModder MyDevProfile = null; - - /// - /// Sets up the Developer Lounge. - /// - public void SetupLounge() - { - pnllounge.BringToFront(); - //List of all my packages - lvmypackages.Items.Clear(); - foreach (var client in clients) - { - client.GetPackageData(); - } - - //My name. - lbmyname.Text = MyDevProfile.Name; - txtmoddername.Text = MyDevProfile.Name; - //Biography. - lbmybio.Text = MyDevProfile.Bio; - txtbio.Text = MyDevProfile.Bio; - //My Bitnote Address - txtbitnoteaddress.Text = MyDevProfile.BitnoteAddress; - - } - - private void btnlounge_Click(object sender, EventArgs e) - { - API.CreateInfoboxSession("Appscape Developer Lounge", "Please enter your Developer Key to enter the Lounge.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetInfoboxResult(); - bool cont = true; - if (res != "fail") - { - try - { - var dev = GetModderByDevID(res); - MyDevProfile = dev.Key; - LoungeClient = dev.Value; - SetupLounge(); - } - catch - { - cont = false; - } - } - if (cont != true) - API.CreateInfoboxSession("Appscape Developer Lounge", "That Developer Key was not found in the database.", infobox.InfoboxMode.Info); - }; - } - - private void btnsave_Click(object sender, EventArgs e) - { - var c = LoungeClient; - c.DevList[MyDevProfile.DevKey] = MyDevProfile; - c.UploadDevList(c.DevList); - btnapps_Click(sender, e); - } - - private void txtbitnoteaddress_TextChanged(object sender, EventArgs e) - { - MyDevProfile.BitnoteAddress = txtbitnoteaddress.Text; - } - - private void txtbio_TextChanged(object sender, EventArgs e) - { - MyDevProfile.Bio = txtbio.Text; - } - - private void txtmoddername_TextChanged(object sender, EventArgs e) - { - MyDevProfile.Name = txtmoddername.Text; - } - - private AppscapePackage PackageToEdit = null; - - private void btnedit_Click(object sender, EventArgs e) - { - if(lvmypackages.SelectedItems.Count > 0) - { - ListViewItem itm = lvmypackages.SelectedItems[0]; - AppscapePackage pkg = (AppscapePackage)itm.Tag; - PackageToEdit = pkg; - pnlpackageeditor.BringToFront(); - SetupEditor(); - } - } - - /// - /// Sets up the package editor. - /// - private void SetupEditor() - { - if(PackageToEdit.Cost > 0) - { - cbsell.Checked = true; - } - txtprice.Text = PackageToEdit.Cost.ToString(); - txtpackagename.Text = PackageToEdit.Name; - txtpackagedescription.Text = PackageToEdit.Description; - SAAFile = null; - } - - private string SAAFile = null; - - private void cbsell_CheckedChanged(object sender, EventArgs e) - { - lbprice.Visible = cbsell.Checked; - lbaddress.Visible = cbsell.Checked; - txtprice.Visible = cbsell.Checked; - - } - - private void btndonecustomizing_Click(object sender, EventArgs e) - { - bool ContinueUpload = true; - //Create new package and assign values - var pkg = PackageToEdit; - var OldName = pkg.Name.Replace(" ", "_"); - pkg.Name = txtpackagename.Text; - pkg.Description = txtpackagedescription.Text; - if (cbsell.Checked == true) - { - try - { - pkg.Cost = Convert.ToDecimal(Convert.ToDecimal(txtprice.Text).ToString("#.#####")); - } - catch - { - ContinueUpload = false; - API.CreateInfoboxSession("Error", "You have entered an incorrect price value.", infobox.InfoboxMode.Info); - } - } - else { - pkg.Cost = 0; - } - pkg.PkgIconPath = ""; - if (ContinueUpload == true) - { - - if (!Directory.Exists(Paths.Mod_Temp + "newapm")) - { - Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); - } - else - { - Directory.Delete(Paths.Mod_Temp + "newapm", true); - Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); - } - - //Copy app SAA and icon to package folder - if (SAAFile != null) - { - File.Copy(SAAFile, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); - } - else - { - var wc = new WebClient(); - wc.DownloadFile("http://playshiftos.ml/appscape/packages/" + OldName + ".stp", Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); - } - Properties.Resources.iconShiftnet.Save(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); - - //Create AL meta file for package (so it will display in the app launcher) - var al = new ModApplauncherItem(); - al.Display = true; - al.Icon = "Icon.bmp"; - al.Name = pkg.Name; - al.ShiftCode = "runSAA:app.saa"; - al.AppDirectory = al.Name; - - //Serialize AL meta file and copy to package - var json = JsonConvert.SerializeObject(al); - File.WriteAllText(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "applauncher", json); - - //Package file to .stp and upload to Appscape - ZipFile.CreateFromDirectory(Paths.Mod_Temp + "newapm", Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp"); - LoungeClient.UploadPackage(pkg, File.ReadAllBytes(Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp")); - btnapps_Click(sender, e); - - SetupLounge(); - pnllounge.BringToFront(); - } - } - - private void btnsaa_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if (res != "fail") - { - SAAFile = res; - btnsaa.Text = new FileInfo(SAAFile).Name; - } - }; - } - - private void btnrequest_Click(object sender, EventArgs e) - { - if(lvnets.SelectedItems.Count > 0) - { - //try - //{ - GenerateNewDevKey((AppscapeClient)lvnets.SelectedItems[0].Tag); - /*} - catch (Exception ex) - { - API.CreateInfoboxSession("Error", "An error has occurred trying to process the request: {ex.Message}", infobox.InfoboxMode.Info); - }*/ - } - } - } - - public class AppscapeClient - { - #region Constructor - - /// - /// Represents a client that communicates with an Appscape repository. - /// - /// Generally you shouldn't need to create an instance of this unless you messed up Appscape and are desperately trying to fix it by rewriting it, in which case you really should've just rolled back the source code. xD - /// - /// IP address of the repo. This can be found in Package_Grabber.clients.Keys. - public AppscapeClient(string ip_address) - { - try { - var c = Package_Grabber.clients[ip_address]; - c.OnReceived += (object s, NetReceivedEventArgs a) => - { - var obj = (ObjectModel)a.Data.Object; - switch (_mode) - { - case "getapps": - try - { - Packages = (List)obj.OptionalObject; - var h = OnPackagesReceived; - if (h != null) - { - h(obj, new EventArgs()); - } - } - catch - { - - } - - break; - case "get_devlist": - try { - if (obj.OptionalObject != null) - { - if (DevList == null) - { - DevList = new Dictionary(); - } - var lst = (List)obj.OptionalObject; - foreach (string json in lst) - { - var dev = JsonConvert.DeserializeObject(json); - if (!DevList.ContainsKey(dev.DevKey)) - { - DevList.Add(dev.DevKey, dev); - } - } - var h = OnDevListSync; - if (h != null) - { - h(obj, new EventArgs()); - } - } - } - catch - { - - } - break; - case "getskins": - try - { - Skins = (List)obj.OptionalObject; - var h = OnSkinDataReceived; - if (h != null) - { - h(obj, new EventArgs()); - } - } - catch - { - - } - break; - default: - try { - var command = (ObjectModel)a.Data.Object; - string[] args = command.Command.Split(' '); - switch (args[0]) - { - case "package_bytes": - byte[] package = (byte[])command.OptionalObject; - File.WriteAllBytes($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{OSInfo.DirectorySeparator}{args[1]}", package); - var h = OnSuccessfulDownload; - if (h != null) - { - h($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{ OSInfo.DirectorySeparator}{args[1]}", new EventArgs()); - } - break; - case "skin_bytes": - byte[] skin = (byte[])command.OptionalObject; - File.WriteAllBytes($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{OSInfo.DirectorySeparator}{args[1]}", skin); - var ha = OnSuccessfulDownload; - if (ha != null) - { - ha($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{ OSInfo.DirectorySeparator}{args[1]}", new EventArgs()); - } - break; - } - } - catch - { - - } - break; - } - }; - _IP = ip_address; - } - catch - { - throw new ArgumentException("IP address not found in client list."); - } - } - - #endregion - - #region Events - - public event EventHandler OnPackagesReceived; - public event EventHandler OnSkinDataReceived; - public event EventHandler OnDevListSync; - public event EventHandler OnDevGrabbed; - public event EventHandler OnSuccessfulDownload; - - #endregion - - #region Variables - - public List Packages = null; - public List Skins = null; - public Dictionary DevList = null; - private string _mode = ""; - private string _IP = ""; - public string IP { get { return _IP; } } - - #endregion - - #region Methods - - /// - /// Connects to Appscape server and grabs app package listings. - /// - public void GetPackageData() - { - _mode = "getapps"; - Package_Grabber.SendMessage(_IP, "apm getapps"); - - } - - /// - /// Connects to server and requests a list of all developers. - /// - public void GetDevList() - { - _mode = "get_devlist"; - Package_Grabber.SendMessage(_IP, "get_devlist"); - } - - /// - /// Downloads a package. - /// - /// Package name to download. - public void DownloadPackage(string pkg) - { - _mode = ""; - Package_Grabber.SendMessage(_IP, $"apm getpackage {pkg}"); - } - - /// - /// Downloads a skin. - /// - /// The skin name to download. - public void DownloadSkin(string skn) - { - _mode = ""; - Package_Grabber.SendMessage(_IP, $"apm getskin {skn}"); - } - - - /// - /// Uploads a new package to the server. - /// - /// Package metadata (name, description, etc) - /// Byte array representing the .stp file to upload. - public void UploadPackage(AppscapePackage pkgMeta, byte[] pkg) - { - pkgMeta.SetupFile = pkgMeta.Name.Replace(" ", "_") + ".stp"; - Package_Grabber.SendMessage(_IP, $"apm uploadmeta {pkgMeta.Name.Replace(" ", "_")}.json", pkgMeta); - Package_Grabber.SendMessage(_IP, $"apm upload {pkgMeta.SetupFile}", pkg); - } - - /// - /// Connects to Appscape server and grabs skin listings. - /// - public void GetSkinData() - { - _mode = "getskins"; - Package_Grabber.SendMessage(_IP, "apm getskins"); - - } - - /// - /// Contacts the server to save the devlist. - /// - /// Updated dev list to save. - public void UploadDevList(Dictionary dict) - { - Package_Grabber.SendMessage(_IP, "apm uploaddevlist", dict); - } - - #endregion - } -} diff --git a/source/WindowsFormsApplication1/Appscape.resx b/source/WindowsFormsApplication1/Appscape.resx deleted file mode 100644 index 524af34..0000000 --- a/source/WindowsFormsApplication1/Appscape.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Please choose a repository you would like your developer key to be associated with. Any uploads made using the new key will be sent to this repository and viewers of this repository will see your new package. - - - 17, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/AppscapeUploader.Designer.cs b/source/WindowsFormsApplication1/AppscapeUploader.Designer.cs deleted file mode 100644 index e23ef2d..0000000 --- a/source/WindowsFormsApplication1/AppscapeUploader.Designer.cs +++ /dev/null @@ -1,423 +0,0 @@ -namespace ShiftOS -{ - partial class AppscapeUploader - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.lbtitle = new System.Windows.Forms.Label(); - this.pnlmain = new System.Windows.Forms.Panel(); - this.Page0 = new System.Windows.Forms.Panel(); - this.txtprice = new System.Windows.Forms.TextBox(); - this.lbprice = new System.Windows.Forms.Label(); - this.lbaddress = new System.Windows.Forms.Label(); - this.cbsell = new System.Windows.Forms.CheckBox(); - this.txtpackagedescription = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.txtpackagename = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.Page1 = new System.Windows.Forms.Panel(); - this.btncompilesaa = new System.Windows.Forms.Button(); - this.btnscreenshot = new System.Windows.Forms.Button(); - this.btnicon = new System.Windows.Forms.Button(); - this.btnsaa = new System.Windows.Forms.Button(); - this.Page2 = new System.Windows.Forms.Panel(); - this.txtconfirm = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.lbldescription = new System.Windows.Forms.Label(); - this.pnlactions = new System.Windows.Forms.FlowLayoutPanel(); - this.btndone = new System.Windows.Forms.Button(); - this.btnnext = new System.Windows.Forms.Button(); - this.btnback = new System.Windows.Forms.Button(); - this.btncancel = new System.Windows.Forms.Button(); - this.pnlmain.SuspendLayout(); - this.Page0.SuspendLayout(); - this.Page1.SuspendLayout(); - this.Page2.SuspendLayout(); - this.pnlactions.SuspendLayout(); - this.SuspendLayout(); - // - // lbtitle - // - this.lbtitle.BackColor = System.Drawing.Color.Gray; - this.lbtitle.Dock = System.Windows.Forms.DockStyle.Top; - this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); - this.lbtitle.ForeColor = System.Drawing.Color.White; - this.lbtitle.Location = new System.Drawing.Point(0, 0); - this.lbtitle.Name = "lbtitle"; - this.lbtitle.Padding = new System.Windows.Forms.Padding(15, 0, 0, 0); - this.lbtitle.Size = new System.Drawing.Size(711, 49); - this.lbtitle.TabIndex = 0; - this.lbtitle.Text = "Welcome!"; - this.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // pnlmain - // - this.pnlmain.BackColor = System.Drawing.Color.Gray; - this.pnlmain.Controls.Add(this.Page0); - this.pnlmain.Controls.Add(this.Page1); - this.pnlmain.Controls.Add(this.Page2); - this.pnlmain.Controls.Add(this.lbldescription); - this.pnlmain.Controls.Add(this.pnlactions); - this.pnlmain.Controls.Add(this.lbtitle); - this.pnlmain.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlmain.Location = new System.Drawing.Point(0, 0); - this.pnlmain.Name = "pnlmain"; - this.pnlmain.Size = new System.Drawing.Size(711, 485); - this.pnlmain.TabIndex = 1; - // - // Page0 - // - this.Page0.Controls.Add(this.txtprice); - this.Page0.Controls.Add(this.lbprice); - this.Page0.Controls.Add(this.lbaddress); - this.Page0.Controls.Add(this.cbsell); - this.Page0.Controls.Add(this.txtpackagedescription); - this.Page0.Controls.Add(this.label2); - this.Page0.Controls.Add(this.txtpackagename); - this.Page0.Controls.Add(this.label1); - this.Page0.Dock = System.Windows.Forms.DockStyle.Fill; - this.Page0.Location = new System.Drawing.Point(0, 135); - this.Page0.Name = "Page0"; - this.Page0.Size = new System.Drawing.Size(711, 314); - this.Page0.TabIndex = 3; - // - // txtprice - // - this.txtprice.Location = new System.Drawing.Point(542, 239); - this.txtprice.Name = "txtprice"; - this.txtprice.Size = new System.Drawing.Size(89, 20); - this.txtprice.TabIndex = 8; - this.txtprice.Visible = false; - this.txtprice.TextChanged += new System.EventHandler(this.txtprice_TextChanged); - // - // lbprice - // - this.lbprice.AutoSize = true; - this.lbprice.Location = new System.Drawing.Point(505, 242); - this.lbprice.Name = "lbprice"; - this.lbprice.Size = new System.Drawing.Size(34, 13); - this.lbprice.TabIndex = 7; - this.lbprice.Text = "Price:"; - this.lbprice.Visible = false; - this.lbprice.Click += new System.EventHandler(this.lbprice_Click); - // - // lbaddress - // - this.lbaddress.Location = new System.Drawing.Point(211, 242); - this.lbaddress.Name = "lbaddress"; - this.lbaddress.Size = new System.Drawing.Size(275, 45); - this.lbaddress.TabIndex = 5; - this.lbaddress.Text = "All profit made from this package will be sent to the Bitnote Address defined in " + - "your Dev Lounge; if it is non-existent, Bitnotes simply won\'t arrive."; - this.lbaddress.Visible = false; - this.lbaddress.Click += new System.EventHandler(this.lbaddress_Click); - // - // cbsell - // - this.cbsell.Appearance = System.Windows.Forms.Appearance.Button; - this.cbsell.AutoSize = true; - this.cbsell.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cbsell.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.cbsell.Location = new System.Drawing.Point(98, 235); - this.cbsell.Name = "cbsell"; - this.cbsell.Size = new System.Drawing.Size(92, 24); - this.cbsell.TabIndex = 4; - this.cbsell.Text = "Sell for Bitnotes"; - this.cbsell.UseVisualStyleBackColor = true; - this.cbsell.CheckedChanged += new System.EventHandler(this.cbsell_CheckedChanged); - // - // txtpackagedescription - // - this.txtpackagedescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtpackagedescription.Location = new System.Drawing.Point(100, 44); - this.txtpackagedescription.Multiline = true; - this.txtpackagedescription.Name = "txtpackagedescription"; - this.txtpackagedescription.Size = new System.Drawing.Size(591, 189); - this.txtpackagedescription.TabIndex = 3; - this.txtpackagedescription.TextChanged += new System.EventHandler(this.txtpackagedescription_TextChanged); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(13, 47); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(60, 13); - this.label2.TabIndex = 2; - this.label2.Text = "Description"; - this.label2.Click += new System.EventHandler(this.label2_Click); - // - // txtpackagename - // - this.txtpackagename.Location = new System.Drawing.Point(100, 15); - this.txtpackagename.Name = "txtpackagename"; - this.txtpackagename.Size = new System.Drawing.Size(258, 20); - this.txtpackagename.TabIndex = 1; - this.txtpackagename.TextChanged += new System.EventHandler(this.txtpackagename_TextChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(13, 18); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(81, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Package Name"; - this.label1.Click += new System.EventHandler(this.label1_Click); - // - // Page1 - // - this.Page1.Controls.Add(this.btncompilesaa); - this.Page1.Controls.Add(this.btnscreenshot); - this.Page1.Controls.Add(this.btnicon); - this.Page1.Controls.Add(this.btnsaa); - this.Page1.Dock = System.Windows.Forms.DockStyle.Fill; - this.Page1.Location = new System.Drawing.Point(0, 135); - this.Page1.Name = "Page1"; - this.Page1.Size = new System.Drawing.Size(711, 314); - this.Page1.TabIndex = 4; - // - // btncompilesaa - // - this.btncompilesaa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btncompilesaa.AutoSize = true; - this.btncompilesaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btncompilesaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncompilesaa.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btncompilesaa.Location = new System.Drawing.Point(4, 282); - this.btncompilesaa.Name = "btncompilesaa"; - this.btncompilesaa.Size = new System.Drawing.Size(82, 26); - this.btncompilesaa.TabIndex = 7; - this.btncompilesaa.Text = "Compile SAA"; - this.btncompilesaa.UseVisualStyleBackColor = true; - this.btncompilesaa.Click += new System.EventHandler(this.btncompilesaa_Click); - // - // btnscreenshot - // - this.btnscreenshot.AutoSize = true; - this.btnscreenshot.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnscreenshot.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnscreenshot.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnscreenshot.Location = new System.Drawing.Point(12, 76); - this.btnscreenshot.Name = "btnscreenshot"; - this.btnscreenshot.Size = new System.Drawing.Size(121, 26); - this.btnscreenshot.TabIndex = 6; - this.btnscreenshot.Text = "Select App Screenshot"; - this.btnscreenshot.UseVisualStyleBackColor = true; - this.btnscreenshot.Click += new System.EventHandler(this.btnscreenshot_Click); - // - // btnicon - // - this.btnicon.AutoSize = true; - this.btnicon.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnicon.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnicon.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnicon.Location = new System.Drawing.Point(12, 44); - this.btnicon.Name = "btnicon"; - this.btnicon.Size = new System.Drawing.Size(92, 26); - this.btnicon.TabIndex = 5; - this.btnicon.Text = "Select App Icon"; - this.btnicon.UseVisualStyleBackColor = true; - this.btnicon.Click += new System.EventHandler(this.btnicon_Click); - // - // btnsaa - // - this.btnsaa.AutoSize = true; - this.btnsaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnsaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsaa.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnsaa.Location = new System.Drawing.Point(12, 9); - this.btnsaa.Name = "btnsaa"; - this.btnsaa.Size = new System.Drawing.Size(92, 26); - this.btnsaa.TabIndex = 4; - this.btnsaa.Text = "Select App SAA"; - this.btnsaa.UseVisualStyleBackColor = true; - this.btnsaa.Click += new System.EventHandler(this.btnsaa_Click); - // - // Page2 - // - this.Page2.Controls.Add(this.txtconfirm); - this.Page2.Controls.Add(this.label3); - this.Page2.Dock = System.Windows.Forms.DockStyle.Fill; - this.Page2.Location = new System.Drawing.Point(0, 135); - this.Page2.Name = "Page2"; - this.Page2.Size = new System.Drawing.Size(711, 314); - this.Page2.TabIndex = 7; - // - // txtconfirm - // - this.txtconfirm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtconfirm.Location = new System.Drawing.Point(19, 49); - this.txtconfirm.Multiline = true; - this.txtconfirm.Name = "txtconfirm"; - this.txtconfirm.Size = new System.Drawing.Size(672, 259); - this.txtconfirm.TabIndex = 1; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(16, 18); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(132, 13); - this.label3.TabIndex = 0; - this.label3.Text = "Confirm Package Settings:"; - // - // lbldescription - // - this.lbldescription.Dock = System.Windows.Forms.DockStyle.Top; - this.lbldescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.lbldescription.ForeColor = System.Drawing.Color.White; - this.lbldescription.Location = new System.Drawing.Point(0, 49); - this.lbldescription.Name = "lbldescription"; - this.lbldescription.Padding = new System.Windows.Forms.Padding(15, 0, 0, 0); - this.lbldescription.Size = new System.Drawing.Size(711, 86); - this.lbldescription.TabIndex = 2; - this.lbldescription.Text = "label1"; - // - // pnlactions - // - this.pnlactions.Controls.Add(this.btndone); - this.pnlactions.Controls.Add(this.btnnext); - this.pnlactions.Controls.Add(this.btnback); - this.pnlactions.Controls.Add(this.btncancel); - this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlactions.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.pnlactions.ForeColor = System.Drawing.Color.White; - this.pnlactions.Location = new System.Drawing.Point(0, 449); - this.pnlactions.Name = "pnlactions"; - this.pnlactions.Size = new System.Drawing.Size(711, 36); - this.pnlactions.TabIndex = 1; - // - // btndone - // - this.btndone.AutoSize = true; - this.btndone.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndone.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btndone.Location = new System.Drawing.Point(660, 3); - this.btndone.Name = "btndone"; - this.btndone.Size = new System.Drawing.Size(48, 26); - this.btndone.TabIndex = 0; - this.btndone.Text = "Done!"; - this.btndone.UseVisualStyleBackColor = true; - this.btndone.Click += new System.EventHandler(this.btndone_Click); - // - // btnnext - // - this.btnnext.AutoSize = true; - this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnnext.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnnext.Location = new System.Drawing.Point(612, 3); - this.btnnext.Name = "btnnext"; - this.btnnext.Size = new System.Drawing.Size(42, 26); - this.btnnext.TabIndex = 1; - this.btnnext.Text = "Next"; - this.btnnext.UseVisualStyleBackColor = true; - this.btnnext.Click += new System.EventHandler(this.btnnext_Click); - // - // btnback - // - this.btnback.AutoSize = true; - this.btnback.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnback.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnback.Location = new System.Drawing.Point(564, 3); - this.btnback.Name = "btnback"; - this.btnback.Size = new System.Drawing.Size(42, 26); - this.btnback.TabIndex = 2; - this.btnback.Text = "Back"; - this.btnback.UseVisualStyleBackColor = true; - this.btnback.Click += new System.EventHandler(this.btnback_Click); - // - // btncancel - // - this.btncancel.AutoSize = true; - this.btncancel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btncancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncancel.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btncancel.Location = new System.Drawing.Point(508, 3); - this.btncancel.Name = "btncancel"; - this.btncancel.Size = new System.Drawing.Size(50, 26); - this.btncancel.TabIndex = 3; - this.btncancel.Text = "Cancel"; - this.btncancel.UseVisualStyleBackColor = true; - this.btncancel.Click += new System.EventHandler(this.btncancel_Click); - // - // AppscapeUploader - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(711, 485); - this.Controls.Add(this.pnlmain); - this.Name = "AppscapeUploader"; - this.Text = "AppscapeUploader"; - this.Load += new System.EventHandler(this.AppscapeUploader_Load); - this.pnlmain.ResumeLayout(false); - this.Page0.ResumeLayout(false); - this.Page0.PerformLayout(); - this.Page1.ResumeLayout(false); - this.Page1.PerformLayout(); - this.Page2.ResumeLayout(false); - this.Page2.PerformLayout(); - this.pnlactions.ResumeLayout(false); - this.pnlactions.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Label lbtitle; - private System.Windows.Forms.Panel pnlmain; - private System.Windows.Forms.FlowLayoutPanel pnlactions; - private System.Windows.Forms.Button btndone; - private System.Windows.Forms.Button btnnext; - private System.Windows.Forms.Button btnback; - private System.Windows.Forms.Button btncancel; - private System.Windows.Forms.Label lbldescription; - private System.Windows.Forms.Panel Page0; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox txtpackagedescription; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox txtpackagename; - private System.Windows.Forms.Panel Page1; - private System.Windows.Forms.Button btnsaa; - private System.Windows.Forms.Button btnscreenshot; - private System.Windows.Forms.Button btnicon; - private System.Windows.Forms.Panel Page2; - private System.Windows.Forms.TextBox txtconfirm; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button btncompilesaa; - private System.Windows.Forms.TextBox txtprice; - private System.Windows.Forms.Label lbprice; - private System.Windows.Forms.Label lbaddress; - private System.Windows.Forms.CheckBox cbsell; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/AppscapeUploader.cs b/source/WindowsFormsApplication1/AppscapeUploader.cs deleted file mode 100644 index 5cc8560..0000000 --- a/source/WindowsFormsApplication1/AppscapeUploader.cs +++ /dev/null @@ -1,380 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class AppscapeUploader : Form - { - /// - /// Front-end to handle uploading of an Appscape package. - /// - /// The developer of the new package. - /// The client representing the repository to upload to. - public AppscapeUploader(AppscapeModder modder, AppscapeClient repo) - { - InitializeComponent(); - MyProfile = modder; - Repo = repo; - } - - private AppscapeModder MyProfile = null; - private AppscapeClient Repo = null; - - private void btncancel_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void btndone_Click(object sender, EventArgs e) - { - bool ContinueUpload = true; - //Create new package and assign values - var pkg = new AppscapePackage(); - pkg.Name = txtpackagename.Text; - pkg.DevKey = MyProfile.DevKey; - pkg.Description = txtpackagedescription.Text; - if (cbsell.Checked == true) - { - try - { - pkg.Cost = Convert.ToDecimal(Convert.ToDecimal(txtprice.Text).ToString("#.#####")); - } - catch - { - ContinueUpload = false; - API.CreateInfoboxSession("Error", "You have entered an incorrect price value.", infobox.InfoboxMode.Info); - } - } - else { - pkg.Cost = 0; - } - pkg.SetupFile = pkg.Name.Replace(" ", "_"); - pkg.PkgIconPath = ""; - if(AppScreenshot != null) - { - pkg.ScreenshotPath = new FileInfo(AppScreenshot).Name.Replace(" ", "_"); - } - else - { - pkg.ScreenshotPath = "none.jpg"; - } - if (ContinueUpload == true) { - //Upload the package meta file - - if (!Directory.Exists(Paths.Mod_Temp + "newapm")) { - Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); - } - else - { - Directory.Delete(Paths.Mod_Temp + "newapm", true); - Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); - } - - //Copy app SAA and icon to package folder - File.Copy(SAAFile, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); - if (AppIcon != null) - { - File.Copy(AppIcon, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); - } - else - { - Properties.Resources.iconShiftnet.Save(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); - } - - //Create AL meta file for package (so it will display in the app launcher) - var al = new ModApplauncherItem(); - al.Display = true; - al.Icon = "Icon.bmp"; - al.Name = pkg.Name; - al.ShiftCode = "runSAA:app.saa"; - al.AppDirectory = al.Name; - - //Serialize AL meta file and copy to package - var json = JsonConvert.SerializeObject(al); - File.WriteAllText(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "applauncher", json); - - //Package file to .stp and upload to Appscape - ZipFile.CreateFromDirectory(Paths.Mod_Temp + "newapm", Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp"); - Repo.UploadPackage(pkg, File.ReadAllBytes(Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp")); - - - - this.Close(); - } - } - - - int page = 0; - - /// - /// Makes the specified control and ALL of it's children, grand children, great grand children, and so on, appear "dark". - /// - /// The top of the hierarchy; the start of it all. - private void RecursiveControlSetup(Control ctrl) - { - ctrl.BackColor = API.CurrentSkin.titlebarcolour; - ctrl.ForeColor = API.CurrentSkin.titletextcolour; - try - { - var pnl = (Panel)ctrl; - foreach(Control c in pnl.Controls) - { - RecursiveControlSetup(c); - } - } - catch { - - } - } - - /// - /// Sets up the user interface. - /// - private void SetupUI() - { - RecursiveControlSetup(pnlmain); - switch (page) - { - case 0: - lbtitle.Text = "Welcome!"; - lbldescription.Text = "This wizard will guide you through the creation of an Appscape Package which will be uploaded to Appscape for all to see. First, let's start with some basics."; - Page0.BringToFront(); - btndone.Hide(); - btnback.Hide(); - break; - case 1: - lbtitle.Text = "Packaged Files"; - lbldescription.Text = "Now that we have a name and description, it's time to get some files into your package. Namely, an icon and the app itself."; - btnback.Show(); - Page1.BringToFront(); - break; - case 2: - lbtitle.Text = "Ready!"; - lbldescription.Text = "That's all we need from you. Assuming everything is correct, as soon as you click 'Done!', the package will be generated and uploaded to Appscape quicker than you can say \"Appscape Package Manager is so freakin' awesome.\"."; - btnnext.Hide(); - btndone.Show(); - Page2.BringToFront(); - txtconfirm.Font = new Font(OSInfo.GetMonospaceFont(), 9); - ConfirmPKG(); - break; - } - } - - /// - /// Makes sure the package is ready for upload. - /// - private void ConfirmPKG() - { - txtconfirm.Text = ""; - WriteLine(" == Basics == "); - WriteLine($"Name: {txtpackagename.Text}"); - WriteLine($"Description: {txtpackagedescription.Text}"); - WriteLine(""); - WriteLine(" == Files == "); - if(SAAFile != null) - { - WriteLine(SAAFile); - } - else - { - WriteLine("no saa file"); - } - WriteLine(AppIcon); - WriteLine(AppScreenshot); - WriteLine(""); - WriteLine(" == Package Check == "); - CheckForErrors(); - foreach(string err in Errors) - { - WriteLine(" - " + err); - btndone.Hide(); - } - if(Errors.Count > 0) - { - WriteLine("Please go back and correct these errors."); - } - } - - private List Errors = null; - - /// - /// Checks for package errors. - /// - private void CheckForErrors() - { - Errors = new List(); - if(txtpackagename.Text.Length < 1) - { - Errors.Add("Your package doesn't have a name."); - } - if(SAAFile == null) - { - Errors.Add("Your package won't contain a .saa file, therefore it won't be installed by ShiftOS!"); - } - } - - /// - /// Writes a line to the summary box. - /// - /// Text to write. - private void WriteLine(string text) - { - if(txtconfirm.Text == "") - { - txtconfirm.Text = text; - } - else - { - txtconfirm.Text += Environment.NewLine + text; - } - } - - private void btnnext_Click(object sender, EventArgs e) - { - page += 1; - SetupUI(); - } - - private void btnback_Click(object sender, EventArgs e) - { - page -= 1; - SetupUI(); - } - - private void AppscapeUploader_Load(object sender, EventArgs e) - { - SetupUI(); - } - - private string SAAFile = null; - private string AppIcon = null; - private string AppScreenshot = null; - - private void btnsaa_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if(res != "fail") - { - SAAFile = res; - btnsaa.Text = new FileInfo(SAAFile).Name; - } - }; - } - - private void btnicon_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".bmp;.png;.jpg;.pic", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if (res != "fail") - { - AppIcon = res; - btnicon.Text = new FileInfo(res).Name; - } - }; - } - - private void btnscreenshot_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".bmp;.png;.jpg;.pic", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if (res != "fail") - { - AppScreenshot = res; - btnscreenshot.Text = new FileInfo(res).Name; - } - }; - } - - private void btncompilesaa_Click(object sender, EventArgs e) - { - //Source code folder finder - API.CreateFileSkimmerSession("dir", File_Skimmer.FileSkimmerMode.OpenFolder); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if(res != "fail") - { - if(File.Exists(res + OSInfo.DirectorySeparator + "main.lua")) { - string dir = res; - API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s2, FormClosingEventArgs a2) => - { - try - { - ZipFile.CreateFromDirectory(dir, API.GetFSResult()); - API.CreateInfoboxSession("Success", "The SAA file has been created successfully.", infobox.InfoboxMode.Info); - } - catch - { - API.CreateInfoboxSession("Error", "Could not create the SAA file.", infobox.InfoboxMode.Info); - } - }; - } - else { - API.CreateInfoboxSession("Invalid source", "Your source directory doesn't contain a main script (main.lua) file.", infobox.InfoboxMode.Info); - } - } - }; - } - - private void cbsell_CheckedChanged(object sender, EventArgs e) - { - lbprice.Visible = cbsell.Checked; - lbaddress.Visible = cbsell.Checked; - txtprice.Visible = cbsell.Checked; - } - - private void lbprice_Click(object sender, EventArgs e) - { - - } - - private void txtprice_TextChanged(object sender, EventArgs e) - { - - } - - private void lbaddress_Click(object sender, EventArgs e) - { - - } - - private void txtpackagedescription_TextChanged(object sender, EventArgs e) - { - - } - - private void label2_Click(object sender, EventArgs e) - { - - } - - private void txtpackagename_TextChanged(object sender, EventArgs e) - { - - } - - private void label1_Click(object sender, EventArgs e) - { - - } - } -} diff --git a/source/WindowsFormsApplication1/AppscapeUploader.resx b/source/WindowsFormsApplication1/AppscapeUploader.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/AppscapeUploader.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Artpad.Designer.cs b/source/WindowsFormsApplication1/Artpad.Designer.cs deleted file mode 100644 index 13bfba1..0000000 --- a/source/WindowsFormsApplication1/Artpad.Designer.cs +++ /dev/null @@ -1,3589 +0,0 @@ -namespace ShiftOS -{ - partial class Artpad - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.pnldrawingbackground = new System.Windows.Forms.Panel(); - this.pnlinitialcanvassettings = new System.Windows.Forms.Panel(); - this.btncancel = new System.Windows.Forms.Button(); - this.btncreate = new System.Windows.Forms.Button(); - this.Label11 = new System.Windows.Forms.Label(); - this.lbltotalpixels = new System.Windows.Forms.Label(); - this.txtnewcanvasheight = new System.Windows.Forms.TextBox(); - this.Label10 = new System.Windows.Forms.Label(); - this.txtnewcanvaswidth = new System.Windows.Forms.TextBox(); - this.Label9 = new System.Windows.Forms.Label(); - this.pnlpalletsize = new System.Windows.Forms.Panel(); - this.txttopspace = new System.Windows.Forms.TextBox(); - this.Label40 = new System.Windows.Forms.Label(); - this.txtsidespace = new System.Windows.Forms.TextBox(); - this.Label41 = new System.Windows.Forms.Label(); - this.btnchangesizecancel = new System.Windows.Forms.Button(); - this.btnsetsize = new System.Windows.Forms.Button(); - this.txtcolorpalletheight = new System.Windows.Forms.TextBox(); - this.Label42 = new System.Windows.Forms.Label(); - this.txtcolorpalletwidth = new System.Windows.Forms.TextBox(); - this.Label43 = new System.Windows.Forms.Label(); - this.picdrawingdisplay = new System.Windows.Forms.PictureBox(); - this.pnlbottompanel = new System.Windows.Forms.Panel(); - this.pnlpallet = new System.Windows.Forms.Panel(); - this.flowcolours = new System.Windows.Forms.FlowLayoutPanel(); - this.colourpallet1 = new System.Windows.Forms.Panel(); - this.colourpallet2 = new System.Windows.Forms.Panel(); - this.colourpallet3 = new System.Windows.Forms.Panel(); - this.colourpallet4 = new System.Windows.Forms.Panel(); - this.colourpallet5 = new System.Windows.Forms.Panel(); - this.colourpallet6 = new System.Windows.Forms.Panel(); - this.colourpallet7 = new System.Windows.Forms.Panel(); - this.colourpallet8 = new System.Windows.Forms.Panel(); - this.colourpallet9 = new System.Windows.Forms.Panel(); - this.colourpallet10 = new System.Windows.Forms.Panel(); - this.colourpallet11 = new System.Windows.Forms.Panel(); - this.colourpallet12 = new System.Windows.Forms.Panel(); - this.colourpallet13 = new System.Windows.Forms.Panel(); - this.colourpallet14 = new System.Windows.Forms.Panel(); - this.colourpallet15 = new System.Windows.Forms.Panel(); - this.colourpallet16 = new System.Windows.Forms.Panel(); - this.colourpallet17 = new System.Windows.Forms.Panel(); - this.colourpallet18 = new System.Windows.Forms.Panel(); - this.colourpallet19 = new System.Windows.Forms.Panel(); - this.colourpallet20 = new System.Windows.Forms.Panel(); - this.colourpallet21 = new System.Windows.Forms.Panel(); - this.colourpallet22 = new System.Windows.Forms.Panel(); - this.colourpallet23 = new System.Windows.Forms.Panel(); - this.colourpallet24 = new System.Windows.Forms.Panel(); - this.colourpallet25 = new System.Windows.Forms.Panel(); - this.colourpallet26 = new System.Windows.Forms.Panel(); - this.colourpallet27 = new System.Windows.Forms.Panel(); - this.colourpallet28 = new System.Windows.Forms.Panel(); - this.colourpallet29 = new System.Windows.Forms.Panel(); - this.colourpallet30 = new System.Windows.Forms.Panel(); - this.colourpallet31 = new System.Windows.Forms.Panel(); - this.colourpallet32 = new System.Windows.Forms.Panel(); - this.colourpallet33 = new System.Windows.Forms.Panel(); - this.colourpallet34 = new System.Windows.Forms.Panel(); - this.colourpallet35 = new System.Windows.Forms.Panel(); - this.colourpallet36 = new System.Windows.Forms.Panel(); - this.colourpallet37 = new System.Windows.Forms.Panel(); - this.colourpallet38 = new System.Windows.Forms.Panel(); - this.colourpallet39 = new System.Windows.Forms.Panel(); - this.colourpallet40 = new System.Windows.Forms.Panel(); - this.colourpallet41 = new System.Windows.Forms.Panel(); - this.colourpallet42 = new System.Windows.Forms.Panel(); - this.colourpallet43 = new System.Windows.Forms.Panel(); - this.colourpallet44 = new System.Windows.Forms.Panel(); - this.colourpallet45 = new System.Windows.Forms.Panel(); - this.colourpallet46 = new System.Windows.Forms.Panel(); - this.colourpallet47 = new System.Windows.Forms.Panel(); - this.colourpallet48 = new System.Windows.Forms.Panel(); - this.colourpallet49 = new System.Windows.Forms.Panel(); - this.colourpallet50 = new System.Windows.Forms.Panel(); - this.colourpallet51 = new System.Windows.Forms.Panel(); - this.colourpallet52 = new System.Windows.Forms.Panel(); - this.colourpallet53 = new System.Windows.Forms.Panel(); - this.colourpallet54 = new System.Windows.Forms.Panel(); - this.colourpallet55 = new System.Windows.Forms.Panel(); - this.colourpallet56 = new System.Windows.Forms.Panel(); - this.colourpallet57 = new System.Windows.Forms.Panel(); - this.colourpallet58 = new System.Windows.Forms.Panel(); - this.colourpallet59 = new System.Windows.Forms.Panel(); - this.colourpallet60 = new System.Windows.Forms.Panel(); - this.colourpallet61 = new System.Windows.Forms.Panel(); - this.colourpallet62 = new System.Windows.Forms.Panel(); - this.colourpallet63 = new System.Windows.Forms.Panel(); - this.colourpallet64 = new System.Windows.Forms.Panel(); - this.colourpallet65 = new System.Windows.Forms.Panel(); - this.colourpallet66 = new System.Windows.Forms.Panel(); - this.colourpallet67 = new System.Windows.Forms.Panel(); - this.colourpallet68 = new System.Windows.Forms.Panel(); - this.colourpallet69 = new System.Windows.Forms.Panel(); - this.colourpallet70 = new System.Windows.Forms.Panel(); - this.colourpallet71 = new System.Windows.Forms.Panel(); - this.colourpallet72 = new System.Windows.Forms.Panel(); - this.colourpallet73 = new System.Windows.Forms.Panel(); - this.colourpallet74 = new System.Windows.Forms.Panel(); - this.colourpallet75 = new System.Windows.Forms.Panel(); - this.colourpallet76 = new System.Windows.Forms.Panel(); - this.colourpallet77 = new System.Windows.Forms.Panel(); - this.colourpallet78 = new System.Windows.Forms.Panel(); - this.colourpallet79 = new System.Windows.Forms.Panel(); - this.colourpallet80 = new System.Windows.Forms.Panel(); - this.colourpallet81 = new System.Windows.Forms.Panel(); - this.colourpallet82 = new System.Windows.Forms.Panel(); - this.colourpallet83 = new System.Windows.Forms.Panel(); - this.colourpallet84 = new System.Windows.Forms.Panel(); - this.colourpallet85 = new System.Windows.Forms.Panel(); - this.colourpallet86 = new System.Windows.Forms.Panel(); - this.colourpallet87 = new System.Windows.Forms.Panel(); - this.colourpallet88 = new System.Windows.Forms.Panel(); - this.colourpallet89 = new System.Windows.Forms.Panel(); - this.colourpallet90 = new System.Windows.Forms.Panel(); - this.colourpallet91 = new System.Windows.Forms.Panel(); - this.colourpallet92 = new System.Windows.Forms.Panel(); - this.colourpallet93 = new System.Windows.Forms.Panel(); - this.colourpallet94 = new System.Windows.Forms.Panel(); - this.colourpallet95 = new System.Windows.Forms.Panel(); - this.colourpallet96 = new System.Windows.Forms.Panel(); - this.colourpallet97 = new System.Windows.Forms.Panel(); - this.colourpallet98 = new System.Windows.Forms.Panel(); - this.colourpallet99 = new System.Windows.Forms.Panel(); - this.colourpallet100 = new System.Windows.Forms.Panel(); - this.colourpallet101 = new System.Windows.Forms.Panel(); - this.colourpallet102 = new System.Windows.Forms.Panel(); - this.colourpallet103 = new System.Windows.Forms.Panel(); - this.colourpallet104 = new System.Windows.Forms.Panel(); - this.colourpallet105 = new System.Windows.Forms.Panel(); - this.colourpallet106 = new System.Windows.Forms.Panel(); - this.colourpallet107 = new System.Windows.Forms.Panel(); - this.colourpallet108 = new System.Windows.Forms.Panel(); - this.colourpallet109 = new System.Windows.Forms.Panel(); - this.colourpallet110 = new System.Windows.Forms.Panel(); - this.colourpallet111 = new System.Windows.Forms.Panel(); - this.colourpallet112 = new System.Windows.Forms.Panel(); - this.colourpallet113 = new System.Windows.Forms.Panel(); - this.colourpallet114 = new System.Windows.Forms.Panel(); - this.colourpallet115 = new System.Windows.Forms.Panel(); - this.colourpallet116 = new System.Windows.Forms.Panel(); - this.colourpallet117 = new System.Windows.Forms.Panel(); - this.colourpallet118 = new System.Windows.Forms.Panel(); - this.colourpallet119 = new System.Windows.Forms.Panel(); - this.colourpallet120 = new System.Windows.Forms.Panel(); - this.colourpallet121 = new System.Windows.Forms.Panel(); - this.colourpallet122 = new System.Windows.Forms.Panel(); - this.colourpallet123 = new System.Windows.Forms.Panel(); - this.colourpallet124 = new System.Windows.Forms.Panel(); - this.colourpallet125 = new System.Windows.Forms.Panel(); - this.colourpallet126 = new System.Windows.Forms.Panel(); - this.colourpallet127 = new System.Windows.Forms.Panel(); - this.colourpallet128 = new System.Windows.Forms.Panel(); - this.Label4 = new System.Windows.Forms.Label(); - this.line6 = new System.Windows.Forms.Panel(); - this.pnltoolproperties = new System.Windows.Forms.Panel(); - this.pnlovaltoolsettings = new System.Windows.Forms.Panel(); - this.Label20 = new System.Windows.Forms.Label(); - this.btnovalfillonoff = new System.Windows.Forms.Button(); - this.pnlovalfillcolour = new System.Windows.Forms.Panel(); - this.txtovalborderwidth = new System.Windows.Forms.TextBox(); - this.Label21 = new System.Windows.Forms.Label(); - this.Label22 = new System.Windows.Forms.Label(); - this.Label23 = new System.Windows.Forms.Label(); - this.pnleracertoolsettings = new System.Windows.Forms.Panel(); - this.Label28 = new System.Windows.Forms.Label(); - this.btneracersquare = new System.Windows.Forms.Button(); - this.btneracercircle = new System.Windows.Forms.Button(); - this.Label24 = new System.Windows.Forms.Label(); - this.txteracersize = new System.Windows.Forms.TextBox(); - this.Label26 = new System.Windows.Forms.Label(); - this.Label27 = new System.Windows.Forms.Label(); - this.pnllinetoolsettings = new System.Windows.Forms.Panel(); - this.Label29 = new System.Windows.Forms.Label(); - this.txtlinewidth = new System.Windows.Forms.TextBox(); - this.Label30 = new System.Windows.Forms.Label(); - this.Label31 = new System.Windows.Forms.Label(); - this.pnlpaintbrushtoolsettings = new System.Windows.Forms.Panel(); - this.Label36 = new System.Windows.Forms.Label(); - this.btnpaintsquareshape = new System.Windows.Forms.Button(); - this.btnpaintcircleshape = new System.Windows.Forms.Button(); - this.Label37 = new System.Windows.Forms.Label(); - this.txtpaintbrushsize = new System.Windows.Forms.TextBox(); - this.Label38 = new System.Windows.Forms.Label(); - this.Label39 = new System.Windows.Forms.Label(); - this.pnltexttoolsettings = new System.Windows.Forms.Panel(); - this.Label35 = new System.Windows.Forms.Label(); - this.combofontstyle = new System.Windows.Forms.ComboBox(); - this.txtdrawstringtext = new System.Windows.Forms.TextBox(); - this.combodrawtextfont = new System.Windows.Forms.ComboBox(); - this.Label25 = new System.Windows.Forms.Label(); - this.txtdrawtextsize = new System.Windows.Forms.TextBox(); - this.Label32 = new System.Windows.Forms.Label(); - this.Label33 = new System.Windows.Forms.Label(); - this.Label34 = new System.Windows.Forms.Label(); - this.pnlpixelsettersettings = new System.Windows.Forms.Panel(); - this.btnpixelsettersetpixel = new System.Windows.Forms.Button(); - this.txtpixelsetterycoordinate = new System.Windows.Forms.TextBox(); - this.txtpixelsetterxcoordinate = new System.Windows.Forms.TextBox(); - this.Label3 = new System.Windows.Forms.Label(); - this.Label2 = new System.Windows.Forms.Label(); - this.Label1 = new System.Windows.Forms.Label(); - this.pnlmagnifiersettings = new System.Windows.Forms.Panel(); - this.btnzoomout = new System.Windows.Forms.Button(); - this.btnzoomin = new System.Windows.Forms.Button(); - this.lblzoomlevel = new System.Windows.Forms.Label(); - this.Label7 = new System.Windows.Forms.Label(); - this.pnlfloodfillsettings = new System.Windows.Forms.Panel(); - this.Label12 = new System.Windows.Forms.Label(); - this.Label15 = new System.Windows.Forms.Label(); - this.pnlsquaretoolsettings = new System.Windows.Forms.Panel(); - this.Label19 = new System.Windows.Forms.Label(); - this.btnsquarefillonoff = new System.Windows.Forms.Button(); - this.pnlsquarefillcolour = new System.Windows.Forms.Panel(); - this.txtsquareborderwidth = new System.Windows.Forms.TextBox(); - this.Label16 = new System.Windows.Forms.Label(); - this.Label18 = new System.Windows.Forms.Label(); - this.Label17 = new System.Windows.Forms.Label(); - this.pnlpixelplacersettings = new System.Windows.Forms.Panel(); - this.lblpixelplacerhelp = new System.Windows.Forms.Label(); - this.btnpixelplacermovementmode = new System.Windows.Forms.Button(); - this.Label8 = new System.Windows.Forms.Label(); - this.pnlpencilsettings = new System.Windows.Forms.Panel(); - this.btnpencilsize3 = new System.Windows.Forms.Button(); - this.btnpencilsize2 = new System.Windows.Forms.Button(); - this.btnpencilsize1 = new System.Windows.Forms.Button(); - this.Label14 = new System.Windows.Forms.Label(); - this.Label6 = new System.Windows.Forms.Label(); - this.Label5 = new System.Windows.Forms.Label(); - this.line5 = new System.Windows.Forms.Panel(); - this.line3 = new System.Windows.Forms.Panel(); - this.pnltools = new System.Windows.Forms.Panel(); - this.pnltoolpositioner = new System.Windows.Forms.FlowLayoutPanel(); - this.btnpixelsetter = new System.Windows.Forms.Button(); - this.btnpixelplacer = new System.Windows.Forms.Button(); - this.btnpencil = new System.Windows.Forms.Button(); - this.btnfloodfill = new System.Windows.Forms.Button(); - this.btnoval = new System.Windows.Forms.Button(); - this.btnsquare = new System.Windows.Forms.Button(); - this.btnlinetool = new System.Windows.Forms.Button(); - this.btnpaintbrush = new System.Windows.Forms.Button(); - this.btntexttool = new System.Windows.Forms.Button(); - this.btneracer = new System.Windows.Forms.Button(); - this.btnnew = new System.Windows.Forms.Button(); - this.btnmagnify = new System.Windows.Forms.Button(); - this.btnopen = new System.Windows.Forms.Button(); - this.btnsave = new System.Windows.Forms.Button(); - this.btnundo = new System.Windows.Forms.Button(); - this.btnredo = new System.Windows.Forms.Button(); - this.line1 = new System.Windows.Forms.Panel(); - this.pnltoolpreview = new System.Windows.Forms.Panel(); - this.Label13 = new System.Windows.Forms.Label(); - this.picpreview = new System.Windows.Forms.PictureBox(); - this.lbltoolselected = new System.Windows.Forms.Label(); - this.line4 = new System.Windows.Forms.Panel(); - this.line2 = new System.Windows.Forms.Panel(); - this.tmrcodepointcooldown = new System.Windows.Forms.Timer(this.components); - this.tmrshowearnedcodepoints = new System.Windows.Forms.Timer(this.components); - this.pullbs = new System.Windows.Forms.Timer(this.components); - this.pullbottom = new System.Windows.Forms.Timer(this.components); - this.pullside = new System.Windows.Forms.Timer(this.components); - this.tmrsetupui = new System.Windows.Forms.Timer(this.components); - this.pgcontents.SuspendLayout(); - this.pnldrawingbackground.SuspendLayout(); - this.pnlinitialcanvassettings.SuspendLayout(); - this.pnlpalletsize.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picdrawingdisplay)).BeginInit(); - this.pnlbottompanel.SuspendLayout(); - this.pnlpallet.SuspendLayout(); - this.flowcolours.SuspendLayout(); - this.pnltoolproperties.SuspendLayout(); - this.pnlovaltoolsettings.SuspendLayout(); - this.pnleracertoolsettings.SuspendLayout(); - this.pnllinetoolsettings.SuspendLayout(); - this.pnlpaintbrushtoolsettings.SuspendLayout(); - this.pnltexttoolsettings.SuspendLayout(); - this.pnlpixelsettersettings.SuspendLayout(); - this.pnlmagnifiersettings.SuspendLayout(); - this.pnlfloodfillsettings.SuspendLayout(); - this.pnlsquaretoolsettings.SuspendLayout(); - this.pnlpixelplacersettings.SuspendLayout(); - this.pnlpencilsettings.SuspendLayout(); - this.pnltools.SuspendLayout(); - this.pnltoolpositioner.SuspendLayout(); - this.pnltoolpreview.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picpreview)).BeginInit(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.pnldrawingbackground); - this.pgcontents.Controls.Add(this.pnlbottompanel); - this.pgcontents.Controls.Add(this.pnltools); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(802, 598); - this.pgcontents.TabIndex = 20; - // - // pnldrawingbackground - // - this.pnldrawingbackground.AutoScroll = true; - this.pnldrawingbackground.BackColor = System.Drawing.Color.Gray; - this.pnldrawingbackground.Controls.Add(this.pnlinitialcanvassettings); - this.pnldrawingbackground.Controls.Add(this.pnlpalletsize); - this.pnldrawingbackground.Controls.Add(this.picdrawingdisplay); - this.pnldrawingbackground.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnldrawingbackground.Location = new System.Drawing.Point(120, 0); - this.pnldrawingbackground.Name = "pnldrawingbackground"; - this.pnldrawingbackground.Size = new System.Drawing.Size(682, 498); - this.pnldrawingbackground.TabIndex = 2; - // - // pnlinitialcanvassettings - // - this.pnlinitialcanvassettings.BackColor = System.Drawing.Color.White; - this.pnlinitialcanvassettings.Controls.Add(this.btncancel); - this.pnlinitialcanvassettings.Controls.Add(this.btncreate); - this.pnlinitialcanvassettings.Controls.Add(this.Label11); - this.pnlinitialcanvassettings.Controls.Add(this.lbltotalpixels); - this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvasheight); - this.pnlinitialcanvassettings.Controls.Add(this.Label10); - this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvaswidth); - this.pnlinitialcanvassettings.Controls.Add(this.Label9); - this.pnlinitialcanvassettings.Location = new System.Drawing.Point(223, 178); - this.pnlinitialcanvassettings.Name = "pnlinitialcanvassettings"; - this.pnlinitialcanvassettings.Size = new System.Drawing.Size(223, 100); - this.pnlinitialcanvassettings.TabIndex = 1; - // - // btncancel - // - this.btncancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btncancel.Location = new System.Drawing.Point(7, 66); - this.btncancel.Name = "btncancel"; - this.btncancel.Size = new System.Drawing.Size(102, 28); - this.btncancel.TabIndex = 7; - this.btncancel.Text = "Cancel"; - this.btncancel.UseVisualStyleBackColor = true; - this.btncancel.Click += new System.EventHandler(this.btncancel_Click); - // - // btncreate - // - this.btncreate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncreate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btncreate.Location = new System.Drawing.Point(114, 66); - this.btncreate.Name = "btncreate"; - this.btncreate.Size = new System.Drawing.Size(102, 28); - this.btncreate.TabIndex = 6; - this.btncreate.Text = "Create"; - this.btncreate.UseVisualStyleBackColor = true; - this.btncreate.Click += new System.EventHandler(this.btncreate_Click); - // - // Label11 - // - this.Label11.AutoSize = true; - this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label11.Location = new System.Drawing.Point(124, 9); - this.Label11.Name = "Label11"; - this.Label11.Size = new System.Drawing.Size(88, 20); - this.Label11.TabIndex = 5; - this.Label11.Text = "Total Pixels"; - // - // lbltotalpixels - // - this.lbltotalpixels.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbltotalpixels.Location = new System.Drawing.Point(114, 30); - this.lbltotalpixels.Name = "lbltotalpixels"; - this.lbltotalpixels.Size = new System.Drawing.Size(106, 29); - this.lbltotalpixels.TabIndex = 4; - this.lbltotalpixels.Text = "0"; - this.lbltotalpixels.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // txtnewcanvasheight - // - this.txtnewcanvasheight.BackColor = System.Drawing.Color.White; - this.txtnewcanvasheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtnewcanvasheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtnewcanvasheight.Location = new System.Drawing.Point(59, 37); - this.txtnewcanvasheight.MaxLength = 4; - this.txtnewcanvasheight.Name = "txtnewcanvasheight"; - this.txtnewcanvasheight.Size = new System.Drawing.Size(54, 22); - this.txtnewcanvasheight.TabIndex = 3; - this.txtnewcanvasheight.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); - // - // Label10 - // - this.Label10.AutoSize = true; - this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label10.Location = new System.Drawing.Point(8, 40); - this.Label10.Name = "Label10"; - this.Label10.Size = new System.Drawing.Size(50, 16); - this.Label10.TabIndex = 2; - this.Label10.Text = "Height:"; - // - // txtnewcanvaswidth - // - this.txtnewcanvaswidth.BackColor = System.Drawing.Color.White; - this.txtnewcanvaswidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtnewcanvaswidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtnewcanvaswidth.Location = new System.Drawing.Point(59, 9); - this.txtnewcanvaswidth.MaxLength = 4; - this.txtnewcanvaswidth.Name = "txtnewcanvaswidth"; - this.txtnewcanvaswidth.Size = new System.Drawing.Size(54, 22); - this.txtnewcanvaswidth.TabIndex = 1; - this.txtnewcanvaswidth.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); - // - // Label9 - // - this.Label9.AutoSize = true; - this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label9.Location = new System.Drawing.Point(8, 12); - this.Label9.Name = "Label9"; - this.Label9.Size = new System.Drawing.Size(45, 16); - this.Label9.TabIndex = 0; - this.Label9.Text = "Width:"; - // - // pnlpalletsize - // - this.pnlpalletsize.BackColor = System.Drawing.Color.White; - this.pnlpalletsize.Controls.Add(this.txttopspace); - this.pnlpalletsize.Controls.Add(this.Label40); - this.pnlpalletsize.Controls.Add(this.txtsidespace); - this.pnlpalletsize.Controls.Add(this.Label41); - this.pnlpalletsize.Controls.Add(this.btnchangesizecancel); - this.pnlpalletsize.Controls.Add(this.btnsetsize); - this.pnlpalletsize.Controls.Add(this.txtcolorpalletheight); - this.pnlpalletsize.Controls.Add(this.Label42); - this.pnlpalletsize.Controls.Add(this.txtcolorpalletwidth); - this.pnlpalletsize.Controls.Add(this.Label43); - this.pnlpalletsize.Location = new System.Drawing.Point(207, 178); - this.pnlpalletsize.Name = "pnlpalletsize"; - this.pnlpalletsize.Size = new System.Drawing.Size(259, 100); - this.pnlpalletsize.TabIndex = 2; - this.pnlpalletsize.Visible = false; - // - // txttopspace - // - this.txttopspace.BackColor = System.Drawing.Color.White; - this.txttopspace.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txttopspace.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txttopspace.Location = new System.Drawing.Point(198, 38); - this.txttopspace.Name = "txttopspace"; - this.txttopspace.Size = new System.Drawing.Size(54, 22); - this.txttopspace.TabIndex = 11; - // - // Label40 - // - this.Label40.AutoSize = true; - this.Label40.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label40.Location = new System.Drawing.Point(115, 40); - this.Label40.Name = "Label40"; - this.Label40.Size = new System.Drawing.Size(79, 16); - this.Label40.TabIndex = 10; - this.Label40.Text = "Top Space:"; - // - // txtsidespace - // - this.txtsidespace.BackColor = System.Drawing.Color.White; - this.txtsidespace.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtsidespace.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtsidespace.Location = new System.Drawing.Point(198, 10); - this.txtsidespace.Name = "txtsidespace"; - this.txtsidespace.Size = new System.Drawing.Size(54, 22); - this.txtsidespace.TabIndex = 9; - // - // Label41 - // - this.Label41.AutoSize = true; - this.Label41.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label41.Location = new System.Drawing.Point(115, 12); - this.Label41.Name = "Label41"; - this.Label41.Size = new System.Drawing.Size(82, 16); - this.Label41.TabIndex = 8; - this.Label41.Text = "Side Space:"; - // - // btnchangesizecancel - // - this.btnchangesizecancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnchangesizecancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnchangesizecancel.Location = new System.Drawing.Point(7, 66); - this.btnchangesizecancel.Name = "btnchangesizecancel"; - this.btnchangesizecancel.Size = new System.Drawing.Size(121, 28); - this.btnchangesizecancel.TabIndex = 7; - this.btnchangesizecancel.Text = "Close"; - this.btnchangesizecancel.UseVisualStyleBackColor = true; - // - // btnsetsize - // - this.btnsetsize.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsetsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnsetsize.Location = new System.Drawing.Point(133, 66); - this.btnsetsize.Name = "btnsetsize"; - this.btnsetsize.Size = new System.Drawing.Size(119, 28); - this.btnsetsize.TabIndex = 6; - this.btnsetsize.Text = "Set Size"; - this.btnsetsize.UseVisualStyleBackColor = true; - // - // txtcolorpalletheight - // - this.txtcolorpalletheight.BackColor = System.Drawing.Color.White; - this.txtcolorpalletheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtcolorpalletheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtcolorpalletheight.Location = new System.Drawing.Point(59, 37); - this.txtcolorpalletheight.Name = "txtcolorpalletheight"; - this.txtcolorpalletheight.Size = new System.Drawing.Size(54, 22); - this.txtcolorpalletheight.TabIndex = 3; - // - // Label42 - // - this.Label42.AutoSize = true; - this.Label42.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label42.Location = new System.Drawing.Point(8, 40); - this.Label42.Name = "Label42"; - this.Label42.Size = new System.Drawing.Size(50, 16); - this.Label42.TabIndex = 2; - this.Label42.Text = "Height:"; - // - // txtcolorpalletwidth - // - this.txtcolorpalletwidth.BackColor = System.Drawing.Color.White; - this.txtcolorpalletwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtcolorpalletwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtcolorpalletwidth.Location = new System.Drawing.Point(59, 9); - this.txtcolorpalletwidth.Name = "txtcolorpalletwidth"; - this.txtcolorpalletwidth.Size = new System.Drawing.Size(54, 22); - this.txtcolorpalletwidth.TabIndex = 1; - // - // Label43 - // - this.Label43.AutoSize = true; - this.Label43.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label43.Location = new System.Drawing.Point(8, 12); - this.Label43.Name = "Label43"; - this.Label43.Size = new System.Drawing.Size(45, 16); - this.Label43.TabIndex = 0; - this.Label43.Text = "Width:"; - // - // picdrawingdisplay - // - this.picdrawingdisplay.BackColor = System.Drawing.Color.White; - this.picdrawingdisplay.Location = new System.Drawing.Point(180, 108); - this.picdrawingdisplay.Name = "picdrawingdisplay"; - this.picdrawingdisplay.Size = new System.Drawing.Size(100, 50); - this.picdrawingdisplay.TabIndex = 0; - this.picdrawingdisplay.TabStop = false; - this.picdrawingdisplay.Visible = false; - this.picdrawingdisplay.Paint += new System.Windows.Forms.PaintEventHandler(this.picdrawingdisplay_Paint); - this.picdrawingdisplay.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseDown); - this.picdrawingdisplay.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseMove); - this.picdrawingdisplay.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseUp); - // - // pnlbottompanel - // - this.pnlbottompanel.Controls.Add(this.pnlpallet); - this.pnlbottompanel.Controls.Add(this.pnltoolproperties); - this.pnlbottompanel.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlbottompanel.Location = new System.Drawing.Point(120, 498); - this.pnlbottompanel.Name = "pnlbottompanel"; - this.pnlbottompanel.Size = new System.Drawing.Size(682, 100); - this.pnlbottompanel.TabIndex = 1; - // - // pnlpallet - // - this.pnlpallet.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlpallet.Controls.Add(this.flowcolours); - this.pnlpallet.Controls.Add(this.Label4); - this.pnlpallet.Controls.Add(this.line6); - this.pnlpallet.Location = new System.Drawing.Point(457, 0); - this.pnlpallet.Name = "pnlpallet"; - this.pnlpallet.Size = new System.Drawing.Size(225, 100); - this.pnlpallet.TabIndex = 0; - // - // flowcolours - // - this.flowcolours.Controls.Add(this.colourpallet1); - this.flowcolours.Controls.Add(this.colourpallet2); - this.flowcolours.Controls.Add(this.colourpallet3); - this.flowcolours.Controls.Add(this.colourpallet4); - this.flowcolours.Controls.Add(this.colourpallet5); - this.flowcolours.Controls.Add(this.colourpallet6); - this.flowcolours.Controls.Add(this.colourpallet7); - this.flowcolours.Controls.Add(this.colourpallet8); - this.flowcolours.Controls.Add(this.colourpallet9); - this.flowcolours.Controls.Add(this.colourpallet10); - this.flowcolours.Controls.Add(this.colourpallet11); - this.flowcolours.Controls.Add(this.colourpallet12); - this.flowcolours.Controls.Add(this.colourpallet13); - this.flowcolours.Controls.Add(this.colourpallet14); - this.flowcolours.Controls.Add(this.colourpallet15); - this.flowcolours.Controls.Add(this.colourpallet16); - this.flowcolours.Controls.Add(this.colourpallet17); - this.flowcolours.Controls.Add(this.colourpallet18); - this.flowcolours.Controls.Add(this.colourpallet19); - this.flowcolours.Controls.Add(this.colourpallet20); - this.flowcolours.Controls.Add(this.colourpallet21); - this.flowcolours.Controls.Add(this.colourpallet22); - this.flowcolours.Controls.Add(this.colourpallet23); - this.flowcolours.Controls.Add(this.colourpallet24); - this.flowcolours.Controls.Add(this.colourpallet25); - this.flowcolours.Controls.Add(this.colourpallet26); - this.flowcolours.Controls.Add(this.colourpallet27); - this.flowcolours.Controls.Add(this.colourpallet28); - this.flowcolours.Controls.Add(this.colourpallet29); - this.flowcolours.Controls.Add(this.colourpallet30); - this.flowcolours.Controls.Add(this.colourpallet31); - this.flowcolours.Controls.Add(this.colourpallet32); - this.flowcolours.Controls.Add(this.colourpallet33); - this.flowcolours.Controls.Add(this.colourpallet34); - this.flowcolours.Controls.Add(this.colourpallet35); - this.flowcolours.Controls.Add(this.colourpallet36); - this.flowcolours.Controls.Add(this.colourpallet37); - this.flowcolours.Controls.Add(this.colourpallet38); - this.flowcolours.Controls.Add(this.colourpallet39); - this.flowcolours.Controls.Add(this.colourpallet40); - this.flowcolours.Controls.Add(this.colourpallet41); - this.flowcolours.Controls.Add(this.colourpallet42); - this.flowcolours.Controls.Add(this.colourpallet43); - this.flowcolours.Controls.Add(this.colourpallet44); - this.flowcolours.Controls.Add(this.colourpallet45); - this.flowcolours.Controls.Add(this.colourpallet46); - this.flowcolours.Controls.Add(this.colourpallet47); - this.flowcolours.Controls.Add(this.colourpallet48); - this.flowcolours.Controls.Add(this.colourpallet49); - this.flowcolours.Controls.Add(this.colourpallet50); - this.flowcolours.Controls.Add(this.colourpallet51); - this.flowcolours.Controls.Add(this.colourpallet52); - this.flowcolours.Controls.Add(this.colourpallet53); - this.flowcolours.Controls.Add(this.colourpallet54); - this.flowcolours.Controls.Add(this.colourpallet55); - this.flowcolours.Controls.Add(this.colourpallet56); - this.flowcolours.Controls.Add(this.colourpallet57); - this.flowcolours.Controls.Add(this.colourpallet58); - this.flowcolours.Controls.Add(this.colourpallet59); - this.flowcolours.Controls.Add(this.colourpallet60); - this.flowcolours.Controls.Add(this.colourpallet61); - this.flowcolours.Controls.Add(this.colourpallet62); - this.flowcolours.Controls.Add(this.colourpallet63); - this.flowcolours.Controls.Add(this.colourpallet64); - this.flowcolours.Controls.Add(this.colourpallet65); - this.flowcolours.Controls.Add(this.colourpallet66); - this.flowcolours.Controls.Add(this.colourpallet67); - this.flowcolours.Controls.Add(this.colourpallet68); - this.flowcolours.Controls.Add(this.colourpallet69); - this.flowcolours.Controls.Add(this.colourpallet70); - this.flowcolours.Controls.Add(this.colourpallet71); - this.flowcolours.Controls.Add(this.colourpallet72); - this.flowcolours.Controls.Add(this.colourpallet73); - this.flowcolours.Controls.Add(this.colourpallet74); - this.flowcolours.Controls.Add(this.colourpallet75); - this.flowcolours.Controls.Add(this.colourpallet76); - this.flowcolours.Controls.Add(this.colourpallet77); - this.flowcolours.Controls.Add(this.colourpallet78); - this.flowcolours.Controls.Add(this.colourpallet79); - this.flowcolours.Controls.Add(this.colourpallet80); - this.flowcolours.Controls.Add(this.colourpallet81); - this.flowcolours.Controls.Add(this.colourpallet82); - this.flowcolours.Controls.Add(this.colourpallet83); - this.flowcolours.Controls.Add(this.colourpallet84); - this.flowcolours.Controls.Add(this.colourpallet85); - this.flowcolours.Controls.Add(this.colourpallet86); - this.flowcolours.Controls.Add(this.colourpallet87); - this.flowcolours.Controls.Add(this.colourpallet88); - this.flowcolours.Controls.Add(this.colourpallet89); - this.flowcolours.Controls.Add(this.colourpallet90); - this.flowcolours.Controls.Add(this.colourpallet91); - this.flowcolours.Controls.Add(this.colourpallet92); - this.flowcolours.Controls.Add(this.colourpallet93); - this.flowcolours.Controls.Add(this.colourpallet94); - this.flowcolours.Controls.Add(this.colourpallet95); - this.flowcolours.Controls.Add(this.colourpallet96); - this.flowcolours.Controls.Add(this.colourpallet97); - this.flowcolours.Controls.Add(this.colourpallet98); - this.flowcolours.Controls.Add(this.colourpallet99); - this.flowcolours.Controls.Add(this.colourpallet100); - this.flowcolours.Controls.Add(this.colourpallet101); - this.flowcolours.Controls.Add(this.colourpallet102); - this.flowcolours.Controls.Add(this.colourpallet103); - this.flowcolours.Controls.Add(this.colourpallet104); - this.flowcolours.Controls.Add(this.colourpallet105); - this.flowcolours.Controls.Add(this.colourpallet106); - this.flowcolours.Controls.Add(this.colourpallet107); - this.flowcolours.Controls.Add(this.colourpallet108); - this.flowcolours.Controls.Add(this.colourpallet109); - this.flowcolours.Controls.Add(this.colourpallet110); - this.flowcolours.Controls.Add(this.colourpallet111); - this.flowcolours.Controls.Add(this.colourpallet112); - this.flowcolours.Controls.Add(this.colourpallet113); - this.flowcolours.Controls.Add(this.colourpallet114); - this.flowcolours.Controls.Add(this.colourpallet115); - this.flowcolours.Controls.Add(this.colourpallet116); - this.flowcolours.Controls.Add(this.colourpallet117); - this.flowcolours.Controls.Add(this.colourpallet118); - this.flowcolours.Controls.Add(this.colourpallet119); - this.flowcolours.Controls.Add(this.colourpallet120); - this.flowcolours.Controls.Add(this.colourpallet121); - this.flowcolours.Controls.Add(this.colourpallet122); - this.flowcolours.Controls.Add(this.colourpallet123); - this.flowcolours.Controls.Add(this.colourpallet124); - this.flowcolours.Controls.Add(this.colourpallet125); - this.flowcolours.Controls.Add(this.colourpallet126); - this.flowcolours.Controls.Add(this.colourpallet127); - this.flowcolours.Controls.Add(this.colourpallet128); - this.flowcolours.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flowcolours.Location = new System.Drawing.Point(0, 27); - this.flowcolours.Name = "flowcolours"; - this.flowcolours.Padding = new System.Windows.Forms.Padding(1, 1, 0, 0); - this.flowcolours.Size = new System.Drawing.Size(225, 73); - this.flowcolours.TabIndex = 12; - // - // colourpallet1 - // - this.colourpallet1.BackColor = System.Drawing.Color.Black; - this.colourpallet1.Location = new System.Drawing.Point(2, 1); - this.colourpallet1.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet1.Name = "colourpallet1"; - this.colourpallet1.Size = new System.Drawing.Size(12, 8); - this.colourpallet1.TabIndex = 5; - this.colourpallet1.Visible = false; - // - // colourpallet2 - // - this.colourpallet2.BackColor = System.Drawing.Color.Black; - this.colourpallet2.Location = new System.Drawing.Point(15, 1); - this.colourpallet2.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet2.Name = "colourpallet2"; - this.colourpallet2.Size = new System.Drawing.Size(12, 8); - this.colourpallet2.TabIndex = 9; - this.colourpallet2.Visible = false; - // - // colourpallet3 - // - this.colourpallet3.BackColor = System.Drawing.Color.Black; - this.colourpallet3.Location = new System.Drawing.Point(28, 1); - this.colourpallet3.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet3.Name = "colourpallet3"; - this.colourpallet3.Size = new System.Drawing.Size(12, 8); - this.colourpallet3.TabIndex = 13; - this.colourpallet3.Visible = false; - // - // colourpallet4 - // - this.colourpallet4.BackColor = System.Drawing.Color.Black; - this.colourpallet4.Location = new System.Drawing.Point(41, 1); - this.colourpallet4.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet4.Name = "colourpallet4"; - this.colourpallet4.Size = new System.Drawing.Size(12, 8); - this.colourpallet4.TabIndex = 9; - this.colourpallet4.Visible = false; - // - // colourpallet5 - // - this.colourpallet5.BackColor = System.Drawing.Color.Black; - this.colourpallet5.Location = new System.Drawing.Point(54, 1); - this.colourpallet5.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet5.Name = "colourpallet5"; - this.colourpallet5.Size = new System.Drawing.Size(12, 8); - this.colourpallet5.TabIndex = 18; - this.colourpallet5.Visible = false; - // - // colourpallet6 - // - this.colourpallet6.BackColor = System.Drawing.Color.Black; - this.colourpallet6.Location = new System.Drawing.Point(67, 1); - this.colourpallet6.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet6.Name = "colourpallet6"; - this.colourpallet6.Size = new System.Drawing.Size(12, 8); - this.colourpallet6.TabIndex = 17; - this.colourpallet6.Visible = false; - // - // colourpallet7 - // - this.colourpallet7.BackColor = System.Drawing.Color.Black; - this.colourpallet7.Location = new System.Drawing.Point(80, 1); - this.colourpallet7.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet7.Name = "colourpallet7"; - this.colourpallet7.Size = new System.Drawing.Size(12, 8); - this.colourpallet7.TabIndex = 14; - this.colourpallet7.Visible = false; - // - // colourpallet8 - // - this.colourpallet8.BackColor = System.Drawing.Color.Black; - this.colourpallet8.Location = new System.Drawing.Point(93, 1); - this.colourpallet8.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet8.Name = "colourpallet8"; - this.colourpallet8.Size = new System.Drawing.Size(12, 8); - this.colourpallet8.TabIndex = 13; - this.colourpallet8.Visible = false; - // - // colourpallet9 - // - this.colourpallet9.BackColor = System.Drawing.Color.Black; - this.colourpallet9.Location = new System.Drawing.Point(106, 1); - this.colourpallet9.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet9.Name = "colourpallet9"; - this.colourpallet9.Size = new System.Drawing.Size(12, 8); - this.colourpallet9.TabIndex = 15; - this.colourpallet9.Visible = false; - // - // colourpallet10 - // - this.colourpallet10.BackColor = System.Drawing.Color.Black; - this.colourpallet10.Location = new System.Drawing.Point(119, 1); - this.colourpallet10.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet10.Name = "colourpallet10"; - this.colourpallet10.Size = new System.Drawing.Size(12, 8); - this.colourpallet10.TabIndex = 11; - this.colourpallet10.Visible = false; - // - // colourpallet11 - // - this.colourpallet11.BackColor = System.Drawing.Color.Black; - this.colourpallet11.Location = new System.Drawing.Point(132, 1); - this.colourpallet11.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet11.Name = "colourpallet11"; - this.colourpallet11.Size = new System.Drawing.Size(12, 8); - this.colourpallet11.TabIndex = 12; - this.colourpallet11.Visible = false; - // - // colourpallet12 - // - this.colourpallet12.BackColor = System.Drawing.Color.Black; - this.colourpallet12.Location = new System.Drawing.Point(145, 1); - this.colourpallet12.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet12.Name = "colourpallet12"; - this.colourpallet12.Size = new System.Drawing.Size(12, 8); - this.colourpallet12.TabIndex = 16; - this.colourpallet12.Visible = false; - // - // colourpallet13 - // - this.colourpallet13.BackColor = System.Drawing.Color.Black; - this.colourpallet13.Location = new System.Drawing.Point(158, 1); - this.colourpallet13.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet13.Name = "colourpallet13"; - this.colourpallet13.Size = new System.Drawing.Size(12, 8); - this.colourpallet13.TabIndex = 10; - this.colourpallet13.Visible = false; - // - // colourpallet14 - // - this.colourpallet14.BackColor = System.Drawing.Color.Black; - this.colourpallet14.Location = new System.Drawing.Point(171, 1); - this.colourpallet14.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet14.Name = "colourpallet14"; - this.colourpallet14.Size = new System.Drawing.Size(12, 8); - this.colourpallet14.TabIndex = 20; - this.colourpallet14.Visible = false; - // - // colourpallet15 - // - this.colourpallet15.BackColor = System.Drawing.Color.Black; - this.colourpallet15.Location = new System.Drawing.Point(184, 1); - this.colourpallet15.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet15.Name = "colourpallet15"; - this.colourpallet15.Size = new System.Drawing.Size(12, 8); - this.colourpallet15.TabIndex = 14; - this.colourpallet15.Visible = false; - // - // colourpallet16 - // - this.colourpallet16.BackColor = System.Drawing.Color.Black; - this.colourpallet16.Location = new System.Drawing.Point(197, 1); - this.colourpallet16.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet16.Name = "colourpallet16"; - this.colourpallet16.Size = new System.Drawing.Size(12, 8); - this.colourpallet16.TabIndex = 16; - this.colourpallet16.Visible = false; - // - // colourpallet17 - // - this.colourpallet17.BackColor = System.Drawing.Color.Black; - this.colourpallet17.Location = new System.Drawing.Point(210, 1); - this.colourpallet17.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet17.Name = "colourpallet17"; - this.colourpallet17.Size = new System.Drawing.Size(12, 8); - this.colourpallet17.TabIndex = 11; - this.colourpallet17.Visible = false; - // - // colourpallet18 - // - this.colourpallet18.BackColor = System.Drawing.Color.Black; - this.colourpallet18.Location = new System.Drawing.Point(2, 10); - this.colourpallet18.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet18.Name = "colourpallet18"; - this.colourpallet18.Size = new System.Drawing.Size(12, 8); - this.colourpallet18.TabIndex = 8; - this.colourpallet18.Visible = false; - // - // colourpallet19 - // - this.colourpallet19.BackColor = System.Drawing.Color.Black; - this.colourpallet19.Location = new System.Drawing.Point(15, 10); - this.colourpallet19.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet19.Name = "colourpallet19"; - this.colourpallet19.Size = new System.Drawing.Size(12, 8); - this.colourpallet19.TabIndex = 24; - this.colourpallet19.Visible = false; - // - // colourpallet20 - // - this.colourpallet20.BackColor = System.Drawing.Color.Black; - this.colourpallet20.Location = new System.Drawing.Point(28, 10); - this.colourpallet20.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet20.Name = "colourpallet20"; - this.colourpallet20.Size = new System.Drawing.Size(12, 8); - this.colourpallet20.TabIndex = 12; - this.colourpallet20.Visible = false; - // - // colourpallet21 - // - this.colourpallet21.BackColor = System.Drawing.Color.Black; - this.colourpallet21.Location = new System.Drawing.Point(41, 10); - this.colourpallet21.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet21.Name = "colourpallet21"; - this.colourpallet21.Size = new System.Drawing.Size(12, 8); - this.colourpallet21.TabIndex = 20; - this.colourpallet21.Visible = false; - // - // colourpallet22 - // - this.colourpallet22.BackColor = System.Drawing.Color.Black; - this.colourpallet22.Location = new System.Drawing.Point(54, 10); - this.colourpallet22.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet22.Name = "colourpallet22"; - this.colourpallet22.Size = new System.Drawing.Size(12, 8); - this.colourpallet22.TabIndex = 8; - this.colourpallet22.Visible = false; - // - // colourpallet23 - // - this.colourpallet23.BackColor = System.Drawing.Color.Black; - this.colourpallet23.Location = new System.Drawing.Point(67, 10); - this.colourpallet23.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet23.Name = "colourpallet23"; - this.colourpallet23.Size = new System.Drawing.Size(12, 8); - this.colourpallet23.TabIndex = 19; - this.colourpallet23.Visible = false; - // - // colourpallet24 - // - this.colourpallet24.BackColor = System.Drawing.Color.Black; - this.colourpallet24.Location = new System.Drawing.Point(80, 10); - this.colourpallet24.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet24.Name = "colourpallet24"; - this.colourpallet24.Size = new System.Drawing.Size(12, 8); - this.colourpallet24.TabIndex = 10; - this.colourpallet24.Visible = false; - // - // colourpallet25 - // - this.colourpallet25.BackColor = System.Drawing.Color.Black; - this.colourpallet25.Location = new System.Drawing.Point(93, 10); - this.colourpallet25.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet25.Name = "colourpallet25"; - this.colourpallet25.Size = new System.Drawing.Size(12, 8); - this.colourpallet25.TabIndex = 15; - this.colourpallet25.Visible = false; - // - // colourpallet26 - // - this.colourpallet26.BackColor = System.Drawing.Color.Black; - this.colourpallet26.Location = new System.Drawing.Point(106, 10); - this.colourpallet26.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet26.Name = "colourpallet26"; - this.colourpallet26.Size = new System.Drawing.Size(12, 8); - this.colourpallet26.TabIndex = 23; - this.colourpallet26.Visible = false; - // - // colourpallet27 - // - this.colourpallet27.BackColor = System.Drawing.Color.Black; - this.colourpallet27.Location = new System.Drawing.Point(119, 10); - this.colourpallet27.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet27.Name = "colourpallet27"; - this.colourpallet27.Size = new System.Drawing.Size(12, 8); - this.colourpallet27.TabIndex = 6; - this.colourpallet27.Visible = false; - // - // colourpallet28 - // - this.colourpallet28.BackColor = System.Drawing.Color.Black; - this.colourpallet28.Location = new System.Drawing.Point(132, 10); - this.colourpallet28.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet28.Name = "colourpallet28"; - this.colourpallet28.Size = new System.Drawing.Size(12, 8); - this.colourpallet28.TabIndex = 19; - this.colourpallet28.Visible = false; - // - // colourpallet29 - // - this.colourpallet29.BackColor = System.Drawing.Color.Black; - this.colourpallet29.Location = new System.Drawing.Point(145, 10); - this.colourpallet29.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet29.Name = "colourpallet29"; - this.colourpallet29.Size = new System.Drawing.Size(12, 8); - this.colourpallet29.TabIndex = 22; - this.colourpallet29.Visible = false; - // - // colourpallet30 - // - this.colourpallet30.BackColor = System.Drawing.Color.Black; - this.colourpallet30.Location = new System.Drawing.Point(158, 10); - this.colourpallet30.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet30.Name = "colourpallet30"; - this.colourpallet30.Size = new System.Drawing.Size(12, 8); - this.colourpallet30.TabIndex = 18; - this.colourpallet30.Visible = false; - // - // colourpallet31 - // - this.colourpallet31.BackColor = System.Drawing.Color.Black; - this.colourpallet31.Location = new System.Drawing.Point(171, 10); - this.colourpallet31.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet31.Name = "colourpallet31"; - this.colourpallet31.Size = new System.Drawing.Size(12, 8); - this.colourpallet31.TabIndex = 21; - this.colourpallet31.Visible = false; - // - // colourpallet32 - // - this.colourpallet32.BackColor = System.Drawing.Color.Black; - this.colourpallet32.Location = new System.Drawing.Point(184, 10); - this.colourpallet32.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet32.Name = "colourpallet32"; - this.colourpallet32.Size = new System.Drawing.Size(12, 8); - this.colourpallet32.TabIndex = 17; - this.colourpallet32.Visible = false; - // - // colourpallet33 - // - this.colourpallet33.BackColor = System.Drawing.Color.Black; - this.colourpallet33.Location = new System.Drawing.Point(197, 10); - this.colourpallet33.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet33.Name = "colourpallet33"; - this.colourpallet33.Size = new System.Drawing.Size(12, 8); - this.colourpallet33.TabIndex = 50; - this.colourpallet33.Visible = false; - // - // colourpallet34 - // - this.colourpallet34.BackColor = System.Drawing.Color.Black; - this.colourpallet34.Location = new System.Drawing.Point(210, 10); - this.colourpallet34.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet34.Name = "colourpallet34"; - this.colourpallet34.Size = new System.Drawing.Size(12, 8); - this.colourpallet34.TabIndex = 46; - this.colourpallet34.Visible = false; - // - // colourpallet35 - // - this.colourpallet35.BackColor = System.Drawing.Color.Black; - this.colourpallet35.Location = new System.Drawing.Point(2, 19); - this.colourpallet35.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet35.Name = "colourpallet35"; - this.colourpallet35.Size = new System.Drawing.Size(12, 8); - this.colourpallet35.TabIndex = 53; - this.colourpallet35.Visible = false; - // - // colourpallet36 - // - this.colourpallet36.BackColor = System.Drawing.Color.Black; - this.colourpallet36.Location = new System.Drawing.Point(15, 19); - this.colourpallet36.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet36.Name = "colourpallet36"; - this.colourpallet36.Size = new System.Drawing.Size(12, 8); - this.colourpallet36.TabIndex = 48; - this.colourpallet36.Visible = false; - // - // colourpallet37 - // - this.colourpallet37.BackColor = System.Drawing.Color.Black; - this.colourpallet37.Location = new System.Drawing.Point(28, 19); - this.colourpallet37.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet37.Name = "colourpallet37"; - this.colourpallet37.Size = new System.Drawing.Size(12, 8); - this.colourpallet37.TabIndex = 54; - this.colourpallet37.Visible = false; - // - // colourpallet38 - // - this.colourpallet38.BackColor = System.Drawing.Color.Black; - this.colourpallet38.Location = new System.Drawing.Point(41, 19); - this.colourpallet38.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet38.Name = "colourpallet38"; - this.colourpallet38.Size = new System.Drawing.Size(12, 8); - this.colourpallet38.TabIndex = 26; - this.colourpallet38.Visible = false; - // - // colourpallet39 - // - this.colourpallet39.BackColor = System.Drawing.Color.Black; - this.colourpallet39.Location = new System.Drawing.Point(54, 19); - this.colourpallet39.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet39.Name = "colourpallet39"; - this.colourpallet39.Size = new System.Drawing.Size(12, 8); - this.colourpallet39.TabIndex = 55; - this.colourpallet39.Visible = false; - // - // colourpallet40 - // - this.colourpallet40.BackColor = System.Drawing.Color.Black; - this.colourpallet40.Location = new System.Drawing.Point(67, 19); - this.colourpallet40.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet40.Name = "colourpallet40"; - this.colourpallet40.Size = new System.Drawing.Size(12, 8); - this.colourpallet40.TabIndex = 41; - this.colourpallet40.Visible = false; - // - // colourpallet41 - // - this.colourpallet41.BackColor = System.Drawing.Color.Black; - this.colourpallet41.Location = new System.Drawing.Point(80, 19); - this.colourpallet41.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet41.Name = "colourpallet41"; - this.colourpallet41.Size = new System.Drawing.Size(12, 8); - this.colourpallet41.TabIndex = 31; - this.colourpallet41.Visible = false; - // - // colourpallet42 - // - this.colourpallet42.BackColor = System.Drawing.Color.Black; - this.colourpallet42.Location = new System.Drawing.Point(93, 19); - this.colourpallet42.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet42.Name = "colourpallet42"; - this.colourpallet42.Size = new System.Drawing.Size(12, 8); - this.colourpallet42.TabIndex = 49; - this.colourpallet42.Visible = false; - // - // colourpallet43 - // - this.colourpallet43.BackColor = System.Drawing.Color.Black; - this.colourpallet43.Location = new System.Drawing.Point(106, 19); - this.colourpallet43.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet43.Name = "colourpallet43"; - this.colourpallet43.Size = new System.Drawing.Size(12, 8); - this.colourpallet43.TabIndex = 27; - this.colourpallet43.Visible = false; - // - // colourpallet44 - // - this.colourpallet44.BackColor = System.Drawing.Color.Black; - this.colourpallet44.Location = new System.Drawing.Point(119, 19); - this.colourpallet44.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet44.Name = "colourpallet44"; - this.colourpallet44.Size = new System.Drawing.Size(12, 8); - this.colourpallet44.TabIndex = 51; - this.colourpallet44.Visible = false; - // - // colourpallet45 - // - this.colourpallet45.BackColor = System.Drawing.Color.Black; - this.colourpallet45.Location = new System.Drawing.Point(132, 19); - this.colourpallet45.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet45.Name = "colourpallet45"; - this.colourpallet45.Size = new System.Drawing.Size(12, 8); - this.colourpallet45.TabIndex = 36; - this.colourpallet45.Visible = false; - // - // colourpallet46 - // - this.colourpallet46.BackColor = System.Drawing.Color.Black; - this.colourpallet46.Location = new System.Drawing.Point(145, 19); - this.colourpallet46.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet46.Name = "colourpallet46"; - this.colourpallet46.Size = new System.Drawing.Size(12, 8); - this.colourpallet46.TabIndex = 56; - this.colourpallet46.Visible = false; - // - // colourpallet47 - // - this.colourpallet47.BackColor = System.Drawing.Color.Black; - this.colourpallet47.Location = new System.Drawing.Point(158, 19); - this.colourpallet47.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet47.Name = "colourpallet47"; - this.colourpallet47.Size = new System.Drawing.Size(12, 8); - this.colourpallet47.TabIndex = 28; - this.colourpallet47.Visible = false; - // - // colourpallet48 - // - this.colourpallet48.BackColor = System.Drawing.Color.Black; - this.colourpallet48.Location = new System.Drawing.Point(171, 19); - this.colourpallet48.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet48.Name = "colourpallet48"; - this.colourpallet48.Size = new System.Drawing.Size(12, 8); - this.colourpallet48.TabIndex = 33; - this.colourpallet48.Visible = false; - // - // colourpallet49 - // - this.colourpallet49.BackColor = System.Drawing.Color.Black; - this.colourpallet49.Location = new System.Drawing.Point(184, 19); - this.colourpallet49.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet49.Name = "colourpallet49"; - this.colourpallet49.Size = new System.Drawing.Size(12, 8); - this.colourpallet49.TabIndex = 43; - this.colourpallet49.Visible = false; - // - // colourpallet50 - // - this.colourpallet50.BackColor = System.Drawing.Color.Black; - this.colourpallet50.Location = new System.Drawing.Point(197, 19); - this.colourpallet50.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet50.Name = "colourpallet50"; - this.colourpallet50.Size = new System.Drawing.Size(12, 8); - this.colourpallet50.TabIndex = 40; - this.colourpallet50.Visible = false; - // - // colourpallet51 - // - this.colourpallet51.BackColor = System.Drawing.Color.Black; - this.colourpallet51.Location = new System.Drawing.Point(210, 19); - this.colourpallet51.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet51.Name = "colourpallet51"; - this.colourpallet51.Size = new System.Drawing.Size(12, 8); - this.colourpallet51.TabIndex = 52; - this.colourpallet51.Visible = false; - // - // colourpallet52 - // - this.colourpallet52.BackColor = System.Drawing.Color.Black; - this.colourpallet52.Location = new System.Drawing.Point(2, 28); - this.colourpallet52.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet52.Name = "colourpallet52"; - this.colourpallet52.Size = new System.Drawing.Size(12, 8); - this.colourpallet52.TabIndex = 32; - this.colourpallet52.Visible = false; - // - // colourpallet53 - // - this.colourpallet53.BackColor = System.Drawing.Color.Black; - this.colourpallet53.Location = new System.Drawing.Point(15, 28); - this.colourpallet53.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet53.Name = "colourpallet53"; - this.colourpallet53.Size = new System.Drawing.Size(12, 8); - this.colourpallet53.TabIndex = 44; - this.colourpallet53.Visible = false; - // - // colourpallet54 - // - this.colourpallet54.BackColor = System.Drawing.Color.Black; - this.colourpallet54.Location = new System.Drawing.Point(28, 28); - this.colourpallet54.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet54.Name = "colourpallet54"; - this.colourpallet54.Size = new System.Drawing.Size(12, 8); - this.colourpallet54.TabIndex = 35; - this.colourpallet54.Visible = false; - // - // colourpallet55 - // - this.colourpallet55.BackColor = System.Drawing.Color.Black; - this.colourpallet55.Location = new System.Drawing.Point(41, 28); - this.colourpallet55.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet55.Name = "colourpallet55"; - this.colourpallet55.Size = new System.Drawing.Size(12, 8); - this.colourpallet55.TabIndex = 34; - this.colourpallet55.Visible = false; - // - // colourpallet56 - // - this.colourpallet56.BackColor = System.Drawing.Color.Black; - this.colourpallet56.Location = new System.Drawing.Point(54, 28); - this.colourpallet56.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet56.Name = "colourpallet56"; - this.colourpallet56.Size = new System.Drawing.Size(12, 8); - this.colourpallet56.TabIndex = 42; - this.colourpallet56.Visible = false; - // - // colourpallet57 - // - this.colourpallet57.BackColor = System.Drawing.Color.Black; - this.colourpallet57.Location = new System.Drawing.Point(67, 28); - this.colourpallet57.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet57.Name = "colourpallet57"; - this.colourpallet57.Size = new System.Drawing.Size(12, 8); - this.colourpallet57.TabIndex = 38; - this.colourpallet57.Visible = false; - // - // colourpallet58 - // - this.colourpallet58.BackColor = System.Drawing.Color.Black; - this.colourpallet58.Location = new System.Drawing.Point(80, 28); - this.colourpallet58.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet58.Name = "colourpallet58"; - this.colourpallet58.Size = new System.Drawing.Size(12, 8); - this.colourpallet58.TabIndex = 39; - this.colourpallet58.Visible = false; - // - // colourpallet59 - // - this.colourpallet59.BackColor = System.Drawing.Color.Black; - this.colourpallet59.Location = new System.Drawing.Point(93, 28); - this.colourpallet59.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet59.Name = "colourpallet59"; - this.colourpallet59.Size = new System.Drawing.Size(12, 8); - this.colourpallet59.TabIndex = 45; - this.colourpallet59.Visible = false; - // - // colourpallet60 - // - this.colourpallet60.BackColor = System.Drawing.Color.Black; - this.colourpallet60.Location = new System.Drawing.Point(106, 28); - this.colourpallet60.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet60.Name = "colourpallet60"; - this.colourpallet60.Size = new System.Drawing.Size(12, 8); - this.colourpallet60.TabIndex = 47; - this.colourpallet60.Visible = false; - // - // colourpallet61 - // - this.colourpallet61.BackColor = System.Drawing.Color.Black; - this.colourpallet61.Location = new System.Drawing.Point(119, 28); - this.colourpallet61.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet61.Name = "colourpallet61"; - this.colourpallet61.Size = new System.Drawing.Size(12, 8); - this.colourpallet61.TabIndex = 30; - this.colourpallet61.Visible = false; - // - // colourpallet62 - // - this.colourpallet62.BackColor = System.Drawing.Color.Black; - this.colourpallet62.Location = new System.Drawing.Point(132, 28); - this.colourpallet62.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet62.Name = "colourpallet62"; - this.colourpallet62.Size = new System.Drawing.Size(12, 8); - this.colourpallet62.TabIndex = 37; - this.colourpallet62.Visible = false; - // - // colourpallet63 - // - this.colourpallet63.BackColor = System.Drawing.Color.Black; - this.colourpallet63.Location = new System.Drawing.Point(145, 28); - this.colourpallet63.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet63.Name = "colourpallet63"; - this.colourpallet63.Size = new System.Drawing.Size(12, 8); - this.colourpallet63.TabIndex = 29; - this.colourpallet63.Visible = false; - // - // colourpallet64 - // - this.colourpallet64.BackColor = System.Drawing.Color.Black; - this.colourpallet64.Location = new System.Drawing.Point(158, 28); - this.colourpallet64.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet64.Name = "colourpallet64"; - this.colourpallet64.Size = new System.Drawing.Size(12, 8); - this.colourpallet64.TabIndex = 25; - this.colourpallet64.Visible = false; - // - // colourpallet65 - // - this.colourpallet65.BackColor = System.Drawing.Color.Black; - this.colourpallet65.Location = new System.Drawing.Point(171, 28); - this.colourpallet65.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet65.Name = "colourpallet65"; - this.colourpallet65.Size = new System.Drawing.Size(12, 8); - this.colourpallet65.TabIndex = 57; - this.colourpallet65.Visible = false; - // - // colourpallet66 - // - this.colourpallet66.BackColor = System.Drawing.Color.Black; - this.colourpallet66.Location = new System.Drawing.Point(184, 28); - this.colourpallet66.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet66.Name = "colourpallet66"; - this.colourpallet66.Size = new System.Drawing.Size(12, 8); - this.colourpallet66.TabIndex = 61; - this.colourpallet66.Visible = false; - // - // colourpallet67 - // - this.colourpallet67.BackColor = System.Drawing.Color.Black; - this.colourpallet67.Location = new System.Drawing.Point(197, 28); - this.colourpallet67.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet67.Name = "colourpallet67"; - this.colourpallet67.Size = new System.Drawing.Size(12, 8); - this.colourpallet67.TabIndex = 69; - this.colourpallet67.Visible = false; - // - // colourpallet68 - // - this.colourpallet68.BackColor = System.Drawing.Color.Black; - this.colourpallet68.Location = new System.Drawing.Point(210, 28); - this.colourpallet68.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet68.Name = "colourpallet68"; - this.colourpallet68.Size = new System.Drawing.Size(12, 8); - this.colourpallet68.TabIndex = 62; - this.colourpallet68.Visible = false; - // - // colourpallet69 - // - this.colourpallet69.BackColor = System.Drawing.Color.Black; - this.colourpallet69.Location = new System.Drawing.Point(2, 37); - this.colourpallet69.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet69.Name = "colourpallet69"; - this.colourpallet69.Size = new System.Drawing.Size(12, 8); - this.colourpallet69.TabIndex = 79; - this.colourpallet69.Visible = false; - // - // colourpallet70 - // - this.colourpallet70.BackColor = System.Drawing.Color.Black; - this.colourpallet70.Location = new System.Drawing.Point(15, 37); - this.colourpallet70.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet70.Name = "colourpallet70"; - this.colourpallet70.Size = new System.Drawing.Size(12, 8); - this.colourpallet70.TabIndex = 77; - this.colourpallet70.Visible = false; - // - // colourpallet71 - // - this.colourpallet71.BackColor = System.Drawing.Color.Black; - this.colourpallet71.Location = new System.Drawing.Point(28, 37); - this.colourpallet71.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet71.Name = "colourpallet71"; - this.colourpallet71.Size = new System.Drawing.Size(12, 8); - this.colourpallet71.TabIndex = 71; - this.colourpallet71.Visible = false; - // - // colourpallet72 - // - this.colourpallet72.BackColor = System.Drawing.Color.Black; - this.colourpallet72.Location = new System.Drawing.Point(41, 37); - this.colourpallet72.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet72.Name = "colourpallet72"; - this.colourpallet72.Size = new System.Drawing.Size(12, 8); - this.colourpallet72.TabIndex = 70; - this.colourpallet72.Visible = false; - // - // colourpallet73 - // - this.colourpallet73.BackColor = System.Drawing.Color.Black; - this.colourpallet73.Location = new System.Drawing.Point(54, 37); - this.colourpallet73.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet73.Name = "colourpallet73"; - this.colourpallet73.Size = new System.Drawing.Size(12, 8); - this.colourpallet73.TabIndex = 74; - this.colourpallet73.Visible = false; - // - // colourpallet74 - // - this.colourpallet74.BackColor = System.Drawing.Color.Black; - this.colourpallet74.Location = new System.Drawing.Point(67, 37); - this.colourpallet74.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet74.Name = "colourpallet74"; - this.colourpallet74.Size = new System.Drawing.Size(12, 8); - this.colourpallet74.TabIndex = 66; - this.colourpallet74.Visible = false; - // - // colourpallet75 - // - this.colourpallet75.BackColor = System.Drawing.Color.Black; - this.colourpallet75.Location = new System.Drawing.Point(80, 37); - this.colourpallet75.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet75.Name = "colourpallet75"; - this.colourpallet75.Size = new System.Drawing.Size(12, 8); - this.colourpallet75.TabIndex = 67; - this.colourpallet75.Visible = false; - // - // colourpallet76 - // - this.colourpallet76.BackColor = System.Drawing.Color.Black; - this.colourpallet76.Location = new System.Drawing.Point(93, 37); - this.colourpallet76.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet76.Name = "colourpallet76"; - this.colourpallet76.Size = new System.Drawing.Size(12, 8); - this.colourpallet76.TabIndex = 76; - this.colourpallet76.Visible = false; - // - // colourpallet77 - // - this.colourpallet77.BackColor = System.Drawing.Color.Black; - this.colourpallet77.Location = new System.Drawing.Point(106, 37); - this.colourpallet77.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet77.Name = "colourpallet77"; - this.colourpallet77.Size = new System.Drawing.Size(12, 8); - this.colourpallet77.TabIndex = 64; - this.colourpallet77.Visible = false; - // - // colourpallet78 - // - this.colourpallet78.BackColor = System.Drawing.Color.Black; - this.colourpallet78.Location = new System.Drawing.Point(119, 37); - this.colourpallet78.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet78.Name = "colourpallet78"; - this.colourpallet78.Size = new System.Drawing.Size(12, 8); - this.colourpallet78.TabIndex = 84; - this.colourpallet78.Visible = false; - // - // colourpallet79 - // - this.colourpallet79.BackColor = System.Drawing.Color.Black; - this.colourpallet79.Location = new System.Drawing.Point(132, 37); - this.colourpallet79.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet79.Name = "colourpallet79"; - this.colourpallet79.Size = new System.Drawing.Size(12, 8); - this.colourpallet79.TabIndex = 72; - this.colourpallet79.Visible = false; - // - // colourpallet80 - // - this.colourpallet80.BackColor = System.Drawing.Color.Black; - this.colourpallet80.Location = new System.Drawing.Point(145, 37); - this.colourpallet80.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet80.Name = "colourpallet80"; - this.colourpallet80.Size = new System.Drawing.Size(12, 8); - this.colourpallet80.TabIndex = 75; - this.colourpallet80.Visible = false; - // - // colourpallet81 - // - this.colourpallet81.BackColor = System.Drawing.Color.Black; - this.colourpallet81.Location = new System.Drawing.Point(158, 37); - this.colourpallet81.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet81.Name = "colourpallet81"; - this.colourpallet81.Size = new System.Drawing.Size(12, 8); - this.colourpallet81.TabIndex = 65; - this.colourpallet81.Visible = false; - // - // colourpallet82 - // - this.colourpallet82.BackColor = System.Drawing.Color.Black; - this.colourpallet82.Location = new System.Drawing.Point(171, 37); - this.colourpallet82.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet82.Name = "colourpallet82"; - this.colourpallet82.Size = new System.Drawing.Size(12, 8); - this.colourpallet82.TabIndex = 60; - this.colourpallet82.Visible = false; - // - // colourpallet83 - // - this.colourpallet83.BackColor = System.Drawing.Color.Black; - this.colourpallet83.Location = new System.Drawing.Point(184, 37); - this.colourpallet83.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet83.Name = "colourpallet83"; - this.colourpallet83.Size = new System.Drawing.Size(12, 8); - this.colourpallet83.TabIndex = 88; - this.colourpallet83.Visible = false; - // - // colourpallet84 - // - this.colourpallet84.BackColor = System.Drawing.Color.Black; - this.colourpallet84.Location = new System.Drawing.Point(197, 37); - this.colourpallet84.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet84.Name = "colourpallet84"; - this.colourpallet84.Size = new System.Drawing.Size(12, 8); - this.colourpallet84.TabIndex = 68; - this.colourpallet84.Visible = false; - // - // colourpallet85 - // - this.colourpallet85.BackColor = System.Drawing.Color.Black; - this.colourpallet85.Location = new System.Drawing.Point(210, 37); - this.colourpallet85.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet85.Name = "colourpallet85"; - this.colourpallet85.Size = new System.Drawing.Size(12, 8); - this.colourpallet85.TabIndex = 83; - this.colourpallet85.Visible = false; - // - // colourpallet86 - // - this.colourpallet86.BackColor = System.Drawing.Color.Black; - this.colourpallet86.Location = new System.Drawing.Point(2, 46); - this.colourpallet86.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet86.Name = "colourpallet86"; - this.colourpallet86.Size = new System.Drawing.Size(12, 8); - this.colourpallet86.TabIndex = 59; - this.colourpallet86.Visible = false; - // - // colourpallet87 - // - this.colourpallet87.BackColor = System.Drawing.Color.Black; - this.colourpallet87.Location = new System.Drawing.Point(15, 46); - this.colourpallet87.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet87.Name = "colourpallet87"; - this.colourpallet87.Size = new System.Drawing.Size(12, 8); - this.colourpallet87.TabIndex = 81; - this.colourpallet87.Visible = false; - // - // colourpallet88 - // - this.colourpallet88.BackColor = System.Drawing.Color.Black; - this.colourpallet88.Location = new System.Drawing.Point(28, 46); - this.colourpallet88.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet88.Name = "colourpallet88"; - this.colourpallet88.Size = new System.Drawing.Size(12, 8); - this.colourpallet88.TabIndex = 63; - this.colourpallet88.Visible = false; - // - // colourpallet89 - // - this.colourpallet89.BackColor = System.Drawing.Color.Black; - this.colourpallet89.Location = new System.Drawing.Point(41, 46); - this.colourpallet89.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet89.Name = "colourpallet89"; - this.colourpallet89.Size = new System.Drawing.Size(12, 8); - this.colourpallet89.TabIndex = 73; - this.colourpallet89.Visible = false; - // - // colourpallet90 - // - this.colourpallet90.BackColor = System.Drawing.Color.Black; - this.colourpallet90.Location = new System.Drawing.Point(54, 46); - this.colourpallet90.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet90.Name = "colourpallet90"; - this.colourpallet90.Size = new System.Drawing.Size(12, 8); - this.colourpallet90.TabIndex = 87; - this.colourpallet90.Visible = false; - // - // colourpallet91 - // - this.colourpallet91.BackColor = System.Drawing.Color.Black; - this.colourpallet91.Location = new System.Drawing.Point(67, 46); - this.colourpallet91.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet91.Name = "colourpallet91"; - this.colourpallet91.Size = new System.Drawing.Size(12, 8); - this.colourpallet91.TabIndex = 58; - this.colourpallet91.Visible = false; - // - // colourpallet92 - // - this.colourpallet92.BackColor = System.Drawing.Color.Black; - this.colourpallet92.Location = new System.Drawing.Point(80, 46); - this.colourpallet92.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet92.Name = "colourpallet92"; - this.colourpallet92.Size = new System.Drawing.Size(12, 8); - this.colourpallet92.TabIndex = 82; - this.colourpallet92.Visible = false; - // - // colourpallet93 - // - this.colourpallet93.BackColor = System.Drawing.Color.Black; - this.colourpallet93.Location = new System.Drawing.Point(93, 46); - this.colourpallet93.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet93.Name = "colourpallet93"; - this.colourpallet93.Size = new System.Drawing.Size(12, 8); - this.colourpallet93.TabIndex = 86; - this.colourpallet93.Visible = false; - // - // colourpallet94 - // - this.colourpallet94.BackColor = System.Drawing.Color.Black; - this.colourpallet94.Location = new System.Drawing.Point(106, 46); - this.colourpallet94.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet94.Name = "colourpallet94"; - this.colourpallet94.Size = new System.Drawing.Size(12, 8); - this.colourpallet94.TabIndex = 80; - this.colourpallet94.Visible = false; - // - // colourpallet95 - // - this.colourpallet95.BackColor = System.Drawing.Color.Black; - this.colourpallet95.Location = new System.Drawing.Point(119, 46); - this.colourpallet95.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet95.Name = "colourpallet95"; - this.colourpallet95.Size = new System.Drawing.Size(12, 8); - this.colourpallet95.TabIndex = 85; - this.colourpallet95.Visible = false; - // - // colourpallet96 - // - this.colourpallet96.BackColor = System.Drawing.Color.Black; - this.colourpallet96.Location = new System.Drawing.Point(132, 46); - this.colourpallet96.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet96.Name = "colourpallet96"; - this.colourpallet96.Size = new System.Drawing.Size(12, 8); - this.colourpallet96.TabIndex = 78; - this.colourpallet96.Visible = false; - // - // colourpallet97 - // - this.colourpallet97.BackColor = System.Drawing.Color.Black; - this.colourpallet97.Location = new System.Drawing.Point(145, 46); - this.colourpallet97.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet97.Name = "colourpallet97"; - this.colourpallet97.Size = new System.Drawing.Size(12, 8); - this.colourpallet97.TabIndex = 89; - this.colourpallet97.Visible = false; - // - // colourpallet98 - // - this.colourpallet98.BackColor = System.Drawing.Color.Black; - this.colourpallet98.Location = new System.Drawing.Point(158, 46); - this.colourpallet98.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet98.Name = "colourpallet98"; - this.colourpallet98.Size = new System.Drawing.Size(12, 8); - this.colourpallet98.TabIndex = 93; - this.colourpallet98.Visible = false; - // - // colourpallet99 - // - this.colourpallet99.BackColor = System.Drawing.Color.Black; - this.colourpallet99.Location = new System.Drawing.Point(171, 46); - this.colourpallet99.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet99.Name = "colourpallet99"; - this.colourpallet99.Size = new System.Drawing.Size(12, 8); - this.colourpallet99.TabIndex = 101; - this.colourpallet99.Visible = false; - // - // colourpallet100 - // - this.colourpallet100.BackColor = System.Drawing.Color.Black; - this.colourpallet100.Location = new System.Drawing.Point(184, 46); - this.colourpallet100.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet100.Name = "colourpallet100"; - this.colourpallet100.Size = new System.Drawing.Size(12, 8); - this.colourpallet100.TabIndex = 94; - this.colourpallet100.Visible = false; - // - // colourpallet101 - // - this.colourpallet101.BackColor = System.Drawing.Color.Black; - this.colourpallet101.Location = new System.Drawing.Point(197, 46); - this.colourpallet101.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet101.Name = "colourpallet101"; - this.colourpallet101.Size = new System.Drawing.Size(12, 8); - this.colourpallet101.TabIndex = 111; - this.colourpallet101.Visible = false; - // - // colourpallet102 - // - this.colourpallet102.BackColor = System.Drawing.Color.Black; - this.colourpallet102.Location = new System.Drawing.Point(210, 46); - this.colourpallet102.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet102.Name = "colourpallet102"; - this.colourpallet102.Size = new System.Drawing.Size(12, 8); - this.colourpallet102.TabIndex = 110; - this.colourpallet102.Visible = false; - // - // colourpallet103 - // - this.colourpallet103.BackColor = System.Drawing.Color.Black; - this.colourpallet103.Location = new System.Drawing.Point(2, 55); - this.colourpallet103.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet103.Name = "colourpallet103"; - this.colourpallet103.Size = new System.Drawing.Size(12, 8); - this.colourpallet103.TabIndex = 117; - this.colourpallet103.Visible = false; - // - // colourpallet104 - // - this.colourpallet104.BackColor = System.Drawing.Color.Black; - this.colourpallet104.Location = new System.Drawing.Point(15, 55); - this.colourpallet104.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet104.Name = "colourpallet104"; - this.colourpallet104.Size = new System.Drawing.Size(12, 8); - this.colourpallet104.TabIndex = 112; - this.colourpallet104.Visible = false; - // - // colourpallet105 - // - this.colourpallet105.BackColor = System.Drawing.Color.Black; - this.colourpallet105.Location = new System.Drawing.Point(28, 55); - this.colourpallet105.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet105.Name = "colourpallet105"; - this.colourpallet105.Size = new System.Drawing.Size(12, 8); - this.colourpallet105.TabIndex = 109; - this.colourpallet105.Visible = false; - // - // colourpallet106 - // - this.colourpallet106.BackColor = System.Drawing.Color.Black; - this.colourpallet106.Location = new System.Drawing.Point(41, 55); - this.colourpallet106.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet106.Name = "colourpallet106"; - this.colourpallet106.Size = new System.Drawing.Size(12, 8); - this.colourpallet106.TabIndex = 103; - this.colourpallet106.Visible = false; - // - // colourpallet107 - // - this.colourpallet107.BackColor = System.Drawing.Color.Black; - this.colourpallet107.Location = new System.Drawing.Point(54, 55); - this.colourpallet107.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet107.Name = "colourpallet107"; - this.colourpallet107.Size = new System.Drawing.Size(12, 8); - this.colourpallet107.TabIndex = 102; - this.colourpallet107.Visible = false; - // - // colourpallet108 - // - this.colourpallet108.BackColor = System.Drawing.Color.Black; - this.colourpallet108.Location = new System.Drawing.Point(67, 55); - this.colourpallet108.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet108.Name = "colourpallet108"; - this.colourpallet108.Size = new System.Drawing.Size(12, 8); - this.colourpallet108.TabIndex = 106; - this.colourpallet108.Visible = false; - // - // colourpallet109 - // - this.colourpallet109.BackColor = System.Drawing.Color.Black; - this.colourpallet109.Location = new System.Drawing.Point(80, 55); - this.colourpallet109.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet109.Name = "colourpallet109"; - this.colourpallet109.Size = new System.Drawing.Size(12, 8); - this.colourpallet109.TabIndex = 98; - this.colourpallet109.Visible = false; - // - // colourpallet110 - // - this.colourpallet110.BackColor = System.Drawing.Color.Black; - this.colourpallet110.Location = new System.Drawing.Point(93, 55); - this.colourpallet110.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet110.Name = "colourpallet110"; - this.colourpallet110.Size = new System.Drawing.Size(12, 8); - this.colourpallet110.TabIndex = 99; - this.colourpallet110.Visible = false; - // - // colourpallet111 - // - this.colourpallet111.BackColor = System.Drawing.Color.Black; - this.colourpallet111.Location = new System.Drawing.Point(106, 55); - this.colourpallet111.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet111.Name = "colourpallet111"; - this.colourpallet111.Size = new System.Drawing.Size(12, 8); - this.colourpallet111.TabIndex = 108; - this.colourpallet111.Visible = false; - // - // colourpallet112 - // - this.colourpallet112.BackColor = System.Drawing.Color.Black; - this.colourpallet112.Location = new System.Drawing.Point(119, 55); - this.colourpallet112.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet112.Name = "colourpallet112"; - this.colourpallet112.Size = new System.Drawing.Size(12, 8); - this.colourpallet112.TabIndex = 96; - this.colourpallet112.Visible = false; - // - // colourpallet113 - // - this.colourpallet113.BackColor = System.Drawing.Color.Black; - this.colourpallet113.Location = new System.Drawing.Point(132, 55); - this.colourpallet113.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet113.Name = "colourpallet113"; - this.colourpallet113.Size = new System.Drawing.Size(12, 8); - this.colourpallet113.TabIndex = 116; - this.colourpallet113.Visible = false; - // - // colourpallet114 - // - this.colourpallet114.BackColor = System.Drawing.Color.Black; - this.colourpallet114.Location = new System.Drawing.Point(145, 55); - this.colourpallet114.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet114.Name = "colourpallet114"; - this.colourpallet114.Size = new System.Drawing.Size(12, 8); - this.colourpallet114.TabIndex = 104; - this.colourpallet114.Visible = false; - // - // colourpallet115 - // - this.colourpallet115.BackColor = System.Drawing.Color.Black; - this.colourpallet115.Location = new System.Drawing.Point(158, 55); - this.colourpallet115.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet115.Name = "colourpallet115"; - this.colourpallet115.Size = new System.Drawing.Size(12, 8); - this.colourpallet115.TabIndex = 107; - this.colourpallet115.Visible = false; - // - // colourpallet116 - // - this.colourpallet116.BackColor = System.Drawing.Color.Black; - this.colourpallet116.Location = new System.Drawing.Point(171, 55); - this.colourpallet116.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet116.Name = "colourpallet116"; - this.colourpallet116.Size = new System.Drawing.Size(12, 8); - this.colourpallet116.TabIndex = 97; - this.colourpallet116.Visible = false; - // - // colourpallet117 - // - this.colourpallet117.BackColor = System.Drawing.Color.Black; - this.colourpallet117.Location = new System.Drawing.Point(184, 55); - this.colourpallet117.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet117.Name = "colourpallet117"; - this.colourpallet117.Size = new System.Drawing.Size(12, 8); - this.colourpallet117.TabIndex = 92; - this.colourpallet117.Visible = false; - // - // colourpallet118 - // - this.colourpallet118.BackColor = System.Drawing.Color.Black; - this.colourpallet118.Location = new System.Drawing.Point(197, 55); - this.colourpallet118.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet118.Name = "colourpallet118"; - this.colourpallet118.Size = new System.Drawing.Size(12, 8); - this.colourpallet118.TabIndex = 120; - this.colourpallet118.Visible = false; - // - // colourpallet119 - // - this.colourpallet119.BackColor = System.Drawing.Color.Black; - this.colourpallet119.Location = new System.Drawing.Point(210, 55); - this.colourpallet119.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet119.Name = "colourpallet119"; - this.colourpallet119.Size = new System.Drawing.Size(12, 8); - this.colourpallet119.TabIndex = 100; - this.colourpallet119.Visible = false; - // - // colourpallet120 - // - this.colourpallet120.BackColor = System.Drawing.Color.Black; - this.colourpallet120.Location = new System.Drawing.Point(2, 64); - this.colourpallet120.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet120.Name = "colourpallet120"; - this.colourpallet120.Size = new System.Drawing.Size(12, 8); - this.colourpallet120.TabIndex = 115; - this.colourpallet120.Visible = false; - // - // colourpallet121 - // - this.colourpallet121.BackColor = System.Drawing.Color.Black; - this.colourpallet121.Location = new System.Drawing.Point(15, 64); - this.colourpallet121.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet121.Name = "colourpallet121"; - this.colourpallet121.Size = new System.Drawing.Size(12, 8); - this.colourpallet121.TabIndex = 91; - this.colourpallet121.Visible = false; - // - // colourpallet122 - // - this.colourpallet122.BackColor = System.Drawing.Color.Black; - this.colourpallet122.Location = new System.Drawing.Point(28, 64); - this.colourpallet122.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet122.Name = "colourpallet122"; - this.colourpallet122.Size = new System.Drawing.Size(12, 8); - this.colourpallet122.TabIndex = 113; - this.colourpallet122.Visible = false; - // - // colourpallet123 - // - this.colourpallet123.BackColor = System.Drawing.Color.Black; - this.colourpallet123.Location = new System.Drawing.Point(41, 64); - this.colourpallet123.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet123.Name = "colourpallet123"; - this.colourpallet123.Size = new System.Drawing.Size(12, 8); - this.colourpallet123.TabIndex = 95; - this.colourpallet123.Visible = false; - // - // colourpallet124 - // - this.colourpallet124.BackColor = System.Drawing.Color.Black; - this.colourpallet124.Location = new System.Drawing.Point(54, 64); - this.colourpallet124.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet124.Name = "colourpallet124"; - this.colourpallet124.Size = new System.Drawing.Size(12, 8); - this.colourpallet124.TabIndex = 105; - this.colourpallet124.Visible = false; - // - // colourpallet125 - // - this.colourpallet125.BackColor = System.Drawing.Color.Black; - this.colourpallet125.Location = new System.Drawing.Point(67, 64); - this.colourpallet125.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet125.Name = "colourpallet125"; - this.colourpallet125.Size = new System.Drawing.Size(12, 8); - this.colourpallet125.TabIndex = 119; - this.colourpallet125.Visible = false; - // - // colourpallet126 - // - this.colourpallet126.BackColor = System.Drawing.Color.Black; - this.colourpallet126.Location = new System.Drawing.Point(80, 64); - this.colourpallet126.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet126.Name = "colourpallet126"; - this.colourpallet126.Size = new System.Drawing.Size(12, 8); - this.colourpallet126.TabIndex = 90; - this.colourpallet126.Visible = false; - // - // colourpallet127 - // - this.colourpallet127.BackColor = System.Drawing.Color.Black; - this.colourpallet127.Location = new System.Drawing.Point(93, 64); - this.colourpallet127.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet127.Name = "colourpallet127"; - this.colourpallet127.Size = new System.Drawing.Size(12, 8); - this.colourpallet127.TabIndex = 114; - this.colourpallet127.Visible = false; - // - // colourpallet128 - // - this.colourpallet128.BackColor = System.Drawing.Color.Black; - this.colourpallet128.Location = new System.Drawing.Point(106, 64); - this.colourpallet128.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); - this.colourpallet128.Name = "colourpallet128"; - this.colourpallet128.Size = new System.Drawing.Size(12, 8); - this.colourpallet128.TabIndex = 118; - this.colourpallet128.Visible = false; - // - // Label4 - // - this.Label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label4.Location = new System.Drawing.Point(11, 2); - this.Label4.Name = "Label4"; - this.Label4.Size = new System.Drawing.Size(204, 23); - this.Label4.TabIndex = 11; - this.Label4.Text = "Colours"; - this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // line6 - // - this.line6.BackColor = System.Drawing.Color.Black; - this.line6.Dock = System.Windows.Forms.DockStyle.Top; - this.line6.Location = new System.Drawing.Point(0, 0); - this.line6.Name = "line6"; - this.line6.Size = new System.Drawing.Size(225, 1); - this.line6.TabIndex = 4; - // - // pnltoolproperties - // - this.pnltoolproperties.Controls.Add(this.pnlpixelplacersettings); - this.pnltoolproperties.Controls.Add(this.pnlovaltoolsettings); - this.pnltoolproperties.Controls.Add(this.pnleracertoolsettings); - this.pnltoolproperties.Controls.Add(this.pnllinetoolsettings); - this.pnltoolproperties.Controls.Add(this.pnlpaintbrushtoolsettings); - this.pnltoolproperties.Controls.Add(this.pnltexttoolsettings); - this.pnltoolproperties.Controls.Add(this.pnlpixelsettersettings); - this.pnltoolproperties.Controls.Add(this.pnlmagnifiersettings); - this.pnltoolproperties.Controls.Add(this.pnlfloodfillsettings); - this.pnltoolproperties.Controls.Add(this.pnlsquaretoolsettings); - this.pnltoolproperties.Controls.Add(this.pnlpencilsettings); - this.pnltoolproperties.Controls.Add(this.Label6); - this.pnltoolproperties.Controls.Add(this.Label5); - this.pnltoolproperties.Controls.Add(this.line5); - this.pnltoolproperties.Controls.Add(this.line3); - this.pnltoolproperties.Location = new System.Drawing.Point(0, 0); - this.pnltoolproperties.Name = "pnltoolproperties"; - this.pnltoolproperties.Size = new System.Drawing.Size(457, 100); - this.pnltoolproperties.TabIndex = 1; - // - // pnlovaltoolsettings - // - this.pnlovaltoolsettings.Controls.Add(this.Label20); - this.pnlovaltoolsettings.Controls.Add(this.btnovalfillonoff); - this.pnlovaltoolsettings.Controls.Add(this.pnlovalfillcolour); - this.pnlovaltoolsettings.Controls.Add(this.txtovalborderwidth); - this.pnlovaltoolsettings.Controls.Add(this.Label21); - this.pnlovaltoolsettings.Controls.Add(this.Label22); - this.pnlovaltoolsettings.Controls.Add(this.Label23); - this.pnlovaltoolsettings.Location = new System.Drawing.Point(0, 1); - this.pnlovaltoolsettings.Name = "pnlovaltoolsettings"; - this.pnlovaltoolsettings.Size = new System.Drawing.Size(459, 96); - this.pnlovaltoolsettings.TabIndex = 15; - this.pnlovaltoolsettings.Visible = false; - // - // Label20 - // - this.Label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label20.Location = new System.Drawing.Point(211, 29); - this.Label20.Name = "Label20"; - this.Label20.Size = new System.Drawing.Size(244, 65); - this.Label20.TabIndex = 15; - this.Label20.Text = "Set a border width and turn fill on or off then draw the square on the canvas wit" + - "h the mouse. Click the fill colour box to set it to your currently selected colo" + - "ur."; - // - // btnovalfillonoff - // - this.btnovalfillonoff.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btnovalfillonoff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnovalfillonoff.Location = new System.Drawing.Point(150, 64); - this.btnovalfillonoff.Name = "btnovalfillonoff"; - this.btnovalfillonoff.Size = new System.Drawing.Size(56, 28); - this.btnovalfillonoff.TabIndex = 14; - this.btnovalfillonoff.Text = "Fill OFF"; - this.btnovalfillonoff.UseVisualStyleBackColor = true; - this.btnovalfillonoff.Click += new System.EventHandler(this.btnovalfillonoff_Click); - // - // pnlovalfillcolour - // - this.pnlovalfillcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlovalfillcolour.Location = new System.Drawing.Point(109, 64); - this.pnlovalfillcolour.Name = "pnlovalfillcolour"; - this.pnlovalfillcolour.Size = new System.Drawing.Size(34, 28); - this.pnlovalfillcolour.TabIndex = 13; - this.pnlovalfillcolour.Click += new System.EventHandler(this.pnlovalfillcolour_Click); - // - // txtovalborderwidth - // - this.txtovalborderwidth.BackColor = System.Drawing.Color.White; - this.txtovalborderwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtovalborderwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtovalborderwidth.ForeColor = System.Drawing.Color.Black; - this.txtovalborderwidth.Location = new System.Drawing.Point(133, 33); - this.txtovalborderwidth.Name = "txtovalborderwidth"; - this.txtovalborderwidth.Size = new System.Drawing.Size(73, 26); - this.txtovalborderwidth.TabIndex = 12; - this.txtovalborderwidth.TextChanged += new System.EventHandler(this.txtovalborderwidth_TextChanged); - // - // Label21 - // - this.Label21.AutoSize = true; - this.Label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label21.Location = new System.Drawing.Point(4, 66); - this.Label21.Name = "Label21"; - this.Label21.Size = new System.Drawing.Size(100, 24); - this.Label21.TabIndex = 11; - this.Label21.Text = "Fill Colour:"; - // - // Label22 - // - this.Label22.AutoSize = true; - this.Label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label22.Location = new System.Drawing.Point(4, 33); - this.Label22.Name = "Label22"; - this.Label22.Size = new System.Drawing.Size(125, 24); - this.Label22.TabIndex = 10; - this.Label22.Text = "Border Width:"; - // - // Label23 - // - this.Label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label23.Location = new System.Drawing.Point(6, 3); - this.Label23.Name = "Label23"; - this.Label23.Size = new System.Drawing.Size(444, 23); - this.Label23.TabIndex = 0; - this.Label23.Text = "Oval Tool Settings"; - this.Label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnleracertoolsettings - // - this.pnleracertoolsettings.Controls.Add(this.Label28); - this.pnleracertoolsettings.Controls.Add(this.btneracersquare); - this.pnleracertoolsettings.Controls.Add(this.btneracercircle); - this.pnleracertoolsettings.Controls.Add(this.Label24); - this.pnleracertoolsettings.Controls.Add(this.txteracersize); - this.pnleracertoolsettings.Controls.Add(this.Label26); - this.pnleracertoolsettings.Controls.Add(this.Label27); - this.pnleracertoolsettings.Location = new System.Drawing.Point(0, 1); - this.pnleracertoolsettings.Name = "pnleracertoolsettings"; - this.pnleracertoolsettings.Size = new System.Drawing.Size(459, 96); - this.pnleracertoolsettings.TabIndex = 16; - this.pnleracertoolsettings.Visible = false; - // - // Label28 - // - this.Label28.AutoSize = true; - this.Label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label28.Location = new System.Drawing.Point(40, 71); - this.Label28.Name = "Label28"; - this.Label28.Size = new System.Drawing.Size(65, 24); - this.Label28.TabIndex = 19; - this.Label28.Text = "Shape"; - // - // btneracersquare - // - this.btneracersquare.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadsquarerubberselected; - this.btneracersquare.FlatAppearance.BorderSize = 0; - this.btneracersquare.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btneracersquare.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btneracersquare.Location = new System.Drawing.Point(75, 21); - this.btneracersquare.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btneracersquare.Name = "btneracersquare"; - this.btneracersquare.Size = new System.Drawing.Size(60, 50); - this.btneracersquare.TabIndex = 17; - this.btneracersquare.Text = " "; - this.btneracersquare.UseVisualStyleBackColor = true; - this.btneracersquare.Click += new System.EventHandler(this.btneracersquare_Click); - // - // btneracercircle - // - this.btneracercircle.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadcirclerubber; - this.btneracercircle.FlatAppearance.BorderSize = 0; - this.btneracercircle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btneracercircle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btneracercircle.Location = new System.Drawing.Point(9, 21); - this.btneracercircle.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btneracercircle.Name = "btneracercircle"; - this.btneracercircle.Size = new System.Drawing.Size(60, 50); - this.btneracercircle.TabIndex = 16; - this.btneracercircle.Text = " "; - this.btneracercircle.UseVisualStyleBackColor = true; - this.btneracercircle.Click += new System.EventHandler(this.btneracercircle_Click); - // - // Label24 - // - this.Label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label24.Location = new System.Drawing.Point(141, 29); - this.Label24.Name = "Label24"; - this.Label24.Size = new System.Drawing.Size(314, 38); - this.Label24.TabIndex = 15; - this.Label24.Text = "Choose a shape and size for your eracer then rub out unwanted parts of your drawi" + - "ng with the mouse."; - // - // txteracersize - // - this.txteracersize.BackColor = System.Drawing.Color.White; - this.txteracersize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txteracersize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txteracersize.ForeColor = System.Drawing.Color.Black; - this.txteracersize.Location = new System.Drawing.Point(198, 70); - this.txteracersize.Name = "txteracersize"; - this.txteracersize.Size = new System.Drawing.Size(73, 26); - this.txteracersize.TabIndex = 12; - this.txteracersize.TextChanged += new System.EventHandler(this.txteracersize_TextChanged); - // - // Label26 - // - this.Label26.AutoSize = true; - this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label26.Location = new System.Drawing.Point(141, 71); - this.Label26.Name = "Label26"; - this.Label26.Size = new System.Drawing.Size(51, 24); - this.Label26.TabIndex = 10; - this.Label26.Text = "Size:"; - // - // Label27 - // - this.Label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label27.Location = new System.Drawing.Point(6, 3); - this.Label27.Name = "Label27"; - this.Label27.Size = new System.Drawing.Size(444, 23); - this.Label27.TabIndex = 0; - this.Label27.Text = "Eraser Tool Settings"; - this.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnllinetoolsettings - // - this.pnllinetoolsettings.Controls.Add(this.Label29); - this.pnllinetoolsettings.Controls.Add(this.txtlinewidth); - this.pnllinetoolsettings.Controls.Add(this.Label30); - this.pnllinetoolsettings.Controls.Add(this.Label31); - this.pnllinetoolsettings.Location = new System.Drawing.Point(168, 32); - this.pnllinetoolsettings.Name = "pnllinetoolsettings"; - this.pnllinetoolsettings.Size = new System.Drawing.Size(60, 28); - this.pnllinetoolsettings.TabIndex = 20; - this.pnllinetoolsettings.Visible = false; - // - // Label29 - // - this.Label29.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label29.Location = new System.Drawing.Point(196, 29); - this.Label29.Name = "Label29"; - this.Label29.Size = new System.Drawing.Size(257, 38); - this.Label29.TabIndex = 15; - this.Label29.Text = "Enter a line width then use the mouse to draw a straight line on the canvas."; - // - // txtlinewidth - // - this.txtlinewidth.BackColor = System.Drawing.Color.White; - this.txtlinewidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtlinewidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtlinewidth.ForeColor = System.Drawing.Color.Black; - this.txtlinewidth.Location = new System.Drawing.Point(114, 33); - this.txtlinewidth.Name = "txtlinewidth"; - this.txtlinewidth.Size = new System.Drawing.Size(73, 26); - this.txtlinewidth.TabIndex = 12; - this.txtlinewidth.TextAlignChanged += new System.EventHandler(this.txtlinewidth_TextChanged); - // - // Label30 - // - this.Label30.AutoSize = true; - this.Label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label30.Location = new System.Drawing.Point(8, 34); - this.Label30.Name = "Label30"; - this.Label30.Size = new System.Drawing.Size(104, 24); - this.Label30.TabIndex = 10; - this.Label30.Text = "Line Width:"; - // - // Label31 - // - this.Label31.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label31.Location = new System.Drawing.Point(6, 3); - this.Label31.Name = "Label31"; - this.Label31.Size = new System.Drawing.Size(444, 23); - this.Label31.TabIndex = 0; - this.Label31.Text = "Line Tool Settings"; - this.Label31.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlpaintbrushtoolsettings - // - this.pnlpaintbrushtoolsettings.Controls.Add(this.Label36); - this.pnlpaintbrushtoolsettings.Controls.Add(this.btnpaintsquareshape); - this.pnlpaintbrushtoolsettings.Controls.Add(this.btnpaintcircleshape); - this.pnlpaintbrushtoolsettings.Controls.Add(this.Label37); - this.pnlpaintbrushtoolsettings.Controls.Add(this.txtpaintbrushsize); - this.pnlpaintbrushtoolsettings.Controls.Add(this.Label38); - this.pnlpaintbrushtoolsettings.Controls.Add(this.Label39); - this.pnlpaintbrushtoolsettings.Location = new System.Drawing.Point(0, 1); - this.pnlpaintbrushtoolsettings.Name = "pnlpaintbrushtoolsettings"; - this.pnlpaintbrushtoolsettings.Size = new System.Drawing.Size(457, 97); - this.pnlpaintbrushtoolsettings.TabIndex = 21; - this.pnlpaintbrushtoolsettings.Visible = false; - // - // Label36 - // - this.Label36.AutoSize = true; - this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label36.Location = new System.Drawing.Point(32, 69); - this.Label36.Name = "Label36"; - this.Label36.Size = new System.Drawing.Size(65, 24); - this.Label36.TabIndex = 19; - this.Label36.Text = "Shape"; - // - // btnpaintsquareshape - // - this.btnpaintsquareshape.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadsquarerubber; - this.btnpaintsquareshape.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnpaintsquareshape.FlatAppearance.BorderSize = 0; - this.btnpaintsquareshape.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpaintsquareshape.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpaintsquareshape.Location = new System.Drawing.Point(69, 27); - this.btnpaintsquareshape.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnpaintsquareshape.Name = "btnpaintsquareshape"; - this.btnpaintsquareshape.Size = new System.Drawing.Size(48, 40); - this.btnpaintsquareshape.TabIndex = 17; - this.btnpaintsquareshape.Text = " "; - this.btnpaintsquareshape.UseVisualStyleBackColor = true; - this.btnpaintsquareshape.Click += new System.EventHandler(this.btnpaintsquareshape_Click); - // - // btnpaintcircleshape - // - this.btnpaintcircleshape.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadcirclerubberselected; - this.btnpaintcircleshape.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnpaintcircleshape.FlatAppearance.BorderSize = 0; - this.btnpaintcircleshape.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpaintcircleshape.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpaintcircleshape.Location = new System.Drawing.Point(16, 27); - this.btnpaintcircleshape.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnpaintcircleshape.Name = "btnpaintcircleshape"; - this.btnpaintcircleshape.Size = new System.Drawing.Size(48, 40); - this.btnpaintcircleshape.TabIndex = 16; - this.btnpaintcircleshape.Text = " "; - this.btnpaintcircleshape.UseVisualStyleBackColor = true; - this.btnpaintcircleshape.Click += new System.EventHandler(this.btnpaintcircleshape_Click); - // - // Label37 - // - this.Label37.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label37.Location = new System.Drawing.Point(137, 29); - this.Label37.Name = "Label37"; - this.Label37.Size = new System.Drawing.Size(314, 38); - this.Label37.TabIndex = 15; - this.Label37.Text = "Choose a shape and size for your paint brush then paint on the canvas by drawing " + - "with the mouse."; - // - // txtpaintbrushsize - // - this.txtpaintbrushsize.BackColor = System.Drawing.Color.White; - this.txtpaintbrushsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpaintbrushsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpaintbrushsize.ForeColor = System.Drawing.Color.Black; - this.txtpaintbrushsize.Location = new System.Drawing.Point(194, 68); - this.txtpaintbrushsize.Name = "txtpaintbrushsize"; - this.txtpaintbrushsize.Size = new System.Drawing.Size(73, 26); - this.txtpaintbrushsize.TabIndex = 12; - this.txtpaintbrushsize.TextChanged += new System.EventHandler(this.txtpaintbrushsize_TextChanged); - // - // Label38 - // - this.Label38.AutoSize = true; - this.Label38.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label38.Location = new System.Drawing.Point(137, 69); - this.Label38.Name = "Label38"; - this.Label38.Size = new System.Drawing.Size(51, 24); - this.Label38.TabIndex = 10; - this.Label38.Text = "Size:"; - // - // Label39 - // - this.Label39.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label39.Location = new System.Drawing.Point(6, 3); - this.Label39.Name = "Label39"; - this.Label39.Size = new System.Drawing.Size(444, 23); - this.Label39.TabIndex = 0; - this.Label39.Text = "Paint Brush Tool Settings"; - this.Label39.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnltexttoolsettings - // - this.pnltexttoolsettings.Controls.Add(this.Label35); - this.pnltexttoolsettings.Controls.Add(this.combofontstyle); - this.pnltexttoolsettings.Controls.Add(this.txtdrawstringtext); - this.pnltexttoolsettings.Controls.Add(this.combodrawtextfont); - this.pnltexttoolsettings.Controls.Add(this.Label25); - this.pnltexttoolsettings.Controls.Add(this.txtdrawtextsize); - this.pnltexttoolsettings.Controls.Add(this.Label32); - this.pnltexttoolsettings.Controls.Add(this.Label33); - this.pnltexttoolsettings.Controls.Add(this.Label34); - this.pnltexttoolsettings.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnltexttoolsettings.Location = new System.Drawing.Point(0, 1); - this.pnltexttoolsettings.Name = "pnltexttoolsettings"; - this.pnltexttoolsettings.Size = new System.Drawing.Size(456, 99); - this.pnltexttoolsettings.TabIndex = 17; - this.pnltexttoolsettings.Visible = false; - // - // Label35 - // - this.Label35.AutoSize = true; - this.Label35.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label35.Location = new System.Drawing.Point(117, 33); - this.Label35.Name = "Label35"; - this.Label35.Size = new System.Drawing.Size(55, 24); - this.Label35.TabIndex = 19; - this.Label35.Text = "Style:"; - // - // combofontstyle - // - this.combofontstyle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.combofontstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.combofontstyle.FormattingEnabled = true; - this.combofontstyle.Items.AddRange(new object[] { - "Bold", - "Italic", - "Regular", - "Strikeout", - "Underline"}); - this.combofontstyle.Location = new System.Drawing.Point(178, 34); - this.combofontstyle.Name = "combofontstyle"; - this.combofontstyle.Size = new System.Drawing.Size(78, 24); - this.combofontstyle.TabIndex = 18; - this.combofontstyle.SelectedIndexChanged += new System.EventHandler(this.combofontstyle_SelectedIndexChanged); - // - // txtdrawstringtext - // - this.txtdrawstringtext.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtdrawstringtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtdrawstringtext.Location = new System.Drawing.Point(265, 52); - this.txtdrawstringtext.Multiline = true; - this.txtdrawstringtext.Name = "txtdrawstringtext"; - this.txtdrawstringtext.Size = new System.Drawing.Size(185, 41); - this.txtdrawstringtext.TabIndex = 17; - this.txtdrawstringtext.Text = "Enter Words Here"; - this.txtdrawstringtext.TextChanged += new System.EventHandler(this.txtdrawstringtext_TextChanged); - // - // combodrawtextfont - // - this.combodrawtextfont.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.combodrawtextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.combodrawtextfont.FormattingEnabled = true; - this.combodrawtextfont.Location = new System.Drawing.Point(64, 68); - this.combodrawtextfont.Name = "combodrawtextfont"; - this.combodrawtextfont.Size = new System.Drawing.Size(192, 24); - this.combodrawtextfont.TabIndex = 16; - this.combodrawtextfont.SelectedIndexChanged += new System.EventHandler(this.combodrawtextfont_SelectedIndexChanged); - // - // Label25 - // - this.Label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label25.Location = new System.Drawing.Point(262, 26); - this.Label25.Name = "Label25"; - this.Label25.Size = new System.Drawing.Size(189, 23); - this.Label25.TabIndex = 15; - this.Label25.Text = "Click and drag on the canvas!"; - this.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // txtdrawtextsize - // - this.txtdrawtextsize.BackColor = System.Drawing.Color.White; - this.txtdrawtextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtdrawtextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtdrawtextsize.ForeColor = System.Drawing.Color.Black; - this.txtdrawtextsize.Location = new System.Drawing.Point(61, 33); - this.txtdrawtextsize.Name = "txtdrawtextsize"; - this.txtdrawtextsize.Size = new System.Drawing.Size(43, 26); - this.txtdrawtextsize.TabIndex = 12; - this.txtdrawtextsize.TextChanged += new System.EventHandler(this.txtdrawtextsize_TextChanged); - // - // Label32 - // - this.Label32.AutoSize = true; - this.Label32.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label32.Location = new System.Drawing.Point(4, 66); - this.Label32.Name = "Label32"; - this.Label32.Size = new System.Drawing.Size(53, 24); - this.Label32.TabIndex = 11; - this.Label32.Text = "Font:"; - // - // Label33 - // - this.Label33.AutoSize = true; - this.Label33.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label33.Location = new System.Drawing.Point(4, 33); - this.Label33.Name = "Label33"; - this.Label33.Size = new System.Drawing.Size(51, 24); - this.Label33.TabIndex = 10; - this.Label33.Text = "Size:"; - // - // Label34 - // - this.Label34.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label34.Location = new System.Drawing.Point(6, 3); - this.Label34.Name = "Label34"; - this.Label34.Size = new System.Drawing.Size(444, 23); - this.Label34.TabIndex = 0; - this.Label34.Text = "Text Tool Settings"; - this.Label34.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlpixelsettersettings - // - this.pnlpixelsettersettings.Controls.Add(this.btnpixelsettersetpixel); - this.pnlpixelsettersettings.Controls.Add(this.txtpixelsetterycoordinate); - this.pnlpixelsettersettings.Controls.Add(this.txtpixelsetterxcoordinate); - this.pnlpixelsettersettings.Controls.Add(this.Label3); - this.pnlpixelsettersettings.Controls.Add(this.Label2); - this.pnlpixelsettersettings.Controls.Add(this.Label1); - this.pnlpixelsettersettings.Location = new System.Drawing.Point(0, 1); - this.pnlpixelsettersettings.Name = "pnlpixelsettersettings"; - this.pnlpixelsettersettings.Size = new System.Drawing.Size(457, 99); - this.pnlpixelsettersettings.TabIndex = 5; - this.pnlpixelsettersettings.Visible = false; - // - // btnpixelsettersetpixel - // - this.btnpixelsettersetpixel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpixelsettersetpixel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpixelsettersetpixel.Location = new System.Drawing.Point(215, 34); - this.btnpixelsettersetpixel.Name = "btnpixelsettersetpixel"; - this.btnpixelsettersetpixel.Size = new System.Drawing.Size(228, 56); - this.btnpixelsettersetpixel.TabIndex = 10; - this.btnpixelsettersetpixel.Text = "Set Pixel"; - this.btnpixelsettersetpixel.UseVisualStyleBackColor = true; - this.btnpixelsettersetpixel.Click += new System.EventHandler(this.btnpixelsettersetpixel_Click); - // - // txtpixelsetterycoordinate - // - this.txtpixelsetterycoordinate.BackColor = System.Drawing.Color.White; - this.txtpixelsetterycoordinate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpixelsetterycoordinate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpixelsetterycoordinate.ForeColor = System.Drawing.Color.Black; - this.txtpixelsetterycoordinate.Location = new System.Drawing.Point(136, 64); - this.txtpixelsetterycoordinate.Name = "txtpixelsetterycoordinate"; - this.txtpixelsetterycoordinate.Size = new System.Drawing.Size(73, 26); - this.txtpixelsetterycoordinate.TabIndex = 9; - // - // txtpixelsetterxcoordinate - // - this.txtpixelsetterxcoordinate.BackColor = System.Drawing.Color.White; - this.txtpixelsetterxcoordinate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpixelsetterxcoordinate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpixelsetterxcoordinate.ForeColor = System.Drawing.Color.Black; - this.txtpixelsetterxcoordinate.Location = new System.Drawing.Point(136, 34); - this.txtpixelsetterxcoordinate.Name = "txtpixelsetterxcoordinate"; - this.txtpixelsetterxcoordinate.Size = new System.Drawing.Size(73, 26); - this.txtpixelsetterxcoordinate.TabIndex = 8; - // - // Label3 - // - this.Label3.AutoSize = true; - this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label3.Location = new System.Drawing.Point(8, 63); - this.Label3.Name = "Label3"; - this.Label3.Size = new System.Drawing.Size(124, 24); - this.Label3.TabIndex = 2; - this.Label3.Text = "Y Coordinate:"; - // - // Label2 - // - this.Label2.AutoSize = true; - this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label2.Location = new System.Drawing.Point(7, 34); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(126, 24); - this.Label2.TabIndex = 1; - this.Label2.Text = "X Coordinate:"; - // - // Label1 - // - this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.Location = new System.Drawing.Point(6, 3); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(444, 23); - this.Label1.TabIndex = 0; - this.Label1.Text = "Pixel Setter Settings"; - this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlmagnifiersettings - // - this.pnlmagnifiersettings.Controls.Add(this.btnzoomout); - this.pnlmagnifiersettings.Controls.Add(this.btnzoomin); - this.pnlmagnifiersettings.Controls.Add(this.lblzoomlevel); - this.pnlmagnifiersettings.Controls.Add(this.Label7); - this.pnlmagnifiersettings.Location = new System.Drawing.Point(78, 50); - this.pnlmagnifiersettings.Name = "pnlmagnifiersettings"; - this.pnlmagnifiersettings.Size = new System.Drawing.Size(67, 44); - this.pnlmagnifiersettings.TabIndex = 6; - this.pnlmagnifiersettings.Visible = false; - // - // btnzoomout - // - this.btnzoomout.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnzoomout.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnzoomout.Location = new System.Drawing.Point(16, 33); - this.btnzoomout.Name = "btnzoomout"; - this.btnzoomout.Size = new System.Drawing.Size(129, 56); - this.btnzoomout.TabIndex = 11; - this.btnzoomout.Text = "-"; - this.btnzoomout.UseVisualStyleBackColor = true; - this.btnzoomout.Click += new System.EventHandler(this.btnzoomout_Click); - // - // btnzoomin - // - this.btnzoomin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnzoomin.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnzoomin.Location = new System.Drawing.Point(313, 33); - this.btnzoomin.Name = "btnzoomin"; - this.btnzoomin.Size = new System.Drawing.Size(129, 56); - this.btnzoomin.TabIndex = 10; - this.btnzoomin.Text = "+"; - this.btnzoomin.UseVisualStyleBackColor = true; - this.btnzoomin.Click += new System.EventHandler(this.btnzoomin_Click); - // - // lblzoomlevel - // - this.lblzoomlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblzoomlevel.Location = new System.Drawing.Point(151, 33); - this.lblzoomlevel.Name = "lblzoomlevel"; - this.lblzoomlevel.Size = new System.Drawing.Size(156, 56); - this.lblzoomlevel.TabIndex = 1; - this.lblzoomlevel.Text = "1X"; - this.lblzoomlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label7 - // - this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label7.Location = new System.Drawing.Point(6, 3); - this.Label7.Name = "Label7"; - this.Label7.Size = new System.Drawing.Size(444, 23); - this.Label7.TabIndex = 0; - this.Label7.Text = "Magnifier Settings"; - this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlfloodfillsettings - // - this.pnlfloodfillsettings.Controls.Add(this.Label12); - this.pnlfloodfillsettings.Controls.Add(this.Label15); - this.pnlfloodfillsettings.Location = new System.Drawing.Point(162, 65); - this.pnlfloodfillsettings.Name = "pnlfloodfillsettings"; - this.pnlfloodfillsettings.Size = new System.Drawing.Size(71, 31); - this.pnlfloodfillsettings.TabIndex = 13; - this.pnlfloodfillsettings.Visible = false; - // - // Label12 - // - this.Label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label12.Location = new System.Drawing.Point(3, 28); - this.Label12.Name = "Label12"; - this.Label12.Size = new System.Drawing.Size(450, 51); - this.Label12.TabIndex = 11; - this.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label15 - // - this.Label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label15.Location = new System.Drawing.Point(6, 3); - this.Label15.Name = "Label15"; - this.Label15.Size = new System.Drawing.Size(444, 23); - this.Label15.TabIndex = 0; - this.Label15.Text = "Flood Fill Settings"; - this.Label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlsquaretoolsettings - // - this.pnlsquaretoolsettings.Controls.Add(this.Label19); - this.pnlsquaretoolsettings.Controls.Add(this.btnsquarefillonoff); - this.pnlsquaretoolsettings.Controls.Add(this.pnlsquarefillcolour); - this.pnlsquaretoolsettings.Controls.Add(this.txtsquareborderwidth); - this.pnlsquaretoolsettings.Controls.Add(this.Label16); - this.pnlsquaretoolsettings.Controls.Add(this.Label18); - this.pnlsquaretoolsettings.Controls.Add(this.Label17); - this.pnlsquaretoolsettings.Location = new System.Drawing.Point(16, 39); - this.pnlsquaretoolsettings.Name = "pnlsquaretoolsettings"; - this.pnlsquaretoolsettings.Size = new System.Drawing.Size(42, 31); - this.pnlsquaretoolsettings.TabIndex = 14; - this.pnlsquaretoolsettings.Visible = false; - // - // Label19 - // - this.Label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label19.Location = new System.Drawing.Point(211, 29); - this.Label19.Name = "Label19"; - this.Label19.Size = new System.Drawing.Size(244, 65); - this.Label19.TabIndex = 15; - this.Label19.Text = "Set a border width and turn fill on or off then draw the square on the canvas wit" + - "h the mouse. Click the fill colour box to set it to your currently selected colo" + - "ur."; - // - // btnsquarefillonoff - // - this.btnsquarefillonoff.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btnsquarefillonoff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsquarefillonoff.Location = new System.Drawing.Point(150, 64); - this.btnsquarefillonoff.Name = "btnsquarefillonoff"; - this.btnsquarefillonoff.Size = new System.Drawing.Size(56, 28); - this.btnsquarefillonoff.TabIndex = 14; - this.btnsquarefillonoff.Text = "Fill OFF"; - this.btnsquarefillonoff.UseVisualStyleBackColor = true; - this.btnsquarefillonoff.Click += new System.EventHandler(this.btnsquarefillonoff_Click); - // - // pnlsquarefillcolour - // - this.pnlsquarefillcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlsquarefillcolour.Location = new System.Drawing.Point(109, 64); - this.pnlsquarefillcolour.Name = "pnlsquarefillcolour"; - this.pnlsquarefillcolour.Size = new System.Drawing.Size(34, 28); - this.pnlsquarefillcolour.TabIndex = 13; - this.pnlsquarefillcolour.Click += new System.EventHandler(this.pnlsquarefillcolour_Click); - // - // txtsquareborderwidth - // - this.txtsquareborderwidth.BackColor = System.Drawing.Color.White; - this.txtsquareborderwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtsquareborderwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtsquareborderwidth.ForeColor = System.Drawing.Color.Black; - this.txtsquareborderwidth.Location = new System.Drawing.Point(133, 33); - this.txtsquareborderwidth.Name = "txtsquareborderwidth"; - this.txtsquareborderwidth.Size = new System.Drawing.Size(73, 26); - this.txtsquareborderwidth.TabIndex = 12; - this.txtsquareborderwidth.TextChanged += new System.EventHandler(this.txtsquareborderwidth_TextChanged); - // - // Label16 - // - this.Label16.AutoSize = true; - this.Label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label16.Location = new System.Drawing.Point(4, 66); - this.Label16.Name = "Label16"; - this.Label16.Size = new System.Drawing.Size(100, 24); - this.Label16.TabIndex = 11; - this.Label16.Text = "Fill Colour:"; - // - // Label18 - // - this.Label18.AutoSize = true; - this.Label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label18.Location = new System.Drawing.Point(4, 33); - this.Label18.Name = "Label18"; - this.Label18.Size = new System.Drawing.Size(125, 24); - this.Label18.TabIndex = 10; - this.Label18.Text = "Border Width:"; - // - // Label17 - // - this.Label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label17.Location = new System.Drawing.Point(6, 3); - this.Label17.Name = "Label17"; - this.Label17.Size = new System.Drawing.Size(444, 23); - this.Label17.TabIndex = 0; - this.Label17.Text = "Rectangle Tool Settings"; - this.Label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlpixelplacersettings - // - this.pnlpixelplacersettings.Controls.Add(this.lblpixelplacerhelp); - this.pnlpixelplacersettings.Controls.Add(this.btnpixelplacermovementmode); - this.pnlpixelplacersettings.Controls.Add(this.Label8); - this.pnlpixelplacersettings.Location = new System.Drawing.Point(0, 1); - this.pnlpixelplacersettings.Name = "pnlpixelplacersettings"; - this.pnlpixelplacersettings.Size = new System.Drawing.Size(454, 98); - this.pnlpixelplacersettings.TabIndex = 7; - this.pnlpixelplacersettings.Visible = false; - // - // lblpixelplacerhelp - // - this.lblpixelplacerhelp.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblpixelplacerhelp.Location = new System.Drawing.Point(3, 26); - this.lblpixelplacerhelp.Name = "lblpixelplacerhelp"; - this.lblpixelplacerhelp.Size = new System.Drawing.Size(307, 67); - this.lblpixelplacerhelp.TabIndex = 11; - this.lblpixelplacerhelp.Text = "This tool does not contain any alterable settings. Simply click on the canvas and" + - " a pixel will be placed in the spot you click."; - this.lblpixelplacerhelp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnpixelplacermovementmode - // - this.btnpixelplacermovementmode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpixelplacermovementmode.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpixelplacermovementmode.Location = new System.Drawing.Point(312, 26); - this.btnpixelplacermovementmode.Name = "btnpixelplacermovementmode"; - this.btnpixelplacermovementmode.Size = new System.Drawing.Size(138, 67); - this.btnpixelplacermovementmode.TabIndex = 10; - this.btnpixelplacermovementmode.Text = "Activate Movement Mode"; - this.btnpixelplacermovementmode.UseVisualStyleBackColor = true; - this.btnpixelplacermovementmode.Click += new System.EventHandler(this.btnpixelplacermovementmode_Click); - // - // Label8 - // - this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label8.Location = new System.Drawing.Point(6, 3); - this.Label8.Name = "Label8"; - this.Label8.Size = new System.Drawing.Size(444, 23); - this.Label8.TabIndex = 0; - this.Label8.Text = "Pixel Placer Settings"; - this.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlpencilsettings - // - this.pnlpencilsettings.Controls.Add(this.btnpencilsize3); - this.pnlpencilsettings.Controls.Add(this.btnpencilsize2); - this.pnlpencilsettings.Controls.Add(this.btnpencilsize1); - this.pnlpencilsettings.Controls.Add(this.Label14); - this.pnlpencilsettings.Location = new System.Drawing.Point(422, 13); - this.pnlpencilsettings.Name = "pnlpencilsettings"; - this.pnlpencilsettings.Size = new System.Drawing.Size(28, 22); - this.pnlpencilsettings.TabIndex = 12; - this.pnlpencilsettings.Visible = false; - // - // btnpencilsize3 - // - this.btnpencilsize3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpencilsize3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpencilsize3.Location = new System.Drawing.Point(298, 30); - this.btnpencilsize3.Name = "btnpencilsize3"; - this.btnpencilsize3.Size = new System.Drawing.Size(127, 54); - this.btnpencilsize3.TabIndex = 12; - this.btnpencilsize3.Text = "Thickest"; - this.btnpencilsize3.UseVisualStyleBackColor = true; - this.btnpencilsize3.Click += new System.EventHandler(this.ChangePencilSize); - // - // btnpencilsize2 - // - this.btnpencilsize2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpencilsize2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpencilsize2.Location = new System.Drawing.Point(165, 30); - this.btnpencilsize2.Name = "btnpencilsize2"; - this.btnpencilsize2.Size = new System.Drawing.Size(127, 54); - this.btnpencilsize2.TabIndex = 11; - this.btnpencilsize2.Text = "Thicker"; - this.btnpencilsize2.UseVisualStyleBackColor = true; - this.btnpencilsize2.Click += new System.EventHandler(this.ChangePencilSize); - // - // btnpencilsize1 - // - this.btnpencilsize1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpencilsize1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpencilsize1.Location = new System.Drawing.Point(30, 30); - this.btnpencilsize1.Name = "btnpencilsize1"; - this.btnpencilsize1.Size = new System.Drawing.Size(127, 54); - this.btnpencilsize1.TabIndex = 10; - this.btnpencilsize1.Text = "Thin"; - this.btnpencilsize1.UseVisualStyleBackColor = true; - this.btnpencilsize1.Click += new System.EventHandler(this.ChangePencilSize); - // - // Label14 - // - this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label14.Location = new System.Drawing.Point(6, 3); - this.Label14.Name = "Label14"; - this.Label14.Size = new System.Drawing.Size(444, 23); - this.Label14.TabIndex = 0; - this.Label14.Text = "Pencil Settings"; - this.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label6 - // - this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label6.Location = new System.Drawing.Point(13, 40); - this.Label6.Name = "Label6"; - this.Label6.Size = new System.Drawing.Size(437, 49); - this.Label6.TabIndex = 9; - this.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label5 - // - this.Label5.AutoSize = true; - this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label5.Location = new System.Drawing.Point(110, 13); - this.Label5.Name = "Label5"; - this.Label5.Size = new System.Drawing.Size(269, 24); - this.Label5.TabIndex = 8; - this.Label5.Text = "No Tool Currently Selected!"; - // - // line5 - // - this.line5.BackColor = System.Drawing.Color.Black; - this.line5.Dock = System.Windows.Forms.DockStyle.Top; - this.line5.Location = new System.Drawing.Point(0, 0); - this.line5.Name = "line5"; - this.line5.Size = new System.Drawing.Size(456, 1); - this.line5.TabIndex = 4; - // - // line3 - // - this.line3.BackColor = System.Drawing.Color.Black; - this.line3.Dock = System.Windows.Forms.DockStyle.Right; - this.line3.Location = new System.Drawing.Point(456, 0); - this.line3.Name = "line3"; - this.line3.Size = new System.Drawing.Size(1, 100); - this.line3.TabIndex = 2; - // - // pnltools - // - this.pnltools.BackColor = System.Drawing.Color.White; - this.pnltools.Controls.Add(this.pnltoolpositioner); - this.pnltools.Controls.Add(this.line1); - this.pnltools.Controls.Add(this.pnltoolpreview); - this.pnltools.Dock = System.Windows.Forms.DockStyle.Left; - this.pnltools.Location = new System.Drawing.Point(0, 0); - this.pnltools.Name = "pnltools"; - this.pnltools.Size = new System.Drawing.Size(120, 598); - this.pnltools.TabIndex = 0; - // - // pnltoolpositioner - // - this.pnltoolpositioner.Controls.Add(this.btnpixelsetter); - this.pnltoolpositioner.Controls.Add(this.btnpixelplacer); - this.pnltoolpositioner.Controls.Add(this.btnpencil); - this.pnltoolpositioner.Controls.Add(this.btnfloodfill); - this.pnltoolpositioner.Controls.Add(this.btnoval); - this.pnltoolpositioner.Controls.Add(this.btnsquare); - this.pnltoolpositioner.Controls.Add(this.btnlinetool); - this.pnltoolpositioner.Controls.Add(this.btnpaintbrush); - this.pnltoolpositioner.Controls.Add(this.btntexttool); - this.pnltoolpositioner.Controls.Add(this.btneracer); - this.pnltoolpositioner.Controls.Add(this.btnnew); - this.pnltoolpositioner.Controls.Add(this.btnmagnify); - this.pnltoolpositioner.Controls.Add(this.btnopen); - this.pnltoolpositioner.Controls.Add(this.btnsave); - this.pnltoolpositioner.Controls.Add(this.btnundo); - this.pnltoolpositioner.Controls.Add(this.btnredo); - this.pnltoolpositioner.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnltoolpositioner.Location = new System.Drawing.Point(0, 0); - this.pnltoolpositioner.Name = "pnltoolpositioner"; - this.pnltoolpositioner.Size = new System.Drawing.Size(119, 498); - this.pnltoolpositioner.TabIndex = 2; - // - // btnpixelsetter - // - this.btnpixelsetter.FlatAppearance.BorderSize = 0; - this.btnpixelsetter.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpixelsetter.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpixelsetter.Location = new System.Drawing.Point(6, 6); - this.btnpixelsetter.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnpixelsetter.Name = "btnpixelsetter"; - this.btnpixelsetter.Size = new System.Drawing.Size(50, 50); - this.btnpixelsetter.TabIndex = 2; - this.btnpixelsetter.UseVisualStyleBackColor = true; - this.btnpixelsetter.Click += new System.EventHandler(this.btnpixelsetter_Click); - // - // btnpixelplacer - // - this.btnpixelplacer.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadpixelplacer; - this.btnpixelplacer.FlatAppearance.BorderSize = 0; - this.btnpixelplacer.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpixelplacer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpixelplacer.Location = new System.Drawing.Point(62, 6); - this.btnpixelplacer.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnpixelplacer.Name = "btnpixelplacer"; - this.btnpixelplacer.Size = new System.Drawing.Size(50, 50); - this.btnpixelplacer.TabIndex = 4; - this.btnpixelplacer.UseVisualStyleBackColor = true; - this.btnpixelplacer.Click += new System.EventHandler(this.btnpixelplacer_Click); - // - // btnpencil - // - this.btnpencil.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadpencil; - this.btnpencil.FlatAppearance.BorderSize = 0; - this.btnpencil.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpencil.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpencil.Location = new System.Drawing.Point(6, 62); - this.btnpencil.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnpencil.Name = "btnpencil"; - this.btnpencil.Size = new System.Drawing.Size(50, 50); - this.btnpencil.TabIndex = 7; - this.btnpencil.Text = " "; - this.btnpencil.UseVisualStyleBackColor = true; - this.btnpencil.Click += new System.EventHandler(this.btnpencil_Click); - // - // btnfloodfill - // - this.btnfloodfill.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadfloodfill; - this.btnfloodfill.FlatAppearance.BorderSize = 0; - this.btnfloodfill.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnfloodfill.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnfloodfill.Location = new System.Drawing.Point(62, 62); - this.btnfloodfill.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnfloodfill.Name = "btnfloodfill"; - this.btnfloodfill.Size = new System.Drawing.Size(50, 50); - this.btnfloodfill.TabIndex = 11; - this.btnfloodfill.UseVisualStyleBackColor = true; - this.btnfloodfill.Click += new System.EventHandler(this.btnfill_Click); - // - // btnoval - // - this.btnoval.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadOval; - this.btnoval.FlatAppearance.BorderSize = 0; - this.btnoval.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnoval.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnoval.Location = new System.Drawing.Point(6, 118); - this.btnoval.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnoval.Name = "btnoval"; - this.btnoval.Size = new System.Drawing.Size(50, 50); - this.btnoval.TabIndex = 13; - this.btnoval.Text = " "; - this.btnoval.UseVisualStyleBackColor = true; - this.btnoval.Click += new System.EventHandler(this.btnoval_Click); - // - // btnsquare - // - this.btnsquare.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadRectangle; - this.btnsquare.FlatAppearance.BorderSize = 0; - this.btnsquare.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsquare.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnsquare.Location = new System.Drawing.Point(62, 118); - this.btnsquare.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnsquare.Name = "btnsquare"; - this.btnsquare.Size = new System.Drawing.Size(50, 50); - this.btnsquare.TabIndex = 12; - this.btnsquare.Text = " "; - this.btnsquare.UseVisualStyleBackColor = true; - this.btnsquare.Click += new System.EventHandler(this.btnsquare_Click); - // - // btnlinetool - // - this.btnlinetool.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadlinetool; - this.btnlinetool.FlatAppearance.BorderSize = 0; - this.btnlinetool.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnlinetool.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnlinetool.Location = new System.Drawing.Point(6, 174); - this.btnlinetool.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnlinetool.Name = "btnlinetool"; - this.btnlinetool.Size = new System.Drawing.Size(50, 50); - this.btnlinetool.TabIndex = 15; - this.btnlinetool.Text = " "; - this.btnlinetool.UseVisualStyleBackColor = true; - this.btnlinetool.Click += new System.EventHandler(this.btnlinetool_Click); - // - // btnpaintbrush - // - this.btnpaintbrush.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadpaintbrush; - this.btnpaintbrush.FlatAppearance.BorderSize = 0; - this.btnpaintbrush.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpaintbrush.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpaintbrush.Location = new System.Drawing.Point(62, 174); - this.btnpaintbrush.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnpaintbrush.Name = "btnpaintbrush"; - this.btnpaintbrush.Size = new System.Drawing.Size(50, 50); - this.btnpaintbrush.TabIndex = 17; - this.btnpaintbrush.Text = " "; - this.btnpaintbrush.UseVisualStyleBackColor = true; - this.btnpaintbrush.Click += new System.EventHandler(this.btnpaintbrush_Click); - // - // btntexttool - // - this.btntexttool.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadtexttool; - this.btntexttool.FlatAppearance.BorderSize = 0; - this.btntexttool.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btntexttool.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btntexttool.Location = new System.Drawing.Point(6, 230); - this.btntexttool.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btntexttool.Name = "btntexttool"; - this.btntexttool.Size = new System.Drawing.Size(50, 50); - this.btntexttool.TabIndex = 16; - this.btntexttool.Text = " "; - this.btntexttool.UseVisualStyleBackColor = true; - this.btntexttool.Click += new System.EventHandler(this.btntexttool_Click); - // - // btneracer - // - this.btneracer.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPaderacer; - this.btneracer.FlatAppearance.BorderSize = 0; - this.btneracer.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btneracer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btneracer.Location = new System.Drawing.Point(62, 230); - this.btneracer.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btneracer.Name = "btneracer"; - this.btneracer.Size = new System.Drawing.Size(50, 50); - this.btneracer.TabIndex = 14; - this.btneracer.Text = " "; - this.btneracer.UseVisualStyleBackColor = true; - this.btneracer.Click += new System.EventHandler(this.btneracer_Click); - // - // btnnew - // - this.btnnew.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadnew; - this.btnnew.FlatAppearance.BorderSize = 0; - this.btnnew.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnnew.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnnew.Location = new System.Drawing.Point(6, 286); - this.btnnew.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnnew.Name = "btnnew"; - this.btnnew.Size = new System.Drawing.Size(50, 50); - this.btnnew.TabIndex = 6; - this.btnnew.Text = " "; - this.btnnew.UseVisualStyleBackColor = true; - this.btnnew.Click += new System.EventHandler(this.btnnew_Click); - // - // btnmagnify - // - this.btnmagnify.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadmagnify; - this.btnmagnify.FlatAppearance.BorderSize = 0; - this.btnmagnify.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnmagnify.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnmagnify.Location = new System.Drawing.Point(62, 286); - this.btnmagnify.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnmagnify.Name = "btnmagnify"; - this.btnmagnify.Size = new System.Drawing.Size(50, 50); - this.btnmagnify.TabIndex = 3; - this.btnmagnify.Text = " "; - this.btnmagnify.UseVisualStyleBackColor = true; - this.btnmagnify.Click += new System.EventHandler(this.btnmagnify_Click); - // - // btnopen - // - this.btnopen.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadopen; - this.btnopen.FlatAppearance.BorderSize = 0; - this.btnopen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnopen.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnopen.Location = new System.Drawing.Point(6, 342); - this.btnopen.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnopen.Name = "btnopen"; - this.btnopen.Size = new System.Drawing.Size(50, 50); - this.btnopen.TabIndex = 10; - this.btnopen.Text = " "; - this.btnopen.UseVisualStyleBackColor = true; - this.btnopen.Click += new System.EventHandler(this.btnopen_Click); - // - // btnsave - // - this.btnsave.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadsave; - this.btnsave.FlatAppearance.BorderSize = 0; - this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnsave.Location = new System.Drawing.Point(62, 342); - this.btnsave.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnsave.Name = "btnsave"; - this.btnsave.Size = new System.Drawing.Size(50, 50); - this.btnsave.TabIndex = 5; - this.btnsave.Text = " "; - this.btnsave.UseVisualStyleBackColor = true; - this.btnsave.Click += new System.EventHandler(this.btnsave_Click); - // - // btnundo - // - this.btnundo.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadundo; - this.btnundo.FlatAppearance.BorderSize = 0; - this.btnundo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnundo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnundo.Location = new System.Drawing.Point(6, 398); - this.btnundo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnundo.Name = "btnundo"; - this.btnundo.Size = new System.Drawing.Size(50, 50); - this.btnundo.TabIndex = 8; - this.btnundo.Text = " "; - this.btnundo.UseVisualStyleBackColor = true; - this.btnundo.Click += new System.EventHandler(this.btnundo_Click); - // - // btnredo - // - this.btnredo.BackgroundImage = global::ShiftOS.Properties.Resources.ArtPadredo; - this.btnredo.FlatAppearance.BorderSize = 0; - this.btnredo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnredo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnredo.Location = new System.Drawing.Point(62, 398); - this.btnredo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnredo.Name = "btnredo"; - this.btnredo.Size = new System.Drawing.Size(50, 50); - this.btnredo.TabIndex = 9; - this.btnredo.Text = " "; - this.btnredo.UseVisualStyleBackColor = true; - this.btnredo.Click += new System.EventHandler(this.btnredo_Click); - // - // line1 - // - this.line1.BackColor = System.Drawing.Color.Black; - this.line1.Dock = System.Windows.Forms.DockStyle.Right; - this.line1.Location = new System.Drawing.Point(119, 0); - this.line1.Name = "line1"; - this.line1.Size = new System.Drawing.Size(1, 498); - this.line1.TabIndex = 1; - // - // pnltoolpreview - // - this.pnltoolpreview.Controls.Add(this.Label13); - this.pnltoolpreview.Controls.Add(this.picpreview); - this.pnltoolpreview.Controls.Add(this.lbltoolselected); - this.pnltoolpreview.Controls.Add(this.line4); - this.pnltoolpreview.Controls.Add(this.line2); - this.pnltoolpreview.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnltoolpreview.Location = new System.Drawing.Point(0, 498); - this.pnltoolpreview.Name = "pnltoolpreview"; - this.pnltoolpreview.Size = new System.Drawing.Size(120, 100); - this.pnltoolpreview.TabIndex = 0; - // - // Label13 - // - this.Label13.BackColor = System.Drawing.Color.Transparent; - this.Label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label13.Location = new System.Drawing.Point(3, 79); - this.Label13.Name = "Label13"; - this.Label13.Size = new System.Drawing.Size(113, 21); - this.Label13.TabIndex = 6; - this.Label13.Text = "Preview"; - this.Label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // picpreview - // - this.picpreview.Location = new System.Drawing.Point(24, 27); - this.picpreview.Name = "picpreview"; - this.picpreview.Size = new System.Drawing.Size(70, 50); - this.picpreview.TabIndex = 5; - this.picpreview.TabStop = false; - // - // lbltoolselected - // - this.lbltoolselected.BackColor = System.Drawing.Color.Transparent; - this.lbltoolselected.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbltoolselected.Location = new System.Drawing.Point(3, 3); - this.lbltoolselected.Name = "lbltoolselected"; - this.lbltoolselected.Size = new System.Drawing.Size(113, 21); - this.lbltoolselected.TabIndex = 4; - this.lbltoolselected.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // line4 - // - this.line4.BackColor = System.Drawing.Color.Black; - this.line4.Dock = System.Windows.Forms.DockStyle.Top; - this.line4.Location = new System.Drawing.Point(0, 0); - this.line4.Name = "line4"; - this.line4.Size = new System.Drawing.Size(119, 1); - this.line4.TabIndex = 3; - // - // line2 - // - this.line2.BackColor = System.Drawing.Color.Black; - this.line2.Dock = System.Windows.Forms.DockStyle.Right; - this.line2.Location = new System.Drawing.Point(119, 0); - this.line2.Name = "line2"; - this.line2.Size = new System.Drawing.Size(1, 100); - this.line2.TabIndex = 2; - // - // tmrcodepointcooldown - // - this.tmrcodepointcooldown.Interval = 10000; - // - // tmrshowearnedcodepoints - // - this.tmrshowearnedcodepoints.Interval = 3000; - // - // pullbs - // - this.pullbs.Interval = 1; - // - // pullbottom - // - this.pullbottom.Interval = 1; - // - // pullside - // - this.pullside.Interval = 1; - // - // tmrsetupui - // - this.tmrsetupui.Tick += new System.EventHandler(this.tmrsetupui_Tick); - // - // Artpad - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(802, 598); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.MinimumSize = new System.Drawing.Size(502, 398); - this.Name = "Artpad"; - this.Text = "ArtPad"; - this.TopMost = true; - this.Load += new System.EventHandler(this.Template_Load); - this.pgcontents.ResumeLayout(false); - this.pnldrawingbackground.ResumeLayout(false); - this.pnlinitialcanvassettings.ResumeLayout(false); - this.pnlinitialcanvassettings.PerformLayout(); - this.pnlpalletsize.ResumeLayout(false); - this.pnlpalletsize.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picdrawingdisplay)).EndInit(); - this.pnlbottompanel.ResumeLayout(false); - this.pnlpallet.ResumeLayout(false); - this.flowcolours.ResumeLayout(false); - this.pnltoolproperties.ResumeLayout(false); - this.pnltoolproperties.PerformLayout(); - this.pnlovaltoolsettings.ResumeLayout(false); - this.pnlovaltoolsettings.PerformLayout(); - this.pnleracertoolsettings.ResumeLayout(false); - this.pnleracertoolsettings.PerformLayout(); - this.pnllinetoolsettings.ResumeLayout(false); - this.pnllinetoolsettings.PerformLayout(); - this.pnlpaintbrushtoolsettings.ResumeLayout(false); - this.pnlpaintbrushtoolsettings.PerformLayout(); - this.pnltexttoolsettings.ResumeLayout(false); - this.pnltexttoolsettings.PerformLayout(); - this.pnlpixelsettersettings.ResumeLayout(false); - this.pnlpixelsettersettings.PerformLayout(); - this.pnlmagnifiersettings.ResumeLayout(false); - this.pnlfloodfillsettings.ResumeLayout(false); - this.pnlsquaretoolsettings.ResumeLayout(false); - this.pnlsquaretoolsettings.PerformLayout(); - this.pnlpixelplacersettings.ResumeLayout(false); - this.pnlpencilsettings.ResumeLayout(false); - this.pnltools.ResumeLayout(false); - this.pnltoolpositioner.ResumeLayout(false); - this.pnltoolpreview.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.picpreview)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Panel pnlbottompanel; - internal System.Windows.Forms.Panel pnltoolproperties; - internal System.Windows.Forms.Panel pnlpallet; - internal System.Windows.Forms.Panel line3; - internal System.Windows.Forms.Panel line5; - internal System.Windows.Forms.Panel line6; - internal System.Windows.Forms.Panel pnldrawingbackground; - internal System.Windows.Forms.PictureBox picdrawingdisplay; - internal System.Windows.Forms.Button btnpixelsetter; - internal System.Windows.Forms.Panel pnlpixelsettersettings; - internal System.Windows.Forms.Label Label3; - internal System.Windows.Forms.Label Label2; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.Button btnpixelsettersetpixel; - internal System.Windows.Forms.TextBox txtpixelsetterycoordinate; - internal System.Windows.Forms.TextBox txtpixelsetterxcoordinate; - internal System.Windows.Forms.Button btnmagnify; - internal System.Windows.Forms.Panel colourpallet32; - internal System.Windows.Forms.Panel colourpallet31; - internal System.Windows.Forms.Panel colourpallet30; - internal System.Windows.Forms.Panel colourpallet29; - internal System.Windows.Forms.Panel colourpallet28; - internal System.Windows.Forms.Panel colourpallet26; - internal System.Windows.Forms.Panel colourpallet25; - internal System.Windows.Forms.Panel colourpallet23; - internal System.Windows.Forms.Panel colourpallet21; - internal System.Windows.Forms.Panel colourpallet19; - internal System.Windows.Forms.Panel colourpallet8; - internal System.Windows.Forms.Panel colourpallet6; - internal System.Windows.Forms.Panel colourpallet16; - internal System.Windows.Forms.Panel colourpallet14; - internal System.Windows.Forms.Panel colourpallet7; - internal System.Windows.Forms.Panel colourpallet5; - internal System.Windows.Forms.Panel colourpallet10; - internal System.Windows.Forms.Panel colourpallet9; - internal System.Windows.Forms.Panel colourpallet11; - internal System.Windows.Forms.Panel colourpallet12; - internal System.Windows.Forms.Panel colourpallet13; - internal System.Windows.Forms.Panel colourpallet15; - internal System.Windows.Forms.Panel colourpallet4; - internal System.Windows.Forms.Panel colourpallet3; - internal System.Windows.Forms.Panel colourpallet17; - internal System.Windows.Forms.Panel colourpallet18; - internal System.Windows.Forms.Panel colourpallet20; - internal System.Windows.Forms.Panel colourpallet22; - internal System.Windows.Forms.Panel colourpallet24; - internal System.Windows.Forms.Panel colourpallet2; - internal System.Windows.Forms.Panel colourpallet27; - internal System.Windows.Forms.Label Label4; - internal System.Windows.Forms.Panel colourpallet1; - internal System.Windows.Forms.Panel pnlmagnifiersettings; - internal System.Windows.Forms.Button btnzoomin; - internal System.Windows.Forms.Label lblzoomlevel; - internal System.Windows.Forms.Label Label7; - internal System.Windows.Forms.Button btnzoomout; - internal System.Windows.Forms.Button btnpixelplacer; - internal System.Windows.Forms.Panel pnlpixelplacersettings; - internal System.Windows.Forms.Button btnpixelplacermovementmode; - internal System.Windows.Forms.Label Label8; - internal System.Windows.Forms.Label lblpixelplacerhelp; - internal System.Windows.Forms.Label Label6; - internal System.Windows.Forms.Label Label5; - internal System.Windows.Forms.Button btnnew; - internal System.Windows.Forms.FlowLayoutPanel flowcolours; - internal System.Windows.Forms.Button btnpencil; - internal System.Windows.Forms.Panel pnlpencilsettings; - internal System.Windows.Forms.Button btnpencilsize3; - internal System.Windows.Forms.Button btnpencilsize2; - internal System.Windows.Forms.Button btnpencilsize1; - internal System.Windows.Forms.Label Label14; - internal System.Windows.Forms.Button btnfloodfill; - internal System.Windows.Forms.Panel pnlfloodfillsettings; - internal System.Windows.Forms.Label Label12; - internal System.Windows.Forms.Label Label15; - internal System.Windows.Forms.Button btnsquare; - internal System.Windows.Forms.Panel pnlsquaretoolsettings; - internal System.Windows.Forms.TextBox txtsquareborderwidth; - internal System.Windows.Forms.Label Label16; - internal System.Windows.Forms.Label Label18; - internal System.Windows.Forms.Label Label17; - internal System.Windows.Forms.Button btnsquarefillonoff; - internal System.Windows.Forms.Panel pnlsquarefillcolour; - internal System.Windows.Forms.Label Label19; - internal System.Windows.Forms.Button btnoval; - internal System.Windows.Forms.Panel pnlovaltoolsettings; - internal System.Windows.Forms.Label Label20; - internal System.Windows.Forms.Button btnovalfillonoff; - internal System.Windows.Forms.Panel pnlovalfillcolour; - internal System.Windows.Forms.TextBox txtovalborderwidth; - internal System.Windows.Forms.Label Label21; - internal System.Windows.Forms.Label Label22; - internal System.Windows.Forms.Label Label23; - internal System.Windows.Forms.Panel pnltools; - internal System.Windows.Forms.FlowLayoutPanel pnltoolpositioner; - internal System.Windows.Forms.Panel line1; - internal System.Windows.Forms.Panel pnltoolpreview; - internal System.Windows.Forms.Label Label13; - internal System.Windows.Forms.PictureBox picpreview; - internal System.Windows.Forms.Label lbltoolselected; - internal System.Windows.Forms.Panel line4; - internal System.Windows.Forms.Panel line2; - internal System.Windows.Forms.Button btnopen; - internal System.Windows.Forms.Button btnsave; - internal System.Windows.Forms.Button btnundo; - internal System.Windows.Forms.Button btnredo; - internal System.Windows.Forms.Button btneracer; - internal System.Windows.Forms.Button btnlinetool; - internal System.Windows.Forms.Panel pnllinetoolsettings; - internal System.Windows.Forms.Label Label29; - internal System.Windows.Forms.TextBox txtlinewidth; - internal System.Windows.Forms.Label Label30; - internal System.Windows.Forms.Label Label31; - internal System.Windows.Forms.Panel pnleracertoolsettings; - internal System.Windows.Forms.Label Label28; - internal System.Windows.Forms.Button btneracersquare; - internal System.Windows.Forms.Button btneracercircle; - internal System.Windows.Forms.Label Label24; - internal System.Windows.Forms.TextBox txteracersize; - internal System.Windows.Forms.Label Label26; - internal System.Windows.Forms.Label Label27; - internal System.Windows.Forms.Button btntexttool; - internal System.Windows.Forms.Button btnpaintbrush; - internal System.Windows.Forms.Panel pnltexttoolsettings; - internal System.Windows.Forms.Label Label25; - internal System.Windows.Forms.TextBox txtdrawtextsize; - internal System.Windows.Forms.Label Label32; - internal System.Windows.Forms.Label Label33; - internal System.Windows.Forms.Label Label34; - internal System.Windows.Forms.ComboBox combodrawtextfont; - internal System.Windows.Forms.TextBox txtdrawstringtext; - internal System.Windows.Forms.ComboBox combofontstyle; - internal System.Windows.Forms.Label Label35; - internal System.Windows.Forms.Panel pnlpaintbrushtoolsettings; - internal System.Windows.Forms.Label Label36; - internal System.Windows.Forms.Button btnpaintsquareshape; - internal System.Windows.Forms.Button btnpaintcircleshape; - internal System.Windows.Forms.Label Label37; - internal System.Windows.Forms.TextBox txtpaintbrushsize; - internal System.Windows.Forms.Label Label38; - internal System.Windows.Forms.Label Label39; - internal System.Windows.Forms.Timer tmrcodepointcooldown; - internal System.Windows.Forms.Timer tmrshowearnedcodepoints; - internal System.Windows.Forms.Panel pnlpalletsize; - internal System.Windows.Forms.Button btnchangesizecancel; - internal System.Windows.Forms.Button btnsetsize; - internal System.Windows.Forms.TextBox txtcolorpalletheight; - internal System.Windows.Forms.Label Label42; - internal System.Windows.Forms.TextBox txtcolorpalletwidth; - internal System.Windows.Forms.Label Label43; - internal System.Windows.Forms.Panel pnlinitialcanvassettings; - internal System.Windows.Forms.Button btncancel; - internal System.Windows.Forms.Button btncreate; - internal System.Windows.Forms.Label Label11; - internal System.Windows.Forms.Label lbltotalpixels; - internal System.Windows.Forms.TextBox txtnewcanvasheight; - internal System.Windows.Forms.Label Label10; - internal System.Windows.Forms.TextBox txtnewcanvaswidth; - internal System.Windows.Forms.Label Label9; - internal System.Windows.Forms.Panel colourpallet33; - internal System.Windows.Forms.Panel colourpallet34; - internal System.Windows.Forms.Panel colourpallet35; - internal System.Windows.Forms.Panel colourpallet36; - internal System.Windows.Forms.Panel colourpallet37; - internal System.Windows.Forms.Panel colourpallet38; - internal System.Windows.Forms.Panel colourpallet39; - internal System.Windows.Forms.Panel colourpallet40; - internal System.Windows.Forms.Panel colourpallet41; - internal System.Windows.Forms.Panel colourpallet42; - internal System.Windows.Forms.Panel colourpallet43; - internal System.Windows.Forms.Panel colourpallet44; - internal System.Windows.Forms.Panel colourpallet45; - internal System.Windows.Forms.Panel colourpallet46; - internal System.Windows.Forms.Panel colourpallet47; - internal System.Windows.Forms.Panel colourpallet48; - internal System.Windows.Forms.Panel colourpallet49; - internal System.Windows.Forms.Panel colourpallet50; - internal System.Windows.Forms.Panel colourpallet51; - internal System.Windows.Forms.Panel colourpallet52; - internal System.Windows.Forms.Panel colourpallet53; - internal System.Windows.Forms.Panel colourpallet54; - internal System.Windows.Forms.Panel colourpallet55; - internal System.Windows.Forms.Panel colourpallet56; - internal System.Windows.Forms.Panel colourpallet57; - internal System.Windows.Forms.Panel colourpallet58; - internal System.Windows.Forms.Panel colourpallet59; - internal System.Windows.Forms.Panel colourpallet60; - internal System.Windows.Forms.Panel colourpallet61; - internal System.Windows.Forms.Panel colourpallet62; - internal System.Windows.Forms.Panel colourpallet63; - internal System.Windows.Forms.Panel colourpallet64; - internal System.Windows.Forms.Panel colourpallet65; - internal System.Windows.Forms.Panel colourpallet66; - internal System.Windows.Forms.Panel colourpallet67; - internal System.Windows.Forms.Panel colourpallet68; - internal System.Windows.Forms.Panel colourpallet69; - internal System.Windows.Forms.Panel colourpallet70; - internal System.Windows.Forms.Panel colourpallet71; - internal System.Windows.Forms.Panel colourpallet72; - internal System.Windows.Forms.Panel colourpallet73; - internal System.Windows.Forms.Panel colourpallet74; - internal System.Windows.Forms.Panel colourpallet75; - internal System.Windows.Forms.Panel colourpallet76; - internal System.Windows.Forms.Panel colourpallet77; - internal System.Windows.Forms.Panel colourpallet78; - internal System.Windows.Forms.Panel colourpallet79; - internal System.Windows.Forms.Panel colourpallet80; - internal System.Windows.Forms.Panel colourpallet81; - internal System.Windows.Forms.Panel colourpallet82; - internal System.Windows.Forms.Panel colourpallet83; - internal System.Windows.Forms.Panel colourpallet84; - internal System.Windows.Forms.Panel colourpallet85; - internal System.Windows.Forms.Panel colourpallet86; - internal System.Windows.Forms.Panel colourpallet87; - internal System.Windows.Forms.Panel colourpallet88; - internal System.Windows.Forms.Panel colourpallet89; - internal System.Windows.Forms.Panel colourpallet90; - internal System.Windows.Forms.Panel colourpallet91; - internal System.Windows.Forms.Panel colourpallet92; - internal System.Windows.Forms.Panel colourpallet93; - internal System.Windows.Forms.Panel colourpallet94; - internal System.Windows.Forms.Panel colourpallet95; - internal System.Windows.Forms.Panel colourpallet96; - internal System.Windows.Forms.Panel colourpallet97; - internal System.Windows.Forms.Panel colourpallet98; - internal System.Windows.Forms.Panel colourpallet99; - internal System.Windows.Forms.Panel colourpallet100; - internal System.Windows.Forms.Panel colourpallet101; - internal System.Windows.Forms.Panel colourpallet102; - internal System.Windows.Forms.Panel colourpallet103; - internal System.Windows.Forms.Panel colourpallet104; - internal System.Windows.Forms.Panel colourpallet105; - internal System.Windows.Forms.Panel colourpallet106; - internal System.Windows.Forms.Panel colourpallet107; - internal System.Windows.Forms.Panel colourpallet108; - internal System.Windows.Forms.Panel colourpallet109; - internal System.Windows.Forms.Panel colourpallet110; - internal System.Windows.Forms.Panel colourpallet111; - internal System.Windows.Forms.Panel colourpallet112; - internal System.Windows.Forms.Panel colourpallet113; - internal System.Windows.Forms.Panel colourpallet114; - internal System.Windows.Forms.Panel colourpallet115; - internal System.Windows.Forms.Panel colourpallet116; - internal System.Windows.Forms.Panel colourpallet117; - internal System.Windows.Forms.Panel colourpallet118; - internal System.Windows.Forms.Panel colourpallet119; - internal System.Windows.Forms.Panel colourpallet120; - internal System.Windows.Forms.Panel colourpallet121; - internal System.Windows.Forms.Panel colourpallet122; - internal System.Windows.Forms.Panel colourpallet123; - internal System.Windows.Forms.Panel colourpallet124; - internal System.Windows.Forms.Panel colourpallet125; - internal System.Windows.Forms.Panel colourpallet126; - internal System.Windows.Forms.Panel colourpallet127; - internal System.Windows.Forms.Panel colourpallet128; - internal System.Windows.Forms.TextBox txttopspace; - internal System.Windows.Forms.Label Label40; - internal System.Windows.Forms.TextBox txtsidespace; - internal System.Windows.Forms.Label Label41; - internal System.Windows.Forms.Timer pullbs; - internal System.Windows.Forms.Timer pullbottom; - internal System.Windows.Forms.Timer pullside; - private System.Windows.Forms.Timer tmrsetupui; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Artpad.cs b/source/WindowsFormsApplication1/Artpad.cs deleted file mode 100644 index c393ae0..0000000 --- a/source/WindowsFormsApplication1/Artpad.cs +++ /dev/null @@ -1,1783 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.Drawing.Text; -using System.Drawing.Imaging; -using System.Drawing.Drawing2D; - -namespace ShiftOS -{ - public partial class Artpad : Form - { - /// - /// Artpad's GUI. - /// - public Artpad() - { - InitializeComponent(); - } - - #region Variables - - public int rolldownsize; - public int oldbordersize; - public int oldtitlebarheight; - public bool justopened = false; - public bool needtorollback = false; - public int minimumsizewidth = 502; - - public int minimumsizeheight = 398; - public int codepointsearned; - public bool codepointscooldown = false; - - public bool needtosave = false; - int canvaswidth = 150; - int canvasheight = 100; - public Bitmap canvasbitmap; - - Color canvascolor = Color.White; - - Bitmap previewcanvasbitmap; - int magnificationlevel = 1; - Rectangle magnifyRect; - Graphics graphicsbitmap; - public Color drawingcolour = Color.Black; - string selectedtool = "Pixel Setter"; - bool pixalplacermovable = false; - public string savelocation; - System.Drawing.Drawing2D.GraphicsPath mousePath = new System.Drawing.Drawing2D.GraphicsPath(); - int pencilwidth = 1; - undo undo = new undo(); - Point thisPoint; - int eracerwidth = 15; - - string eracertype = "square"; - int paintbrushwidth = 15; - - string paintbrushtype = "circle"; - float rectanglestartpointx; - float rectanglestartpointy; - bool currentlydrawingsquare; - int squarewidth = 1; - bool squarefillon = false; - - Color fillsquarecolor = Color.Black; - float ovalstartpointx; - float ovalstartpointy; - bool currentlydrawingoval; - int ovalwidth = 2; - bool ovalfillon = false; - - Color fillovalcolor = Color.Black; - float linestartpointx; - float linestartpointy; - bool currentlydrawingline; - - int linewidth = 2; - bool currentlydrawingtext; - System.Drawing.Font drawtextfont = new System.Drawing.Font("Microsoft Sans Serif", 16); - int drawtextsize; - string drawtextfontname; - - FontStyle drawtextfontstyle; - - #endregion - - #region Setup - - private void Template_Load(object sender, EventArgs e) - { - justopened = true; - this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; - this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; - - setuppreview(); - settoolcolours(); - loadcolors(); - AddFonts(); - setuptoolbox(); - determinevisiblepallets(); - tmrsetupui.Start(); - } - - - - public void setupcanvas() - { - canvasbitmap = new Bitmap(canvaswidth, canvasheight); - previewcanvasbitmap = new Bitmap(canvaswidth, canvasheight); - picdrawingdisplay.Size = new Size(canvaswidth, canvasheight); - picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth) / 2, (pnldrawingbackground.Height - canvasheight) / 2); - graphicsbitmap = Graphics.FromImage(canvasbitmap); - SolidBrush canvasbrush = new SolidBrush(canvascolor); - graphicsbitmap.FillRectangle(canvasbrush, 0, 0, canvaswidth, canvasheight); - magnificationlevel = 1; - lblzoomlevel.Text = magnificationlevel + "X"; - setuppreview(); - needtosave = false; - } - - public void setuptoolbox() - { - btnpixelplacer.Hide(); - btnpencil.Hide(); - btnfloodfill.Hide(); - btnoval.Hide(); - btnsquare.Hide(); - btnlinetool.Hide(); - btnpaintbrush.Hide(); - btntexttool.Hide(); - btneracer.Hide(); - btnnew.Hide(); - btnopen.Hide(); - btnsave.Hide(); - btnundo.Hide(); - btnredo.Hide(); - btnpixelplacermovementmode.Hide(); - - if (API.Upgrades["artpadpixelplacer"] == true) - btnpixelplacer.Show(); - if (API.Upgrades["artpadpencil"] == true) - btnpencil.Show(); - if (API.Upgrades["artpadfilltool"] == true) - btnfloodfill.Show(); - if (API.Upgrades["artpadovaltool"] == true) - btnoval.Show(); - if (API.Upgrades["artpadrectangletool"] == true) - btnsquare.Show(); - if (API.Upgrades["artpadlinetool"] == true) - btnlinetool.Show(); - if (API.Upgrades["artpadpaintbrush"] == true) - btnpaintbrush.Show(); - if (API.Upgrades["artpadtexttool"] == true) - btntexttool.Show(); - if (API.Upgrades["artpaderaser"] == true) - btneracer.Show(); - if (API.Upgrades["artpadnew"] == true) - btnnew.Show(); - if (API.Upgrades["artpadload"] == true) - btnopen.Show(); - if (API.Upgrades["artpadsave"] == true) - btnsave.Show(); - if (API.Upgrades["artpadundo"] == true) - btnundo.Show(); - if (API.Upgrades["artpadredo"] == true) - btnredo.Show(); - if (API.Upgrades["artpadppmovementmode"] == true) - btnpixelplacermovementmode.Show(); - - } - - private void AddFonts() - { - // Get the installed fonts collection. - InstalledFontCollection allFonts = new InstalledFontCollection(); - - // Get an array of the system's font familiies. - FontFamily[] fontFamilies = allFonts.Families; - - // Display the font families. - foreach (FontFamily myFont in fontFamilies) - { - combodrawtextfont.Items.Add(myFont.Name); - } - //font_family - - combodrawtextfont.SelectedItem = combodrawtextfont.Items[1]; - combofontstyle.Text = "Regular"; - txtdrawtextsize.Text = "16"; - } - - #endregion - - #region General - - // ERROR: Handles clauses are not supported in C# - private void btnpixelsetter_Click(object sender, EventArgs e) - { - selectedtool = "Pixel Setter"; - gettoolsettings(pnlpixelsettersettings); - } - - private void gettoolsettings(Panel toolpanel) - { - //hide all properties panels - pnlpixelsettersettings.Hide(); - pnlmagnifiersettings.Hide(); - - //show chosen panel - toolpanel.Dock = DockStyle.Fill; - toolpanel.BringToFront(); - toolpanel.Show(); - - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnpixelsettersetpixel_Click(object sender, EventArgs e) - { - try - { - undo.undoStack.Push((Image)canvasbitmap.Clone()); - undo.redoStack.Clear(); - canvasbitmap.SetPixel(Convert.ToInt32(txtpixelsetterxcoordinate.Text), Convert.ToInt32(txtpixelsetterycoordinate.Text), drawingcolour); - picdrawingdisplay.Invalidate(); - } - catch - { - API.CreateInfoboxSession("ArtPad - Placement Error!", "You have specified invalid coordinates for the pixel setter." + Environment.NewLine + Environment.NewLine + "Remember that the top left pixel has the coordinates 0, 0", infobox.InfoboxMode.Info); - } - } - - // ERROR: Handles clauses are not supported in C# - private void btnmagnify_Click(object sender, EventArgs e) - { - selectedtool = "Magnifier"; - gettoolsettings(pnlmagnifiersettings); - } - - #endregion - - #region Drawing Display - - // ERROR: Handles clauses are not supported in C# - private void picdrawingdisplay_Paint(object sender, System.Windows.Forms.PaintEventArgs e) - { - e.Graphics.FillRectangle(Brushes.White, 0, 0, canvaswidth * magnificationlevel, canvasheight * magnificationlevel); - e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor; - e.Graphics.PixelOffsetMode = PixelOffsetMode.Half; - e.Graphics.ScaleTransform(magnificationlevel, magnificationlevel); - - if (currentlydrawingsquare == true) - { - GC.Collect(); - Graphics g = Graphics.FromImage(previewcanvasbitmap); - previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); - g = Graphics.FromImage(previewcanvasbitmap); - var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), squarewidth); - var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillsquarecolor)); - RectangleF rectdraw = new RectangleF(rectanglestartpointx, rectanglestartpointy, thisPoint.X - rectanglestartpointx, thisPoint.Y - rectanglestartpointy); - int heightamount; - int widthamount; - if (rectdraw.Height < 0) - heightamount = (int)Math.Abs(rectdraw.Height); - else - heightamount = 0; - if (rectdraw.Width < 0) - widthamount = (int)Math.Abs(rectdraw.Width); - else - widthamount = 0; - if (squarewidth > 0) - { - g.DrawRectangle(CurrentPen, rectdraw.X - widthamount, rectdraw.Y - heightamount, Math.Abs(rectdraw.Width), Math.Abs(rectdraw.Height)); - } - if (squarefillon == true) - { - float correctionamount = squarewidth / 2; - int addfillamount; - if (squarewidth > 0) - addfillamount = squarewidth; - else - addfillamount = -1; - g.FillRectangle(CurrentBrush, (rectdraw.X - widthamount) + correctionamount, (rectdraw.Y - heightamount) + correctionamount, Math.Abs(rectdraw.Width) - addfillamount, Math.Abs(rectdraw.Height) - addfillamount); - } - } - - if (currentlydrawingoval == true) - { - GC.Collect(); - Graphics g = Graphics.FromImage(previewcanvasbitmap); - previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); - g = Graphics.FromImage(previewcanvasbitmap); - var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), ovalwidth); - var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillovalcolor)); - RectangleF ovaldraw = new RectangleF(ovalstartpointx, ovalstartpointy, thisPoint.X - ovalstartpointx, thisPoint.Y - ovalstartpointy); - int heightamount; - int widthamount; - if (ovaldraw.Height < 0) - heightamount = (int)Math.Abs(ovaldraw.Height); - else - heightamount = 0; - if (ovaldraw.Width < 0) - widthamount = (int)Math.Abs(ovaldraw.Width); - else - widthamount = 0; - if (ovalwidth > 0) - { - g.DrawEllipse(CurrentPen, ovaldraw.X - widthamount, ovaldraw.Y - heightamount, Math.Abs(ovaldraw.Width), Math.Abs(ovaldraw.Height)); - } - if (ovalfillon == true) - { - g.FillEllipse(CurrentBrush, (ovaldraw.X - widthamount), (ovaldraw.Y - heightamount), Math.Abs(ovaldraw.Width), Math.Abs(ovaldraw.Height)); - } - } - - if (currentlydrawingline == true) - { - GC.Collect(); - Graphics g = Graphics.FromImage(previewcanvasbitmap); - previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); - g = Graphics.FromImage(previewcanvasbitmap); - var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), linewidth); - g.DrawLine(CurrentPen, linestartpointx, linestartpointy, thisPoint.X, thisPoint.Y); - } - - if (currentlydrawingtext == true) - { - GC.Collect(); - Graphics g = Graphics.FromImage(previewcanvasbitmap); - previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); - g = Graphics.FromImage(previewcanvasbitmap); - var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); - g.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit; - drawtextfont = new System.Drawing.Font(drawtextfontname, drawtextsize, drawtextfontstyle); - g.DrawString(txtdrawstringtext.Text, drawtextfont, CurrentBrush, thisPoint.X, thisPoint.Y); - } - try - { - e.Graphics.DrawImage(canvasbitmap, 0, 0); - e.Graphics.DrawImage(previewcanvasbitmap, 0, 0); - } - catch - { - - } - } - - - - // ERROR: Handles clauses are not supported in C# - private void picdrawingdisplay_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - { - undo.undoStack.Push((Image)canvasbitmap.Clone()); - undo.redoStack.Clear(); - - - thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; - thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; - - if (selectedtool == "Pixel Placer") - { - if (e.Button == MouseButtons.Left) - { - if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) - { - if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) - { - canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour); - //set the pixel on the canvas - picdrawingdisplay.Invalidate(); - //refresh the picture from the canvas - } - } - } - } - - if (selectedtool == "Pencil") - { - if (e.Button == MouseButtons.Left) - { - mousePath.StartFigure(); - picdrawingdisplay.Invalidate(); - } - } - - if (selectedtool == "Flood Fill") - { - if (e.Button == MouseButtons.Left) - { - if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) - { - if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) - { - SafeFloodFill(canvasbitmap, thisPoint.X, thisPoint.Y, drawingcolour); - graphicsbitmap = Graphics.FromImage(canvasbitmap); - picdrawingdisplay.Invalidate(); - } - } - } - } - - if (selectedtool == "Square Tool") - { - if (e.Button == MouseButtons.Left) - { - rectanglestartpointx = thisPoint.X; - rectanglestartpointy = thisPoint.Y; - currentlydrawingsquare = true; - picdrawingdisplay.Invalidate(); - } - } - - if (selectedtool == "Oval Tool") - { - if (e.Button == MouseButtons.Left) - { - ovalstartpointx = thisPoint.X; - ovalstartpointy = thisPoint.Y; - currentlydrawingoval = true; - picdrawingdisplay.Invalidate(); - } - } - - if (selectedtool == "Line Tool") - { - if (e.Button == MouseButtons.Left) - { - linestartpointx = thisPoint.X; - linestartpointy = thisPoint.Y; - currentlydrawingline = true; - picdrawingdisplay.Invalidate(); - } - } - - if (selectedtool == "Text Tool") - { - if (e.Button == MouseButtons.Left) - { - currentlydrawingtext = true; - picdrawingdisplay.Invalidate(); - } - } - - if (selectedtool == "Eracer") - { - var CurrentPen = new Pen(Color.FromArgb(255, canvascolor), eracerwidth); - float halfsize = eracerwidth / 2; - if (eracertype == "circle") - { - graphicsbitmap.DrawEllipse(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); - } - else { - graphicsbitmap.DrawRectangle(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); - } - picdrawingdisplay.Invalidate(); - } - - if (selectedtool == "Paint Brush") - { - var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); - float halfsize = paintbrushwidth / 2; - if (paintbrushtype == "circle") - { - graphicsbitmap.FillEllipse(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); - } - else { - graphicsbitmap.FillRectangle(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); - } - picdrawingdisplay.Invalidate(); - CurrentBrush.Dispose(); - } - preparecooldown(); - } - - // ERROR: Handles clauses are not supported in C# - private void picdrawingdisplay_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) - { - Point lastpoint; - - thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; - thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; - - - if (e.Button == MouseButtons.Left) - { - undo.redoStack.Clear(); - lastpoint = thisPoint; - preparecooldown(); - - if (selectedtool == "Pixel Placer" && pixalplacermovable == true) - { - if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) - { - if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) - { - canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour); - //set the pixel on the canvas - picdrawingdisplay.Invalidate(); - //refresh the picture from the canvas - } - } - } - - if (selectedtool == "Pencil") - { - mousePath.AddLine(thisPoint.X, thisPoint.Y, thisPoint.X, thisPoint.Y); - var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), pencilwidth); - graphicsbitmap.DrawPath(CurrentPen, mousePath); - picdrawingdisplay.Invalidate(); - } - - if (selectedtool == "Square Tool") - { - picdrawingdisplay.Invalidate(); - } - - if (selectedtool == "Oval Tool") - { - picdrawingdisplay.Invalidate(); - } - - if (selectedtool == "Line Tool") - { - picdrawingdisplay.Invalidate(); - } - - if (selectedtool == "Text Tool") - { - picdrawingdisplay.Invalidate(); - } - - if (selectedtool == "Eracer") - { - var CurrentPen = new Pen(Color.FromArgb(255, canvascolor), eracerwidth); - float halfsize = eracerwidth / 2; - if (eracertype == "circle") - { - graphicsbitmap.DrawEllipse(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); - } - else { - graphicsbitmap.DrawRectangle(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); - } - picdrawingdisplay.Invalidate(); - } - - if (selectedtool == "Paint Brush") - { - var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); - float halfsize = paintbrushwidth / 2; - if (paintbrushtype == "circle") - { - graphicsbitmap.FillEllipse(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); - } - else { - graphicsbitmap.FillRectangle(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); - } - picdrawingdisplay.Invalidate(); - } - } - - } - - - // ERROR: Handles clauses are not supported in C# - private void picdrawingdisplay_MouseUp(object sender, MouseEventArgs e) - { - thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; - thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; - - if (selectedtool == "Pencil") - { - if (e.Button == MouseButtons.Left) - { - mousePath.Reset(); - } - } - - if (selectedtool == "Square Tool") - { - picdrawingdisplay.Invalidate(); - currentlydrawingsquare = false; - } - - if (selectedtool == "Oval Tool") - { - picdrawingdisplay.Invalidate(); - currentlydrawingoval = false; - } - - - if (selectedtool == "Line Tool") - { - picdrawingdisplay.Invalidate(); - currentlydrawingline = false; - } - - if (selectedtool == "Text Tool") - { - picdrawingdisplay.Invalidate(); - currentlydrawingtext = false; - } - - using (Graphics g = Graphics.FromImage(canvasbitmap)) - { - g.DrawImage(previewcanvasbitmap, 0, 0); - } - previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); - picdrawingdisplay.Invalidate(); - preparecooldown(); - - } - - #endregion - - #region Color Palettes - // ERROR: Handles clauses are not supported in C# - private void colourpallet1_MouseClick(object sender, MouseEventArgs e) - { - var s = (Control)sender; - if (e.Button == MouseButtons.Left) - { - drawingcolour = s.BackColor; - setuppreview(); - settoolcolours(); - } - else { - API.CreateColorPickerSession("Artpad Pallete Color", s.BackColor); - API.ColorPickerSession.FormClosing += (object se, FormClosingEventArgs a) => - { - s.BackColor = API.GetLastColorFromSession(); - }; - } - } - - // - public void loadcolors() - { - /*bool allwhite = true; - for (int i = 0; i <= 127; i++) - { - if (ShiftOSDesktop.artpadcolourpallets(i) == null) - { - } - else { - allwhite = false; - } - } - if (allwhite == true) - { - for (i = 0; i <= 127; i++) - { - ShiftOSDesktop.artpadcolourpallets(i) = Color.Black; - } - } - colourpallet1.BackColor = ShiftOSDesktop.artpadcolourpallets(0); - colourpallet2.BackColor = ShiftOSDesktop.artpadcolourpallets(1); - colourpallet3.BackColor = ShiftOSDesktop.artpadcolourpallets(2); - colourpallet4.BackColor = ShiftOSDesktop.artpadcolourpallets(3); - colourpallet5.BackColor = ShiftOSDesktop.artpadcolourpallets(4); - colourpallet6.BackColor = ShiftOSDesktop.artpadcolourpallets(5); - colourpallet7.BackColor = ShiftOSDesktop.artpadcolourpallets(6); - colourpallet8.BackColor = ShiftOSDesktop.artpadcolourpallets(7); - colourpallet9.BackColor = ShiftOSDesktop.artpadcolourpallets(8); - colourpallet10.BackColor = ShiftOSDesktop.artpadcolourpallets(9); - colourpallet11.BackColor = ShiftOSDesktop.artpadcolourpallets(10); - colourpallet12.BackColor = ShiftOSDesktop.artpadcolourpallets(11); - colourpallet13.BackColor = ShiftOSDesktop.artpadcolourpallets(12); - colourpallet14.BackColor = ShiftOSDesktop.artpadcolourpallets(13); - colourpallet15.BackColor = ShiftOSDesktop.artpadcolourpallets(14); - colourpallet16.BackColor = ShiftOSDesktop.artpadcolourpallets(15); - colourpallet17.BackColor = ShiftOSDesktop.artpadcolourpallets(16); - colourpallet18.BackColor = ShiftOSDesktop.artpadcolourpallets(17); - colourpallet19.BackColor = ShiftOSDesktop.artpadcolourpallets(18); - colourpallet20.BackColor = ShiftOSDesktop.artpadcolourpallets(19); - colourpallet21.BackColor = ShiftOSDesktop.artpadcolourpallets(20); - colourpallet22.BackColor = ShiftOSDesktop.artpadcolourpallets(21); - colourpallet23.BackColor = ShiftOSDesktop.artpadcolourpallets(22); - colourpallet24.BackColor = ShiftOSDesktop.artpadcolourpallets(23); - colourpallet25.BackColor = ShiftOSDesktop.artpadcolourpallets(24); - colourpallet26.BackColor = ShiftOSDesktop.artpadcolourpallets(25); - colourpallet27.BackColor = ShiftOSDesktop.artpadcolourpallets(26); - colourpallet28.BackColor = ShiftOSDesktop.artpadcolourpallets(27); - colourpallet29.BackColor = ShiftOSDesktop.artpadcolourpallets(28); - colourpallet30.BackColor = ShiftOSDesktop.artpadcolourpallets(29); - colourpallet31.BackColor = ShiftOSDesktop.artpadcolourpallets(30); - colourpallet32.BackColor = ShiftOSDesktop.artpadcolourpallets(31); - colourpallet33.BackColor = ShiftOSDesktop.artpadcolourpallets(32); - colourpallet34.BackColor = ShiftOSDesktop.artpadcolourpallets(33); - colourpallet35.BackColor = ShiftOSDesktop.artpadcolourpallets(34); - colourpallet36.BackColor = ShiftOSDesktop.artpadcolourpallets(35); - colourpallet37.BackColor = ShiftOSDesktop.artpadcolourpallets(36); - colourpallet38.BackColor = ShiftOSDesktop.artpadcolourpallets(37); - colourpallet39.BackColor = ShiftOSDesktop.artpadcolourpallets(38); - colourpallet40.BackColor = ShiftOSDesktop.artpadcolourpallets(39); - colourpallet41.BackColor = ShiftOSDesktop.artpadcolourpallets(40); - colourpallet42.BackColor = ShiftOSDesktop.artpadcolourpallets(41); - colourpallet43.BackColor = ShiftOSDesktop.artpadcolourpallets(42); - colourpallet44.BackColor = ShiftOSDesktop.artpadcolourpallets(43); - colourpallet45.BackColor = ShiftOSDesktop.artpadcolourpallets(44); - colourpallet46.BackColor = ShiftOSDesktop.artpadcolourpallets(45); - colourpallet47.BackColor = ShiftOSDesktop.artpadcolourpallets(46); - colourpallet48.BackColor = ShiftOSDesktop.artpadcolourpallets(47); - colourpallet49.BackColor = ShiftOSDesktop.artpadcolourpallets(48); - colourpallet50.BackColor = ShiftOSDesktop.artpadcolourpallets(49); - colourpallet51.BackColor = ShiftOSDesktop.artpadcolourpallets(50); - colourpallet52.BackColor = ShiftOSDesktop.artpadcolourpallets(51); - colourpallet53.BackColor = ShiftOSDesktop.artpadcolourpallets(52); - colourpallet54.BackColor = ShiftOSDesktop.artpadcolourpallets(53); - colourpallet55.BackColor = ShiftOSDesktop.artpadcolourpallets(54); - colourpallet56.BackColor = ShiftOSDesktop.artpadcolourpallets(55); - colourpallet57.BackColor = ShiftOSDesktop.artpadcolourpallets(56); - colourpallet58.BackColor = ShiftOSDesktop.artpadcolourpallets(57); - colourpallet59.BackColor = ShiftOSDesktop.artpadcolourpallets(58); - colourpallet60.BackColor = ShiftOSDesktop.artpadcolourpallets(59); - colourpallet61.BackColor = ShiftOSDesktop.artpadcolourpallets(60); - colourpallet62.BackColor = ShiftOSDesktop.artpadcolourpallets(61); - colourpallet63.BackColor = ShiftOSDesktop.artpadcolourpallets(62); - colourpallet64.BackColor = ShiftOSDesktop.artpadcolourpallets(63); - colourpallet65.BackColor = ShiftOSDesktop.artpadcolourpallets(64); - colourpallet66.BackColor = ShiftOSDesktop.artpadcolourpallets(65); - colourpallet67.BackColor = ShiftOSDesktop.artpadcolourpallets(66); - colourpallet68.BackColor = ShiftOSDesktop.artpadcolourpallets(67); - colourpallet69.BackColor = ShiftOSDesktop.artpadcolourpallets(68); - colourpallet70.BackColor = ShiftOSDesktop.artpadcolourpallets(69); - colourpallet71.BackColor = ShiftOSDesktop.artpadcolourpallets(70); - colourpallet72.BackColor = ShiftOSDesktop.artpadcolourpallets(71); - colourpallet73.BackColor = ShiftOSDesktop.artpadcolourpallets(72); - colourpallet74.BackColor = ShiftOSDesktop.artpadcolourpallets(73); - colourpallet75.BackColor = ShiftOSDesktop.artpadcolourpallets(74); - colourpallet76.BackColor = ShiftOSDesktop.artpadcolourpallets(75); - colourpallet77.BackColor = ShiftOSDesktop.artpadcolourpallets(76); - colourpallet78.BackColor = ShiftOSDesktop.artpadcolourpallets(77); - colourpallet79.BackColor = ShiftOSDesktop.artpadcolourpallets(78); - colourpallet80.BackColor = ShiftOSDesktop.artpadcolourpallets(79); - colourpallet81.BackColor = ShiftOSDesktop.artpadcolourpallets(80); - colourpallet82.BackColor = ShiftOSDesktop.artpadcolourpallets(81); - colourpallet83.BackColor = ShiftOSDesktop.artpadcolourpallets(82); - colourpallet84.BackColor = ShiftOSDesktop.artpadcolourpallets(83); - colourpallet85.BackColor = ShiftOSDesktop.artpadcolourpallets(84); - colourpallet86.BackColor = ShiftOSDesktop.artpadcolourpallets(85); - colourpallet87.BackColor = ShiftOSDesktop.artpadcolourpallets(86); - colourpallet88.BackColor = ShiftOSDesktop.artpadcolourpallets(87); - colourpallet89.BackColor = ShiftOSDesktop.artpadcolourpallets(88); - colourpallet90.BackColor = ShiftOSDesktop.artpadcolourpallets(89); - colourpallet91.BackColor = ShiftOSDesktop.artpadcolourpallets(90); - colourpallet92.BackColor = ShiftOSDesktop.artpadcolourpallets(91); - colourpallet93.BackColor = ShiftOSDesktop.artpadcolourpallets(92); - colourpallet94.BackColor = ShiftOSDesktop.artpadcolourpallets(93); - colourpallet95.BackColor = ShiftOSDesktop.artpadcolourpallets(94); - colourpallet96.BackColor = ShiftOSDesktop.artpadcolourpallets(95); - colourpallet97.BackColor = ShiftOSDesktop.artpadcolourpallets(96); - colourpallet98.BackColor = ShiftOSDesktop.artpadcolourpallets(97); - colourpallet99.BackColor = ShiftOSDesktop.artpadcolourpallets(98); - colourpallet100.BackColor = ShiftOSDesktop.artpadcolourpallets(99); - colourpallet101.BackColor = ShiftOSDesktop.artpadcolourpallets(100); - colourpallet102.BackColor = ShiftOSDesktop.artpadcolourpallets(101); - colourpallet103.BackColor = ShiftOSDesktop.artpadcolourpallets(102); - colourpallet104.BackColor = ShiftOSDesktop.artpadcolourpallets(103); - colourpallet105.BackColor = ShiftOSDesktop.artpadcolourpallets(104); - colourpallet106.BackColor = ShiftOSDesktop.artpadcolourpallets(105); - colourpallet107.BackColor = ShiftOSDesktop.artpadcolourpallets(106); - colourpallet108.BackColor = ShiftOSDesktop.artpadcolourpallets(107); - colourpallet109.BackColor = ShiftOSDesktop.artpadcolourpallets(108); - colourpallet110.BackColor = ShiftOSDesktop.artpadcolourpallets(109); - colourpallet111.BackColor = ShiftOSDesktop.artpadcolourpallets(110); - colourpallet112.BackColor = ShiftOSDesktop.artpadcolourpallets(111); - colourpallet113.BackColor = ShiftOSDesktop.artpadcolourpallets(112); - colourpallet114.BackColor = ShiftOSDesktop.artpadcolourpallets(113); - colourpallet115.BackColor = ShiftOSDesktop.artpadcolourpallets(114); - colourpallet116.BackColor = ShiftOSDesktop.artpadcolourpallets(115); - colourpallet117.BackColor = ShiftOSDesktop.artpadcolourpallets(116); - colourpallet118.BackColor = ShiftOSDesktop.artpadcolourpallets(117); - colourpallet119.BackColor = ShiftOSDesktop.artpadcolourpallets(118); - colourpallet120.BackColor = ShiftOSDesktop.artpadcolourpallets(119); - colourpallet121.BackColor = ShiftOSDesktop.artpadcolourpallets(120); - colourpallet122.BackColor = ShiftOSDesktop.artpadcolourpallets(121); - colourpallet123.BackColor = ShiftOSDesktop.artpadcolourpallets(122); - colourpallet124.BackColor = ShiftOSDesktop.artpadcolourpallets(123); - colourpallet125.BackColor = ShiftOSDesktop.artpadcolourpallets(124); - colourpallet126.BackColor = ShiftOSDesktop.artpadcolourpallets(125); - colourpallet127.BackColor = ShiftOSDesktop.artpadcolourpallets(126); - colourpallet128.BackColor = ShiftOSDesktop.artpadcolourpallets(127); - */} - - public void savecolors() - {/* - ShiftOSDesktop.artpadcolourpallets(0) = colourpallet1.BackColor; - ShiftOSDesktop.artpadcolourpallets(1) = colourpallet2.BackColor; - ShiftOSDesktop.artpadcolourpallets(2) = colourpallet3.BackColor; - ShiftOSDesktop.artpadcolourpallets(3) = colourpallet4.BackColor; - ShiftOSDesktop.artpadcolourpallets(4) = colourpallet5.BackColor; - ShiftOSDesktop.artpadcolourpallets(5) = colourpallet6.BackColor; - ShiftOSDesktop.artpadcolourpallets(6) = colourpallet7.BackColor; - ShiftOSDesktop.artpadcolourpallets(7) = colourpallet8.BackColor; - ShiftOSDesktop.artpadcolourpallets(8) = colourpallet9.BackColor; - ShiftOSDesktop.artpadcolourpallets(9) = colourpallet10.BackColor; - ShiftOSDesktop.artpadcolourpallets(10) = colourpallet11.BackColor; - ShiftOSDesktop.artpadcolourpallets(11) = colourpallet12.BackColor; - ShiftOSDesktop.artpadcolourpallets(12) = colourpallet13.BackColor; - ShiftOSDesktop.artpadcolourpallets(13) = colourpallet14.BackColor; - ShiftOSDesktop.artpadcolourpallets(14) = colourpallet15.BackColor; - ShiftOSDesktop.artpadcolourpallets(15) = colourpallet16.BackColor; - ShiftOSDesktop.artpadcolourpallets(16) = colourpallet17.BackColor; - ShiftOSDesktop.artpadcolourpallets(17) = colourpallet18.BackColor; - ShiftOSDesktop.artpadcolourpallets(18) = colourpallet19.BackColor; - ShiftOSDesktop.artpadcolourpallets(19) = colourpallet20.BackColor; - ShiftOSDesktop.artpadcolourpallets(20) = colourpallet21.BackColor; - ShiftOSDesktop.artpadcolourpallets(21) = colourpallet22.BackColor; - ShiftOSDesktop.artpadcolourpallets(22) = colourpallet23.BackColor; - ShiftOSDesktop.artpadcolourpallets(23) = colourpallet24.BackColor; - ShiftOSDesktop.artpadcolourpallets(24) = colourpallet25.BackColor; - ShiftOSDesktop.artpadcolourpallets(25) = colourpallet26.BackColor; - ShiftOSDesktop.artpadcolourpallets(26) = colourpallet27.BackColor; - ShiftOSDesktop.artpadcolourpallets(27) = colourpallet28.BackColor; - ShiftOSDesktop.artpadcolourpallets(28) = colourpallet29.BackColor; - ShiftOSDesktop.artpadcolourpallets(29) = colourpallet30.BackColor; - ShiftOSDesktop.artpadcolourpallets(30) = colourpallet31.BackColor; - ShiftOSDesktop.artpadcolourpallets(31) = colourpallet32.BackColor; - ShiftOSDesktop.artpadcolourpallets(32) = colourpallet33.BackColor; - ShiftOSDesktop.artpadcolourpallets(33) = colourpallet34.BackColor; - ShiftOSDesktop.artpadcolourpallets(34) = colourpallet35.BackColor; - ShiftOSDesktop.artpadcolourpallets(35) = colourpallet36.BackColor; - ShiftOSDesktop.artpadcolourpallets(36) = colourpallet37.BackColor; - ShiftOSDesktop.artpadcolourpallets(37) = colourpallet38.BackColor; - ShiftOSDesktop.artpadcolourpallets(38) = colourpallet39.BackColor; - ShiftOSDesktop.artpadcolourpallets(39) = colourpallet40.BackColor; - ShiftOSDesktop.artpadcolourpallets(40) = colourpallet41.BackColor; - ShiftOSDesktop.artpadcolourpallets(41) = colourpallet42.BackColor; - ShiftOSDesktop.artpadcolourpallets(42) = colourpallet43.BackColor; - ShiftOSDesktop.artpadcolourpallets(43) = colourpallet44.BackColor; - ShiftOSDesktop.artpadcolourpallets(44) = colourpallet45.BackColor; - ShiftOSDesktop.artpadcolourpallets(45) = colourpallet46.BackColor; - ShiftOSDesktop.artpadcolourpallets(46) = colourpallet47.BackColor; - ShiftOSDesktop.artpadcolourpallets(47) = colourpallet48.BackColor; - ShiftOSDesktop.artpadcolourpallets(48) = colourpallet49.BackColor; - ShiftOSDesktop.artpadcolourpallets(49) = colourpallet50.BackColor; - ShiftOSDesktop.artpadcolourpallets(50) = colourpallet51.BackColor; - ShiftOSDesktop.artpadcolourpallets(51) = colourpallet52.BackColor; - ShiftOSDesktop.artpadcolourpallets(52) = colourpallet53.BackColor; - ShiftOSDesktop.artpadcolourpallets(53) = colourpallet54.BackColor; - ShiftOSDesktop.artpadcolourpallets(54) = colourpallet55.BackColor; - ShiftOSDesktop.artpadcolourpallets(55) = colourpallet56.BackColor; - ShiftOSDesktop.artpadcolourpallets(56) = colourpallet57.BackColor; - ShiftOSDesktop.artpadcolourpallets(57) = colourpallet58.BackColor; - ShiftOSDesktop.artpadcolourpallets(58) = colourpallet59.BackColor; - ShiftOSDesktop.artpadcolourpallets(59) = colourpallet60.BackColor; - ShiftOSDesktop.artpadcolourpallets(60) = colourpallet61.BackColor; - ShiftOSDesktop.artpadcolourpallets(61) = colourpallet62.BackColor; - ShiftOSDesktop.artpadcolourpallets(62) = colourpallet63.BackColor; - ShiftOSDesktop.artpadcolourpallets(63) = colourpallet64.BackColor; - ShiftOSDesktop.artpadcolourpallets(64) = colourpallet65.BackColor; - ShiftOSDesktop.artpadcolourpallets(65) = colourpallet66.BackColor; - ShiftOSDesktop.artpadcolourpallets(66) = colourpallet67.BackColor; - ShiftOSDesktop.artpadcolourpallets(67) = colourpallet68.BackColor; - ShiftOSDesktop.artpadcolourpallets(68) = colourpallet69.BackColor; - ShiftOSDesktop.artpadcolourpallets(69) = colourpallet70.BackColor; - ShiftOSDesktop.artpadcolourpallets(70) = colourpallet71.BackColor; - ShiftOSDesktop.artpadcolourpallets(71) = colourpallet72.BackColor; - ShiftOSDesktop.artpadcolourpallets(72) = colourpallet73.BackColor; - ShiftOSDesktop.artpadcolourpallets(73) = colourpallet74.BackColor; - ShiftOSDesktop.artpadcolourpallets(74) = colourpallet75.BackColor; - ShiftOSDesktop.artpadcolourpallets(75) = colourpallet76.BackColor; - ShiftOSDesktop.artpadcolourpallets(76) = colourpallet77.BackColor; - ShiftOSDesktop.artpadcolourpallets(77) = colourpallet78.BackColor; - ShiftOSDesktop.artpadcolourpallets(78) = colourpallet79.BackColor; - ShiftOSDesktop.artpadcolourpallets(79) = colourpallet80.BackColor; - ShiftOSDesktop.artpadcolourpallets(80) = colourpallet81.BackColor; - ShiftOSDesktop.artpadcolourpallets(81) = colourpallet82.BackColor; - ShiftOSDesktop.artpadcolourpallets(82) = colourpallet83.BackColor; - ShiftOSDesktop.artpadcolourpallets(83) = colourpallet84.BackColor; - ShiftOSDesktop.artpadcolourpallets(84) = colourpallet85.BackColor; - ShiftOSDesktop.artpadcolourpallets(85) = colourpallet86.BackColor; - ShiftOSDesktop.artpadcolourpallets(86) = colourpallet87.BackColor; - ShiftOSDesktop.artpadcolourpallets(87) = colourpallet88.BackColor; - ShiftOSDesktop.artpadcolourpallets(88) = colourpallet89.BackColor; - ShiftOSDesktop.artpadcolourpallets(89) = colourpallet90.BackColor; - ShiftOSDesktop.artpadcolourpallets(90) = colourpallet91.BackColor; - ShiftOSDesktop.artpadcolourpallets(91) = colourpallet92.BackColor; - ShiftOSDesktop.artpadcolourpallets(92) = colourpallet93.BackColor; - ShiftOSDesktop.artpadcolourpallets(93) = colourpallet94.BackColor; - ShiftOSDesktop.artpadcolourpallets(94) = colourpallet95.BackColor; - ShiftOSDesktop.artpadcolourpallets(95) = colourpallet96.BackColor; - ShiftOSDesktop.artpadcolourpallets(96) = colourpallet97.BackColor; - ShiftOSDesktop.artpadcolourpallets(97) = colourpallet98.BackColor; - ShiftOSDesktop.artpadcolourpallets(98) = colourpallet99.BackColor; - ShiftOSDesktop.artpadcolourpallets(99) = colourpallet100.BackColor; - ShiftOSDesktop.artpadcolourpallets(100) = colourpallet101.BackColor; - ShiftOSDesktop.artpadcolourpallets(101) = colourpallet102.BackColor; - ShiftOSDesktop.artpadcolourpallets(102) = colourpallet103.BackColor; - ShiftOSDesktop.artpadcolourpallets(103) = colourpallet104.BackColor; - ShiftOSDesktop.artpadcolourpallets(104) = colourpallet105.BackColor; - ShiftOSDesktop.artpadcolourpallets(105) = colourpallet106.BackColor; - ShiftOSDesktop.artpadcolourpallets(106) = colourpallet107.BackColor; - ShiftOSDesktop.artpadcolourpallets(107) = colourpallet108.BackColor; - ShiftOSDesktop.artpadcolourpallets(108) = colourpallet109.BackColor; - ShiftOSDesktop.artpadcolourpallets(109) = colourpallet110.BackColor; - ShiftOSDesktop.artpadcolourpallets(110) = colourpallet111.BackColor; - ShiftOSDesktop.artpadcolourpallets(111) = colourpallet112.BackColor; - ShiftOSDesktop.artpadcolourpallets(112) = colourpallet113.BackColor; - ShiftOSDesktop.artpadcolourpallets(113) = colourpallet114.BackColor; - ShiftOSDesktop.artpadcolourpallets(114) = colourpallet115.BackColor; - ShiftOSDesktop.artpadcolourpallets(115) = colourpallet116.BackColor; - ShiftOSDesktop.artpadcolourpallets(116) = colourpallet117.BackColor; - ShiftOSDesktop.artpadcolourpallets(117) = colourpallet118.BackColor; - ShiftOSDesktop.artpadcolourpallets(118) = colourpallet119.BackColor; - ShiftOSDesktop.artpadcolourpallets(119) = colourpallet120.BackColor; - ShiftOSDesktop.artpadcolourpallets(120) = colourpallet121.BackColor; - ShiftOSDesktop.artpadcolourpallets(121) = colourpallet122.BackColor; - ShiftOSDesktop.artpadcolourpallets(122) = colourpallet123.BackColor; - ShiftOSDesktop.artpadcolourpallets(123) = colourpallet124.BackColor; - ShiftOSDesktop.artpadcolourpallets(124) = colourpallet125.BackColor; - ShiftOSDesktop.artpadcolourpallets(125) = colourpallet126.BackColor; - ShiftOSDesktop.artpadcolourpallets(126) = colourpallet127.BackColor; - ShiftOSDesktop.artpadcolourpallets(127) = colourpallet128.BackColor; - */} - // - - public void settoolcolours() - { - btnpixelsetter.BackColor = drawingcolour; - btnpixelplacer.BackColor = drawingcolour; - btnpencil.BackColor = drawingcolour; - btnfloodfill.BackColor = drawingcolour; - btnsquare.BackColor = drawingcolour; - btnoval.BackColor = drawingcolour; - btnlinetool.BackColor = drawingcolour; - btnpaintbrush.BackColor = drawingcolour; - btntexttool.BackColor = drawingcolour; - } - #endregion - - #region Zooming - - // ERROR: Handles clauses are not supported in C# - private void btnzoomin_Click(object sender, EventArgs e) - { - if (magnificationlevel < 256) - { - magnificationlevel *= 2; - } - else { - API.CreateInfoboxSession("ArtPad - Magnification Error!" - , "You are unable to increase the magnification level any further." + Environment.NewLine + Environment.NewLine + "256x is the highest level of magnification supported by ArtPad!", infobox.InfoboxMode.Info); - } - setmagnification(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnzoomout_Click(object sender, EventArgs e) - { - if (magnificationlevel > 1) - { - magnificationlevel /= 2; - pnldrawingbackground.AutoScrollPosition = new Point(0, 0); - } - else { - API.CreateInfoboxSession("ArtPad - Magnification Error!" - ,"You are unable to decrease the magnification level any further." + Environment.NewLine + Environment.NewLine + "Artpad is unable to scale pixels at a level smaller than their actual size!", infobox.InfoboxMode.Info); - } - setmagnification(); - } - - private void setmagnification() - { - magnifyRect.Width = (int)canvaswidth / magnificationlevel; - magnifyRect.Height = (int)canvasheight / magnificationlevel; - picdrawingdisplay.Size = new Size(canvaswidth * magnificationlevel, canvasheight * magnificationlevel); - if (picdrawingdisplay.Height > 468 && picdrawingdisplay.Width > 676) - { - picdrawingdisplay.Location = new Point(0, 0); - } - else { - picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth * magnificationlevel) / 2, (pnldrawingbackground.Height - canvasheight * magnificationlevel) / 2); - } - picdrawingdisplay.Invalidate(); - lblzoomlevel.Text = magnificationlevel + "X"; - } - - #endregion - - #region Pixel Placer - - // ERROR: Handles clauses are not supported in C# - private void pnlpixelplacer_Click(object sender, EventArgs e) - { - selectedtool = "Pixel Placer"; - gettoolsettings(pnlpixelplacersettings); - } - - // ERROR: Handles clauses are not supported in C# - private void btnpixelplacermovementmode_Click(object sender, EventArgs e) - { - if (pixalplacermovable == false) - { - pixalplacermovable = true; - btnpixelplacermovementmode.ForeColor = Color.White; - btnpixelplacermovementmode.BackColor = Color.Black; - btnpixelplacermovementmode.Text = "Deactivate Movement Mode"; - lblpixelplacerhelp.Text = "Movement mode is enabled. Click and drag on the canvas to place pixels as you move the mouse. Please use 4x magnification or greater and move the mouse very slowly."; - } - else { - pixalplacermovable = false; - btnpixelplacermovementmode.ForeColor = Color.Black; - btnpixelplacermovementmode.BackColor = Color.White; - btnpixelplacermovementmode.Text = "Activate Movement Mode"; - lblpixelplacerhelp.Text = "This tool does not contain any alterable settings. Simply click on the canvas and a pixel will be placed in the spot you click."; - } - } - - #endregion - - #region Saving - - // ERROR: Handles clauses are not supported in C# - private void btnsave_Click(object sender, EventArgs e) - { - showsavedialog(); - } - - public void showsavedialog() - { - API.CreateFileSkimmerSession(".pic", File_Skimmer.FileSkimmerMode.Save); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if(res != "fail") - { - savelocation = res; - saveimage(); - } - }; - } - - public void saveimage() - { - canvasbitmap.Save(savelocation, ImageFormat.Bmp); - } - #endregion - - #region New Canvas - - // ERROR: Handles clauses are not supported in C# - private void txtnewcanvaswidth_TextChanged(object sender, EventArgs e) - { - if (txtnewcanvaswidth.Text == "" | txtnewcanvasheight.Text == "") - { - if(txtnewcanvasheight.Text == "") - { - txtnewcanvasheight.Text = "0"; - } - if (txtnewcanvaswidth.Text == "") - { - txtnewcanvaswidth.Text = "0"; - } - } - else { - try { - lbltotalpixels.Text = (Convert.ToInt32(txtnewcanvaswidth.Text) * Convert.ToInt32(txtnewcanvasheight.Text)).ToString(); - if (API.Upgrades["artpadlimitlesspixels"] == true) - { - lbltotalpixels.ForeColor = Color.Black; - } - else { - if ((Convert.ToInt32(txtnewcanvaswidth.Text) * Convert.ToInt32(txtnewcanvasheight.Text)) > GetPixelLimit()) - { - lbltotalpixels.ForeColor = Color.Red; - } - else { - lbltotalpixels.ForeColor = Color.Black; - } - } - } - catch - { - - } - } - - } - - public int GetPixelLimit() - { - int value = 2; - - - if(API.Upgrades["artpadpixellimit4"]) - { - value = 4; - if (API.Upgrades["artpadpixellimit8"]) - { - value = 8; - if (API.Upgrades["artpadpixellimit16"]) - { - value = 16; - if (API.Upgrades["artpadpixellimit64"]) - { - value = 64; - if (API.Upgrades["artpadpixellimit256"]) - { - value = 256; - if (API.Upgrades["artpadpixellimit1024"]) - { - value = 1024; - if (API.Upgrades["artpadpixellimit4096"]) - { - value = 4096; - if (API.Upgrades["artpadpixellimit16384"]) - { - value = 16384; - if (API.Upgrades["artpadpixellimit65536"]) - { - value = 65536; - } - } - } - } - } - } - } - } - } - - return value; - } - - // ERROR: Handles clauses are not supported in C# - private void btncreate_Click(object sender, EventArgs e) - { - if (lbltotalpixels.ForeColor == Color.Red) - { - API.CreateInfoboxSession("Artpad - Error", "Artpad cannot create the image. It is too big.", infobox.InfoboxMode.Info); - } - else { - if (lbltotalpixels.Text == "0") - { - } - else { - canvaswidth = Convert.ToInt32(txtnewcanvaswidth.Text); - canvasheight = Convert.ToInt32(txtnewcanvasheight.Text); - picdrawingdisplay.Show(); - setupcanvas(); - pnlinitialcanvassettings.Hide(); - } - } - } - - // ERROR: Handles clauses are not supported in C# - private void btncancel_Click(object sender, EventArgs e) - { - pnlinitialcanvassettings.Hide(); - picdrawingdisplay.Show(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnnew_Click(object sender, EventArgs e) - { - pnlinitialcanvassettings.Show(); - picdrawingdisplay.Hide(); - } - - #endregion - - #region Preview - - public void setuppreview() - { - lbltoolselected.Text = selectedtool; - picpreview.CreateGraphics().FillRectangle(Brushes.White, 0, 0, 70, 50); - switch (selectedtool) - { - case "Square Tool": - var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), squarewidth); - var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillsquarecolor)); - RectangleF rectdraw = new RectangleF(0, 0, picpreview.Width, picpreview.Height); - float correctionamount = squarewidth / 2; - if (squarewidth > 0) - { - picpreview.CreateGraphics().DrawRectangle(CurrentPen, rectdraw.X + correctionamount, rectdraw.Y + correctionamount, rectdraw.Width - squarewidth, rectdraw.Height - squarewidth); - } - if (squarefillon == true) - { - picpreview.CreateGraphics().FillRectangle(CurrentBrush, rectdraw.X + squarewidth, rectdraw.Y + squarewidth, rectdraw.Width - squarewidth - squarewidth, rectdraw.Height - squarewidth - squarewidth); - } - break; - case "Oval Tool": - var ovalCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), ovalwidth); - var ovalCurrentBrush = new SolidBrush(Color.FromArgb(255, fillovalcolor)); - RectangleF ovalrectdraw = new RectangleF(0, 0, picpreview.Width, picpreview.Height); - float ovalcorrectionamount = ovalwidth / 2; - if (ovalwidth > 0) - { - picpreview.CreateGraphics().DrawEllipse(ovalCurrentPen, ovalrectdraw.X + ovalcorrectionamount, ovalrectdraw.Y + ovalcorrectionamount, ovalrectdraw.Width - ovalwidth, ovalrectdraw.Height - ovalwidth); - } - if (ovalfillon == true) - { - float fixer = ovalwidth / 2; - picpreview.CreateGraphics().FillEllipse(ovalCurrentBrush, (ovalrectdraw.X + fixer), (ovalrectdraw.Y + fixer), ovalrectdraw.Width - fixer - fixer, ovalrectdraw.Height - fixer - fixer); - } - break; - case "Text Tool": - var textCurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); - drawtextfont = new System.Drawing.Font(drawtextfontname, 20, drawtextfontstyle); - picpreview.CreateGraphics().DrawString("A", drawtextfont, textCurrentBrush, 20, 0); - break; - case "Line Tool": - var lineCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), linewidth); - picpreview.CreateGraphics().DrawLine(lineCurrentPen, 0, 0, picpreview.Width, picpreview.Height); - break; - case "Pencil": - var pencilCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), pencilwidth); - picpreview.CreateGraphics().DrawLine(pencilCurrentPen, 0, 25, picpreview.Width, 25); - break; - case "Paint Brush": - var pbCurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); - float halfsize = paintbrushwidth / 2; - float halfwidth = picdrawingdisplay.Width / 2; - float halfheight = picdrawingdisplay.Height / 2; - if (paintbrushtype == "circle") - { - picpreview.CreateGraphics().FillEllipse(pbCurrentBrush, halfwidth - 15 - halfsize, halfheight - 1 - halfsize, paintbrushwidth, paintbrushwidth); - } - else { - picpreview.CreateGraphics().FillRectangle(pbCurrentBrush, halfwidth - 15 - halfsize, halfheight - 1 - halfsize, paintbrushwidth, paintbrushwidth); - } - break; - case "Eracer": - System.Drawing.SolidBrush drawbrush = new System.Drawing.SolidBrush(drawingcolour); - picpreview.CreateGraphics().FillRectangle(drawbrush, 0, 0, picpreview.Width, picpreview.Height); - var eCurrentBrush = new SolidBrush(Color.FromArgb(255, Color.White)); - float ehalfsize = eracerwidth / 2; - float ehalfwidth = picdrawingdisplay.Width / 2; - float ehalfheight = picdrawingdisplay.Height / 2; - if (eracertype == "circle") - { - picpreview.CreateGraphics().FillEllipse(eCurrentBrush, ehalfwidth - 15 - ehalfsize, ehalfheight - ehalfsize, eracerwidth, eracerwidth); - } - else { - picpreview.CreateGraphics().FillRectangle(eCurrentBrush, ehalfwidth - 15 - ehalfsize, ehalfheight - ehalfsize, eracerwidth, eracerwidth); - } - break; - default: - System.Drawing.SolidBrush ddrawbrush = new System.Drawing.SolidBrush(drawingcolour); - picpreview.CreateGraphics().FillRectangle(ddrawbrush, 0, 0, picpreview.Width, picpreview.Height); - ddrawbrush.Dispose(); - break; - } - } - - #endregion - - #region Pencil - - // ERROR: Handles clauses are not supported in C# - private void btnpencil_Click(object sender, EventArgs e) - { - selectedtool = "Pencil"; - gettoolsettings(pnlpencilsettings); - } - - // ERROR: Handles clauses are not supported in C# - private void ChangePencilSize(object sender, EventArgs e) - { - var s = (Control)sender; - switch (s.Name.ToString()) - { - case "btnpencilsize1": - pencilwidth = 1; - break; - case "btnpencilsize2": - pencilwidth = 2; - break; - case "btnpencilsize3": - pencilwidth = 3; - break; - } - setuppreview(); - } - - #endregion - - #region Undo/Redo - - // ERROR: Handles clauses are not supported in C# - private void btnundo_Click(object sender, EventArgs e) - { - try - { - undo.redoStack.Push((Image)canvasbitmap.Clone()); - canvasbitmap = (Bitmap)undo.undoStack.Pop(); - graphicsbitmap = Graphics.FromImage(canvasbitmap); - picdrawingdisplay.Invalidate(); - } - catch - { - API.CreateInfoboxSession("ArtPad - Undo Error!" - ,"There doesn't appear to be any more actions to undo." + Environment.NewLine + Environment.NewLine + "One more step back would undo the creation of the canvas. If this is your goal just click new.", infobox.InfoboxMode.Info); - } - } - - // ERROR: Handles clauses are not supported in C# - private void btnredo_Click(object sender, EventArgs e) - { - try - { - undo.undoStack.Push((Image)canvasbitmap.Clone()); - canvasbitmap = (Bitmap)undo.redoStack.Pop(); - graphicsbitmap = Graphics.FromImage(canvasbitmap); - picdrawingdisplay.Invalidate(); - } - catch - { - API.CreateInfoboxSession("ArtPad - Redo Error!" - , "There doesn't appear to be any more actions to redo." + Environment.NewLine + Environment.NewLine + "If you have drawn on the canvas recently all future history would have been wiped!", infobox.InfoboxMode.Info); - } - } - - #endregion - - #region File Loading - - // ERROR: Handles clauses are not supported in C# - private void btnopen_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".pic", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string res = API.GetFSResult(); - if(res != "fail") - { - savelocation = res; - openpic(); - } - }; - } - - public void openpic() - { - pnlinitialcanvassettings.Hide(); - picdrawingdisplay.Show(); - magnificationlevel = 1; - setmagnification(); - canvasbitmap = (Bitmap)Image.FromFile(savelocation); - canvasheight = canvasbitmap.Height; - canvaswidth = canvasbitmap.Width; - picdrawingdisplay.Size = new Size(canvaswidth, canvasheight); - picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth) / 2, (pnldrawingbackground.Height - canvasheight) / 2); - graphicsbitmap = Graphics.FromImage(canvasbitmap); - picdrawingdisplay.Invalidate(); - } - - #endregion - - #region Flood Fill - - // Flood fill the point. - public void SafeFloodFill(Bitmap bm, int x, int y, Color new_color) - { - // Get the old and new colors. - Color old_color = bm.GetPixel(x, y); - - // The following "If Then" test was added by Reuben - // Jollif - // to protect the code in case the start pixel - // has the same color as the fill color. - if (old_color.ToArgb() != new_color.ToArgb()) - { - // Start with the original point in the stack. - Stack pts = new Stack(1000); - pts.Push(new Point(x, y)); - bm.SetPixel(x, y, new_color); - - // While the stack is not empty, process a point. - while (pts.Count > 0) - { - Point pt = (Point)pts.Pop(); - if (pt.X > 0) - SafeCheckPoint(bm, pts, pt.X - 1, pt.Y, old_color, new_color); - - if (pt.Y > 0) - SafeCheckPoint(bm, pts, pt.X, pt.Y - 1, old_color, new_color); - if (pt.X < bm.Width - 1) - SafeCheckPoint(bm, pts, pt.X + 1, pt.Y, old_color, new_color); - if (pt.Y < bm.Height - 1) - SafeCheckPoint(bm, pts, pt.X, pt.Y + 1, old_color, new_color); - } - } - } - - // See if this point should be added to the stack. - private void SafeCheckPoint(Bitmap bm, Stack pts, int x, int y, Color old_color, Color new_color) - { - Color clr = bm.GetPixel(x, y); - if (clr.Equals(old_color)) - { - pts.Push(new Point(x, y)); - bm.SetPixel(x, y, new_color); - } - } - - // ERROR: Handles clauses are not supported in C# - private void btnfill_Click(object sender, EventArgs e) - { - selectedtool = "Flood Fill"; - gettoolsettings(pnlfloodfillsettings); - } - - #endregion - - #region Shapes - - // ERROR: Handles clauses are not supported in C# - private void btnsquare_Click(object sender, EventArgs e) - { - selectedtool = "Square Tool"; - gettoolsettings(pnlsquaretoolsettings); - txtsquareborderwidth.Text = squarewidth.ToString(); - } - - // ERROR: Handles clauses are not supported in C# - private void txtsquareborderwidth_TextChanged(object sender, EventArgs e) - { - if (txtsquareborderwidth.Text == "") - { - } - else { - squarewidth = (Convert.ToInt32(txtsquareborderwidth.Text)); - setuppreview(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlsquarefillcolour_Click(object sender, EventArgs e) - { - pnlsquarefillcolour.BackColor = drawingcolour; - fillsquarecolor = drawingcolour; - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnsquarefillonoff_Click(object sender, EventArgs e) - { - if (squarefillon == true) - { - btnsquarefillonoff.Text = "Fill OFF"; - btnsquarefillonoff.BackColor = Color.White; - btnsquarefillonoff.ForeColor = Color.Black; - squarefillon = false; - } - else { - btnsquarefillonoff.Text = "Fill ON"; - btnsquarefillonoff.BackColor = Color.Black; - btnsquarefillonoff.ForeColor = Color.White; - squarefillon = true; - } - txtsquareborderwidth.Text = squarewidth.ToString(); - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnoval_Click(object sender, EventArgs e) - { - selectedtool = "Oval Tool"; - gettoolsettings(pnlovaltoolsettings); - txtovalborderwidth.Text = ovalwidth.ToString(); - } - - // ERROR: Handles clauses are not supported in C# - private void txtovalborderwidth_TextChanged(object sender, EventArgs e) - { - if (txtovalborderwidth.Text == "") - { - } - else { - ovalwidth = (Convert.ToInt32(txtovalborderwidth.Text)); - setuppreview(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlovalfillcolour_Click(object sender, EventArgs e) - { - pnlovalfillcolour.BackColor = drawingcolour; - fillovalcolor = drawingcolour; - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnovalfillonoff_Click(object sender, EventArgs e) - { - if (ovalfillon == true) - { - btnovalfillonoff.Text = "Fill OFF"; - btnovalfillonoff.BackColor = Color.White; - btnovalfillonoff.ForeColor = Color.Black; - ovalfillon = false; - } - else { - btnovalfillonoff.Text = "Fill ON"; - btnovalfillonoff.BackColor = Color.Black; - btnovalfillonoff.ForeColor = Color.White; - ovalfillon = true; - } - txtovalborderwidth.Text = ovalwidth.ToString(); - setuppreview(); - } - #endregion - - #region Eraser - - // ERROR: Handles clauses are not supported in C# - private void btneracer_Click(object sender, EventArgs e) - { - selectedtool = "Eracer"; - gettoolsettings(pnleracertoolsettings); - txteracersize.Text = eracerwidth.ToString(); - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void txteracersize_TextChanged(object sender, EventArgs e) - { - if (txteracersize.Text == "") - { - } - else { - eracerwidth = (Convert.ToInt32(txteracersize.Text)); - } - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btneracercircle_Click(object sender, EventArgs e) - { - eracertype = "circle"; - btneracercircle.BackgroundImage = Properties.Resources.ArtPadcirclerubberselected; - btneracersquare.BackgroundImage = Properties.Resources.ArtPadsquarerubber; - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btneracersquare_Click(object sender, EventArgs e) - { - eracertype = "square"; - btneracercircle.BackgroundImage = Properties.Resources.ArtPadcirclerubber; - btneracersquare.BackgroundImage = Properties.Resources.ArtPadsquarerubberselected; - setuppreview(); - } - - #endregion - - #region Line - - // ERROR: Handles clauses are not supported in C# - private void btnlinetool_Click(object sender, EventArgs e) - { - selectedtool = "Line Tool"; - gettoolsettings(pnllinetoolsettings); - txtlinewidth.Text = linewidth.ToString(); - } - - // ERROR: Handles clauses are not supported in C# - private void txtlinewidth_TextChanged(object sender, EventArgs e) - { - if (txtlinewidth.Text == "") - { - } - else { - linewidth = (Convert.ToInt32(txtlinewidth.Text)); - } - setuppreview(); - } - - #endregion - - #region Text - - // ERROR: Handles clauses are not supported in C# - private void btntexttool_Click(object sender, EventArgs e) - { - selectedtool = "Text Tool"; - gettoolsettings(pnltexttoolsettings); - } - - // ERROR: Handles clauses are not supported in C# - private void txtdrawtextsize_TextChanged(object sender, EventArgs e) - { - if (txtdrawtextsize.Text == "") - { - } - else { - drawtextsize = Convert.ToInt32(txtdrawtextsize.Text); - } - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void combodrawtextfont_SelectedIndexChanged(object sender, EventArgs e) - { - drawtextfontname = combodrawtextfont.Text; - txtdrawstringtext.Focus(); - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void combofontstyle_SelectedIndexChanged(object sender, EventArgs e) - { - switch (combofontstyle.Text) - { - case "Bold": - drawtextfontstyle = FontStyle.Bold; - break; - case "Italic": - drawtextfontstyle = FontStyle.Italic; - break; - case "Regular": - drawtextfontstyle = FontStyle.Regular; - break; - case "Strikeout": - drawtextfontstyle = FontStyle.Strikeout; - break; - case "Underline": - drawtextfontstyle = FontStyle.Underline; - break; - } - txtdrawstringtext.Focus(); - setuppreview(); - } - #endregion - - #region Paintbrush - - // ERROR: Handles clauses are not supported in C# - private void txtpaintbrushsize_TextChanged(object sender, EventArgs e) - { - if (txtpaintbrushsize.Text == "") - { - } - else { - paintbrushwidth = (Convert.ToInt32(txtpaintbrushsize.Text)); - } - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnpaintsquareshape_Click(object sender, EventArgs e) - { - paintbrushtype = "square"; - btnpaintcircleshape.BackgroundImage = Properties.Resources.ArtPadcirclerubber; - btnpaintsquareshape.BackgroundImage = Properties.Resources.ArtPadsquarerubberselected; - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnpaintcircleshape_Click(object sender, EventArgs e) - { - paintbrushtype = "circle"; - btnpaintcircleshape.BackgroundImage = Properties.Resources.ArtPadcirclerubberselected; - btnpaintsquareshape.BackgroundImage = Properties.Resources.ArtPadsquarerubber; - setuppreview(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnpaintbrush_Click(object sender, EventArgs e) - { - selectedtool = "Paint Brush"; - gettoolsettings(pnlpaintbrushtoolsettings); - txtpaintbrushsize.Text = paintbrushwidth.ToString(); - setuppreview(); - } - - #endregion - - #region Codepoints - - private void preparecooldown() - { - needtosave = true; - if (codepointscooldown == true) - { - } - else { - codepointsearned = codepointsearned + 1; - codepointscooldown = true; - tmrcodepointcooldown.Start(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void tmrcodepointcooldown_Tick(object sender, EventArgs e) - { - codepointscooldown = false; - tmrcodepointcooldown.Stop(); - } - - // ERROR: Handles clauses are not supported in C# - private void tmrshowearnedcodepoints_Tick(object sender, EventArgs e) - { - tmrshowearnedcodepoints.Stop(); - } - - #endregion - - #region More UI stuff - - public void determinevisiblepallets() - { - int panelstoadd = 2; - - if (API.Upgrades["artpad4colorpallets"] == true) - { - panelstoadd = 4; - } - if (API.Upgrades["artpad8colorpallets"] == true) - { - panelstoadd = 8; - } - if (API.Upgrades["artpad16colorpallets"] == true) - { - panelstoadd = 16; - } - if (API.Upgrades["artpad32colorpallets"] == true) - { - panelstoadd = 32; - } - if (API.Upgrades["artpad64colorpallets"] == true) - { - panelstoadd = 64; - } - if (API.Upgrades["artpad128colorpallets"] == true) - { - panelstoadd = 128; - } - flowcolours.Controls.Clear(); - for(int i = 0; i < panelstoadd; i++) - { - Panel pnl = new Panel(); - pnl.BackColor = Color.Black; - pnl.Size = new Size(12, 8); - flowcolours.Controls.Add(pnl); - pnl.Margin = new Padding(1, 0, 0, 1); - pnl.MouseClick += new MouseEventHandler(this.colourpallet1_MouseClick); - pnl.Show(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void btnchangesizecancel_Click(object sender, EventArgs e) - { - pnlpalletsize.Hide(); - } - - #endregion - - #region More Text Stuff - - // ERROR: Handles clauses are not supported in C# - private void txtdrawstringtext_TextChanged(object sender, EventArgs e) - { - setuppreview(); - } - - #endregion - - private void tmrsetupui_Tick(object sender, EventArgs e) - { - if(API.CurrentSkin != null) - { - pnldrawingbackground.BackColor = API.CurrentSkin.titlebarcolour; - } - } - - private void btnpixelplacer_Click(object sender, EventArgs e) - { - selectedtool = "Pixel Placer"; - gettoolsettings(pnlpixelplacersettings); - } - } -} diff --git a/source/WindowsFormsApplication1/Artpad.resx b/source/WindowsFormsApplication1/Artpad.resx deleted file mode 100644 index 4175077..0000000 --- a/source/WindowsFormsApplication1/Artpad.resx +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 197, 17 - - - 394, 17 - - - 478, 17 - - - 591, 17 - - - 685, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/AudioResourceClient.cs b/source/WindowsFormsApplication1/AudioResourceClient.cs deleted file mode 100644 index 717d43a..0000000 --- a/source/WindowsFormsApplication1/AudioResourceClient.cs +++ /dev/null @@ -1,208 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.IO; -using NAudio; -using NAudio.Wave; -using System.Threading; -using Newtonsoft.Json; -using AxWMPLib; -using System.Windows.Forms; -using WMPLib; - -namespace ShiftOS -{ - public class AudioData - { - public string StartURL { get; set; } - public Dictionary> Files { get; set; } - public Dictionary> Visualizers = null; - } - - public class Audio - { - public static string Name - { - get - { - string res = null; - try - { - if (_wmp != null) - { - if (_wmp.currentMedia != null) - { - res = _wmp.currentMedia.name; - } - - } - } - catch - { - - } - return res; - } - } - - private static AudioData _ad = null; - public static WindowsMediaPlayer _wmp = null; - public static bool running = true; - - public static int CurrentPosition - { - get - { - try - { - if (_wmp != null) - { - return (int)_wmp.controls.currentPosition; - } - else - { - return 0; - } - } - catch - { - return 0; - } - } - } - - public static int CurrentPositionMS - { - get - { - try - { - if (_wmp != null) - { - return (int)(_wmp.controls.currentPosition * 100); - } - else - { - return 0; - } - } - catch - { - return 0; - } - } - } - - - public static void LoadAudioData() - { - var t = new Thread(new ThreadStart(() => - { - _wmp = new WindowsMediaPlayer(); - _wmp.settings.autoStart = true; - _wmp.settings.volume = API.LoadedSettings.MusicVolume; - })); - t.Start(); - _ad = JsonConvert.DeserializeObject(Properties.Resources.MusicData); - } - - public static void Play(string list) - { - _forceStop = false; - var lst = _ad.Files[list]; - var rnd = new Random(); - int i = rnd.Next(0, lst.Count); - _wmp.URL = _ad.StartURL + list + "/" + _ad.Files[list][i] + ".mp3"; - _wmp.PlayStateChange += (o) => - { - if (o == (int)WMPPlayState.wmppsMediaEnded) - { - var t = new System.Windows.Forms.Timer(); - t.Interval = 1000; - t.Tick += (object s, EventArgs a) => - { - t.Stop(); - Stopped?.Invoke(_wmp, new EventArgs()); - }; - t.Start(); - } - }; - - } - - public static event EventHandler Stopped; - - public static bool _forceStop = false; - - public static void Mute() - { - _wmp.settings.volume = 0; - } - - public static void VolumeUp() - { - if(_wmp.settings.volume < 90) - { - _wmp.settings.volume += 10; - } - } - - public static void VolumeDown() - { - if(_wmp.settings.volume > 0) - { - _wmp.settings.volume -= 10; - } - } - - public static void Pause() - { - _wmp.controls.pause(); - } - - public static void Unpause() - { - _wmp.controls.play(); - } - - public static void ForceStop() - { - new Thread(new ThreadStart(() => - { - _forceStop = true; - _wmp.controls.stop(); - })).Start(); - } - - internal static Visualizer GetVisualizer() - { - Visualizer v = null; - foreach(var vis in _ad.Visualizers[Name]) - { - if (vis.startTime <= CurrentPosition && vis.endTime >= CurrentPosition) - v = vis; - } - return v; - } - } - - public class Visualizer - { - public int startTime { get; set; } - public int endTime { get; set; } - public VisualizerType type { get; set; } - public bool R { get; set; } - public bool G { get; set; } - public bool B { get; set; } - } - - public enum VisualizerType - { - Pulse, - BuildUp, - CalmDown - } - -} diff --git a/source/WindowsFormsApplication1/BitnoteConverter.Designer.cs b/source/WindowsFormsApplication1/BitnoteConverter.Designer.cs deleted file mode 100644 index 2ad4885..0000000 --- a/source/WindowsFormsApplication1/BitnoteConverter.Designer.cs +++ /dev/null @@ -1,106 +0,0 @@ -namespace ShiftOS -{ - partial class BitnoteConverter - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.txtcodepoints = new System.Windows.Forms.TextBox(); - this.lbstatus = new System.Windows.Forms.Label(); - this.btnconvert = new System.Windows.Forms.Button(); - this.panel1 = new System.Windows.Forms.Panel(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // txtcodepoints - // - this.txtcodepoints.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.txtcodepoints.Location = new System.Drawing.Point(28, 12); - this.txtcodepoints.Name = "txtcodepoints"; - this.txtcodepoints.Size = new System.Drawing.Size(44, 26); - this.txtcodepoints.TabIndex = 0; - this.txtcodepoints.TextChanged += new System.EventHandler(this.txtcodepoints_TextChanged); - // - // lbstatus - // - this.lbstatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbstatus.AutoSize = true; - this.lbstatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); - this.lbstatus.Location = new System.Drawing.Point(78, 16); - this.lbstatus.Name = "lbstatus"; - this.lbstatus.Size = new System.Drawing.Size(78, 22); - this.lbstatus.TabIndex = 1; - this.lbstatus.Text = "> 0 BTN"; - // - // btnconvert - // - this.btnconvert.Dock = System.Windows.Forms.DockStyle.Bottom; - this.btnconvert.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnconvert.Location = new System.Drawing.Point(0, 76); - this.btnconvert.Name = "btnconvert"; - this.btnconvert.Size = new System.Drawing.Size(229, 23); - this.btnconvert.TabIndex = 2; - this.btnconvert.Text = "Convert"; - this.btnconvert.UseVisualStyleBackColor = true; - this.btnconvert.Click += new System.EventHandler(this.btnconvert_Click); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.White; - this.panel1.Controls.Add(this.btnconvert); - this.panel1.Controls.Add(this.lbstatus); - this.panel1.Controls.Add(this.txtcodepoints); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(229, 99); - this.panel1.TabIndex = 3; - // - // BitnoteConverter - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(229, 99); - this.Controls.Add(this.panel1); - this.Name = "BitnoteConverter"; - this.Text = "BitnoteConverter"; - this.Load += new System.EventHandler(this.BitnoteConverter_Load); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TextBox txtcodepoints; - private System.Windows.Forms.Label lbstatus; - private System.Windows.Forms.Button btnconvert; - private System.Windows.Forms.Panel panel1; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/BitnoteConverter.cs b/source/WindowsFormsApplication1/BitnoteConverter.cs deleted file mode 100644 index d28b970..0000000 --- a/source/WindowsFormsApplication1/BitnoteConverter.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class BitnoteConverter : Form - { - /// - /// GUI for the Bitnote Converter package. - /// - public BitnoteConverter() - { - InitializeComponent(); - } - - private decimal BitnotesToAdd = 0; - - private void txtcodepoints_TextChanged(object sender, EventArgs e) - { - try - { - int cp = Convert.ToInt16(txtcodepoints.Text); - if(cp > API.CurrentSave.codepoints) - { - txtcodepoints.Text = API.CurrentSave.codepoints.ToString(); - } - string decstr = ((decimal)cp / 24).ToString("#.#####"); - - - lbstatus.Text = "> " + decstr + " BTN"; - BitnotesToAdd = Convert.ToDecimal(decstr); - } - catch - { - BitnotesToAdd = 0; - } - } - - private void btnconvert_Click(object sender, EventArgs e) - { - if(BitnotesToAdd > 0) - { - API.RemoveCodepoints((int)(BitnotesToAdd * 24)); - API.BitnoteAddress.Bitnotes += BitnotesToAdd; - API.CreateInfoboxSession("Bitnote Converter", "Your codepoints have been converted to Bitnotes successfully.", infobox.InfoboxMode.Info); - } - else - { - API.CreateInfoboxSession("Bitnote Converter", "An invalid ammount of Codepoints was entered. We couldn't convert them.", infobox.InfoboxMode.Info); - } - } - - private void BitnoteConverter_Load(object sender, EventArgs e) - { - - } - } -} diff --git a/source/WindowsFormsApplication1/BitnoteConverter.resx b/source/WindowsFormsApplication1/BitnoteConverter.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/BitnoteConverter.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/BitnoteDigger.Designer.cs b/source/WindowsFormsApplication1/BitnoteDigger.Designer.cs deleted file mode 100644 index b1fa081..0000000 --- a/source/WindowsFormsApplication1/BitnoteDigger.Designer.cs +++ /dev/null @@ -1,337 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class BitnoteDigger - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.Label10 = new System.Windows.Forms.Label(); - this.btnsend = new System.Windows.Forms.Button(); - this.txtsendaddress = new System.Windows.Forms.TextBox(); - this.Label7 = new System.Windows.Forms.Label(); - this.lbltotalbitcoinsmined = new System.Windows.Forms.Label(); - this.Panel1 = new System.Windows.Forms.Panel(); - this.Label6 = new System.Windows.Forms.Label(); - this.Label8 = new System.Windows.Forms.Label(); - this.turbomodespeed = new System.Windows.Forms.Label(); - this.Label5 = new System.Windows.Forms.Label(); - this.lbldiggerstatsspeed = new System.Windows.Forms.Label(); - this.lbldiggerstatsgrade = new System.Windows.Forms.Label(); - this.lbldiggerstatsname = new System.Windows.Forms.Label(); - this.btnturbomode = new System.Windows.Forms.Button(); - this.btnstop = new System.Windows.Forms.Button(); - this.btnstart = new System.Windows.Forms.Button(); - this.PictureBox1 = new System.Windows.Forms.PictureBox(); - this.Label1 = new System.Windows.Forms.Label(); - this.tmrcalcbitnotesmined = new System.Windows.Forms.Timer(this.components); - this.tmrturbomode = new System.Windows.Forms.Timer(this.components); - this.btnupgrade = new System.Windows.Forms.Button(); - this.pgcontents.SuspendLayout(); - this.Panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.Label10); - this.pgcontents.Controls.Add(this.btnsend); - this.pgcontents.Controls.Add(this.txtsendaddress); - this.pgcontents.Controls.Add(this.Label7); - this.pgcontents.Controls.Add(this.lbltotalbitcoinsmined); - this.pgcontents.Controls.Add(this.Panel1); - this.pgcontents.Controls.Add(this.Label1); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(560, 297); - this.pgcontents.TabIndex = 20; - // - // Label10 - // - this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label10.Location = new System.Drawing.Point(205, 182); - this.Label10.Name = "Label10"; - this.Label10.Size = new System.Drawing.Size(261, 35); - this.Label10.TabIndex = 6; - this.Label10.Text = "Insert your Bitnote wallet address above then click send to transfer your earning" + - "s"; - this.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnsend - // - this.btnsend.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btnsend.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsend.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnsend.Location = new System.Drawing.Point(472, 181); - this.btnsend.Name = "btnsend"; - this.btnsend.Size = new System.Drawing.Size(73, 36); - this.btnsend.TabIndex = 5; - this.btnsend.Text = "Send"; - this.btnsend.UseVisualStyleBackColor = true; - this.btnsend.Click += new System.EventHandler(this.btnsend_Click); - // - // txtsendaddress - // - this.txtsendaddress.BackColor = System.Drawing.Color.White; - this.txtsendaddress.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtsendaddress.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtsendaddress.Location = new System.Drawing.Point(205, 155); - this.txtsendaddress.Multiline = true; - this.txtsendaddress.Name = "txtsendaddress"; - this.txtsendaddress.Size = new System.Drawing.Size(340, 21); - this.txtsendaddress.TabIndex = 4; - this.txtsendaddress.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // Label7 - // - this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label7.Location = new System.Drawing.Point(203, 128); - this.Label7.Name = "Label7"; - this.Label7.Size = new System.Drawing.Size(350, 27); - this.Label7.TabIndex = 3; - this.Label7.Text = "Send Bitnotes To:"; - this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lbltotalbitcoinsmined - // - this.lbltotalbitcoinsmined.Font = new System.Drawing.Font("Microsoft Sans Serif", 32.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbltotalbitcoinsmined.Location = new System.Drawing.Point(206, 57); - this.lbltotalbitcoinsmined.Name = "lbltotalbitcoinsmined"; - this.lbltotalbitcoinsmined.Size = new System.Drawing.Size(344, 51); - this.lbltotalbitcoinsmined.TabIndex = 2; - this.lbltotalbitcoinsmined.Text = "0.00000"; - this.lbltotalbitcoinsmined.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Panel1 - // - this.Panel1.Controls.Add(this.btnupgrade); - this.Panel1.Controls.Add(this.Label6); - this.Panel1.Controls.Add(this.Label8); - this.Panel1.Controls.Add(this.turbomodespeed); - this.Panel1.Controls.Add(this.Label5); - this.Panel1.Controls.Add(this.lbldiggerstatsspeed); - this.Panel1.Controls.Add(this.lbldiggerstatsgrade); - this.Panel1.Controls.Add(this.lbldiggerstatsname); - this.Panel1.Controls.Add(this.btnturbomode); - this.Panel1.Controls.Add(this.btnstop); - this.Panel1.Controls.Add(this.btnstart); - this.Panel1.Controls.Add(this.PictureBox1); - this.Panel1.Dock = System.Windows.Forms.DockStyle.Left; - this.Panel1.Location = new System.Drawing.Point(0, 0); - this.Panel1.Name = "Panel1"; - this.Panel1.Size = new System.Drawing.Size(199, 297); - this.Panel1.TabIndex = 1; - // - // Label6 - // - this.Label6.AutoSize = true; - this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label6.Location = new System.Drawing.Point(2, 88); - this.Label6.Name = "Label6"; - this.Label6.Size = new System.Drawing.Size(157, 20); - this.Label6.TabIndex = 13; - this.Label6.Text = "Turbo Mode Stats:"; - // - // Label8 - // - this.Label8.AutoSize = true; - this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label8.Location = new System.Drawing.Point(3, 126); - this.Label8.Name = "Label8"; - this.Label8.Size = new System.Drawing.Size(162, 16); - this.Label8.TabIndex = 11; - this.Label8.Text = "Codepoint Cost: 1CP / 10s"; - // - // turbomodespeed - // - this.turbomodespeed.AutoSize = true; - this.turbomodespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.turbomodespeed.Location = new System.Drawing.Point(3, 109); - this.turbomodespeed.Name = "turbomodespeed"; - this.turbomodespeed.Size = new System.Drawing.Size(183, 16); - this.turbomodespeed.TabIndex = 10; - this.turbomodespeed.Text = "Turbo Speed: 0.00002 BTN/S"; - // - // Label5 - // - this.Label5.AutoSize = true; - this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label5.Location = new System.Drawing.Point(5, 5); - this.Label5.Name = "Label5"; - this.Label5.Size = new System.Drawing.Size(115, 20); - this.Label5.TabIndex = 9; - this.Label5.Text = "Digger Stats:"; - // - // lbldiggerstatsspeed - // - this.lbldiggerstatsspeed.AutoSize = true; - this.lbldiggerstatsspeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbldiggerstatsspeed.Location = new System.Drawing.Point(6, 60); - this.lbldiggerstatsspeed.Name = "lbldiggerstatsspeed"; - this.lbldiggerstatsspeed.Size = new System.Drawing.Size(144, 16); - this.lbldiggerstatsspeed.TabIndex = 8; - this.lbldiggerstatsspeed.Text = "Speed: 0.00001 BTN/S"; - // - // lbldiggerstatsgrade - // - this.lbldiggerstatsgrade.AutoSize = true; - this.lbldiggerstatsgrade.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbldiggerstatsgrade.Location = new System.Drawing.Point(6, 43); - this.lbldiggerstatsgrade.Name = "lbldiggerstatsgrade"; - this.lbldiggerstatsgrade.Size = new System.Drawing.Size(103, 16); - this.lbldiggerstatsgrade.TabIndex = 7; - this.lbldiggerstatsgrade.Text = "Digger Grade: 1"; - // - // lbldiggerstatsname - // - this.lbldiggerstatsname.AutoSize = true; - this.lbldiggerstatsname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbldiggerstatsname.Location = new System.Drawing.Point(6, 26); - this.lbldiggerstatsname.Name = "lbldiggerstatsname"; - this.lbldiggerstatsname.Size = new System.Drawing.Size(157, 16); - this.lbldiggerstatsname.TabIndex = 6; - this.lbldiggerstatsname.Text = "Name: Surface Scratcher"; - // - // btnturbomode - // - this.btnturbomode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnturbomode.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnturbomode.Location = new System.Drawing.Point(6, 188); - this.btnturbomode.Name = "btnturbomode"; - this.btnturbomode.Size = new System.Drawing.Size(186, 29); - this.btnturbomode.TabIndex = 5; - this.btnturbomode.Text = "Activate Turbo Mode"; - this.btnturbomode.UseVisualStyleBackColor = true; - this.btnturbomode.Click += new System.EventHandler(this.btnturbomode_Click); - // - // btnstop - // - this.btnstop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnstop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnstop.Location = new System.Drawing.Point(101, 156); - this.btnstop.Name = "btnstop"; - this.btnstop.Size = new System.Drawing.Size(91, 29); - this.btnstop.TabIndex = 4; - this.btnstop.Text = "Stop"; - this.btnstop.UseVisualStyleBackColor = true; - this.btnstop.Click += new System.EventHandler(this.btnstop_Click); - // - // btnstart - // - this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnstart.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnstart.Location = new System.Drawing.Point(6, 156); - this.btnstart.Name = "btnstart"; - this.btnstart.Size = new System.Drawing.Size(91, 29); - this.btnstart.TabIndex = 3; - this.btnstart.Text = "Start"; - this.btnstart.UseVisualStyleBackColor = true; - this.btnstart.Click += new System.EventHandler(this.btnstart_Click); - // - // PictureBox1 - // - this.PictureBox1.BackColor = System.Drawing.Color.Black; - this.PictureBox1.Dock = System.Windows.Forms.DockStyle.Right; - this.PictureBox1.Location = new System.Drawing.Point(198, 0); - this.PictureBox1.Name = "PictureBox1"; - this.PictureBox1.Size = new System.Drawing.Size(1, 297); - this.PictureBox1.TabIndex = 2; - this.PictureBox1.TabStop = false; - // - // Label1 - // - this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.Location = new System.Drawing.Point(205, 16); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(345, 43); - this.Label1.TabIndex = 0; - this.Label1.Text = "Bitnotes Found"; - this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // tmrcalcbitnotesmined - // - this.tmrcalcbitnotesmined.Interval = 1000; - this.tmrcalcbitnotesmined.Tick += new System.EventHandler(this.tmrcalcbitnotesmined_Tick); - // - // tmrturbomode - // - this.tmrturbomode.Interval = 10000; - this.tmrturbomode.Tick += new System.EventHandler(this.tmrturbomode_Tick); - // - // btnupgrade - // - this.btnupgrade.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnupgrade.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnupgrade.Location = new System.Drawing.Point(6, 223); - this.btnupgrade.Name = "btnupgrade"; - this.btnupgrade.Size = new System.Drawing.Size(186, 29); - this.btnupgrade.TabIndex = 14; - this.btnupgrade.Text = "Upgrade My Digger"; - this.btnupgrade.UseVisualStyleBackColor = true; - this.btnupgrade.Click += new System.EventHandler(this.btnupgrade_Click); - // - // BitnoteDigger - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(560, 297); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "BitnoteDigger"; - this.Text = "Bitnote_Digger"; - this.TopMost = true; - this.Load += new System.EventHandler(this.BitnoteDigger_Load); - this.pgcontents.ResumeLayout(false); - this.pgcontents.PerformLayout(); - this.Panel1.ResumeLayout(false); - this.Panel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Panel Panel1; - internal System.Windows.Forms.PictureBox PictureBox1; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.Label lbltotalbitcoinsmined; - internal System.Windows.Forms.Button btnturbomode; - internal System.Windows.Forms.Button btnstop; - internal System.Windows.Forms.Button btnstart; - internal System.Windows.Forms.Label Label6; - internal System.Windows.Forms.Label Label8; - internal System.Windows.Forms.Label turbomodespeed; - internal System.Windows.Forms.Label Label5; - internal System.Windows.Forms.Label lbldiggerstatsspeed; - internal System.Windows.Forms.Label lbldiggerstatsgrade; - internal System.Windows.Forms.Label lbldiggerstatsname; - internal System.Windows.Forms.Label Label10; - internal System.Windows.Forms.Button btnsend; - internal System.Windows.Forms.TextBox txtsendaddress; - internal System.Windows.Forms.Label Label7; - internal System.Windows.Forms.Timer tmrcalcbitnotesmined; - internal System.Windows.Forms.Timer tmrturbomode; - internal System.Windows.Forms.Button btnupgrade; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/BitnoteDigger.cs b/source/WindowsFormsApplication1/BitnoteDigger.cs deleted file mode 100644 index df0b124..0000000 --- a/source/WindowsFormsApplication1/BitnoteDigger.cs +++ /dev/null @@ -1,234 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.IO; -using Newtonsoft.Json; - -namespace ShiftOS -{ - public partial class BitnoteDigger : Form - { - /// - /// GUI for the Bitnote Digger fake Appscape Package. - /// - public BitnoteDigger() - { - InitializeComponent(); - } - - private void BitnoteDigger_Load(object sender, EventArgs e) - { - getdiggergrade(); - updatestats(); - } - - /// - /// Model for a digger grade. - /// - public class diggergrade - { - public string Name { get; set; } - public int Level { get; set; } - } - - /// - /// Retrieves the proper digger grade. - /// - public void getdiggergrade() - { - if(!File.Exists(Paths.Drivers + "BNDigger.dri")) - { - var d = new diggergrade(); - d.Level = 1; - d.Name = "Surface Scratcher"; - bitnotediggergrade = d; - File.WriteAllText(Paths.Drivers + "BNDigger.dri", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(d))); - } - else - { - string enc = File.ReadAllText(Paths.Drivers + "BNDigger.dri"); - bitnotediggergrade = JsonConvert.DeserializeObject(API.BitnoteEncryption.Decrypt(enc)); - } - } - - /// - /// Saves the digger grade to the save game. - /// - public void SaveDigger() - { - var d = bitnotediggergrade; - File.WriteAllText(Paths.Drivers + "BNDigger.dri", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(d))); - } - - public decimal bitnotesmined = 0; - public diggergrade bitnotediggergrade = null; - public double miningspeed = 0.00005; - - /// - /// Sets up digger statistics. - /// - public void updatestats() - { - lbldiggerstatsgrade.Text = "Digger Grade: " + bitnotediggergrade.Name; - switch (bitnotediggergrade.Level) - { - case 1: - lbldiggerstatsname.Text = "Surface Scratcher"; - lbldiggerstatsspeed.Text = "Speed: 0.00001"; - miningspeed = 0.00001; - break; - case 2: - lbldiggerstatsname.Text = "Name: Sediment Mover"; - lbldiggerstatsspeed.Text = "Speed: 0.00002"; - miningspeed = 0.00002; - break; - case 3: - lbldiggerstatsname.Text = "Name: Rock Crusher"; - lbldiggerstatsspeed.Text = "0.00004"; - miningspeed = 0.00004; - break; - case 4: - lbldiggerstatsname.Text = "Name: Massive Drill"; - lbldiggerstatsspeed.Text = "Speed: 0.00008"; - miningspeed = 0.00008; - break; - case 5: - lbldiggerstatsname.Text = "Name: Kola"; - lbldiggerstatsspeed.Text = "Speed: 0.00016"; - miningspeed = 0.00016; - break; - } - turbomodespeed.Text = (miningspeed * 2).ToString(); - } - - /// - /// Updates the digger. - /// - /// New grade. - /// Price (BTN) to subtract. - /// New name. - public void updategrade(int grade, decimal price, string name) - { - if (API.BitnoteAddress.Bitnotes >= price) - { - if (bitnotediggergrade.Level < grade) - { - bitnotediggergrade.Level = grade; - bitnotediggergrade.Name = name; - API.BitnoteAddress.Bitnotes -= price; - API.CreateInfoboxSession("Upgraded to " + name, - "Your digger has been successfully upgraded to grade " + grade + ". The '" + name + "'", - infobox.InfoboxMode.Info); - SaveDigger(); - updatestats(); - } - else { - API.CreateInfoboxSession("Aready Upgraded", - "The Bitnote Digger is already upgraded to grade " + bitnotediggergrade.Level.ToString() + ". There is no point in downgrading to grade " + grade, - infobox.InfoboxMode.Info); - } - } - else { - API.CreateInfoboxSession("Insufficient Funds", - "You do not have enough Bitnotes to complete this purchase", - infobox.InfoboxMode.Info); - } - } - - // ERROR: Handles clauses are not supported in C# - private void tmrcalcbitnotesmined_Tick(object sender, EventArgs e) - { - bitnotesmined += Convert.ToDecimal(miningspeed); - lbltotalbitcoinsmined.Text = (Math.Round(bitnotesmined, 5)).ToString("#.#####"); - } - - // ERROR: Handles clauses are not supported in C# - private void btnstart_Click(object sender, EventArgs e) - { - tmrcalcbitnotesmined.Start(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnstop_Click(object sender, EventArgs e) - { - tmrcalcbitnotesmined.Stop(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnsend_Click(object sender, EventArgs e) - { - if (txtsendaddress.Text == API.BitnoteAddress.Address) - { - API.BitnoteAddress.Bitnotes += bitnotesmined; - } - bitnotesmined = 0; - lbltotalbitcoinsmined.Text = (Math.Round(bitnotesmined, 5)).ToString("#.#####"); - } - - // ERROR: Handles clauses are not supported in C# - private void btnturbomode_Click(object sender, EventArgs e) - { - if (tmrturbomode.Enabled == false) - { - miningspeed = (miningspeed * 2); - tmrturbomode.Start(); - btnturbomode.Text = "Disable Turbo Mode"; - } - else { - miningspeed = (miningspeed / 2); - tmrturbomode.Stop(); - btnturbomode.Text = "Activate Turbo Mode"; - } - } - - // ERROR: Handles clauses are not supported in C# - private void tmrturbomode_Tick(object sender, EventArgs e) - { - if (API.Codepoints >= 1) - { - API.RemoveCodepoints(1); - } - else { - miningspeed = (miningspeed / 2); - tmrturbomode.Stop(); - btnturbomode.Text = "Activate Turbo Mode"; - API.CreateInfoboxSession("Turbo Mode disabled", - "Turbo Mode has been disabled due to your lack of Code Points.", - infobox.InfoboxMode.Info); - } - } - - private void btnupgrade_Click(object sender, EventArgs e) - { - string newname = "Surface Scratcher"; - double price = 1; - switch (bitnotediggergrade.Name) { - case "Surface Scratcher": - newname = "Name: Sediment Mover"; - price = 1.5; - break; - case "Sediment Mover": - newname = "Name: Rock Crusher"; - price = 2; - break; - case "Rock Crusher": - newname = "Name: Massive Drill"; - price = 4; - break; - case "Massive Drill": - newname = "Name: Kola"; - price = 8; - break; - - } - updategrade(bitnotediggergrade.Level + 1, (decimal)price, newname); - - } - } -} diff --git a/source/WindowsFormsApplication1/BitnoteDigger.resx b/source/WindowsFormsApplication1/BitnoteDigger.resx deleted file mode 100644 index 7beae4d..0000000 --- a/source/WindowsFormsApplication1/BitnoteDigger.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 187, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/BitnoteWallet.Designer.cs b/source/WindowsFormsApplication1/BitnoteWallet.Designer.cs deleted file mode 100644 index df0b7d8..0000000 --- a/source/WindowsFormsApplication1/BitnoteWallet.Designer.cs +++ /dev/null @@ -1,243 +0,0 @@ -namespace ShiftOS -{ - partial class BitnoteWallet - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.fltopbar = new System.Windows.Forms.FlowLayoutPanel(); - this.btnsend = new System.Windows.Forms.Button(); - this.btnsync = new System.Windows.Forms.Button(); - this.sendpanel = new System.Windows.Forms.Panel(); - this.txtamount = new System.Windows.Forms.TextBox(); - this.txtrecipient = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.btnconfirmsend = new System.Windows.Forms.PictureBox(); - this.panel1 = new System.Windows.Forms.Panel(); - this.lbmybitnotes = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.txtmyaddress = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.tmrrefresh = new System.Windows.Forms.Timer(this.components); - this.fltopbar.SuspendLayout(); - this.sendpanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.btnconfirmsend)).BeginInit(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // fltopbar - // - this.fltopbar.BackColor = System.Drawing.Color.Gray; - this.fltopbar.Controls.Add(this.btnsend); - this.fltopbar.Controls.Add(this.btnsync); - this.fltopbar.Dock = System.Windows.Forms.DockStyle.Top; - this.fltopbar.ForeColor = System.Drawing.Color.White; - this.fltopbar.Location = new System.Drawing.Point(0, 0); - this.fltopbar.Name = "fltopbar"; - this.fltopbar.Size = new System.Drawing.Size(551, 30); - this.fltopbar.TabIndex = 0; - // - // btnsend - // - this.btnsend.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.btnsend.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsend.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnsend.Location = new System.Drawing.Point(3, 3); - this.btnsend.Name = "btnsend"; - this.btnsend.Size = new System.Drawing.Size(75, 23); - this.btnsend.TabIndex = 0; - this.btnsend.Text = "Send"; - this.btnsend.UseVisualStyleBackColor = true; - this.btnsend.Click += new System.EventHandler(this.btnsend_Click); - // - // btnsync - // - this.btnsync.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsync.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnsync.Location = new System.Drawing.Point(84, 3); - this.btnsync.Name = "btnsync"; - this.btnsync.Size = new System.Drawing.Size(113, 23); - this.btnsync.TabIndex = 1; - this.btnsync.Text = "Sync My Bitnotes"; - this.btnsync.UseVisualStyleBackColor = true; - this.btnsync.Click += new System.EventHandler(this.btnsync_Click); - // - // sendpanel - // - this.sendpanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.sendpanel.Controls.Add(this.txtamount); - this.sendpanel.Controls.Add(this.txtrecipient); - this.sendpanel.Controls.Add(this.label2); - this.sendpanel.Controls.Add(this.label1); - this.sendpanel.Controls.Add(this.btnconfirmsend); - this.sendpanel.Location = new System.Drawing.Point(306, 143); - this.sendpanel.Name = "sendpanel"; - this.sendpanel.Size = new System.Drawing.Size(233, 105); - this.sendpanel.TabIndex = 1; - this.sendpanel.Visible = false; - // - // txtamount - // - this.txtamount.Location = new System.Drawing.Point(82, 34); - this.txtamount.Name = "txtamount"; - this.txtamount.Size = new System.Drawing.Size(148, 20); - this.txtamount.TabIndex = 4; - // - // txtrecipient - // - this.txtrecipient.Location = new System.Drawing.Point(82, 4); - this.txtrecipient.Name = "txtrecipient"; - this.txtrecipient.Size = new System.Drawing.Size(148, 20); - this.txtrecipient.TabIndex = 3; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.label2.Location = new System.Drawing.Point(4, 34); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(60, 17); - this.label2.TabIndex = 2; - this.label2.Text = "Amount:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.label1.Location = new System.Drawing.Point(4, 4); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(71, 17); - this.label1.TabIndex = 1; - this.label1.Text = "Recipient:"; - // - // btnconfirmsend - // - this.btnconfirmsend.Image = global::ShiftOS.Properties.Resources.Send; - this.btnconfirmsend.Location = new System.Drawing.Point(129, 75); - this.btnconfirmsend.Name = "btnconfirmsend"; - this.btnconfirmsend.Size = new System.Drawing.Size(101, 27); - this.btnconfirmsend.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.btnconfirmsend.TabIndex = 0; - this.btnconfirmsend.TabStop = false; - this.btnconfirmsend.Click += new System.EventHandler(this.btnconfirmsend_Click); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.White; - this.panel1.Controls.Add(this.lbmybitnotes); - this.panel1.Controls.Add(this.label4); - this.panel1.Controls.Add(this.txtmyaddress); - this.panel1.Controls.Add(this.label3); - this.panel1.Controls.Add(this.fltopbar); - this.panel1.Controls.Add(this.sendpanel); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(551, 260); - this.panel1.TabIndex = 2; - // - // lbmybitnotes - // - this.lbmybitnotes.AutoSize = true; - this.lbmybitnotes.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); - this.lbmybitnotes.Location = new System.Drawing.Point(7, 203); - this.lbmybitnotes.Name = "lbmybitnotes"; - this.lbmybitnotes.Size = new System.Drawing.Size(91, 31); - this.lbmybitnotes.TabIndex = 6; - this.lbmybitnotes.Text = "0 BTN"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.label4.Location = new System.Drawing.Point(7, 177); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(50, 17); - this.label4.TabIndex = 5; - this.label4.Text = "I have:"; - // - // txtmyaddress - // - this.txtmyaddress.Location = new System.Drawing.Point(10, 136); - this.txtmyaddress.Name = "txtmyaddress"; - this.txtmyaddress.Size = new System.Drawing.Size(290, 20); - this.txtmyaddress.TabIndex = 4; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.label3.Location = new System.Drawing.Point(7, 116); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(86, 17); - this.label3.TabIndex = 2; - this.label3.Text = "My Address:"; - // - // tmrrefresh - // - this.tmrrefresh.Enabled = true; - this.tmrrefresh.Tick += new System.EventHandler(this.tmrrefresh_Tick); - // - // BitnoteWallet - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(551, 260); - this.Controls.Add(this.panel1); - this.Name = "BitnoteWallet"; - this.Text = "BitnoteWallet"; - this.Load += new System.EventHandler(this.BitnoteWallet_Load); - this.fltopbar.ResumeLayout(false); - this.sendpanel.ResumeLayout(false); - this.sendpanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.btnconfirmsend)).EndInit(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.FlowLayoutPanel fltopbar; - private System.Windows.Forms.Button btnsend; - private System.Windows.Forms.Button btnsync; - private System.Windows.Forms.Panel sendpanel; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.PictureBox btnconfirmsend; - private System.Windows.Forms.TextBox txtamount; - private System.Windows.Forms.TextBox txtrecipient; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label lbmybitnotes; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.TextBox txtmyaddress; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Timer tmrrefresh; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/BitnoteWallet.cs b/source/WindowsFormsApplication1/BitnoteWallet.cs deleted file mode 100644 index 6d5cb9f..0000000 --- a/source/WindowsFormsApplication1/BitnoteWallet.cs +++ /dev/null @@ -1,247 +0,0 @@ -using NetSockets; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class BitnoteWallet : Form - { - /// - /// GUI for the Bitnote Wallet package. - /// - public BitnoteWallet() - { - InitializeComponent(); - Clients = new List(); - foreach(var c in Package_Grabber.clients) - { - if(c.Value.IsConnected) - { - var client = new BitnoteClient(c.Key); - client.GetBank(); - Clients.Add(client); - } - } - } - - public List Clients = null; - - public bool AddBitnotesToAddress(string addr, decimal amount) - { - bool res = false; - foreach(var c in Clients) - { - if(c.Addresses != null) - { - foreach(var a in c.Addresses) - { - if(a.Address == addr) - { - if (res == false) - { - a.Bitnotes += amount; - res = true; - } - } - } - c.UploadBank(c.Addresses); - } - } - return res; - } - - private void btnsync_Click(object sender, EventArgs e) - { - try - { - var t = new BackgroundWorker(); - t.DoWork += (object s, DoWorkEventArgs a) => - { - - foreach(var c in Clients) - { - SyncBitnotes(c.Addresses); - c.UploadBank(c.Addresses); - } - }; - t.RunWorkerAsync(); - } - catch - { - SyncBitnotes(new List()); - API.CreateInfoboxSession("Error", "You cannot sync your Bitnotes as the connection to the server has failed.", infobox.InfoboxMode.Info); - } - } - - /// - /// Syncs your private address with the provided list IF yours exists in there. If not, it'll add it. - /// - /// The list to sync. - public void SyncBitnotes(List lst) - { - bool cont = false; - int my_itm = 0; - foreach (var itm in lst) - { - if(itm.Address == API.BitnoteAddress.Address) - { - cont = true; - my_itm = lst.IndexOf(itm); - } - } - if(cont == true) - { - if(lst[my_itm].Bitnotes < API.BitnoteAddress.Bitnotes) - { - lst[my_itm].Bitnotes = API.BitnoteAddress.Bitnotes; - } - else - { - API.BitnoteAddress.Bitnotes = lst[my_itm].Bitnotes; - } - } - else - { - lst.Add(API.BitnoteAddress); - } - } - - public void UploadList(BitnoteClient client, List lst) - { - client.UploadBank(lst); - } - - - private void btnsend_Click(object sender, EventArgs e) - { - sendpanel.Show(); - } - - public void Info(string message) => API.CreateInfoboxSession("Error", message, infobox.InfoboxMode.Info); - - private void btnconfirmsend_Click(object sender, EventArgs e) - { - if (txtrecipient.Text != "") - { - if (AddBitnotesToAddress(txtrecipient.Text, Convert.ToDecimal(Convert.ToDecimal(txtamount.Text).ToString("#.#####")))) - { - Info("The Bitnotes have been sent successfully."); - } - else - { - Info("That address doesn't exist in the database."); - } - } - else - { - Info("You must enter a recipient Bitnote address!"); - } - sendpanel.Hide(); - } - - private void tmrrefresh_Tick(object sender, EventArgs e) - { - if(API.BitnoteAddress == null) - { - SaveSystem.Utilities.BitnoteAddress = new SaveSystem.PrivateBitnoteAddress(); - SaveSystem.Utilities.BitnoteAddress.Bitnotes = 0; - SaveSystem.Utilities.BitnoteAddress.Address = SaveSystem.Utilities.GenerateNewBitnoteAddress(); - } - txtmyaddress.Text = API.BitnoteAddress.Address; - if(API.BitnoteAddress.Bitnotes == 0) - { - lbmybitnotes.Text = "0 BTN"; - } - else - { - lbmybitnotes.Text = API.BitnoteAddress.Bitnotes.ToString("#.#####") + " BTN"; - } - } - - private void BitnoteWallet_Load(object sender, EventArgs e) - { - fltopbar.BackColor = API.CurrentSkin.titlebarcolour; - fltopbar.ForeColor = API.CurrentSkin.titletextcolour; - } - } - - public class BitnoteClient - { - /// - /// Creates a new Bitnote Client. - /// - /// IP address of the server to look at. - public BitnoteClient(string IP) - { - try - { - var c = Package_Grabber.clients[IP]; - c.OnReceived += (object s, NetReceivedEventArgs a) => - { - var obj = (ObjectModel)a.Data.Object; - switch (obj.Command) - { - case "fail": - Addresses = new List(); - break; - case "bitnote_bank": - try - { - Addresses = JsonConvert.DeserializeObject>(API.BitnoteEncryption.Decrypt((string)obj.OptionalObject)); - if(Addresses == null) - { - Addresses = new List(); - } - } - catch { - Addresses = new List(); - } - break; - } - }; - _IP = IP; - } - catch - { - throw new ArgumentException("IP address not found in client list."); - } - } - - private string _IP = ""; - public List Addresses = null; - - public void GetBank() - { - try - { - Package_Grabber.SendMessage(_IP, "btn getbank"); - } - catch - { - - } - } - - public void UploadBank(List bank) - { - try - { - Package_Grabber.SendMessage(_IP, "btn setbank", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(bank))); - } - catch - { - - } - } - } -} diff --git a/source/WindowsFormsApplication1/BitnoteWallet.resx b/source/WindowsFormsApplication1/BitnoteWallet.resx deleted file mode 100644 index 09c4313..0000000 --- a/source/WindowsFormsApplication1/BitnoteWallet.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Color_Picker.Designer.cs b/source/WindowsFormsApplication1/Color_Picker.Designer.cs deleted file mode 100644 index bc68a96..0000000 --- a/source/WindowsFormsApplication1/Color_Picker.Designer.cs +++ /dev/null @@ -1,3573 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class Color_Picker - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.pgcontents = new System.Windows.Forms.Panel(); - this.pnlpinkcolours = new System.Windows.Forms.Panel(); - this.pnlpinkoptions = new System.Windows.Forms.Panel(); - this.Label35 = new System.Windows.Forms.Label(); - this.txtpinksgreen = new System.Windows.Forms.TextBox(); - this.txtpinksred = new System.Windows.Forms.TextBox(); - this.Label36 = new System.Windows.Forms.Label(); - this.Label37 = new System.Windows.Forms.Label(); - this.txtpinksblue = new System.Windows.Forms.TextBox(); - this.pnlpinkcustomcolour = new System.Windows.Forms.Panel(); - this.pnlpink16 = new System.Windows.Forms.Panel(); - this.pnlpink12 = new System.Windows.Forms.Panel(); - this.pnlpink14 = new System.Windows.Forms.Panel(); - this.pnlpink10 = new System.Windows.Forms.Panel(); - this.pnlpink8 = new System.Windows.Forms.Panel(); - this.pnlpink4 = new System.Windows.Forms.Panel(); - this.pnlpink6 = new System.Windows.Forms.Panel(); - this.pnlpink15 = new System.Windows.Forms.Panel(); - this.pnlpink2 = new System.Windows.Forms.Panel(); - this.pnlpink13 = new System.Windows.Forms.Panel(); - this.pnlpink11 = new System.Windows.Forms.Panel(); - this.pnlpink7 = new System.Windows.Forms.Panel(); - this.pnlpink9 = new System.Windows.Forms.Panel(); - this.pnlpink5 = new System.Windows.Forms.Panel(); - this.pnlpink3 = new System.Windows.Forms.Panel(); - this.pnlpink1 = new System.Windows.Forms.Panel(); - this.lblpinklevel = new System.Windows.Forms.Label(); - this.Label23 = new System.Windows.Forms.Label(); - this.pnlredcolours = new System.Windows.Forms.Panel(); - this.pnlredoptions = new System.Windows.Forms.Panel(); - this.Label32 = new System.Windows.Forms.Label(); - this.txtredsblue = new System.Windows.Forms.TextBox(); - this.txtredsred = new System.Windows.Forms.TextBox(); - this.Label33 = new System.Windows.Forms.Label(); - this.Label34 = new System.Windows.Forms.Label(); - this.txtredsgreen = new System.Windows.Forms.TextBox(); - this.pnlredcustomcolour = new System.Windows.Forms.Panel(); - this.pnlred16 = new System.Windows.Forms.Panel(); - this.pnlred12 = new System.Windows.Forms.Panel(); - this.pnlred14 = new System.Windows.Forms.Panel(); - this.pnlred10 = new System.Windows.Forms.Panel(); - this.pnlred8 = new System.Windows.Forms.Panel(); - this.pnlred4 = new System.Windows.Forms.Panel(); - this.pnlred6 = new System.Windows.Forms.Panel(); - this.pnlred15 = new System.Windows.Forms.Panel(); - this.pnlred2 = new System.Windows.Forms.Panel(); - this.pnlred13 = new System.Windows.Forms.Panel(); - this.pnlred11 = new System.Windows.Forms.Panel(); - this.pnlred7 = new System.Windows.Forms.Panel(); - this.pnlred9 = new System.Windows.Forms.Panel(); - this.pnlred5 = new System.Windows.Forms.Panel(); - this.pnlred3 = new System.Windows.Forms.Panel(); - this.pnlred1 = new System.Windows.Forms.Panel(); - this.lblredlevel = new System.Windows.Forms.Label(); - this.Label21 = new System.Windows.Forms.Label(); - this.pnlbrowncolours = new System.Windows.Forms.Panel(); - this.pnlbrownoptions = new System.Windows.Forms.Panel(); - this.Label29 = new System.Windows.Forms.Label(); - this.txtbrownsblue = new System.Windows.Forms.TextBox(); - this.txtbrownsred = new System.Windows.Forms.TextBox(); - this.Label30 = new System.Windows.Forms.Label(); - this.Label31 = new System.Windows.Forms.Label(); - this.txtbrownsgreen = new System.Windows.Forms.TextBox(); - this.pnlbrowncustomcolour = new System.Windows.Forms.Panel(); - this.pnlbrown16 = new System.Windows.Forms.Panel(); - this.pnlbrown12 = new System.Windows.Forms.Panel(); - this.pnlbrown14 = new System.Windows.Forms.Panel(); - this.pnlbrown10 = new System.Windows.Forms.Panel(); - this.pnlbrown8 = new System.Windows.Forms.Panel(); - this.pnlbrown4 = new System.Windows.Forms.Panel(); - this.pnlbrown6 = new System.Windows.Forms.Panel(); - this.pnlbrown15 = new System.Windows.Forms.Panel(); - this.pnlbrown2 = new System.Windows.Forms.Panel(); - this.pnlbrown13 = new System.Windows.Forms.Panel(); - this.pnlbrown11 = new System.Windows.Forms.Panel(); - this.pnlbrown7 = new System.Windows.Forms.Panel(); - this.pnlbrown9 = new System.Windows.Forms.Panel(); - this.pnlbrown5 = new System.Windows.Forms.Panel(); - this.pnlbrown3 = new System.Windows.Forms.Panel(); - this.pnlbrown1 = new System.Windows.Forms.Panel(); - this.lblbrownlevel = new System.Windows.Forms.Label(); - this.Label19 = new System.Windows.Forms.Label(); - this.pnlorangecolours = new System.Windows.Forms.Panel(); - this.pnlorangeoptions = new System.Windows.Forms.Panel(); - this.Label25 = new System.Windows.Forms.Label(); - this.txtorangesblue = new System.Windows.Forms.TextBox(); - this.txtorangesred = new System.Windows.Forms.TextBox(); - this.Label27 = new System.Windows.Forms.Label(); - this.Label28 = new System.Windows.Forms.Label(); - this.txtorangesgreen = new System.Windows.Forms.TextBox(); - this.pnlorangecustomcolour = new System.Windows.Forms.Panel(); - this.pnlorange16 = new System.Windows.Forms.Panel(); - this.pnlorange12 = new System.Windows.Forms.Panel(); - this.pnlorange14 = new System.Windows.Forms.Panel(); - this.pnlorange10 = new System.Windows.Forms.Panel(); - this.pnlorange8 = new System.Windows.Forms.Panel(); - this.pnlorange4 = new System.Windows.Forms.Panel(); - this.pnlorange6 = new System.Windows.Forms.Panel(); - this.pnlorange15 = new System.Windows.Forms.Panel(); - this.pnlorange2 = new System.Windows.Forms.Panel(); - this.pnlorange13 = new System.Windows.Forms.Panel(); - this.pnlorange11 = new System.Windows.Forms.Panel(); - this.pnlorange7 = new System.Windows.Forms.Panel(); - this.pnlorange9 = new System.Windows.Forms.Panel(); - this.pnlorange5 = new System.Windows.Forms.Panel(); - this.pnlorange3 = new System.Windows.Forms.Panel(); - this.pnlorange1 = new System.Windows.Forms.Panel(); - this.lblorangelevel = new System.Windows.Forms.Label(); - this.Label13 = new System.Windows.Forms.Label(); - this.pnlyellowcolours = new System.Windows.Forms.Panel(); - this.pnlyellowoptions = new System.Windows.Forms.Panel(); - this.Label20 = new System.Windows.Forms.Label(); - this.txtyellowsblue = new System.Windows.Forms.TextBox(); - this.txtyellowsred = new System.Windows.Forms.TextBox(); - this.Label22 = new System.Windows.Forms.Label(); - this.Label24 = new System.Windows.Forms.Label(); - this.txtyellowsgreen = new System.Windows.Forms.TextBox(); - this.pnlyellowcustomcolour = new System.Windows.Forms.Panel(); - this.pnlyellow16 = new System.Windows.Forms.Panel(); - this.pnlyellow12 = new System.Windows.Forms.Panel(); - this.pnlyellow14 = new System.Windows.Forms.Panel(); - this.pnlyellow10 = new System.Windows.Forms.Panel(); - this.pnlyellow8 = new System.Windows.Forms.Panel(); - this.pnlyellow4 = new System.Windows.Forms.Panel(); - this.pnlyellow6 = new System.Windows.Forms.Panel(); - this.pnlyellow15 = new System.Windows.Forms.Panel(); - this.pnlyellow2 = new System.Windows.Forms.Panel(); - this.pnlyellow13 = new System.Windows.Forms.Panel(); - this.pnlyellow11 = new System.Windows.Forms.Panel(); - this.pnlyellow7 = new System.Windows.Forms.Panel(); - this.pnlyellow9 = new System.Windows.Forms.Panel(); - this.pnlyellow5 = new System.Windows.Forms.Panel(); - this.pnlyellow3 = new System.Windows.Forms.Panel(); - this.pnlyellow1 = new System.Windows.Forms.Panel(); - this.lblyellowlevel = new System.Windows.Forms.Label(); - this.Label11 = new System.Windows.Forms.Label(); - this.pnlgreencolours = new System.Windows.Forms.Panel(); - this.pnlgreenoptions = new System.Windows.Forms.Panel(); - this.Label15 = new System.Windows.Forms.Label(); - this.txtgreensred = new System.Windows.Forms.TextBox(); - this.txtgreensgreen = new System.Windows.Forms.TextBox(); - this.Label16 = new System.Windows.Forms.Label(); - this.Label18 = new System.Windows.Forms.Label(); - this.txtgreensblue = new System.Windows.Forms.TextBox(); - this.pnlgreencustomcolour = new System.Windows.Forms.Panel(); - this.pnlgreen16 = new System.Windows.Forms.Panel(); - this.pnlgreen12 = new System.Windows.Forms.Panel(); - this.pnlgreen14 = new System.Windows.Forms.Panel(); - this.pnlgreen10 = new System.Windows.Forms.Panel(); - this.pnlgreen8 = new System.Windows.Forms.Panel(); - this.pnlgreen4 = new System.Windows.Forms.Panel(); - this.pnlgreen6 = new System.Windows.Forms.Panel(); - this.pnlgreen15 = new System.Windows.Forms.Panel(); - this.pnlgreen2 = new System.Windows.Forms.Panel(); - this.pnlgreen13 = new System.Windows.Forms.Panel(); - this.pnlgreen11 = new System.Windows.Forms.Panel(); - this.pnlgreen7 = new System.Windows.Forms.Panel(); - this.pnlgreen9 = new System.Windows.Forms.Panel(); - this.pnlgreen5 = new System.Windows.Forms.Panel(); - this.pnlgreen3 = new System.Windows.Forms.Panel(); - this.pnlgreen1 = new System.Windows.Forms.Panel(); - this.lblgreenlevel = new System.Windows.Forms.Label(); - this.Label9 = new System.Windows.Forms.Label(); - this.pnlbluecolours = new System.Windows.Forms.Panel(); - this.pnlblueoptions = new System.Windows.Forms.Panel(); - this.Label6 = new System.Windows.Forms.Label(); - this.txtbluesred = new System.Windows.Forms.TextBox(); - this.txtbluesblue = new System.Windows.Forms.TextBox(); - this.Label4 = new System.Windows.Forms.Label(); - this.Label2 = new System.Windows.Forms.Label(); - this.txtbluesgreen = new System.Windows.Forms.TextBox(); - this.pnlbluecustomcolour = new System.Windows.Forms.Panel(); - this.pnlblue16 = new System.Windows.Forms.Panel(); - this.pnlblue12 = new System.Windows.Forms.Panel(); - this.pnlblue14 = new System.Windows.Forms.Panel(); - this.pnlblue10 = new System.Windows.Forms.Panel(); - this.pnlblue8 = new System.Windows.Forms.Panel(); - this.pnlblue4 = new System.Windows.Forms.Panel(); - this.pnlblue6 = new System.Windows.Forms.Panel(); - this.pnlblue15 = new System.Windows.Forms.Panel(); - this.pnlblue2 = new System.Windows.Forms.Panel(); - this.pnlblue13 = new System.Windows.Forms.Panel(); - this.pnlblue11 = new System.Windows.Forms.Panel(); - this.pnlblue7 = new System.Windows.Forms.Panel(); - this.pnlblue9 = new System.Windows.Forms.Panel(); - this.pnlblue5 = new System.Windows.Forms.Panel(); - this.pnlblue3 = new System.Windows.Forms.Panel(); - this.pnlblue1 = new System.Windows.Forms.Panel(); - this.lblbluelevel = new System.Windows.Forms.Label(); - this.Label7 = new System.Windows.Forms.Label(); - this.pnlpurplecolours = new System.Windows.Forms.Panel(); - this.pnlpurpleoptions = new System.Windows.Forms.Panel(); - this.Label8 = new System.Windows.Forms.Label(); - this.txtpurplesgreen = new System.Windows.Forms.TextBox(); - this.txtpurplesblue = new System.Windows.Forms.TextBox(); - this.Label10 = new System.Windows.Forms.Label(); - this.Label12 = new System.Windows.Forms.Label(); - this.txtpurplesred = new System.Windows.Forms.TextBox(); - this.pnlpurplecustomcolour = new System.Windows.Forms.Panel(); - this.pnlpurple16 = new System.Windows.Forms.Panel(); - this.pnlpurple12 = new System.Windows.Forms.Panel(); - this.pnlpurple14 = new System.Windows.Forms.Panel(); - this.pnlpurple10 = new System.Windows.Forms.Panel(); - this.pnlpurple8 = new System.Windows.Forms.Panel(); - this.pnlpurple4 = new System.Windows.Forms.Panel(); - this.pnlpurple6 = new System.Windows.Forms.Panel(); - this.pnlpurple15 = new System.Windows.Forms.Panel(); - this.pnlpurple2 = new System.Windows.Forms.Panel(); - this.pnlpurple13 = new System.Windows.Forms.Panel(); - this.pnlpurple11 = new System.Windows.Forms.Panel(); - this.pnlpurple7 = new System.Windows.Forms.Panel(); - this.pnlpurple9 = new System.Windows.Forms.Panel(); - this.pnlpurple5 = new System.Windows.Forms.Panel(); - this.pnlpurple3 = new System.Windows.Forms.Panel(); - this.pnlpurple1 = new System.Windows.Forms.Panel(); - this.lblpurplelevel = new System.Windows.Forms.Label(); - this.Label5 = new System.Windows.Forms.Label(); - this.pnlgraycolours = new System.Windows.Forms.Panel(); - this.lblcustomshadetut = new System.Windows.Forms.Label(); - this.txtcustomgrayshade = new System.Windows.Forms.TextBox(); - this.pnlgraycustomcolour = new System.Windows.Forms.Panel(); - this.pnlgray16 = new System.Windows.Forms.Panel(); - this.pnlgray12 = new System.Windows.Forms.Panel(); - this.pnlgray14 = new System.Windows.Forms.Panel(); - this.pnlgray10 = new System.Windows.Forms.Panel(); - this.pnlgray8 = new System.Windows.Forms.Panel(); - this.pnlgray4 = new System.Windows.Forms.Panel(); - this.pnlgray6 = new System.Windows.Forms.Panel(); - this.pnlgray15 = new System.Windows.Forms.Panel(); - this.pnlgray2 = new System.Windows.Forms.Panel(); - this.pnlgray13 = new System.Windows.Forms.Panel(); - this.pnlgray11 = new System.Windows.Forms.Panel(); - this.pnlgray7 = new System.Windows.Forms.Panel(); - this.pnlgray9 = new System.Windows.Forms.Panel(); - this.pnlgray5 = new System.Windows.Forms.Panel(); - this.pnlgray3 = new System.Windows.Forms.Panel(); - this.pnlgray1 = new System.Windows.Forms.Panel(); - this.lblgraylevel = new System.Windows.Forms.Label(); - this.Label3 = new System.Windows.Forms.Label(); - this.pnlanycolours = new System.Windows.Forms.Panel(); - this.pnlanyoptions = new System.Windows.Forms.Panel(); - this.Label38 = new System.Windows.Forms.Label(); - this.txtanysgreen = new System.Windows.Forms.TextBox(); - this.txtanysred = new System.Windows.Forms.TextBox(); - this.Label39 = new System.Windows.Forms.Label(); - this.Label40 = new System.Windows.Forms.Label(); - this.txtanysblue = new System.Windows.Forms.TextBox(); - this.pnlanycustomcolour = new System.Windows.Forms.Panel(); - this.pnlany16 = new System.Windows.Forms.Panel(); - this.pnlany12 = new System.Windows.Forms.Panel(); - this.pnlany14 = new System.Windows.Forms.Panel(); - this.pnlany10 = new System.Windows.Forms.Panel(); - this.pnlany8 = new System.Windows.Forms.Panel(); - this.pnlany4 = new System.Windows.Forms.Panel(); - this.pnlany6 = new System.Windows.Forms.Panel(); - this.pnlany15 = new System.Windows.Forms.Panel(); - this.pnlany2 = new System.Windows.Forms.Panel(); - this.pnlany13 = new System.Windows.Forms.Panel(); - this.pnlany11 = new System.Windows.Forms.Panel(); - this.pnlany7 = new System.Windows.Forms.Panel(); - this.pnlany9 = new System.Windows.Forms.Panel(); - this.pnlany5 = new System.Windows.Forms.Panel(); - this.pnlany3 = new System.Windows.Forms.Panel(); - this.pnlany1 = new System.Windows.Forms.Panel(); - this.lblanylevel = new System.Windows.Forms.Label(); - this.Label1 = new System.Windows.Forms.Label(); - this.Panel1 = new System.Windows.Forms.Panel(); - this.lblnewcolourrgb = new System.Windows.Forms.Label(); - this.lblnewcolourname = new System.Windows.Forms.Label(); - this.Label26 = new System.Windows.Forms.Label(); - this.Label17 = new System.Windows.Forms.Label(); - this.lbloldcolourrgb = new System.Windows.Forms.Label(); - this.lbloldcolourname = new System.Windows.Forms.Label(); - this.Label14 = new System.Windows.Forms.Label(); - this.pnlnewcolour = new System.Windows.Forms.Panel(); - this.pnloldcolour = new System.Windows.Forms.Panel(); - this.lblobjecttocolour = new System.Windows.Forms.Label(); - this.pgcontents.SuspendLayout(); - this.pnlpinkcolours.SuspendLayout(); - this.pnlpinkoptions.SuspendLayout(); - this.pnlredcolours.SuspendLayout(); - this.pnlredoptions.SuspendLayout(); - this.pnlbrowncolours.SuspendLayout(); - this.pnlbrownoptions.SuspendLayout(); - this.pnlorangecolours.SuspendLayout(); - this.pnlorangeoptions.SuspendLayout(); - this.pnlyellowcolours.SuspendLayout(); - this.pnlyellowoptions.SuspendLayout(); - this.pnlgreencolours.SuspendLayout(); - this.pnlgreenoptions.SuspendLayout(); - this.pnlbluecolours.SuspendLayout(); - this.pnlblueoptions.SuspendLayout(); - this.pnlpurplecolours.SuspendLayout(); - this.pnlpurpleoptions.SuspendLayout(); - this.pnlgraycolours.SuspendLayout(); - this.pnlanycolours.SuspendLayout(); - this.pnlanyoptions.SuspendLayout(); - this.Panel1.SuspendLayout(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.Controls.Add(this.pnlpinkcolours); - this.pgcontents.Controls.Add(this.pnlredcolours); - this.pgcontents.Controls.Add(this.pnlbrowncolours); - this.pgcontents.Controls.Add(this.pnlorangecolours); - this.pgcontents.Controls.Add(this.pnlyellowcolours); - this.pgcontents.Controls.Add(this.pnlgreencolours); - this.pgcontents.Controls.Add(this.pnlbluecolours); - this.pgcontents.Controls.Add(this.pnlpurplecolours); - this.pgcontents.Controls.Add(this.pnlgraycolours); - this.pgcontents.Controls.Add(this.pnlanycolours); - this.pgcontents.Controls.Add(this.Panel1); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(447, 600); - this.pgcontents.TabIndex = 20; - // - // pnlpinkcolours - // - this.pnlpinkcolours.BackColor = System.Drawing.Color.White; - this.pnlpinkcolours.Controls.Add(this.pnlpinkoptions); - this.pnlpinkcolours.Controls.Add(this.pnlpinkcustomcolour); - this.pnlpinkcolours.Controls.Add(this.pnlpink16); - this.pnlpinkcolours.Controls.Add(this.pnlpink12); - this.pnlpinkcolours.Controls.Add(this.pnlpink14); - this.pnlpinkcolours.Controls.Add(this.pnlpink10); - this.pnlpinkcolours.Controls.Add(this.pnlpink8); - this.pnlpinkcolours.Controls.Add(this.pnlpink4); - this.pnlpinkcolours.Controls.Add(this.pnlpink6); - this.pnlpinkcolours.Controls.Add(this.pnlpink15); - this.pnlpinkcolours.Controls.Add(this.pnlpink2); - this.pnlpinkcolours.Controls.Add(this.pnlpink13); - this.pnlpinkcolours.Controls.Add(this.pnlpink11); - this.pnlpinkcolours.Controls.Add(this.pnlpink7); - this.pnlpinkcolours.Controls.Add(this.pnlpink9); - this.pnlpinkcolours.Controls.Add(this.pnlpink5); - this.pnlpinkcolours.Controls.Add(this.pnlpink3); - this.pnlpinkcolours.Controls.Add(this.pnlpink1); - this.pnlpinkcolours.Controls.Add(this.lblpinklevel); - this.pnlpinkcolours.Controls.Add(this.Label23); - this.pnlpinkcolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlpinkcolours.Location = new System.Drawing.Point(0, 521); - this.pnlpinkcolours.Name = "pnlpinkcolours"; - this.pnlpinkcolours.Size = new System.Drawing.Size(447, 46); - this.pnlpinkcolours.TabIndex = 11; - this.pnlpinkcolours.Visible = false; - // - // pnlpinkoptions - // - this.pnlpinkoptions.Controls.Add(this.Label35); - this.pnlpinkoptions.Controls.Add(this.txtpinksgreen); - this.pnlpinkoptions.Controls.Add(this.txtpinksred); - this.pnlpinkoptions.Controls.Add(this.Label36); - this.pnlpinkoptions.Controls.Add(this.Label37); - this.pnlpinkoptions.Controls.Add(this.txtpinksblue); - this.pnlpinkoptions.Location = new System.Drawing.Point(282, 2); - this.pnlpinkoptions.Name = "pnlpinkoptions"; - this.pnlpinkoptions.Size = new System.Drawing.Size(120, 40); - this.pnlpinkoptions.TabIndex = 33; - this.pnlpinkoptions.Visible = false; - // - // Label35 - // - this.Label35.AutoSize = true; - this.Label35.BackColor = System.Drawing.Color.Transparent; - this.Label35.Location = new System.Drawing.Point(56, 24); - this.Label35.Name = "Label35"; - this.Label35.Size = new System.Drawing.Size(39, 13); - this.Label35.TabIndex = 26; - this.Label35.Text = "Green:"; - // - // txtpinksgreen - // - this.txtpinksgreen.BackColor = System.Drawing.Color.White; - this.txtpinksgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpinksgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpinksgreen.Location = new System.Drawing.Point(95, 22); - this.txtpinksgreen.Multiline = true; - this.txtpinksgreen.Name = "txtpinksgreen"; - this.txtpinksgreen.Size = new System.Drawing.Size(23, 17); - this.txtpinksgreen.TabIndex = 25; - this.txtpinksgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtpinksgreen.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); - // - // txtpinksred - // - this.txtpinksred.BackColor = System.Drawing.Color.White; - this.txtpinksred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpinksred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpinksred.Location = new System.Drawing.Point(64, 2); - this.txtpinksred.Multiline = true; - this.txtpinksred.Name = "txtpinksred"; - this.txtpinksred.Size = new System.Drawing.Size(23, 17); - this.txtpinksred.TabIndex = 21; - this.txtpinksred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtpinksred.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); - // - // Label36 - // - this.Label36.AutoSize = true; - this.Label36.BackColor = System.Drawing.Color.Transparent; - this.Label36.Location = new System.Drawing.Point(1, 23); - this.Label36.Name = "Label36"; - this.Label36.Size = new System.Drawing.Size(31, 13); - this.Label36.TabIndex = 24; - this.Label36.Text = "Blue:"; - // - // Label37 - // - this.Label37.AutoSize = true; - this.Label37.BackColor = System.Drawing.Color.Transparent; - this.Label37.Location = new System.Drawing.Point(33, 4); - this.Label37.Name = "Label37"; - this.Label37.Size = new System.Drawing.Size(30, 13); - this.Label37.TabIndex = 22; - this.Label37.Text = "Red:"; - // - // txtpinksblue - // - this.txtpinksblue.BackColor = System.Drawing.Color.White; - this.txtpinksblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpinksblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpinksblue.Location = new System.Drawing.Point(32, 22); - this.txtpinksblue.Multiline = true; - this.txtpinksblue.Name = "txtpinksblue"; - this.txtpinksblue.Size = new System.Drawing.Size(23, 17); - this.txtpinksblue.TabIndex = 23; - this.txtpinksblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtpinksblue.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); - // - // pnlpinkcustomcolour - // - this.pnlpinkcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpinkcustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlpinkcustomcolour.Name = "pnlpinkcustomcolour"; - this.pnlpinkcustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlpinkcustomcolour.TabIndex = 18; - this.pnlpinkcustomcolour.Visible = false; - // - // pnlpink16 - // - this.pnlpink16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink16.Location = new System.Drawing.Point(259, 25); - this.pnlpink16.Name = "pnlpink16"; - this.pnlpink16.Size = new System.Drawing.Size(20, 13); - this.pnlpink16.TabIndex = 17; - this.pnlpink16.Visible = false; - // - // pnlpink12 - // - this.pnlpink12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink12.Location = new System.Drawing.Point(155, 25); - this.pnlpink12.Name = "pnlpink12"; - this.pnlpink12.Size = new System.Drawing.Size(20, 13); - this.pnlpink12.TabIndex = 9; - this.pnlpink12.Visible = false; - // - // pnlpink14 - // - this.pnlpink14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink14.Location = new System.Drawing.Point(207, 25); - this.pnlpink14.Name = "pnlpink14"; - this.pnlpink14.Size = new System.Drawing.Size(20, 13); - this.pnlpink14.TabIndex = 13; - this.pnlpink14.Visible = false; - // - // pnlpink10 - // - this.pnlpink10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink10.Location = new System.Drawing.Point(103, 25); - this.pnlpink10.Name = "pnlpink10"; - this.pnlpink10.Size = new System.Drawing.Size(20, 13); - this.pnlpink10.TabIndex = 5; - this.pnlpink10.Visible = false; - // - // pnlpink8 - // - this.pnlpink8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink8.Location = new System.Drawing.Point(259, 8); - this.pnlpink8.Name = "pnlpink8"; - this.pnlpink8.Size = new System.Drawing.Size(20, 13); - this.pnlpink8.TabIndex = 16; - this.pnlpink8.Visible = false; - // - // pnlpink4 - // - this.pnlpink4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink4.Location = new System.Drawing.Point(155, 8); - this.pnlpink4.Name = "pnlpink4"; - this.pnlpink4.Size = new System.Drawing.Size(20, 13); - this.pnlpink4.TabIndex = 8; - this.pnlpink4.Visible = false; - // - // pnlpink6 - // - this.pnlpink6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink6.Location = new System.Drawing.Point(207, 8); - this.pnlpink6.Name = "pnlpink6"; - this.pnlpink6.Size = new System.Drawing.Size(20, 13); - this.pnlpink6.TabIndex = 12; - this.pnlpink6.Visible = false; - // - // pnlpink15 - // - this.pnlpink15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink15.Location = new System.Drawing.Point(233, 25); - this.pnlpink15.Name = "pnlpink15"; - this.pnlpink15.Size = new System.Drawing.Size(20, 13); - this.pnlpink15.TabIndex = 15; - this.pnlpink15.Visible = false; - // - // pnlpink2 - // - this.pnlpink2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink2.Location = new System.Drawing.Point(103, 8); - this.pnlpink2.Name = "pnlpink2"; - this.pnlpink2.Size = new System.Drawing.Size(20, 13); - this.pnlpink2.TabIndex = 4; - this.pnlpink2.Visible = false; - // - // pnlpink13 - // - this.pnlpink13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink13.Location = new System.Drawing.Point(181, 25); - this.pnlpink13.Name = "pnlpink13"; - this.pnlpink13.Size = new System.Drawing.Size(20, 13); - this.pnlpink13.TabIndex = 11; - this.pnlpink13.Visible = false; - // - // pnlpink11 - // - this.pnlpink11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink11.Location = new System.Drawing.Point(129, 25); - this.pnlpink11.Name = "pnlpink11"; - this.pnlpink11.Size = new System.Drawing.Size(20, 13); - this.pnlpink11.TabIndex = 7; - this.pnlpink11.Visible = false; - // - // pnlpink7 - // - this.pnlpink7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink7.Location = new System.Drawing.Point(233, 8); - this.pnlpink7.Name = "pnlpink7"; - this.pnlpink7.Size = new System.Drawing.Size(20, 13); - this.pnlpink7.TabIndex = 14; - this.pnlpink7.Visible = false; - // - // pnlpink9 - // - this.pnlpink9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink9.Location = new System.Drawing.Point(77, 25); - this.pnlpink9.Name = "pnlpink9"; - this.pnlpink9.Size = new System.Drawing.Size(20, 13); - this.pnlpink9.TabIndex = 3; - this.pnlpink9.Visible = false; - // - // pnlpink5 - // - this.pnlpink5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink5.Location = new System.Drawing.Point(181, 8); - this.pnlpink5.Name = "pnlpink5"; - this.pnlpink5.Size = new System.Drawing.Size(20, 13); - this.pnlpink5.TabIndex = 10; - this.pnlpink5.Visible = false; - // - // pnlpink3 - // - this.pnlpink3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink3.Location = new System.Drawing.Point(129, 8); - this.pnlpink3.Name = "pnlpink3"; - this.pnlpink3.Size = new System.Drawing.Size(20, 13); - this.pnlpink3.TabIndex = 6; - this.pnlpink3.Visible = false; - // - // pnlpink1 - // - this.pnlpink1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpink1.Location = new System.Drawing.Point(77, 8); - this.pnlpink1.Name = "pnlpink1"; - this.pnlpink1.Size = new System.Drawing.Size(20, 13); - this.pnlpink1.TabIndex = 2; - this.pnlpink1.Visible = false; - // - // lblpinklevel - // - this.lblpinklevel.AutoSize = true; - this.lblpinklevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblpinklevel.Location = new System.Drawing.Point(5, 25); - this.lblpinklevel.Name = "lblpinklevel"; - this.lblpinklevel.Size = new System.Drawing.Size(49, 15); - this.lblpinklevel.TabIndex = 1; - this.lblpinklevel.Text = "Level: 4"; - // - // Label23 - // - this.Label23.AutoSize = true; - this.Label23.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label23.Location = new System.Drawing.Point(3, 2); - this.Label23.Name = "Label23"; - this.Label23.Size = new System.Drawing.Size(48, 22); - this.Label23.TabIndex = 0; - this.Label23.Text = "Pink"; - // - // pnlredcolours - // - this.pnlredcolours.BackColor = System.Drawing.Color.White; - this.pnlredcolours.Controls.Add(this.pnlredoptions); - this.pnlredcolours.Controls.Add(this.pnlredcustomcolour); - this.pnlredcolours.Controls.Add(this.pnlred16); - this.pnlredcolours.Controls.Add(this.pnlred12); - this.pnlredcolours.Controls.Add(this.pnlred14); - this.pnlredcolours.Controls.Add(this.pnlred10); - this.pnlredcolours.Controls.Add(this.pnlred8); - this.pnlredcolours.Controls.Add(this.pnlred4); - this.pnlredcolours.Controls.Add(this.pnlred6); - this.pnlredcolours.Controls.Add(this.pnlred15); - this.pnlredcolours.Controls.Add(this.pnlred2); - this.pnlredcolours.Controls.Add(this.pnlred13); - this.pnlredcolours.Controls.Add(this.pnlred11); - this.pnlredcolours.Controls.Add(this.pnlred7); - this.pnlredcolours.Controls.Add(this.pnlred9); - this.pnlredcolours.Controls.Add(this.pnlred5); - this.pnlredcolours.Controls.Add(this.pnlred3); - this.pnlredcolours.Controls.Add(this.pnlred1); - this.pnlredcolours.Controls.Add(this.lblredlevel); - this.pnlredcolours.Controls.Add(this.Label21); - this.pnlredcolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlredcolours.Location = new System.Drawing.Point(0, 475); - this.pnlredcolours.Name = "pnlredcolours"; - this.pnlredcolours.Size = new System.Drawing.Size(447, 46); - this.pnlredcolours.TabIndex = 10; - this.pnlredcolours.Visible = false; - // - // pnlredoptions - // - this.pnlredoptions.Controls.Add(this.Label32); - this.pnlredoptions.Controls.Add(this.txtredsblue); - this.pnlredoptions.Controls.Add(this.txtredsred); - this.pnlredoptions.Controls.Add(this.Label33); - this.pnlredoptions.Controls.Add(this.Label34); - this.pnlredoptions.Controls.Add(this.txtredsgreen); - this.pnlredoptions.Location = new System.Drawing.Point(282, 2); - this.pnlredoptions.Name = "pnlredoptions"; - this.pnlredoptions.Size = new System.Drawing.Size(120, 40); - this.pnlredoptions.TabIndex = 32; - this.pnlredoptions.Visible = false; - // - // Label32 - // - this.Label32.AutoSize = true; - this.Label32.BackColor = System.Drawing.Color.Transparent; - this.Label32.Location = new System.Drawing.Point(64, 24); - this.Label32.Name = "Label32"; - this.Label32.Size = new System.Drawing.Size(31, 13); - this.Label32.TabIndex = 26; - this.Label32.Text = "Blue:"; - // - // txtredsblue - // - this.txtredsblue.BackColor = System.Drawing.Color.White; - this.txtredsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtredsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtredsblue.Location = new System.Drawing.Point(95, 22); - this.txtredsblue.Multiline = true; - this.txtredsblue.Name = "txtredsblue"; - this.txtredsblue.Size = new System.Drawing.Size(23, 17); - this.txtredsblue.TabIndex = 25; - this.txtredsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // txtredsred - // - this.txtredsred.BackColor = System.Drawing.Color.White; - this.txtredsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtredsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtredsred.Location = new System.Drawing.Point(64, 2); - this.txtredsred.Multiline = true; - this.txtredsred.Name = "txtredsred"; - this.txtredsred.Size = new System.Drawing.Size(23, 17); - this.txtredsred.TabIndex = 21; - this.txtredsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // Label33 - // - this.Label33.AutoSize = true; - this.Label33.BackColor = System.Drawing.Color.Transparent; - this.Label33.Location = new System.Drawing.Point(1, 23); - this.Label33.Name = "Label33"; - this.Label33.Size = new System.Drawing.Size(39, 13); - this.Label33.TabIndex = 24; - this.Label33.Text = "Green:"; - // - // Label34 - // - this.Label34.AutoSize = true; - this.Label34.BackColor = System.Drawing.Color.Transparent; - this.Label34.Location = new System.Drawing.Point(33, 4); - this.Label34.Name = "Label34"; - this.Label34.Size = new System.Drawing.Size(30, 13); - this.Label34.TabIndex = 22; - this.Label34.Text = "Red:"; - // - // txtredsgreen - // - this.txtredsgreen.BackColor = System.Drawing.Color.White; - this.txtredsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtredsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtredsgreen.Location = new System.Drawing.Point(40, 22); - this.txtredsgreen.Multiline = true; - this.txtredsgreen.Name = "txtredsgreen"; - this.txtredsgreen.Size = new System.Drawing.Size(23, 17); - this.txtredsgreen.TabIndex = 23; - this.txtredsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // pnlredcustomcolour - // - this.pnlredcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlredcustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlredcustomcolour.Name = "pnlredcustomcolour"; - this.pnlredcustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlredcustomcolour.TabIndex = 18; - this.pnlredcustomcolour.Visible = false; - // - // pnlred16 - // - this.pnlred16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred16.Location = new System.Drawing.Point(259, 25); - this.pnlred16.Name = "pnlred16"; - this.pnlred16.Size = new System.Drawing.Size(20, 13); - this.pnlred16.TabIndex = 17; - this.pnlred16.Visible = false; - // - // pnlred12 - // - this.pnlred12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred12.Location = new System.Drawing.Point(155, 25); - this.pnlred12.Name = "pnlred12"; - this.pnlred12.Size = new System.Drawing.Size(20, 13); - this.pnlred12.TabIndex = 9; - this.pnlred12.Visible = false; - // - // pnlred14 - // - this.pnlred14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred14.Location = new System.Drawing.Point(207, 25); - this.pnlred14.Name = "pnlred14"; - this.pnlred14.Size = new System.Drawing.Size(20, 13); - this.pnlred14.TabIndex = 13; - this.pnlred14.Visible = false; - // - // pnlred10 - // - this.pnlred10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred10.Location = new System.Drawing.Point(103, 25); - this.pnlred10.Name = "pnlred10"; - this.pnlred10.Size = new System.Drawing.Size(20, 13); - this.pnlred10.TabIndex = 5; - this.pnlred10.Visible = false; - // - // pnlred8 - // - this.pnlred8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred8.Location = new System.Drawing.Point(259, 8); - this.pnlred8.Name = "pnlred8"; - this.pnlred8.Size = new System.Drawing.Size(20, 13); - this.pnlred8.TabIndex = 16; - this.pnlred8.Visible = false; - // - // pnlred4 - // - this.pnlred4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred4.Location = new System.Drawing.Point(155, 8); - this.pnlred4.Name = "pnlred4"; - this.pnlred4.Size = new System.Drawing.Size(20, 13); - this.pnlred4.TabIndex = 8; - this.pnlred4.Visible = false; - // - // pnlred6 - // - this.pnlred6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred6.Location = new System.Drawing.Point(207, 8); - this.pnlred6.Name = "pnlred6"; - this.pnlred6.Size = new System.Drawing.Size(20, 13); - this.pnlred6.TabIndex = 12; - this.pnlred6.Visible = false; - // - // pnlred15 - // - this.pnlred15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred15.Location = new System.Drawing.Point(233, 25); - this.pnlred15.Name = "pnlred15"; - this.pnlred15.Size = new System.Drawing.Size(20, 13); - this.pnlred15.TabIndex = 15; - this.pnlred15.Visible = false; - // - // pnlred2 - // - this.pnlred2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred2.Location = new System.Drawing.Point(103, 8); - this.pnlred2.Name = "pnlred2"; - this.pnlred2.Size = new System.Drawing.Size(20, 13); - this.pnlred2.TabIndex = 4; - this.pnlred2.Visible = false; - // - // pnlred13 - // - this.pnlred13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred13.Location = new System.Drawing.Point(181, 25); - this.pnlred13.Name = "pnlred13"; - this.pnlred13.Size = new System.Drawing.Size(20, 13); - this.pnlred13.TabIndex = 11; - this.pnlred13.Visible = false; - // - // pnlred11 - // - this.pnlred11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred11.Location = new System.Drawing.Point(129, 25); - this.pnlred11.Name = "pnlred11"; - this.pnlred11.Size = new System.Drawing.Size(20, 13); - this.pnlred11.TabIndex = 7; - this.pnlred11.Visible = false; - // - // pnlred7 - // - this.pnlred7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred7.Location = new System.Drawing.Point(233, 8); - this.pnlred7.Name = "pnlred7"; - this.pnlred7.Size = new System.Drawing.Size(20, 13); - this.pnlred7.TabIndex = 14; - this.pnlred7.Visible = false; - // - // pnlred9 - // - this.pnlred9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred9.Location = new System.Drawing.Point(77, 25); - this.pnlred9.Name = "pnlred9"; - this.pnlred9.Size = new System.Drawing.Size(20, 13); - this.pnlred9.TabIndex = 3; - this.pnlred9.Visible = false; - // - // pnlred5 - // - this.pnlred5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred5.Location = new System.Drawing.Point(181, 8); - this.pnlred5.Name = "pnlred5"; - this.pnlred5.Size = new System.Drawing.Size(20, 13); - this.pnlred5.TabIndex = 10; - this.pnlred5.Visible = false; - // - // pnlred3 - // - this.pnlred3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred3.Location = new System.Drawing.Point(129, 8); - this.pnlred3.Name = "pnlred3"; - this.pnlred3.Size = new System.Drawing.Size(20, 13); - this.pnlred3.TabIndex = 6; - this.pnlred3.Visible = false; - // - // pnlred1 - // - this.pnlred1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlred1.Location = new System.Drawing.Point(77, 8); - this.pnlred1.Name = "pnlred1"; - this.pnlred1.Size = new System.Drawing.Size(20, 13); - this.pnlred1.TabIndex = 2; - this.pnlred1.Visible = false; - // - // lblredlevel - // - this.lblredlevel.AutoSize = true; - this.lblredlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblredlevel.Location = new System.Drawing.Point(5, 25); - this.lblredlevel.Name = "lblredlevel"; - this.lblredlevel.Size = new System.Drawing.Size(49, 15); - this.lblredlevel.TabIndex = 1; - this.lblredlevel.Text = "Level: 4"; - // - // Label21 - // - this.Label21.AutoSize = true; - this.Label21.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label21.Location = new System.Drawing.Point(3, 2); - this.Label21.Name = "Label21"; - this.Label21.Size = new System.Drawing.Size(42, 22); - this.Label21.TabIndex = 0; - this.Label21.Text = "Red"; - // - // pnlbrowncolours - // - this.pnlbrowncolours.BackColor = System.Drawing.Color.White; - this.pnlbrowncolours.Controls.Add(this.pnlbrownoptions); - this.pnlbrowncolours.Controls.Add(this.pnlbrowncustomcolour); - this.pnlbrowncolours.Controls.Add(this.pnlbrown16); - this.pnlbrowncolours.Controls.Add(this.pnlbrown12); - this.pnlbrowncolours.Controls.Add(this.pnlbrown14); - this.pnlbrowncolours.Controls.Add(this.pnlbrown10); - this.pnlbrowncolours.Controls.Add(this.pnlbrown8); - this.pnlbrowncolours.Controls.Add(this.pnlbrown4); - this.pnlbrowncolours.Controls.Add(this.pnlbrown6); - this.pnlbrowncolours.Controls.Add(this.pnlbrown15); - this.pnlbrowncolours.Controls.Add(this.pnlbrown2); - this.pnlbrowncolours.Controls.Add(this.pnlbrown13); - this.pnlbrowncolours.Controls.Add(this.pnlbrown11); - this.pnlbrowncolours.Controls.Add(this.pnlbrown7); - this.pnlbrowncolours.Controls.Add(this.pnlbrown9); - this.pnlbrowncolours.Controls.Add(this.pnlbrown5); - this.pnlbrowncolours.Controls.Add(this.pnlbrown3); - this.pnlbrowncolours.Controls.Add(this.pnlbrown1); - this.pnlbrowncolours.Controls.Add(this.lblbrownlevel); - this.pnlbrowncolours.Controls.Add(this.Label19); - this.pnlbrowncolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlbrowncolours.Location = new System.Drawing.Point(0, 429); - this.pnlbrowncolours.Name = "pnlbrowncolours"; - this.pnlbrowncolours.Size = new System.Drawing.Size(447, 46); - this.pnlbrowncolours.TabIndex = 8; - this.pnlbrowncolours.Visible = false; - // - // pnlbrownoptions - // - this.pnlbrownoptions.Controls.Add(this.Label29); - this.pnlbrownoptions.Controls.Add(this.txtbrownsblue); - this.pnlbrownoptions.Controls.Add(this.txtbrownsred); - this.pnlbrownoptions.Controls.Add(this.Label30); - this.pnlbrownoptions.Controls.Add(this.Label31); - this.pnlbrownoptions.Controls.Add(this.txtbrownsgreen); - this.pnlbrownoptions.Location = new System.Drawing.Point(282, 3); - this.pnlbrownoptions.Name = "pnlbrownoptions"; - this.pnlbrownoptions.Size = new System.Drawing.Size(120, 40); - this.pnlbrownoptions.TabIndex = 31; - this.pnlbrownoptions.Visible = false; - // - // Label29 - // - this.Label29.AutoSize = true; - this.Label29.BackColor = System.Drawing.Color.Transparent; - this.Label29.Location = new System.Drawing.Point(64, 24); - this.Label29.Name = "Label29"; - this.Label29.Size = new System.Drawing.Size(31, 13); - this.Label29.TabIndex = 26; - this.Label29.Text = "Blue:"; - // - // txtbrownsblue - // - this.txtbrownsblue.BackColor = System.Drawing.Color.White; - this.txtbrownsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtbrownsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbrownsblue.Location = new System.Drawing.Point(95, 22); - this.txtbrownsblue.Multiline = true; - this.txtbrownsblue.Name = "txtbrownsblue"; - this.txtbrownsblue.Size = new System.Drawing.Size(23, 17); - this.txtbrownsblue.TabIndex = 25; - this.txtbrownsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // txtbrownsred - // - this.txtbrownsred.BackColor = System.Drawing.Color.White; - this.txtbrownsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtbrownsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbrownsred.Location = new System.Drawing.Point(64, 2); - this.txtbrownsred.Multiline = true; - this.txtbrownsred.Name = "txtbrownsred"; - this.txtbrownsred.Size = new System.Drawing.Size(23, 17); - this.txtbrownsred.TabIndex = 21; - this.txtbrownsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // Label30 - // - this.Label30.AutoSize = true; - this.Label30.BackColor = System.Drawing.Color.Transparent; - this.Label30.Location = new System.Drawing.Point(1, 23); - this.Label30.Name = "Label30"; - this.Label30.Size = new System.Drawing.Size(39, 13); - this.Label30.TabIndex = 24; - this.Label30.Text = "Green:"; - // - // Label31 - // - this.Label31.AutoSize = true; - this.Label31.BackColor = System.Drawing.Color.Transparent; - this.Label31.Location = new System.Drawing.Point(33, 4); - this.Label31.Name = "Label31"; - this.Label31.Size = new System.Drawing.Size(30, 13); - this.Label31.TabIndex = 22; - this.Label31.Text = "Red:"; - // - // txtbrownsgreen - // - this.txtbrownsgreen.BackColor = System.Drawing.Color.White; - this.txtbrownsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtbrownsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbrownsgreen.Location = new System.Drawing.Point(40, 22); - this.txtbrownsgreen.Multiline = true; - this.txtbrownsgreen.Name = "txtbrownsgreen"; - this.txtbrownsgreen.Size = new System.Drawing.Size(23, 17); - this.txtbrownsgreen.TabIndex = 23; - this.txtbrownsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // pnlbrowncustomcolour - // - this.pnlbrowncustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrowncustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlbrowncustomcolour.Name = "pnlbrowncustomcolour"; - this.pnlbrowncustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlbrowncustomcolour.TabIndex = 18; - this.pnlbrowncustomcolour.Visible = false; - // - // pnlbrown16 - // - this.pnlbrown16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown16.Location = new System.Drawing.Point(259, 25); - this.pnlbrown16.Name = "pnlbrown16"; - this.pnlbrown16.Size = new System.Drawing.Size(20, 13); - this.pnlbrown16.TabIndex = 17; - this.pnlbrown16.Visible = false; - // - // pnlbrown12 - // - this.pnlbrown12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown12.Location = new System.Drawing.Point(155, 25); - this.pnlbrown12.Name = "pnlbrown12"; - this.pnlbrown12.Size = new System.Drawing.Size(20, 13); - this.pnlbrown12.TabIndex = 9; - this.pnlbrown12.Visible = false; - // - // pnlbrown14 - // - this.pnlbrown14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown14.Location = new System.Drawing.Point(207, 25); - this.pnlbrown14.Name = "pnlbrown14"; - this.pnlbrown14.Size = new System.Drawing.Size(20, 13); - this.pnlbrown14.TabIndex = 13; - this.pnlbrown14.Visible = false; - // - // pnlbrown10 - // - this.pnlbrown10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown10.Location = new System.Drawing.Point(103, 25); - this.pnlbrown10.Name = "pnlbrown10"; - this.pnlbrown10.Size = new System.Drawing.Size(20, 13); - this.pnlbrown10.TabIndex = 5; - this.pnlbrown10.Visible = false; - // - // pnlbrown8 - // - this.pnlbrown8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown8.Location = new System.Drawing.Point(259, 8); - this.pnlbrown8.Name = "pnlbrown8"; - this.pnlbrown8.Size = new System.Drawing.Size(20, 13); - this.pnlbrown8.TabIndex = 16; - this.pnlbrown8.Visible = false; - // - // pnlbrown4 - // - this.pnlbrown4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown4.Location = new System.Drawing.Point(155, 8); - this.pnlbrown4.Name = "pnlbrown4"; - this.pnlbrown4.Size = new System.Drawing.Size(20, 13); - this.pnlbrown4.TabIndex = 8; - this.pnlbrown4.Visible = false; - // - // pnlbrown6 - // - this.pnlbrown6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown6.Location = new System.Drawing.Point(207, 8); - this.pnlbrown6.Name = "pnlbrown6"; - this.pnlbrown6.Size = new System.Drawing.Size(20, 13); - this.pnlbrown6.TabIndex = 12; - this.pnlbrown6.Visible = false; - // - // pnlbrown15 - // - this.pnlbrown15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown15.Location = new System.Drawing.Point(233, 25); - this.pnlbrown15.Name = "pnlbrown15"; - this.pnlbrown15.Size = new System.Drawing.Size(20, 13); - this.pnlbrown15.TabIndex = 15; - this.pnlbrown15.Visible = false; - // - // pnlbrown2 - // - this.pnlbrown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown2.Location = new System.Drawing.Point(103, 8); - this.pnlbrown2.Name = "pnlbrown2"; - this.pnlbrown2.Size = new System.Drawing.Size(20, 13); - this.pnlbrown2.TabIndex = 4; - this.pnlbrown2.Visible = false; - // - // pnlbrown13 - // - this.pnlbrown13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown13.Location = new System.Drawing.Point(181, 25); - this.pnlbrown13.Name = "pnlbrown13"; - this.pnlbrown13.Size = new System.Drawing.Size(20, 13); - this.pnlbrown13.TabIndex = 11; - this.pnlbrown13.Visible = false; - // - // pnlbrown11 - // - this.pnlbrown11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown11.Location = new System.Drawing.Point(129, 25); - this.pnlbrown11.Name = "pnlbrown11"; - this.pnlbrown11.Size = new System.Drawing.Size(20, 13); - this.pnlbrown11.TabIndex = 7; - this.pnlbrown11.Visible = false; - // - // pnlbrown7 - // - this.pnlbrown7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown7.Location = new System.Drawing.Point(233, 8); - this.pnlbrown7.Name = "pnlbrown7"; - this.pnlbrown7.Size = new System.Drawing.Size(20, 13); - this.pnlbrown7.TabIndex = 14; - this.pnlbrown7.Visible = false; - // - // pnlbrown9 - // - this.pnlbrown9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown9.Location = new System.Drawing.Point(77, 25); - this.pnlbrown9.Name = "pnlbrown9"; - this.pnlbrown9.Size = new System.Drawing.Size(20, 13); - this.pnlbrown9.TabIndex = 3; - this.pnlbrown9.Visible = false; - // - // pnlbrown5 - // - this.pnlbrown5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown5.Location = new System.Drawing.Point(181, 8); - this.pnlbrown5.Name = "pnlbrown5"; - this.pnlbrown5.Size = new System.Drawing.Size(20, 13); - this.pnlbrown5.TabIndex = 10; - this.pnlbrown5.Visible = false; - // - // pnlbrown3 - // - this.pnlbrown3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown3.Location = new System.Drawing.Point(129, 8); - this.pnlbrown3.Name = "pnlbrown3"; - this.pnlbrown3.Size = new System.Drawing.Size(20, 13); - this.pnlbrown3.TabIndex = 6; - this.pnlbrown3.Visible = false; - // - // pnlbrown1 - // - this.pnlbrown1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbrown1.Location = new System.Drawing.Point(77, 8); - this.pnlbrown1.Name = "pnlbrown1"; - this.pnlbrown1.Size = new System.Drawing.Size(20, 13); - this.pnlbrown1.TabIndex = 2; - this.pnlbrown1.Visible = false; - // - // lblbrownlevel - // - this.lblbrownlevel.AutoSize = true; - this.lblbrownlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblbrownlevel.Location = new System.Drawing.Point(5, 25); - this.lblbrownlevel.Name = "lblbrownlevel"; - this.lblbrownlevel.Size = new System.Drawing.Size(49, 15); - this.lblbrownlevel.TabIndex = 1; - this.lblbrownlevel.Text = "Level: 4"; - // - // Label19 - // - this.Label19.AutoSize = true; - this.Label19.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label19.Location = new System.Drawing.Point(3, 2); - this.Label19.Name = "Label19"; - this.Label19.Size = new System.Drawing.Size(67, 22); - this.Label19.TabIndex = 0; - this.Label19.Text = "Brown"; - // - // pnlorangecolours - // - this.pnlorangecolours.BackColor = System.Drawing.Color.White; - this.pnlorangecolours.Controls.Add(this.pnlorangeoptions); - this.pnlorangecolours.Controls.Add(this.pnlorangecustomcolour); - this.pnlorangecolours.Controls.Add(this.pnlorange16); - this.pnlorangecolours.Controls.Add(this.pnlorange12); - this.pnlorangecolours.Controls.Add(this.pnlorange14); - this.pnlorangecolours.Controls.Add(this.pnlorange10); - this.pnlorangecolours.Controls.Add(this.pnlorange8); - this.pnlorangecolours.Controls.Add(this.pnlorange4); - this.pnlorangecolours.Controls.Add(this.pnlorange6); - this.pnlorangecolours.Controls.Add(this.pnlorange15); - this.pnlorangecolours.Controls.Add(this.pnlorange2); - this.pnlorangecolours.Controls.Add(this.pnlorange13); - this.pnlorangecolours.Controls.Add(this.pnlorange11); - this.pnlorangecolours.Controls.Add(this.pnlorange7); - this.pnlorangecolours.Controls.Add(this.pnlorange9); - this.pnlorangecolours.Controls.Add(this.pnlorange5); - this.pnlorangecolours.Controls.Add(this.pnlorange3); - this.pnlorangecolours.Controls.Add(this.pnlorange1); - this.pnlorangecolours.Controls.Add(this.lblorangelevel); - this.pnlorangecolours.Controls.Add(this.Label13); - this.pnlorangecolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlorangecolours.Location = new System.Drawing.Point(0, 383); - this.pnlorangecolours.Name = "pnlorangecolours"; - this.pnlorangecolours.Size = new System.Drawing.Size(447, 46); - this.pnlorangecolours.TabIndex = 7; - this.pnlorangecolours.Visible = false; - // - // pnlorangeoptions - // - this.pnlorangeoptions.Controls.Add(this.Label25); - this.pnlorangeoptions.Controls.Add(this.txtorangesblue); - this.pnlorangeoptions.Controls.Add(this.txtorangesred); - this.pnlorangeoptions.Controls.Add(this.Label27); - this.pnlorangeoptions.Controls.Add(this.Label28); - this.pnlorangeoptions.Controls.Add(this.txtorangesgreen); - this.pnlorangeoptions.Location = new System.Drawing.Point(282, 3); - this.pnlorangeoptions.Name = "pnlorangeoptions"; - this.pnlorangeoptions.Size = new System.Drawing.Size(120, 40); - this.pnlorangeoptions.TabIndex = 30; - this.pnlorangeoptions.Visible = false; - // - // Label25 - // - this.Label25.AutoSize = true; - this.Label25.BackColor = System.Drawing.Color.Transparent; - this.Label25.Location = new System.Drawing.Point(64, 24); - this.Label25.Name = "Label25"; - this.Label25.Size = new System.Drawing.Size(31, 13); - this.Label25.TabIndex = 26; - this.Label25.Text = "Blue:"; - // - // txtorangesblue - // - this.txtorangesblue.BackColor = System.Drawing.Color.White; - this.txtorangesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtorangesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtorangesblue.Location = new System.Drawing.Point(95, 22); - this.txtorangesblue.Multiline = true; - this.txtorangesblue.Name = "txtorangesblue"; - this.txtorangesblue.Size = new System.Drawing.Size(23, 17); - this.txtorangesblue.TabIndex = 25; - this.txtorangesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // txtorangesred - // - this.txtorangesred.BackColor = System.Drawing.Color.White; - this.txtorangesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtorangesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtorangesred.Location = new System.Drawing.Point(64, 2); - this.txtorangesred.Multiline = true; - this.txtorangesred.Name = "txtorangesred"; - this.txtorangesred.Size = new System.Drawing.Size(23, 17); - this.txtorangesred.TabIndex = 21; - this.txtorangesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // Label27 - // - this.Label27.AutoSize = true; - this.Label27.BackColor = System.Drawing.Color.Transparent; - this.Label27.Location = new System.Drawing.Point(1, 23); - this.Label27.Name = "Label27"; - this.Label27.Size = new System.Drawing.Size(39, 13); - this.Label27.TabIndex = 24; - this.Label27.Text = "Green:"; - // - // Label28 - // - this.Label28.AutoSize = true; - this.Label28.BackColor = System.Drawing.Color.Transparent; - this.Label28.Location = new System.Drawing.Point(33, 4); - this.Label28.Name = "Label28"; - this.Label28.Size = new System.Drawing.Size(30, 13); - this.Label28.TabIndex = 22; - this.Label28.Text = "Red:"; - // - // txtorangesgreen - // - this.txtorangesgreen.BackColor = System.Drawing.Color.White; - this.txtorangesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtorangesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtorangesgreen.Location = new System.Drawing.Point(40, 22); - this.txtorangesgreen.Multiline = true; - this.txtorangesgreen.Name = "txtorangesgreen"; - this.txtorangesgreen.Size = new System.Drawing.Size(23, 17); - this.txtorangesgreen.TabIndex = 23; - this.txtorangesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // pnlorangecustomcolour - // - this.pnlorangecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorangecustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlorangecustomcolour.Name = "pnlorangecustomcolour"; - this.pnlorangecustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlorangecustomcolour.TabIndex = 18; - this.pnlorangecustomcolour.Visible = false; - // - // pnlorange16 - // - this.pnlorange16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange16.Location = new System.Drawing.Point(259, 25); - this.pnlorange16.Name = "pnlorange16"; - this.pnlorange16.Size = new System.Drawing.Size(20, 13); - this.pnlorange16.TabIndex = 17; - this.pnlorange16.Visible = false; - // - // pnlorange12 - // - this.pnlorange12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange12.Location = new System.Drawing.Point(155, 25); - this.pnlorange12.Name = "pnlorange12"; - this.pnlorange12.Size = new System.Drawing.Size(20, 13); - this.pnlorange12.TabIndex = 9; - this.pnlorange12.Visible = false; - // - // pnlorange14 - // - this.pnlorange14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange14.Location = new System.Drawing.Point(207, 25); - this.pnlorange14.Name = "pnlorange14"; - this.pnlorange14.Size = new System.Drawing.Size(20, 13); - this.pnlorange14.TabIndex = 13; - this.pnlorange14.Visible = false; - // - // pnlorange10 - // - this.pnlorange10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange10.Location = new System.Drawing.Point(103, 25); - this.pnlorange10.Name = "pnlorange10"; - this.pnlorange10.Size = new System.Drawing.Size(20, 13); - this.pnlorange10.TabIndex = 5; - this.pnlorange10.Visible = false; - // - // pnlorange8 - // - this.pnlorange8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange8.Location = new System.Drawing.Point(259, 8); - this.pnlorange8.Name = "pnlorange8"; - this.pnlorange8.Size = new System.Drawing.Size(20, 13); - this.pnlorange8.TabIndex = 16; - this.pnlorange8.Visible = false; - // - // pnlorange4 - // - this.pnlorange4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange4.Location = new System.Drawing.Point(155, 8); - this.pnlorange4.Name = "pnlorange4"; - this.pnlorange4.Size = new System.Drawing.Size(20, 13); - this.pnlorange4.TabIndex = 8; - this.pnlorange4.Visible = false; - // - // pnlorange6 - // - this.pnlorange6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange6.Location = new System.Drawing.Point(207, 8); - this.pnlorange6.Name = "pnlorange6"; - this.pnlorange6.Size = new System.Drawing.Size(20, 13); - this.pnlorange6.TabIndex = 12; - this.pnlorange6.Visible = false; - // - // pnlorange15 - // - this.pnlorange15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange15.Location = new System.Drawing.Point(233, 25); - this.pnlorange15.Name = "pnlorange15"; - this.pnlorange15.Size = new System.Drawing.Size(20, 13); - this.pnlorange15.TabIndex = 15; - this.pnlorange15.Visible = false; - // - // pnlorange2 - // - this.pnlorange2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange2.Location = new System.Drawing.Point(103, 8); - this.pnlorange2.Name = "pnlorange2"; - this.pnlorange2.Size = new System.Drawing.Size(20, 13); - this.pnlorange2.TabIndex = 4; - this.pnlorange2.Visible = false; - // - // pnlorange13 - // - this.pnlorange13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange13.Location = new System.Drawing.Point(181, 25); - this.pnlorange13.Name = "pnlorange13"; - this.pnlorange13.Size = new System.Drawing.Size(20, 13); - this.pnlorange13.TabIndex = 11; - this.pnlorange13.Visible = false; - // - // pnlorange11 - // - this.pnlorange11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange11.Location = new System.Drawing.Point(129, 25); - this.pnlorange11.Name = "pnlorange11"; - this.pnlorange11.Size = new System.Drawing.Size(20, 13); - this.pnlorange11.TabIndex = 7; - this.pnlorange11.Visible = false; - // - // pnlorange7 - // - this.pnlorange7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange7.Location = new System.Drawing.Point(233, 8); - this.pnlorange7.Name = "pnlorange7"; - this.pnlorange7.Size = new System.Drawing.Size(20, 13); - this.pnlorange7.TabIndex = 14; - this.pnlorange7.Visible = false; - // - // pnlorange9 - // - this.pnlorange9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange9.Location = new System.Drawing.Point(77, 25); - this.pnlorange9.Name = "pnlorange9"; - this.pnlorange9.Size = new System.Drawing.Size(20, 13); - this.pnlorange9.TabIndex = 3; - this.pnlorange9.Visible = false; - // - // pnlorange5 - // - this.pnlorange5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange5.Location = new System.Drawing.Point(181, 8); - this.pnlorange5.Name = "pnlorange5"; - this.pnlorange5.Size = new System.Drawing.Size(20, 13); - this.pnlorange5.TabIndex = 10; - this.pnlorange5.Visible = false; - // - // pnlorange3 - // - this.pnlorange3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange3.Location = new System.Drawing.Point(129, 8); - this.pnlorange3.Name = "pnlorange3"; - this.pnlorange3.Size = new System.Drawing.Size(20, 13); - this.pnlorange3.TabIndex = 6; - this.pnlorange3.Visible = false; - // - // pnlorange1 - // - this.pnlorange1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlorange1.Location = new System.Drawing.Point(77, 8); - this.pnlorange1.Name = "pnlorange1"; - this.pnlorange1.Size = new System.Drawing.Size(20, 13); - this.pnlorange1.TabIndex = 2; - this.pnlorange1.Visible = false; - // - // lblorangelevel - // - this.lblorangelevel.AutoSize = true; - this.lblorangelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblorangelevel.Location = new System.Drawing.Point(5, 25); - this.lblorangelevel.Name = "lblorangelevel"; - this.lblorangelevel.Size = new System.Drawing.Size(49, 15); - this.lblorangelevel.TabIndex = 1; - this.lblorangelevel.Text = "Level: 4"; - // - // Label13 - // - this.Label13.AutoSize = true; - this.Label13.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label13.Location = new System.Drawing.Point(3, 2); - this.Label13.Name = "Label13"; - this.Label13.Size = new System.Drawing.Size(74, 22); - this.Label13.TabIndex = 0; - this.Label13.Text = "Orange"; - // - // pnlyellowcolours - // - this.pnlyellowcolours.BackColor = System.Drawing.Color.White; - this.pnlyellowcolours.Controls.Add(this.pnlyellowoptions); - this.pnlyellowcolours.Controls.Add(this.pnlyellowcustomcolour); - this.pnlyellowcolours.Controls.Add(this.pnlyellow16); - this.pnlyellowcolours.Controls.Add(this.pnlyellow12); - this.pnlyellowcolours.Controls.Add(this.pnlyellow14); - this.pnlyellowcolours.Controls.Add(this.pnlyellow10); - this.pnlyellowcolours.Controls.Add(this.pnlyellow8); - this.pnlyellowcolours.Controls.Add(this.pnlyellow4); - this.pnlyellowcolours.Controls.Add(this.pnlyellow6); - this.pnlyellowcolours.Controls.Add(this.pnlyellow15); - this.pnlyellowcolours.Controls.Add(this.pnlyellow2); - this.pnlyellowcolours.Controls.Add(this.pnlyellow13); - this.pnlyellowcolours.Controls.Add(this.pnlyellow11); - this.pnlyellowcolours.Controls.Add(this.pnlyellow7); - this.pnlyellowcolours.Controls.Add(this.pnlyellow9); - this.pnlyellowcolours.Controls.Add(this.pnlyellow5); - this.pnlyellowcolours.Controls.Add(this.pnlyellow3); - this.pnlyellowcolours.Controls.Add(this.pnlyellow1); - this.pnlyellowcolours.Controls.Add(this.lblyellowlevel); - this.pnlyellowcolours.Controls.Add(this.Label11); - this.pnlyellowcolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlyellowcolours.Location = new System.Drawing.Point(0, 337); - this.pnlyellowcolours.Name = "pnlyellowcolours"; - this.pnlyellowcolours.Size = new System.Drawing.Size(447, 46); - this.pnlyellowcolours.TabIndex = 6; - this.pnlyellowcolours.Visible = false; - // - // pnlyellowoptions - // - this.pnlyellowoptions.Controls.Add(this.Label20); - this.pnlyellowoptions.Controls.Add(this.txtyellowsblue); - this.pnlyellowoptions.Controls.Add(this.txtyellowsred); - this.pnlyellowoptions.Controls.Add(this.Label22); - this.pnlyellowoptions.Controls.Add(this.Label24); - this.pnlyellowoptions.Controls.Add(this.txtyellowsgreen); - this.pnlyellowoptions.Location = new System.Drawing.Point(282, 3); - this.pnlyellowoptions.Name = "pnlyellowoptions"; - this.pnlyellowoptions.Size = new System.Drawing.Size(120, 40); - this.pnlyellowoptions.TabIndex = 29; - this.pnlyellowoptions.Visible = false; - // - // Label20 - // - this.Label20.AutoSize = true; - this.Label20.BackColor = System.Drawing.Color.Transparent; - this.Label20.Location = new System.Drawing.Point(64, 24); - this.Label20.Name = "Label20"; - this.Label20.Size = new System.Drawing.Size(31, 13); - this.Label20.TabIndex = 26; - this.Label20.Text = "Blue:"; - // - // txtyellowsblue - // - this.txtyellowsblue.BackColor = System.Drawing.Color.White; - this.txtyellowsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtyellowsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtyellowsblue.Location = new System.Drawing.Point(95, 22); - this.txtyellowsblue.Multiline = true; - this.txtyellowsblue.Name = "txtyellowsblue"; - this.txtyellowsblue.Size = new System.Drawing.Size(23, 17); - this.txtyellowsblue.TabIndex = 25; - this.txtyellowsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // txtyellowsred - // - this.txtyellowsred.BackColor = System.Drawing.Color.White; - this.txtyellowsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtyellowsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtyellowsred.Location = new System.Drawing.Point(64, 2); - this.txtyellowsred.Multiline = true; - this.txtyellowsred.Name = "txtyellowsred"; - this.txtyellowsred.Size = new System.Drawing.Size(23, 17); - this.txtyellowsred.TabIndex = 21; - this.txtyellowsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // Label22 - // - this.Label22.AutoSize = true; - this.Label22.BackColor = System.Drawing.Color.Transparent; - this.Label22.Location = new System.Drawing.Point(1, 23); - this.Label22.Name = "Label22"; - this.Label22.Size = new System.Drawing.Size(39, 13); - this.Label22.TabIndex = 24; - this.Label22.Text = "Green:"; - // - // Label24 - // - this.Label24.AutoSize = true; - this.Label24.BackColor = System.Drawing.Color.Transparent; - this.Label24.Location = new System.Drawing.Point(33, 4); - this.Label24.Name = "Label24"; - this.Label24.Size = new System.Drawing.Size(30, 13); - this.Label24.TabIndex = 22; - this.Label24.Text = "Red:"; - // - // txtyellowsgreen - // - this.txtyellowsgreen.BackColor = System.Drawing.Color.White; - this.txtyellowsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtyellowsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtyellowsgreen.Location = new System.Drawing.Point(40, 22); - this.txtyellowsgreen.Multiline = true; - this.txtyellowsgreen.Name = "txtyellowsgreen"; - this.txtyellowsgreen.Size = new System.Drawing.Size(23, 17); - this.txtyellowsgreen.TabIndex = 23; - this.txtyellowsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // pnlyellowcustomcolour - // - this.pnlyellowcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellowcustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlyellowcustomcolour.Name = "pnlyellowcustomcolour"; - this.pnlyellowcustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlyellowcustomcolour.TabIndex = 18; - this.pnlyellowcustomcolour.Visible = false; - // - // pnlyellow16 - // - this.pnlyellow16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow16.Location = new System.Drawing.Point(259, 25); - this.pnlyellow16.Name = "pnlyellow16"; - this.pnlyellow16.Size = new System.Drawing.Size(20, 13); - this.pnlyellow16.TabIndex = 17; - this.pnlyellow16.Visible = false; - // - // pnlyellow12 - // - this.pnlyellow12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow12.Location = new System.Drawing.Point(155, 25); - this.pnlyellow12.Name = "pnlyellow12"; - this.pnlyellow12.Size = new System.Drawing.Size(20, 13); - this.pnlyellow12.TabIndex = 9; - this.pnlyellow12.Visible = false; - // - // pnlyellow14 - // - this.pnlyellow14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow14.Location = new System.Drawing.Point(207, 25); - this.pnlyellow14.Name = "pnlyellow14"; - this.pnlyellow14.Size = new System.Drawing.Size(20, 13); - this.pnlyellow14.TabIndex = 13; - this.pnlyellow14.Visible = false; - // - // pnlyellow10 - // - this.pnlyellow10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow10.Location = new System.Drawing.Point(103, 25); - this.pnlyellow10.Name = "pnlyellow10"; - this.pnlyellow10.Size = new System.Drawing.Size(20, 13); - this.pnlyellow10.TabIndex = 5; - this.pnlyellow10.Visible = false; - // - // pnlyellow8 - // - this.pnlyellow8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow8.Location = new System.Drawing.Point(259, 8); - this.pnlyellow8.Name = "pnlyellow8"; - this.pnlyellow8.Size = new System.Drawing.Size(20, 13); - this.pnlyellow8.TabIndex = 16; - this.pnlyellow8.Visible = false; - // - // pnlyellow4 - // - this.pnlyellow4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow4.Location = new System.Drawing.Point(155, 8); - this.pnlyellow4.Name = "pnlyellow4"; - this.pnlyellow4.Size = new System.Drawing.Size(20, 13); - this.pnlyellow4.TabIndex = 8; - this.pnlyellow4.Visible = false; - // - // pnlyellow6 - // - this.pnlyellow6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow6.Location = new System.Drawing.Point(207, 8); - this.pnlyellow6.Name = "pnlyellow6"; - this.pnlyellow6.Size = new System.Drawing.Size(20, 13); - this.pnlyellow6.TabIndex = 12; - this.pnlyellow6.Visible = false; - // - // pnlyellow15 - // - this.pnlyellow15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow15.Location = new System.Drawing.Point(233, 25); - this.pnlyellow15.Name = "pnlyellow15"; - this.pnlyellow15.Size = new System.Drawing.Size(20, 13); - this.pnlyellow15.TabIndex = 15; - this.pnlyellow15.Visible = false; - // - // pnlyellow2 - // - this.pnlyellow2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow2.Location = new System.Drawing.Point(103, 8); - this.pnlyellow2.Name = "pnlyellow2"; - this.pnlyellow2.Size = new System.Drawing.Size(20, 13); - this.pnlyellow2.TabIndex = 4; - this.pnlyellow2.Visible = false; - // - // pnlyellow13 - // - this.pnlyellow13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow13.Location = new System.Drawing.Point(181, 25); - this.pnlyellow13.Name = "pnlyellow13"; - this.pnlyellow13.Size = new System.Drawing.Size(20, 13); - this.pnlyellow13.TabIndex = 11; - this.pnlyellow13.Visible = false; - // - // pnlyellow11 - // - this.pnlyellow11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow11.Location = new System.Drawing.Point(129, 25); - this.pnlyellow11.Name = "pnlyellow11"; - this.pnlyellow11.Size = new System.Drawing.Size(20, 13); - this.pnlyellow11.TabIndex = 7; - this.pnlyellow11.Visible = false; - // - // pnlyellow7 - // - this.pnlyellow7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow7.Location = new System.Drawing.Point(233, 8); - this.pnlyellow7.Name = "pnlyellow7"; - this.pnlyellow7.Size = new System.Drawing.Size(20, 13); - this.pnlyellow7.TabIndex = 14; - this.pnlyellow7.Visible = false; - // - // pnlyellow9 - // - this.pnlyellow9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow9.Location = new System.Drawing.Point(77, 25); - this.pnlyellow9.Name = "pnlyellow9"; - this.pnlyellow9.Size = new System.Drawing.Size(20, 13); - this.pnlyellow9.TabIndex = 3; - this.pnlyellow9.Visible = false; - // - // pnlyellow5 - // - this.pnlyellow5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow5.Location = new System.Drawing.Point(181, 8); - this.pnlyellow5.Name = "pnlyellow5"; - this.pnlyellow5.Size = new System.Drawing.Size(20, 13); - this.pnlyellow5.TabIndex = 10; - this.pnlyellow5.Visible = false; - // - // pnlyellow3 - // - this.pnlyellow3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow3.Location = new System.Drawing.Point(129, 8); - this.pnlyellow3.Name = "pnlyellow3"; - this.pnlyellow3.Size = new System.Drawing.Size(20, 13); - this.pnlyellow3.TabIndex = 6; - this.pnlyellow3.Visible = false; - // - // pnlyellow1 - // - this.pnlyellow1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlyellow1.Location = new System.Drawing.Point(77, 8); - this.pnlyellow1.Name = "pnlyellow1"; - this.pnlyellow1.Size = new System.Drawing.Size(20, 13); - this.pnlyellow1.TabIndex = 2; - this.pnlyellow1.Visible = false; - // - // lblyellowlevel - // - this.lblyellowlevel.AutoSize = true; - this.lblyellowlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblyellowlevel.Location = new System.Drawing.Point(5, 25); - this.lblyellowlevel.Name = "lblyellowlevel"; - this.lblyellowlevel.Size = new System.Drawing.Size(49, 15); - this.lblyellowlevel.TabIndex = 1; - this.lblyellowlevel.Text = "Level: 4"; - // - // Label11 - // - this.Label11.AutoSize = true; - this.Label11.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label11.Location = new System.Drawing.Point(3, 2); - this.Label11.Name = "Label11"; - this.Label11.Size = new System.Drawing.Size(65, 22); - this.Label11.TabIndex = 0; - this.Label11.Text = "Yellow"; - // - // pnlgreencolours - // - this.pnlgreencolours.BackColor = System.Drawing.Color.White; - this.pnlgreencolours.Controls.Add(this.pnlgreenoptions); - this.pnlgreencolours.Controls.Add(this.pnlgreencustomcolour); - this.pnlgreencolours.Controls.Add(this.pnlgreen16); - this.pnlgreencolours.Controls.Add(this.pnlgreen12); - this.pnlgreencolours.Controls.Add(this.pnlgreen14); - this.pnlgreencolours.Controls.Add(this.pnlgreen10); - this.pnlgreencolours.Controls.Add(this.pnlgreen8); - this.pnlgreencolours.Controls.Add(this.pnlgreen4); - this.pnlgreencolours.Controls.Add(this.pnlgreen6); - this.pnlgreencolours.Controls.Add(this.pnlgreen15); - this.pnlgreencolours.Controls.Add(this.pnlgreen2); - this.pnlgreencolours.Controls.Add(this.pnlgreen13); - this.pnlgreencolours.Controls.Add(this.pnlgreen11); - this.pnlgreencolours.Controls.Add(this.pnlgreen7); - this.pnlgreencolours.Controls.Add(this.pnlgreen9); - this.pnlgreencolours.Controls.Add(this.pnlgreen5); - this.pnlgreencolours.Controls.Add(this.pnlgreen3); - this.pnlgreencolours.Controls.Add(this.pnlgreen1); - this.pnlgreencolours.Controls.Add(this.lblgreenlevel); - this.pnlgreencolours.Controls.Add(this.Label9); - this.pnlgreencolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlgreencolours.Location = new System.Drawing.Point(0, 291); - this.pnlgreencolours.Name = "pnlgreencolours"; - this.pnlgreencolours.Size = new System.Drawing.Size(447, 46); - this.pnlgreencolours.TabIndex = 5; - this.pnlgreencolours.Visible = false; - // - // pnlgreenoptions - // - this.pnlgreenoptions.Controls.Add(this.Label15); - this.pnlgreenoptions.Controls.Add(this.txtgreensred); - this.pnlgreenoptions.Controls.Add(this.txtgreensgreen); - this.pnlgreenoptions.Controls.Add(this.Label16); - this.pnlgreenoptions.Controls.Add(this.Label18); - this.pnlgreenoptions.Controls.Add(this.txtgreensblue); - this.pnlgreenoptions.Location = new System.Drawing.Point(282, 3); - this.pnlgreenoptions.Name = "pnlgreenoptions"; - this.pnlgreenoptions.Size = new System.Drawing.Size(120, 40); - this.pnlgreenoptions.TabIndex = 29; - this.pnlgreenoptions.Visible = false; - // - // Label15 - // - this.Label15.AutoSize = true; - this.Label15.BackColor = System.Drawing.Color.Transparent; - this.Label15.Location = new System.Drawing.Point(62, 24); - this.Label15.Name = "Label15"; - this.Label15.Size = new System.Drawing.Size(30, 13); - this.Label15.TabIndex = 26; - this.Label15.Text = "Red:"; - // - // txtgreensred - // - this.txtgreensred.BackColor = System.Drawing.Color.White; - this.txtgreensred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtgreensred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtgreensred.Location = new System.Drawing.Point(92, 22); - this.txtgreensred.Multiline = true; - this.txtgreensred.Name = "txtgreensred"; - this.txtgreensred.Size = new System.Drawing.Size(23, 17); - this.txtgreensred.TabIndex = 25; - this.txtgreensred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // txtgreensgreen - // - this.txtgreensgreen.BackColor = System.Drawing.Color.White; - this.txtgreensgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtgreensgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtgreensgreen.Location = new System.Drawing.Point(66, 2); - this.txtgreensgreen.Multiline = true; - this.txtgreensgreen.Name = "txtgreensgreen"; - this.txtgreensgreen.Size = new System.Drawing.Size(23, 17); - this.txtgreensgreen.TabIndex = 21; - this.txtgreensgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // Label16 - // - this.Label16.AutoSize = true; - this.Label16.BackColor = System.Drawing.Color.Transparent; - this.Label16.Location = new System.Drawing.Point(2, 23); - this.Label16.Name = "Label16"; - this.Label16.Size = new System.Drawing.Size(31, 13); - this.Label16.TabIndex = 24; - this.Label16.Text = "Blue:"; - // - // Label18 - // - this.Label18.AutoSize = true; - this.Label18.BackColor = System.Drawing.Color.Transparent; - this.Label18.Location = new System.Drawing.Point(28, 4); - this.Label18.Name = "Label18"; - this.Label18.Size = new System.Drawing.Size(39, 13); - this.Label18.TabIndex = 22; - this.Label18.Text = "Green:"; - // - // txtgreensblue - // - this.txtgreensblue.BackColor = System.Drawing.Color.White; - this.txtgreensblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtgreensblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtgreensblue.Location = new System.Drawing.Point(33, 22); - this.txtgreensblue.Multiline = true; - this.txtgreensblue.Name = "txtgreensblue"; - this.txtgreensblue.Size = new System.Drawing.Size(23, 17); - this.txtgreensblue.TabIndex = 23; - this.txtgreensblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // pnlgreencustomcolour - // - this.pnlgreencustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreencustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlgreencustomcolour.Name = "pnlgreencustomcolour"; - this.pnlgreencustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlgreencustomcolour.TabIndex = 18; - this.pnlgreencustomcolour.Visible = false; - // - // pnlgreen16 - // - this.pnlgreen16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen16.Location = new System.Drawing.Point(259, 25); - this.pnlgreen16.Name = "pnlgreen16"; - this.pnlgreen16.Size = new System.Drawing.Size(20, 13); - this.pnlgreen16.TabIndex = 17; - this.pnlgreen16.Visible = false; - // - // pnlgreen12 - // - this.pnlgreen12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen12.Location = new System.Drawing.Point(155, 25); - this.pnlgreen12.Name = "pnlgreen12"; - this.pnlgreen12.Size = new System.Drawing.Size(20, 13); - this.pnlgreen12.TabIndex = 9; - this.pnlgreen12.Visible = false; - // - // pnlgreen14 - // - this.pnlgreen14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen14.Location = new System.Drawing.Point(207, 25); - this.pnlgreen14.Name = "pnlgreen14"; - this.pnlgreen14.Size = new System.Drawing.Size(20, 13); - this.pnlgreen14.TabIndex = 13; - this.pnlgreen14.Visible = false; - // - // pnlgreen10 - // - this.pnlgreen10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen10.Location = new System.Drawing.Point(103, 25); - this.pnlgreen10.Name = "pnlgreen10"; - this.pnlgreen10.Size = new System.Drawing.Size(20, 13); - this.pnlgreen10.TabIndex = 5; - this.pnlgreen10.Visible = false; - // - // pnlgreen8 - // - this.pnlgreen8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen8.Location = new System.Drawing.Point(259, 8); - this.pnlgreen8.Name = "pnlgreen8"; - this.pnlgreen8.Size = new System.Drawing.Size(20, 13); - this.pnlgreen8.TabIndex = 16; - this.pnlgreen8.Visible = false; - // - // pnlgreen4 - // - this.pnlgreen4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen4.Location = new System.Drawing.Point(155, 8); - this.pnlgreen4.Name = "pnlgreen4"; - this.pnlgreen4.Size = new System.Drawing.Size(20, 13); - this.pnlgreen4.TabIndex = 8; - this.pnlgreen4.Visible = false; - // - // pnlgreen6 - // - this.pnlgreen6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen6.Location = new System.Drawing.Point(207, 8); - this.pnlgreen6.Name = "pnlgreen6"; - this.pnlgreen6.Size = new System.Drawing.Size(20, 13); - this.pnlgreen6.TabIndex = 12; - this.pnlgreen6.Visible = false; - // - // pnlgreen15 - // - this.pnlgreen15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen15.Location = new System.Drawing.Point(233, 25); - this.pnlgreen15.Name = "pnlgreen15"; - this.pnlgreen15.Size = new System.Drawing.Size(20, 13); - this.pnlgreen15.TabIndex = 15; - this.pnlgreen15.Visible = false; - // - // pnlgreen2 - // - this.pnlgreen2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen2.Location = new System.Drawing.Point(103, 8); - this.pnlgreen2.Name = "pnlgreen2"; - this.pnlgreen2.Size = new System.Drawing.Size(20, 13); - this.pnlgreen2.TabIndex = 4; - this.pnlgreen2.Visible = false; - // - // pnlgreen13 - // - this.pnlgreen13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen13.Location = new System.Drawing.Point(181, 25); - this.pnlgreen13.Name = "pnlgreen13"; - this.pnlgreen13.Size = new System.Drawing.Size(20, 13); - this.pnlgreen13.TabIndex = 11; - this.pnlgreen13.Visible = false; - // - // pnlgreen11 - // - this.pnlgreen11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen11.Location = new System.Drawing.Point(129, 25); - this.pnlgreen11.Name = "pnlgreen11"; - this.pnlgreen11.Size = new System.Drawing.Size(20, 13); - this.pnlgreen11.TabIndex = 7; - this.pnlgreen11.Visible = false; - // - // pnlgreen7 - // - this.pnlgreen7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen7.Location = new System.Drawing.Point(233, 8); - this.pnlgreen7.Name = "pnlgreen7"; - this.pnlgreen7.Size = new System.Drawing.Size(20, 13); - this.pnlgreen7.TabIndex = 14; - this.pnlgreen7.Visible = false; - // - // pnlgreen9 - // - this.pnlgreen9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen9.Location = new System.Drawing.Point(77, 25); - this.pnlgreen9.Name = "pnlgreen9"; - this.pnlgreen9.Size = new System.Drawing.Size(20, 13); - this.pnlgreen9.TabIndex = 3; - this.pnlgreen9.Visible = false; - // - // pnlgreen5 - // - this.pnlgreen5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen5.Location = new System.Drawing.Point(181, 8); - this.pnlgreen5.Name = "pnlgreen5"; - this.pnlgreen5.Size = new System.Drawing.Size(20, 13); - this.pnlgreen5.TabIndex = 10; - this.pnlgreen5.Visible = false; - // - // pnlgreen3 - // - this.pnlgreen3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen3.Location = new System.Drawing.Point(129, 8); - this.pnlgreen3.Name = "pnlgreen3"; - this.pnlgreen3.Size = new System.Drawing.Size(20, 13); - this.pnlgreen3.TabIndex = 6; - this.pnlgreen3.Visible = false; - // - // pnlgreen1 - // - this.pnlgreen1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgreen1.Location = new System.Drawing.Point(77, 8); - this.pnlgreen1.Name = "pnlgreen1"; - this.pnlgreen1.Size = new System.Drawing.Size(20, 13); - this.pnlgreen1.TabIndex = 2; - this.pnlgreen1.Visible = false; - // - // lblgreenlevel - // - this.lblgreenlevel.AutoSize = true; - this.lblgreenlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblgreenlevel.Location = new System.Drawing.Point(5, 25); - this.lblgreenlevel.Name = "lblgreenlevel"; - this.lblgreenlevel.Size = new System.Drawing.Size(49, 15); - this.lblgreenlevel.TabIndex = 1; - this.lblgreenlevel.Text = "Level: 4"; - // - // Label9 - // - this.Label9.AutoSize = true; - this.Label9.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label9.Location = new System.Drawing.Point(3, 2); - this.Label9.Name = "Label9"; - this.Label9.Size = new System.Drawing.Size(60, 22); - this.Label9.TabIndex = 0; - this.Label9.Text = "Green"; - // - // pnlbluecolours - // - this.pnlbluecolours.BackColor = System.Drawing.Color.White; - this.pnlbluecolours.Controls.Add(this.pnlblueoptions); - this.pnlbluecolours.Controls.Add(this.pnlbluecustomcolour); - this.pnlbluecolours.Controls.Add(this.pnlblue16); - this.pnlbluecolours.Controls.Add(this.pnlblue12); - this.pnlbluecolours.Controls.Add(this.pnlblue14); - this.pnlbluecolours.Controls.Add(this.pnlblue10); - this.pnlbluecolours.Controls.Add(this.pnlblue8); - this.pnlbluecolours.Controls.Add(this.pnlblue4); - this.pnlbluecolours.Controls.Add(this.pnlblue6); - this.pnlbluecolours.Controls.Add(this.pnlblue15); - this.pnlbluecolours.Controls.Add(this.pnlblue2); - this.pnlbluecolours.Controls.Add(this.pnlblue13); - this.pnlbluecolours.Controls.Add(this.pnlblue11); - this.pnlbluecolours.Controls.Add(this.pnlblue7); - this.pnlbluecolours.Controls.Add(this.pnlblue9); - this.pnlbluecolours.Controls.Add(this.pnlblue5); - this.pnlbluecolours.Controls.Add(this.pnlblue3); - this.pnlbluecolours.Controls.Add(this.pnlblue1); - this.pnlbluecolours.Controls.Add(this.lblbluelevel); - this.pnlbluecolours.Controls.Add(this.Label7); - this.pnlbluecolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlbluecolours.Location = new System.Drawing.Point(0, 245); - this.pnlbluecolours.Name = "pnlbluecolours"; - this.pnlbluecolours.Size = new System.Drawing.Size(447, 46); - this.pnlbluecolours.TabIndex = 4; - this.pnlbluecolours.Visible = false; - // - // pnlblueoptions - // - this.pnlblueoptions.Controls.Add(this.Label6); - this.pnlblueoptions.Controls.Add(this.txtbluesred); - this.pnlblueoptions.Controls.Add(this.txtbluesblue); - this.pnlblueoptions.Controls.Add(this.Label4); - this.pnlblueoptions.Controls.Add(this.Label2); - this.pnlblueoptions.Controls.Add(this.txtbluesgreen); - this.pnlblueoptions.Location = new System.Drawing.Point(282, 3); - this.pnlblueoptions.Name = "pnlblueoptions"; - this.pnlblueoptions.Size = new System.Drawing.Size(120, 40); - this.pnlblueoptions.TabIndex = 27; - this.pnlblueoptions.Visible = false; - // - // Label6 - // - this.Label6.AutoSize = true; - this.Label6.BackColor = System.Drawing.Color.Transparent; - this.Label6.Location = new System.Drawing.Point(65, 24); - this.Label6.Name = "Label6"; - this.Label6.Size = new System.Drawing.Size(30, 13); - this.Label6.TabIndex = 26; - this.Label6.Text = "Red:"; - // - // txtbluesred - // - this.txtbluesred.BackColor = System.Drawing.Color.White; - this.txtbluesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtbluesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbluesred.Location = new System.Drawing.Point(95, 22); - this.txtbluesred.Multiline = true; - this.txtbluesred.Name = "txtbluesred"; - this.txtbluesred.Size = new System.Drawing.Size(23, 17); - this.txtbluesred.TabIndex = 25; - this.txtbluesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // txtbluesblue - // - this.txtbluesblue.BackColor = System.Drawing.Color.White; - this.txtbluesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtbluesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbluesblue.Location = new System.Drawing.Point(65, 2); - this.txtbluesblue.Multiline = true; - this.txtbluesblue.Name = "txtbluesblue"; - this.txtbluesblue.Size = new System.Drawing.Size(23, 17); - this.txtbluesblue.TabIndex = 21; - this.txtbluesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // Label4 - // - this.Label4.AutoSize = true; - this.Label4.BackColor = System.Drawing.Color.Transparent; - this.Label4.Location = new System.Drawing.Point(2, 23); - this.Label4.Name = "Label4"; - this.Label4.Size = new System.Drawing.Size(39, 13); - this.Label4.TabIndex = 24; - this.Label4.Text = "Green:"; - // - // Label2 - // - this.Label2.AutoSize = true; - this.Label2.BackColor = System.Drawing.Color.Transparent; - this.Label2.Location = new System.Drawing.Point(33, 4); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(31, 13); - this.Label2.TabIndex = 22; - this.Label2.Text = "Blue:"; - // - // txtbluesgreen - // - this.txtbluesgreen.BackColor = System.Drawing.Color.White; - this.txtbluesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtbluesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbluesgreen.Location = new System.Drawing.Point(41, 22); - this.txtbluesgreen.Multiline = true; - this.txtbluesgreen.Name = "txtbluesgreen"; - this.txtbluesgreen.Size = new System.Drawing.Size(23, 17); - this.txtbluesgreen.TabIndex = 23; - this.txtbluesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // pnlbluecustomcolour - // - this.pnlbluecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbluecustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlbluecustomcolour.Name = "pnlbluecustomcolour"; - this.pnlbluecustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlbluecustomcolour.TabIndex = 18; - this.pnlbluecustomcolour.Visible = false; - // - // pnlblue16 - // - this.pnlblue16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue16.Location = new System.Drawing.Point(259, 25); - this.pnlblue16.Name = "pnlblue16"; - this.pnlblue16.Size = new System.Drawing.Size(20, 13); - this.pnlblue16.TabIndex = 17; - this.pnlblue16.Visible = false; - // - // pnlblue12 - // - this.pnlblue12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue12.Location = new System.Drawing.Point(155, 25); - this.pnlblue12.Name = "pnlblue12"; - this.pnlblue12.Size = new System.Drawing.Size(20, 13); - this.pnlblue12.TabIndex = 9; - this.pnlblue12.Visible = false; - // - // pnlblue14 - // - this.pnlblue14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue14.Location = new System.Drawing.Point(207, 25); - this.pnlblue14.Name = "pnlblue14"; - this.pnlblue14.Size = new System.Drawing.Size(20, 13); - this.pnlblue14.TabIndex = 13; - this.pnlblue14.Visible = false; - // - // pnlblue10 - // - this.pnlblue10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue10.Location = new System.Drawing.Point(103, 25); - this.pnlblue10.Name = "pnlblue10"; - this.pnlblue10.Size = new System.Drawing.Size(20, 13); - this.pnlblue10.TabIndex = 5; - this.pnlblue10.Visible = false; - // - // pnlblue8 - // - this.pnlblue8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue8.Location = new System.Drawing.Point(259, 8); - this.pnlblue8.Name = "pnlblue8"; - this.pnlblue8.Size = new System.Drawing.Size(20, 13); - this.pnlblue8.TabIndex = 16; - this.pnlblue8.Visible = false; - // - // pnlblue4 - // - this.pnlblue4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue4.Location = new System.Drawing.Point(155, 8); - this.pnlblue4.Name = "pnlblue4"; - this.pnlblue4.Size = new System.Drawing.Size(20, 13); - this.pnlblue4.TabIndex = 8; - this.pnlblue4.Visible = false; - // - // pnlblue6 - // - this.pnlblue6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue6.Location = new System.Drawing.Point(207, 8); - this.pnlblue6.Name = "pnlblue6"; - this.pnlblue6.Size = new System.Drawing.Size(20, 13); - this.pnlblue6.TabIndex = 12; - this.pnlblue6.Visible = false; - // - // pnlblue15 - // - this.pnlblue15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue15.Location = new System.Drawing.Point(233, 25); - this.pnlblue15.Name = "pnlblue15"; - this.pnlblue15.Size = new System.Drawing.Size(20, 13); - this.pnlblue15.TabIndex = 15; - this.pnlblue15.Visible = false; - // - // pnlblue2 - // - this.pnlblue2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue2.Location = new System.Drawing.Point(103, 8); - this.pnlblue2.Name = "pnlblue2"; - this.pnlblue2.Size = new System.Drawing.Size(20, 13); - this.pnlblue2.TabIndex = 4; - this.pnlblue2.Visible = false; - // - // pnlblue13 - // - this.pnlblue13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue13.Location = new System.Drawing.Point(181, 25); - this.pnlblue13.Name = "pnlblue13"; - this.pnlblue13.Size = new System.Drawing.Size(20, 13); - this.pnlblue13.TabIndex = 11; - this.pnlblue13.Visible = false; - // - // pnlblue11 - // - this.pnlblue11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue11.Location = new System.Drawing.Point(129, 25); - this.pnlblue11.Name = "pnlblue11"; - this.pnlblue11.Size = new System.Drawing.Size(20, 13); - this.pnlblue11.TabIndex = 7; - this.pnlblue11.Visible = false; - // - // pnlblue7 - // - this.pnlblue7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue7.Location = new System.Drawing.Point(233, 8); - this.pnlblue7.Name = "pnlblue7"; - this.pnlblue7.Size = new System.Drawing.Size(20, 13); - this.pnlblue7.TabIndex = 14; - this.pnlblue7.Visible = false; - // - // pnlblue9 - // - this.pnlblue9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue9.Location = new System.Drawing.Point(77, 25); - this.pnlblue9.Name = "pnlblue9"; - this.pnlblue9.Size = new System.Drawing.Size(20, 13); - this.pnlblue9.TabIndex = 3; - this.pnlblue9.Visible = false; - // - // pnlblue5 - // - this.pnlblue5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue5.Location = new System.Drawing.Point(181, 8); - this.pnlblue5.Name = "pnlblue5"; - this.pnlblue5.Size = new System.Drawing.Size(20, 13); - this.pnlblue5.TabIndex = 10; - this.pnlblue5.Visible = false; - // - // pnlblue3 - // - this.pnlblue3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue3.Location = new System.Drawing.Point(129, 8); - this.pnlblue3.Name = "pnlblue3"; - this.pnlblue3.Size = new System.Drawing.Size(20, 13); - this.pnlblue3.TabIndex = 6; - this.pnlblue3.Visible = false; - // - // pnlblue1 - // - this.pnlblue1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlblue1.Location = new System.Drawing.Point(77, 8); - this.pnlblue1.Name = "pnlblue1"; - this.pnlblue1.Size = new System.Drawing.Size(20, 13); - this.pnlblue1.TabIndex = 2; - this.pnlblue1.Visible = false; - // - // lblbluelevel - // - this.lblbluelevel.AutoSize = true; - this.lblbluelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblbluelevel.Location = new System.Drawing.Point(5, 25); - this.lblbluelevel.Name = "lblbluelevel"; - this.lblbluelevel.Size = new System.Drawing.Size(49, 15); - this.lblbluelevel.TabIndex = 1; - this.lblbluelevel.Text = "Level: 4"; - // - // Label7 - // - this.Label7.AutoSize = true; - this.Label7.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label7.Location = new System.Drawing.Point(3, 2); - this.Label7.Name = "Label7"; - this.Label7.Size = new System.Drawing.Size(48, 22); - this.Label7.TabIndex = 0; - this.Label7.Text = "Blue"; - // - // pnlpurplecolours - // - this.pnlpurplecolours.BackColor = System.Drawing.Color.White; - this.pnlpurplecolours.Controls.Add(this.pnlpurpleoptions); - this.pnlpurplecolours.Controls.Add(this.pnlpurplecustomcolour); - this.pnlpurplecolours.Controls.Add(this.pnlpurple16); - this.pnlpurplecolours.Controls.Add(this.pnlpurple12); - this.pnlpurplecolours.Controls.Add(this.pnlpurple14); - this.pnlpurplecolours.Controls.Add(this.pnlpurple10); - this.pnlpurplecolours.Controls.Add(this.pnlpurple8); - this.pnlpurplecolours.Controls.Add(this.pnlpurple4); - this.pnlpurplecolours.Controls.Add(this.pnlpurple6); - this.pnlpurplecolours.Controls.Add(this.pnlpurple15); - this.pnlpurplecolours.Controls.Add(this.pnlpurple2); - this.pnlpurplecolours.Controls.Add(this.pnlpurple13); - this.pnlpurplecolours.Controls.Add(this.pnlpurple11); - this.pnlpurplecolours.Controls.Add(this.pnlpurple7); - this.pnlpurplecolours.Controls.Add(this.pnlpurple9); - this.pnlpurplecolours.Controls.Add(this.pnlpurple5); - this.pnlpurplecolours.Controls.Add(this.pnlpurple3); - this.pnlpurplecolours.Controls.Add(this.pnlpurple1); - this.pnlpurplecolours.Controls.Add(this.lblpurplelevel); - this.pnlpurplecolours.Controls.Add(this.Label5); - this.pnlpurplecolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlpurplecolours.Location = new System.Drawing.Point(0, 199); - this.pnlpurplecolours.Name = "pnlpurplecolours"; - this.pnlpurplecolours.Size = new System.Drawing.Size(447, 46); - this.pnlpurplecolours.TabIndex = 3; - this.pnlpurplecolours.Visible = false; - // - // pnlpurpleoptions - // - this.pnlpurpleoptions.Controls.Add(this.Label8); - this.pnlpurpleoptions.Controls.Add(this.txtpurplesgreen); - this.pnlpurpleoptions.Controls.Add(this.txtpurplesblue); - this.pnlpurpleoptions.Controls.Add(this.Label10); - this.pnlpurpleoptions.Controls.Add(this.Label12); - this.pnlpurpleoptions.Controls.Add(this.txtpurplesred); - this.pnlpurpleoptions.Location = new System.Drawing.Point(282, 3); - this.pnlpurpleoptions.Name = "pnlpurpleoptions"; - this.pnlpurpleoptions.Size = new System.Drawing.Size(120, 40); - this.pnlpurpleoptions.TabIndex = 28; - this.pnlpurpleoptions.Visible = false; - // - // Label8 - // - this.Label8.AutoSize = true; - this.Label8.BackColor = System.Drawing.Color.Transparent; - this.Label8.Location = new System.Drawing.Point(56, 24); - this.Label8.Name = "Label8"; - this.Label8.Size = new System.Drawing.Size(39, 13); - this.Label8.TabIndex = 26; - this.Label8.Text = "Green:"; - // - // txtpurplesgreen - // - this.txtpurplesgreen.BackColor = System.Drawing.Color.White; - this.txtpurplesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpurplesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpurplesgreen.Location = new System.Drawing.Point(95, 22); - this.txtpurplesgreen.Multiline = true; - this.txtpurplesgreen.Name = "txtpurplesgreen"; - this.txtpurplesgreen.Size = new System.Drawing.Size(23, 17); - this.txtpurplesgreen.TabIndex = 25; - this.txtpurplesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // txtpurplesblue - // - this.txtpurplesblue.BackColor = System.Drawing.Color.White; - this.txtpurplesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpurplesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpurplesblue.Location = new System.Drawing.Point(65, 2); - this.txtpurplesblue.Multiline = true; - this.txtpurplesblue.Name = "txtpurplesblue"; - this.txtpurplesblue.Size = new System.Drawing.Size(23, 17); - this.txtpurplesblue.TabIndex = 21; - this.txtpurplesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // Label10 - // - this.Label10.AutoSize = true; - this.Label10.BackColor = System.Drawing.Color.Transparent; - this.Label10.Location = new System.Drawing.Point(2, 23); - this.Label10.Name = "Label10"; - this.Label10.Size = new System.Drawing.Size(30, 13); - this.Label10.TabIndex = 24; - this.Label10.Text = "Red:"; - // - // Label12 - // - this.Label12.AutoSize = true; - this.Label12.BackColor = System.Drawing.Color.Transparent; - this.Label12.Location = new System.Drawing.Point(33, 4); - this.Label12.Name = "Label12"; - this.Label12.Size = new System.Drawing.Size(31, 13); - this.Label12.TabIndex = 22; - this.Label12.Text = "Blue:"; - // - // txtpurplesred - // - this.txtpurplesred.BackColor = System.Drawing.Color.White; - this.txtpurplesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpurplesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpurplesred.Location = new System.Drawing.Point(32, 22); - this.txtpurplesred.Multiline = true; - this.txtpurplesred.Name = "txtpurplesred"; - this.txtpurplesred.Size = new System.Drawing.Size(23, 17); - this.txtpurplesred.TabIndex = 23; - this.txtpurplesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // pnlpurplecustomcolour - // - this.pnlpurplecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurplecustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlpurplecustomcolour.Name = "pnlpurplecustomcolour"; - this.pnlpurplecustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlpurplecustomcolour.TabIndex = 18; - this.pnlpurplecustomcolour.Visible = false; - // - // pnlpurple16 - // - this.pnlpurple16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple16.Location = new System.Drawing.Point(259, 25); - this.pnlpurple16.Name = "pnlpurple16"; - this.pnlpurple16.Size = new System.Drawing.Size(20, 13); - this.pnlpurple16.TabIndex = 17; - this.pnlpurple16.Visible = false; - // - // pnlpurple12 - // - this.pnlpurple12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple12.Location = new System.Drawing.Point(155, 25); - this.pnlpurple12.Name = "pnlpurple12"; - this.pnlpurple12.Size = new System.Drawing.Size(20, 13); - this.pnlpurple12.TabIndex = 9; - this.pnlpurple12.Visible = false; - // - // pnlpurple14 - // - this.pnlpurple14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple14.Location = new System.Drawing.Point(207, 25); - this.pnlpurple14.Name = "pnlpurple14"; - this.pnlpurple14.Size = new System.Drawing.Size(20, 13); - this.pnlpurple14.TabIndex = 13; - this.pnlpurple14.Visible = false; - // - // pnlpurple10 - // - this.pnlpurple10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple10.Location = new System.Drawing.Point(103, 25); - this.pnlpurple10.Name = "pnlpurple10"; - this.pnlpurple10.Size = new System.Drawing.Size(20, 13); - this.pnlpurple10.TabIndex = 5; - this.pnlpurple10.Visible = false; - // - // pnlpurple8 - // - this.pnlpurple8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple8.Location = new System.Drawing.Point(259, 8); - this.pnlpurple8.Name = "pnlpurple8"; - this.pnlpurple8.Size = new System.Drawing.Size(20, 13); - this.pnlpurple8.TabIndex = 16; - this.pnlpurple8.Visible = false; - // - // pnlpurple4 - // - this.pnlpurple4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple4.Location = new System.Drawing.Point(155, 8); - this.pnlpurple4.Name = "pnlpurple4"; - this.pnlpurple4.Size = new System.Drawing.Size(20, 13); - this.pnlpurple4.TabIndex = 8; - this.pnlpurple4.Visible = false; - // - // pnlpurple6 - // - this.pnlpurple6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple6.Location = new System.Drawing.Point(207, 8); - this.pnlpurple6.Name = "pnlpurple6"; - this.pnlpurple6.Size = new System.Drawing.Size(20, 13); - this.pnlpurple6.TabIndex = 12; - this.pnlpurple6.Visible = false; - // - // pnlpurple15 - // - this.pnlpurple15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple15.Location = new System.Drawing.Point(233, 25); - this.pnlpurple15.Name = "pnlpurple15"; - this.pnlpurple15.Size = new System.Drawing.Size(20, 13); - this.pnlpurple15.TabIndex = 15; - this.pnlpurple15.Visible = false; - // - // pnlpurple2 - // - this.pnlpurple2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple2.Location = new System.Drawing.Point(103, 8); - this.pnlpurple2.Name = "pnlpurple2"; - this.pnlpurple2.Size = new System.Drawing.Size(20, 13); - this.pnlpurple2.TabIndex = 4; - this.pnlpurple2.Visible = false; - // - // pnlpurple13 - // - this.pnlpurple13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple13.Location = new System.Drawing.Point(181, 25); - this.pnlpurple13.Name = "pnlpurple13"; - this.pnlpurple13.Size = new System.Drawing.Size(20, 13); - this.pnlpurple13.TabIndex = 11; - this.pnlpurple13.Visible = false; - // - // pnlpurple11 - // - this.pnlpurple11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple11.Location = new System.Drawing.Point(129, 25); - this.pnlpurple11.Name = "pnlpurple11"; - this.pnlpurple11.Size = new System.Drawing.Size(20, 13); - this.pnlpurple11.TabIndex = 7; - this.pnlpurple11.Visible = false; - // - // pnlpurple7 - // - this.pnlpurple7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple7.Location = new System.Drawing.Point(233, 8); - this.pnlpurple7.Name = "pnlpurple7"; - this.pnlpurple7.Size = new System.Drawing.Size(20, 13); - this.pnlpurple7.TabIndex = 14; - this.pnlpurple7.Visible = false; - // - // pnlpurple9 - // - this.pnlpurple9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple9.Location = new System.Drawing.Point(77, 25); - this.pnlpurple9.Name = "pnlpurple9"; - this.pnlpurple9.Size = new System.Drawing.Size(20, 13); - this.pnlpurple9.TabIndex = 3; - this.pnlpurple9.Visible = false; - // - // pnlpurple5 - // - this.pnlpurple5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple5.Location = new System.Drawing.Point(181, 8); - this.pnlpurple5.Name = "pnlpurple5"; - this.pnlpurple5.Size = new System.Drawing.Size(20, 13); - this.pnlpurple5.TabIndex = 10; - this.pnlpurple5.Visible = false; - // - // pnlpurple3 - // - this.pnlpurple3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple3.Location = new System.Drawing.Point(129, 8); - this.pnlpurple3.Name = "pnlpurple3"; - this.pnlpurple3.Size = new System.Drawing.Size(20, 13); - this.pnlpurple3.TabIndex = 6; - this.pnlpurple3.Visible = false; - // - // pnlpurple1 - // - this.pnlpurple1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpurple1.Location = new System.Drawing.Point(77, 8); - this.pnlpurple1.Name = "pnlpurple1"; - this.pnlpurple1.Size = new System.Drawing.Size(20, 13); - this.pnlpurple1.TabIndex = 2; - this.pnlpurple1.Visible = false; - // - // lblpurplelevel - // - this.lblpurplelevel.AutoSize = true; - this.lblpurplelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblpurplelevel.Location = new System.Drawing.Point(5, 25); - this.lblpurplelevel.Name = "lblpurplelevel"; - this.lblpurplelevel.Size = new System.Drawing.Size(49, 15); - this.lblpurplelevel.TabIndex = 1; - this.lblpurplelevel.Text = "Level: 4"; - // - // Label5 - // - this.Label5.AutoSize = true; - this.Label5.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label5.Location = new System.Drawing.Point(3, 2); - this.Label5.Name = "Label5"; - this.Label5.Size = new System.Drawing.Size(67, 22); - this.Label5.TabIndex = 0; - this.Label5.Text = "Purple"; - // - // pnlgraycolours - // - this.pnlgraycolours.BackColor = System.Drawing.Color.White; - this.pnlgraycolours.Controls.Add(this.lblcustomshadetut); - this.pnlgraycolours.Controls.Add(this.txtcustomgrayshade); - this.pnlgraycolours.Controls.Add(this.pnlgraycustomcolour); - this.pnlgraycolours.Controls.Add(this.pnlgray16); - this.pnlgraycolours.Controls.Add(this.pnlgray12); - this.pnlgraycolours.Controls.Add(this.pnlgray14); - this.pnlgraycolours.Controls.Add(this.pnlgray10); - this.pnlgraycolours.Controls.Add(this.pnlgray8); - this.pnlgraycolours.Controls.Add(this.pnlgray4); - this.pnlgraycolours.Controls.Add(this.pnlgray6); - this.pnlgraycolours.Controls.Add(this.pnlgray15); - this.pnlgraycolours.Controls.Add(this.pnlgray2); - this.pnlgraycolours.Controls.Add(this.pnlgray13); - this.pnlgraycolours.Controls.Add(this.pnlgray11); - this.pnlgraycolours.Controls.Add(this.pnlgray7); - this.pnlgraycolours.Controls.Add(this.pnlgray9); - this.pnlgraycolours.Controls.Add(this.pnlgray5); - this.pnlgraycolours.Controls.Add(this.pnlgray3); - this.pnlgraycolours.Controls.Add(this.pnlgray1); - this.pnlgraycolours.Controls.Add(this.lblgraylevel); - this.pnlgraycolours.Controls.Add(this.Label3); - this.pnlgraycolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlgraycolours.Location = new System.Drawing.Point(0, 153); - this.pnlgraycolours.Name = "pnlgraycolours"; - this.pnlgraycolours.Size = new System.Drawing.Size(447, 46); - this.pnlgraycolours.TabIndex = 2; - this.pnlgraycolours.Visible = false; - // - // lblcustomshadetut - // - this.lblcustomshadetut.AutoSize = true; - this.lblcustomshadetut.BackColor = System.Drawing.Color.Transparent; - this.lblcustomshadetut.Location = new System.Drawing.Point(290, 5); - this.lblcustomshadetut.Name = "lblcustomshadetut"; - this.lblcustomshadetut.Size = new System.Drawing.Size(102, 13); - this.lblcustomshadetut.TabIndex = 20; - this.lblcustomshadetut.Text = "Enter Shade (0-255)"; - this.lblcustomshadetut.Visible = false; - // - // txtcustomgrayshade - // - this.txtcustomgrayshade.BackColor = System.Drawing.Color.White; - this.txtcustomgrayshade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtcustomgrayshade.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtcustomgrayshade.Location = new System.Drawing.Point(317, 20); - this.txtcustomgrayshade.Multiline = true; - this.txtcustomgrayshade.Name = "txtcustomgrayshade"; - this.txtcustomgrayshade.Size = new System.Drawing.Size(45, 17); - this.txtcustomgrayshade.TabIndex = 19; - this.txtcustomgrayshade.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtcustomgrayshade.Visible = false; - this.txtcustomgrayshade.TextChanged += new System.EventHandler(this.txtcustomgrayshade_TextChanged); - // - // pnlgraycustomcolour - // - this.pnlgraycustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgraycustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlgraycustomcolour.Name = "pnlgraycustomcolour"; - this.pnlgraycustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlgraycustomcolour.TabIndex = 18; - this.pnlgraycustomcolour.Visible = false; - // - // pnlgray16 - // - this.pnlgray16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray16.Location = new System.Drawing.Point(259, 25); - this.pnlgray16.Name = "pnlgray16"; - this.pnlgray16.Size = new System.Drawing.Size(20, 13); - this.pnlgray16.TabIndex = 17; - this.pnlgray16.Visible = false; - // - // pnlgray12 - // - this.pnlgray12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray12.Location = new System.Drawing.Point(155, 25); - this.pnlgray12.Name = "pnlgray12"; - this.pnlgray12.Size = new System.Drawing.Size(20, 13); - this.pnlgray12.TabIndex = 9; - this.pnlgray12.Visible = false; - // - // pnlgray14 - // - this.pnlgray14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray14.Location = new System.Drawing.Point(207, 25); - this.pnlgray14.Name = "pnlgray14"; - this.pnlgray14.Size = new System.Drawing.Size(20, 13); - this.pnlgray14.TabIndex = 13; - this.pnlgray14.Visible = false; - // - // pnlgray10 - // - this.pnlgray10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray10.Location = new System.Drawing.Point(103, 25); - this.pnlgray10.Name = "pnlgray10"; - this.pnlgray10.Size = new System.Drawing.Size(20, 13); - this.pnlgray10.TabIndex = 5; - this.pnlgray10.Visible = false; - // - // pnlgray8 - // - this.pnlgray8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray8.Location = new System.Drawing.Point(259, 8); - this.pnlgray8.Name = "pnlgray8"; - this.pnlgray8.Size = new System.Drawing.Size(20, 13); - this.pnlgray8.TabIndex = 16; - this.pnlgray8.Visible = false; - // - // pnlgray4 - // - this.pnlgray4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray4.Location = new System.Drawing.Point(155, 8); - this.pnlgray4.Name = "pnlgray4"; - this.pnlgray4.Size = new System.Drawing.Size(20, 13); - this.pnlgray4.TabIndex = 8; - this.pnlgray4.Visible = false; - // - // pnlgray6 - // - this.pnlgray6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray6.Location = new System.Drawing.Point(207, 8); - this.pnlgray6.Name = "pnlgray6"; - this.pnlgray6.Size = new System.Drawing.Size(20, 13); - this.pnlgray6.TabIndex = 12; - this.pnlgray6.Visible = false; - // - // pnlgray15 - // - this.pnlgray15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray15.Location = new System.Drawing.Point(233, 25); - this.pnlgray15.Name = "pnlgray15"; - this.pnlgray15.Size = new System.Drawing.Size(20, 13); - this.pnlgray15.TabIndex = 15; - this.pnlgray15.Visible = false; - // - // pnlgray2 - // - this.pnlgray2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray2.Location = new System.Drawing.Point(103, 8); - this.pnlgray2.Name = "pnlgray2"; - this.pnlgray2.Size = new System.Drawing.Size(20, 13); - this.pnlgray2.TabIndex = 4; - this.pnlgray2.Visible = false; - // - // pnlgray13 - // - this.pnlgray13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray13.Location = new System.Drawing.Point(181, 25); - this.pnlgray13.Name = "pnlgray13"; - this.pnlgray13.Size = new System.Drawing.Size(20, 13); - this.pnlgray13.TabIndex = 11; - this.pnlgray13.Visible = false; - // - // pnlgray11 - // - this.pnlgray11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray11.Location = new System.Drawing.Point(129, 25); - this.pnlgray11.Name = "pnlgray11"; - this.pnlgray11.Size = new System.Drawing.Size(20, 13); - this.pnlgray11.TabIndex = 7; - this.pnlgray11.Visible = false; - // - // pnlgray7 - // - this.pnlgray7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray7.Location = new System.Drawing.Point(233, 8); - this.pnlgray7.Name = "pnlgray7"; - this.pnlgray7.Size = new System.Drawing.Size(20, 13); - this.pnlgray7.TabIndex = 14; - this.pnlgray7.Visible = false; - // - // pnlgray9 - // - this.pnlgray9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray9.Location = new System.Drawing.Point(77, 25); - this.pnlgray9.Name = "pnlgray9"; - this.pnlgray9.Size = new System.Drawing.Size(20, 13); - this.pnlgray9.TabIndex = 3; - this.pnlgray9.Visible = false; - // - // pnlgray5 - // - this.pnlgray5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray5.Location = new System.Drawing.Point(181, 8); - this.pnlgray5.Name = "pnlgray5"; - this.pnlgray5.Size = new System.Drawing.Size(20, 13); - this.pnlgray5.TabIndex = 10; - this.pnlgray5.Visible = false; - // - // pnlgray3 - // - this.pnlgray3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray3.Location = new System.Drawing.Point(129, 8); - this.pnlgray3.Name = "pnlgray3"; - this.pnlgray3.Size = new System.Drawing.Size(20, 13); - this.pnlgray3.TabIndex = 6; - this.pnlgray3.Visible = false; - // - // pnlgray1 - // - this.pnlgray1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlgray1.Location = new System.Drawing.Point(77, 8); - this.pnlgray1.Name = "pnlgray1"; - this.pnlgray1.Size = new System.Drawing.Size(20, 13); - this.pnlgray1.TabIndex = 2; - this.pnlgray1.Visible = false; - // - // lblgraylevel - // - this.lblgraylevel.AutoSize = true; - this.lblgraylevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblgraylevel.Location = new System.Drawing.Point(5, 25); - this.lblgraylevel.Name = "lblgraylevel"; - this.lblgraylevel.Size = new System.Drawing.Size(49, 15); - this.lblgraylevel.TabIndex = 1; - this.lblgraylevel.Text = "Level: 4"; - // - // Label3 - // - this.Label3.AutoSize = true; - this.Label3.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label3.Location = new System.Drawing.Point(3, 2); - this.Label3.Name = "Label3"; - this.Label3.Size = new System.Drawing.Size(52, 22); - this.Label3.TabIndex = 0; - this.Label3.Text = "Gray"; - // - // pnlanycolours - // - this.pnlanycolours.BackColor = System.Drawing.Color.White; - this.pnlanycolours.Controls.Add(this.pnlanyoptions); - this.pnlanycolours.Controls.Add(this.pnlanycustomcolour); - this.pnlanycolours.Controls.Add(this.pnlany16); - this.pnlanycolours.Controls.Add(this.pnlany12); - this.pnlanycolours.Controls.Add(this.pnlany14); - this.pnlanycolours.Controls.Add(this.pnlany10); - this.pnlanycolours.Controls.Add(this.pnlany8); - this.pnlanycolours.Controls.Add(this.pnlany4); - this.pnlanycolours.Controls.Add(this.pnlany6); - this.pnlanycolours.Controls.Add(this.pnlany15); - this.pnlanycolours.Controls.Add(this.pnlany2); - this.pnlanycolours.Controls.Add(this.pnlany13); - this.pnlanycolours.Controls.Add(this.pnlany11); - this.pnlanycolours.Controls.Add(this.pnlany7); - this.pnlanycolours.Controls.Add(this.pnlany9); - this.pnlanycolours.Controls.Add(this.pnlany5); - this.pnlanycolours.Controls.Add(this.pnlany3); - this.pnlanycolours.Controls.Add(this.pnlany1); - this.pnlanycolours.Controls.Add(this.lblanylevel); - this.pnlanycolours.Controls.Add(this.Label1); - this.pnlanycolours.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlanycolours.Location = new System.Drawing.Point(0, 107); - this.pnlanycolours.Name = "pnlanycolours"; - this.pnlanycolours.Size = new System.Drawing.Size(447, 46); - this.pnlanycolours.TabIndex = 1; - this.pnlanycolours.Visible = false; - // - // pnlanyoptions - // - this.pnlanyoptions.Controls.Add(this.Label38); - this.pnlanyoptions.Controls.Add(this.txtanysgreen); - this.pnlanyoptions.Controls.Add(this.txtanysred); - this.pnlanyoptions.Controls.Add(this.Label39); - this.pnlanyoptions.Controls.Add(this.Label40); - this.pnlanyoptions.Controls.Add(this.txtanysblue); - this.pnlanyoptions.Location = new System.Drawing.Point(282, 3); - this.pnlanyoptions.Name = "pnlanyoptions"; - this.pnlanyoptions.Size = new System.Drawing.Size(120, 40); - this.pnlanyoptions.TabIndex = 34; - this.pnlanyoptions.Visible = false; - this.pnlanyoptions.MouseLeave += new System.EventHandler(this.pnlanyoptions_MouseLeave); - // - // Label38 - // - this.Label38.AutoSize = true; - this.Label38.BackColor = System.Drawing.Color.Transparent; - this.Label38.Location = new System.Drawing.Point(56, 24); - this.Label38.Name = "Label38"; - this.Label38.Size = new System.Drawing.Size(39, 13); - this.Label38.TabIndex = 26; - this.Label38.Text = "Green:"; - // - // txtanysgreen - // - this.txtanysgreen.BackColor = System.Drawing.Color.White; - this.txtanysgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtanysgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtanysgreen.Location = new System.Drawing.Point(95, 22); - this.txtanysgreen.Multiline = true; - this.txtanysgreen.Name = "txtanysgreen"; - this.txtanysgreen.Size = new System.Drawing.Size(23, 17); - this.txtanysgreen.TabIndex = 25; - this.txtanysgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtanysgreen.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); - // - // txtanysred - // - this.txtanysred.BackColor = System.Drawing.Color.White; - this.txtanysred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtanysred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtanysred.Location = new System.Drawing.Point(62, 2); - this.txtanysred.Multiline = true; - this.txtanysred.Name = "txtanysred"; - this.txtanysred.Size = new System.Drawing.Size(23, 17); - this.txtanysred.TabIndex = 21; - this.txtanysred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtanysred.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); - // - // Label39 - // - this.Label39.AutoSize = true; - this.Label39.BackColor = System.Drawing.Color.Transparent; - this.Label39.Location = new System.Drawing.Point(1, 23); - this.Label39.Name = "Label39"; - this.Label39.Size = new System.Drawing.Size(31, 13); - this.Label39.TabIndex = 24; - this.Label39.Text = "Blue:"; - // - // Label40 - // - this.Label40.AutoSize = true; - this.Label40.BackColor = System.Drawing.Color.Transparent; - this.Label40.Location = new System.Drawing.Point(31, 4); - this.Label40.Name = "Label40"; - this.Label40.Size = new System.Drawing.Size(30, 13); - this.Label40.TabIndex = 22; - this.Label40.Text = "Red:"; - // - // txtanysblue - // - this.txtanysblue.BackColor = System.Drawing.Color.White; - this.txtanysblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtanysblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtanysblue.Location = new System.Drawing.Point(32, 22); - this.txtanysblue.Multiline = true; - this.txtanysblue.Name = "txtanysblue"; - this.txtanysblue.Size = new System.Drawing.Size(23, 17); - this.txtanysblue.TabIndex = 23; - this.txtanysblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtanysblue.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); - // - // pnlanycustomcolour - // - this.pnlanycustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlanycustomcolour.Location = new System.Drawing.Point(406, 8); - this.pnlanycustomcolour.Name = "pnlanycustomcolour"; - this.pnlanycustomcolour.Size = new System.Drawing.Size(32, 30); - this.pnlanycustomcolour.TabIndex = 17; - this.pnlanycustomcolour.Visible = false; - // - // pnlany16 - // - this.pnlany16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany16.Location = new System.Drawing.Point(259, 25); - this.pnlany16.Name = "pnlany16"; - this.pnlany16.Size = new System.Drawing.Size(20, 13); - this.pnlany16.TabIndex = 17; - this.pnlany16.Visible = false; - // - // pnlany12 - // - this.pnlany12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany12.Location = new System.Drawing.Point(155, 25); - this.pnlany12.Name = "pnlany12"; - this.pnlany12.Size = new System.Drawing.Size(20, 13); - this.pnlany12.TabIndex = 9; - this.pnlany12.Visible = false; - // - // pnlany14 - // - this.pnlany14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany14.Location = new System.Drawing.Point(207, 25); - this.pnlany14.Name = "pnlany14"; - this.pnlany14.Size = new System.Drawing.Size(20, 13); - this.pnlany14.TabIndex = 13; - this.pnlany14.Visible = false; - // - // pnlany10 - // - this.pnlany10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany10.Location = new System.Drawing.Point(103, 25); - this.pnlany10.Name = "pnlany10"; - this.pnlany10.Size = new System.Drawing.Size(20, 13); - this.pnlany10.TabIndex = 5; - this.pnlany10.Visible = false; - // - // pnlany8 - // - this.pnlany8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany8.Location = new System.Drawing.Point(259, 8); - this.pnlany8.Name = "pnlany8"; - this.pnlany8.Size = new System.Drawing.Size(20, 13); - this.pnlany8.TabIndex = 16; - this.pnlany8.Visible = false; - // - // pnlany4 - // - this.pnlany4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany4.Location = new System.Drawing.Point(155, 8); - this.pnlany4.Name = "pnlany4"; - this.pnlany4.Size = new System.Drawing.Size(20, 13); - this.pnlany4.TabIndex = 8; - this.pnlany4.Visible = false; - // - // pnlany6 - // - this.pnlany6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany6.Location = new System.Drawing.Point(207, 8); - this.pnlany6.Name = "pnlany6"; - this.pnlany6.Size = new System.Drawing.Size(20, 13); - this.pnlany6.TabIndex = 12; - this.pnlany6.Visible = false; - // - // pnlany15 - // - this.pnlany15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany15.Location = new System.Drawing.Point(233, 25); - this.pnlany15.Name = "pnlany15"; - this.pnlany15.Size = new System.Drawing.Size(20, 13); - this.pnlany15.TabIndex = 15; - this.pnlany15.Visible = false; - // - // pnlany2 - // - this.pnlany2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany2.Location = new System.Drawing.Point(103, 8); - this.pnlany2.Name = "pnlany2"; - this.pnlany2.Size = new System.Drawing.Size(20, 13); - this.pnlany2.TabIndex = 4; - this.pnlany2.Visible = false; - // - // pnlany13 - // - this.pnlany13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany13.Location = new System.Drawing.Point(181, 25); - this.pnlany13.Name = "pnlany13"; - this.pnlany13.Size = new System.Drawing.Size(20, 13); - this.pnlany13.TabIndex = 11; - this.pnlany13.Visible = false; - // - // pnlany11 - // - this.pnlany11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany11.Location = new System.Drawing.Point(129, 25); - this.pnlany11.Name = "pnlany11"; - this.pnlany11.Size = new System.Drawing.Size(20, 13); - this.pnlany11.TabIndex = 7; - this.pnlany11.Visible = false; - // - // pnlany7 - // - this.pnlany7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany7.Location = new System.Drawing.Point(233, 8); - this.pnlany7.Name = "pnlany7"; - this.pnlany7.Size = new System.Drawing.Size(20, 13); - this.pnlany7.TabIndex = 14; - this.pnlany7.Visible = false; - // - // pnlany9 - // - this.pnlany9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany9.Location = new System.Drawing.Point(77, 25); - this.pnlany9.Name = "pnlany9"; - this.pnlany9.Size = new System.Drawing.Size(20, 13); - this.pnlany9.TabIndex = 3; - this.pnlany9.Visible = false; - // - // pnlany5 - // - this.pnlany5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany5.Location = new System.Drawing.Point(181, 8); - this.pnlany5.Name = "pnlany5"; - this.pnlany5.Size = new System.Drawing.Size(20, 13); - this.pnlany5.TabIndex = 10; - this.pnlany5.Visible = false; - // - // pnlany3 - // - this.pnlany3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany3.Location = new System.Drawing.Point(129, 8); - this.pnlany3.Name = "pnlany3"; - this.pnlany3.Size = new System.Drawing.Size(20, 13); - this.pnlany3.TabIndex = 6; - this.pnlany3.Visible = false; - // - // pnlany1 - // - this.pnlany1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlany1.Location = new System.Drawing.Point(77, 8); - this.pnlany1.Name = "pnlany1"; - this.pnlany1.Size = new System.Drawing.Size(20, 13); - this.pnlany1.TabIndex = 2; - this.pnlany1.Visible = false; - // - // lblanylevel - // - this.lblanylevel.AutoSize = true; - this.lblanylevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblanylevel.Location = new System.Drawing.Point(5, 25); - this.lblanylevel.Name = "lblanylevel"; - this.lblanylevel.Size = new System.Drawing.Size(49, 15); - this.lblanylevel.TabIndex = 1; - this.lblanylevel.Text = "Level: 4"; - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.Location = new System.Drawing.Point(3, 2); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(43, 22); - this.Label1.TabIndex = 0; - this.Label1.Text = "Any"; - // - // Panel1 - // - this.Panel1.BackColor = System.Drawing.Color.White; - this.Panel1.Controls.Add(this.lblnewcolourrgb); - this.Panel1.Controls.Add(this.lblnewcolourname); - this.Panel1.Controls.Add(this.Label26); - this.Panel1.Controls.Add(this.Label17); - this.Panel1.Controls.Add(this.lbloldcolourrgb); - this.Panel1.Controls.Add(this.lbloldcolourname); - this.Panel1.Controls.Add(this.Label14); - this.Panel1.Controls.Add(this.pnlnewcolour); - this.Panel1.Controls.Add(this.pnloldcolour); - this.Panel1.Controls.Add(this.lblobjecttocolour); - this.Panel1.Dock = System.Windows.Forms.DockStyle.Top; - this.Panel1.Location = new System.Drawing.Point(0, 0); - this.Panel1.Name = "Panel1"; - this.Panel1.Size = new System.Drawing.Size(447, 107); - this.Panel1.TabIndex = 0; - // - // lblnewcolourrgb - // - this.lblnewcolourrgb.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblnewcolourrgb.Location = new System.Drawing.Point(298, 66); - this.lblnewcolourrgb.Name = "lblnewcolourrgb"; - this.lblnewcolourrgb.Size = new System.Drawing.Size(147, 18); - this.lblnewcolourrgb.TabIndex = 10; - this.lblnewcolourrgb.Text = "RGB: 234, 341, 111"; - // - // lblnewcolourname - // - this.lblnewcolourname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblnewcolourname.Location = new System.Drawing.Point(298, 49); - this.lblnewcolourname.Name = "lblnewcolourname"; - this.lblnewcolourname.Size = new System.Drawing.Size(145, 18); - this.lblnewcolourname.TabIndex = 9; - this.lblnewcolourname.Text = "Name: Whitesmoke"; - // - // Label26 - // - this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label26.Location = new System.Drawing.Point(298, 32); - this.Label26.Name = "Label26"; - this.Label26.Size = new System.Drawing.Size(145, 18); - this.Label26.TabIndex = 8; - this.Label26.Text = "New Colour"; - // - // Label17 - // - this.Label17.AutoSize = true; - this.Label17.Location = new System.Drawing.Point(7, 87); - this.Label17.Name = "Label17"; - this.Label17.Size = new System.Drawing.Size(426, 13); - this.Label17.TabIndex = 7; - this.Label17.Text = "Click the new colour above to confirm your colour choice or click the old colour " + - "to cancel"; - // - // lbloldcolourrgb - // - this.lbloldcolourrgb.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbloldcolourrgb.Location = new System.Drawing.Point(-2, 66); - this.lbloldcolourrgb.Name = "lbloldcolourrgb"; - this.lbloldcolourrgb.Size = new System.Drawing.Size(151, 18); - this.lbloldcolourrgb.TabIndex = 6; - this.lbloldcolourrgb.Text = "50, 60, 20 :RGB"; - this.lbloldcolourrgb.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // lbloldcolourname - // - this.lbloldcolourname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbloldcolourname.Location = new System.Drawing.Point(-2, 49); - this.lbloldcolourname.Name = "lbloldcolourname"; - this.lbloldcolourname.Size = new System.Drawing.Size(151, 18); - this.lbloldcolourname.TabIndex = 5; - this.lbloldcolourname.Text = "Red :Name"; - this.lbloldcolourname.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // Label14 - // - this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label14.Location = new System.Drawing.Point(-2, 32); - this.Label14.Name = "Label14"; - this.Label14.Size = new System.Drawing.Size(151, 18); - this.Label14.TabIndex = 4; - this.Label14.Text = "Old Colour"; - this.Label14.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // pnlnewcolour - // - this.pnlnewcolour.Location = new System.Drawing.Point(227, 32); - this.pnlnewcolour.Name = "pnlnewcolour"; - this.pnlnewcolour.Size = new System.Drawing.Size(67, 52); - this.pnlnewcolour.TabIndex = 3; - // - // pnloldcolour - // - this.pnloldcolour.Location = new System.Drawing.Point(153, 32); - this.pnloldcolour.Name = "pnloldcolour"; - this.pnloldcolour.Size = new System.Drawing.Size(67, 52); - this.pnloldcolour.TabIndex = 2; - // - // lblobjecttocolour - // - this.lblobjecttocolour.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblobjecttocolour.Location = new System.Drawing.Point(10, 5); - this.lblobjecttocolour.Name = "lblobjecttocolour"; - this.lblobjecttocolour.Size = new System.Drawing.Size(423, 23); - this.lblobjecttocolour.TabIndex = 1; - this.lblobjecttocolour.Text = "Close Button Colour"; - this.lblobjecttocolour.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // Color_Picker - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(447, 600); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.KeyPreview = true; - this.Name = "Color_Picker"; - this.Text = "Colour_Picker"; - this.TopMost = true; - this.Load += new System.EventHandler(this.Color_Picker_Load); - this.pgcontents.ResumeLayout(false); - this.pnlpinkcolours.ResumeLayout(false); - this.pnlpinkcolours.PerformLayout(); - this.pnlpinkoptions.ResumeLayout(false); - this.pnlpinkoptions.PerformLayout(); - this.pnlredcolours.ResumeLayout(false); - this.pnlredcolours.PerformLayout(); - this.pnlredoptions.ResumeLayout(false); - this.pnlredoptions.PerformLayout(); - this.pnlbrowncolours.ResumeLayout(false); - this.pnlbrowncolours.PerformLayout(); - this.pnlbrownoptions.ResumeLayout(false); - this.pnlbrownoptions.PerformLayout(); - this.pnlorangecolours.ResumeLayout(false); - this.pnlorangecolours.PerformLayout(); - this.pnlorangeoptions.ResumeLayout(false); - this.pnlorangeoptions.PerformLayout(); - this.pnlyellowcolours.ResumeLayout(false); - this.pnlyellowcolours.PerformLayout(); - this.pnlyellowoptions.ResumeLayout(false); - this.pnlyellowoptions.PerformLayout(); - this.pnlgreencolours.ResumeLayout(false); - this.pnlgreencolours.PerformLayout(); - this.pnlgreenoptions.ResumeLayout(false); - this.pnlgreenoptions.PerformLayout(); - this.pnlbluecolours.ResumeLayout(false); - this.pnlbluecolours.PerformLayout(); - this.pnlblueoptions.ResumeLayout(false); - this.pnlblueoptions.PerformLayout(); - this.pnlpurplecolours.ResumeLayout(false); - this.pnlpurplecolours.PerformLayout(); - this.pnlpurpleoptions.ResumeLayout(false); - this.pnlpurpleoptions.PerformLayout(); - this.pnlgraycolours.ResumeLayout(false); - this.pnlgraycolours.PerformLayout(); - this.pnlanycolours.ResumeLayout(false); - this.pnlanycolours.PerformLayout(); - this.pnlanyoptions.ResumeLayout(false); - this.pnlanyoptions.PerformLayout(); - this.Panel1.ResumeLayout(false); - this.Panel1.PerformLayout(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Panel pnlanycolours; - internal System.Windows.Forms.Panel pnlany16; - internal System.Windows.Forms.Panel pnlany12; - internal System.Windows.Forms.Panel pnlany14; - internal System.Windows.Forms.Panel pnlany10; - internal System.Windows.Forms.Panel pnlany4; - internal System.Windows.Forms.Panel pnlany6; - internal System.Windows.Forms.Panel pnlany15; - internal System.Windows.Forms.Panel pnlany2; - internal System.Windows.Forms.Panel pnlany13; - internal System.Windows.Forms.Panel pnlany11; - internal System.Windows.Forms.Panel pnlany7; - internal System.Windows.Forms.Panel pnlany9; - internal System.Windows.Forms.Panel pnlany5; - internal System.Windows.Forms.Panel pnlany3; - internal System.Windows.Forms.Panel pnlany1; - internal System.Windows.Forms.Label lblanylevel; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.Panel Panel1; - internal System.Windows.Forms.Panel pnlnewcolour; - internal System.Windows.Forms.Panel pnloldcolour; - internal System.Windows.Forms.Label lblobjecttocolour; - internal System.Windows.Forms.Label Label17; - internal System.Windows.Forms.Label lbloldcolourrgb; - internal System.Windows.Forms.Label lbloldcolourname; - internal System.Windows.Forms.Label Label14; - internal System.Windows.Forms.Panel pnlpinkcolours; - internal System.Windows.Forms.Panel pnlpink16; - internal System.Windows.Forms.Panel pnlpink12; - internal System.Windows.Forms.Panel pnlpink14; - internal System.Windows.Forms.Panel pnlpink10; - internal System.Windows.Forms.Panel pnlpink8; - internal System.Windows.Forms.Panel pnlpink4; - internal System.Windows.Forms.Panel pnlpink6; - internal System.Windows.Forms.Panel pnlpink15; - internal System.Windows.Forms.Panel pnlpink2; - internal System.Windows.Forms.Panel pnlpink13; - internal System.Windows.Forms.Panel pnlpink11; - internal System.Windows.Forms.Panel pnlpink7; - internal System.Windows.Forms.Panel pnlpink9; - internal System.Windows.Forms.Panel pnlpink5; - internal System.Windows.Forms.Panel pnlpink3; - internal System.Windows.Forms.Panel pnlpink1; - internal System.Windows.Forms.Label lblpinklevel; - internal System.Windows.Forms.Label Label23; - internal System.Windows.Forms.Panel pnlredcolours; - internal System.Windows.Forms.Panel pnlred16; - internal System.Windows.Forms.Panel pnlred12; - internal System.Windows.Forms.Panel pnlred14; - internal System.Windows.Forms.Panel pnlred10; - internal System.Windows.Forms.Panel pnlred8; - internal System.Windows.Forms.Panel pnlred4; - internal System.Windows.Forms.Panel pnlred6; - internal System.Windows.Forms.Panel pnlred15; - internal System.Windows.Forms.Panel pnlred2; - internal System.Windows.Forms.Panel pnlred13; - internal System.Windows.Forms.Panel pnlred11; - internal System.Windows.Forms.Panel pnlred7; - internal System.Windows.Forms.Panel pnlred9; - internal System.Windows.Forms.Panel pnlred5; - internal System.Windows.Forms.Panel pnlred3; - internal System.Windows.Forms.Panel pnlred1; - internal System.Windows.Forms.Label lblredlevel; - internal System.Windows.Forms.Label Label21; - internal System.Windows.Forms.Panel pnlbrowncolours; - internal System.Windows.Forms.Panel pnlbrown16; - internal System.Windows.Forms.Panel pnlbrown12; - internal System.Windows.Forms.Panel pnlbrown14; - internal System.Windows.Forms.Panel pnlbrown10; - internal System.Windows.Forms.Panel pnlbrown8; - internal System.Windows.Forms.Panel pnlbrown4; - internal System.Windows.Forms.Panel pnlbrown6; - internal System.Windows.Forms.Panel pnlbrown15; - internal System.Windows.Forms.Panel pnlbrown2; - internal System.Windows.Forms.Panel pnlbrown13; - internal System.Windows.Forms.Panel pnlbrown11; - internal System.Windows.Forms.Panel pnlbrown7; - internal System.Windows.Forms.Panel pnlbrown9; - internal System.Windows.Forms.Panel pnlbrown5; - internal System.Windows.Forms.Panel pnlbrown3; - internal System.Windows.Forms.Panel pnlbrown1; - internal System.Windows.Forms.Label lblbrownlevel; - internal System.Windows.Forms.Label Label19; - internal System.Windows.Forms.Panel pnlorangecolours; - internal System.Windows.Forms.Panel pnlorange16; - internal System.Windows.Forms.Panel pnlorange12; - internal System.Windows.Forms.Panel pnlorange14; - internal System.Windows.Forms.Panel pnlorange10; - internal System.Windows.Forms.Panel pnlorange8; - internal System.Windows.Forms.Panel pnlorange4; - internal System.Windows.Forms.Panel pnlorange6; - internal System.Windows.Forms.Panel pnlorange15; - internal System.Windows.Forms.Panel pnlorange2; - internal System.Windows.Forms.Panel pnlorange13; - internal System.Windows.Forms.Panel pnlorange11; - internal System.Windows.Forms.Panel pnlorange7; - internal System.Windows.Forms.Panel pnlorange9; - internal System.Windows.Forms.Panel pnlorange5; - internal System.Windows.Forms.Panel pnlorange3; - internal System.Windows.Forms.Panel pnlorange1; - internal System.Windows.Forms.Label lblorangelevel; - internal System.Windows.Forms.Label Label13; - internal System.Windows.Forms.Panel pnlyellowcolours; - internal System.Windows.Forms.Panel pnlyellow16; - internal System.Windows.Forms.Panel pnlyellow12; - internal System.Windows.Forms.Panel pnlyellow14; - internal System.Windows.Forms.Panel pnlyellow10; - internal System.Windows.Forms.Panel pnlyellow8; - internal System.Windows.Forms.Panel pnlyellow4; - internal System.Windows.Forms.Panel pnlyellow6; - internal System.Windows.Forms.Panel pnlyellow15; - internal System.Windows.Forms.Panel pnlyellow2; - internal System.Windows.Forms.Panel pnlyellow13; - internal System.Windows.Forms.Panel pnlyellow11; - internal System.Windows.Forms.Panel pnlyellow7; - internal System.Windows.Forms.Panel pnlyellow9; - internal System.Windows.Forms.Panel pnlyellow5; - internal System.Windows.Forms.Panel pnlyellow3; - internal System.Windows.Forms.Panel pnlyellow1; - internal System.Windows.Forms.Label lblyellowlevel; - internal System.Windows.Forms.Label Label11; - internal System.Windows.Forms.Panel pnlgreencolours; - internal System.Windows.Forms.Panel pnlgreen16; - internal System.Windows.Forms.Panel pnlgreen12; - internal System.Windows.Forms.Panel pnlgreen14; - internal System.Windows.Forms.Panel pnlgreen10; - internal System.Windows.Forms.Panel pnlgreen8; - internal System.Windows.Forms.Panel pnlgreen4; - internal System.Windows.Forms.Panel pnlgreen6; - internal System.Windows.Forms.Panel pnlgreen15; - internal System.Windows.Forms.Panel pnlgreen2; - internal System.Windows.Forms.Panel pnlgreen13; - internal System.Windows.Forms.Panel pnlgreen11; - internal System.Windows.Forms.Panel pnlgreen7; - internal System.Windows.Forms.Panel pnlgreen9; - internal System.Windows.Forms.Panel pnlgreen5; - internal System.Windows.Forms.Panel pnlgreen3; - internal System.Windows.Forms.Panel pnlgreen1; - internal System.Windows.Forms.Label lblgreenlevel; - internal System.Windows.Forms.Label Label9; - internal System.Windows.Forms.Panel pnlbluecolours; - internal System.Windows.Forms.Panel pnlblue16; - internal System.Windows.Forms.Panel pnlblue12; - internal System.Windows.Forms.Panel pnlblue14; - internal System.Windows.Forms.Panel pnlblue10; - internal System.Windows.Forms.Panel pnlblue8; - internal System.Windows.Forms.Panel pnlblue4; - internal System.Windows.Forms.Panel pnlblue6; - internal System.Windows.Forms.Panel pnlblue15; - internal System.Windows.Forms.Panel pnlblue2; - internal System.Windows.Forms.Panel pnlblue13; - internal System.Windows.Forms.Panel pnlblue11; - internal System.Windows.Forms.Panel pnlblue7; - internal System.Windows.Forms.Panel pnlblue9; - internal System.Windows.Forms.Panel pnlblue5; - internal System.Windows.Forms.Panel pnlblue3; - internal System.Windows.Forms.Panel pnlblue1; - internal System.Windows.Forms.Label lblbluelevel; - internal System.Windows.Forms.Label Label7; - internal System.Windows.Forms.Panel pnlpurplecolours; - internal System.Windows.Forms.Panel pnlpurple16; - internal System.Windows.Forms.Panel pnlpurple12; - internal System.Windows.Forms.Panel pnlpurple14; - internal System.Windows.Forms.Panel pnlpurple10; - internal System.Windows.Forms.Panel pnlpurple8; - internal System.Windows.Forms.Panel pnlpurple4; - internal System.Windows.Forms.Panel pnlpurple6; - internal System.Windows.Forms.Panel pnlpurple15; - internal System.Windows.Forms.Panel pnlpurple2; - internal System.Windows.Forms.Panel pnlpurple13; - internal System.Windows.Forms.Panel pnlpurple11; - internal System.Windows.Forms.Panel pnlpurple7; - internal System.Windows.Forms.Panel pnlpurple9; - internal System.Windows.Forms.Panel pnlpurple5; - internal System.Windows.Forms.Panel pnlpurple3; - internal System.Windows.Forms.Panel pnlpurple1; - internal System.Windows.Forms.Label lblpurplelevel; - internal System.Windows.Forms.Label Label5; - internal System.Windows.Forms.Panel pnlgraycolours; - internal System.Windows.Forms.Panel pnlgray16; - internal System.Windows.Forms.Panel pnlgray12; - internal System.Windows.Forms.Panel pnlgray14; - internal System.Windows.Forms.Panel pnlgray10; - internal System.Windows.Forms.Panel pnlgray8; - internal System.Windows.Forms.Panel pnlgray4; - internal System.Windows.Forms.Panel pnlgray6; - internal System.Windows.Forms.Panel pnlgray15; - internal System.Windows.Forms.Panel pnlgray2; - internal System.Windows.Forms.Panel pnlgray13; - internal System.Windows.Forms.Panel pnlgray11; - internal System.Windows.Forms.Panel pnlgray7; - internal System.Windows.Forms.Panel pnlgray9; - internal System.Windows.Forms.Panel pnlgray5; - internal System.Windows.Forms.Panel pnlgray3; - internal System.Windows.Forms.Panel pnlgray1; - internal System.Windows.Forms.Label lblgraylevel; - internal System.Windows.Forms.Label Label3; - internal System.Windows.Forms.Panel pnlpinkcustomcolour; - internal System.Windows.Forms.Panel pnlredcustomcolour; - internal System.Windows.Forms.Panel pnlbrowncustomcolour; - internal System.Windows.Forms.Panel pnlorangecustomcolour; - internal System.Windows.Forms.Panel pnlyellowcustomcolour; - internal System.Windows.Forms.Panel pnlgreencustomcolour; - internal System.Windows.Forms.Panel pnlbluecustomcolour; - internal System.Windows.Forms.Panel pnlpurplecustomcolour; - internal System.Windows.Forms.Panel pnlgraycustomcolour; - internal System.Windows.Forms.Panel pnlanycustomcolour; - internal System.Windows.Forms.Panel pnlany8; - internal System.Windows.Forms.Label lblnewcolourrgb; - internal System.Windows.Forms.Label lblnewcolourname; - internal System.Windows.Forms.Label Label26; - internal System.Windows.Forms.Label lblcustomshadetut; - internal System.Windows.Forms.TextBox txtcustomgrayshade; - internal System.Windows.Forms.Label Label6; - internal System.Windows.Forms.TextBox txtbluesred; - internal System.Windows.Forms.Label Label4; - internal System.Windows.Forms.TextBox txtbluesgreen; - internal System.Windows.Forms.Label Label2; - internal System.Windows.Forms.TextBox txtbluesblue; - internal System.Windows.Forms.Panel pnlblueoptions; - internal System.Windows.Forms.Panel pnlyellowoptions; - internal System.Windows.Forms.Label Label20; - internal System.Windows.Forms.TextBox txtyellowsblue; - internal System.Windows.Forms.TextBox txtyellowsred; - internal System.Windows.Forms.Label Label22; - internal System.Windows.Forms.Label Label24; - internal System.Windows.Forms.TextBox txtyellowsgreen; - internal System.Windows.Forms.Panel pnlgreenoptions; - internal System.Windows.Forms.Label Label15; - internal System.Windows.Forms.TextBox txtgreensred; - internal System.Windows.Forms.TextBox txtgreensgreen; - internal System.Windows.Forms.Label Label16; - internal System.Windows.Forms.Label Label18; - internal System.Windows.Forms.TextBox txtgreensblue; - internal System.Windows.Forms.Panel pnlpurpleoptions; - internal System.Windows.Forms.Label Label8; - internal System.Windows.Forms.TextBox txtpurplesgreen; - internal System.Windows.Forms.TextBox txtpurplesblue; - internal System.Windows.Forms.Label Label10; - internal System.Windows.Forms.Label Label12; - internal System.Windows.Forms.TextBox txtpurplesred; - internal System.Windows.Forms.Panel pnlpinkoptions; - internal System.Windows.Forms.Label Label35; - internal System.Windows.Forms.TextBox txtpinksgreen; - internal System.Windows.Forms.TextBox txtpinksred; - internal System.Windows.Forms.Label Label36; - internal System.Windows.Forms.Label Label37; - internal System.Windows.Forms.TextBox txtpinksblue; - internal System.Windows.Forms.Panel pnlredoptions; - internal System.Windows.Forms.Label Label32; - internal System.Windows.Forms.TextBox txtredsblue; - internal System.Windows.Forms.TextBox txtredsred; - internal System.Windows.Forms.Label Label33; - internal System.Windows.Forms.Label Label34; - internal System.Windows.Forms.TextBox txtredsgreen; - internal System.Windows.Forms.Panel pnlbrownoptions; - internal System.Windows.Forms.Label Label29; - internal System.Windows.Forms.TextBox txtbrownsblue; - internal System.Windows.Forms.TextBox txtbrownsred; - internal System.Windows.Forms.Label Label30; - internal System.Windows.Forms.Label Label31; - internal System.Windows.Forms.TextBox txtbrownsgreen; - internal System.Windows.Forms.Panel pnlorangeoptions; - internal System.Windows.Forms.Label Label25; - internal System.Windows.Forms.TextBox txtorangesblue; - internal System.Windows.Forms.TextBox txtorangesred; - internal System.Windows.Forms.Label Label27; - internal System.Windows.Forms.Label Label28; - internal System.Windows.Forms.TextBox txtorangesgreen; - internal System.Windows.Forms.Panel pnlanyoptions; - internal System.Windows.Forms.Label Label38; - internal System.Windows.Forms.TextBox txtanysgreen; - internal System.Windows.Forms.TextBox txtanysred; - internal System.Windows.Forms.Label Label39; - internal System.Windows.Forms.Label Label40; - internal System.Windows.Forms.TextBox txtanysblue; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Color_Picker.cs b/source/WindowsFormsApplication1/Color_Picker.cs deleted file mode 100644 index ea33415..0000000 --- a/source/WindowsFormsApplication1/Color_Picker.cs +++ /dev/null @@ -1,2438 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Color_Picker : Form - { - public Color_Picker(string ctc, Color oldcol) - { - InitializeComponent(); - oldcolour = oldcol; - colourtochange = ctc; - } - - public Color NewColor = Color.Black; - - public void Color_Picker_Load(object sender, EventArgs e) - { - getoldcolour(); - determinelevels(); - shrinktosizebasedoncoloursbought(); - setupboughtcolours(); - loadmemory(); - - foreach (Control ctrl in pnlanycolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctionany); - } - foreach (Control ctrl in pnlgraycolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctiongray); - } - - foreach (Control ctrl in pnlredcolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctionred); - } - - foreach (Control ctrl in pnlgreencolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctiongreen); - } - - foreach (Control ctrl in pnlbluecolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctionblue); - } - - foreach (Control ctrl in pnlorangecolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctionorange); - } - - foreach (Control ctrl in pnlyellowcolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctionyellow); - } - - foreach (Control ctrl in pnlbrowncolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctionbrown); - } - - foreach (Control ctrl in pnlpurplecolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctionpurple); - } - - foreach (Control ctrl in pnlpinkcolours.Controls) - { - ctrl.MouseDown += new MouseEventHandler(this.colourselctionpink); - } - - pnloldcolour.Click += new EventHandler(pnloldcolour_Click); - pnlnewcolour.Click += new EventHandler(pnlnewcolour_Click); - } - - public int anylevel = 0; - public int graylevel = 0; - public int greenlevel = 0; - public int redlevel = 0; - public int bluelevel = 0; - public int yellowlevel = 0; - public int orangelevel = 0; - public int brownlevel = 0; - public int purplelevel = 0; - public int pinklevel = 0; - - - - public void loadmemory() - { - ///NYI - - - - - - - } - - public void saveanymemory() - { - API.anymemory[0] = pnlany1.BackColor; - API.anymemory[1] = pnlany2.BackColor; - API.anymemory[2] = pnlany3.BackColor; - API.anymemory[3] = pnlany4.BackColor; - API.anymemory[4] = pnlany5.BackColor; - API.anymemory[5] = pnlany6.BackColor; - API.anymemory[6] = pnlany7.BackColor; - API.anymemory[7] = pnlany8.BackColor; - API.anymemory[8] = pnlany9.BackColor; - API.anymemory[9] = pnlany10.BackColor; - API.anymemory[10] = pnlany11.BackColor; - API.anymemory[11] = pnlany12.BackColor; - API.anymemory[12] = pnlany13.BackColor; - API.anymemory[13] = pnlany14.BackColor; - API.anymemory[14] = pnlany15.BackColor; - API.anymemory[15] = pnlany16.BackColor; - } - - public void savegraymemory() - { - API.graymemory[0] = pnlgray1.BackColor; - API.graymemory[1] = pnlgray2.BackColor; - API.graymemory[2] = pnlgray3.BackColor; - API.graymemory[3] = pnlgray4.BackColor; - API.graymemory[4] = pnlgray5.BackColor; - API.graymemory[5] = pnlgray6.BackColor; - API.graymemory[6] = pnlgray7.BackColor; - API.graymemory[7] = pnlgray8.BackColor; - API.graymemory[8] = pnlgray9.BackColor; - API.graymemory[9] = pnlgray10.BackColor; - API.graymemory[10] = pnlgray11.BackColor; - API.graymemory[11] = pnlgray12.BackColor; - API.graymemory[12] = pnlgray13.BackColor; - API.graymemory[13] = pnlgray14.BackColor; - API.graymemory[14] = pnlgray15.BackColor; - API.graymemory[15] = pnlgray16.BackColor; - } - - public void savepurplememory() - { - API.purplememory[0] = pnlpurple1.BackColor; - API.purplememory[1] = pnlpurple2.BackColor; - API.purplememory[2] = pnlpurple3.BackColor; - API.purplememory[3] = pnlpurple4.BackColor; - API.purplememory[4] = pnlpurple5.BackColor; - API.purplememory[5] = pnlpurple6.BackColor; - API.purplememory[6] = pnlpurple7.BackColor; - API.purplememory[7] = pnlpurple8.BackColor; - API.purplememory[8] = pnlpurple9.BackColor; - API.purplememory[9] = pnlpurple10.BackColor; - API.purplememory[10] = pnlpurple11.BackColor; - API.purplememory[11] = pnlpurple12.BackColor; - API.purplememory[12] = pnlpurple13.BackColor; - API.purplememory[13] = pnlpurple14.BackColor; - API.purplememory[14] = pnlpurple15.BackColor; - API.purplememory[15] = pnlpurple16.BackColor; - } - - public void savebluememory() - { - API.bluememory[0] = pnlblue1.BackColor; - API.bluememory[1] = pnlblue2.BackColor; - API.bluememory[2] = pnlblue3.BackColor; - API.bluememory[3] = pnlblue4.BackColor; - API.bluememory[4] = pnlblue5.BackColor; - API.bluememory[5] = pnlblue6.BackColor; - API.bluememory[6] = pnlblue7.BackColor; - API.bluememory[7] = pnlblue8.BackColor; - API.bluememory[8] = pnlblue9.BackColor; - API.bluememory[9] = pnlblue10.BackColor; - API.bluememory[10] = pnlblue11.BackColor; - API.bluememory[11] = pnlblue12.BackColor; - API.bluememory[12] = pnlblue13.BackColor; - API.bluememory[13] = pnlblue14.BackColor; - API.bluememory[14] = pnlblue15.BackColor; - API.bluememory[15] = pnlblue16.BackColor; - } - - public void savegreenmemory() - { - API.greenmemory[0] = pnlgreen1.BackColor; - API.greenmemory[1] = pnlgreen2.BackColor; - API.greenmemory[2] = pnlgreen3.BackColor; - API.greenmemory[3] = pnlgreen4.BackColor; - API.greenmemory[4] = pnlgreen5.BackColor; - API.greenmemory[5] = pnlgreen6.BackColor; - API.greenmemory[6] = pnlgreen7.BackColor; - API.greenmemory[7] = pnlgreen8.BackColor; - API.greenmemory[8] = pnlgreen9.BackColor; - API.greenmemory[9] = pnlgreen10.BackColor; - API.greenmemory[10] = pnlgreen11.BackColor; - API.greenmemory[11] = pnlgreen12.BackColor; - API.greenmemory[12] = pnlgreen13.BackColor; - API.greenmemory[13] = pnlgreen14.BackColor; - API.greenmemory[14] = pnlgreen15.BackColor; - API.greenmemory[15] = pnlgreen16.BackColor; - } - - public void saveyellowmemory() - { - API.yellowmemory[0] = pnlyellow1.BackColor; - API.yellowmemory[1] = pnlyellow2.BackColor; - API.yellowmemory[2] = pnlyellow3.BackColor; - API.yellowmemory[3] = pnlyellow4.BackColor; - API.yellowmemory[4] = pnlyellow5.BackColor; - API.yellowmemory[5] = pnlyellow6.BackColor; - API.yellowmemory[6] = pnlyellow7.BackColor; - API.yellowmemory[7] = pnlyellow8.BackColor; - API.yellowmemory[8] = pnlyellow9.BackColor; - API.yellowmemory[9] = pnlyellow10.BackColor; - API.yellowmemory[10] = pnlyellow11.BackColor; - API.yellowmemory[11] = pnlyellow12.BackColor; - API.yellowmemory[12] = pnlyellow13.BackColor; - API.yellowmemory[13] = pnlyellow14.BackColor; - API.yellowmemory[14] = pnlyellow15.BackColor; - API.yellowmemory[15] = pnlyellow16.BackColor; - } - - public void saveorangememory() - { - API.orangememory[0] = pnlorange1.BackColor; - API.orangememory[1] = pnlorange2.BackColor; - API.orangememory[2] = pnlorange3.BackColor; - API.orangememory[3] = pnlorange4.BackColor; - API.orangememory[4] = pnlorange5.BackColor; - API.orangememory[5] = pnlorange6.BackColor; - API.orangememory[6] = pnlorange7.BackColor; - API.orangememory[7] = pnlorange8.BackColor; - API.orangememory[8] = pnlorange9.BackColor; - API.orangememory[9] = pnlorange10.BackColor; - API.orangememory[10] = pnlorange11.BackColor; - API.orangememory[11] = pnlorange12.BackColor; - API.orangememory[12] = pnlorange13.BackColor; - API.orangememory[13] = pnlorange14.BackColor; - API.orangememory[14] = pnlorange15.BackColor; - API.orangememory[15] = pnlorange16.BackColor; - } - - public void savebrownmemory() - { - API.brownmemory[0] = pnlbrown1.BackColor; - API.brownmemory[1] = pnlbrown2.BackColor; - API.brownmemory[2] = pnlbrown3.BackColor; - API.brownmemory[3] = pnlbrown4.BackColor; - API.brownmemory[4] = pnlbrown5.BackColor; - API.brownmemory[5] = pnlbrown6.BackColor; - API.brownmemory[6] = pnlbrown7.BackColor; - API.brownmemory[7] = pnlbrown8.BackColor; - API.brownmemory[8] = pnlbrown9.BackColor; - API.brownmemory[9] = pnlbrown10.BackColor; - API.brownmemory[10] = pnlbrown11.BackColor; - API.brownmemory[11] = pnlbrown12.BackColor; - API.brownmemory[12] = pnlbrown13.BackColor; - API.brownmemory[13] = pnlbrown14.BackColor; - API.brownmemory[14] = pnlbrown15.BackColor; - API.brownmemory[15] = pnlbrown16.BackColor; - } - - public void saveredmemory() - { - API.redmemory[0] = pnlred1.BackColor; - API.redmemory[1] = pnlred2.BackColor; - API.redmemory[2] = pnlred3.BackColor; - API.redmemory[3] = pnlred4.BackColor; - API.redmemory[4] = pnlred5.BackColor; - API.redmemory[5] = pnlred6.BackColor; - API.redmemory[6] = pnlred7.BackColor; - API.redmemory[7] = pnlred8.BackColor; - API.redmemory[8] = pnlred9.BackColor; - API.redmemory[9] = pnlred10.BackColor; - API.redmemory[10] = pnlred11.BackColor; - API.redmemory[11] = pnlred12.BackColor; - API.redmemory[12] = pnlred13.BackColor; - API.redmemory[13] = pnlred14.BackColor; - API.redmemory[14] = pnlred15.BackColor; - API.redmemory[15] = pnlred16.BackColor; - } - - public void savepinkmemory() - { - API.pinkmemory[0] = pnlpink1.BackColor; - API.pinkmemory[1] = pnlpink2.BackColor; - API.pinkmemory[2] = pnlpink3.BackColor; - API.pinkmemory[3] = pnlpink4.BackColor; - API.pinkmemory[4] = pnlpink5.BackColor; - API.pinkmemory[5] = pnlpink6.BackColor; - API.pinkmemory[6] = pnlpink7.BackColor; - API.pinkmemory[7] = pnlpink8.BackColor; - API.pinkmemory[8] = pnlpink9.BackColor; - API.pinkmemory[9] = pnlpink10.BackColor; - API.pinkmemory[10] = pnlpink11.BackColor; - API.pinkmemory[11] = pnlpink12.BackColor; - API.pinkmemory[12] = pnlpink13.BackColor; - API.pinkmemory[13] = pnlpink14.BackColor; - API.pinkmemory[14] = pnlpink15.BackColor; - API.pinkmemory[15] = pnlpink16.BackColor; - } - - public string colourtochange = ""; - public Color oldcolour = Color.White; - - private void getoldcolour() - { - lblobjecttocolour.Text = colourtochange; - pnloldcolour.BackColor = oldcolour; - if (pnloldcolour.BackColor.IsNamedColor) - { - lbloldcolourname.Text = pnloldcolour.BackColor.Name + " :Name"; - } - else { - lbloldcolourname.Text = "Custom :Name"; - } - lbloldcolourrgb.Text = pnloldcolour.BackColor.R + ", " + pnloldcolour.BackColor.G + ", " + pnloldcolour.BackColor.B + " :RGB"; - - pnlnewcolour.BackColor = API.lastcolourpick; - if (pnlnewcolour.BackColor.IsNamedColor) - { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - - private void determinelevels() - { - if (API.Upgrades["gray"] == true) - graylevel = 1; - if (API.Upgrades["grayshades"] == true) - graylevel = 2; - if (API.Upgrades["fullgrayshadeset"] == true) - graylevel = 3; - if (API.Upgrades["customgrayshades"] == true) - graylevel = 4; - if (API.Upgrades["basiccustomshade"] == true) - anylevel = 1; - if (API.Upgrades["generalcustomshades"] == true) - anylevel = 2; - if (API.Upgrades["advancedcustomshades"] == true) - anylevel = 3; - if (API.Upgrades["limitlesscustomshades"] == true) - anylevel = 4; - if (API.Upgrades["purple"] == true) - purplelevel = 1; - if (API.Upgrades["purpleshades"] == true) - purplelevel = 2; - if (API.Upgrades["fullpurpleshadeset"] == true) - purplelevel = 3; - if (API.Upgrades["custompurpleshades"] == true) - purplelevel = 4; - if (API.Upgrades["blue"] == true) - bluelevel = 1; - if (API.Upgrades["blueshades"] == true) - bluelevel = 2; - if (API.Upgrades["fullblueshadeset"] == true) - bluelevel = 3; - if (API.Upgrades["customblueshades"] == true) - bluelevel = 4; - if (API.Upgrades["green"] == true) - greenlevel = 1; - if (API.Upgrades["greenshades"] == true) - greenlevel = 2; - if (API.Upgrades["fullgreenshadeset"] == true) - greenlevel = 3; - if (API.Upgrades["customgreenshades"] == true) - greenlevel = 4; - if (API.Upgrades["yellow"] == true) - yellowlevel = 1; - if (API.Upgrades["yellowshades"] == true) - yellowlevel = 2; - if (API.Upgrades["fullyellowshadeset"] == true) - yellowlevel = 3; - if (API.Upgrades["customyellowshades"] == true) - yellowlevel = 4; - if (API.Upgrades["orange"] == true) - orangelevel = 1; - if (API.Upgrades["orangeshades"] == true) - orangelevel = 2; - if (API.Upgrades["fullorangeshadeset"] == true) - orangelevel = 3; - if (API.Upgrades["customorangeshades"] == true) - orangelevel = 4; - if (API.Upgrades["brown"] == true) - brownlevel = 1; - if (API.Upgrades["brownshades"] == true) - brownlevel = 2; - if (API.Upgrades["fullbrownshadeset"] == true) - brownlevel = 3; - if (API.Upgrades["custombrownshades"] == true) - brownlevel = 4; - if (API.Upgrades["red"] == true) - redlevel = 1; - if (API.Upgrades["redshades"] == true) - redlevel = 2; - if (API.Upgrades["fullredshadeset"] == true) - redlevel = 3; - if (API.Upgrades["customredshades"] == true) - redlevel = 4; - if (API.Upgrades["pink"] == true) - pinklevel = 1; - if (API.Upgrades["pinkshades"] == true) - pinklevel = 2; - if (API.Upgrades["fullpinkshadeset"] == true) - pinklevel = 3; - if (API.Upgrades["custompinkshades"] == true) - pinklevel = 4; - } - - private void shrinktosizebasedoncoloursbought() - { - if (API.Upgrades["pink"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlpinkcolours.Show(); - } - if (API.Upgrades["red"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlredcolours.Show(); - } - if (API.Upgrades["brown"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlbrowncolours.Show(); - } - if (API.Upgrades["orange"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlorangecolours.Show(); - } - if (API.Upgrades["yellow"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlyellowcolours.Show(); - } - if (API.Upgrades["green"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlgreencolours.Show(); - } - if (API.Upgrades["blue"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlbluecolours.Show(); - } - if (API.Upgrades["purple"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlpurplecolours.Show(); - } - if (API.Upgrades["gray"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlgraycolours.Show(); - } - if (API.Upgrades["basiccustomshade"] == false) - { - this.Height = this.Height - 46; - } - else { - pnlanycolours.Show(); - } - } - - private void setupboughtcolours() - { - switch (graylevel) - { - case 1: - lblgraylevel.Text = "Level 1"; - pnlgray1.BackColor = Color.Black; - pnlgray1.Show(); - pnlgray2.BackColor = Color.Gray; - pnlgray2.Show(); - pnlgray3.BackColor = Color.White; - pnlgray3.Show(); - break; - case 2: - lblgraylevel.Text = "Level 2"; - pnlgray1.BackColor = Color.Black; - pnlgray1.Show(); - pnlgray2.BackColor = Color.DimGray; - pnlgray2.Show(); - pnlgray3.BackColor = Color.Gray; - pnlgray3.Show(); - pnlgray4.BackColor = Color.LightGray; - pnlgray4.Show(); - pnlgray5.BackColor = Color.White; - pnlgray5.Show(); - break; - case 3: - lblgraylevel.Text = "Level 3"; - pnlgray1.BackColor = Color.Black; - pnlgray1.Show(); - pnlgray2.BackColor = Color.DimGray; - pnlgray2.Show(); - pnlgray3.BackColor = Color.Gray; - pnlgray3.Show(); - pnlgray4.BackColor = Color.DarkGray; - pnlgray4.Show(); - pnlgray5.BackColor = Color.Silver; - pnlgray5.Show(); - pnlgray6.BackColor = Color.LightGray; - pnlgray6.Show(); - pnlgray7.BackColor = Color.Gainsboro; - pnlgray7.Show(); - pnlgray8.BackColor = Color.WhiteSmoke; - pnlgray8.Show(); - pnlgray9.BackColor = Color.White; - pnlgray9.Show(); - break; - case 4: - lblgraylevel.Text = "Level 4"; - pnlgray1.BackColor = Color.Black; - pnlgray1.Show(); - pnlgray2.BackColor = Color.DimGray; - pnlgray2.Show(); - pnlgray3.BackColor = Color.Gray; - pnlgray3.Show(); - pnlgray4.BackColor = Color.DarkGray; - pnlgray4.Show(); - pnlgray5.BackColor = Color.Silver; - pnlgray5.Show(); - pnlgray6.BackColor = Color.LightGray; - pnlgray6.Show(); - pnlgray7.BackColor = Color.Gainsboro; - pnlgray7.Show(); - pnlgray8.BackColor = Color.WhiteSmoke; - pnlgray8.Show(); - pnlgray9.BackColor = Color.White; - pnlgray9.Show(); - pnlgray10.BackColor = Color.White; - pnlgray10.Show(); - pnlgray11.BackColor = Color.White; - pnlgray11.Show(); - pnlgray12.BackColor = Color.White; - pnlgray12.Show(); - pnlgray13.BackColor = Color.White; - pnlgray13.Show(); - pnlgray14.BackColor = Color.White; - pnlgray14.Show(); - pnlgray15.BackColor = Color.White; - pnlgray15.Show(); - pnlgray16.BackColor = Color.White; - pnlgray16.Show(); - pnlgraycustomcolour.Show(); - lblcustomshadetut.Show(); - txtcustomgrayshade.Show(); - break; - } - - switch (purplelevel) - { - case 1: - lblpurplelevel.Text = "Level 1"; - pnlpurple1.BackColor = Color.Purple; - pnlpurple1.Show(); - break; - case 2: - lblpurplelevel.Text = "Level 2"; - pnlpurple1.BackColor = Color.Indigo; - pnlpurple1.Show(); - pnlpurple2.BackColor = Color.Purple; - pnlpurple2.Show(); - pnlpurple3.BackColor = Color.MediumPurple; - pnlpurple3.Show(); - break; - case 3: - lblpurplelevel.Text = "Level 3"; - pnlpurple1.BackColor = Color.Indigo; - pnlpurple1.Show(); - pnlpurple2.BackColor = Color.DarkSlateBlue; - pnlpurple2.Show(); - pnlpurple3.BackColor = Color.Purple; - pnlpurple3.Show(); - pnlpurple4.BackColor = Color.DarkOrchid; - pnlpurple4.Show(); - pnlpurple5.BackColor = Color.DarkViolet; - pnlpurple5.Show(); - pnlpurple6.BackColor = Color.BlueViolet; - pnlpurple6.Show(); - pnlpurple7.BackColor = Color.SlateBlue; - pnlpurple7.Show(); - pnlpurple8.BackColor = Color.MediumSlateBlue; - pnlpurple8.Show(); - pnlpurple9.BackColor = Color.MediumPurple; - pnlpurple9.Show(); - pnlpurple10.BackColor = Color.MediumOrchid; - pnlpurple10.Show(); - pnlpurple11.BackColor = Color.Magenta; - pnlpurple11.Show(); - pnlpurple12.BackColor = Color.Orchid; - pnlpurple12.Show(); - pnlpurple13.BackColor = Color.Violet; - pnlpurple13.Show(); - pnlpurple14.BackColor = Color.Plum; - pnlpurple14.Show(); - pnlpurple15.BackColor = Color.Thistle; - pnlpurple15.Show(); - pnlpurple16.BackColor = Color.Lavender; - pnlpurple16.Show(); - break; - case 4: - lblpurplelevel.Text = "Level 4"; - pnlpurple1.BackColor = Color.Indigo; - pnlpurple1.Show(); - pnlpurple2.BackColor = Color.DarkSlateBlue; - pnlpurple2.Show(); - pnlpurple3.BackColor = Color.Purple; - pnlpurple3.Show(); - pnlpurple4.BackColor = Color.DarkOrchid; - pnlpurple4.Show(); - pnlpurple5.BackColor = Color.DarkViolet; - pnlpurple5.Show(); - pnlpurple6.BackColor = Color.BlueViolet; - pnlpurple6.Show(); - pnlpurple7.BackColor = Color.SlateBlue; - pnlpurple7.Show(); - pnlpurple8.BackColor = Color.MediumSlateBlue; - pnlpurple8.Show(); - pnlpurple9.BackColor = Color.MediumPurple; - pnlpurple9.Show(); - pnlpurple10.BackColor = Color.MediumOrchid; - pnlpurple10.Show(); - pnlpurple11.BackColor = Color.Magenta; - pnlpurple11.Show(); - pnlpurple12.BackColor = Color.Orchid; - pnlpurple12.Show(); - pnlpurple13.BackColor = Color.Violet; - pnlpurple13.Show(); - pnlpurple14.BackColor = Color.Plum; - pnlpurple14.Show(); - pnlpurple15.BackColor = Color.Thistle; - pnlpurple15.Show(); - pnlpurple16.BackColor = Color.Lavender; - pnlpurple16.Show(); - pnlpurplecustomcolour.Show(); - pnlpurpleoptions.Show(); - break; - } - - switch (bluelevel) - { - case 1: - lblbluelevel.Text = "Level 1"; - pnlblue1.BackColor = Color.Blue; - pnlblue1.Show(); - break; - case 2: - lblbluelevel.Text = "Level 2"; - pnlblue1.BackColor = Color.Navy; - pnlblue1.Show(); - pnlblue2.BackColor = Color.Blue; - pnlblue2.Show(); - pnlblue3.BackColor = Color.LightBlue; - pnlblue3.Show(); - break; - case 3: - lblbluelevel.Text = "Level 3"; - pnlblue1.BackColor = Color.MidnightBlue; - pnlblue1.Show(); - pnlblue2.BackColor = Color.Navy; - pnlblue2.Show(); - pnlblue3.BackColor = Color.Blue; - pnlblue3.Show(); - pnlblue4.BackColor = Color.RoyalBlue; - pnlblue4.Show(); - pnlblue5.BackColor = Color.CornflowerBlue; - pnlblue5.Show(); - pnlblue6.BackColor = Color.DeepSkyBlue; - pnlblue6.Show(); - pnlblue7.BackColor = Color.SkyBlue; - pnlblue7.Show(); - pnlblue8.BackColor = Color.LightBlue; - pnlblue8.Show(); - pnlblue9.BackColor = Color.LightSteelBlue; - pnlblue9.Show(); - pnlblue10.BackColor = Color.Cyan; - pnlblue10.Show(); - pnlblue11.BackColor = Color.Aquamarine; - pnlblue11.Show(); - pnlblue12.BackColor = Color.DarkTurquoise; - pnlblue12.Show(); - pnlblue13.BackColor = Color.LightSeaGreen; - pnlblue13.Show(); - pnlblue14.BackColor = Color.MediumAquamarine; - pnlblue14.Show(); - pnlblue15.BackColor = Color.CadetBlue; - pnlblue15.Show(); - pnlblue16.BackColor = Color.Teal; - pnlblue16.Show(); - break; - case 4: - lblbluelevel.Text = "Level 4"; - pnlblue1.BackColor = Color.MidnightBlue; - pnlblue1.Show(); - pnlblue2.BackColor = Color.Navy; - pnlblue2.Show(); - pnlblue3.BackColor = Color.Blue; - pnlblue3.Show(); - pnlblue4.BackColor = Color.RoyalBlue; - pnlblue4.Show(); - pnlblue5.BackColor = Color.CornflowerBlue; - pnlblue5.Show(); - pnlblue6.BackColor = Color.DeepSkyBlue; - pnlblue6.Show(); - pnlblue7.BackColor = Color.SkyBlue; - pnlblue7.Show(); - pnlblue8.BackColor = Color.LightBlue; - pnlblue8.Show(); - pnlblue9.BackColor = Color.LightSteelBlue; - pnlblue9.Show(); - pnlblue10.BackColor = Color.Cyan; - pnlblue10.Show(); - pnlblue11.BackColor = Color.Aquamarine; - pnlblue11.Show(); - pnlblue12.BackColor = Color.DarkTurquoise; - pnlblue12.Show(); - pnlblue13.BackColor = Color.LightSeaGreen; - pnlblue13.Show(); - pnlblue14.BackColor = Color.MediumAquamarine; - pnlblue14.Show(); - pnlblue15.BackColor = Color.CadetBlue; - pnlblue15.Show(); - pnlblue16.BackColor = Color.Teal; - pnlblue16.Show(); - pnlbluecustomcolour.Show(); - pnlblueoptions.Show(); - break; - } - - switch (greenlevel) - { - case 1: - lblgreenlevel.Text = "Level 1"; - pnlgreen1.BackColor = Color.Green; - pnlgreen1.Show(); - break; - case 2: - lblgreenlevel.Text = "Level 2"; - pnlgreen1.BackColor = Color.DarkGreen; - pnlgreen1.Show(); - pnlgreen2.BackColor = Color.Green; - pnlgreen2.Show(); - pnlgreen3.BackColor = Color.LightGreen; - pnlgreen3.Show(); - break; - case 3: - lblgreenlevel.Text = "Level 3"; - pnlgreen1.BackColor = Color.DarkGreen; - pnlgreen1.Show(); - pnlgreen2.BackColor = Color.Green; - pnlgreen2.Show(); - pnlgreen3.BackColor = Color.SeaGreen; - pnlgreen3.Show(); - pnlgreen4.BackColor = Color.MediumSeaGreen; - pnlgreen4.Show(); - pnlgreen5.BackColor = Color.DarkSeaGreen; - pnlgreen5.Show(); - pnlgreen6.BackColor = Color.LightGreen; - pnlgreen6.Show(); - pnlgreen7.BackColor = Color.MediumSpringGreen; - pnlgreen7.Show(); - pnlgreen8.BackColor = Color.SpringGreen; - pnlgreen8.Show(); - pnlgreen9.BackColor = Color.GreenYellow; - pnlgreen9.Show(); - pnlgreen10.BackColor = Color.LawnGreen; - pnlgreen10.Show(); - pnlgreen11.BackColor = Color.Lime; - pnlgreen11.Show(); - pnlgreen12.BackColor = Color.LimeGreen; - pnlgreen12.Show(); - pnlgreen13.BackColor = Color.YellowGreen; - pnlgreen13.Show(); - pnlgreen14.BackColor = Color.OliveDrab; - pnlgreen14.Show(); - pnlgreen15.BackColor = Color.Olive; - pnlgreen15.Show(); - pnlgreen16.BackColor = Color.DarkOliveGreen; - pnlgreen16.Show(); - break; - case 4: - lblgreenlevel.Text = "Level 4"; - pnlgreen1.BackColor = Color.DarkGreen; - pnlgreen1.Show(); - pnlgreen2.BackColor = Color.Green; - pnlgreen2.Show(); - pnlgreen3.BackColor = Color.SeaGreen; - pnlgreen3.Show(); - pnlgreen4.BackColor = Color.MediumSeaGreen; - pnlgreen4.Show(); - pnlgreen5.BackColor = Color.DarkSeaGreen; - pnlgreen5.Show(); - pnlgreen6.BackColor = Color.LightGreen; - pnlgreen6.Show(); - pnlgreen7.BackColor = Color.MediumSpringGreen; - pnlgreen7.Show(); - pnlgreen8.BackColor = Color.SpringGreen; - pnlgreen8.Show(); - pnlgreen9.BackColor = Color.GreenYellow; - pnlgreen9.Show(); - pnlgreen10.BackColor = Color.LawnGreen; - pnlgreen10.Show(); - pnlgreen11.BackColor = Color.Lime; - pnlgreen11.Show(); - pnlgreen12.BackColor = Color.LimeGreen; - pnlgreen12.Show(); - pnlgreen13.BackColor = Color.YellowGreen; - pnlgreen13.Show(); - pnlgreen14.BackColor = Color.OliveDrab; - pnlgreen14.Show(); - pnlgreen15.BackColor = Color.Olive; - pnlgreen15.Show(); - pnlgreen16.BackColor = Color.DarkOliveGreen; - pnlgreen16.Show(); - pnlgreencustomcolour.Show(); - pnlgreenoptions.Show(); - break; - } - - switch (yellowlevel) - { - case 1: - lblyellowlevel.Text = "Level 1"; - pnlyellow1.BackColor = Color.Yellow; - pnlyellow1.Show(); - break; - case 2: - lblyellowlevel.Text = "Level 2"; - pnlyellow1.BackColor = Color.DarkKhaki; - pnlyellow1.Show(); - pnlyellow2.BackColor = Color.Yellow; - pnlyellow2.Show(); - pnlyellow3.BackColor = Color.PaleGoldenrod; - pnlyellow3.Show(); - break; - case 3: - lblyellowlevel.Text = "Level 3"; - pnlyellow1.BackColor = Color.DarkKhaki; - pnlyellow1.Show(); - pnlyellow2.BackColor = Color.Yellow; - pnlyellow2.Show(); - pnlyellow3.BackColor = Color.Khaki; - pnlyellow3.Show(); - pnlyellow4.BackColor = Color.PaleGoldenrod; - pnlyellow4.Show(); - pnlyellow5.BackColor = Color.PeachPuff; - pnlyellow5.Show(); - pnlyellow6.BackColor = Color.Moccasin; - pnlyellow6.Show(); - pnlyellow7.BackColor = Color.PapayaWhip; - pnlyellow7.Show(); - pnlyellow8.BackColor = Color.LightGoldenrodYellow; - pnlyellow8.Show(); - pnlyellow9.BackColor = Color.LemonChiffon; - pnlyellow9.Show(); - pnlyellow10.BackColor = Color.LightYellow; - pnlyellow10.Show(); - break; - case 4: - lblyellowlevel.Text = "Level 4"; - pnlyellow1.BackColor = Color.DarkKhaki; - pnlyellow1.Show(); - pnlyellow2.BackColor = Color.Yellow; - pnlyellow2.Show(); - pnlyellow3.BackColor = Color.Khaki; - pnlyellow3.Show(); - pnlyellow4.BackColor = Color.PaleGoldenrod; - pnlyellow4.Show(); - pnlyellow5.BackColor = Color.PeachPuff; - pnlyellow5.Show(); - pnlyellow6.BackColor = Color.Moccasin; - pnlyellow6.Show(); - pnlyellow7.BackColor = Color.PapayaWhip; - pnlyellow7.Show(); - pnlyellow8.BackColor = Color.LightGoldenrodYellow; - pnlyellow8.Show(); - pnlyellow9.BackColor = Color.LemonChiffon; - pnlyellow9.Show(); - pnlyellow10.BackColor = Color.LightYellow; - pnlyellow10.Show(); - pnlyellow11.BackColor = Color.White; - pnlyellow11.Show(); - pnlyellow12.BackColor = Color.White; - pnlyellow12.Show(); - pnlyellow13.BackColor = Color.White; - pnlyellow13.Show(); - pnlyellow14.BackColor = Color.White; - pnlyellow14.Show(); - pnlyellow15.BackColor = Color.White; - pnlyellow15.Show(); - pnlyellow16.BackColor = Color.White; - pnlyellow16.Show(); - pnlyellowcustomcolour.Show(); - pnlyellowoptions.Show(); - break; - } - - switch (orangelevel) - { - case 1: - lblorangelevel.Text = "Level 1"; - pnlorange1.BackColor = Color.DarkOrange; - pnlorange1.Show(); - break; - case 2: - lblorangelevel.Text = "Level 2"; - pnlorange1.BackColor = Color.OrangeRed; - pnlorange1.Show(); - pnlorange2.BackColor = Color.DarkOrange; - pnlorange2.Show(); - pnlorange3.BackColor = Color.Orange; - pnlorange3.Show(); - break; - case 3: - lblorangelevel.Text = "Level 3"; - pnlorange1.BackColor = Color.OrangeRed; - pnlorange1.Show(); - pnlorange2.BackColor = Color.Tomato; - pnlorange2.Show(); - pnlorange3.BackColor = Color.Coral; - pnlorange3.Show(); - pnlorange4.BackColor = Color.DarkOrange; - pnlorange4.Show(); - pnlorange5.BackColor = Color.Orange; - pnlorange5.Show(); - pnlorange6.BackColor = Color.Gold; - pnlorange6.Show(); - break; - case 4: - lblorangelevel.Text = "Level 4"; - pnlorange1.BackColor = Color.OrangeRed; - pnlorange1.Show(); - pnlorange2.BackColor = Color.Tomato; - pnlorange2.Show(); - pnlorange3.BackColor = Color.Coral; - pnlorange3.Show(); - pnlorange4.BackColor = Color.DarkOrange; - pnlorange4.Show(); - pnlorange5.BackColor = Color.Orange; - pnlorange5.Show(); - pnlorange6.BackColor = Color.Gold; - pnlorange6.Show(); - pnlorange7.BackColor = Color.White; - pnlorange7.Show(); - pnlorange8.BackColor = Color.White; - pnlorange8.Show(); - pnlorange9.BackColor = Color.White; - pnlorange9.Show(); - pnlorange10.BackColor = Color.White; - pnlorange10.Show(); - pnlorange11.BackColor = Color.White; - pnlorange11.Show(); - pnlorange12.BackColor = Color.White; - pnlorange12.Show(); - pnlorange13.BackColor = Color.White; - pnlorange13.Show(); - pnlorange14.BackColor = Color.White; - pnlorange14.Show(); - pnlorange15.BackColor = Color.White; - pnlorange15.Show(); - pnlorange16.BackColor = Color.White; - pnlorange16.Show(); - pnlorangecustomcolour.Show(); - pnlorangeoptions.Show(); - break; - } - - switch (brownlevel) - { - case 1: - lblbrownlevel.Text = "Level 1"; - pnlbrown1.BackColor = Color.Sienna; - pnlbrown1.Show(); - break; - case 2: - lblbrownlevel.Text = "Level 2"; - pnlbrown1.BackColor = Color.SaddleBrown; - pnlbrown1.Show(); - pnlbrown2.BackColor = Color.Sienna; - pnlbrown2.Show(); - pnlbrown3.BackColor = Color.BurlyWood; - pnlbrown3.Show(); - break; - case 3: - lblbrownlevel.Text = "Level 3"; - pnlbrown1.BackColor = Color.Maroon; - pnlbrown1.Show(); - pnlbrown2.BackColor = Color.Brown; - pnlbrown2.Show(); - pnlbrown3.BackColor = Color.Sienna; - pnlbrown3.Show(); - pnlbrown4.BackColor = Color.SaddleBrown; - pnlbrown4.Show(); - pnlbrown5.BackColor = Color.Chocolate; - pnlbrown5.Show(); - pnlbrown6.BackColor = Color.Peru; - pnlbrown6.Show(); - pnlbrown7.BackColor = Color.DarkGoldenrod; - pnlbrown7.Show(); - pnlbrown8.BackColor = Color.Goldenrod; - pnlbrown8.Show(); - pnlbrown9.BackColor = Color.SandyBrown; - pnlbrown9.Show(); - pnlbrown10.BackColor = Color.RosyBrown; - pnlbrown10.Show(); - pnlbrown11.BackColor = Color.Tan; - pnlbrown11.Show(); - pnlbrown12.BackColor = Color.BurlyWood; - pnlbrown12.Show(); - pnlbrown13.BackColor = Color.Wheat; - pnlbrown13.Show(); - pnlbrown14.BackColor = Color.NavajoWhite; - pnlbrown14.Show(); - pnlbrown15.BackColor = Color.Bisque; - pnlbrown15.Show(); - pnlbrown16.BackColor = Color.BlanchedAlmond; - pnlbrown16.Show(); - break; - case 4: - lblbrownlevel.Text = "Level 4"; - pnlbrown1.BackColor = Color.Maroon; - pnlbrown1.Show(); - pnlbrown2.BackColor = Color.Brown; - pnlbrown2.Show(); - pnlbrown3.BackColor = Color.Sienna; - pnlbrown3.Show(); - pnlbrown4.BackColor = Color.SaddleBrown; - pnlbrown4.Show(); - pnlbrown5.BackColor = Color.Chocolate; - pnlbrown5.Show(); - pnlbrown6.BackColor = Color.Peru; - pnlbrown6.Show(); - pnlbrown7.BackColor = Color.DarkGoldenrod; - pnlbrown7.Show(); - pnlbrown8.BackColor = Color.Goldenrod; - pnlbrown8.Show(); - pnlbrown9.BackColor = Color.SandyBrown; - pnlbrown9.Show(); - pnlbrown10.BackColor = Color.RosyBrown; - pnlbrown10.Show(); - pnlbrown11.BackColor = Color.Tan; - pnlbrown11.Show(); - pnlbrown12.BackColor = Color.BurlyWood; - pnlbrown12.Show(); - pnlbrown13.BackColor = Color.Wheat; - pnlbrown13.Show(); - pnlbrown14.BackColor = Color.NavajoWhite; - pnlbrown14.Show(); - pnlbrown15.BackColor = Color.Bisque; - pnlbrown15.Show(); - pnlbrown16.BackColor = Color.BlanchedAlmond; - pnlbrown16.Show(); - pnlbrowncustomcolour.Show(); - pnlbrownoptions.Show(); - break; - } - - switch (redlevel) - { - case 1: - lblredlevel.Text = "Level 1"; - pnlred1.BackColor = Color.Red; - pnlred1.Show(); - break; - case 2: - lblredlevel.Text = "Level 2"; - pnlred1.BackColor = Color.DarkRed; - pnlred1.Show(); - pnlred2.BackColor = Color.Red; - pnlred2.Show(); - pnlred3.BackColor = Color.Salmon; - pnlred3.Show(); - break; - case 3: - lblredlevel.Text = "Level 3"; - pnlred1.BackColor = Color.DarkRed; - pnlred1.Show(); - pnlred2.BackColor = Color.Red; - pnlred2.Show(); - pnlred3.BackColor = Color.Firebrick; - pnlred3.Show(); - pnlred4.BackColor = Color.Crimson; - pnlred4.Show(); - pnlred5.BackColor = Color.IndianRed; - pnlred5.Show(); - pnlred6.BackColor = Color.LightCoral; - pnlred6.Show(); - pnlred7.BackColor = Color.DarkSalmon; - pnlred7.Show(); - pnlred8.BackColor = Color.Salmon; - pnlred8.Show(); - pnlred9.BackColor = Color.LightSalmon; - pnlred9.Show(); - break; - case 4: - lblredlevel.Text = "Level 4"; - pnlred1.BackColor = Color.DarkRed; - pnlred1.Show(); - pnlred2.BackColor = Color.Red; - pnlred2.Show(); - pnlred3.BackColor = Color.Firebrick; - pnlred3.Show(); - pnlred4.BackColor = Color.Crimson; - pnlred4.Show(); - pnlred5.BackColor = Color.IndianRed; - pnlred5.Show(); - pnlred6.BackColor = Color.LightCoral; - pnlred6.Show(); - pnlred7.BackColor = Color.DarkSalmon; - pnlred7.Show(); - pnlred8.BackColor = Color.Salmon; - pnlred8.Show(); - pnlred9.BackColor = Color.LightSalmon; - pnlred9.Show(); - pnlred10.BackColor = Color.White; - pnlred10.Show(); - pnlred11.BackColor = Color.White; - pnlred11.Show(); - pnlred12.BackColor = Color.White; - pnlred12.Show(); - pnlred13.BackColor = Color.White; - pnlred13.Show(); - pnlred14.BackColor = Color.White; - pnlred14.Show(); - pnlred15.BackColor = Color.White; - pnlred15.Show(); - pnlred16.BackColor = Color.White; - pnlred16.Show(); - pnlredcustomcolour.Show(); - pnlredoptions.Show(); - break; - } - - switch (pinklevel) - { - case 1: - lblpinklevel.Text = "Level 1"; - pnlpink1.BackColor = Color.HotPink; - pnlpink1.Show(); - break; - case 2: - lblpinklevel.Text = "Level 2"; - pnlpink1.BackColor = Color.DeepPink; - pnlpink1.Show(); - pnlpink2.BackColor = Color.HotPink; - pnlpink2.Show(); - pnlpink3.BackColor = Color.LightPink; - pnlpink3.Show(); - break; - case 3: - lblpinklevel.Text = "Level 3"; - pnlpink1.BackColor = Color.MediumVioletRed; - pnlpink1.Show(); - pnlpink2.BackColor = Color.PaleVioletRed; - pnlpink2.Show(); - pnlpink3.BackColor = Color.DeepPink; - pnlpink3.Show(); - pnlpink4.BackColor = Color.HotPink; - pnlpink4.Show(); - pnlpink5.BackColor = Color.LightPink; - pnlpink5.Show(); - pnlpink6.BackColor = Color.Pink; - pnlpink6.Show(); - break; - case 4: - lblpinklevel.Text = "Level 4"; - pnlpink1.BackColor = Color.MediumVioletRed; - pnlpink1.Show(); - pnlpink2.BackColor = Color.PaleVioletRed; - pnlpink2.Show(); - pnlpink3.BackColor = Color.DeepPink; - pnlpink3.Show(); - pnlpink4.BackColor = Color.HotPink; - pnlpink4.Show(); - pnlpink5.BackColor = Color.LightPink; - pnlpink5.Show(); - pnlpink6.BackColor = Color.Pink; - pnlpink6.Show(); - pnlpink7.BackColor = Color.White; - pnlpink7.Show(); - pnlpink8.BackColor = Color.White; - pnlpink8.Show(); - pnlpink9.BackColor = Color.White; - pnlpink9.Show(); - pnlpink10.BackColor = Color.White; - pnlpink10.Show(); - pnlpink11.BackColor = Color.White; - pnlpink11.Show(); - pnlpink12.BackColor = Color.White; - pnlpink12.Show(); - pnlpink13.BackColor = Color.White; - pnlpink13.Show(); - pnlpink14.BackColor = Color.White; - pnlpink14.Show(); - pnlpink15.BackColor = Color.White; - pnlpink15.Show(); - pnlpink16.BackColor = Color.White; - pnlpink16.Show(); - pnlpinkcustomcolour.Show(); - pnlpinkoptions.Show(); - break; - } - - switch (anylevel) - { - case 1: - lblanylevel.Text = "Level 1"; - pnlany1.BackColor = Color.White; - pnlany1.Show(); - pnlanycustomcolour.Show(); - pnlanyoptions.Show(); - break; - case 2: - lblanylevel.Text = "Level 2"; - pnlany1.BackColor = Color.White; - pnlany1.Show(); - pnlany2.BackColor = Color.White; - pnlany2.Show(); - pnlany3.BackColor = Color.White; - pnlany3.Show(); - pnlany4.BackColor = Color.White; - pnlany4.Show(); - pnlanycustomcolour.Show(); - pnlanyoptions.Show(); - break; - case 3: - lblanylevel.Text = "Level 3"; - pnlany1.BackColor = Color.White; - pnlany1.Show(); - pnlany2.BackColor = Color.White; - pnlany2.Show(); - pnlany3.BackColor = Color.White; - pnlany3.Show(); - pnlany4.BackColor = Color.White; - pnlany4.Show(); - pnlany5.BackColor = Color.White; - pnlany5.Show(); - pnlany6.BackColor = Color.White; - pnlany6.Show(); - pnlany7.BackColor = Color.White; - pnlany7.Show(); - pnlany8.BackColor = Color.White; - pnlany8.Show(); - pnlanycustomcolour.Show(); - pnlanyoptions.Show(); - break; - case 4: - lblanylevel.Text = "Level 4"; - pnlany1.BackColor = Color.White; - pnlany1.Show(); - pnlany2.BackColor = Color.White; - pnlany2.Show(); - pnlany3.BackColor = Color.White; - pnlany3.Show(); - pnlany4.BackColor = Color.White; - pnlany4.Show(); - pnlany5.BackColor = Color.White; - pnlany5.Show(); - pnlany6.BackColor = Color.White; - pnlany6.Show(); - pnlany7.BackColor = Color.White; - pnlany7.Show(); - pnlany8.BackColor = Color.White; - pnlany8.Show(); - pnlany9.BackColor = Color.White; - pnlany9.Show(); - pnlany10.BackColor = Color.White; - pnlany10.Show(); - pnlany11.BackColor = Color.White; - pnlany11.Show(); - pnlany12.BackColor = Color.White; - pnlany12.Show(); - pnlany13.BackColor = Color.White; - pnlany13.Show(); - pnlany14.BackColor = Color.White; - pnlany14.Show(); - pnlany15.BackColor = Color.White; - pnlany15.Show(); - pnlany16.BackColor = Color.White; - pnlany16.Show(); - pnlanycustomcolour.Show(); - pnlanyoptions.Show(); - break; - } - } - - public string Result = "Nothing"; - - // ERROR: Handles clauses are not supported in C# - private void pnloldcolour_Click(object sender, EventArgs e) - { - Result = "Cancelled"; - this.Close(); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlnewcolour_Click(object sender, EventArgs e) - { - Result = "OK"; - NewColor = pnlnewcolour.BackColor; - this.Close(); - } - - // ERROR: Handles clauses are not supported in C# - private void pnloldcolour_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 2), pnloldcolour.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlanycolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlanycolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlgraycolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlgraycolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlpurplecolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlpurplecolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlbluecolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlbluecolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlgreencolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlgreencolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlyellowcolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlyellowcolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlorangecolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlorangecolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlbrowncolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlbrowncolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlredcolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlredcolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlpinkcolours_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlpinkcolours.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlnewcolour_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawRectangle(new Pen(Color.Black, 2), pnlnewcolour.ClientRectangle); - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctiongray(object sender, MouseEventArgs e) - { - - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlgraycustomcolour.BackColor; - savegraymemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctionpurple(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlpurplecustomcolour.BackColor; - savepurplememory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctionblue(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlbluecustomcolour.BackColor; - savebluememory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctiongreen(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlgreencustomcolour.BackColor; - savegreenmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctionyellow(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlyellowcustomcolour.BackColor; - saveyellowmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctionorange(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlorangecustomcolour.BackColor; - saveorangememory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctionbrown(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlbrowncustomcolour.BackColor; - savebrownmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctionred(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlredcustomcolour.BackColor; - saveredmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctionpink(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlpinkcustomcolour.BackColor; - savepinkmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void colourselctionany(object sender, MouseEventArgs e) - { - Panel spanel = (Panel)sender; - if (e.Button == MouseButtons.Left) - { - pnlnewcolour.BackColor = spanel.BackColor; - if (pnlnewcolour.BackColor.IsNamedColor) - { - if (pnlnewcolour.BackColor.Name.Length > 12) - { - lblnewcolourname.Text = pnlnewcolour.BackColor.Name; - } - else { - lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; - } - } - else { - lblnewcolourname.Text = "Name: Custom"; - } - lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; - } - if (e.Button == MouseButtons.Right) - { - spanel.BackColor = pnlanycustomcolour.BackColor; - saveanymemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void txtcustomgrayshade_TextChanged(object sender, EventArgs e) - { - if (txtcustomgrayshade.Text == "") - { - txtcustomgrayshade.Text = "0"; - } - else { - if (Convert.ToInt32(txtcustomgrayshade.Text) > 255) - { - txtcustomgrayshade.Text = "255"; - } - else { - pnlgraycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtcustomgrayshade.Text), Convert.ToInt16(txtcustomgrayshade.Text), Convert.ToInt16(txtcustomgrayshade.Text)); - } - } - } - - // ERROR: Handles clauses are not supported in C# - private void CheckForNumber(object sender, KeyPressEventArgs e) - { - switch (e.KeyChar) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - e.Handled = true; - break; - } - } - - private void customcolourfailsafe() - { - if (txtcustomgrayshade.Text == "") - txtcustomgrayshade.Text = "0"; - - if (txtanysblue.Text == "") - txtanysblue.Text = "0"; - if (txtanysred.Text == "") - txtanysred.Text = "0"; - if (txtanysgreen.Text == "") - txtanysgreen.Text = "0"; - - if (txtpurplesblue.Text == "") - txtpurplesblue.Text = "255"; - if (txtpurplesred.Text == "") - txtpurplesred.Text = "150"; - if (txtpurplesgreen.Text == "") - txtpurplesgreen.Text = "0"; - - if (txtbluesblue.Text == "") - txtbluesblue.Text = "255"; - if (txtbluesred.Text == "") - txtbluesred.Text = "0"; - if (txtbluesgreen.Text == "") - txtbluesgreen.Text = "0"; - - if (txtgreensblue.Text == "") - txtgreensblue.Text = "0"; - if (txtgreensred.Text == "") - txtgreensred.Text = "0"; - if (txtgreensgreen.Text == "") - txtgreensgreen.Text = "255"; - - if (txtyellowsblue.Text == "") - txtyellowsblue.Text = "0"; - if (txtyellowsred.Text == "") - txtyellowsred.Text = "255"; - if (txtyellowsgreen.Text == "") - txtyellowsgreen.Text = "255"; - - if (txtorangesblue.Text == "") - txtorangesblue.Text = "0"; - if (txtorangesred.Text == "") - txtorangesred.Text = "255"; - if (txtorangesgreen.Text == "") - txtorangesgreen.Text = "60"; - - if (txtbrownsblue.Text == "") - txtbrownsblue.Text = "0"; - if (txtbrownsred.Text == "") - txtbrownsred.Text = "140"; - if (txtbrownsgreen.Text == "") - txtbrownsgreen.Text = "60"; - - if (txtredsblue.Text == "") - txtredsblue.Text = "0"; - if (txtredsred.Text == "") - txtredsred.Text = "255"; - if (txtredsgreen.Text == "") - txtredsgreen.Text = "0"; - - if (txtpinksblue.Text == "") - txtpinksblue.Text = "150"; - if (txtpinksred.Text == "") - txtpinksred.Text = "250"; - if (txtpinksgreen.Text == "") - txtpinksgreen.Text = "0"; - } - - // ERROR: Handles clauses are not supported in C# - private void txtpurplesgreen_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - - pnlpurplecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpurplesred.Text), Convert.ToInt16(txtpurplesgreen.Text), Convert.ToInt16(txtpurplesblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlpurpleoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - if (Convert.ToInt32(txtpurplesblue.Text) > 255) - { - txtpurplesblue.Text = "255"; - } - if (Convert.ToInt32(txtpurplesred.Text) > Convert.ToInt32(txtpurplesblue.Text)) - { - txtpurplesred.Text = txtpurplesblue.Text; - } - if (Convert.ToInt32(txtpurplesgreen.Text) > Convert.ToInt32(txtpurplesblue.Text)) - { - txtpurplesgreen.Text = txtpurplesred.Text; - } - if (Convert.ToInt32(txtpurplesgreen.Text) > Convert.ToInt32(txtpurplesred.Text)) - { - txtpurplesgreen.Text = txtpurplesred.Text; - } - pnlpurplecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpurplesred.Text), Convert.ToInt16(txtpurplesgreen.Text), Convert.ToInt16(txtpurplesblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void txtbluesgreen_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - - pnlbluecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbluesred.Text), Convert.ToInt16(txtbluesgreen.Text), Convert.ToInt16(txtbluesblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlblueoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - if (Convert.ToInt32(txtbluesblue.Text) > 255) - { - txtbluesblue.Text = "255"; - } - if (Convert.ToInt32(txtbluesgreen.Text) > Convert.ToInt32(txtbluesblue.Text)) - { - txtbluesgreen.Text = txtbluesblue.Text; - } - if (Convert.ToInt32(txtbluesred.Text) > Convert.ToInt32(txtbluesblue.Text)) - { - txtbluesred.Text = txtbluesgreen.Text; - } - if (Convert.ToInt32(txtbluesred.Text) > Convert.ToInt32(txtbluesgreen.Text)) - { - txtbluesred.Text = txtbluesgreen.Text; - } - pnlbluecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbluesred.Text), Convert.ToInt16(txtbluesgreen.Text), Convert.ToInt16(txtbluesblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void txtgreensgreen_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - - pnlgreencustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtgreensred.Text), Convert.ToInt16(txtgreensgreen.Text), Convert.ToInt16(txtgreensblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlgreenoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - if (Convert.ToInt32(txtgreensgreen.Text) > 255) - { - txtgreensgreen.Text = "255"; - } - if (Convert.ToInt32(txtgreensblue.Text) > Convert.ToInt32(txtgreensgreen.Text)) - { - txtgreensblue.Text = txtgreensgreen.Text; - } - if (Convert.ToInt32(txtgreensred.Text) > Convert.ToInt32(txtgreensgreen.Text)) - { - txtgreensred.Text = txtgreensgreen.Text; - } - if (Convert.ToInt32(txtgreensblue.Text) > Convert.ToInt32(txtgreensred.Text + 150)) - { - txtgreensblue.Text = (Convert.ToInt16(txtgreensred.Text) + 150).ToString(); - } - if (Convert.ToInt32(txtgreensred.Text) > Convert.ToInt32(txtgreensblue.Text + 150)) - { - txtgreensred.Text = (Convert.ToInt32(txtgreensblue.Text) + 150).ToString(); - } - pnlgreencustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtgreensred.Text), Convert.ToInt16(txtgreensgreen.Text), Convert.ToInt16(txtgreensblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void txtyellowsred_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - - pnlyellowcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtyellowsred.Text), Convert.ToInt16(txtyellowsgreen.Text), Convert.ToInt16(txtyellowsblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlyellowoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - if (Convert.ToInt32(txtyellowsred.Text) > 255) - { - txtyellowsred.Text = "255"; - } - if (Convert.ToInt32(txtyellowsred.Text) < 180) - { - txtyellowsred.Text = "180"; - } - if (Convert.ToInt32(txtyellowsgreen.Text) > Convert.ToInt32(txtyellowsred.Text)) - { - txtyellowsgreen.Text = txtyellowsred.Text; - } - if (Convert.ToInt32(txtyellowsgreen.Text) < (Convert.ToInt32(txtyellowsred.Text) - 30)) - { - txtyellowsgreen.Text = (Convert.ToInt32(txtyellowsred.Text) - 30).ToString(); - } - if (Convert.ToInt32(txtyellowsblue.Text) > Convert.ToInt32(txtyellowsgreen.Text)) - { - txtyellowsblue.Text = txtyellowsgreen.Text; - } - pnlyellowcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtyellowsred.Text), Convert.ToInt16(txtyellowsgreen.Text), Convert.ToInt16(txtyellowsblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void txtorangesred_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - - pnlorangecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtorangesred.Text), Convert.ToInt16(txtorangesgreen.Text), Convert.ToInt16(txtorangesblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlorangeoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - if (Convert.ToInt32(txtorangesred.Text) > 255) - { - txtorangesred.Text = "255"; - } - if (Convert.ToInt32(txtorangesred.Text) < 255) - { - txtorangesred.Text = "255"; - } - if (Convert.ToInt32(txtorangesgreen.Text) > Convert.ToInt32(txtorangesred.Text) - 100) - { - txtorangesgreen.Text = (Convert.ToInt32(txtorangesred.Text) - 100).ToString(); - } - if (Convert.ToInt32(txtorangesgreen.Text) < 30) - { - txtorangesgreen.Text = "30"; - } - if (Convert.ToInt32(txtorangesblue.Text) > (Convert.ToInt32(txtorangesgreen.Text) - 30)) - { - txtorangesblue.Text = (Convert.ToInt32(txtorangesgreen.Text) - 30).ToString(); - } - pnlorangecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtorangesred.Text), Convert.ToInt16(txtorangesgreen.Text), Convert.ToInt16(txtorangesblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void txtbrownsred_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - - pnlbrowncustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbrownsred.Text), Convert.ToInt16(txtbrownsgreen.Text), Convert.ToInt16(txtbrownsblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlbrownoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - if (Convert.ToInt32(txtbrownsred.Text) > 255) - { - txtbrownsred.Text = "255"; - } - if (Convert.ToInt32(txtbrownsred.Text) < 90) - { - txtbrownsred.Text = "90"; - } - if (Convert.ToInt32(txtbrownsgreen.Text) > Convert.ToInt32(txtbrownsred.Text) - 30) - { - txtbrownsgreen.Text = (Convert.ToInt32(txtbrownsred.Text) - 30).ToString(); - } - if (Convert.ToInt32(txtbrownsgreen.Text) < Convert.ToInt32(txtbrownsred.Text) - 128) - { - txtbrownsgreen.Text = (Convert.ToInt32(txtbrownsred.Text) - 128).ToString(); - } - if (Convert.ToInt32(txtbrownsgreen.Text) < 60) - { - txtbrownsgreen.Text = "60"; - } - if (Convert.ToInt32(txtbrownsblue.Text) > Convert.ToInt32(txtbrownsgreen.Text) - 60) - { - txtbrownsblue.Text = (Convert.ToInt32(txtbrownsgreen.Text) - 60).ToString(); - } - pnlbrowncustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbrownsred.Text), Convert.ToInt16(txtbrownsgreen.Text), Convert.ToInt16(txtbrownsblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void txtsred_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - - pnlredcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtredsred.Text), Convert.ToInt16(txtredsgreen.Text), Convert.ToInt16(txtredsblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlredoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - if (Convert.ToInt32(txtredsred.Text) > 255) - { - txtredsred.Text = "255"; - } - if (Convert.ToInt32(txtredsblue.Text) > Convert.ToInt32(txtredsred.Text) - 80) - { - txtredsblue.Text = (Convert.ToInt32(txtredsred.Text) - 80).ToString(); - } - if (Convert.ToInt32(txtredsgreen.Text) > Convert.ToInt32(txtredsred.Text) - 80) - { - txtredsgreen.Text = (Convert.ToInt32(txtredsred.Text) - 80).ToString(); - } - if (Convert.ToInt32(txtredsgreen.Text) > Convert.ToInt32(txtredsblue.Text + 50)) - { - txtredsgreen.Text = (Convert.ToInt32(txtredsblue.Text) + 50).ToString(); - } - if (Convert.ToInt32(txtredsblue.Text) > Convert.ToInt32(txtredsgreen.Text + 50)) - { - txtredsblue.Text = (Convert.ToInt32(txtredsgreen.Text) + 50).ToString(); - } - pnlredcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtredsred.Text), Convert.ToInt16(txtredsgreen.Text), Convert.ToInt16(txtredsblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void txtpinksred_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - try - { - pnlpinkcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpinksred.Text), Convert.ToInt16(txtpinksgreen.Text), Convert.ToInt16(txtpinksblue.Text)); - } - catch { } - } - - - - // ERROR: Handles clauses are not supported in C# - private void pnlpinkoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - if (Convert.ToInt32(txtpinksred.Text) > 255) - { - txtpinksred.Text = "255"; - } - if (Convert.ToInt32(txtpinksblue.Text) > Convert.ToInt32(txtpinksred.Text) - 50) - { - txtpinksblue.Text = (Convert.ToInt32(txtpinksred.Text) - 50).ToString(); - } - if (Convert.ToInt32(txtpinksgreen.Text) > Convert.ToInt32(txtpinksblue.Text)) - { - txtpinksgreen.Text = txtpinksblue.Text; - } - pnlpinkcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpinksred.Text), Convert.ToInt16(txtpinksgreen.Text), Convert.ToInt16(txtpinksblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void txtanysred_TextChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - try - { - pnlanycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtanysred.Text), Convert.ToInt16(txtanysgreen.Text), Convert.ToInt16(txtanysblue.Text)); - } - catch - { - - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlanyoptions_MouseLeave(object sender, EventArgs e) - { - customcolourfailsafe(); - switch (anylevel) - { - case 1: - if (Convert.ToInt32(txtanysred.Text) > 150) - { - txtanysred.Text = "150"; - } - if (Convert.ToInt32(txtanysred.Text) < 100) - { - txtanysred.Text = "100"; - } - if (Convert.ToInt32(txtanysblue.Text) > 150) - { - txtanysblue.Text = "150"; - } - if (Convert.ToInt32(txtanysblue.Text) < 100) - { - txtanysblue.Text = "100"; - } - if (Convert.ToInt32(txtanysgreen.Text) > 150) - { - txtanysgreen.Text = "150"; - } - if (Convert.ToInt32(txtanysgreen.Text) < 100) - { - txtanysgreen.Text = "100"; - } - break; - case 2: - if (Convert.ToInt32(txtanysred.Text) > 200) - { - txtanysred.Text = "200"; - } - if (Convert.ToInt32(txtanysred.Text) < 100) - { - txtanysred.Text = "100"; - } - if (Convert.ToInt32(txtanysblue.Text) > 200) - { - txtanysblue.Text = "200"; - } - if (Convert.ToInt32(txtanysblue.Text) < 100) - { - txtanysblue.Text = "100"; - } - if (Convert.ToInt32(txtanysgreen.Text) > 200) - { - txtanysgreen.Text = "200"; - } - if (Convert.ToInt32(txtanysgreen.Text) < 100) - { - txtanysgreen.Text = "100"; - } - break; - case 3: - if (Convert.ToInt32(txtanysred.Text) > 225) - { - txtanysred.Text = "225"; - } - if (Convert.ToInt32(txtanysred.Text) < 75) - { - txtanysred.Text = "75"; - } - if (Convert.ToInt32(txtanysblue.Text) > 225) - { - txtanysblue.Text = "225"; - } - if (Convert.ToInt32(txtanysblue.Text) < 75) - { - txtanysblue.Text = "75"; - } - if (Convert.ToInt32(txtanysgreen.Text) > 225) - { - txtanysgreen.Text = "225"; - } - if (Convert.ToInt32(txtanysgreen.Text) < 75) - { - txtanysgreen.Text = "75"; - } - break; - case 4: - if (Convert.ToInt32(txtanysred.Text) > 255) - { - txtanysred.Text = "255"; - } - if (Convert.ToInt32(txtanysred.Text) < 0) - { - txtanysred.Text = "0"; - } - if (Convert.ToInt32(txtanysblue.Text) > 255) - { - txtanysblue.Text = "255"; - } - if (Convert.ToInt32(txtanysblue.Text) < 0) - { - txtanysblue.Text = "0"; - } - if (Convert.ToInt32(txtanysgreen.Text) > 255) - { - txtanysgreen.Text = "255"; - } - if (Convert.ToInt32(txtanysgreen.Text) < 0) - { - txtanysgreen.Text = "0"; - } - break; - } - pnlanycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtanysred.Text), Convert.ToInt16(txtanysgreen.Text), Convert.ToInt16(txtanysblue.Text)); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlgraycustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Gray Rules"; - //infobox.textinfo = "You must input a value between 0 (black) and 255 (white) to form a shade of gray." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Gray Memory Wiped"; - //infobox.textinfo = "All your custom shades of Gray have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.graymemory, 0, API.graymemory.Length); - setupboughtcolours(); - loadmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlpurplecustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Purple Rules"; - //infobox.textinfo = "Blue must have the highest value followed by red. Green must then have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Purple Memory Wiped"; - //infobox.textinfo = "All your custom shades of Purple have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.purplememory, 0, API.purplememory.Length); - setupboughtcolours(); - loadmemory(); - } - - } - - // ERROR: Handles clauses are not supported in C# - private void pnlbluecustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Blue Rules"; - //infobox.textinfo = "Blue must have the highest value followed by green. Red must then have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Blue Memory Wiped"; - //infobox.textinfo = "All your custom shades of Blue have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.bluememory, 0, API.bluememory.Length); - setupboughtcolours(); - loadmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlgreencustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Green Rules"; - //infobox.textinfo = "Green must have the highest value. Red and Blue need to have values within 150 of eachother." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Green Memory Wiped"; - //infobox.textinfo = "All your custom shades of Green have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.greenmemory, 0, API.greenmemory.Length); - setupboughtcolours(); - loadmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlyellowcustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Yellow Rules"; - //infobox.textinfo = "Red must have the highest value and be over 180. Green must be within 30 values of red. Blue must be the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Yellow Memory Wiped"; - //infobox.textinfo = "All your custom shades of Yellow have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.yellowmemory, 0, API.yellowmemory.Length); - setupboughtcolours(); - loadmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlorangecustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Orange Rules"; - //infobox.textinfo = "Red must have a value of 255. Green must be 100 or more values less than red. Blue must be 30 or more values less than green." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Orange Memory Wiped"; - //infobox.textinfo = "All your custom shades of Orange have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.orangememory, 0, API.orangememory.Length); - setupboughtcolours(); - loadmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlbrowncustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Brown Rules"; - //infobox.textinfo = "Red must have the highest value. Green must be 30 - 128 values lower than red. Blue must be 60 or more values less than green." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Brown Memory Wiped"; - //infobox.textinfo = "All your custom shades of Brown have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.brownmemory, 0, API.brownmemory.Length); - setupboughtcolours(); - loadmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlredcustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Red Rules"; - //infobox.textinfo = "Red must have the highest value. Green and blue must be 80 or more values less than red but within 50 values of eachother." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Red Memory Wiped"; - //infobox.textinfo = "All your custom shades of Red have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.redmemory, 0, API.redmemory.Length); - setupboughtcolours(); - loadmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlpinkcustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - //infobox.title = "Pink Rules"; - //infobox.textinfo = "Red must have the highest value. Blue must be 50 or more values less than red. Green must have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Pink Memory Wiped"; - //infobox.textinfo = "All your custom shades of Pink have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.pinkmemory, 0, API.pinkmemory.Length); - setupboughtcolours(); - loadmemory(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void pnlanycustomcolour_Click(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - switch (anylevel) - { - case 1: - //infobox.title = "Custom Rules"; - //infobox.textinfo = "Red, Green and Blue may be set to any value between 100 and 150" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - break; - case 2: - //infobox.title = "Custom Rules"; - //infobox.textinfo = "Red, Green and Blue may be set to any value between 100 and 200" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - break; - case 3: - //infobox.title = "Custom Rules"; - //infobox.textinfo = "Red, Green and Blue may be set to any value between 75 and 225" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - break; - case 4: - //infobox.title = "Custom Rules"; - //infobox.textinfo = "Red, Green and Blue may be set to any value between 0 and 255" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; - //infobox.Show(); - break; - } - } - - if (e.Button == MouseButtons.Right) - { - //infobox.title = "Custom Colour Memory Wiped"; - //infobox.textinfo = "All your custom colour shades of have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; - //infobox.Show(); - Array.Clear(API.anymemory, 0, API.anymemory.Length); - setupboughtcolours(); - loadmemory(); - } - - } - } -} diff --git a/source/WindowsFormsApplication1/Color_Picker.resx b/source/WindowsFormsApplication1/Color_Picker.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/Color_Picker.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Computer.Designer.cs b/source/WindowsFormsApplication1/Computer.Designer.cs deleted file mode 100644 index 4157592..0000000 --- a/source/WindowsFormsApplication1/Computer.Designer.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace ShiftOS -{ - partial class Computer - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if(this.HealthTimer != null) - { - this.HealthTimer.Stop(); - } - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.lbstats = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // lbstats - // - this.lbstats.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbstats.ForeColor = System.Drawing.Color.Black; - this.lbstats.Location = new System.Drawing.Point(0, 0); - this.lbstats.Name = "lbstats"; - this.lbstats.Size = new System.Drawing.Size(64, 64); - this.lbstats.TabIndex = 0; - this.lbstats.Text = "HP: 100"; - this.lbstats.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.lbstats.Click += new System.EventHandler(this.lbstats_Click); - // - // Computer - // - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.lbstats); - this.Name = "Computer"; - this.Size = new System.Drawing.Size(64, 64); - this.Load += new System.EventHandler(this.Computer_Load); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Label lbstats; - } -} diff --git a/source/WindowsFormsApplication1/Computer.cs b/source/WindowsFormsApplication1/Computer.cs deleted file mode 100644 index 8f849d3..0000000 --- a/source/WindowsFormsApplication1/Computer.cs +++ /dev/null @@ -1,492 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Computer : UserControl - { - public int TotalHP = 100; - - public Computer() - { - InitializeComponent(); - } - - int _HP = 100; - - public void Repair(int hp) - { - this._HP += hp; - var h = OnRepair; - if(h != null) - { - h(this, new EventArgs()); - } - } - - public event EventHandler OnRepair; - - public int HP - { - get - { - return _HP; - } - set - { - _HP = value; - } - } - - - public SystemType Type - { - get; set; - } - - - List _Connections = null; - - - public Connection[] Connections { - get - { - return - _Connections.ToArray(); - - } - } - - public bool Enemy { get; set; } - public Computer EnemyComputer { get; set; } - - public int GetDamageRate() - { - switch(Grade) - { - case 1: - return 1; - case 2: - return 2; - case 3: - return 4; - case 4: - return 8; - default: - return 1; - } - } - - public int GetChance() - { - switch (Grade) - { - case 1: - return 200; - case 2: - return 150; - case 3: - return 100; - case 4: - return 50; - default: - return 200; - } - } - - public AttackType GetProperType() - { - switch(Type) - { - case SystemType.DedicatedDDoS: - return AttackType.DDoS; - case SystemType.Core: - return AttackType.Core; - case SystemType.Turret: - return AttackType.Virus; - default: - return AttackType.None; - } - } - - public List Enemies = null; - - public void LaunchAttack(AttackType type) - { - var rnd = new Random(); - switch (type) - { - case AttackType.Virus: - int chance = rnd.Next(1, 10); - if(chance == 5) - { - int rate = 1; - Deteriorate(rate); - } - break; - case AttackType.DDoS: - int cmax = GetChance(); - int c = rnd.Next(0, cmax); - if(c == 50) - { - this.Disable(); - } - break; - } - } - - public void LaunchAttack(AttackType type, int rate) - { - switch (type) - { - case AttackType.Virus: - var rnd = new Random(); - int chance = rnd.Next(1, 10); - if (chance == 5) - { - Deteriorate(rate); - } - break; - case AttackType.Core: - LaunchAttack(AttackType.Virus); //Small virus attack as last resort. - break; - default: - LaunchAttack(type); - break; - } - } - - public string Hostname { get; set; } - - public event EventHandler HP_Decreased; - - public void Deteriorate(int amount) - { - if (amount == 1 && DamageDefector > 1) - { - - } - else { - this._HP -= amount / DamageDefector; - EventHandler handler = HP_Decreased; - if (handler != null) - { - handler(this, new EventArgs()); - } - } - } - - public bool Disabled = false; - - public void Disable() - { - var t = new Timer(); - t.Interval = 1000; - int i = 0; - t.Tick += (object s, EventArgs a) => - { - if(i == 5) - { - Disabled = false; - this.BackColor = Color.White; - t.Stop(); - } - else - { - Disabled = true; - this.BackColor = Color.Gray; - } - i += 1; - }; - t.Start(); - } - - public void Flash(Label l) - { - int i = 100; - var t = new Timer(); - int p = 0; - t.Interval = i; - t.Tick += (object s, EventArgs a) => - { - if (p == 10) - { - t.Stop(); - this.BackColor = Color.White; - l.Hide(); - } - else { - if (this.BackColor == Color.White) - { - this.BackColor = Color.Black; - } - else - { - this.BackColor = Color.White; - } - } - p += 1; - }; - t.Start(); - } - public event EventHandler AntivirusRepair; - - public event EventHandler OnAIAttack; - - public void ThrowEnemyAttack() - { - var h = OnAIAttack; - if(h != null) - { - h(this, new EventArgs()); - } - } - - public int Grade { get; set; } - - public Rectangle GetAreaOfEffect() - { - int r = 50; - switch(Grade) - { - case 1: - r = 50; - break; - case 2: - r = 100; - break; - case 3: - r = 150; - break; - case 4: - r = 200; - break; - } - return new Rectangle(this.Left - r, this.Top - r, this.Width + (r * 2), this.Height + (r * 2)); - - } - - public int DamageDefector = 1; - - public int GetTotal() - { - switch (Type) - { - case SystemType.Core: - return 100; - default: - switch (Grade) - { - case 1: - return 10; - case 2: - return 20; - case 3: - return 40; - case 4: - return 80; - default: - return 10; - } - } - } - - public Timer HealthTimer = null; - - public bool AlreadyEnslaved = false; - public bool Enslaved = false; - - public event EventHandler EnslavedModule; - - - public event EventHandler MassDDoS; - - private void Computer_Load(object sender, EventArgs e) - { - Enemies = new List(); - var t = new Timer(); - t.Interval = 100; - t.Tick += (object s, EventArgs a) => - { - if (this.HP > 0) - { - lbstats.Text = $"HP: {_HP}"; - if(!Enemy) - { - foreach(var m in Hacking.MyNetwork) - { - if(m.Hostname == Hostname) - { - m.HP = _HP; - } - } - } - switch (Type) - { - case SystemType.Core: - this.Size = new Size(64, 64); - try - { - this.Location = new Point( - (this.Parent.Width - this.Width) / 2, - (this.Parent.Height - this.Height) / 2 - ); - } - catch - { - - } - break; - case SystemType.RepairModule: - case SystemType.Antivirus: - var r = new Random(); - int i = r.Next(0, 20); - if (i == 10) - { - EventHandler handler = AntivirusRepair; - if (handler != null) - { - handler(this, new EventArgs()); - } - } - this.Size = new Size(32, 32); - break; - case SystemType.ModuleStealer: - var rnd = new Random(); - int num = rnd.Next(0, 2500 / Grade); - if(num == 25) - { - StolenModule?.Invoke(this, new EventArgs()); - } - break; - case SystemType.Enslaver: - if (AlreadyEnslaved == false) - { - var ernd = new Random(); - int num2 = ernd.Next(0, 2500 / Grade); - if (num2 == 25) - { - AlreadyEnslaved = true; - EnslavedModule?.Invoke(this, new EventArgs()); - } - } - break; - case SystemType.ServerStack: - var r2 = new Random(); - int i2 = r2.Next(0, GetChance()); - if (i2 == GetChance() / 2) - { - EventHandler handler = this.MassDDoS; - if (handler != null) - { - handler(this, new EventArgs()); - } - } - this.Size = new Size(48, 48); - break; - default: - this.Size = new Size(32, 32); - break; - } - if (Disabled == false) - { - if (API.Upgrades["limitlesscustomshades"] == true) - { - if(_HP > TotalHP / 2) - { - this.BackColor = Color.Green; - lbstats.ForeColor = Color.Black; - } - else - { - if(_HP > TotalHP / 3) - { - this.BackColor = Color.Orange; - lbstats.ForeColor = Color.Black; - } - else - { - this.BackColor = Color.Red; - lbstats.ForeColor = Color.White; - } - } - } - if (Enemy == true) - { - var rnd = new Random(); - int chance = rnd.Next(0, 100); - if (chance == 50) - { - ThrowEnemyAttack(); - } - } - } - } - else - { - t.Stop(); - this.Visible = false; - ThrowDestroyed(); - } - }; - t.Start(); - HealthTimer = t; - } - - public event EventHandler StolenModule; - - public event EventHandler OnDestruction; - - public void ThrowDestroyed() - { - var h = OnDestruction; - if(h != null) - { - h(this, new EventArgs()); - } - } - - public event EventHandler Select; - - private void lbstats_Click(object sender, EventArgs e) - { - var h = this.Select; - if(h != null) - { - h(this, e); - } - } - } - - public enum SystemType - { - Core = 0, - Antivirus = 1, - DedicatedDDoS = 2, - Turret = 3, - FTPServer = 4, - Firewall = 5, - ServerStack = 6, - Enslaver = 7, - RepairModule = 9, - ModuleStealer = 8, - } - - public enum AttackType { - Virus, - DDoS, - Worm, - Spazzer, - Backdoor, - None, - Core, - } - -} diff --git a/source/WindowsFormsApplication1/Computer.resx b/source/WindowsFormsApplication1/Computer.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/Computer.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Connection.Designer.cs b/source/WindowsFormsApplication1/Connection.Designer.cs deleted file mode 100644 index 071ff4a..0000000 --- a/source/WindowsFormsApplication1/Connection.Designer.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace ShiftOS -{ - partial class Connection - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // Connection - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Name = "Connection"; - this.Size = new System.Drawing.Size(150, 10); - this.ResumeLayout(false); - - } - - #endregion - } -} diff --git a/source/WindowsFormsApplication1/Connection.cs b/source/WindowsFormsApplication1/Connection.cs deleted file mode 100644 index b322581..0000000 --- a/source/WindowsFormsApplication1/Connection.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Connection : UserControl - { - public Connection() - { - InitializeComponent(); - } - - Computer conleft; - Computer conright; - - public Computer ConnectionLeft - { - get - { - return conleft; - } - } - - public Computer ConnectionRight - { - get - { - return conright; - } - } - } -} diff --git a/source/WindowsFormsApplication1/Connection.resx b/source/WindowsFormsApplication1/Connection.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/Connection.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ConnectionManager.Designer.cs b/source/WindowsFormsApplication1/ConnectionManager.Designer.cs deleted file mode 100644 index 89abcca..0000000 --- a/source/WindowsFormsApplication1/ConnectionManager.Designer.cs +++ /dev/null @@ -1,129 +0,0 @@ -namespace ShiftOS -{ - partial class ConnectionManager - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.panel1 = new System.Windows.Forms.Panel(); - this.lbconnections = new System.Windows.Forms.ListBox(); - this.flbuttons = new System.Windows.Forms.FlowLayoutPanel(); - this.btnadd = new System.Windows.Forms.Button(); - this.btnconnect = new System.Windows.Forms.Button(); - this.btndisconnect = new System.Windows.Forms.Button(); - this.panel1.SuspendLayout(); - this.flbuttons.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Controls.Add(this.flbuttons); - this.panel1.Controls.Add(this.lbconnections); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(684, 531); - this.panel1.TabIndex = 0; - // - // lbconnections - // - this.lbconnections.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbconnections.FormattingEnabled = true; - this.lbconnections.Location = new System.Drawing.Point(13, 13); - this.lbconnections.Name = "lbconnections"; - this.lbconnections.Size = new System.Drawing.Size(659, 472); - this.lbconnections.TabIndex = 0; - this.lbconnections.SelectedIndexChanged += new System.EventHandler(this.lbconnections_SelectedIndexChanged); - // - // flbuttons - // - this.flbuttons.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flbuttons.Controls.Add(this.btnadd); - this.flbuttons.Controls.Add(this.btnconnect); - this.flbuttons.Controls.Add(this.btndisconnect); - this.flbuttons.Location = new System.Drawing.Point(13, 489); - this.flbuttons.Name = "flbuttons"; - this.flbuttons.Size = new System.Drawing.Size(659, 30); - this.flbuttons.TabIndex = 1; - // - // btnadd - // - this.btnadd.Location = new System.Drawing.Point(3, 3); - this.btnadd.Name = "btnadd"; - this.btnadd.Size = new System.Drawing.Size(75, 23); - this.btnadd.TabIndex = 0; - this.btnadd.Text = "Add"; - this.btnadd.UseVisualStyleBackColor = true; - this.btnadd.Click += new System.EventHandler(this.btnadd_Click); - // - // btnconnect - // - this.btnconnect.Location = new System.Drawing.Point(84, 3); - this.btnconnect.Name = "btnconnect"; - this.btnconnect.Size = new System.Drawing.Size(75, 23); - this.btnconnect.TabIndex = 1; - this.btnconnect.Text = "Connect"; - this.btnconnect.UseVisualStyleBackColor = true; - this.btnconnect.Click += new System.EventHandler(this.btnconnect_Click); - // - // btndisconnect - // - this.btndisconnect.Location = new System.Drawing.Point(165, 3); - this.btndisconnect.Name = "btndisconnect"; - this.btndisconnect.Size = new System.Drawing.Size(75, 23); - this.btndisconnect.TabIndex = 2; - this.btndisconnect.Text = "Disconnect"; - this.btndisconnect.UseVisualStyleBackColor = true; - this.btndisconnect.Click += new System.EventHandler(this.btndisconnect_Click); - // - // ConnectionManager - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(684, 531); - this.Controls.Add(this.panel1); - this.Name = "ConnectionManager"; - this.Text = "ConnectionManager"; - this.Load += new System.EventHandler(this.ConnectionManager_Load); - this.panel1.ResumeLayout(false); - this.flbuttons.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.FlowLayoutPanel flbuttons; - private System.Windows.Forms.Button btnadd; - private System.Windows.Forms.Button btnconnect; - private System.Windows.Forms.Button btndisconnect; - private System.Windows.Forms.ListBox lbconnections; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ConnectionManager.cs b/source/WindowsFormsApplication1/ConnectionManager.cs deleted file mode 100644 index eaf2a24..0000000 --- a/source/WindowsFormsApplication1/ConnectionManager.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class ConnectionManager : Form - { - public ConnectionManager() - { - InitializeComponent(); - } - - string selectednet = null; - - private void lbconnections_SelectedIndexChanged(object sender, EventArgs e) - { - try - { - selectednet = lbconnections.SelectedItem.ToString(); - SetupUI(); - } - catch - { - selectednet = null; - SetupUI(); - } - } - - public void SetupUI() - { - if(selectednet != null) - { - btnconnect.Visible = !Package_Grabber.clients[selectednet].IsConnected; - btndisconnect.Visible = Package_Grabber.clients[selectednet].IsConnected; - } - else - { - btnconnect.Hide(); - btndisconnect.Hide(); - } - } - - private void ConnectionManager_Load(object sender, EventArgs e) - { - SetupUI(); - var t = new Timer(); - t.Interval = 500; - t.Tick += (object s, EventArgs a) => - { - lbconnections.Items.Clear(); - foreach(var itm in Package_Grabber.clients) - { - lbconnections.Items.Add(itm.Key); - } - }; - t.Start(); - } - - private void btndisconnect_Click(object sender, EventArgs e) - { - Package_Grabber.Disconnect(selectednet); - SetupUI(); - } - - private void btnconnect_Click(object sender, EventArgs e) - { - Package_Grabber.ConnectToServer(selectednet, 7429); - SetupUI(); - } - - private void btnadd_Click(object sender, EventArgs e) - { - API.CreateInfoboxSession("Add connection", "Please type the IP Address or hostname of the server.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (o, a) => - { - var res = API.GetInfoboxResult(); - if(res != "Cancelled") - { - Package_Grabber.ConnectToServer(res, 7429); - } - }; - } - } -} diff --git a/source/WindowsFormsApplication1/ConnectionManager.resx b/source/WindowsFormsApplication1/ConnectionManager.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/ConnectionManager.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/Computer.Designer.cs b/source/WindowsFormsApplication1/Controls/Computer.Designer.cs new file mode 100644 index 0000000..4157592 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Computer.Designer.cs @@ -0,0 +1,66 @@ +namespace ShiftOS +{ + partial class Computer + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(this.HealthTimer != null) + { + this.HealthTimer.Stop(); + } + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbstats = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // lbstats + // + this.lbstats.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbstats.ForeColor = System.Drawing.Color.Black; + this.lbstats.Location = new System.Drawing.Point(0, 0); + this.lbstats.Name = "lbstats"; + this.lbstats.Size = new System.Drawing.Size(64, 64); + this.lbstats.TabIndex = 0; + this.lbstats.Text = "HP: 100"; + this.lbstats.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbstats.Click += new System.EventHandler(this.lbstats_Click); + // + // Computer + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.White; + this.Controls.Add(this.lbstats); + this.Name = "Computer"; + this.Size = new System.Drawing.Size(64, 64); + this.Load += new System.EventHandler(this.Computer_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lbstats; + } +} diff --git a/source/WindowsFormsApplication1/Controls/Computer.cs b/source/WindowsFormsApplication1/Controls/Computer.cs new file mode 100644 index 0000000..8f849d3 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Computer.cs @@ -0,0 +1,492 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Computer : UserControl + { + public int TotalHP = 100; + + public Computer() + { + InitializeComponent(); + } + + int _HP = 100; + + public void Repair(int hp) + { + this._HP += hp; + var h = OnRepair; + if(h != null) + { + h(this, new EventArgs()); + } + } + + public event EventHandler OnRepair; + + public int HP + { + get + { + return _HP; + } + set + { + _HP = value; + } + } + + + public SystemType Type + { + get; set; + } + + + List _Connections = null; + + + public Connection[] Connections { + get + { + return + _Connections.ToArray(); + + } + } + + public bool Enemy { get; set; } + public Computer EnemyComputer { get; set; } + + public int GetDamageRate() + { + switch(Grade) + { + case 1: + return 1; + case 2: + return 2; + case 3: + return 4; + case 4: + return 8; + default: + return 1; + } + } + + public int GetChance() + { + switch (Grade) + { + case 1: + return 200; + case 2: + return 150; + case 3: + return 100; + case 4: + return 50; + default: + return 200; + } + } + + public AttackType GetProperType() + { + switch(Type) + { + case SystemType.DedicatedDDoS: + return AttackType.DDoS; + case SystemType.Core: + return AttackType.Core; + case SystemType.Turret: + return AttackType.Virus; + default: + return AttackType.None; + } + } + + public List Enemies = null; + + public void LaunchAttack(AttackType type) + { + var rnd = new Random(); + switch (type) + { + case AttackType.Virus: + int chance = rnd.Next(1, 10); + if(chance == 5) + { + int rate = 1; + Deteriorate(rate); + } + break; + case AttackType.DDoS: + int cmax = GetChance(); + int c = rnd.Next(0, cmax); + if(c == 50) + { + this.Disable(); + } + break; + } + } + + public void LaunchAttack(AttackType type, int rate) + { + switch (type) + { + case AttackType.Virus: + var rnd = new Random(); + int chance = rnd.Next(1, 10); + if (chance == 5) + { + Deteriorate(rate); + } + break; + case AttackType.Core: + LaunchAttack(AttackType.Virus); //Small virus attack as last resort. + break; + default: + LaunchAttack(type); + break; + } + } + + public string Hostname { get; set; } + + public event EventHandler HP_Decreased; + + public void Deteriorate(int amount) + { + if (amount == 1 && DamageDefector > 1) + { + + } + else { + this._HP -= amount / DamageDefector; + EventHandler handler = HP_Decreased; + if (handler != null) + { + handler(this, new EventArgs()); + } + } + } + + public bool Disabled = false; + + public void Disable() + { + var t = new Timer(); + t.Interval = 1000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + if(i == 5) + { + Disabled = false; + this.BackColor = Color.White; + t.Stop(); + } + else + { + Disabled = true; + this.BackColor = Color.Gray; + } + i += 1; + }; + t.Start(); + } + + public void Flash(Label l) + { + int i = 100; + var t = new Timer(); + int p = 0; + t.Interval = i; + t.Tick += (object s, EventArgs a) => + { + if (p == 10) + { + t.Stop(); + this.BackColor = Color.White; + l.Hide(); + } + else { + if (this.BackColor == Color.White) + { + this.BackColor = Color.Black; + } + else + { + this.BackColor = Color.White; + } + } + p += 1; + }; + t.Start(); + } + public event EventHandler AntivirusRepair; + + public event EventHandler OnAIAttack; + + public void ThrowEnemyAttack() + { + var h = OnAIAttack; + if(h != null) + { + h(this, new EventArgs()); + } + } + + public int Grade { get; set; } + + public Rectangle GetAreaOfEffect() + { + int r = 50; + switch(Grade) + { + case 1: + r = 50; + break; + case 2: + r = 100; + break; + case 3: + r = 150; + break; + case 4: + r = 200; + break; + } + return new Rectangle(this.Left - r, this.Top - r, this.Width + (r * 2), this.Height + (r * 2)); + + } + + public int DamageDefector = 1; + + public int GetTotal() + { + switch (Type) + { + case SystemType.Core: + return 100; + default: + switch (Grade) + { + case 1: + return 10; + case 2: + return 20; + case 3: + return 40; + case 4: + return 80; + default: + return 10; + } + } + } + + public Timer HealthTimer = null; + + public bool AlreadyEnslaved = false; + public bool Enslaved = false; + + public event EventHandler EnslavedModule; + + + public event EventHandler MassDDoS; + + private void Computer_Load(object sender, EventArgs e) + { + Enemies = new List(); + var t = new Timer(); + t.Interval = 100; + t.Tick += (object s, EventArgs a) => + { + if (this.HP > 0) + { + lbstats.Text = $"HP: {_HP}"; + if(!Enemy) + { + foreach(var m in Hacking.MyNetwork) + { + if(m.Hostname == Hostname) + { + m.HP = _HP; + } + } + } + switch (Type) + { + case SystemType.Core: + this.Size = new Size(64, 64); + try + { + this.Location = new Point( + (this.Parent.Width - this.Width) / 2, + (this.Parent.Height - this.Height) / 2 + ); + } + catch + { + + } + break; + case SystemType.RepairModule: + case SystemType.Antivirus: + var r = new Random(); + int i = r.Next(0, 20); + if (i == 10) + { + EventHandler handler = AntivirusRepair; + if (handler != null) + { + handler(this, new EventArgs()); + } + } + this.Size = new Size(32, 32); + break; + case SystemType.ModuleStealer: + var rnd = new Random(); + int num = rnd.Next(0, 2500 / Grade); + if(num == 25) + { + StolenModule?.Invoke(this, new EventArgs()); + } + break; + case SystemType.Enslaver: + if (AlreadyEnslaved == false) + { + var ernd = new Random(); + int num2 = ernd.Next(0, 2500 / Grade); + if (num2 == 25) + { + AlreadyEnslaved = true; + EnslavedModule?.Invoke(this, new EventArgs()); + } + } + break; + case SystemType.ServerStack: + var r2 = new Random(); + int i2 = r2.Next(0, GetChance()); + if (i2 == GetChance() / 2) + { + EventHandler handler = this.MassDDoS; + if (handler != null) + { + handler(this, new EventArgs()); + } + } + this.Size = new Size(48, 48); + break; + default: + this.Size = new Size(32, 32); + break; + } + if (Disabled == false) + { + if (API.Upgrades["limitlesscustomshades"] == true) + { + if(_HP > TotalHP / 2) + { + this.BackColor = Color.Green; + lbstats.ForeColor = Color.Black; + } + else + { + if(_HP > TotalHP / 3) + { + this.BackColor = Color.Orange; + lbstats.ForeColor = Color.Black; + } + else + { + this.BackColor = Color.Red; + lbstats.ForeColor = Color.White; + } + } + } + if (Enemy == true) + { + var rnd = new Random(); + int chance = rnd.Next(0, 100); + if (chance == 50) + { + ThrowEnemyAttack(); + } + } + } + } + else + { + t.Stop(); + this.Visible = false; + ThrowDestroyed(); + } + }; + t.Start(); + HealthTimer = t; + } + + public event EventHandler StolenModule; + + public event EventHandler OnDestruction; + + public void ThrowDestroyed() + { + var h = OnDestruction; + if(h != null) + { + h(this, new EventArgs()); + } + } + + public event EventHandler Select; + + private void lbstats_Click(object sender, EventArgs e) + { + var h = this.Select; + if(h != null) + { + h(this, e); + } + } + } + + public enum SystemType + { + Core = 0, + Antivirus = 1, + DedicatedDDoS = 2, + Turret = 3, + FTPServer = 4, + Firewall = 5, + ServerStack = 6, + Enslaver = 7, + RepairModule = 9, + ModuleStealer = 8, + } + + public enum AttackType { + Virus, + DDoS, + Worm, + Spazzer, + Backdoor, + None, + Core, + } + +} diff --git a/source/WindowsFormsApplication1/Controls/Computer.resx b/source/WindowsFormsApplication1/Controls/Computer.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Computer.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/Connection.Designer.cs b/source/WindowsFormsApplication1/Controls/Connection.Designer.cs new file mode 100644 index 0000000..071ff4a --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Connection.Designer.cs @@ -0,0 +1,45 @@ +namespace ShiftOS +{ + partial class Connection + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // Connection + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Name = "Connection"; + this.Size = new System.Drawing.Size(150, 10); + this.ResumeLayout(false); + + } + + #endregion + } +} diff --git a/source/WindowsFormsApplication1/Controls/Connection.cs b/source/WindowsFormsApplication1/Controls/Connection.cs new file mode 100644 index 0000000..b322581 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Connection.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Connection : UserControl + { + public Connection() + { + InitializeComponent(); + } + + Computer conleft; + Computer conright; + + public Computer ConnectionLeft + { + get + { + return conleft; + } + } + + public Computer ConnectionRight + { + get + { + return conright; + } + } + } +} diff --git a/source/WindowsFormsApplication1/Controls/Connection.resx b/source/WindowsFormsApplication1/Controls/Connection.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Connection.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/DesktopIcon.Designer.cs b/source/WindowsFormsApplication1/Controls/DesktopIcon.Designer.cs new file mode 100644 index 0000000..98369ab --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/DesktopIcon.Designer.cs @@ -0,0 +1,78 @@ +namespace ShiftOS +{ + partial class DesktopIcon + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pbicon = new System.Windows.Forms.PictureBox(); + this.lbiconname = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pbicon)).BeginInit(); + this.SuspendLayout(); + // + // pbicon + // + this.pbicon.Location = new System.Drawing.Point(4, 4); + this.pbicon.Name = "pbicon"; + this.pbicon.Size = new System.Drawing.Size(78, 50); + this.pbicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.pbicon.TabIndex = 0; + this.pbicon.TabStop = false; + this.pbicon.DoubleClick += new System.EventHandler(this.Icon_Click); + // + // lbiconname + // + this.lbiconname.AutoEllipsis = true; + this.lbiconname.ForeColor = System.Drawing.Color.White; + this.lbiconname.Location = new System.Drawing.Point(4, 61); + this.lbiconname.Name = "lbiconname"; + this.lbiconname.Size = new System.Drawing.Size(78, 23); + this.lbiconname.TabIndex = 1; + this.lbiconname.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbiconname.DoubleClick += new System.EventHandler(this.Icon_Click); + // + // DesktopIcon + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Transparent; + this.Controls.Add(this.lbiconname); + this.Controls.Add(this.pbicon); + this.Name = "DesktopIcon"; + this.Size = new System.Drawing.Size(85, 85); + this.Load += new System.EventHandler(this.DesktopIcon_Load); + this.DoubleClick += new System.EventHandler(this.Icon_Click); + ((System.ComponentModel.ISupportInitialize)(this.pbicon)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pbicon; + private System.Windows.Forms.Label lbiconname; + } +} diff --git a/source/WindowsFormsApplication1/Controls/DesktopIcon.cs b/source/WindowsFormsApplication1/Controls/DesktopIcon.cs new file mode 100644 index 0000000..bfb0940 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/DesktopIcon.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; + +namespace ShiftOS +{ + public partial class DesktopIcon : UserControl + { + /// + /// User control for a desktop icon. + /// + public DesktopIcon() + { + InitializeComponent(); + } + + public string IconName + { + set + { + lbiconname.Text = value; + } + get + { + return lbiconname.Text; + } + } + + public Image Icon + { + set + { + pbicon.Image = value; + } + get + { + return pbicon.Image; + } + } + + //public string LuaAction { get; set; } + public string LuaAction = "open_program(\"shiftorium\")"; + private void Icon_Click(object sender, EventArgs e) + { + if (File.Exists(Paths.Desktop + IconName)) + { + var fs = new File_Skimmer(); + fs.OpenFile(Paths.Desktop + IconName); + } + else + { + var li = new LuaInterpreter(); + li.mod(LuaAction); + lbiconname.BackColor = Color.White; + t.Start(); + } + } + + public Timer t = new Timer(); + + + private void DesktopIcon_Load(object sender, EventArgs e) + { + t.Interval = 5000; + t.Tick += (object s, EventArgs a) => + { + lbiconname.BackColor = Color.Transparent; + }; + var st = new Timer(); + st.Interval = 200; + st.Tick += (object s, EventArgs a) => { + lbiconname.ForeColor = API.CurrentSkin.IconTextColor; + }; + } + } +} diff --git a/source/WindowsFormsApplication1/Controls/DesktopIcon.resx b/source/WindowsFormsApplication1/Controls/DesktopIcon.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/DesktopIcon.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/IconControl.Designer.cs b/source/WindowsFormsApplication1/Controls/IconControl.Designer.cs new file mode 100644 index 0000000..b86f908 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/IconControl.Designer.cs @@ -0,0 +1,92 @@ +namespace ShiftOS +{ + partial class IconControl + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.pblarge = new System.Windows.Forms.PictureBox(); + this.lbname = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pblarge)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.pblarge); + this.panel1.Controls.Add(this.lbname); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(171, 56); + this.panel1.TabIndex = 0; + // + // pblarge + // + this.pblarge.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pblarge.Location = new System.Drawing.Point(135, 3); + this.pblarge.Name = "pblarge"; + this.pblarge.Size = new System.Drawing.Size(32, 32); + this.pblarge.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.pblarge.TabIndex = 2; + this.pblarge.TabStop = false; + this.pblarge.Click += new System.EventHandler(this.pblarge_Click); + // + // lbname + // + this.lbname.Cursor = System.Windows.Forms.Cursors.IBeam; + this.lbname.Dock = System.Windows.Forms.DockStyle.Left; + this.lbname.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbname.Location = new System.Drawing.Point(0, 0); + this.lbname.Name = "lbname"; + this.lbname.Size = new System.Drawing.Size(154, 54); + this.lbname.TabIndex = 0; + this.lbname.Text = "Icon Name"; + this.lbname.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // IconControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panel1); + this.Name = "IconControl"; + this.Size = new System.Drawing.Size(171, 56); + this.Load += new System.EventHandler(this.IconControl_Load); + this.panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pblarge)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label lbname; + private System.Windows.Forms.PictureBox pblarge; + } +} diff --git a/source/WindowsFormsApplication1/Controls/IconControl.cs b/source/WindowsFormsApplication1/Controls/IconControl.cs new file mode 100644 index 0000000..e103ced --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/IconControl.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Drawing.Imaging; +using Newtonsoft.Json; +using System.IO; + +namespace ShiftOS +{ + public partial class IconControl : UserControl + { + public IconControl() + { + InitializeComponent(); + } + + private void IconControl_Load(object sender, EventArgs e) + { + pblarge.Top = (this.Height - pblarge.Height) / 2; + } + + + + public Image LargeImage + { + get + { + return pblarge.Image; + } + set + { + pblarge.Image = value; + } + } + + public string IconName + { + get + { + return lbname.Text; + + } + set + { + lbname.Text = value; + } + } + + private void pblarge_Click(object sender, EventArgs e) + { + API.CreateGraphicPickerSession($"Icon - {IconName}", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + if(API.GraphicPickerSession.IdleImage != null) + { + LargeImage = API.GraphicPickerSession.IdleImage; + } + }; + } + } + + +} diff --git a/source/WindowsFormsApplication1/Controls/IconControl.resx b/source/WindowsFormsApplication1/Controls/IconControl.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/IconControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/ImageSelector.Designer.cs b/source/WindowsFormsApplication1/Controls/ImageSelector.Designer.cs new file mode 100644 index 0000000..7340ceb --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ImageSelector.Designer.cs @@ -0,0 +1,76 @@ +namespace ShiftOS +{ + partial class ImageSelector + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.btnselect = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.BackColor = System.Drawing.Color.White; + this.label1.Dock = System.Windows.Forms.DockStyle.Left; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label1.ForeColor = System.Drawing.Color.Black; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(186, 33); + this.label1.TabIndex = 0; + this.label1.Text = "Image:"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // btnselect + // + this.btnselect.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnselect.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnselect.Location = new System.Drawing.Point(186, 0); + this.btnselect.Name = "btnselect"; + this.btnselect.Size = new System.Drawing.Size(40, 33); + this.btnselect.TabIndex = 1; + this.btnselect.UseVisualStyleBackColor = true; + this.btnselect.Click += new System.EventHandler(this.btnselect_Click); + // + // ImageSelector + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.btnselect); + this.Controls.Add(this.label1); + this.Name = "ImageSelector"; + this.Size = new System.Drawing.Size(226, 33); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnselect; + } +} diff --git a/source/WindowsFormsApplication1/Controls/ImageSelector.cs b/source/WindowsFormsApplication1/Controls/ImageSelector.cs new file mode 100644 index 0000000..b1aa4d2 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ImageSelector.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; + +namespace ShiftOS +{ + public partial class ImageSelector : UserControl + { + public ImageSelector() + { + InitializeComponent(); + } + + public Image Image + { + get + { + return btnselect.BackgroundImage; + } + } + + private string _ImagePath = null; + + public string ImagePath + { + get + { + return _ImagePath; + } + } + + private void btnselect_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".pic;.png;.jpg;.bmp", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + var finf = new FileInfo(res); + _ImagePath = finf.Name; + btnselect.BackgroundImage = Image.FromFile(res); + btnselect.BackgroundImageLayout = ImageLayout.Center; + } + }; + } + } +} diff --git a/source/WindowsFormsApplication1/Controls/ImageSelector.resx b/source/WindowsFormsApplication1/Controls/ImageSelector.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ImageSelector.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/NetModuleStatus.Designer.cs b/source/WindowsFormsApplication1/Controls/NetModuleStatus.Designer.cs new file mode 100644 index 0000000..31608d4 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/NetModuleStatus.Designer.cs @@ -0,0 +1,84 @@ +namespace ShiftOS +{ + partial class NetModuleStatus + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbinfo = new System.Windows.Forms.Label(); + this.pghealth = new ShiftOS.ProgressBarEX(); + this.SuspendLayout(); + // + // lbinfo + // + this.lbinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.lbinfo.Location = new System.Drawing.Point(4, 4); + this.lbinfo.Name = "lbinfo"; + this.lbinfo.Size = new System.Drawing.Size(102, 22); + this.lbinfo.TabIndex = 1; + this.lbinfo.Text = "label1"; + // + // pghealth + // + this.pghealth.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pghealth.BackColor = System.Drawing.Color.Black; + this.pghealth.BlockSeparation = 3; + this.pghealth.BlockWidth = 5; + this.pghealth.Color = System.Drawing.Color.Gray; + this.pghealth.ForeColor = System.Drawing.Color.White; + this.pghealth.Location = new System.Drawing.Point(112, 4); + this.pghealth.MaxValue = 100; + this.pghealth.MinValue = 0; + this.pghealth.Name = "pghealth"; + this.pghealth.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal; + this.pghealth.ShowValue = true; + this.pghealth.Size = new System.Drawing.Size(227, 22); + this.pghealth.Step = 10; + this.pghealth.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Continuous; + this.pghealth.TabIndex = 0; + this.pghealth.Value = 0; + // + // NetModuleStatus + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lbinfo); + this.Controls.Add(this.pghealth); + this.Name = "NetModuleStatus"; + this.Size = new System.Drawing.Size(352, 26); + this.ResumeLayout(false); + + } + + #endregion + + private ProgressBarEX pghealth; + private System.Windows.Forms.Label lbinfo; + } +} diff --git a/source/WindowsFormsApplication1/Controls/NetModuleStatus.cs b/source/WindowsFormsApplication1/Controls/NetModuleStatus.cs new file mode 100644 index 0000000..037f73a --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/NetModuleStatus.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class NetModuleStatus : UserControl + { + private Module _module = null; + + public NetModuleStatus(Module m) + { + _module = m; + InitializeComponent(); + var t = new Timer(); + t.Tick += (object s, EventArgs a) => + { + lbinfo.Text = _module.Hostname; + pghealth.MaxValue = _module.GetTotalHP(); + pghealth.Value = _module.HP; + if(_module.HP == _module.GetTotalHP()) + { + if(this.Visible == true) + { + this.Hide(); + } + } + else + { + if(this.Visible == false) + { + this.Show(); + } + } + }; + t.Interval = 100; + t.Start(); + } + } +} diff --git a/source/WindowsFormsApplication1/Controls/NetModuleStatus.resx b/source/WindowsFormsApplication1/Controls/NetModuleStatus.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/NetModuleStatus.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/Notification.Designer.cs b/source/WindowsFormsApplication1/Controls/Notification.Designer.cs new file mode 100644 index 0000000..57b6416 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Notification.Designer.cs @@ -0,0 +1,78 @@ +namespace ShiftOS +{ + partial class Notification + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbtitle = new System.Windows.Forms.Label(); + this.lbmessage = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // lbtitle + // + this.lbtitle.AutoSize = true; + this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbtitle.Location = new System.Drawing.Point(3, 9); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Size = new System.Drawing.Size(135, 20); + this.lbtitle.TabIndex = 0; + this.lbtitle.Text = "Package Installed"; + // + // lbmessage + // + this.lbmessage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbmessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.lbmessage.Location = new System.Drawing.Point(7, 33); + this.lbmessage.Name = "lbmessage"; + this.lbmessage.Size = new System.Drawing.Size(345, 67); + this.lbmessage.TabIndex = 1; + this.lbmessage.Text = "The package \"shiftnet\" has been successfully installed."; + // + // Notification + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Gray; + this.Controls.Add(this.lbmessage); + this.Controls.Add(this.lbtitle); + this.ForeColor = System.Drawing.Color.White; + this.Name = "Notification"; + this.Size = new System.Drawing.Size(355, 100); + this.Load += new System.EventHandler(this.Notification_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.Label lbmessage; + } +} diff --git a/source/WindowsFormsApplication1/Controls/Notification.cs b/source/WindowsFormsApplication1/Controls/Notification.cs new file mode 100644 index 0000000..b5e1693 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Notification.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Notification : UserControl + { + public Notification(string title, string text) + { + InitializeComponent(); + Title = title; + Message = text; + var t = new Timer(); + t.Interval = 5000; + t.Tick += (object s, EventArgs a) => + { + this.Dispose(); + }; + t.Start(); + } + + public string Title { get; set; } + public string Message { get; set; } + + private void Notification_Load(object sender, EventArgs e) + { + API.PlaySound(Properties.Resources.rolldown); + lbtitle.Text = Title; + lbmessage.Text = Message; + } + } +} diff --git a/source/WindowsFormsApplication1/Controls/Notification.resx b/source/WindowsFormsApplication1/Controls/Notification.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/Notification.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/ProgressBarEX.Designer.cs b/source/WindowsFormsApplication1/Controls/ProgressBarEX.Designer.cs new file mode 100644 index 0000000..219fb73 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ProgressBarEX.Designer.cs @@ -0,0 +1,37 @@ +namespace ShiftOS +{ + partial class ProgressBarEX + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.SuspendLayout(); + // + // ProgressBarEX + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Name = "ProgressBarEX"; + this.Size = new System.Drawing.Size(340, 32); + this.ResumeLayout(false); + + } + } +} diff --git a/source/WindowsFormsApplication1/Controls/ProgressBarEX.cs b/source/WindowsFormsApplication1/Controls/ProgressBarEX.cs new file mode 100644 index 0000000..0e64aad --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ProgressBarEX.cs @@ -0,0 +1,340 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class ProgressBarEX : UserControl + { + public ProgressBarEX() + { + InitializeComponent(); + } + + #region " Properties " + + private string _label = "Progress:"; + private bool show_label = false; + + public string Label + { + get + { + return _label; + } + set + { + _label = value; + this.Invalidate(); + } + } + + public bool ShowLabel + { + get + { + return show_label; + } + set + { + show_label = value; + this.Invalidate(); + } + } + + + private int _Value = 0; + public int Value + { + get { return _Value; } + set + { + if (value >= this.MinValue & value <= this.MaxValue) + { + _Value = value; + this.Invalidate(); + } + else { + throw new ArgumentOutOfRangeException("The value must be between the minimum and maximum values."); + } + } + } + + private int _Step = 10; + public int Step + { + get { return _Step; } + set { _Step = value; } + } + + private ProgressBarOrientation _Orientation; + public ProgressBarOrientation Orientation + { + get { return _Orientation; } + set { _Orientation = value; } + } + + private int _MinValue = 0; + public int MinValue + { + get { return _MinValue; } + set + { + if (value < this.MaxValue) + { + _MinValue = value; + } + else { + throw new ArgumentOutOfRangeException("The minimum value must be less than the maximum value."); + } + } + } + + private int _MaxValue = 100; + public int MaxValue + { + get { return _MaxValue; } + set + { + if (value > this.MinValue) + { + _MaxValue = value; + } + else { + throw new ArgumentOutOfRangeException("The maximum value must be more than the minimum value."); + } + } + } + + private Color _Color = Color.Lime; + public Color Color + { + get { return _Color; } + set { _Color = value; } + } + + private bool _ShowValue = true; + public bool ShowValue + { + get { return _ShowValue; } + set { _ShowValue = value; } + } + + private ProgressBarExStyle _Style; + public ProgressBarExStyle Style + { + get { return _Style; } + set { _Style = value; } + } + + private int _BlockWidth = 5; + public int BlockWidth + { + get { return _BlockWidth; } + set { _BlockWidth = value; } + } + + private int _BlockSeparation = 3; + public int BlockSeparation + { + get { return _BlockSeparation; } + set { _BlockSeparation = value; } + } + +#endregion + +#region " Enums, Variables " + + public enum ProgressBarOrientation + { + Horizontal = 0, + Vertical = 1 + } + + public enum ProgressBarExStyle + { + Blocks = 0, + Continuous = 1, + Marquee = 2 + } + +#endregion + +#region " Events " + + public event PaintBackgroundEventHandler PaintBackground; + public delegate void PaintBackgroundEventHandler(object sender, PaintEventArgs e); + public event PaintProcessEventHandler PaintProcess; + public delegate void PaintProcessEventHandler(object sender, ProgressBarProcessPaintEventArgs e); + + public class ProgressBarProcessPaintEventArgs : EventArgs + { + + public ProgressBarProcessPaintEventArgs(Rectangle bounds, Graphics g, Rectangle[] blocks = null) + { + _Bounds = bounds; + _Graphics = g; + if (blocks == null) + { + _Blocks = new Rectangle[] { + + }; + } + else { + _Blocks = blocks; + } + } + + private Rectangle _Bounds; + public Rectangle Bounds + { + get { return _Bounds; } + } + + private Rectangle[] _Blocks; + public Rectangle[] Blocks + { + get { return _Blocks; } + } + + private Graphics _Graphics; + public Graphics Graphics + { + get { return _Graphics; } + } + + } + +#endregion + +#region " Methods " + + public void PerformStep() + { + if (this.Step > 0) + { + this.Value = Math.Min(this.Value + this.Step, this.MaxValue); + } + else { + this.Value = Math.Max(this.Value + this.Step, this.MinValue); + } + } + + public void Increment(int value) + { + if (value > 0) + { + this.Value = Math.Min(this.Value + value, this.MaxValue); + } + else { + this.Value = Math.Max(this.Value + value, this.MinValue); + } + } + +#endregion + +#region " Process Logic " + + private Rectangle GetProcessRect() + { + int w = this.Width; + int h = this.Height; + int valRel = GetRelativeValue(); + return new Rectangle(0, 0, w * valRel / 100, h); + } + + private Rectangle[] GetBlocks() + { + List b = new List(); + + int w = this.BlockWidth; + int h = this.Height; + Rectangle r; + + int x = 0; + int stopX = (int)(GetRelativeValue() / 100) * this.Width; + while ((x + w <= stopX)) + { + r = new Rectangle(x, 0, w, h); + b.Add(r); + + x += this.BlockWidth + this.BlockSeparation; + } + + return b.ToArray(); + } + + private int GetRelativeValue() + { + return (int)100 * this.Value / (this.MaxValue - this.MinValue); + } + +#endregion + +#region " Drawing " + + protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) + { + base.OnPaint(e); + DoPaintBackground(e.Graphics); + DoPaintProcess(e.Graphics); + if (this.ShowValue) + DoPaintValue(e.Graphics); + } + + private void DoPaintBackground(Graphics g) + { + if (PaintBackground != null) + { + PaintBackground(this, new PaintEventArgs(g, this.ClientRectangle)); + } + } + + private void DoPaintProcess(Graphics g) + { + Rectangle rect = GetProcessRect(); + Rectangle[] blocks = GetBlocks(); + using (SolidBrush brush = new SolidBrush(this.Color)) + { + if (this.Style == ProgressBarExStyle.Continuous) + { + g.FillRectangle(brush, rect); + } + else if (this.Style == ProgressBarExStyle.Blocks) + { + foreach (Rectangle b in blocks) + { + g.FillRectangle(brush, b); + } + } + } + + ProgressBarProcessPaintEventArgs e = new ProgressBarProcessPaintEventArgs(rect, g, blocks); + if (PaintProcess != null) + { + PaintProcess(this, e); + } + } + + private void DoPaintValue(Graphics g) + { + string valStr = GetRelativeValue().ToString() + "%"; + if (show_label) + valStr = _label + " " + valStr; + + StringFormat sf = new StringFormat(); + sf.Alignment = StringAlignment.Center; + SizeF s = g.MeasureString(valStr, this.Font); + + g.DrawString(valStr, this.Font, new SolidBrush(this.ForeColor), (this.Width - s.Width) / 2, (this.Height - s.Height) / 2); + } + +#endregion + } +} diff --git a/source/WindowsFormsApplication1/Controls/ProgressBarEX.resx b/source/WindowsFormsApplication1/Controls/ProgressBarEX.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ProgressBarEX.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/ShifterColorInput.Designer.cs b/source/WindowsFormsApplication1/Controls/ShifterColorInput.Designer.cs new file mode 100644 index 0000000..47cf0a1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterColorInput.Designer.cs @@ -0,0 +1,77 @@ +namespace ShiftOS +{ + partial class ShifterColorInput + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pnlmainbuttoncolour = new System.Windows.Forms.Panel(); + this.lblabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // pnlmainbuttoncolour + // + this.pnlmainbuttoncolour.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlmainbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmainbuttoncolour.Location = new System.Drawing.Point(128, 3); + this.pnlmainbuttoncolour.MaximumSize = new System.Drawing.Size(41, 20); + this.pnlmainbuttoncolour.Name = "pnlmainbuttoncolour"; + this.pnlmainbuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlmainbuttoncolour.TabIndex = 3; + // + // lblabel + // + this.lblabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblabel.Location = new System.Drawing.Point(3, 6); + this.lblabel.Name = "lblabel"; + this.lblabel.Size = new System.Drawing.Size(122, 19); + this.lblabel.TabIndex = 2; + this.lblabel.Text = "Main Button Colour:"; + this.lblabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ShifterColorInput + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pnlmainbuttoncolour); + this.Controls.Add(this.lblabel); + this.Name = "ShifterColorInput"; + this.Size = new System.Drawing.Size(173, 28); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlmainbuttoncolour; + private System.Windows.Forms.Label lblabel; + + } +} diff --git a/source/WindowsFormsApplication1/Controls/ShifterColorInput.cs b/source/WindowsFormsApplication1/Controls/ShifterColorInput.cs new file mode 100644 index 0000000..11bedf0 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterColorInput.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class ShifterColorInput : IShifterSetting + { + public ShifterColorInput() + { + InitializeComponent(); + pnlmainbuttoncolour.Click += (o, e) => + { + API.CreateColorPickerSession(Text, pnlmainbuttoncolour.BackColor); + API.ColorPickerSession.FormClosing += (s, a) => + { + var res = API.GetLastColorFromSession(); + pnlmainbuttoncolour.BackColor = res; + InvokeEvent(o, e); + }; + }; + } + + public override string Text + { + get { return lblabel.Text; } + set { lblabel.Text = value; } + } + + public override object Value + { + get { return pnlmainbuttoncolour.BackColor; } + set + { + pnlmainbuttoncolour.BackColor = (Color)value; + } + } + + + } +} diff --git a/source/WindowsFormsApplication1/Controls/ShifterColorInput.resx b/source/WindowsFormsApplication1/Controls/ShifterColorInput.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterColorInput.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.Designer.cs b/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.Designer.cs new file mode 100644 index 0000000..b09416f --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.Designer.cs @@ -0,0 +1,76 @@ +namespace ShiftOS +{ + partial class ShifterGraphicInput + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pnlmainbuttoncolour = new System.Windows.Forms.Panel(); + this.lblabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // pnlmainbuttoncolour + // + this.pnlmainbuttoncolour.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlmainbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmainbuttoncolour.Location = new System.Drawing.Point(129, 3); + this.pnlmainbuttoncolour.MaximumSize = new System.Drawing.Size(41, 20); + this.pnlmainbuttoncolour.Name = "pnlmainbuttoncolour"; + this.pnlmainbuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlmainbuttoncolour.TabIndex = 3; + // + // lblabel + // + this.lblabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblabel.Location = new System.Drawing.Point(3, 6); + this.lblabel.Name = "lblabel"; + this.lblabel.Size = new System.Drawing.Size(123, 18); + this.lblabel.TabIndex = 2; + this.lblabel.Text = "Main Button Colour:"; + this.lblabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ShifterGraphicInput + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pnlmainbuttoncolour); + this.Controls.Add(this.lblabel); + this.Name = "ShifterGraphicInput"; + this.Size = new System.Drawing.Size(174, 27); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlmainbuttoncolour; + private System.Windows.Forms.Label lblabel; + } +} diff --git a/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.cs b/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.cs new file mode 100644 index 0000000..8e15e07 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class ShifterGraphicInput : IShifterSetting + { + public ShifterGraphicInput() + { + InitializeComponent(); + pnlmainbuttoncolour.Click += (o, e) => + { + API.CreateGraphicPickerSession(Text, false); + API.GraphicPickerSession.FormClosing += (s, a) => + { + var res = API.GetGraphicPickerResult(); + if(res != "fail") + { + pnlmainbuttoncolour.BackgroundImage = API.GraphicPickerSession.IdleImage; + InvokeEvent(o, e); + } + }; + }; + } + + public override string Text + { + get { return lblabel.Text; } + set { lblabel.Text = value; } + } + + public override object Value + { + get { return pnlmainbuttoncolour.BackgroundImage; } + set + { + pnlmainbuttoncolour.BackgroundImage = (Image)value; + } + } + + } +} diff --git a/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.resx b/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterGraphicInput.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/ShifterIntInput.Designer.cs b/source/WindowsFormsApplication1/Controls/ShifterIntInput.Designer.cs new file mode 100644 index 0000000..130db0c --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterIntInput.Designer.cs @@ -0,0 +1,83 @@ +namespace ShiftOS +{ + partial class ShifterIntInput + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txttext = new System.Windows.Forms.TextBox(); + this.Label51 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // txttext + // + this.txttext.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.txttext.BackColor = System.Drawing.Color.White; + this.txttext.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttext.ForeColor = System.Drawing.Color.Black; + this.txttext.Location = new System.Drawing.Point(174, 3); + this.txttext.MinimumSize = new System.Drawing.Size(5, 2); + this.txttext.Name = "txttext"; + this.txttext.Size = new System.Drawing.Size(36, 22); + this.txttext.TabIndex = 32; + this.txttext.TextChanged += new System.EventHandler(this.txttext_TextChanged); + // + // Label51 + // + this.Label51.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Label51.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label51.Location = new System.Drawing.Point(0, 0); + this.Label51.Name = "Label51"; + this.Label51.Size = new System.Drawing.Size(168, 29); + this.Label51.TabIndex = 31; + this.Label51.Text = "Label:"; + this.Label51.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ShifterIntInput + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.Controls.Add(this.txttext); + this.Controls.Add(this.Label51); + this.Name = "ShifterIntInput"; + this.Size = new System.Drawing.Size(213, 29); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txttext; + private System.Windows.Forms.Label Label51; + + } +} diff --git a/source/WindowsFormsApplication1/Controls/ShifterIntInput.cs b/source/WindowsFormsApplication1/Controls/ShifterIntInput.cs new file mode 100644 index 0000000..782d265 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterIntInput.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class ShifterIntInput : IShifterSetting + { + public ShifterIntInput() + { + InitializeComponent(); + } + + public bool NoDecimal + { + get; + set; + } + + public override string Text + { + get { return Label51.Text; } + set { Label51.Text = value; } + } + + public override object Value + { + get { + if (NoDecimal) + return Convert.ToInt32(txttext.Text); + else + return Convert.ToDecimal(txttext.Text); + } + set + { + txttext.Text = value.ToString(); + } + } + + private void txttext_TextChanged(object sender, EventArgs e) + { + try + { + if (NoDecimal) + Value = Convert.ToInt32(txttext.Text); + else + Value = Convert.ToDecimal(txttext.Text); + InvokeEvent(sender, e); + } + catch + { + txttext.Text = Value.ToString(); + } + } + } +} diff --git a/source/WindowsFormsApplication1/Controls/ShifterIntInput.resx b/source/WindowsFormsApplication1/Controls/ShifterIntInput.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterIntInput.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/ShifterTextInput.Designer.cs b/source/WindowsFormsApplication1/Controls/ShifterTextInput.Designer.cs new file mode 100644 index 0000000..9da62c6 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterTextInput.Designer.cs @@ -0,0 +1,78 @@ +namespace ShiftOS +{ + partial class ShifterTextInput + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txttext = new System.Windows.Forms.TextBox(); + this.Label51 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // txttext + // + this.txttext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txttext.BackColor = System.Drawing.Color.White; + this.txttext.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttext.ForeColor = System.Drawing.Color.Black; + this.txttext.Location = new System.Drawing.Point(106, 7); + this.txttext.MinimumSize = new System.Drawing.Size(5, 2); + this.txttext.Name = "txttext"; + this.txttext.Size = new System.Drawing.Size(116, 22); + this.txttext.TabIndex = 32; + // + // Label51 + // + this.Label51.Dock = System.Windows.Forms.DockStyle.Left; + this.Label51.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label51.Location = new System.Drawing.Point(0, 0); + this.Label51.Name = "Label51"; + this.Label51.Size = new System.Drawing.Size(100, 29); + this.Label51.TabIndex = 31; + this.Label51.Text = "Label:"; + this.Label51.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ShifterTextInput + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.Controls.Add(this.txttext); + this.Controls.Add(this.Label51); + this.Name = "ShifterTextInput"; + this.Size = new System.Drawing.Size(222, 29); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txttext; + private System.Windows.Forms.Label Label51; + } +} diff --git a/source/WindowsFormsApplication1/Controls/ShifterTextInput.cs b/source/WindowsFormsApplication1/Controls/ShifterTextInput.cs new file mode 100644 index 0000000..6e59649 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterTextInput.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class ShifterTextInput : IShifterSetting + { + public ShifterTextInput() + { + InitializeComponent(); + txttext.TextChanged += (o, e) => + { + Value = txttext.Text; + InvokeEvent(o, e); + }; + } + + public override string Text + { + get + { + return Label51.Text; + } + set + { + Label51.Text = value; + } + } + + public override object Value + { + get + { + return txttext.Text; + } + set + { + txttext.Text = value as string; + } + } + + + + } + + public class IShifterSetting : UserControl + { + public virtual string Text { get; set; } + public virtual object Value { get; set; } + public event EventHandler OnValueChange; + + public void InvokeEvent(object s, EventArgs a) + { + OnValueChange?.Invoke(s, a); + } + } + +} diff --git a/source/WindowsFormsApplication1/Controls/ShifterTextInput.resx b/source/WindowsFormsApplication1/Controls/ShifterTextInput.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/ShifterTextInput.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/WindowBorder.Designer.cs b/source/WindowsFormsApplication1/Controls/WindowBorder.Designer.cs new file mode 100644 index 0000000..6e0970e --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/WindowBorder.Designer.cs @@ -0,0 +1,270 @@ +using System; + +namespace ShiftOS +{ + partial class WindowBorder + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgleft = new System.Windows.Forms.Panel(); + this.pgbottomlcorner = new System.Windows.Forms.Panel(); + this.pgright = new System.Windows.Forms.Panel(); + this.pgbottomrcorner = new System.Windows.Forms.Panel(); + this.titlebar = new System.Windows.Forms.Panel(); + this.minimizebutton = new System.Windows.Forms.Panel(); + this.pnlicon = new System.Windows.Forms.PictureBox(); + this.rollupbutton = new System.Windows.Forms.Panel(); + this.closebutton = new System.Windows.Forms.Panel(); + this.lbtitletext = new System.Windows.Forms.Label(); + this.pgtoplcorner = new System.Windows.Forms.Panel(); + this.pgtoprcorner = new System.Windows.Forms.Panel(); + this.pgbottom = new System.Windows.Forms.Panel(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.pullbs = new System.Windows.Forms.Timer(this.components); + this.pullbottom = new System.Windows.Forms.Timer(this.components); + this.pullside = new System.Windows.Forms.Timer(this.components); + this.pgleft.SuspendLayout(); + this.pgright.SuspendLayout(); + this.titlebar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pnlicon)).BeginInit(); + this.SuspendLayout(); + // + // pgleft + // + this.pgleft.BackColor = System.Drawing.Color.Gray; + this.pgleft.Controls.Add(this.pgbottomlcorner); + this.pgleft.Dock = System.Windows.Forms.DockStyle.Left; + this.pgleft.Location = new System.Drawing.Point(0, 30); + this.pgleft.Name = "pgleft"; + this.pgleft.Size = new System.Drawing.Size(2, 345); + this.pgleft.TabIndex = 16; + this.pgleft.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Rightpull_MouseDown); + this.pgleft.MouseEnter += new System.EventHandler(this.RightCursorOn_MouseDown); + this.pgleft.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); + this.pgleft.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rightpull_MouseUp); + // + // pgbottomlcorner + // + this.pgbottomlcorner.BackColor = System.Drawing.Color.Red; + this.pgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pgbottomlcorner.Location = new System.Drawing.Point(0, 343); + this.pgbottomlcorner.Name = "pgbottomlcorner"; + this.pgbottomlcorner.Size = new System.Drawing.Size(2, 2); + this.pgbottomlcorner.TabIndex = 14; + this.pgbottomlcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bspull_MouseDown); + this.pgbottomlcorner.MouseEnter += new System.EventHandler(this.CornerCursorOn_MouseDown); + this.pgbottomlcorner.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); + this.pgbottomlcorner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.bspull_MouseUp); + // + // pgright + // + this.pgright.BackColor = System.Drawing.Color.Gray; + this.pgright.Controls.Add(this.pgbottomrcorner); + this.pgright.Dock = System.Windows.Forms.DockStyle.Right; + this.pgright.Location = new System.Drawing.Point(545, 30); + this.pgright.Name = "pgright"; + this.pgright.Size = new System.Drawing.Size(2, 345); + this.pgright.TabIndex = 17; + this.pgright.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Rightpull_MouseDown); + this.pgright.MouseEnter += new System.EventHandler(this.RightCursorOn_MouseDown); + this.pgright.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); + this.pgright.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rightpull_MouseUp); + // + // pgbottomrcorner + // + this.pgbottomrcorner.BackColor = System.Drawing.Color.Red; + this.pgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pgbottomrcorner.Location = new System.Drawing.Point(0, 343); + this.pgbottomrcorner.Name = "pgbottomrcorner"; + this.pgbottomrcorner.Size = new System.Drawing.Size(2, 2); + this.pgbottomrcorner.TabIndex = 15; + this.pgbottomrcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bspull_MouseDown); + this.pgbottomrcorner.MouseEnter += new System.EventHandler(this.CornerCursorOn_MouseDown); + this.pgbottomrcorner.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); + this.pgbottomrcorner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.bspull_MouseUp); + // + // titlebar + // + this.titlebar.BackColor = System.Drawing.Color.Gray; + this.titlebar.Controls.Add(this.minimizebutton); + this.titlebar.Controls.Add(this.pnlicon); + this.titlebar.Controls.Add(this.rollupbutton); + this.titlebar.Controls.Add(this.closebutton); + this.titlebar.Controls.Add(this.lbtitletext); + this.titlebar.Controls.Add(this.pgtoplcorner); + this.titlebar.Controls.Add(this.pgtoprcorner); + this.titlebar.Dock = System.Windows.Forms.DockStyle.Top; + this.titlebar.ForeColor = System.Drawing.Color.White; + this.titlebar.Location = new System.Drawing.Point(0, 0); + this.titlebar.Name = "titlebar"; + this.titlebar.Size = new System.Drawing.Size(547, 30); + this.titlebar.TabIndex = 14; + this.titlebar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseDown); + this.titlebar.MouseMove += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseMove); + this.titlebar.MouseUp += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseUp); + // + // minimizebutton + // + this.minimizebutton.BackColor = System.Drawing.Color.Black; + this.minimizebutton.Location = new System.Drawing.Point(246, 5); + this.minimizebutton.Name = "minimizebutton"; + this.minimizebutton.Size = new System.Drawing.Size(22, 22); + this.minimizebutton.TabIndex = 24; + this.minimizebutton.Click += new System.EventHandler(this.minimizebutton_Click); + // + // pnlicon + // + this.pnlicon.BackColor = System.Drawing.Color.Transparent; + this.pnlicon.Location = new System.Drawing.Point(8, 8); + this.pnlicon.Name = "pnlicon"; + this.pnlicon.Size = new System.Drawing.Size(16, 16); + this.pnlicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pnlicon.TabIndex = 24; + this.pnlicon.TabStop = false; + this.pnlicon.Visible = false; + // + // rollupbutton + // + this.rollupbutton.BackColor = System.Drawing.Color.Black; + this.rollupbutton.Location = new System.Drawing.Point(274, 3); + this.rollupbutton.Name = "rollupbutton"; + this.rollupbutton.Size = new System.Drawing.Size(22, 22); + this.rollupbutton.TabIndex = 22; + this.rollupbutton.Click += new System.EventHandler(this.rollupbutton_Click); + // + // closebutton + // + this.closebutton.BackColor = System.Drawing.Color.Black; + this.closebutton.Location = new System.Drawing.Point(302, 3); + this.closebutton.Name = "closebutton"; + this.closebutton.Size = new System.Drawing.Size(22, 22); + this.closebutton.TabIndex = 20; + this.closebutton.Click += new System.EventHandler(this.closebutton_Click); + // + // lbtitletext + // + this.lbtitletext.AutoSize = true; + this.lbtitletext.BackColor = System.Drawing.Color.Transparent; + this.lbtitletext.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbtitletext.Location = new System.Drawing.Point(26, 7); + this.lbtitletext.Name = "lbtitletext"; + this.lbtitletext.Size = new System.Drawing.Size(77, 18); + this.lbtitletext.TabIndex = 19; + this.lbtitletext.Text = "Template"; + this.lbtitletext.MouseDown += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseDown); + this.lbtitletext.MouseMove += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseMove); + this.lbtitletext.MouseUp += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseUp); + // + // pgtoplcorner + // + this.pgtoplcorner.BackColor = System.Drawing.Color.Red; + this.pgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; + this.pgtoplcorner.Location = new System.Drawing.Point(0, 0); + this.pgtoplcorner.Name = "pgtoplcorner"; + this.pgtoplcorner.Size = new System.Drawing.Size(2, 30); + this.pgtoplcorner.TabIndex = 17; + // + // pgtoprcorner + // + this.pgtoprcorner.BackColor = System.Drawing.Color.Red; + this.pgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; + this.pgtoprcorner.Location = new System.Drawing.Point(545, 0); + this.pgtoprcorner.Name = "pgtoprcorner"; + this.pgtoprcorner.Size = new System.Drawing.Size(2, 30); + this.pgtoprcorner.TabIndex = 16; + // + // pgbottom + // + this.pgbottom.BackColor = System.Drawing.Color.Gray; + this.pgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pgbottom.Location = new System.Drawing.Point(2, 373); + this.pgbottom.Name = "pgbottom"; + this.pgbottom.Size = new System.Drawing.Size(543, 2); + this.pgbottom.TabIndex = 18; + this.pgbottom.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bottompull_MouseDown); + this.pgbottom.MouseEnter += new System.EventHandler(this.bottomCursorOn_MouseDown); + this.pgbottom.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); + this.pgbottom.MouseUp += new System.Windows.Forms.MouseEventHandler(this.bottompull_MouseUp); + // + // pgcontents + // + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(2, 30); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(543, 343); + this.pgcontents.TabIndex = 15; + // + // pullbs + // + this.pullbs.Interval = 1; + this.pullbs.Tick += new System.EventHandler(this.pullbs_Tick); + // + // pullbottom + // + this.pullbottom.Interval = 1; + this.pullbottom.Tick += new System.EventHandler(this.pullbottom_Tick); + // + // pullside + // + this.pullside.Interval = 1; + this.pullside.Tick += new System.EventHandler(this.pullside_Tick); + // + // WindowBorder + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pgcontents); + this.Controls.Add(this.pgbottom); + this.Controls.Add(this.pgright); + this.Controls.Add(this.pgleft); + this.Controls.Add(this.titlebar); + this.Name = "WindowBorder"; + this.Size = new System.Drawing.Size(547, 375); + this.Load += new System.EventHandler(this.Template_Load); + this.pgleft.ResumeLayout(false); + this.pgright.ResumeLayout(false); + this.titlebar.ResumeLayout(false); + this.titlebar.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pnlicon)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgleft; + internal System.Windows.Forms.Panel pgbottomlcorner; + internal System.Windows.Forms.Panel pgright; + internal System.Windows.Forms.Panel pgbottomrcorner; + internal System.Windows.Forms.Panel titlebar; + internal System.Windows.Forms.Panel pgtoplcorner; + internal System.Windows.Forms.Panel pgtoprcorner; + internal System.Windows.Forms.Panel pgbottom; + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Label lbtitletext; + internal System.Windows.Forms.Panel closebutton; + internal System.Windows.Forms.Panel rollupbutton; + internal System.Windows.Forms.PictureBox pnlicon; + internal System.Windows.Forms.Panel minimizebutton; + internal System.Windows.Forms.Timer pullbs; + internal System.Windows.Forms.Timer pullbottom; + internal System.Windows.Forms.Timer pullside; + + } +} diff --git a/source/WindowsFormsApplication1/Controls/WindowBorder.cs b/source/WindowsFormsApplication1/Controls/WindowBorder.cs new file mode 100644 index 0000000..751cb43 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/WindowBorder.cs @@ -0,0 +1,668 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class WindowBorder : UserControl + { + public Timer updater = new Timer(); + + public WindowBorder(string aname, Image aicon) + { + AppName = aname; + AppIcon = aicon; + InitializeComponent(); + } + + public Image AppIcon = null; + public string AppName = null; + + public void HideAll() + { + titlebar.Hide(); + pgleft.Hide(); + pgright.Hide(); + pgbottom.Hide(); + } + + #region "Template Code" + public int rolldownsize; + public int oldbordersize; + public int oldtitlebarheight; + public bool justopened = false; + public bool needtorollback = false; + //replace with minimum size + public int minimumsizewidth = 0; + //replace with minimum size + public int minimumsizeheight = 0; + + // ERROR: Handles clauses are not supported in C# + private void Template_Load(object sender, EventArgs e) + { + setupall(); + if (ParentForm.Name == "Terminal" && API.Upgrades["windowedterminal"] == false) + { + HideAll(); + } + string x = ParentForm.Width.ToString(); + string y = ParentForm.Height.ToString(); + ParentForm.MinimumSize = new Size(Convert.ToInt16(x), Convert.ToInt16(y)); + string mx = ParentForm.MinimumSize.Width.ToString(); + string my = ParentForm.MinimumSize.Height.ToString(); + Form frm = ParentForm; + pbtn = new PanelButton(AppName, AppIcon, ref frm); + API.PanelButtons.Add(pbtn); + if (API.CurrentSession != null) + { + API.CurrentSession.SetupPanelButtons(); + } + ParentForm.FormClosing += new FormClosingEventHandler(this.Clock_FormClosing); + var vtimer = new Timer(); + vtimer.Interval = 1000; + vtimer.Tick += (object s, EventArgs a) => + { + try { + if (API.Upgrades["titlebar"] == true) + { + titlebar.Show(); + } + else { + titlebar.Hide(); + } + + } + catch(Exception ex) + { + API.LogException(ex.Message, false); + } + if (Viruses.InfectedWith("windowmicrofier")) + { + if (this.Width > 0) + { + this.ParentForm.MinimumSize = new Size(0, 0); + this.ParentForm.Width -= 1; + } + if (this.Height > 0) + { + this.ParentForm.Height -= 1; + } + } + try { + if (this.ParentForm.TopMost == API.CurrentSession.UnityEnabled) + { + this.ParentForm.TopMost = !this.ParentForm.TopMost; + } + } + catch + { + //FAIL. + } + }; + vtimer.Start(); + //try { + ParentForm.Name = AppName.ToLower().Replace(" ", "_"); + /*} + catch(Exception ex) + { + ParentForm.Name = "null"; + }*/ + ParentForm.Tag = ParentForm.Location; + WindowComposition.WindowsEverywhere(this.ParentForm); + } + + private PanelButton pbtn = null; + + public void setupall() + { + setuptitlebar(); + setupborders(); + setskin(); + + } + + + + private void titlebar_MouseDown(object sender, MouseEventArgs e) + { + // Handle Draggable Windows + if (API.Upgrades["draggablewindows"] == true) + { + if (e.Button == MouseButtons.Left) + { + WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true); + LastMouseX = e.X; + LastMouseY = e.Y; + Resizing = true; + } + //ShiftOSDesktop.log = //ShiftOSDesktop.log + My.Computer.Clock.LocalTime + " User dragged " + this.Name + " to " + this.Location.ToString + Environment.NewLine; + } + } + + private bool Resizing = false; + private int LastMouseX = 0; + private int LastMouseY = 0; + + private void titlebar_MouseMove(object sender, MouseEventArgs e) + { + if(Resizing == true) + { + int left = 0; + int top = 0; + if (e.X < LastMouseX) + { + left = -1; + } + else if (e.X > LastMouseX) + { + left = 1; + } + if (e.Y < LastMouseY) + { + top = -1; + } + else if (e.Y > LastMouseY) + { + top = 1; + } + if (API.CurrentSkin.DragAnimation == WindowDragEffect.Shake) + { + WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true, left, top); + } + else { + + ParentForm.Left += left; + ParentForm.Top += top; + ParentForm.Tag = ParentForm.Location; + } + } + if(Viruses.InfectedWith("windowspazzer")) + { + int left = 0; + int top = 0; + if (e.X < LastMouseX) + { + left = -1; + } + else if (e.X > LastMouseX) + { + left = 1; + } + if (e.Y < LastMouseY) + { + top = -1; + } + else if (e.Y > LastMouseY) + { + top = 1; + } + WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true, left, top); + + } + } + + private void titlebar_MouseUp(object s, MouseEventArgs e) + { + WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, false); + + Resizing = false; + } + + public void setupborders() + { + if (API.Upgrades["windowborders"] == false) + { + pgleft.Hide(); + pgbottom.Hide(); + pgright.Hide(); + this.Size = new Size(this.Width - pgleft.Width - pgright.Width, this.Height - pgbottom.Height); + } + } + + private void closebutton_Click(object sender, EventArgs e) + { + this.ParentForm.Close(); + } + + private void closebutton_MouseEnter(object sender, EventArgs e) + { + closebutton.BackgroundImage = API.CurrentSkinImages.closebtnhover; + } + + private void closebutton_MouseLeave(object sender, EventArgs e) + { + closebutton.BackgroundImage = API.CurrentSkinImages.closebtn; + } + + private void closebutton_MouseDown(object sender, EventArgs e) + { + closebutton.BackgroundImage = API.CurrentSkinImages.closebtnclick; + } + + public Point OldLoc = new Point(0, 0); + public bool Minimized = false; + + private void minimizebutton_Click(object sender, EventArgs e) + { + API.MinimizeForm(ParentForm); + } + + private void rollupbutton_Click(object sender, EventArgs e) + { + rollupanddown(); + } + + private void rollupbutton_MouseEnter(object sender, EventArgs e) + { + rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtnhover; + } + + private void rollupbutton_MouseLeave(object sender, EventArgs e) + { + rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtn; + } + + private void rollupbutton_MouseDown(object sender, EventArgs e) + { + rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtnclick; + } + + public void setuptitlebar() + { + setupborders(); + + if (this.Height == this.titlebar.Height) { pgleft.Show(); pgbottom.Show(); pgright.Show(); this.Height = rolldownsize; needtorollback = true; } + pgleft.Width = API.CurrentSkin.borderwidth; + pgright.Width = API.CurrentSkin.borderwidth; + pgbottom.Height = API.CurrentSkin.borderwidth; + titlebar.Height = API.CurrentSkin.titlebarheight; + + if (justopened == true) + { + this.Size = new Size(420, 510); + //put the default size of your window here + this.Size = new Size(this.Width, this.Height + API.CurrentSkin.titlebarheight - 30); + this.Size = new Size(this.Width + API.CurrentSkin.borderwidth + API.CurrentSkin.borderwidth, this.Height + API.CurrentSkin.borderwidth); + oldbordersize = API.CurrentSkin.borderwidth; + oldtitlebarheight = API.CurrentSkin.titlebarheight; + justopened = false; + } + else { + if (this.Visible == true) + { + this.Size = new Size(this.Width - (2 * oldbordersize) + (2 * API.CurrentSkin.borderwidth), (this.Height - oldtitlebarheight - oldbordersize) + API.CurrentSkin.titlebarheight + API.CurrentSkin.borderwidth); + oldbordersize = API.CurrentSkin.borderwidth; + oldtitlebarheight = API.CurrentSkin.titlebarheight; + rolldownsize = this.Height; + if (needtorollback == true) { this.Height = titlebar.Height; pgleft.Hide(); pgbottom.Hide(); pgright.Hide(); } + } + } + + if (API.CurrentSkin.enablecorners == true) + { + pgtoplcorner.Show(); + pgtoprcorner.Show(); + pgtoprcorner.Width = API.CurrentSkin.titlebarcornerwidth; + pgtoplcorner.Width = API.CurrentSkin.titlebarcornerwidth; + } + else { + pgtoplcorner.Hide(); + pgtoprcorner.Hide(); + } + + if (API.Upgrades["titlebar"] == false) + { + titlebar.Hide(); + this.Size = new Size(this.Width, this.Size.Height - titlebar.Height); + } + + if (API.Upgrades["titletext"] == false) + { + lbtitletext.Hide(); + } + else { + lbtitletext.Font = new Font(API.CurrentSkin.titletextfontfamily, API.CurrentSkin.titletextfontsize, API.CurrentSkin.titletextfontstyle, GraphicsUnit.Point); + lbtitletext.Text = this.AppName; + //Remember to change to name of program!!!! + lbtitletext.Show(); + } + + if (API.Upgrades["closebutton"] == false) + { + closebutton.Hide(); + } + else { + closebutton.BackColor = API.CurrentSkin.closebtncolour; + closebutton.Size = API.CurrentSkin.closebtnsize; + closebutton.Show(); + } + + if (API.Upgrades["rollupbutton"] == false) + { + rollupbutton.Hide(); + } + else { + rollupbutton.BackColor = API.CurrentSkin.rollbtncolour; + rollupbutton.Size = API.CurrentSkin.rollbtnsize; + rollupbutton.Show(); + } + + if (API.Upgrades["minimizebutton"] == false) + { + minimizebutton.Hide(); + } + else { + minimizebutton.BackColor = API.CurrentSkin.minbtncolour; + minimizebutton.Size = API.CurrentSkin.minbtnsize; + minimizebutton.Show(); + } + + if (API.Upgrades["windowborders"] == true) + { + closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); + rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); + minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); + switch (API.CurrentSkin.titletextpos) + { + case "Left": + lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside, API.CurrentSkin.titletextfromtop); + break; + case "Centre": + lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); + break; + } + lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; + } + else { + closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); + rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); + minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); + switch (API.CurrentSkin.titletextpos) + { + case "Left": + lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside + pgtoplcorner.Width, API.CurrentSkin.titletextfromtop); + break; + case "Centre": + lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); + break; + } + lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; + } + + //Change when Icon skinning complete + // Change to program's icon + if (API.Upgrades["appicons"] == true) + { + pnlicon.Visible = true; + pnlicon.Location = new Point(API.CurrentSkin.titleiconfromside, API.CurrentSkin.titleiconfromtop); + pnlicon.Size = new Size(API.CurrentSkin.titlebariconsize, API.CurrentSkin.titlebariconsize); + pnlicon.Image = this.AppIcon; + //Replace with the correct icon for the program. + } + + } + + public void rollupanddown() + { + API.RollForm(this.ParentForm); + } + + public void resettitlebar() + { + if (API.Upgrades["windowborders"] == true) + { + closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); + rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); + minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); + switch (API.CurrentSkin.titletextpos) + { + case "Left": + lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside, API.CurrentSkin.titletextfromtop); + break; + case "Centre": + lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); + break; + } + lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; + } + else { + closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); + rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); + minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); + switch (API.CurrentSkin.titletextpos) + { + case "Left": + lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside + pgtoplcorner.Width, API.CurrentSkin.titletextfromtop); + break; + case "Centre": + lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); + break; + } + lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; + } + } + + // ERROR: Handles clauses are not supported in C# + private void pullside_Tick(System.Object sender, System.EventArgs e) + { + this.ParentForm.Width = Cursor.Position.X - this.ParentForm.Location.X; + resettitlebar(); + } + + // ERROR: Handles clauses are not supported in C# + private void pullbottom_Tick(System.Object sender, System.EventArgs e) + { + this.ParentForm.Height = Cursor.Position.Y - this.ParentForm.Location.Y; + resettitlebar(); + } + + // ERROR: Handles clauses are not supported in C# + private void pullbs_Tick(object sender, System.EventArgs e) + { + this.ParentForm.Width = Cursor.Position.X - this.ParentForm.Location.X; + this.ParentForm.Height = Cursor.Position.Y - this.ParentForm.Location.Y; + resettitlebar(); + } + + //delete this for non-resizable windows + // ERROR: Handles clauses are not supported in C# + private void Rightpull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + pullside.Start(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void RightCursorOn_MouseDown(object sender, System.EventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + Cursor = Cursors.SizeWE; + } + } + + // ERROR: Handles clauses are not supported in C# + private void bottomCursorOn_MouseDown(object sender, System.EventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + Cursor = Cursors.SizeNS; + } + } + + // ERROR: Handles clauses are not supported in C# + private void CornerCursorOn_MouseDown(object sender, System.EventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + Cursor = Cursors.SizeNWSE; + } + } + + // ERROR: Handles clauses are not supported in C# + private void SizeCursoroff_MouseDown(object sender, System.EventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + Cursor = Cursors.Default; + } + } + + // ERROR: Handles clauses are not supported in C# + private void rightpull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + pullside.Stop(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void bottompull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + pullbottom.Start(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void bottompull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + pullbottom.Stop(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void bspull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + pullbs.Start(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void bspull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) + { + if (API.Upgrades["resizablewindows"] == true) + { + pullbs.Stop(); + } + } + + public void setskin() + { + //disposals + closebutton.BackgroundImage = null; + titlebar.BackgroundImage = null; + rollupbutton.BackgroundImage = null; + pgtoplcorner.BackgroundImage = null; + pgtoprcorner.BackgroundImage = null; + minimizebutton.BackgroundImage = null; + //apply new skin + if (API.CurrentSkinImages.closebtn == null) + closebutton.BackColor = API.CurrentSkin.closebtncolour; + else + closebutton.BackgroundImage = API.CurrentSkinImages.closebtn; + closebutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.closebtnlayout; + if (API.CurrentSkinImages.titlebar == null) + titlebar.BackColor = API.CurrentSkin.titlebarcolour; + else + titlebar.BackgroundImage = API.CurrentSkinImages.titlebar; + titlebar.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.titlebarlayout; + if (API.CurrentSkinImages.rollbtn == null) + rollupbutton.BackColor = API.CurrentSkin.rollbtncolour; + else + rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtn; + rollupbutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.rollbtnlayout; + if (API.CurrentSkinImages.leftcorner == null) + pgtoplcorner.BackColor = API.CurrentSkin.leftcornercolour; + else + pgtoplcorner.BackgroundImage = API.CurrentSkinImages.leftcorner; + pgtoplcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.leftcornerlayout; + if (API.CurrentSkinImages.rightcorner == null) + pgtoprcorner.BackColor = API.CurrentSkin.rightcornercolour; + else + pgtoprcorner.BackgroundImage = API.CurrentSkinImages.rightcorner; + pgtoprcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.rightcornerlayout; + if (API.CurrentSkinImages.minbtn == null) + minimizebutton.BackColor = API.CurrentSkin.minbtncolour; + else + minimizebutton.BackgroundImage = API.CurrentSkinImages.minbtn; + minimizebutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.minbtnlayout; + if (API.CurrentSkinImages.borderleft == null) + pgleft.BackColor = API.CurrentSkin.borderleftcolour; + else + pgleft.BackgroundImage = API.CurrentSkinImages.borderleft; + pgleft.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderleftlayout; + if (API.CurrentSkinImages.borderright == null) + pgright.BackColor = API.CurrentSkin.borderrightcolour; + else + pgright.BackgroundImage = API.CurrentSkinImages.borderright; + pgleft.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderrightlayout; + if (API.CurrentSkinImages.borderbottom == null) + pgbottom.BackColor = API.CurrentSkin.borderbottomcolour; + else + pgbottom.BackgroundImage = API.CurrentSkinImages.borderbottom; + pgbottom.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderbottomlayout; + if (API.CurrentSkin.enablebordercorners == true) + { + if (API.CurrentSkinImages.bottomleftcorner == null) + pgbottomlcorner.BackColor = API.CurrentSkin.bottomleftcornercolour; + else + pgbottomlcorner.BackgroundImage = API.CurrentSkinImages.bottomleftcorner; + pgbottomlcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomleftcornerlayout; + if (API.CurrentSkinImages.bottomrightcorner == null) + pgbottomrcorner.BackColor = API.CurrentSkin.bottomrightcornercolour; + else + pgbottomrcorner.BackgroundImage = API.CurrentSkinImages.bottomrightcorner; + pgbottomrcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomrightcornerlayout; + } + else { + pgbottomlcorner.BackColor = API.CurrentSkin.borderrightcolour; + pgbottomrcorner.BackColor = API.CurrentSkin.borderrightcolour; + pgbottomlcorner.BackgroundImage = null; + pgbottomrcorner.BackgroundImage = null; + } + + //set bottom border corner size + pgbottomlcorner.Size = new Size(API.CurrentSkin.borderwidth, API.CurrentSkin.borderwidth); + pgbottomrcorner.Size = new Size(API.CurrentSkin.borderwidth, API.CurrentSkin.borderwidth); + pgbottomlcorner.Location = new Point(0, this.Height - API.CurrentSkin.borderwidth); + pgbottomrcorner.Location = new Point(this.Width, this.Height - API.CurrentSkin.borderwidth); + + //I don't know if this already happens... + pgright.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderrightlayout; + pgbottomrcorner.BackgroundImage = API.CurrentSkinImages.bottomrightcorner; + pgbottomlcorner.BackgroundImage = API.CurrentSkinImages.bottomleftcorner; + pgbottomrcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomrightcornerlayout; + pgbottomlcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomleftcornerlayout; + + + } + + // ERROR: Handles clauses are not supported in C# + private void Clock_FormClosing(object sender, FormClosingEventArgs e) + { + if (WindowComposition.ShuttingDown == false) + { + e.Cancel = true; + WindowComposition.CloseForm(this.ParentForm, pbtn, API.CurrentSkin.WindowCloseAnimation); + } + } + } + #endregion + +} + diff --git a/source/WindowsFormsApplication1/Controls/WindowBorder.resx b/source/WindowsFormsApplication1/Controls/WindowBorder.resx new file mode 100644 index 0000000..8bf59aa --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/WindowBorder.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 101, 17 + + + 214, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/infobox.Designer.cs b/source/WindowsFormsApplication1/Controls/infobox.Designer.cs new file mode 100644 index 0000000..1472a09 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/infobox.Designer.cs @@ -0,0 +1,187 @@ +using System; + +namespace ShiftOS +{ + partial class infobox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.pgcontents = new System.Windows.Forms.Panel(); + this.txtuserinput = new System.Windows.Forms.TextBox(); + this.btnok = new System.Windows.Forms.Button(); + this.txtmessage = new System.Windows.Forms.Label(); + this.pboximage = new System.Windows.Forms.PictureBox(); + this.lblintructtext = new System.Windows.Forms.Label(); + this.pnlyesno = new System.Windows.Forms.Panel(); + this.btnno = new System.Windows.Forms.Button(); + this.btnyes = new System.Windows.Forms.Button(); + this.pgcontents.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pboximage)).BeginInit(); + this.pnlyesno.SuspendLayout(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.txtuserinput); + this.pgcontents.Controls.Add(this.btnok); + this.pgcontents.Controls.Add(this.txtmessage); + this.pgcontents.Controls.Add(this.pboximage); + this.pgcontents.Controls.Add(this.lblintructtext); + this.pgcontents.Controls.Add(this.pnlyesno); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(371, 154); + this.pgcontents.TabIndex = 20; + // + // txtuserinput + // + this.txtuserinput.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.txtuserinput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtuserinput.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtuserinput.Location = new System.Drawing.Point(103, 86); + this.txtuserinput.Multiline = true; + this.txtuserinput.Name = "txtuserinput"; + this.txtuserinput.Size = new System.Drawing.Size(256, 23); + this.txtuserinput.TabIndex = 8; + this.txtuserinput.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtuserinput.Visible = false; + // + // btnok + // + this.btnok.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnok.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnok.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnok.ForeColor = System.Drawing.Color.Black; + this.btnok.Location = new System.Drawing.Point(134, 118); + this.btnok.Name = "btnok"; + this.btnok.Size = new System.Drawing.Size(109, 30); + this.btnok.TabIndex = 7; + this.btnok.TabStop = false; + this.btnok.Text = "Ok"; + this.btnok.UseVisualStyleBackColor = true; + this.btnok.Click += new System.EventHandler(this.btnok_Click); + // + // txtmessage + // + this.txtmessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtmessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtmessage.Location = new System.Drawing.Point(102, 7); + this.txtmessage.Name = "txtmessage"; + this.txtmessage.Size = new System.Drawing.Size(266, 102); + this.txtmessage.TabIndex = 2; + this.txtmessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // pboximage + // + this.pboximage.Image = global::ShiftOS.Properties.Resources.Symbolinfo1; + this.pboximage.Location = new System.Drawing.Point(12, 7); + this.pboximage.Name = "pboximage"; + this.pboximage.Size = new System.Drawing.Size(80, 70); + this.pboximage.TabIndex = 0; + this.pboximage.TabStop = false; + // + // lblintructtext + // + this.lblintructtext.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblintructtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.lblintructtext.Location = new System.Drawing.Point(105, 7); + this.lblintructtext.Name = "lblintructtext"; + this.lblintructtext.Size = new System.Drawing.Size(256, 76); + this.lblintructtext.TabIndex = 9; + this.lblintructtext.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.lblintructtext.Visible = false; + // + // pnlyesno + // + this.pnlyesno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlyesno.Controls.Add(this.btnno); + this.pnlyesno.Controls.Add(this.btnyes); + this.pnlyesno.Location = new System.Drawing.Point(57, 115); + this.pnlyesno.Name = "pnlyesno"; + this.pnlyesno.Size = new System.Drawing.Size(269, 33); + this.pnlyesno.TabIndex = 10; + this.pnlyesno.Visible = false; + // + // btnno + // + this.btnno.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnno.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnno.ForeColor = System.Drawing.Color.Black; + this.btnno.Location = new System.Drawing.Point(142, 2); + this.btnno.Name = "btnno"; + this.btnno.Size = new System.Drawing.Size(105, 30); + this.btnno.TabIndex = 9; + this.btnno.TabStop = false; + this.btnno.Text = "No"; + this.btnno.UseVisualStyleBackColor = true; + this.btnno.Click += new System.EventHandler(this.btnno_Click); + // + // btnyes + // + this.btnyes.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnyes.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnyes.ForeColor = System.Drawing.Color.Black; + this.btnyes.Location = new System.Drawing.Point(29, 2); + this.btnyes.Name = "btnyes"; + this.btnyes.Size = new System.Drawing.Size(105, 30); + this.btnyes.TabIndex = 8; + this.btnyes.TabStop = false; + this.btnyes.Text = "Yes"; + this.btnyes.UseVisualStyleBackColor = true; + this.btnyes.Click += new System.EventHandler(this.btnyes_Click); + // + // infobox + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(371, 154); + this.Controls.Add(this.pgcontents); + this.DoubleBuffered = true; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.Name = "infobox"; + this.Text = "infobox"; + this.TopMost = true; + this.Load += new System.EventHandler(this.infobox_Load); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pboximage)).EndInit(); + this.pnlyesno.ResumeLayout(false); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Button btnok; + internal System.Windows.Forms.Label txtmessage; + internal System.Windows.Forms.PictureBox pboximage; + internal System.Windows.Forms.Label lblintructtext; + internal System.Windows.Forms.TextBox txtuserinput; + internal System.Windows.Forms.Panel pnlyesno; + internal System.Windows.Forms.Button btnno; + internal System.Windows.Forms.Button btnyes; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Controls/infobox.cs b/source/WindowsFormsApplication1/Controls/infobox.cs new file mode 100644 index 0000000..2f706d2 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/infobox.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class infobox : Form + { + /// + /// Creates a new Infobox instance. + /// + /// Message to display. + /// UI mode. + public infobox(string Message, InfoboxMode mode) + { + InitializeComponent(); + + message = Message; + displayMode = mode; + } + + public string Result = "Cancelled"; + public enum InfoboxMode + { + YesNo, + TextEntry, + Info, + } + public InfoboxMode displayMode = InfoboxMode.Info; + private string message = "This is an infobox."; + public string TextEntry + { + get + { + return txtuserinput.Text; + } + } + + + + + + private void btnyes_Click(object sender, EventArgs e) + { + Result = "Yes"; + this.Close(); + } + + private void btnno_Click(object sender, EventArgs e) + { + Result = "No"; + this.Close(); + } + + private void btnok_Click(object sender, EventArgs e) + { + Result = "OK"; + this.Close(); + } + + private void infobox_Load(object sender, EventArgs e) + { + + switch(displayMode) + { + case InfoboxMode.Info: + txtmessage.Show(); + txtmessage.BringToFront(); + txtmessage.Text = message; + this.pnlyesno.Hide(); + this.txtuserinput.Hide(); + break; + case InfoboxMode.YesNo: + txtmessage.Show(); + txtmessage.BringToFront(); + txtmessage.Text = message; + this.pnlyesno.Show(); + this.pnlyesno.BringToFront(); + this.txtuserinput.Hide(); + break; + case InfoboxMode.TextEntry: + txtmessage.Hide(); + lblintructtext.Show(); + lblintructtext.BringToFront(); + lblintructtext.Text = message; + this.pnlyesno.Hide(); + this.txtuserinput.Show(); + this.txtuserinput.BringToFront(); + break; + } + txtuserinput.KeyDown += (object s, KeyEventArgs a) => + { + if (a.KeyCode == Keys.Enter) + { + a.SuppressKeyPress = true; + btnok_Click(s, (EventArgs)a); + } + }; + if (API.InfoboxesPlaySounds) + { + API.PlaySound(Properties.Resources.infobox); + } + } + + + } +} diff --git a/source/WindowsFormsApplication1/Controls/infobox.resx b/source/WindowsFormsApplication1/Controls/infobox.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Controls/infobox.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.Designer.cs b/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.Designer.cs new file mode 100644 index 0000000..fad1f66 --- /dev/null +++ b/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.Designer.cs @@ -0,0 +1,1583 @@ +namespace ShiftOS +{ + partial class ShiftOSDesktop + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.desktoppanel = new System.Windows.Forms.Panel(); + this.pnlnotifications = new System.Windows.Forms.FlowLayoutPanel(); + this.pnlpanelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); + this.applaunchermenuholder = new System.Windows.Forms.Panel(); + this.desktopappmenu = new System.Windows.Forms.MenuStrip(); + this.ApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ArtpadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.AudioplayerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.BitnoteDiggerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.BitnoteWalletToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CalculatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CatalystToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ClockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.DodgeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.downloadmanagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FloodGateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.IconManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.InstallerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.KnowledgeInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.MazeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.NameChangerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.orcwriteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.PongToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShiftnetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShiftoriumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SkinLoaderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SkinShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SnakeyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.sysinfoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TextPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.WebBrowserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.VideoplayerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.VirusScannerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.unitySeperator = new System.Windows.Forms.ToolStripSeparator(); + this.UnityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.timepanel = new System.Windows.Forms.Panel(); + this.paneltimetext = new System.Windows.Forms.Label(); + this.tbclockicon = new System.Windows.Forms.PictureBox(); + this.tbclocktext = new System.Windows.Forms.Label(); + this.tbsysinfoicon = new System.Windows.Forms.PictureBox(); + this.tbsysinfotext = new System.Windows.Forms.Label(); + this.tbskinloadericon = new System.Windows.Forms.PictureBox(); + this.tbskinloadertext = new System.Windows.Forms.Label(); + this.tbfileskimmericon = new System.Windows.Forms.PictureBox(); + this.tbfileskimmertext = new System.Windows.Forms.Label(); + this.tbfileopenericon = new System.Windows.Forms.PictureBox(); + this.tbfileopenertext = new System.Windows.Forms.Label(); + this.tbinfoboxicon = new System.Windows.Forms.PictureBox(); + this.tbinfoboxtext = new System.Windows.Forms.Label(); + this.tbknowledgeinputicon = new System.Windows.Forms.PictureBox(); + this.tbknowledgeinputtext = new System.Windows.Forms.Label(); + this.tbcolourpickericon = new System.Windows.Forms.PictureBox(); + this.tbcolourpickertext = new System.Windows.Forms.Label(); + this.tbshiftoriumicon = new System.Windows.Forms.PictureBox(); + this.tbshiftoriumtext = new System.Windows.Forms.Label(); + this.tbpongicon = new System.Windows.Forms.PictureBox(); + this.tbpongtext = new System.Windows.Forms.Label(); + this.tbterminalicon = new System.Windows.Forms.PictureBox(); + this.tbterminaltext = new System.Windows.Forms.Label(); + this.tbtextpadicon = new System.Windows.Forms.PictureBox(); + this.tbtextpadtext = new System.Windows.Forms.Label(); + this.tbgraphicpickericon = new System.Windows.Forms.PictureBox(); + this.tbgraphicpickertext = new System.Windows.Forms.Label(); + this.tbartpadicon = new System.Windows.Forms.PictureBox(); + this.tbartpadtext = new System.Windows.Forms.Label(); + this.tbcalculatoricon = new System.Windows.Forms.PictureBox(); + this.tbcalculatortext = new System.Windows.Forms.Label(); + this.tbaudioplayericon = new System.Windows.Forms.PictureBox(); + this.tbaudioplayertext = new System.Windows.Forms.Label(); + this.tbvideoplayericon = new System.Windows.Forms.PictureBox(); + this.tbvideoplayertext = new System.Windows.Forms.Label(); + this.tbwebbrowsericon = new System.Windows.Forms.PictureBox(); + this.tbwebbrowsertext = new System.Windows.Forms.Label(); + this.tbnamechangericon = new System.Windows.Forms.PictureBox(); + this.tbnamechangertext = new System.Windows.Forms.Label(); + this.tbiconmanagericon = new System.Windows.Forms.PictureBox(); + this.tbiconmanagertext = new System.Windows.Forms.Label(); + this.tbbitnotewalleticon = new System.Windows.Forms.PictureBox(); + this.tbbitnotewallettext = new System.Windows.Forms.Label(); + this.tbbitnotediggericon = new System.Windows.Forms.PictureBox(); + this.tbbitnotediggertext = new System.Windows.Forms.Label(); + this.tbskinshiftericon = new System.Windows.Forms.PictureBox(); + this.tbskinshiftertext = new System.Windows.Forms.Label(); + this.tbdownloadericon = new System.Windows.Forms.PictureBox(); + this.tbdownloadertext = new System.Windows.Forms.Label(); + this.tbshiftneticon = new System.Windows.Forms.PictureBox(); + this.tbshiftnettext = new System.Windows.Forms.Label(); + this.tbdodgeicon = new System.Windows.Forms.PictureBox(); + this.tbdodgetext = new System.Windows.Forms.Label(); + this.tbdownloadmanagericon = new System.Windows.Forms.PictureBox(); + this.tbdownloadmanagertext = new System.Windows.Forms.Label(); + this.tbcatalysticon = new System.Windows.Forms.PictureBox(); + this.lbcatalystname = new System.Windows.Forms.Label(); + this.tbinstallericon = new System.Windows.Forms.PictureBox(); + this.tbinstallertext = new System.Windows.Forms.Label(); + this.tbsnakeyicon = new System.Windows.Forms.PictureBox(); + this.tbsnakeytext = new System.Windows.Forms.Label(); + this.tborcwriteicon = new System.Windows.Forms.PictureBox(); + this.tborcwritetext = new System.Windows.Forms.Label(); + this.tbfloodgateicon = new System.Windows.Forms.PictureBox(); + this.tbfloodgatetext = new System.Windows.Forms.Label(); + this.tbmazeicon = new System.Windows.Forms.PictureBox(); + this.tbmazetext = new System.Windows.Forms.Label(); + this.tbvirusscannericon = new System.Windows.Forms.PictureBox(); + this.tbvirusscannertext = new System.Windows.Forms.Label(); + this.tbfilesavericon = new System.Windows.Forms.PictureBox(); + this.tbfilesavertext = new System.Windows.Forms.Label(); + this.tbshiftericon = new System.Windows.Forms.PictureBox(); + this.tbshiftertext = new System.Windows.Forms.Label(); + this.pnlpanelbuttonfloatybird = new System.Windows.Forms.Panel(); + this.tbfloatybirdicon = new System.Windows.Forms.PictureBox(); + this.tbfloatybirdtext = new System.Windows.Forms.Label(); + this.floatybirdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.clocktick = new System.Windows.Forms.Timer(this.components); + this.autosave = new System.Windows.Forms.Timer(this.components); + this.nocheat = new System.Windows.Forms.Timer(this.components); + this.tmrwindowedtest = new System.Windows.Forms.Timer(this.components); + this.cmbdesktopoptions = new System.Windows.Forms.ContextMenuStrip(this.components); + this.NewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); + this.ArtpadPictureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TextDocumentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.NewSkin = new System.Windows.Forms.ToolStripMenuItem(); + this.WebpageToolStripMenuItem = new System.Windows.Forms.ToolStripSeparator(); + this.ShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.scriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addDesktopPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.widgetManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.imgshiftnetapps = new System.Windows.Forms.ImageList(this.components); + this.lbldebug = new System.Windows.Forms.Label(); + this.lblog = new System.Windows.Forms.Label(); + this.flicons = new System.Windows.Forms.FlowLayoutPanel(); + this.cmbfactions = new System.Windows.Forms.ContextMenuStrip(this.components); + this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.cbwidget = new System.Windows.Forms.ContextMenuStrip(this.components); + this.wlocmenu = new System.Windows.Forms.ToolStripMenuItem(); + this.cbdpanel = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.placeHereToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.appLauncherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.panelButtonsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.clockToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.desktoppanel.SuspendLayout(); + this.applaunchermenuholder.SuspendLayout(); + this.desktopappmenu.SuspendLayout(); + this.timepanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tbclockicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbsysinfoicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbskinloadericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbfileskimmericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbfileopenericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbinfoboxicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbknowledgeinputicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbcolourpickericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbshiftoriumicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbpongicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbterminalicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbtextpadicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbgraphicpickericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbartpadicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbcalculatoricon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbaudioplayericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbvideoplayericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbwebbrowsericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbnamechangericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbiconmanagericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbbitnotewalleticon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbbitnotediggericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbskinshiftericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbdownloadericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbshiftneticon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbdodgeicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbdownloadmanagericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbcatalysticon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbinstallericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbsnakeyicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tborcwriteicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbfloodgateicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbmazeicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbvirusscannericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbfilesavericon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbshiftericon)).BeginInit(); + this.pnlpanelbuttonfloatybird.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tbfloatybirdicon)).BeginInit(); + this.cmbdesktopoptions.SuspendLayout(); + this.cmbfactions.SuspendLayout(); + this.cbwidget.SuspendLayout(); + this.cbdpanel.SuspendLayout(); + this.SuspendLayout(); + // + // desktoppanel + // + this.desktoppanel.BackColor = System.Drawing.Color.Gray; + this.desktoppanel.Controls.Add(this.pnlnotifications); + this.desktoppanel.Controls.Add(this.pnlpanelbuttonholder); + this.desktoppanel.Controls.Add(this.applaunchermenuholder); + this.desktoppanel.Controls.Add(this.timepanel); + this.desktoppanel.Dock = System.Windows.Forms.DockStyle.Top; + this.desktoppanel.Location = new System.Drawing.Point(0, 0); + this.desktoppanel.Name = "desktoppanel"; + this.desktoppanel.Size = new System.Drawing.Size(1268, 24); + this.desktoppanel.TabIndex = 0; + this.desktoppanel.Visible = false; + // + // pnlnotifications + // + this.pnlnotifications.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlnotifications.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.pnlnotifications.Location = new System.Drawing.Point(132, 0); + this.pnlnotifications.Name = "pnlnotifications"; + this.pnlnotifications.Size = new System.Drawing.Size(1039, 24); + this.pnlnotifications.TabIndex = 2; + // + // pnlpanelbuttonholder + // + this.pnlpanelbuttonholder.AutoSize = true; + this.pnlpanelbuttonholder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.pnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; + this.pnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Left; + this.pnlpanelbuttonholder.Location = new System.Drawing.Point(130, 0); + this.pnlpanelbuttonholder.Name = "pnlpanelbuttonholder"; + this.pnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); + this.pnlpanelbuttonholder.Size = new System.Drawing.Size(2, 24); + this.pnlpanelbuttonholder.TabIndex = 1; + // + // applaunchermenuholder + // + this.applaunchermenuholder.Controls.Add(this.desktopappmenu); + this.applaunchermenuholder.Dock = System.Windows.Forms.DockStyle.Left; + this.applaunchermenuholder.Location = new System.Drawing.Point(0, 0); + this.applaunchermenuholder.Name = "applaunchermenuholder"; + this.applaunchermenuholder.Size = new System.Drawing.Size(130, 24); + this.applaunchermenuholder.TabIndex = 3; + // + // desktopappmenu + // + this.desktopappmenu.AutoSize = false; + this.desktopappmenu.BackColor = System.Drawing.Color.Transparent; + this.desktopappmenu.GripMargin = new System.Windows.Forms.Padding(0); + this.desktopappmenu.ImageScalingSize = new System.Drawing.Size(32, 32); + this.desktopappmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ApplicationsToolStripMenuItem}); + this.desktopappmenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; + this.desktopappmenu.Location = new System.Drawing.Point(0, 0); + this.desktopappmenu.Name = "desktopappmenu"; + this.desktopappmenu.Padding = new System.Windows.Forms.Padding(0); + this.desktopappmenu.Size = new System.Drawing.Size(130, 24); + this.desktopappmenu.TabIndex = 0; + this.desktopappmenu.TabStop = true; + this.desktopappmenu.Text = "MenuStrip1"; + // + // ApplicationsToolStripMenuItem + // + this.ApplicationsToolStripMenuItem.AutoSize = false; + this.ApplicationsToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ApplicationsToolStripMenuItem.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.ApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ArtpadToolStripMenuItem, + this.AudioplayerToolStripMenuItem, + this.BitnoteDiggerToolStripMenuItem, + this.BitnoteWalletToolStripMenuItem, + this.CalculatorToolStripMenuItem, + this.CatalystToolStripMenuItem1, + this.ClockToolStripMenuItem, + this.DodgeToolStripMenuItem, + this.downloadmanagerToolStripMenuItem, + this.FileSkimmerToolStripMenuItem, + this.FloodGateToolStripMenuItem, + this.IconManagerToolStripMenuItem, + this.InstallerToolStripMenuItem, + this.KnowledgeInputToolStripMenuItem, + this.MazeToolStripMenuItem, + this.NameChangerToolStripMenuItem, + this.orcwriteToolStripMenuItem, + this.PongToolStripMenuItem, + this.ShifterToolStripMenuItem, + this.ShiftnetToolStripMenuItem, + this.ShiftoriumToolStripMenuItem, + this.SkinLoaderToolStripMenuItem, + this.SkinShifterToolStripMenuItem, + this.SnakeyToolStripMenuItem, + this.sysinfoToolStripMenuItem, + this.TerminalToolStripMenuItem, + this.TextPadToolStripMenuItem, + this.WebBrowserToolStripMenuItem, + this.VideoplayerToolStripMenuItem, + this.VirusScannerToolStripMenuItem, + this.unitySeperator, + this.UnityToolStripMenuItem, + this.ShutdownToolStripMenuItem}); + this.ApplicationsToolStripMenuItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"; + this.ApplicationsToolStripMenuItem.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ApplicationsToolStripMenuItem.ShowShortcutKeys = false; + this.ApplicationsToolStripMenuItem.Size = new System.Drawing.Size(94, 24); + this.ApplicationsToolStripMenuItem.Text = "Applications"; + this.ApplicationsToolStripMenuItem.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; + this.ApplicationsToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + this.ApplicationsToolStripMenuItem.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ALClick); + this.ApplicationsToolStripMenuItem.MouseEnter += new System.EventHandler(this.ALHover); + this.ApplicationsToolStripMenuItem.MouseLeave += new System.EventHandler(this.ALReset); + // + // ArtpadToolStripMenuItem + // + this.ArtpadToolStripMenuItem.Name = "ArtpadToolStripMenuItem"; + this.ArtpadToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.ArtpadToolStripMenuItem.Text = "ArtPad"; + // + // AudioplayerToolStripMenuItem + // + this.AudioplayerToolStripMenuItem.Name = "AudioplayerToolStripMenuItem"; + this.AudioplayerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.AudioplayerToolStripMenuItem.Text = "Audio Player"; + // + // BitnoteDiggerToolStripMenuItem + // + this.BitnoteDiggerToolStripMenuItem.Name = "BitnoteDiggerToolStripMenuItem"; + this.BitnoteDiggerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.BitnoteDiggerToolStripMenuItem.Text = "Bitnote Digger"; + // + // BitnoteWalletToolStripMenuItem + // + this.BitnoteWalletToolStripMenuItem.Name = "BitnoteWalletToolStripMenuItem"; + this.BitnoteWalletToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.BitnoteWalletToolStripMenuItem.Text = "Bitnote Wallet"; + // + // CalculatorToolStripMenuItem + // + this.CalculatorToolStripMenuItem.Name = "CalculatorToolStripMenuItem"; + this.CalculatorToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.CalculatorToolStripMenuItem.Text = "Calculator"; + // + // CatalystToolStripMenuItem1 + // + this.CatalystToolStripMenuItem1.Name = "CatalystToolStripMenuItem1"; + this.CatalystToolStripMenuItem1.Size = new System.Drawing.Size(214, 22); + this.CatalystToolStripMenuItem1.Text = "Catalyst"; + // + // ClockToolStripMenuItem + // + this.ClockToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ClockToolStripMenuItem.Name = "ClockToolStripMenuItem"; + this.ClockToolStripMenuItem.ShowShortcutKeys = false; + this.ClockToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.ClockToolStripMenuItem.Text = "Clock"; + // + // DodgeToolStripMenuItem + // + this.DodgeToolStripMenuItem.Name = "DodgeToolStripMenuItem"; + this.DodgeToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.DodgeToolStripMenuItem.Text = "Dodge"; + // + // downloadmanagerToolStripMenuItem + // + this.downloadmanagerToolStripMenuItem.Name = "downloadmanagerToolStripMenuItem"; + this.downloadmanagerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.downloadmanagerToolStripMenuItem.Text = "Download Manager"; + // + // FileSkimmerToolStripMenuItem + // + this.FileSkimmerToolStripMenuItem.Name = "FileSkimmerToolStripMenuItem"; + this.FileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.FileSkimmerToolStripMenuItem.Text = "File Skimmer"; + // + // FloodGateToolStripMenuItem + // + this.FloodGateToolStripMenuItem.Name = "FloodGateToolStripMenuItem"; + this.FloodGateToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.FloodGateToolStripMenuItem.Text = "FloodGate Manager"; + // + // IconManagerToolStripMenuItem + // + this.IconManagerToolStripMenuItem.Name = "IconManagerToolStripMenuItem"; + this.IconManagerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.IconManagerToolStripMenuItem.Text = "Icon Manager"; + // + // InstallerToolStripMenuItem + // + this.InstallerToolStripMenuItem.Name = "InstallerToolStripMenuItem"; + this.InstallerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.InstallerToolStripMenuItem.Text = "Installer"; + // + // KnowledgeInputToolStripMenuItem + // + this.KnowledgeInputToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.KnowledgeInputToolStripMenuItem.Name = "KnowledgeInputToolStripMenuItem"; + this.KnowledgeInputToolStripMenuItem.ShowShortcutKeys = false; + this.KnowledgeInputToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.KnowledgeInputToolStripMenuItem.Text = "Knowledge Input"; + // + // MazeToolStripMenuItem + // + this.MazeToolStripMenuItem.Name = "MazeToolStripMenuItem"; + this.MazeToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.MazeToolStripMenuItem.Text = "Labyrinth"; + // + // NameChangerToolStripMenuItem + // + this.NameChangerToolStripMenuItem.Name = "NameChangerToolStripMenuItem"; + this.NameChangerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.NameChangerToolStripMenuItem.Text = "Name Changer"; + // + // orcwriteToolStripMenuItem + // + this.orcwriteToolStripMenuItem.Name = "orcwriteToolStripMenuItem"; + this.orcwriteToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.orcwriteToolStripMenuItem.Text = "OrcWrite"; + // + // PongToolStripMenuItem + // + this.PongToolStripMenuItem.Name = "PongToolStripMenuItem"; + this.PongToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.PongToolStripMenuItem.Text = "Pong"; + // + // ShifterToolStripMenuItem + // + this.ShifterToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShifterToolStripMenuItem.Name = "ShifterToolStripMenuItem"; + this.ShifterToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.ShifterToolStripMenuItem.Text = "Shifter"; + // + // ShiftnetToolStripMenuItem + // + this.ShiftnetToolStripMenuItem.Name = "ShiftnetToolStripMenuItem"; + this.ShiftnetToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.ShiftnetToolStripMenuItem.Text = "Shiftnet"; + // + // ShiftoriumToolStripMenuItem + // + this.ShiftoriumToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShiftoriumToolStripMenuItem.Name = "ShiftoriumToolStripMenuItem"; + this.ShiftoriumToolStripMenuItem.ShowShortcutKeys = false; + this.ShiftoriumToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.ShiftoriumToolStripMenuItem.Text = "Shiftorium"; + // + // SkinLoaderToolStripMenuItem + // + this.SkinLoaderToolStripMenuItem.Name = "SkinLoaderToolStripMenuItem"; + this.SkinLoaderToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.SkinLoaderToolStripMenuItem.Text = "Skin Loader"; + // + // SkinShifterToolStripMenuItem + // + this.SkinShifterToolStripMenuItem.Name = "SkinShifterToolStripMenuItem"; + this.SkinShifterToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.SkinShifterToolStripMenuItem.Text = "Skin Shifter"; + // + // SnakeyToolStripMenuItem + // + this.SnakeyToolStripMenuItem.Name = "SnakeyToolStripMenuItem"; + this.SnakeyToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.SnakeyToolStripMenuItem.Text = "Snakey"; + // + // sysinfoToolStripMenuItem + // + this.sysinfoToolStripMenuItem.Name = "sysinfoToolStripMenuItem"; + this.sysinfoToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.sysinfoToolStripMenuItem.Text = "System Information"; + // + // TerminalToolStripMenuItem + // + this.TerminalToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.TerminalToolStripMenuItem.Name = "TerminalToolStripMenuItem"; + this.TerminalToolStripMenuItem.ShowShortcutKeys = false; + this.TerminalToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.TerminalToolStripMenuItem.Text = "Terminal"; + // + // TextPadToolStripMenuItem + // + this.TextPadToolStripMenuItem.Name = "TextPadToolStripMenuItem"; + this.TextPadToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.TextPadToolStripMenuItem.Text = "TextPad"; + // + // WebBrowserToolStripMenuItem + // + this.WebBrowserToolStripMenuItem.Name = "WebBrowserToolStripMenuItem"; + this.WebBrowserToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.WebBrowserToolStripMenuItem.Text = "Web Browser"; + // + // VideoplayerToolStripMenuItem + // + this.VideoplayerToolStripMenuItem.Name = "VideoplayerToolStripMenuItem"; + this.VideoplayerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.VideoplayerToolStripMenuItem.Text = "Video Player"; + // + // VirusScannerToolStripMenuItem + // + this.VirusScannerToolStripMenuItem.Name = "VirusScannerToolStripMenuItem"; + this.VirusScannerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.VirusScannerToolStripMenuItem.Text = "Virus Scanner"; + // + // unitySeperator + // + this.unitySeperator.BackColor = System.Drawing.Color.Transparent; + this.unitySeperator.ForeColor = System.Drawing.Color.White; + this.unitySeperator.Name = "unitySeperator"; + this.unitySeperator.Size = new System.Drawing.Size(211, 6); + // + // UnityToolStripMenuItem + // + this.UnityToolStripMenuItem.Name = "UnityToolStripMenuItem"; + this.UnityToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.UnityToolStripMenuItem.Text = "Toggle Unity Mode"; + // + // ShutdownToolStripMenuItem + // + this.ShutdownToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"; + this.ShutdownToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.ShutdownToolStripMenuItem.Text = "Shut Down"; + // + // timepanel + // + this.timepanel.Controls.Add(this.paneltimetext); + this.timepanel.Dock = System.Windows.Forms.DockStyle.Right; + this.timepanel.Location = new System.Drawing.Point(1171, 0); + this.timepanel.Name = "timepanel"; + this.timepanel.Size = new System.Drawing.Size(97, 24); + this.timepanel.TabIndex = 2; + // + // paneltimetext + // + this.paneltimetext.AutoSize = true; + this.paneltimetext.BackColor = System.Drawing.Color.Transparent; + this.paneltimetext.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.paneltimetext.Location = new System.Drawing.Point(5, 0); + this.paneltimetext.Name = "paneltimetext"; + this.paneltimetext.Size = new System.Drawing.Size(80, 24); + this.paneltimetext.TabIndex = 1; + this.paneltimetext.Text = "5000023"; + this.paneltimetext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tbclockicon + // + this.tbclockicon.Location = new System.Drawing.Point(0, 0); + this.tbclockicon.Name = "tbclockicon"; + this.tbclockicon.Size = new System.Drawing.Size(100, 50); + this.tbclockicon.TabIndex = 0; + this.tbclockicon.TabStop = false; + // + // tbclocktext + // + this.tbclocktext.Location = new System.Drawing.Point(0, 0); + this.tbclocktext.Name = "tbclocktext"; + this.tbclocktext.Size = new System.Drawing.Size(100, 23); + this.tbclocktext.TabIndex = 0; + // + // tbsysinfoicon + // + this.tbsysinfoicon.Location = new System.Drawing.Point(0, 0); + this.tbsysinfoicon.Name = "tbsysinfoicon"; + this.tbsysinfoicon.Size = new System.Drawing.Size(100, 50); + this.tbsysinfoicon.TabIndex = 0; + this.tbsysinfoicon.TabStop = false; + // + // tbsysinfotext + // + this.tbsysinfotext.Location = new System.Drawing.Point(0, 0); + this.tbsysinfotext.Name = "tbsysinfotext"; + this.tbsysinfotext.Size = new System.Drawing.Size(100, 23); + this.tbsysinfotext.TabIndex = 0; + // + // tbskinloadericon + // + this.tbskinloadericon.Location = new System.Drawing.Point(0, 0); + this.tbskinloadericon.Name = "tbskinloadericon"; + this.tbskinloadericon.Size = new System.Drawing.Size(100, 50); + this.tbskinloadericon.TabIndex = 0; + this.tbskinloadericon.TabStop = false; + // + // tbskinloadertext + // + this.tbskinloadertext.Location = new System.Drawing.Point(0, 0); + this.tbskinloadertext.Name = "tbskinloadertext"; + this.tbskinloadertext.Size = new System.Drawing.Size(100, 23); + this.tbskinloadertext.TabIndex = 0; + // + // tbfileskimmericon + // + this.tbfileskimmericon.Location = new System.Drawing.Point(0, 0); + this.tbfileskimmericon.Name = "tbfileskimmericon"; + this.tbfileskimmericon.Size = new System.Drawing.Size(100, 50); + this.tbfileskimmericon.TabIndex = 0; + this.tbfileskimmericon.TabStop = false; + // + // tbfileskimmertext + // + this.tbfileskimmertext.Location = new System.Drawing.Point(0, 0); + this.tbfileskimmertext.Name = "tbfileskimmertext"; + this.tbfileskimmertext.Size = new System.Drawing.Size(100, 23); + this.tbfileskimmertext.TabIndex = 0; + // + // tbfileopenericon + // + this.tbfileopenericon.Location = new System.Drawing.Point(0, 0); + this.tbfileopenericon.Name = "tbfileopenericon"; + this.tbfileopenericon.Size = new System.Drawing.Size(100, 50); + this.tbfileopenericon.TabIndex = 0; + this.tbfileopenericon.TabStop = false; + // + // tbfileopenertext + // + this.tbfileopenertext.Location = new System.Drawing.Point(0, 0); + this.tbfileopenertext.Name = "tbfileopenertext"; + this.tbfileopenertext.Size = new System.Drawing.Size(100, 23); + this.tbfileopenertext.TabIndex = 0; + // + // tbinfoboxicon + // + this.tbinfoboxicon.Location = new System.Drawing.Point(0, 0); + this.tbinfoboxicon.Name = "tbinfoboxicon"; + this.tbinfoboxicon.Size = new System.Drawing.Size(100, 50); + this.tbinfoboxicon.TabIndex = 0; + this.tbinfoboxicon.TabStop = false; + // + // tbinfoboxtext + // + this.tbinfoboxtext.Location = new System.Drawing.Point(0, 0); + this.tbinfoboxtext.Name = "tbinfoboxtext"; + this.tbinfoboxtext.Size = new System.Drawing.Size(100, 23); + this.tbinfoboxtext.TabIndex = 0; + // + // tbknowledgeinputicon + // + this.tbknowledgeinputicon.Location = new System.Drawing.Point(0, 0); + this.tbknowledgeinputicon.Name = "tbknowledgeinputicon"; + this.tbknowledgeinputicon.Size = new System.Drawing.Size(100, 50); + this.tbknowledgeinputicon.TabIndex = 0; + this.tbknowledgeinputicon.TabStop = false; + // + // tbknowledgeinputtext + // + this.tbknowledgeinputtext.Location = new System.Drawing.Point(0, 0); + this.tbknowledgeinputtext.Name = "tbknowledgeinputtext"; + this.tbknowledgeinputtext.Size = new System.Drawing.Size(100, 23); + this.tbknowledgeinputtext.TabIndex = 0; + // + // tbcolourpickericon + // + this.tbcolourpickericon.Location = new System.Drawing.Point(0, 0); + this.tbcolourpickericon.Name = "tbcolourpickericon"; + this.tbcolourpickericon.Size = new System.Drawing.Size(100, 50); + this.tbcolourpickericon.TabIndex = 0; + this.tbcolourpickericon.TabStop = false; + // + // tbcolourpickertext + // + this.tbcolourpickertext.Location = new System.Drawing.Point(0, 0); + this.tbcolourpickertext.Name = "tbcolourpickertext"; + this.tbcolourpickertext.Size = new System.Drawing.Size(100, 23); + this.tbcolourpickertext.TabIndex = 0; + // + // tbshiftoriumicon + // + this.tbshiftoriumicon.Location = new System.Drawing.Point(0, 0); + this.tbshiftoriumicon.Name = "tbshiftoriumicon"; + this.tbshiftoriumicon.Size = new System.Drawing.Size(100, 50); + this.tbshiftoriumicon.TabIndex = 0; + this.tbshiftoriumicon.TabStop = false; + // + // tbshiftoriumtext + // + this.tbshiftoriumtext.Location = new System.Drawing.Point(0, 0); + this.tbshiftoriumtext.Name = "tbshiftoriumtext"; + this.tbshiftoriumtext.Size = new System.Drawing.Size(100, 23); + this.tbshiftoriumtext.TabIndex = 0; + // + // tbpongicon + // + this.tbpongicon.Location = new System.Drawing.Point(0, 0); + this.tbpongicon.Name = "tbpongicon"; + this.tbpongicon.Size = new System.Drawing.Size(100, 50); + this.tbpongicon.TabIndex = 0; + this.tbpongicon.TabStop = false; + // + // tbpongtext + // + this.tbpongtext.Location = new System.Drawing.Point(0, 0); + this.tbpongtext.Name = "tbpongtext"; + this.tbpongtext.Size = new System.Drawing.Size(100, 23); + this.tbpongtext.TabIndex = 0; + // + // tbterminalicon + // + this.tbterminalicon.Location = new System.Drawing.Point(0, 0); + this.tbterminalicon.Name = "tbterminalicon"; + this.tbterminalicon.Size = new System.Drawing.Size(100, 50); + this.tbterminalicon.TabIndex = 0; + this.tbterminalicon.TabStop = false; + // + // tbterminaltext + // + this.tbterminaltext.Location = new System.Drawing.Point(0, 0); + this.tbterminaltext.Name = "tbterminaltext"; + this.tbterminaltext.Size = new System.Drawing.Size(100, 23); + this.tbterminaltext.TabIndex = 0; + // + // tbtextpadicon + // + this.tbtextpadicon.Location = new System.Drawing.Point(0, 0); + this.tbtextpadicon.Name = "tbtextpadicon"; + this.tbtextpadicon.Size = new System.Drawing.Size(100, 50); + this.tbtextpadicon.TabIndex = 0; + this.tbtextpadicon.TabStop = false; + // + // tbtextpadtext + // + this.tbtextpadtext.Location = new System.Drawing.Point(0, 0); + this.tbtextpadtext.Name = "tbtextpadtext"; + this.tbtextpadtext.Size = new System.Drawing.Size(100, 23); + this.tbtextpadtext.TabIndex = 0; + // + // tbgraphicpickericon + // + this.tbgraphicpickericon.Location = new System.Drawing.Point(0, 0); + this.tbgraphicpickericon.Name = "tbgraphicpickericon"; + this.tbgraphicpickericon.Size = new System.Drawing.Size(100, 50); + this.tbgraphicpickericon.TabIndex = 0; + this.tbgraphicpickericon.TabStop = false; + // + // tbgraphicpickertext + // + this.tbgraphicpickertext.Location = new System.Drawing.Point(0, 0); + this.tbgraphicpickertext.Name = "tbgraphicpickertext"; + this.tbgraphicpickertext.Size = new System.Drawing.Size(100, 23); + this.tbgraphicpickertext.TabIndex = 0; + // + // tbartpadicon + // + this.tbartpadicon.Location = new System.Drawing.Point(0, 0); + this.tbartpadicon.Name = "tbartpadicon"; + this.tbartpadicon.Size = new System.Drawing.Size(100, 50); + this.tbartpadicon.TabIndex = 0; + this.tbartpadicon.TabStop = false; + // + // tbartpadtext + // + this.tbartpadtext.Location = new System.Drawing.Point(0, 0); + this.tbartpadtext.Name = "tbartpadtext"; + this.tbartpadtext.Size = new System.Drawing.Size(100, 23); + this.tbartpadtext.TabIndex = 0; + // + // tbcalculatoricon + // + this.tbcalculatoricon.Location = new System.Drawing.Point(0, 0); + this.tbcalculatoricon.Name = "tbcalculatoricon"; + this.tbcalculatoricon.Size = new System.Drawing.Size(100, 50); + this.tbcalculatoricon.TabIndex = 0; + this.tbcalculatoricon.TabStop = false; + // + // tbcalculatortext + // + this.tbcalculatortext.Location = new System.Drawing.Point(0, 0); + this.tbcalculatortext.Name = "tbcalculatortext"; + this.tbcalculatortext.Size = new System.Drawing.Size(100, 23); + this.tbcalculatortext.TabIndex = 0; + // + // tbaudioplayericon + // + this.tbaudioplayericon.Location = new System.Drawing.Point(0, 0); + this.tbaudioplayericon.Name = "tbaudioplayericon"; + this.tbaudioplayericon.Size = new System.Drawing.Size(100, 50); + this.tbaudioplayericon.TabIndex = 0; + this.tbaudioplayericon.TabStop = false; + // + // tbaudioplayertext + // + this.tbaudioplayertext.Location = new System.Drawing.Point(0, 0); + this.tbaudioplayertext.Name = "tbaudioplayertext"; + this.tbaudioplayertext.Size = new System.Drawing.Size(100, 23); + this.tbaudioplayertext.TabIndex = 0; + // + // tbvideoplayericon + // + this.tbvideoplayericon.Location = new System.Drawing.Point(0, 0); + this.tbvideoplayericon.Name = "tbvideoplayericon"; + this.tbvideoplayericon.Size = new System.Drawing.Size(100, 50); + this.tbvideoplayericon.TabIndex = 0; + this.tbvideoplayericon.TabStop = false; + // + // tbvideoplayertext + // + this.tbvideoplayertext.Location = new System.Drawing.Point(0, 0); + this.tbvideoplayertext.Name = "tbvideoplayertext"; + this.tbvideoplayertext.Size = new System.Drawing.Size(100, 23); + this.tbvideoplayertext.TabIndex = 0; + // + // tbwebbrowsericon + // + this.tbwebbrowsericon.Location = new System.Drawing.Point(0, 0); + this.tbwebbrowsericon.Name = "tbwebbrowsericon"; + this.tbwebbrowsericon.Size = new System.Drawing.Size(100, 50); + this.tbwebbrowsericon.TabIndex = 0; + this.tbwebbrowsericon.TabStop = false; + // + // tbwebbrowsertext + // + this.tbwebbrowsertext.Location = new System.Drawing.Point(0, 0); + this.tbwebbrowsertext.Name = "tbwebbrowsertext"; + this.tbwebbrowsertext.Size = new System.Drawing.Size(100, 23); + this.tbwebbrowsertext.TabIndex = 0; + // + // tbnamechangericon + // + this.tbnamechangericon.Location = new System.Drawing.Point(0, 0); + this.tbnamechangericon.Name = "tbnamechangericon"; + this.tbnamechangericon.Size = new System.Drawing.Size(100, 50); + this.tbnamechangericon.TabIndex = 0; + this.tbnamechangericon.TabStop = false; + // + // tbnamechangertext + // + this.tbnamechangertext.Location = new System.Drawing.Point(0, 0); + this.tbnamechangertext.Name = "tbnamechangertext"; + this.tbnamechangertext.Size = new System.Drawing.Size(100, 23); + this.tbnamechangertext.TabIndex = 0; + // + // tbiconmanagericon + // + this.tbiconmanagericon.Location = new System.Drawing.Point(0, 0); + this.tbiconmanagericon.Name = "tbiconmanagericon"; + this.tbiconmanagericon.Size = new System.Drawing.Size(100, 50); + this.tbiconmanagericon.TabIndex = 0; + this.tbiconmanagericon.TabStop = false; + // + // tbiconmanagertext + // + this.tbiconmanagertext.Location = new System.Drawing.Point(0, 0); + this.tbiconmanagertext.Name = "tbiconmanagertext"; + this.tbiconmanagertext.Size = new System.Drawing.Size(100, 23); + this.tbiconmanagertext.TabIndex = 0; + // + // tbbitnotewalleticon + // + this.tbbitnotewalleticon.Location = new System.Drawing.Point(0, 0); + this.tbbitnotewalleticon.Name = "tbbitnotewalleticon"; + this.tbbitnotewalleticon.Size = new System.Drawing.Size(100, 50); + this.tbbitnotewalleticon.TabIndex = 0; + this.tbbitnotewalleticon.TabStop = false; + // + // tbbitnotewallettext + // + this.tbbitnotewallettext.Location = new System.Drawing.Point(0, 0); + this.tbbitnotewallettext.Name = "tbbitnotewallettext"; + this.tbbitnotewallettext.Size = new System.Drawing.Size(100, 23); + this.tbbitnotewallettext.TabIndex = 0; + // + // tbbitnotediggericon + // + this.tbbitnotediggericon.Location = new System.Drawing.Point(0, 0); + this.tbbitnotediggericon.Name = "tbbitnotediggericon"; + this.tbbitnotediggericon.Size = new System.Drawing.Size(100, 50); + this.tbbitnotediggericon.TabIndex = 0; + this.tbbitnotediggericon.TabStop = false; + // + // tbbitnotediggertext + // + this.tbbitnotediggertext.Location = new System.Drawing.Point(0, 0); + this.tbbitnotediggertext.Name = "tbbitnotediggertext"; + this.tbbitnotediggertext.Size = new System.Drawing.Size(100, 23); + this.tbbitnotediggertext.TabIndex = 0; + // + // tbskinshiftericon + // + this.tbskinshiftericon.Location = new System.Drawing.Point(0, 0); + this.tbskinshiftericon.Name = "tbskinshiftericon"; + this.tbskinshiftericon.Size = new System.Drawing.Size(100, 50); + this.tbskinshiftericon.TabIndex = 0; + this.tbskinshiftericon.TabStop = false; + // + // tbskinshiftertext + // + this.tbskinshiftertext.Location = new System.Drawing.Point(0, 0); + this.tbskinshiftertext.Name = "tbskinshiftertext"; + this.tbskinshiftertext.Size = new System.Drawing.Size(100, 23); + this.tbskinshiftertext.TabIndex = 0; + // + // tbdownloadericon + // + this.tbdownloadericon.Location = new System.Drawing.Point(0, 0); + this.tbdownloadericon.Name = "tbdownloadericon"; + this.tbdownloadericon.Size = new System.Drawing.Size(100, 50); + this.tbdownloadericon.TabIndex = 0; + this.tbdownloadericon.TabStop = false; + // + // tbdownloadertext + // + this.tbdownloadertext.Location = new System.Drawing.Point(0, 0); + this.tbdownloadertext.Name = "tbdownloadertext"; + this.tbdownloadertext.Size = new System.Drawing.Size(100, 23); + this.tbdownloadertext.TabIndex = 0; + // + // tbshiftneticon + // + this.tbshiftneticon.Location = new System.Drawing.Point(0, 0); + this.tbshiftneticon.Name = "tbshiftneticon"; + this.tbshiftneticon.Size = new System.Drawing.Size(100, 50); + this.tbshiftneticon.TabIndex = 0; + this.tbshiftneticon.TabStop = false; + // + // tbshiftnettext + // + this.tbshiftnettext.Location = new System.Drawing.Point(0, 0); + this.tbshiftnettext.Name = "tbshiftnettext"; + this.tbshiftnettext.Size = new System.Drawing.Size(100, 23); + this.tbshiftnettext.TabIndex = 0; + // + // tbdodgeicon + // + this.tbdodgeicon.Location = new System.Drawing.Point(0, 0); + this.tbdodgeicon.Name = "tbdodgeicon"; + this.tbdodgeicon.Size = new System.Drawing.Size(100, 50); + this.tbdodgeicon.TabIndex = 0; + this.tbdodgeicon.TabStop = false; + // + // tbdodgetext + // + this.tbdodgetext.Location = new System.Drawing.Point(0, 0); + this.tbdodgetext.Name = "tbdodgetext"; + this.tbdodgetext.Size = new System.Drawing.Size(100, 23); + this.tbdodgetext.TabIndex = 0; + // + // tbdownloadmanagericon + // + this.tbdownloadmanagericon.Location = new System.Drawing.Point(0, 0); + this.tbdownloadmanagericon.Name = "tbdownloadmanagericon"; + this.tbdownloadmanagericon.Size = new System.Drawing.Size(100, 50); + this.tbdownloadmanagericon.TabIndex = 0; + this.tbdownloadmanagericon.TabStop = false; + // + // tbdownloadmanagertext + // + this.tbdownloadmanagertext.Location = new System.Drawing.Point(0, 0); + this.tbdownloadmanagertext.Name = "tbdownloadmanagertext"; + this.tbdownloadmanagertext.Size = new System.Drawing.Size(100, 23); + this.tbdownloadmanagertext.TabIndex = 0; + // + // tbcatalysticon + // + this.tbcatalysticon.Location = new System.Drawing.Point(0, 0); + this.tbcatalysticon.Name = "tbcatalysticon"; + this.tbcatalysticon.Size = new System.Drawing.Size(100, 50); + this.tbcatalysticon.TabIndex = 0; + this.tbcatalysticon.TabStop = false; + // + // lbcatalystname + // + this.lbcatalystname.Location = new System.Drawing.Point(0, 0); + this.lbcatalystname.Name = "lbcatalystname"; + this.lbcatalystname.Size = new System.Drawing.Size(100, 23); + this.lbcatalystname.TabIndex = 0; + // + // tbinstallericon + // + this.tbinstallericon.Location = new System.Drawing.Point(0, 0); + this.tbinstallericon.Name = "tbinstallericon"; + this.tbinstallericon.Size = new System.Drawing.Size(100, 50); + this.tbinstallericon.TabIndex = 0; + this.tbinstallericon.TabStop = false; + // + // tbinstallertext + // + this.tbinstallertext.Location = new System.Drawing.Point(0, 0); + this.tbinstallertext.Name = "tbinstallertext"; + this.tbinstallertext.Size = new System.Drawing.Size(100, 23); + this.tbinstallertext.TabIndex = 0; + // + // tbsnakeyicon + // + this.tbsnakeyicon.Location = new System.Drawing.Point(0, 0); + this.tbsnakeyicon.Name = "tbsnakeyicon"; + this.tbsnakeyicon.Size = new System.Drawing.Size(100, 50); + this.tbsnakeyicon.TabIndex = 0; + this.tbsnakeyicon.TabStop = false; + // + // tbsnakeytext + // + this.tbsnakeytext.Location = new System.Drawing.Point(0, 0); + this.tbsnakeytext.Name = "tbsnakeytext"; + this.tbsnakeytext.Size = new System.Drawing.Size(100, 23); + this.tbsnakeytext.TabIndex = 0; + // + // tborcwriteicon + // + this.tborcwriteicon.Location = new System.Drawing.Point(0, 0); + this.tborcwriteicon.Name = "tborcwriteicon"; + this.tborcwriteicon.Size = new System.Drawing.Size(100, 50); + this.tborcwriteicon.TabIndex = 0; + this.tborcwriteicon.TabStop = false; + // + // tborcwritetext + // + this.tborcwritetext.Location = new System.Drawing.Point(0, 0); + this.tborcwritetext.Name = "tborcwritetext"; + this.tborcwritetext.Size = new System.Drawing.Size(100, 23); + this.tborcwritetext.TabIndex = 0; + // + // tbfloodgateicon + // + this.tbfloodgateicon.Location = new System.Drawing.Point(0, 0); + this.tbfloodgateicon.Name = "tbfloodgateicon"; + this.tbfloodgateicon.Size = new System.Drawing.Size(100, 50); + this.tbfloodgateicon.TabIndex = 0; + this.tbfloodgateicon.TabStop = false; + // + // tbfloodgatetext + // + this.tbfloodgatetext.Location = new System.Drawing.Point(0, 0); + this.tbfloodgatetext.Name = "tbfloodgatetext"; + this.tbfloodgatetext.Size = new System.Drawing.Size(100, 23); + this.tbfloodgatetext.TabIndex = 0; + // + // tbmazeicon + // + this.tbmazeicon.Location = new System.Drawing.Point(0, 0); + this.tbmazeicon.Name = "tbmazeicon"; + this.tbmazeicon.Size = new System.Drawing.Size(100, 50); + this.tbmazeicon.TabIndex = 0; + this.tbmazeicon.TabStop = false; + // + // tbmazetext + // + this.tbmazetext.Location = new System.Drawing.Point(0, 0); + this.tbmazetext.Name = "tbmazetext"; + this.tbmazetext.Size = new System.Drawing.Size(100, 23); + this.tbmazetext.TabIndex = 0; + // + // tbvirusscannericon + // + this.tbvirusscannericon.Location = new System.Drawing.Point(0, 0); + this.tbvirusscannericon.Name = "tbvirusscannericon"; + this.tbvirusscannericon.Size = new System.Drawing.Size(100, 50); + this.tbvirusscannericon.TabIndex = 0; + this.tbvirusscannericon.TabStop = false; + // + // tbvirusscannertext + // + this.tbvirusscannertext.Location = new System.Drawing.Point(0, 0); + this.tbvirusscannertext.Name = "tbvirusscannertext"; + this.tbvirusscannertext.Size = new System.Drawing.Size(100, 23); + this.tbvirusscannertext.TabIndex = 0; + // + // tbfilesavericon + // + this.tbfilesavericon.Location = new System.Drawing.Point(0, 0); + this.tbfilesavericon.Name = "tbfilesavericon"; + this.tbfilesavericon.Size = new System.Drawing.Size(100, 50); + this.tbfilesavericon.TabIndex = 0; + this.tbfilesavericon.TabStop = false; + // + // tbfilesavertext + // + this.tbfilesavertext.Location = new System.Drawing.Point(0, 0); + this.tbfilesavertext.Name = "tbfilesavertext"; + this.tbfilesavertext.Size = new System.Drawing.Size(100, 23); + this.tbfilesavertext.TabIndex = 0; + // + // tbshiftericon + // + this.tbshiftericon.Location = new System.Drawing.Point(0, 0); + this.tbshiftericon.Name = "tbshiftericon"; + this.tbshiftericon.Size = new System.Drawing.Size(100, 50); + this.tbshiftericon.TabIndex = 0; + this.tbshiftericon.TabStop = false; + // + // tbshiftertext + // + this.tbshiftertext.Location = new System.Drawing.Point(0, 0); + this.tbshiftertext.Name = "tbshiftertext"; + this.tbshiftertext.Size = new System.Drawing.Size(100, 23); + this.tbshiftertext.TabIndex = 0; + // + // pnlpanelbuttonfloatybird + // + this.pnlpanelbuttonfloatybird.BackColor = System.Drawing.Color.Black; + this.pnlpanelbuttonfloatybird.Controls.Add(this.tbfloatybirdicon); + this.pnlpanelbuttonfloatybird.Controls.Add(this.tbfloatybirdtext); + this.pnlpanelbuttonfloatybird.Location = new System.Drawing.Point(5, 29); + this.pnlpanelbuttonfloatybird.Name = "pnlpanelbuttonfloatybird"; + this.pnlpanelbuttonfloatybird.Size = new System.Drawing.Size(52, 20); + this.pnlpanelbuttonfloatybird.TabIndex = 31; + this.pnlpanelbuttonfloatybird.Visible = false; + // + // tbfloatybirdicon + // + this.tbfloatybirdicon.BackColor = System.Drawing.Color.Transparent; + this.tbfloatybirdicon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.tbfloatybirdicon.Location = new System.Drawing.Point(4, 2); + this.tbfloatybirdicon.Name = "tbfloatybirdicon"; + this.tbfloatybirdicon.Size = new System.Drawing.Size(16, 16); + this.tbfloatybirdicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.tbfloatybirdicon.TabIndex = 1; + this.tbfloatybirdicon.TabStop = false; + // + // tbfloatybirdtext + // + this.tbfloatybirdtext.AutoSize = true; + this.tbfloatybirdtext.BackColor = System.Drawing.Color.Transparent; + this.tbfloatybirdtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbfloatybirdtext.ForeColor = System.Drawing.Color.White; + this.tbfloatybirdtext.Location = new System.Drawing.Point(24, 2); + this.tbfloatybirdtext.Name = "tbfloatybirdtext"; + this.tbfloatybirdtext.Size = new System.Drawing.Size(45, 16); + this.tbfloatybirdtext.TabIndex = 0; + this.tbfloatybirdtext.Text = "Shifter"; + // + // floatybirdToolStripMenuItem + // + this.floatybirdToolStripMenuItem.Name = "floatybirdToolStripMenuItem"; + this.floatybirdToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.floatybirdToolStripMenuItem.Text = "Floaty Bird"; + // + // clocktick + // + this.clocktick.Enabled = true; + this.clocktick.Interval = 1000; + this.clocktick.Tick += new System.EventHandler(this.clocktick_Tick); + // + // autosave + // + this.autosave.Enabled = true; + this.autosave.Interval = 60000; + // + // cmbdesktopoptions + // + this.cmbdesktopoptions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.NewToolStripMenuItem, + this.addDesktopPanelToolStripMenuItem, + this.widgetManagerToolStripMenuItem}); + this.cmbdesktopoptions.Name = "ContextMenuStrip1"; + this.cmbdesktopoptions.Size = new System.Drawing.Size(175, 70); + // + // NewToolStripMenuItem + // + this.NewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FolderToolStripMenuItem, + this.ToolStripMenuItem2, + this.ArtpadPictureToolStripMenuItem, + this.TextDocumentToolStripMenuItem, + this.NewSkin, + this.WebpageToolStripMenuItem, + this.ShortcutToolStripMenuItem, + this.scriptToolStripMenuItem}); + this.NewToolStripMenuItem.Name = "NewToolStripMenuItem"; + this.NewToolStripMenuItem.Size = new System.Drawing.Size(174, 22); + this.NewToolStripMenuItem.Text = "New"; + // + // FolderToolStripMenuItem + // + this.FolderToolStripMenuItem.Name = "FolderToolStripMenuItem"; + this.FolderToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.FolderToolStripMenuItem.Text = "Folder"; + this.FolderToolStripMenuItem.Click += new System.EventHandler(this.FolderToolStripMenuItem_Click); + // + // ToolStripMenuItem2 + // + this.ToolStripMenuItem2.Name = "ToolStripMenuItem2"; + this.ToolStripMenuItem2.Size = new System.Drawing.Size(152, 6); + // + // ArtpadPictureToolStripMenuItem + // + this.ArtpadPictureToolStripMenuItem.Name = "ArtpadPictureToolStripMenuItem"; + this.ArtpadPictureToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.ArtpadPictureToolStripMenuItem.Text = "Artpad Picture"; + // + // TextDocumentToolStripMenuItem + // + this.TextDocumentToolStripMenuItem.Name = "TextDocumentToolStripMenuItem"; + this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.TextDocumentToolStripMenuItem.Text = "Text Document"; + this.TextDocumentToolStripMenuItem.Click += new System.EventHandler(this.TextDocumentToolStripMenuItem_Click); + // + // NewSkin + // + this.NewSkin.Name = "NewSkin"; + this.NewSkin.Size = new System.Drawing.Size(155, 22); + this.NewSkin.Text = "Skin"; + this.NewSkin.Click += new System.EventHandler(this.NewSkin_Click); + // + // WebpageToolStripMenuItem + // + this.WebpageToolStripMenuItem.Name = "WebpageToolStripMenuItem"; + this.WebpageToolStripMenuItem.Size = new System.Drawing.Size(152, 6); + this.WebpageToolStripMenuItem.Visible = false; + // + // ShortcutToolStripMenuItem + // + this.ShortcutToolStripMenuItem.Name = "ShortcutToolStripMenuItem"; + this.ShortcutToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.ShortcutToolStripMenuItem.Text = "Shortcut"; + this.ShortcutToolStripMenuItem.Visible = false; + // + // scriptToolStripMenuItem + // + this.scriptToolStripMenuItem.Name = "scriptToolStripMenuItem"; + this.scriptToolStripMenuItem.ShowShortcutKeys = false; + this.scriptToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.scriptToolStripMenuItem.Text = "Script"; + this.scriptToolStripMenuItem.Click += new System.EventHandler(this.scriptToolStripMenuItem_Click); + // + // addDesktopPanelToolStripMenuItem + // + this.addDesktopPanelToolStripMenuItem.Name = "addDesktopPanelToolStripMenuItem"; + this.addDesktopPanelToolStripMenuItem.Size = new System.Drawing.Size(174, 22); + this.addDesktopPanelToolStripMenuItem.Text = "Add Desktop Panel"; + this.addDesktopPanelToolStripMenuItem.Click += new System.EventHandler(this.addDesktopPanelToolStripMenuItem_Click); + // + // widgetManagerToolStripMenuItem + // + this.widgetManagerToolStripMenuItem.Name = "widgetManagerToolStripMenuItem"; + this.widgetManagerToolStripMenuItem.Size = new System.Drawing.Size(174, 22); + this.widgetManagerToolStripMenuItem.Text = "Widget Manager"; + this.widgetManagerToolStripMenuItem.Click += new System.EventHandler(this.widgetManagerToolStripMenuItem_Click); + // + // imgshiftnetapps + // + this.imgshiftnetapps.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; + this.imgshiftnetapps.ImageSize = new System.Drawing.Size(16, 16); + this.imgshiftnetapps.TransparentColor = System.Drawing.Color.Transparent; + // + // lbldebug + // + this.lbldebug.BackColor = System.Drawing.Color.Gray; + this.lbldebug.ForeColor = System.Drawing.Color.White; + this.lbldebug.Location = new System.Drawing.Point(12, 583); + this.lbldebug.Name = "lbldebug"; + this.lbldebug.Size = new System.Drawing.Size(178, 93); + this.lbldebug.TabIndex = 1; + this.lbldebug.Text = " == DEBUG INFO ===\r\nShiftOS version: 0.1.0\r\nExecution Folder: /bib/Debug\r\nSave Di" + + "rectory On Disk: C:\\ShiftOS\r\nDevMode: TRUE\r\nRunning Mods: 0\r\nCodepoints: 0"; + // + // lblog + // + this.lblog.BackColor = System.Drawing.Color.Gray; + this.lblog.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.lblog.ForeColor = System.Drawing.Color.White; + this.lblog.Location = new System.Drawing.Point(797, 432); + this.lblog.Name = "lblog"; + this.lblog.Size = new System.Drawing.Size(459, 244); + this.lblog.TabIndex = 2; + this.lblog.Text = " == DEBUG INFO ===\r\nShiftOS version: 0.1.0\r\nExecution Folder: /bib/Debug\r\nSave Di" + + "rectory On Disk: C:\\ShiftOS\r\nDevMode: TRUE\r\nRunning Mods: 0\r\nCodepoints: 0"; + // + // flicons + // + this.flicons.BackColor = System.Drawing.Color.Transparent; + this.flicons.Dock = System.Windows.Forms.DockStyle.Fill; + this.flicons.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flicons.Location = new System.Drawing.Point(0, 24); + this.flicons.Name = "flicons"; + this.flicons.Size = new System.Drawing.Size(1268, 661); + this.flicons.TabIndex = 3; + // + // cmbfactions + // + this.cmbfactions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deleteToolStripMenuItem}); + this.cmbfactions.Name = "cmbfactions"; + this.cmbfactions.Size = new System.Drawing.Size(108, 26); + // + // deleteToolStripMenuItem + // + this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(107, 22); + this.deleteToolStripMenuItem.Text = "Delete"; + this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); + // + // cbwidget + // + this.cbwidget.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.wlocmenu}); + this.cbwidget.Name = "cbwidget"; + this.cbwidget.Size = new System.Drawing.Size(121, 26); + // + // wlocmenu + // + this.wlocmenu.Name = "wlocmenu"; + this.wlocmenu.Size = new System.Drawing.Size(120, 22); + this.wlocmenu.Text = "Location"; + // + // cbdpanel + // + this.cbdpanel.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem3, + this.optionsToolStripMenuItem, + this.placeHereToolStripMenuItem}); + this.cbdpanel.Name = "cbwidget"; + this.cbdpanel.Size = new System.Drawing.Size(175, 70); + // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.Size = new System.Drawing.Size(174, 22); + this.toolStripMenuItem3.Text = "Remove This Panel"; + this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); + // + // optionsToolStripMenuItem + // + this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; + this.optionsToolStripMenuItem.Size = new System.Drawing.Size(174, 22); + this.optionsToolStripMenuItem.Text = "Options"; + this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); + // + // placeHereToolStripMenuItem + // + this.placeHereToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.appLauncherToolStripMenuItem, + this.panelButtonsToolStripMenuItem, + this.clockToolStripMenuItem1}); + this.placeHereToolStripMenuItem.Name = "placeHereToolStripMenuItem"; + this.placeHereToolStripMenuItem.Size = new System.Drawing.Size(174, 22); + this.placeHereToolStripMenuItem.Text = "Place here..."; + // + // appLauncherToolStripMenuItem + // + this.appLauncherToolStripMenuItem.Name = "appLauncherToolStripMenuItem"; + this.appLauncherToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.appLauncherToolStripMenuItem.Text = "App Launcher"; + this.appLauncherToolStripMenuItem.Click += new System.EventHandler(this.appLauncherToolStripMenuItem_Click); + // + // panelButtonsToolStripMenuItem + // + this.panelButtonsToolStripMenuItem.Name = "panelButtonsToolStripMenuItem"; + this.panelButtonsToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.panelButtonsToolStripMenuItem.Text = "Panel Buttons"; + this.panelButtonsToolStripMenuItem.Click += new System.EventHandler(this.panelButtonsToolStripMenuItem_Click); + // + // clockToolStripMenuItem1 + // + this.clockToolStripMenuItem1.Name = "clockToolStripMenuItem1"; + this.clockToolStripMenuItem1.Size = new System.Drawing.Size(148, 22); + this.clockToolStripMenuItem1.Text = "Clock"; + this.clockToolStripMenuItem1.Click += new System.EventHandler(this.clockToolStripMenuItem1_Click); + // + // ShiftOSDesktop + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(1268, 685); + this.Controls.Add(this.flicons); + this.Controls.Add(this.lblog); + this.Controls.Add(this.lbldebug); + this.Controls.Add(this.desktoppanel); + this.KeyPreview = true; + this.MainMenuStrip = this.desktopappmenu; + this.Name = "ShiftOSDesktop"; + this.Text = "ShiftOSDesktop"; + this.Load += new System.EventHandler(this.ShiftOSDesktop_Load); + this.desktoppanel.ResumeLayout(false); + this.desktoppanel.PerformLayout(); + this.applaunchermenuholder.ResumeLayout(false); + this.desktopappmenu.ResumeLayout(false); + this.desktopappmenu.PerformLayout(); + this.timepanel.ResumeLayout(false); + this.timepanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tbclockicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbsysinfoicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbskinloadericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbfileskimmericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbfileopenericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbinfoboxicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbknowledgeinputicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbcolourpickericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbshiftoriumicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbpongicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbterminalicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbtextpadicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbgraphicpickericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbartpadicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbcalculatoricon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbaudioplayericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbvideoplayericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbwebbrowsericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbnamechangericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbiconmanagericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbbitnotewalleticon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbbitnotediggericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbskinshiftericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbdownloadericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbshiftneticon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbdodgeicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbdownloadmanagericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbcatalysticon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbinstallericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbsnakeyicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tborcwriteicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbfloodgateicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbmazeicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbvirusscannericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbfilesavericon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbshiftericon)).EndInit(); + this.pnlpanelbuttonfloatybird.ResumeLayout(false); + this.pnlpanelbuttonfloatybird.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tbfloatybirdicon)).EndInit(); + this.cmbdesktopoptions.ResumeLayout(false); + this.cmbfactions.ResumeLayout(false); + this.cbwidget.ResumeLayout(false); + this.cbdpanel.ResumeLayout(false); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.MenuStrip desktopappmenu; + internal System.Windows.Forms.ToolStripMenuItem KnowledgeInputToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ShiftoriumToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ClockToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem TerminalToolStripMenuItem; + internal System.Windows.Forms.ToolStripSeparator unitySeperator; + internal System.Windows.Forms.ToolStripMenuItem ShutdownToolStripMenuItem; + internal System.Windows.Forms.Label paneltimetext; + internal System.Windows.Forms.Timer clocktick; + internal System.Windows.Forms.Panel timepanel; + internal System.Windows.Forms.ToolStripMenuItem ShifterToolStripMenuItem; + internal System.Windows.Forms.Panel applaunchermenuholder; + internal System.Windows.Forms.ToolStripMenuItem PongToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem FileSkimmerToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem TextPadToolStripMenuItem; + internal System.Windows.Forms.Timer autosave; + internal System.Windows.Forms.ToolStripMenuItem SkinLoaderToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbtextpadicon; + internal System.Windows.Forms.Label tbtextpadtext; + internal System.Windows.Forms.PictureBox tbclockicon; + internal System.Windows.Forms.Label tbclocktext; + internal System.Windows.Forms.PictureBox tbcolourpickericon; + internal System.Windows.Forms.Label tbcolourpickertext; + internal System.Windows.Forms.PictureBox tbgraphicpickericon; + internal System.Windows.Forms.Label tbgraphicpickertext; + internal System.Windows.Forms.PictureBox tbfileopenericon; + internal System.Windows.Forms.Label tbfileopenertext; + internal System.Windows.Forms.PictureBox tbfileskimmericon; + internal System.Windows.Forms.Label tbfileskimmertext; + internal System.Windows.Forms.PictureBox tbknowledgeinputicon; + internal System.Windows.Forms.Label tbknowledgeinputtext; + internal System.Windows.Forms.PictureBox tbinfoboxicon; + internal System.Windows.Forms.Label tbinfoboxtext; + internal System.Windows.Forms.PictureBox tbpongicon; + internal System.Windows.Forms.Label tbpongtext; + internal System.Windows.Forms.PictureBox tbshiftoriumicon; + internal System.Windows.Forms.Label tbshiftoriumtext; + internal System.Windows.Forms.PictureBox tbskinloadericon; + internal System.Windows.Forms.Label tbskinloadertext; + internal System.Windows.Forms.PictureBox tbterminalicon; + internal System.Windows.Forms.Label tbterminaltext; + internal System.Windows.Forms.FlowLayoutPanel pnlpanelbuttonholder; + internal System.Windows.Forms.PictureBox tbartpadicon; + internal System.Windows.Forms.Label tbartpadtext; + internal System.Windows.Forms.ToolStripMenuItem ArtpadToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CalculatorToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbcalculatoricon; + internal System.Windows.Forms.Label tbcalculatortext; + internal System.Windows.Forms.PictureBox tbaudioplayericon; + internal System.Windows.Forms.Label tbaudioplayertext; + internal System.Windows.Forms.ToolStripMenuItem AudioplayerToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbwebbrowsericon; + internal System.Windows.Forms.Label tbwebbrowsertext; + internal System.Windows.Forms.ToolStripMenuItem WebBrowserToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbvideoplayericon; + internal System.Windows.Forms.Label tbvideoplayertext; + internal System.Windows.Forms.ToolStripMenuItem VideoplayerToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbnamechangericon; + internal System.Windows.Forms.Label tbnamechangertext; + internal System.Windows.Forms.ToolStripMenuItem NameChangerToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbiconmanagericon; + internal System.Windows.Forms.Label tbiconmanagertext; + internal System.Windows.Forms.ToolStripMenuItem IconManagerToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbbitnotewalleticon; + internal System.Windows.Forms.Label tbbitnotewallettext; + internal System.Windows.Forms.PictureBox tbbitnotediggericon; + internal System.Windows.Forms.Label tbbitnotediggertext; + internal System.Windows.Forms.ToolStripMenuItem BitnoteWalletToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem BitnoteDiggerToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbskinshiftericon; + internal System.Windows.Forms.Label tbskinshiftertext; + internal System.Windows.Forms.ToolStripMenuItem SkinShifterToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbshiftneticon; + internal System.Windows.Forms.Label tbshiftnettext; + internal System.Windows.Forms.PictureBox tbdownloadericon; + internal System.Windows.Forms.Label tbdownloadertext; + internal System.Windows.Forms.ToolStripMenuItem ShiftnetToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbdodgeicon; + internal System.Windows.Forms.Label tbdodgetext; + internal System.Windows.Forms.ToolStripMenuItem DodgeToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem sysinfoToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbdownloadmanagericon; + internal System.Windows.Forms.Label tbdownloadmanagertext; + internal System.Windows.Forms.PictureBox tbinstallericon; + internal System.Windows.Forms.Label tbinstallertext; + internal System.Windows.Forms.ToolStripMenuItem InstallerToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem downloadmanagerToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbsnakeyicon; + internal System.Windows.Forms.Label tbsnakeytext; + internal System.Windows.Forms.PictureBox tborcwriteicon; + internal System.Windows.Forms.Label tborcwritetext; + internal System.Windows.Forms.ToolStripMenuItem orcwriteToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbfloodgateicon; + internal System.Windows.Forms.Label tbfloodgatetext; + internal System.Windows.Forms.ToolStripMenuItem FloodGateToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem UnityToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbsysinfoicon; + internal System.Windows.Forms.Label tbsysinfotext; + internal System.Windows.Forms.ToolStripMenuItem SnakeyToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbmazeicon; + internal System.Windows.Forms.Label tbmazetext; + internal System.Windows.Forms.ToolStripMenuItem MazeToolStripMenuItem; + internal System.Windows.Forms.PictureBox tbvirusscannericon; + internal System.Windows.Forms.Label tbvirusscannertext; + internal System.Windows.Forms.ToolStripMenuItem VirusScannerToolStripMenuItem; + internal System.Windows.Forms.Timer nocheat; + internal System.Windows.Forms.PictureBox tbfilesavericon; + internal System.Windows.Forms.Label tbfilesavertext; + internal System.Windows.Forms.PictureBox tbshiftericon; + internal System.Windows.Forms.Label tbshiftertext; + internal System.Windows.Forms.Panel pnlpanelbuttonfloatybird; + internal System.Windows.Forms.PictureBox tbfloatybirdicon; + internal System.Windows.Forms.Label tbfloatybirdtext; + internal System.Windows.Forms.ToolStripMenuItem floatybirdToolStripMenuItem; + internal System.Windows.Forms.Timer tmrwindowedtest; + internal System.Windows.Forms.ContextMenuStrip cmbdesktopoptions; + internal System.Windows.Forms.ToolStripMenuItem NewToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem FolderToolStripMenuItem; + internal System.Windows.Forms.ToolStripSeparator ToolStripMenuItem2; + internal System.Windows.Forms.ToolStripMenuItem ArtpadPictureToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem TextDocumentToolStripMenuItem; + internal System.Windows.Forms.ToolStripSeparator WebpageToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ShortcutToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem NewSkin; + internal System.Windows.Forms.PictureBox tbcatalysticon; + internal System.Windows.Forms.Label lbcatalystname; + internal System.Windows.Forms.ToolStripMenuItem CatalystToolStripMenuItem1; + public System.Windows.Forms.ImageList imgshiftnetapps; + private System.Windows.Forms.Label lbldebug; + private System.Windows.Forms.Label lblog; + private System.Windows.Forms.FlowLayoutPanel flicons; + private System.Windows.Forms.ToolStripMenuItem scriptToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip cmbfactions; + private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; + private System.Windows.Forms.FlowLayoutPanel pnlnotifications; + public System.Windows.Forms.Panel desktoppanel; + public System.Windows.Forms.ToolStripMenuItem ApplicationsToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip cbwidget; + private System.Windows.Forms.ToolStripMenuItem wlocmenu; + private System.Windows.Forms.ContextMenuStrip cbdpanel; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem addDesktopPanelToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem placeHereToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem appLauncherToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem panelButtonsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem clockToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem widgetManagerToolStripMenuItem; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.cs b/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.cs new file mode 100644 index 0000000..9a6818e --- /dev/null +++ b/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.cs @@ -0,0 +1,1647 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using SaveSystem; +using System.Threading; +using Newtonsoft.Json; +using System.IO; +using System.Diagnostics; +using ShiftOS.FinalMission; + +namespace ShiftOS +{ + public partial class ShiftOSDesktop : Form + { + public ShiftOSDesktop() + { + InitializeComponent(); + } + + public bool UnityEnabled = false; + + public ToolStripMenuItem AppLauncher { get { return this.ApplicationsToolStripMenuItem; } } + + public List CurrentWidgets = null; + + public void SetUnityMode() + { + if (UnityEnabled == true) + { + UnityEnabled = false; + } + else + { + UnityEnabled = true; + } + SetupDesktop(); + } + + public void SetUnityMode(bool value) + { + UnityEnabled = value; + SetupDesktop(); + } + + public void EndGame_AttachEvents() + { + FinalMission.EndGameHandler.ObjectiveCompleted += (object s, EventArgs a) => + { + }; + FinalMission.EndGameHandler.MissionComplete += (object s, EventArgs a) => + { + API.LimitedMode = false; + SetupDesktop(); + API.CloseEverything(); + switch (FinalMission.EndGameHandler.CurrentChoice) + { + case Choice.SideWithDevX: + var t = new System.Windows.Forms.Timer(); + t.Interval = 10000; + t.Tick += (object se, EventArgs ea) => + { + var tp = new TextPad(); + API.CreateForm(tp, API.LoadedNames.TextpadName, API.GetIcon("TextPad")); + tp.txtuserinput.Text = Properties.Resources.You_Passed; + tp.FormClosing += (sen, args) => + { + API.Upgrades["storycomplete"] = true; + }; + t.Stop(); + }; + t.Start(); + break; + } + }; + } + + private void ShiftOSDesktop_Load(object sender, EventArgs e) + { + Viruses.CheckForInfected(); + this.ShowInTaskbar = false; + this.FormBorderStyle = FormBorderStyle.None; + this.WindowState = FormWindowState.Maximized; + this.KeyDown += (object s, KeyEventArgs ea) => + { + if (ea.KeyCode == Keys.T && ea.Control) + { + //Show terminal on CTRL+T + + API.CreateForm(new Terminal(), API.CurrentSave.TerminalName, Properties.Resources.iconTerminal); + } + else if (ea.KeyCode == Keys.D && ea.Control) + { + if (API.DeveloperMode == true) + { + if (ShowDebug == true) + { + ShowDebug = false; + } + else + { + ShowDebug = true; + } + } + } + }; + CheckIfNew(); + + API.CurrentSession = this; + + + System.Windows.Forms.Timer clocktick = new System.Windows.Forms.Timer(); + clocktick.Interval = 2; + clocktick.Tick += (object s, EventArgs a) => + { + if (API.Upgrades["hacking"]) + { + if (API.Upgrades["hackerbattles"] == false) + { + var rnd = new Random(); + int c = rnd.Next(1, 1000); + if (c == 500) + { + var t = new Terminal(); + API.CreateForm(t, API.LoadedNames.TerminalName, Properties.Resources.iconTerminal); + t.StartHackerBattleIntro(); + } + } + } + paneltimetext.Text = API.GetTime(); + if (ShowDebug == true) + { + lbldebug.Show(); + lblog.Show(); + switch (API.CurrentSkin.desktoppanelposition) + { + case "Top": + lbldebug.Location = new Point(5, this.Height - lbldebug.Height - 3); + lblog.Location = new Point(this.Width - lblog.Width - 5, this.Height - lblog.Height - 3); + break; + case "Bottom": + lbldebug.Location = new Point(5, 4); + lblog.Location = new Point(this.Width - lblog.Width - 5, 4); + break; + } + if (File.Exists(Paths.SystemDir + "_Log.txt")) + { + lblog.Text = File.ReadAllText(Paths.SystemDir + "_Log.txt"); + } + else + { + lblog.Hide(); + } + lbldebug.Text = " === DEBUG INFO === \n"; + lbldebug.Text += "ShiftOS Version: " + API.CurrentSave.actualshiftversion + "\n"; + lbldebug.Text += "Save Dir On Disk: " + Paths.SaveRoot + "\n"; + lbldebug.Text += "Codepoints: " + API.CurrentSave.codepoints.ToString() + "\n"; + lbldebug.Text += "DevMode: " + API.DeveloperMode.ToString() + "\n"; + lbldebug.Text += "PlatformIdent: " + OSInfo.GetPlatformID() + "\n"; + lbldebug.Text += "Running Mods: " + API.RunningModProcesses.Count.ToString() + "\n"; + } + else + { + lbldebug.Hide(); + lblog.Hide(); + } + if (Viruses.InfectedWith("seized")) + { + Random rnd = new Random(); + int r = rnd.Next(0, 255); + int g = rnd.Next(0, 255); + int b = rnd.Next(0, 255); + this.BackColor = Color.FromArgb(r, g, b); + this.BackgroundImage = null; + } + if (Viruses.InfectedWith("ow")) + { + Random rand = new Random(); + switch (rand.Next(0, 3)) { + case 0: + API.PlaySound(Properties.Resources.writesound); + break; + case 1: + API.PlaySound(Properties.Resources.typesound); + break; + case 2: + API.PlaySound(Properties.Resources.infobox); + break; + } + } + }; + clocktick.Start(); + + if (API.Upgrades["trmfiles"] == true) + { + if (File.Exists(Paths.SystemDir + "AutoStart.trm")) + { + var t = new Terminal(); + t.runterminalfile(Paths.SystemDir + "AutoStart.trm"); + } + } + API.LoadAliases(); + } + + public void CheckIfNew() + { + if (Utilities.LoadedSave.newgame == true) + { + HijackScreen hijack = new HijackScreen(); + this.Opacity = 0; + hijack.Show(); + } + else + { + SetupDesktop(); + } + } + + public List DesktopPanels = null; + public FlowLayoutPanel PanelButtonHolder { get { return pnlpanelbuttonholder; } } + public Panel AppLauncherPanel { get { return applaunchermenuholder; } } + public Panel Clock { get { return timepanel; } } + public Control SelectedObject = null; + + private string SelectedIconName = null; + + public void SetupDesktop() + { + SetupRenderers(); + SetupDesktopPanel(); + SetupAppLauncher(); + SetupDesktopIcons(); + SetupGNOME2Elements(); + SetupPanelClock(); + SetupPanelButtons(); + CheckUnity(); + SetupWidgets(); + CheckForChristmas(); + //Set up the context menus. + addDesktopPanelToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"]; + widgetManagerToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"]; + if (API.Upgrades["advanceddesktop"]) + { + AppLauncherPanel.ContextMenuStrip = cbwidget; + Clock.ContextMenuStrip = cbwidget; + PanelButtonHolder.ContextMenuStrip = cbwidget; + } + else + { + AppLauncherPanel.ContextMenuStrip = null; + Clock.ContextMenuStrip = null; + PanelButtonHolder.ContextMenuStrip = null; + } + if (DesktopPanels != null) { + foreach (var dp in DesktopPanels) + { + if (API.Upgrades["advanceddesktop"]) + { + dp.ContextMenuStrip = cbdpanel; + } + else + { + dp.ContextMenuStrip = cbdpanel; + } + } + } + } + + public void SetupWidgets() + { + foreach (var w in API.CurrentSkin.Widgets) + { + foreach (var dp in DesktopPanels) + { + var t = (Skinning.DesktopPanel)dp.Tag; + if (t.Position == w.Panel) + { + SetupWidget(dp, w); + } + } + } + } + + public void SetupWidget(Panel p, Skinning.DesktopWidget w) + { + if(WidgetsToMaintain != null) + { + foreach(var wid in WidgetsToMaintain) + { + wid.Dispose(); + } + } + WidgetsToMaintain = new List(); + Control ctrl = null; + switch(w.Type) + { + case WidgetType.FreePanel: + ctrl = new Panel(); + break; + case WidgetType.Icon: + ctrl = new PictureBox(); + break; + case WidgetType.DisplayText: + ctrl = new Label(); + var l = (Label)ctrl; + l.ForeColor = API.CurrentSkin.clocktextcolour; + l.TextAlign = ContentAlignment.MiddleCenter; + break; + } + if(ctrl != null) + { + p.Controls.Add(ctrl); + ctrl.Show(); + ctrl.BringToFront(); + ctrl.Left = w.XLocation; + if(w.Type != WidgetType.Icon) + { + ctrl.Top = 0; + ctrl.Width = w.Width; + ctrl.Height = p.Height; + } + else + { + ctrl.Size = new Size(16, 16); + ctrl.Top = (p.Height - ctrl.Height) / 2; + } + try + { + GC.Collect(); + var l = new LuaInterpreter(); + l.ThisDirectory = Paths.WidgetFiles; + l.mod(w.Lua); + if (w.Type == WidgetType.Icon) + { + try + { + ctrl.BackgroundImage = API.GetIcon(w.Icon); + } + catch + { + ctrl.BackgroundImage = API.GetIcon(w.Name); + } + } + var cb_thiswidget = new ContextMenuStrip(); + var remove = cb_thiswidget.Items.Add($"Remove this {w.Name}"); + remove.Click += (object s, EventArgs a) => + { + API.CurrentSkin.Widgets.Remove(w); + ctrl.Dispose(); + Skinning.Utilities.saveskin(); + }; + var move = cb_thiswidget.Items.Add("Move Widget"); + move.Click += (object s, EventArgs e) => + { + ctrl.Tag = w; + MovingControl = ctrl; + }; + ToolStripMenuItem move_to = (ToolStripMenuItem)cb_thiswidget.Items.Add("Move to..."); + foreach(var dp in DesktopPanels) + { + var tag = (Skinning.DesktopPanel)dp.Tag; + var pnlloc = move_to.DropDownItems.Add(tag.Position); + pnlloc.Click += (object s, EventArgs a) => + { + w.Panel = pnlloc.Text; + ChangePosition(ctrl, dp); + Skinning.Utilities.saveskin(); + }; + } + var setwidth = cb_thiswidget.Items.Add("Set Width"); + setwidth.Click += (object s, EventArgs a) => + { + API.CreateInfoboxSession($"Set {w.Name} Width", $"Please enter a new width value for this {w.Name}.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object f, FormClosingEventArgs fc) => + { + var text = API.GetInfoboxResult(); + try + { + w.Width = Convert.ToInt32(text); + ctrl.Width = w.Width; + Skinning.Utilities.saveskin(); + } + catch + { + AddNotification("Invalid width", "You have entered an invalid width."); + } + }; + }; + ctrl.ContextMenuStrip = cb_thiswidget; + GC.Collect(); + WidgetsToMaintain.Add(ctrl); + l.mod.widget(ctrl); + + } + catch + { + API.CreateInfoboxSession("Widget Error", $"An error has occurred creating this \"{w.Name}\". It'll stay, but it may not function as intended.", infobox.InfoboxMode.Info); + } + + } + + } + + public List WidgetsToMaintain = null; + + public Control MovingControl = null; + + public bool WidgetContains(string Name) + { + Skinning.DesktopWidget widget = null; + + foreach(var w in API.CurrentSkin.Widgets) + { + if(w.Name == Name) + { + widget = w; + } + } + + if(widget == null) + { + return false; + } + else + { + return true; + } + } + + public void SetupDesktopIcons() + { + if (UnityEnabled == true) + { + flicons.Hide(); + } + else + { + flicons.Show(); + } + if (API.Upgrades["desktopicons"] == true) + { + flicons.ContextMenuStrip = cmbdesktopoptions; + DesktopIconManager.GetIcons(); + flicons.Controls.Clear(); + foreach (DesktopIcon dl in DesktopIconManager.Icons) + { + dl.ContextMenuStrip = cmbfactions; + dl.MouseDown += (object s, MouseEventArgs a) => + { + if (a.Button == MouseButtons.Right) + { + SelectedIconName = dl.IconName; + } + }; + flicons.Controls.Add(dl); + } + + } + + } + + public void SetupRenderers() + { + //Set global ToolStrip Renderer to the ShiftOS Skinning Engine renderer with it's default color table + ToolStripManager.Renderer = new Skinning.MyToolStripRenderer(); + //Set the App Launcher's renderer to the ShiftOS Skinning Engine renderer, with the App Launcher-specific color table. + desktopappmenu.Renderer = new Skinning.MyToolStripRenderer(new AppLauncherColorTable()); + + } + + + public void SetupDesktopPanel() + { + if (DesktopPanels != null) + { + foreach (var pnl in DesktopPanels) + { + if (this.Controls.Contains(pnl)) + { + pnl.Hide(); + this.Controls.Remove(pnl); + } + } + } + var old_list = new List(); + var dp = new Skinning.DesktopPanel(); + dp.Position = API.CurrentSkin.desktoppanelposition; + dp.Height = API.CurrentSkin.desktoppanelheight; + dp.BackgroundColor = API.CurrentSkin.desktoppanelcolour; + dp.BackgroundImage = API.CurrentSkinImages.desktoppanel; + old_list.Add(dp); + + if (API.CurrentSkin.DesktopPanels.Count == 0) + { + API.CurrentSkin.DesktopPanels = old_list; + } + if(API.Upgrades["advanceddesktop"]) + { + SetupPanels(API.CurrentSkin.DesktopPanels); + } + else + { + if(API.Upgrades["desktoppanel"]) + { + SetupPanels(old_list); + } + } + desktopappmenu.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.applauncherlayout; + } + + public void SetupPanels(List lst) + { + DesktopPanels = new List(); + + foreach (var dp in lst) + { + Panel pnl = new Panel(); + pnl.BackColor = dp.BackgroundColor; + switch (dp.Position) + { + case "Top": + pnl.Dock = DockStyle.Top; + break; + case "Bottom": + pnl.Dock = DockStyle.Bottom; + break; + } + pnl.Tag = dp; + pnl.Height = dp.Height; + pnl.MouseMove += (object s, MouseEventArgs a) => + { + if (MovingControl != null) + { + var newloc = new Point(a.X + 15, 0); + var proper = pnl.PointToClient(newloc); + MovingControl.Location = proper; + } + }; + pnl.MouseDown += (object s, MouseEventArgs a) => + { + if (MovingControl != null) + { + if (a.Button == MouseButtons.Left) + { + var w = (Skinning.DesktopWidget)MovingControl.Tag; + w.XLocation = MovingControl.Left; + Skinning.Utilities.saveskin(); + } + else if (a.Button == MouseButtons.Left) + { + var w = (Skinning.DesktopWidget)MovingControl.Tag; + MovingControl.Left = w.XLocation; + Skinning.Utilities.saveskin(); + + } + MovingControl = null; + } + }; + DesktopPanels.Add(pnl); + if (API.Upgrades["desktoppanel"] == true) + { + if (dp.BackgroundImage == null) + { + pnl.BackgroundImage = null; + } + else + { + pnl.BackgroundImage = dp.BackgroundImage; + pnl.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.desktoppanellayout; + pnl.BackColor = Color.Transparent; + } + if (lst.Count > 1) + { + if (API.CurrentSkin.ALPosition == dp.Position) + { + ChangePosition(AppLauncherPanel, pnl); + } + if (API.CurrentSkin.PanelButtonPosition == dp.Position) + { + ChangePosition(PanelButtonHolder, pnl); + } + if (API.CurrentSkin.ClockPosition == dp.Position) + { + ChangePosition(Clock, pnl); + } + } + else + { + ChangePosition(AppLauncherPanel, pnl); + ChangePosition(PanelButtonHolder, pnl); + ChangePosition(Clock, pnl); + } + pnl.MouseDown += (object s, MouseEventArgs a) => + { + if (a.Button == MouseButtons.Right) + { + SelectedObject = pnl; + } + }; + if (API.Upgrades["advanceddesktop"]) + { + pnl.ContextMenuStrip = cbdpanel; + } + else + { + pnl.ContextMenuStrip = null; + } + pnl.Size = new Size(desktoppanel.Size.Width, dp.Height); + this.Controls.Add(pnl); + pnl.Show(); + } + else + { + pnl.Hide(); + this.Controls.Remove(pnl); + } + } + + } + + public void SetupAppLauncher() + { + NewToolStripMenuItem.Visible = API.Upgrades["fsnewfolder"]; + ArtpadPictureToolStripMenuItem.Visible = /*API.Upgrades["artpadsave"]*/false; // not yet implemented + TextDocumentToolStripMenuItem.Visible = API.Upgrades["textpadsave"]; + NewSkin.Visible = API.Upgrades["skinning"]; + scriptToolStripMenuItem.Visible = /*API.Upgrades["shiftnet"]*/false; //not yet implemented + API.GetAppLauncherItems(); + if (API.Upgrades["applaunchermenu"] == true) + { + ApplicationsToolStripMenuItem.Font = new Font(API.CurrentSkin.applicationbuttontextfont, API.CurrentSkin.applicationbuttontextsize, API.CurrentSkin.applicationbuttontextstyle); + ApplicationsToolStripMenuItem.Text = API.CurrentSkin.applicationlaunchername; + ApplicationsToolStripMenuItem.DropDownItems.Clear(); + if (API.Upgrades["alshiftnetapps"] == true) + { + imgshiftnetapps.Images.Clear(); + ApplicationsToolStripMenuItem.DropDown.ImageList = imgshiftnetapps; + //Mods + if (!Directory.Exists(Paths.Mod_AppLauncherEntries)) + { + Directory.CreateDirectory(Paths.Mod_AppLauncherEntries); + } + foreach (string file in Directory.GetFiles(Paths.Mod_AppLauncherEntries)) + { + string json = File.ReadAllText(file); + var TEMP_AL = JsonConvert.DeserializeObject(json); + string lua; + if (TEMP_AL.Lua != null) + { + lua = TEMP_AL.Lua; + } + else + { + string path = TEMP_AL.ShiftCode.Replace("runSAA:", ""); + lua = "launch_mod('/Shiftum42/Apps/" + TEMP_AL.AppDirectory.Replace("\"", "\\\"").Replace("'", "\\'") + "/" + path + "')"; + } + + ApplauncherItem NewAL = null; + try + { + NewAL = new ApplauncherItem(TEMP_AL.Name, Image.FromFile(Paths.Applications + TEMP_AL.AppDirectory + "\\" + TEMP_AL.Icon), lua, true); + imgshiftnetapps.Images.Add(file, NewAL.Icon); + } + catch + { + NewAL = new ApplauncherItem(TEMP_AL.Name, null, lua, true); + } + var mitem = new ToolStripMenuItem(); + mitem.ImageKey = file; + mitem.Text = NewAL.Name; + mitem.Tag = TEMP_AL; + mitem.ImageScaling = ToolStripItemImageScaling.None; + mitem.Visible = NewAL.Display; + + mitem.Click += (object s, EventArgs a) => + { + API.LaunchMod(NewAL.Lua.Replace("launch_mod('", "").Replace("/Shiftum42/Apps/", Paths.Applications).Replace("/", OSInfo.DirectorySeparator).Replace("')", "")); + }; + ApplicationsToolStripMenuItem.DropDownItems.Add(mitem); + } + ApplicationsToolStripMenuItem.DropDownItems.Add(new ToolStripSeparator()); + } + + + + foreach (ApplauncherItem aitem in API.AppLauncherItems) + { + ToolStripMenuItem item = new ToolStripMenuItem(); + item.Text = aitem.Name; + item.Tag = aitem; + imgshiftnetapps.Images.Add(item.Text, aitem.Icon); + item.ImageKey = item.Text; + item.Visible = aitem.Display; + item.ImageScaling = ToolStripItemImageScaling.None; + ApplicationsToolStripMenuItem.DropDownItems.Add(item); + item.Click += new EventHandler(this.RunAppFromLauncher); + } + + ApplicationsToolStripMenuItem.Height = API.CurrentSkin.applicationbuttonheight; + if (API.CurrentSkinImages.applauncher != null) + { + ApplicationsToolStripMenuItem.Text = ""; + ApplicationsToolStripMenuItem.BackColor = Color.Transparent; + } + else { + ApplicationsToolStripMenuItem.Text = API.CurrentSkin.applicationlaunchername; + ApplicationsToolStripMenuItem.BackColor = API.CurrentSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImage = null; + } + + applaunchermenuholder.Width = API.CurrentSkin.applaunchermenuholderwidth; + desktopappmenu.Width = API.CurrentSkin.applaunchermenuholderwidth; + ApplicationsToolStripMenuItem.Width = API.CurrentSkin.applaunchermenuholderwidth; + ApplicationsToolStripMenuItem.ForeColor = API.CurrentSkin.applicationsbuttontextcolour; + applaunchermenuholder.Height = API.CurrentSkin.applicationbuttonheight; + desktopappmenu.Height = API.CurrentSkin.applicationbuttonheight; + ApplicationsToolStripMenuItem.Height = API.CurrentSkin.applicationbuttonheight; + + if (API.CurrentSkinImages.applauncher != null) + { + ApplicationsToolStripMenuItem.BackgroundImage = API.CurrentSkinImages.applauncher; + } + else { + ApplicationsToolStripMenuItem.BackColor = API.CurrentSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.applauncherlayout; + } + ApplicationsToolStripMenuItem.BackColor = API.CurrentSkin.applauncherbuttoncolour; + } + else { + ApplicationsToolStripMenuItem.Visible = false; + } + } + + public void SetupGNOME2Elements() + { + if (API.Upgrades["gray"] == true) + { + this.ContextMenuStrip = cmbdesktopoptions; + NewToolStripMenuItem.Visible = API.Upgrades["desktopicons"]; + addDesktopPanelToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"]; + widgetManagerToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"]; //Uncomment when mid game bridge sequence finished. + + + } + + appLauncherToolStripMenuItem.Visible = API.Upgrades["applaunchermenu"]; + clockToolStripMenuItem1.Visible = API.Upgrades["desktoppanelclock"]; + panelButtonsToolStripMenuItem.Visible = API.Upgrades["panelbuttons"]; + + PanelButtonHolder.ContextMenuStrip = cbwidget; + AppLauncherPanel.ContextMenuStrip = cbwidget; + Clock.ContextMenuStrip = cbwidget; + paneltimetext.MouseDown += (object s, MouseEventArgs a) => + { + if (a.Button == MouseButtons.Right) + { + SelectedObject = Clock; + } + }; + ApplicationsToolStripMenuItem.MouseDown += (object s, MouseEventArgs a) => + { + if (a.Button == MouseButtons.Right) + { + SelectedObject = AppLauncherPanel; + } + }; + PanelButtonHolder.MouseDown += (object s, MouseEventArgs a) => + { + if (a.Button == MouseButtons.Right) + { + SelectedObject = PanelButtonHolder; + } + }; + wlocmenu.DropDownItems.Clear(); + if (API.Upgrades["advanceddesktop"]) + { + foreach (var p in DesktopPanels) + { + var dp = (Skinning.DesktopPanel)p.Tag; + p.ContextMenuStrip = cbdpanel; + var itm = new ToolStripMenuItem(); + itm.Text = dp.Position; + wlocmenu.DropDownItems.Add(itm); + itm.Click += (object s, EventArgs a) => + { + if (SelectedObject != null) + { + if (SelectedObject == AppLauncherPanel) + { + API.CurrentSkin.ALPosition = itm.Text; + } + else if (SelectedObject == Clock) + { + API.CurrentSkin.ClockPosition = itm.Text; + } + else if (SelectedObject == PanelButtonHolder) + { + API.CurrentSkin.PanelButtonPosition = itm.Text; + } + SelectedObject.Parent.Controls.Remove(SelectedObject); + SetupDesktopPanel(); + Skinning.Utilities.saveskin(); + } + }; + } + } + } + + public void SetupPanelClock() + { + if (API.Upgrades["desktoppanelclock"] == true) + { + + paneltimetext.ForeColor = API.CurrentSkin.clocktextcolour; + + if (API.CurrentSkinImages.panelclock == null) + { + timepanel.BackColor = API.CurrentSkin.clockbackgroundcolor; + timepanel.BackgroundImage = null; + } + else { + timepanel.BackColor = Color.Transparent; + timepanel.BackgroundImage = API.CurrentSkinImages.panelclock; + timepanel.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.panelclocklayout; + } + paneltimetext.Font = new Font(API.CurrentSkin.panelclocktextfont, API.CurrentSkin.panelclocktextsize, API.CurrentSkin.panelclocktextstyle); + timepanel.Size = new Size(paneltimetext.Width + 3, timepanel.Height); + paneltimetext.Location = new Point(0, API.CurrentSkin.panelclocktexttop); + timepanel.Show(); + } + else { + timepanel.Hide(); + } + + } + + public void CheckUnity() + { + if (UnityEnabled == true) + { + this.TransparencyKey = Color.FromArgb(1, 0, 1); + this.BackColor = Color.FromArgb(1, 0, 1); + this.BackgroundImage = null; + } + else + { + this.TransparencyKey = Color.BurlyWood; + this.BackColor = API.CurrentSkin.desktopbackgroundcolour; + + this.BackgroundImage = API.CurrentSkinImages.desktopbackground; + var d = DateTime.Now; + if (d.Day == 25 && d.Month == 12) + { + if (API.CurrentSave.ChristmasRewardPast == false) + { + this.BackgroundImage = Properties.Resources.christmas_skin; + } + } + this.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.desktopbackgroundlayout; + + } + } + + public void CheckForChristmas() + { + //Christmas - Codepoints gift + //Christmas Skin + var date = DateTime.Now; + if (date.Day == 25 && date.Month == 12) + { + if (API.CurrentSave.newgame == false && API.CurrentSave.ChristmasRewardPast == false) + { + API.CurrentSave.ChristmasRewardPast = true; + API.CreateInfoboxSession("Merry Christmas!", "Merry Christmas from all of the developers of ShiftOS. To celebrate Christmas, you have been given 1000 Codepoints for you to spend on Shiftorium Upgrades. We have also set your desktop background for the occasion.", infobox.InfoboxMode.Info); + API.AddCodepoints(1000); + } + SaveSystem.Utilities.saveGame(); + } + else + { + API.CurrentSave.ChristmasRewardPast = false; //Christmas is a yearly event, so just in case, every day that isn't Christmas, the 'Christmas' variable is set to false so that we can celebrate every year. + SaveSystem.Utilities.saveGame(); + } + } + + public void ChangePosition(Control ctrl, Panel newPanel) + { + try { + ctrl.Parent.Controls.Remove(ctrl); + newPanel.Controls.Add(ctrl); + } + catch + { + newPanel.Controls.Add(ctrl); + } + ctrl.BringToFront(); + } + + public void SetupPanelButtons() + { + pnlpanelbuttonholder.Controls.Clear(); + if (API.Upgrades["panelbuttons"] == true) + { + foreach (PanelButton pbtn in API.PanelButtons) + { + Panel pnl = new Panel(); + Label lbl = new Label(); + PictureBox pb = new PictureBox(); + + pnl.Visible = true; + + pb.Image = pbtn.Icon; + lbl.Text = pbtn.Name; + + pnl.Margin = new Padding(0, API.CurrentSkin.panelbuttonfromtop, API.CurrentSkin.panelbuttongap, 0); + + setpanelbuttonappearnce(ref pnl, ref pb, ref lbl); + + setuppanelbuttonicons(ref pb, pbtn.Icon); + + pnlpanelbuttonholder.Controls.Add(pnl); + pnl.ContextMenuStrip = null; + pnl.Show(); + pnl.Click += new EventHandler(this.PanelButton_Click); + pb.Click += new EventHandler(this.PanelButton_Click); + lbl.Click += new EventHandler(this.PanelButton_Click); + pnl.Tag = pbtn; + pb.Tag = pbtn; + lbl.Tag = pbtn; + } + pnlpanelbuttonholder.Padding = new Padding(API.CurrentSkin.panelbuttoninitialgap, 0, 0, 0); + } + } + + public void setuppanelbuttonicons(ref PictureBox tbicon, Image image) + { + tbicon.Image = image; + tbicon.SizeMode = PictureBoxSizeMode.StretchImage; + tbicon.Size = new Size(API.CurrentSkin.panelbuttoniconsize, API.CurrentSkin.panelbuttoniconsize); + } + + public void setpanelbuttonappearnce(ref Panel panelbutton, ref PictureBox icon, ref Label text) + { + panelbutton.Controls.Add(text); + panelbutton.Controls.Add(icon); + text.Show(); + if (API.Upgrades["appicons"] == true) + { + icon.Show(); + } + icon.Location = new Point(API.CurrentSkin.panelbuttoniconside, API.CurrentSkin.panelbuttonicontop); + icon.Size = new Size(API.CurrentSkin.panelbuttoniconsize, API.CurrentSkin.panelbuttoniconsize); + panelbutton.Size = new Size(API.CurrentSkin.panelbuttonwidth, API.CurrentSkin.panelbuttonheight); + panelbutton.BackColor = API.CurrentSkin.panelbuttoncolour; + panelbutton.BackgroundImage = API.CurrentSkinImages.panelbutton; + panelbutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.panelbuttonlayout; + text.BackColor = Color.Transparent; + text.AutoSize = false; + text.Width = panelbutton.Width - API.CurrentSkin.panelbuttontextside - API.CurrentSkin.panelbuttoniconsize - API.CurrentSkin.panelbuttoniconside; + icon.BackColor = Color.Transparent; + text.ForeColor = API.CurrentSkin.panelbuttontextcolour; + text.Font = new Font(API.CurrentSkin.panelbuttontextfont, API.CurrentSkin.panelbuttontextsize, API.CurrentSkin.panelbuttontextstyle); + text.Location = new Point(API.CurrentSkin.panelbuttontextside, API.CurrentSkin.panelbuttontexttop); + } + + public void RunAppFromLauncher(object sender, EventArgs e) + { + ToolStripMenuItem item = (ToolStripMenuItem)sender; + ApplauncherItem aitem = (ApplauncherItem)item.Tag; + var li = new LuaInterpreter(); + li.mod(aitem.Lua); + + li = null; + } + + public void PanelButton_Click(object sender, EventArgs e) + { + if (API.Upgrades["usefulpanelbuttons"]) + { + Control ctrl = (Control)sender; + try + { + PanelButton pbtn = (PanelButton)ctrl.Tag; + var frm = pbtn.FormToManage; + if(frm.Left < Screen.PrimaryScreen.Bounds.Width) + { + API.MinimizeForm(frm); + } + else + { + API.ToggleMinimized(frm); + } + } + catch + { + + } + } + } + + private void ALHover(object sender, EventArgs e) + { + if (API.CurrentSkinImages.applaunchermouseover != null) + { + desktopappmenu.BackgroundImage = API.CurrentSkinImages.applaunchermouseover; + } + } + + private void ALReset(object sender, EventArgs e) + { + if (API.CurrentSkinImages.applauncher != null) + { + desktopappmenu.BackgroundImage = API.CurrentSkinImages.applauncher; + } + } + + private void ALClick(object sender, MouseEventArgs e) + { + if (API.CurrentSkinImages.applauncherclick != null) + { + desktopappmenu.BackgroundImage = API.CurrentSkinImages.applauncherclick; + } + } + + private bool ShowDebug = false; + + private void clocktick_Tick(object sender, EventArgs e) + { + } + + public void AddNotification(string title, string message) + { + var n = new Notification(title, message); + switch(API.CurrentSkin.desktoppanelposition) + { + case "Top": + n.Location = new Point(this.Width - n.Width, desktoppanel.Height); + break; + case "Bottom": + n.Location = new Point(this.Width - n.Width, this.Height - n.Height - desktoppanel.Height); + break; + } + this.Controls.Add(n); + n.Show(); + n.BringToFront(); + } + + private void FolderToolStripMenuItem_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("New Folder", "Please enter the name of your new folder.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if(!Directory.Exists(Paths.Desktop + res)) + { + Directory.CreateDirectory(Paths.Desktop + res); + SetupDesktop(); + } + else + { + API.CreateInfoboxSession("Can't create folder", "That folder already exists. Please use a different name.", infobox.InfoboxMode.Info); + } + }; + } + + private void deleteToolStripMenuItem_Click(object sender, EventArgs e) + { + if(File.Exists(Paths.Desktop + SelectedIconName)) + { + API.CreateInfoboxSession("Delete File", "Would you really like to delete this file?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if(res == "Yes") + { + File.Delete(Paths.Desktop + SelectedIconName); + } + }; + } + else if(Directory.Exists(Paths.Desktop + SelectedIconName)) + { + API.CreateInfoboxSession("Delete Folder", "Would you really like to delete this folder and all of it's contents?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if (res == "Yes") + { + Directory.Delete(Paths.Desktop + SelectedIconName, true); + } + }; + } + else + { + API.CreateInfoboxSession("Error", "You cannot delete this icon.", infobox.InfoboxMode.Info); + } + SetupDesktop(); + } + + private void scriptToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + private void NewSkin_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Export Skin", "Please enter a name for your skin.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if (res != "Cancelled") + { + if (!File.Exists(Paths.Desktop + res + ".skn")) + { + Skinning.Utilities.saveskintofile(Paths.Desktop + res + ".skn"); + SetupDesktopIcons(); + } + } + }; + } + + private void addDesktopPanelToolStripMenuItem_Click(object sender, EventArgs e) + { + if(API.CurrentSkin.DesktopPanels.Count < 2) + { + string no = "Top"; + string yes = "Bottom"; + if (API.CurrentSkin.DesktopPanels.Count == 0) + { + no = API.CurrentSkin.desktoppanelposition; + } + else { + foreach (var pnl in API.CurrentSkin.DesktopPanels) + { + no = pnl.Position; + } + } + switch(no) + { + case "Top": + yes = "Bottom"; + break; + case "Bottom": + yes = "Top"; + break; + } + var dp = new Skinning.DesktopPanel(); + dp.Height = 24; + dp.Position = yes; + dp.BackgroundColor = Color.White; + API.CurrentSkin.DesktopPanels.Add(dp); + SetupDesktop(); + } + } + + private void toolStripMenuItem3_Click(object sender, EventArgs e) + { + API.CurrentSkin.DesktopPanels.Remove((Skinning.DesktopPanel)SelectedObject.Tag); + Skinning.Utilities.saveskin(); + SetupDesktopPanel(); + } + + private void clockToolStripMenuItem1_Click(object sender, EventArgs e) + { + var dp = (Skinning.DesktopPanel)SelectedObject.Tag; + API.CurrentSkin.ClockPosition = dp.Position; + Skinning.Utilities.saveskin(); + SetupDesktop(); + } + + private void panelButtonsToolStripMenuItem_Click(object sender, EventArgs e) + { + var dp = (Skinning.DesktopPanel)SelectedObject.Tag; + API.CurrentSkin.PanelButtonPosition = dp.Position; + Skinning.Utilities.saveskin(); + SetupDesktop(); + } + + private void appLauncherToolStripMenuItem_Click(object sender, EventArgs e) + { + var dp = (Skinning.DesktopPanel)SelectedObject.Tag; + API.CurrentSkin.ALPosition = dp.Position; + Skinning.Utilities.saveskin(); + SetupDesktop(); + } + + private void widgetManagerToolStripMenuItem_Click(object sender, EventArgs e) + { + API.CreateForm(new WidgetManager(), "Widget Manager", API.GetIcon("WidgetManager")); + } + + private void optionsToolStripMenuItem_Click(object sender, EventArgs e) + { + var dp = (Skinning.DesktopPanel)SelectedObject.Tag; + API.CreateForm(new PanelManager(dp), "Panel Options", API.GetIcon("PanelOptions")); + } + + private void TextDocumentToolStripMenuItem_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("New Text Document", "Please type a name for your document.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (o, a) => + { + var res = API.GetInfoboxResult(); + if(res != "Cancelled") + { + if(!File.Exists(Paths.Desktop + res + ".txt")) + { + File.WriteAllText(Paths.Desktop + res + ".txt", ""); + SetupDesktopIcons(); + } + else + { + API.CreateInfoboxSession("File exists!", "The file name you entered already exists.", infobox.InfoboxMode.Info); + } + } + }; + } + } + + public class DesktopIconManager + { + public static List Icons = null; + public static List Models = null; + + public static void GetIcons() + { + Icons = new List(); + Models = new List(); + API.GetAppLauncherItems(); + if (!Directory.Exists(Paths.Desktop)) + { + Directory.CreateDirectory(Paths.Desktop); + } + else + { + foreach (string dir in Directory.GetDirectories(Paths.Desktop)) + { + //Get dir info + var dinf = new DirectoryInfo(dir); + //Create new IconModel + var m = new IconModel(); + //Set name to dir name + m.Name = dinf.Name; + //Set type to Directory + m.Type = IconType.Directory; + //Set lua to open directory in File Skimmer + m.Lua = $"fileskimmer('/Home/Desktop/{dinf.Name}')"; + Models.Add(m); + } + foreach (string file in Directory.GetFiles(Paths.Desktop)) + { + //Get file info + var finf = new FileInfo(file); + //Create new IconModel + var icm = new IconModel(); + //Set IconModel name to filename + icm.Name = finf.Name; + //Set IconModel's type based on file extension + switch (finf.Extension.ToLower()) //Make the string lower-case for ease of use. + { + case ".desktop": + //Desktop script. + icm.Type = IconType.Script; + icm.Lua = File.ReadAllText(finf.FullName); //The Lua that is to be ran by this script is in the file. + break; + case ".sct": + //Desktop Shortcut - NYI + break; + default: + //File. + icm.Type = IconType.File; + icm.Lua = $"fopen('/Home/Desktop/{finf.Name}')"; + break; + } + Models.Add(icm); + } + } + + foreach(IconModel m in Models) + { + var d = new DesktopIcon(); + d.IconName = m.Name; + d.LuaAction = m.Lua; + switch(m.Type) + { + case IconType.Directory: + d.Icon = API.GetIcon("Folder"); + break; + default: + var finf = new FileInfo(Paths.Desktop + d.IconName); + switch(finf.Extension) + { + case ".txt": + case ".doc": + case ".owd": + case ".docx": + d.Icon = API.GetIcon("TextFile"); + break; + case ".skn": + case ".spk": + d.Icon = API.GetIcon("SkinFile"); + break; + case ".saa": + d.Icon = API.GetIcon("SAAFile"); + break; + case ".pkg": + case ".stp": + d.Icon = API.GetIcon("SetupPackage"); + break; + default: + d.Icon = API.GetIcon("UnrecognizedFile"); + break; + } + break; + } + Icons.Add(d); + } + foreach (ApplauncherItem al in API.AppLauncherItems) + { + if (al.Display == true) + { + var dl = new DesktopIcon(); + dl.Icon = al.Icon; + dl.IconName = al.Name; + dl.LuaAction = al.Lua; + Icons.Add(dl); + } + } + + } + + public class IconModel + { + public string Name { get; set; } + public IconType Type { get; set; } + public string Lua { get; set; } + } + + public enum IconType + { + Directory, + Script, + File, + Shortcut + } + } + + class AppLauncherColorTable : ProfessionalColorTable + { + public override Color ButtonSelectedHighlight + { + get { return API.CurrentSkin.Menu_ButtonSelectedHighlight; } + } + public override Color ButtonSelectedHighlightBorder + { + get { return API.CurrentSkin.Menu_ButtonSelectedHighlight; } + } + public override Color ButtonPressedHighlight + { + get { return API.CurrentSkin.Menu_ButtonPressedHighlight; } + } + public override Color ButtonPressedHighlightBorder + { + get { return API.CurrentSkin.Menu_ButtonPressedHighlight; } + } + public override Color ButtonCheckedHighlight + { + get { return API.CurrentSkin.Menu_ButtonCheckedHighlight; } + } + public override Color ButtonCheckedHighlightBorder + { + get { return API.CurrentSkin.Menu_ButtonCheckedHighlightBorder; } + } + public override Color ButtonPressedBorder + { + get { + if (API.CurrentSkinImages.applauncherclick == null) + { + return API.CurrentSkin.Menu_ButtonPressedBorder; + } + else + { + return Color.Transparent; + } + } + } + public override Color ButtonSelectedBorder + { + get { + if (API.CurrentSkinImages.applauncherclick == null) + { + return API.CurrentSkin.Menu_ButtonSelectedBorder; + } + else + { + return Color.Transparent; + } + } + } + public override Color ButtonCheckedGradientBegin + { + get { return API.CurrentSkin.Menu_ButtonCheckedGradientBegin; } + } + public override Color ButtonCheckedGradientMiddle + { + get { return API.CurrentSkin.Menu_ButtonCheckedGradientMiddle; } + } + public override Color ButtonCheckedGradientEnd + { + get { return API.CurrentSkin.Menu_ButtonCheckedGradientEnd; } + } + public override Color ButtonSelectedGradientBegin + { + get { return API.CurrentSkin.Menu_ButtonSelectedGradientBegin; } + } + public override Color ButtonSelectedGradientMiddle + { + get { return API.CurrentSkin.Menu_ButtonSelectedGradientMiddle; } + } + public override Color ButtonSelectedGradientEnd + { + get { return API.CurrentSkin.Menu_ButtonSelectedGradientEnd; } + } + public override Color ButtonPressedGradientBegin + { + get { return API.CurrentSkin.Menu_ButtonPressedGradientBegin; } + } + public override Color ButtonPressedGradientMiddle + { + get { return API.CurrentSkin.Menu_ButtonPressedGradientMiddle; } + } + public override Color ButtonPressedGradientEnd + { + get { return API.CurrentSkin.Menu_ButtonPressedGradientEnd; } + } + public override Color CheckBackground + { + get { return API.CurrentSkin.Menu_CheckBackground; } + } + public override Color CheckSelectedBackground + { + get { return API.CurrentSkin.Menu_CheckSelectedBackground; } + } + public override Color CheckPressedBackground + { + get { return API.CurrentSkin.Menu_CheckPressedBackground; } + } + public override Color GripDark + { + get { return Color.Transparent; } + } + public override Color GripLight + { + get { return Color.Transparent; } + } + public override Color ImageMarginGradientBegin + { + get { return API.CurrentSkin.Menu_ImageMarginGradientBegin; } + } + public override Color ImageMarginGradientMiddle + { + get { return API.CurrentSkin.Menu_ImageMarginGradientMiddle; } + } + public override Color ImageMarginGradientEnd + { + get { return API.CurrentSkin.Menu_ImageMarginGradientEnd; } + } + public override Color ImageMarginRevealedGradientBegin + { + get { return API.CurrentSkin.Menu_ImageMarginGradientBegin; } + } + public override Color ImageMarginRevealedGradientMiddle + { + get { return API.CurrentSkin.Menu_ImageMarginGradientMiddle; } + } + public override Color ImageMarginRevealedGradientEnd + { + get { return API.CurrentSkin.Menu_ImageMarginGradientEnd; } + } + public override Color MenuStripGradientBegin + { + get { return API.CurrentSkin.Menu_MenuStripGradientBegin; } + } + public override Color MenuStripGradientEnd + { + get { return API.CurrentSkin.Menu_MenuStripGradientEnd; } + } + public override Color MenuItemSelected + { + get { return API.CurrentSkin.Menu_MenuItemSelected; } + } + public override Color MenuItemBorder + { + get { return Color.Transparent; } + } + public override Color MenuBorder + { + get { return API.CurrentSkin.Menu_MenuBorder; } + } + public override Color MenuItemSelectedGradientBegin + { + get { + if (API.CurrentSkinImages.applaunchermouseover == null) + { + return API.CurrentSkin.applaunchermouseovercolour; + } + else + { + return Color.Transparent; + } + } + } + public override Color MenuItemSelectedGradientEnd + { + get + { + if (API.CurrentSkinImages.applaunchermouseover == null) + { + return API.CurrentSkin.applaunchermouseovercolour; + } + else + { + return Color.Transparent; + } + } + } + public override Color MenuItemPressedGradientBegin + { + get + { + if (API.CurrentSkinImages.applauncherclick == null) + { + return API.CurrentSkin.Menu_MenuItemPressedGradientBegin; + } + else + { + return Color.Transparent; + } + } + } + public override Color MenuItemPressedGradientMiddle + { + get + { + if (API.CurrentSkinImages.applauncherclick == null) + { + return API.CurrentSkin.Menu_MenuItemPressedGradientMiddle; + } + else + { + return Color.Transparent; + } + } + } + public override Color MenuItemPressedGradientEnd + { + get + { + if (API.CurrentSkinImages.applauncherclick == null) + { + return API.CurrentSkin.Menu_MenuItemPressedGradientEnd; + } + else + { + return Color.Transparent; + } + } + } + + public override Color RaftingContainerGradientBegin + { + get { return API.CurrentSkin.Menu_RaftingContainerGradientBegin; } + } + public override Color RaftingContainerGradientEnd + { + get { return API.CurrentSkin.Menu_RaftingContainerGradientEnd; } + } + public override Color SeparatorDark + { + get { return API.CurrentSkin.Menu_SeparatorDark; } + } + public override Color SeparatorLight + { + get { return API.CurrentSkin.Menu_SeparatorLight; } + } + public override Color StatusStripGradientBegin + { + get { return API.CurrentSkin.Menu_StatusStripGradientBegin; } + } + public override Color StatusStripGradientEnd + { + get { return API.CurrentSkin.Menu_StatusStripGradientEnd; } + } + public override Color ToolStripBorder + { + get { return API.CurrentSkin.Menu_ToolStripBorder; } + } + public override Color ToolStripDropDownBackground + { + get { return API.CurrentSkin.Menu_ToolStripDropDownBackground; } + } + public override Color ToolStripGradientBegin + { + get { return API.CurrentSkin.Menu_ToolStripGradientBegin; } + } + public override Color ToolStripGradientMiddle + { + get { return API.CurrentSkin.Menu_ToolStripGradientMiddle; } + } + public override Color ToolStripGradientEnd + { + get { return API.CurrentSkin.Menu_ToolStripGradientEnd; } + } + public override Color ToolStripContentPanelGradientBegin + { + get { return API.CurrentSkin.Menu_ToolStripContentPanelGradientBegin; } + } + public override Color ToolStripContentPanelGradientEnd + { + get { return API.CurrentSkin.Menu_ToolStripContentPanelGradientEnd; } + } + public override Color ToolStripPanelGradientBegin + { + get { return API.CurrentSkin.Menu_ToolStripPanelGradientBegin; } + } + public override Color ToolStripPanelGradientEnd + { + get { return API.CurrentSkin.Menu_ToolStripPanelGradientEnd; } + } + public override Color OverflowButtonGradientBegin + { + get { return Color.Transparent; } + } + public override Color OverflowButtonGradientMiddle + { + get { return Color.Transparent; } + } + public override Color OverflowButtonGradientEnd + { + get { return Color.Transparent; } + } + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.resx b/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.resx new file mode 100644 index 0000000..1ee550a --- /dev/null +++ b/source/WindowsFormsApplication1/Desktop/ShiftOSDesktop.resx @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 17, 17 + + + 164, 17 + + + 262, 17 + + + 362, 17 + + + 457, 17 + + + 604, 17 + + + 761, 17 + + + 900, 17 + + + 17, 56 + + + 172, 56 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/DesktopIcon.Designer.cs b/source/WindowsFormsApplication1/DesktopIcon.Designer.cs deleted file mode 100644 index 98369ab..0000000 --- a/source/WindowsFormsApplication1/DesktopIcon.Designer.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace ShiftOS -{ - partial class DesktopIcon - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.pbicon = new System.Windows.Forms.PictureBox(); - this.lbiconname = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.pbicon)).BeginInit(); - this.SuspendLayout(); - // - // pbicon - // - this.pbicon.Location = new System.Drawing.Point(4, 4); - this.pbicon.Name = "pbicon"; - this.pbicon.Size = new System.Drawing.Size(78, 50); - this.pbicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.pbicon.TabIndex = 0; - this.pbicon.TabStop = false; - this.pbicon.DoubleClick += new System.EventHandler(this.Icon_Click); - // - // lbiconname - // - this.lbiconname.AutoEllipsis = true; - this.lbiconname.ForeColor = System.Drawing.Color.White; - this.lbiconname.Location = new System.Drawing.Point(4, 61); - this.lbiconname.Name = "lbiconname"; - this.lbiconname.Size = new System.Drawing.Size(78, 23); - this.lbiconname.TabIndex = 1; - this.lbiconname.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.lbiconname.DoubleClick += new System.EventHandler(this.Icon_Click); - // - // DesktopIcon - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Transparent; - this.Controls.Add(this.lbiconname); - this.Controls.Add(this.pbicon); - this.Name = "DesktopIcon"; - this.Size = new System.Drawing.Size(85, 85); - this.Load += new System.EventHandler(this.DesktopIcon_Load); - this.DoubleClick += new System.EventHandler(this.Icon_Click); - ((System.ComponentModel.ISupportInitialize)(this.pbicon)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.PictureBox pbicon; - private System.Windows.Forms.Label lbiconname; - } -} diff --git a/source/WindowsFormsApplication1/DesktopIcon.cs b/source/WindowsFormsApplication1/DesktopIcon.cs deleted file mode 100644 index bfb0940..0000000 --- a/source/WindowsFormsApplication1/DesktopIcon.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.IO; - -namespace ShiftOS -{ - public partial class DesktopIcon : UserControl - { - /// - /// User control for a desktop icon. - /// - public DesktopIcon() - { - InitializeComponent(); - } - - public string IconName - { - set - { - lbiconname.Text = value; - } - get - { - return lbiconname.Text; - } - } - - public Image Icon - { - set - { - pbicon.Image = value; - } - get - { - return pbicon.Image; - } - } - - //public string LuaAction { get; set; } - public string LuaAction = "open_program(\"shiftorium\")"; - private void Icon_Click(object sender, EventArgs e) - { - if (File.Exists(Paths.Desktop + IconName)) - { - var fs = new File_Skimmer(); - fs.OpenFile(Paths.Desktop + IconName); - } - else - { - var li = new LuaInterpreter(); - li.mod(LuaAction); - lbiconname.BackColor = Color.White; - t.Start(); - } - } - - public Timer t = new Timer(); - - - private void DesktopIcon_Load(object sender, EventArgs e) - { - t.Interval = 5000; - t.Tick += (object s, EventArgs a) => - { - lbiconname.BackColor = Color.Transparent; - }; - var st = new Timer(); - st.Interval = 200; - st.Tick += (object s, EventArgs a) => { - lbiconname.ForeColor = API.CurrentSkin.IconTextColor; - }; - } - } -} diff --git a/source/WindowsFormsApplication1/DesktopIcon.resx b/source/WindowsFormsApplication1/DesktopIcon.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/DesktopIcon.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Dialogs/Color_Picker.Designer.cs b/source/WindowsFormsApplication1/Dialogs/Color_Picker.Designer.cs new file mode 100644 index 0000000..bc68a96 --- /dev/null +++ b/source/WindowsFormsApplication1/Dialogs/Color_Picker.Designer.cs @@ -0,0 +1,3573 @@ +using System; + +namespace ShiftOS +{ + partial class Color_Picker + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.pgcontents = new System.Windows.Forms.Panel(); + this.pnlpinkcolours = new System.Windows.Forms.Panel(); + this.pnlpinkoptions = new System.Windows.Forms.Panel(); + this.Label35 = new System.Windows.Forms.Label(); + this.txtpinksgreen = new System.Windows.Forms.TextBox(); + this.txtpinksred = new System.Windows.Forms.TextBox(); + this.Label36 = new System.Windows.Forms.Label(); + this.Label37 = new System.Windows.Forms.Label(); + this.txtpinksblue = new System.Windows.Forms.TextBox(); + this.pnlpinkcustomcolour = new System.Windows.Forms.Panel(); + this.pnlpink16 = new System.Windows.Forms.Panel(); + this.pnlpink12 = new System.Windows.Forms.Panel(); + this.pnlpink14 = new System.Windows.Forms.Panel(); + this.pnlpink10 = new System.Windows.Forms.Panel(); + this.pnlpink8 = new System.Windows.Forms.Panel(); + this.pnlpink4 = new System.Windows.Forms.Panel(); + this.pnlpink6 = new System.Windows.Forms.Panel(); + this.pnlpink15 = new System.Windows.Forms.Panel(); + this.pnlpink2 = new System.Windows.Forms.Panel(); + this.pnlpink13 = new System.Windows.Forms.Panel(); + this.pnlpink11 = new System.Windows.Forms.Panel(); + this.pnlpink7 = new System.Windows.Forms.Panel(); + this.pnlpink9 = new System.Windows.Forms.Panel(); + this.pnlpink5 = new System.Windows.Forms.Panel(); + this.pnlpink3 = new System.Windows.Forms.Panel(); + this.pnlpink1 = new System.Windows.Forms.Panel(); + this.lblpinklevel = new System.Windows.Forms.Label(); + this.Label23 = new System.Windows.Forms.Label(); + this.pnlredcolours = new System.Windows.Forms.Panel(); + this.pnlredoptions = new System.Windows.Forms.Panel(); + this.Label32 = new System.Windows.Forms.Label(); + this.txtredsblue = new System.Windows.Forms.TextBox(); + this.txtredsred = new System.Windows.Forms.TextBox(); + this.Label33 = new System.Windows.Forms.Label(); + this.Label34 = new System.Windows.Forms.Label(); + this.txtredsgreen = new System.Windows.Forms.TextBox(); + this.pnlredcustomcolour = new System.Windows.Forms.Panel(); + this.pnlred16 = new System.Windows.Forms.Panel(); + this.pnlred12 = new System.Windows.Forms.Panel(); + this.pnlred14 = new System.Windows.Forms.Panel(); + this.pnlred10 = new System.Windows.Forms.Panel(); + this.pnlred8 = new System.Windows.Forms.Panel(); + this.pnlred4 = new System.Windows.Forms.Panel(); + this.pnlred6 = new System.Windows.Forms.Panel(); + this.pnlred15 = new System.Windows.Forms.Panel(); + this.pnlred2 = new System.Windows.Forms.Panel(); + this.pnlred13 = new System.Windows.Forms.Panel(); + this.pnlred11 = new System.Windows.Forms.Panel(); + this.pnlred7 = new System.Windows.Forms.Panel(); + this.pnlred9 = new System.Windows.Forms.Panel(); + this.pnlred5 = new System.Windows.Forms.Panel(); + this.pnlred3 = new System.Windows.Forms.Panel(); + this.pnlred1 = new System.Windows.Forms.Panel(); + this.lblredlevel = new System.Windows.Forms.Label(); + this.Label21 = new System.Windows.Forms.Label(); + this.pnlbrowncolours = new System.Windows.Forms.Panel(); + this.pnlbrownoptions = new System.Windows.Forms.Panel(); + this.Label29 = new System.Windows.Forms.Label(); + this.txtbrownsblue = new System.Windows.Forms.TextBox(); + this.txtbrownsred = new System.Windows.Forms.TextBox(); + this.Label30 = new System.Windows.Forms.Label(); + this.Label31 = new System.Windows.Forms.Label(); + this.txtbrownsgreen = new System.Windows.Forms.TextBox(); + this.pnlbrowncustomcolour = new System.Windows.Forms.Panel(); + this.pnlbrown16 = new System.Windows.Forms.Panel(); + this.pnlbrown12 = new System.Windows.Forms.Panel(); + this.pnlbrown14 = new System.Windows.Forms.Panel(); + this.pnlbrown10 = new System.Windows.Forms.Panel(); + this.pnlbrown8 = new System.Windows.Forms.Panel(); + this.pnlbrown4 = new System.Windows.Forms.Panel(); + this.pnlbrown6 = new System.Windows.Forms.Panel(); + this.pnlbrown15 = new System.Windows.Forms.Panel(); + this.pnlbrown2 = new System.Windows.Forms.Panel(); + this.pnlbrown13 = new System.Windows.Forms.Panel(); + this.pnlbrown11 = new System.Windows.Forms.Panel(); + this.pnlbrown7 = new System.Windows.Forms.Panel(); + this.pnlbrown9 = new System.Windows.Forms.Panel(); + this.pnlbrown5 = new System.Windows.Forms.Panel(); + this.pnlbrown3 = new System.Windows.Forms.Panel(); + this.pnlbrown1 = new System.Windows.Forms.Panel(); + this.lblbrownlevel = new System.Windows.Forms.Label(); + this.Label19 = new System.Windows.Forms.Label(); + this.pnlorangecolours = new System.Windows.Forms.Panel(); + this.pnlorangeoptions = new System.Windows.Forms.Panel(); + this.Label25 = new System.Windows.Forms.Label(); + this.txtorangesblue = new System.Windows.Forms.TextBox(); + this.txtorangesred = new System.Windows.Forms.TextBox(); + this.Label27 = new System.Windows.Forms.Label(); + this.Label28 = new System.Windows.Forms.Label(); + this.txtorangesgreen = new System.Windows.Forms.TextBox(); + this.pnlorangecustomcolour = new System.Windows.Forms.Panel(); + this.pnlorange16 = new System.Windows.Forms.Panel(); + this.pnlorange12 = new System.Windows.Forms.Panel(); + this.pnlorange14 = new System.Windows.Forms.Panel(); + this.pnlorange10 = new System.Windows.Forms.Panel(); + this.pnlorange8 = new System.Windows.Forms.Panel(); + this.pnlorange4 = new System.Windows.Forms.Panel(); + this.pnlorange6 = new System.Windows.Forms.Panel(); + this.pnlorange15 = new System.Windows.Forms.Panel(); + this.pnlorange2 = new System.Windows.Forms.Panel(); + this.pnlorange13 = new System.Windows.Forms.Panel(); + this.pnlorange11 = new System.Windows.Forms.Panel(); + this.pnlorange7 = new System.Windows.Forms.Panel(); + this.pnlorange9 = new System.Windows.Forms.Panel(); + this.pnlorange5 = new System.Windows.Forms.Panel(); + this.pnlorange3 = new System.Windows.Forms.Panel(); + this.pnlorange1 = new System.Windows.Forms.Panel(); + this.lblorangelevel = new System.Windows.Forms.Label(); + this.Label13 = new System.Windows.Forms.Label(); + this.pnlyellowcolours = new System.Windows.Forms.Panel(); + this.pnlyellowoptions = new System.Windows.Forms.Panel(); + this.Label20 = new System.Windows.Forms.Label(); + this.txtyellowsblue = new System.Windows.Forms.TextBox(); + this.txtyellowsred = new System.Windows.Forms.TextBox(); + this.Label22 = new System.Windows.Forms.Label(); + this.Label24 = new System.Windows.Forms.Label(); + this.txtyellowsgreen = new System.Windows.Forms.TextBox(); + this.pnlyellowcustomcolour = new System.Windows.Forms.Panel(); + this.pnlyellow16 = new System.Windows.Forms.Panel(); + this.pnlyellow12 = new System.Windows.Forms.Panel(); + this.pnlyellow14 = new System.Windows.Forms.Panel(); + this.pnlyellow10 = new System.Windows.Forms.Panel(); + this.pnlyellow8 = new System.Windows.Forms.Panel(); + this.pnlyellow4 = new System.Windows.Forms.Panel(); + this.pnlyellow6 = new System.Windows.Forms.Panel(); + this.pnlyellow15 = new System.Windows.Forms.Panel(); + this.pnlyellow2 = new System.Windows.Forms.Panel(); + this.pnlyellow13 = new System.Windows.Forms.Panel(); + this.pnlyellow11 = new System.Windows.Forms.Panel(); + this.pnlyellow7 = new System.Windows.Forms.Panel(); + this.pnlyellow9 = new System.Windows.Forms.Panel(); + this.pnlyellow5 = new System.Windows.Forms.Panel(); + this.pnlyellow3 = new System.Windows.Forms.Panel(); + this.pnlyellow1 = new System.Windows.Forms.Panel(); + this.lblyellowlevel = new System.Windows.Forms.Label(); + this.Label11 = new System.Windows.Forms.Label(); + this.pnlgreencolours = new System.Windows.Forms.Panel(); + this.pnlgreenoptions = new System.Windows.Forms.Panel(); + this.Label15 = new System.Windows.Forms.Label(); + this.txtgreensred = new System.Windows.Forms.TextBox(); + this.txtgreensgreen = new System.Windows.Forms.TextBox(); + this.Label16 = new System.Windows.Forms.Label(); + this.Label18 = new System.Windows.Forms.Label(); + this.txtgreensblue = new System.Windows.Forms.TextBox(); + this.pnlgreencustomcolour = new System.Windows.Forms.Panel(); + this.pnlgreen16 = new System.Windows.Forms.Panel(); + this.pnlgreen12 = new System.Windows.Forms.Panel(); + this.pnlgreen14 = new System.Windows.Forms.Panel(); + this.pnlgreen10 = new System.Windows.Forms.Panel(); + this.pnlgreen8 = new System.Windows.Forms.Panel(); + this.pnlgreen4 = new System.Windows.Forms.Panel(); + this.pnlgreen6 = new System.Windows.Forms.Panel(); + this.pnlgreen15 = new System.Windows.Forms.Panel(); + this.pnlgreen2 = new System.Windows.Forms.Panel(); + this.pnlgreen13 = new System.Windows.Forms.Panel(); + this.pnlgreen11 = new System.Windows.Forms.Panel(); + this.pnlgreen7 = new System.Windows.Forms.Panel(); + this.pnlgreen9 = new System.Windows.Forms.Panel(); + this.pnlgreen5 = new System.Windows.Forms.Panel(); + this.pnlgreen3 = new System.Windows.Forms.Panel(); + this.pnlgreen1 = new System.Windows.Forms.Panel(); + this.lblgreenlevel = new System.Windows.Forms.Label(); + this.Label9 = new System.Windows.Forms.Label(); + this.pnlbluecolours = new System.Windows.Forms.Panel(); + this.pnlblueoptions = new System.Windows.Forms.Panel(); + this.Label6 = new System.Windows.Forms.Label(); + this.txtbluesred = new System.Windows.Forms.TextBox(); + this.txtbluesblue = new System.Windows.Forms.TextBox(); + this.Label4 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.txtbluesgreen = new System.Windows.Forms.TextBox(); + this.pnlbluecustomcolour = new System.Windows.Forms.Panel(); + this.pnlblue16 = new System.Windows.Forms.Panel(); + this.pnlblue12 = new System.Windows.Forms.Panel(); + this.pnlblue14 = new System.Windows.Forms.Panel(); + this.pnlblue10 = new System.Windows.Forms.Panel(); + this.pnlblue8 = new System.Windows.Forms.Panel(); + this.pnlblue4 = new System.Windows.Forms.Panel(); + this.pnlblue6 = new System.Windows.Forms.Panel(); + this.pnlblue15 = new System.Windows.Forms.Panel(); + this.pnlblue2 = new System.Windows.Forms.Panel(); + this.pnlblue13 = new System.Windows.Forms.Panel(); + this.pnlblue11 = new System.Windows.Forms.Panel(); + this.pnlblue7 = new System.Windows.Forms.Panel(); + this.pnlblue9 = new System.Windows.Forms.Panel(); + this.pnlblue5 = new System.Windows.Forms.Panel(); + this.pnlblue3 = new System.Windows.Forms.Panel(); + this.pnlblue1 = new System.Windows.Forms.Panel(); + this.lblbluelevel = new System.Windows.Forms.Label(); + this.Label7 = new System.Windows.Forms.Label(); + this.pnlpurplecolours = new System.Windows.Forms.Panel(); + this.pnlpurpleoptions = new System.Windows.Forms.Panel(); + this.Label8 = new System.Windows.Forms.Label(); + this.txtpurplesgreen = new System.Windows.Forms.TextBox(); + this.txtpurplesblue = new System.Windows.Forms.TextBox(); + this.Label10 = new System.Windows.Forms.Label(); + this.Label12 = new System.Windows.Forms.Label(); + this.txtpurplesred = new System.Windows.Forms.TextBox(); + this.pnlpurplecustomcolour = new System.Windows.Forms.Panel(); + this.pnlpurple16 = new System.Windows.Forms.Panel(); + this.pnlpurple12 = new System.Windows.Forms.Panel(); + this.pnlpurple14 = new System.Windows.Forms.Panel(); + this.pnlpurple10 = new System.Windows.Forms.Panel(); + this.pnlpurple8 = new System.Windows.Forms.Panel(); + this.pnlpurple4 = new System.Windows.Forms.Panel(); + this.pnlpurple6 = new System.Windows.Forms.Panel(); + this.pnlpurple15 = new System.Windows.Forms.Panel(); + this.pnlpurple2 = new System.Windows.Forms.Panel(); + this.pnlpurple13 = new System.Windows.Forms.Panel(); + this.pnlpurple11 = new System.Windows.Forms.Panel(); + this.pnlpurple7 = new System.Windows.Forms.Panel(); + this.pnlpurple9 = new System.Windows.Forms.Panel(); + this.pnlpurple5 = new System.Windows.Forms.Panel(); + this.pnlpurple3 = new System.Windows.Forms.Panel(); + this.pnlpurple1 = new System.Windows.Forms.Panel(); + this.lblpurplelevel = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.pnlgraycolours = new System.Windows.Forms.Panel(); + this.lblcustomshadetut = new System.Windows.Forms.Label(); + this.txtcustomgrayshade = new System.Windows.Forms.TextBox(); + this.pnlgraycustomcolour = new System.Windows.Forms.Panel(); + this.pnlgray16 = new System.Windows.Forms.Panel(); + this.pnlgray12 = new System.Windows.Forms.Panel(); + this.pnlgray14 = new System.Windows.Forms.Panel(); + this.pnlgray10 = new System.Windows.Forms.Panel(); + this.pnlgray8 = new System.Windows.Forms.Panel(); + this.pnlgray4 = new System.Windows.Forms.Panel(); + this.pnlgray6 = new System.Windows.Forms.Panel(); + this.pnlgray15 = new System.Windows.Forms.Panel(); + this.pnlgray2 = new System.Windows.Forms.Panel(); + this.pnlgray13 = new System.Windows.Forms.Panel(); + this.pnlgray11 = new System.Windows.Forms.Panel(); + this.pnlgray7 = new System.Windows.Forms.Panel(); + this.pnlgray9 = new System.Windows.Forms.Panel(); + this.pnlgray5 = new System.Windows.Forms.Panel(); + this.pnlgray3 = new System.Windows.Forms.Panel(); + this.pnlgray1 = new System.Windows.Forms.Panel(); + this.lblgraylevel = new System.Windows.Forms.Label(); + this.Label3 = new System.Windows.Forms.Label(); + this.pnlanycolours = new System.Windows.Forms.Panel(); + this.pnlanyoptions = new System.Windows.Forms.Panel(); + this.Label38 = new System.Windows.Forms.Label(); + this.txtanysgreen = new System.Windows.Forms.TextBox(); + this.txtanysred = new System.Windows.Forms.TextBox(); + this.Label39 = new System.Windows.Forms.Label(); + this.Label40 = new System.Windows.Forms.Label(); + this.txtanysblue = new System.Windows.Forms.TextBox(); + this.pnlanycustomcolour = new System.Windows.Forms.Panel(); + this.pnlany16 = new System.Windows.Forms.Panel(); + this.pnlany12 = new System.Windows.Forms.Panel(); + this.pnlany14 = new System.Windows.Forms.Panel(); + this.pnlany10 = new System.Windows.Forms.Panel(); + this.pnlany8 = new System.Windows.Forms.Panel(); + this.pnlany4 = new System.Windows.Forms.Panel(); + this.pnlany6 = new System.Windows.Forms.Panel(); + this.pnlany15 = new System.Windows.Forms.Panel(); + this.pnlany2 = new System.Windows.Forms.Panel(); + this.pnlany13 = new System.Windows.Forms.Panel(); + this.pnlany11 = new System.Windows.Forms.Panel(); + this.pnlany7 = new System.Windows.Forms.Panel(); + this.pnlany9 = new System.Windows.Forms.Panel(); + this.pnlany5 = new System.Windows.Forms.Panel(); + this.pnlany3 = new System.Windows.Forms.Panel(); + this.pnlany1 = new System.Windows.Forms.Panel(); + this.lblanylevel = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.Panel1 = new System.Windows.Forms.Panel(); + this.lblnewcolourrgb = new System.Windows.Forms.Label(); + this.lblnewcolourname = new System.Windows.Forms.Label(); + this.Label26 = new System.Windows.Forms.Label(); + this.Label17 = new System.Windows.Forms.Label(); + this.lbloldcolourrgb = new System.Windows.Forms.Label(); + this.lbloldcolourname = new System.Windows.Forms.Label(); + this.Label14 = new System.Windows.Forms.Label(); + this.pnlnewcolour = new System.Windows.Forms.Panel(); + this.pnloldcolour = new System.Windows.Forms.Panel(); + this.lblobjecttocolour = new System.Windows.Forms.Label(); + this.pgcontents.SuspendLayout(); + this.pnlpinkcolours.SuspendLayout(); + this.pnlpinkoptions.SuspendLayout(); + this.pnlredcolours.SuspendLayout(); + this.pnlredoptions.SuspendLayout(); + this.pnlbrowncolours.SuspendLayout(); + this.pnlbrownoptions.SuspendLayout(); + this.pnlorangecolours.SuspendLayout(); + this.pnlorangeoptions.SuspendLayout(); + this.pnlyellowcolours.SuspendLayout(); + this.pnlyellowoptions.SuspendLayout(); + this.pnlgreencolours.SuspendLayout(); + this.pnlgreenoptions.SuspendLayout(); + this.pnlbluecolours.SuspendLayout(); + this.pnlblueoptions.SuspendLayout(); + this.pnlpurplecolours.SuspendLayout(); + this.pnlpurpleoptions.SuspendLayout(); + this.pnlgraycolours.SuspendLayout(); + this.pnlanycolours.SuspendLayout(); + this.pnlanyoptions.SuspendLayout(); + this.Panel1.SuspendLayout(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.Controls.Add(this.pnlpinkcolours); + this.pgcontents.Controls.Add(this.pnlredcolours); + this.pgcontents.Controls.Add(this.pnlbrowncolours); + this.pgcontents.Controls.Add(this.pnlorangecolours); + this.pgcontents.Controls.Add(this.pnlyellowcolours); + this.pgcontents.Controls.Add(this.pnlgreencolours); + this.pgcontents.Controls.Add(this.pnlbluecolours); + this.pgcontents.Controls.Add(this.pnlpurplecolours); + this.pgcontents.Controls.Add(this.pnlgraycolours); + this.pgcontents.Controls.Add(this.pnlanycolours); + this.pgcontents.Controls.Add(this.Panel1); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(447, 600); + this.pgcontents.TabIndex = 20; + // + // pnlpinkcolours + // + this.pnlpinkcolours.BackColor = System.Drawing.Color.White; + this.pnlpinkcolours.Controls.Add(this.pnlpinkoptions); + this.pnlpinkcolours.Controls.Add(this.pnlpinkcustomcolour); + this.pnlpinkcolours.Controls.Add(this.pnlpink16); + this.pnlpinkcolours.Controls.Add(this.pnlpink12); + this.pnlpinkcolours.Controls.Add(this.pnlpink14); + this.pnlpinkcolours.Controls.Add(this.pnlpink10); + this.pnlpinkcolours.Controls.Add(this.pnlpink8); + this.pnlpinkcolours.Controls.Add(this.pnlpink4); + this.pnlpinkcolours.Controls.Add(this.pnlpink6); + this.pnlpinkcolours.Controls.Add(this.pnlpink15); + this.pnlpinkcolours.Controls.Add(this.pnlpink2); + this.pnlpinkcolours.Controls.Add(this.pnlpink13); + this.pnlpinkcolours.Controls.Add(this.pnlpink11); + this.pnlpinkcolours.Controls.Add(this.pnlpink7); + this.pnlpinkcolours.Controls.Add(this.pnlpink9); + this.pnlpinkcolours.Controls.Add(this.pnlpink5); + this.pnlpinkcolours.Controls.Add(this.pnlpink3); + this.pnlpinkcolours.Controls.Add(this.pnlpink1); + this.pnlpinkcolours.Controls.Add(this.lblpinklevel); + this.pnlpinkcolours.Controls.Add(this.Label23); + this.pnlpinkcolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlpinkcolours.Location = new System.Drawing.Point(0, 521); + this.pnlpinkcolours.Name = "pnlpinkcolours"; + this.pnlpinkcolours.Size = new System.Drawing.Size(447, 46); + this.pnlpinkcolours.TabIndex = 11; + this.pnlpinkcolours.Visible = false; + // + // pnlpinkoptions + // + this.pnlpinkoptions.Controls.Add(this.Label35); + this.pnlpinkoptions.Controls.Add(this.txtpinksgreen); + this.pnlpinkoptions.Controls.Add(this.txtpinksred); + this.pnlpinkoptions.Controls.Add(this.Label36); + this.pnlpinkoptions.Controls.Add(this.Label37); + this.pnlpinkoptions.Controls.Add(this.txtpinksblue); + this.pnlpinkoptions.Location = new System.Drawing.Point(282, 2); + this.pnlpinkoptions.Name = "pnlpinkoptions"; + this.pnlpinkoptions.Size = new System.Drawing.Size(120, 40); + this.pnlpinkoptions.TabIndex = 33; + this.pnlpinkoptions.Visible = false; + // + // Label35 + // + this.Label35.AutoSize = true; + this.Label35.BackColor = System.Drawing.Color.Transparent; + this.Label35.Location = new System.Drawing.Point(56, 24); + this.Label35.Name = "Label35"; + this.Label35.Size = new System.Drawing.Size(39, 13); + this.Label35.TabIndex = 26; + this.Label35.Text = "Green:"; + // + // txtpinksgreen + // + this.txtpinksgreen.BackColor = System.Drawing.Color.White; + this.txtpinksgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpinksgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpinksgreen.Location = new System.Drawing.Point(95, 22); + this.txtpinksgreen.Multiline = true; + this.txtpinksgreen.Name = "txtpinksgreen"; + this.txtpinksgreen.Size = new System.Drawing.Size(23, 17); + this.txtpinksgreen.TabIndex = 25; + this.txtpinksgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtpinksgreen.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); + // + // txtpinksred + // + this.txtpinksred.BackColor = System.Drawing.Color.White; + this.txtpinksred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpinksred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpinksred.Location = new System.Drawing.Point(64, 2); + this.txtpinksred.Multiline = true; + this.txtpinksred.Name = "txtpinksred"; + this.txtpinksred.Size = new System.Drawing.Size(23, 17); + this.txtpinksred.TabIndex = 21; + this.txtpinksred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtpinksred.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); + // + // Label36 + // + this.Label36.AutoSize = true; + this.Label36.BackColor = System.Drawing.Color.Transparent; + this.Label36.Location = new System.Drawing.Point(1, 23); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(31, 13); + this.Label36.TabIndex = 24; + this.Label36.Text = "Blue:"; + // + // Label37 + // + this.Label37.AutoSize = true; + this.Label37.BackColor = System.Drawing.Color.Transparent; + this.Label37.Location = new System.Drawing.Point(33, 4); + this.Label37.Name = "Label37"; + this.Label37.Size = new System.Drawing.Size(30, 13); + this.Label37.TabIndex = 22; + this.Label37.Text = "Red:"; + // + // txtpinksblue + // + this.txtpinksblue.BackColor = System.Drawing.Color.White; + this.txtpinksblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpinksblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpinksblue.Location = new System.Drawing.Point(32, 22); + this.txtpinksblue.Multiline = true; + this.txtpinksblue.Name = "txtpinksblue"; + this.txtpinksblue.Size = new System.Drawing.Size(23, 17); + this.txtpinksblue.TabIndex = 23; + this.txtpinksblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtpinksblue.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); + // + // pnlpinkcustomcolour + // + this.pnlpinkcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpinkcustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlpinkcustomcolour.Name = "pnlpinkcustomcolour"; + this.pnlpinkcustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlpinkcustomcolour.TabIndex = 18; + this.pnlpinkcustomcolour.Visible = false; + // + // pnlpink16 + // + this.pnlpink16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink16.Location = new System.Drawing.Point(259, 25); + this.pnlpink16.Name = "pnlpink16"; + this.pnlpink16.Size = new System.Drawing.Size(20, 13); + this.pnlpink16.TabIndex = 17; + this.pnlpink16.Visible = false; + // + // pnlpink12 + // + this.pnlpink12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink12.Location = new System.Drawing.Point(155, 25); + this.pnlpink12.Name = "pnlpink12"; + this.pnlpink12.Size = new System.Drawing.Size(20, 13); + this.pnlpink12.TabIndex = 9; + this.pnlpink12.Visible = false; + // + // pnlpink14 + // + this.pnlpink14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink14.Location = new System.Drawing.Point(207, 25); + this.pnlpink14.Name = "pnlpink14"; + this.pnlpink14.Size = new System.Drawing.Size(20, 13); + this.pnlpink14.TabIndex = 13; + this.pnlpink14.Visible = false; + // + // pnlpink10 + // + this.pnlpink10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink10.Location = new System.Drawing.Point(103, 25); + this.pnlpink10.Name = "pnlpink10"; + this.pnlpink10.Size = new System.Drawing.Size(20, 13); + this.pnlpink10.TabIndex = 5; + this.pnlpink10.Visible = false; + // + // pnlpink8 + // + this.pnlpink8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink8.Location = new System.Drawing.Point(259, 8); + this.pnlpink8.Name = "pnlpink8"; + this.pnlpink8.Size = new System.Drawing.Size(20, 13); + this.pnlpink8.TabIndex = 16; + this.pnlpink8.Visible = false; + // + // pnlpink4 + // + this.pnlpink4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink4.Location = new System.Drawing.Point(155, 8); + this.pnlpink4.Name = "pnlpink4"; + this.pnlpink4.Size = new System.Drawing.Size(20, 13); + this.pnlpink4.TabIndex = 8; + this.pnlpink4.Visible = false; + // + // pnlpink6 + // + this.pnlpink6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink6.Location = new System.Drawing.Point(207, 8); + this.pnlpink6.Name = "pnlpink6"; + this.pnlpink6.Size = new System.Drawing.Size(20, 13); + this.pnlpink6.TabIndex = 12; + this.pnlpink6.Visible = false; + // + // pnlpink15 + // + this.pnlpink15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink15.Location = new System.Drawing.Point(233, 25); + this.pnlpink15.Name = "pnlpink15"; + this.pnlpink15.Size = new System.Drawing.Size(20, 13); + this.pnlpink15.TabIndex = 15; + this.pnlpink15.Visible = false; + // + // pnlpink2 + // + this.pnlpink2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink2.Location = new System.Drawing.Point(103, 8); + this.pnlpink2.Name = "pnlpink2"; + this.pnlpink2.Size = new System.Drawing.Size(20, 13); + this.pnlpink2.TabIndex = 4; + this.pnlpink2.Visible = false; + // + // pnlpink13 + // + this.pnlpink13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink13.Location = new System.Drawing.Point(181, 25); + this.pnlpink13.Name = "pnlpink13"; + this.pnlpink13.Size = new System.Drawing.Size(20, 13); + this.pnlpink13.TabIndex = 11; + this.pnlpink13.Visible = false; + // + // pnlpink11 + // + this.pnlpink11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink11.Location = new System.Drawing.Point(129, 25); + this.pnlpink11.Name = "pnlpink11"; + this.pnlpink11.Size = new System.Drawing.Size(20, 13); + this.pnlpink11.TabIndex = 7; + this.pnlpink11.Visible = false; + // + // pnlpink7 + // + this.pnlpink7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink7.Location = new System.Drawing.Point(233, 8); + this.pnlpink7.Name = "pnlpink7"; + this.pnlpink7.Size = new System.Drawing.Size(20, 13); + this.pnlpink7.TabIndex = 14; + this.pnlpink7.Visible = false; + // + // pnlpink9 + // + this.pnlpink9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink9.Location = new System.Drawing.Point(77, 25); + this.pnlpink9.Name = "pnlpink9"; + this.pnlpink9.Size = new System.Drawing.Size(20, 13); + this.pnlpink9.TabIndex = 3; + this.pnlpink9.Visible = false; + // + // pnlpink5 + // + this.pnlpink5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink5.Location = new System.Drawing.Point(181, 8); + this.pnlpink5.Name = "pnlpink5"; + this.pnlpink5.Size = new System.Drawing.Size(20, 13); + this.pnlpink5.TabIndex = 10; + this.pnlpink5.Visible = false; + // + // pnlpink3 + // + this.pnlpink3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink3.Location = new System.Drawing.Point(129, 8); + this.pnlpink3.Name = "pnlpink3"; + this.pnlpink3.Size = new System.Drawing.Size(20, 13); + this.pnlpink3.TabIndex = 6; + this.pnlpink3.Visible = false; + // + // pnlpink1 + // + this.pnlpink1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink1.Location = new System.Drawing.Point(77, 8); + this.pnlpink1.Name = "pnlpink1"; + this.pnlpink1.Size = new System.Drawing.Size(20, 13); + this.pnlpink1.TabIndex = 2; + this.pnlpink1.Visible = false; + // + // lblpinklevel + // + this.lblpinklevel.AutoSize = true; + this.lblpinklevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblpinklevel.Location = new System.Drawing.Point(5, 25); + this.lblpinklevel.Name = "lblpinklevel"; + this.lblpinklevel.Size = new System.Drawing.Size(49, 15); + this.lblpinklevel.TabIndex = 1; + this.lblpinklevel.Text = "Level: 4"; + // + // Label23 + // + this.Label23.AutoSize = true; + this.Label23.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label23.Location = new System.Drawing.Point(3, 2); + this.Label23.Name = "Label23"; + this.Label23.Size = new System.Drawing.Size(48, 22); + this.Label23.TabIndex = 0; + this.Label23.Text = "Pink"; + // + // pnlredcolours + // + this.pnlredcolours.BackColor = System.Drawing.Color.White; + this.pnlredcolours.Controls.Add(this.pnlredoptions); + this.pnlredcolours.Controls.Add(this.pnlredcustomcolour); + this.pnlredcolours.Controls.Add(this.pnlred16); + this.pnlredcolours.Controls.Add(this.pnlred12); + this.pnlredcolours.Controls.Add(this.pnlred14); + this.pnlredcolours.Controls.Add(this.pnlred10); + this.pnlredcolours.Controls.Add(this.pnlred8); + this.pnlredcolours.Controls.Add(this.pnlred4); + this.pnlredcolours.Controls.Add(this.pnlred6); + this.pnlredcolours.Controls.Add(this.pnlred15); + this.pnlredcolours.Controls.Add(this.pnlred2); + this.pnlredcolours.Controls.Add(this.pnlred13); + this.pnlredcolours.Controls.Add(this.pnlred11); + this.pnlredcolours.Controls.Add(this.pnlred7); + this.pnlredcolours.Controls.Add(this.pnlred9); + this.pnlredcolours.Controls.Add(this.pnlred5); + this.pnlredcolours.Controls.Add(this.pnlred3); + this.pnlredcolours.Controls.Add(this.pnlred1); + this.pnlredcolours.Controls.Add(this.lblredlevel); + this.pnlredcolours.Controls.Add(this.Label21); + this.pnlredcolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlredcolours.Location = new System.Drawing.Point(0, 475); + this.pnlredcolours.Name = "pnlredcolours"; + this.pnlredcolours.Size = new System.Drawing.Size(447, 46); + this.pnlredcolours.TabIndex = 10; + this.pnlredcolours.Visible = false; + // + // pnlredoptions + // + this.pnlredoptions.Controls.Add(this.Label32); + this.pnlredoptions.Controls.Add(this.txtredsblue); + this.pnlredoptions.Controls.Add(this.txtredsred); + this.pnlredoptions.Controls.Add(this.Label33); + this.pnlredoptions.Controls.Add(this.Label34); + this.pnlredoptions.Controls.Add(this.txtredsgreen); + this.pnlredoptions.Location = new System.Drawing.Point(282, 2); + this.pnlredoptions.Name = "pnlredoptions"; + this.pnlredoptions.Size = new System.Drawing.Size(120, 40); + this.pnlredoptions.TabIndex = 32; + this.pnlredoptions.Visible = false; + // + // Label32 + // + this.Label32.AutoSize = true; + this.Label32.BackColor = System.Drawing.Color.Transparent; + this.Label32.Location = new System.Drawing.Point(64, 24); + this.Label32.Name = "Label32"; + this.Label32.Size = new System.Drawing.Size(31, 13); + this.Label32.TabIndex = 26; + this.Label32.Text = "Blue:"; + // + // txtredsblue + // + this.txtredsblue.BackColor = System.Drawing.Color.White; + this.txtredsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtredsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtredsblue.Location = new System.Drawing.Point(95, 22); + this.txtredsblue.Multiline = true; + this.txtredsblue.Name = "txtredsblue"; + this.txtredsblue.Size = new System.Drawing.Size(23, 17); + this.txtredsblue.TabIndex = 25; + this.txtredsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtredsred + // + this.txtredsred.BackColor = System.Drawing.Color.White; + this.txtredsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtredsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtredsred.Location = new System.Drawing.Point(64, 2); + this.txtredsred.Multiline = true; + this.txtredsred.Name = "txtredsred"; + this.txtredsred.Size = new System.Drawing.Size(23, 17); + this.txtredsred.TabIndex = 21; + this.txtredsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label33 + // + this.Label33.AutoSize = true; + this.Label33.BackColor = System.Drawing.Color.Transparent; + this.Label33.Location = new System.Drawing.Point(1, 23); + this.Label33.Name = "Label33"; + this.Label33.Size = new System.Drawing.Size(39, 13); + this.Label33.TabIndex = 24; + this.Label33.Text = "Green:"; + // + // Label34 + // + this.Label34.AutoSize = true; + this.Label34.BackColor = System.Drawing.Color.Transparent; + this.Label34.Location = new System.Drawing.Point(33, 4); + this.Label34.Name = "Label34"; + this.Label34.Size = new System.Drawing.Size(30, 13); + this.Label34.TabIndex = 22; + this.Label34.Text = "Red:"; + // + // txtredsgreen + // + this.txtredsgreen.BackColor = System.Drawing.Color.White; + this.txtredsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtredsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtredsgreen.Location = new System.Drawing.Point(40, 22); + this.txtredsgreen.Multiline = true; + this.txtredsgreen.Name = "txtredsgreen"; + this.txtredsgreen.Size = new System.Drawing.Size(23, 17); + this.txtredsgreen.TabIndex = 23; + this.txtredsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlredcustomcolour + // + this.pnlredcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlredcustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlredcustomcolour.Name = "pnlredcustomcolour"; + this.pnlredcustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlredcustomcolour.TabIndex = 18; + this.pnlredcustomcolour.Visible = false; + // + // pnlred16 + // + this.pnlred16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred16.Location = new System.Drawing.Point(259, 25); + this.pnlred16.Name = "pnlred16"; + this.pnlred16.Size = new System.Drawing.Size(20, 13); + this.pnlred16.TabIndex = 17; + this.pnlred16.Visible = false; + // + // pnlred12 + // + this.pnlred12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred12.Location = new System.Drawing.Point(155, 25); + this.pnlred12.Name = "pnlred12"; + this.pnlred12.Size = new System.Drawing.Size(20, 13); + this.pnlred12.TabIndex = 9; + this.pnlred12.Visible = false; + // + // pnlred14 + // + this.pnlred14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred14.Location = new System.Drawing.Point(207, 25); + this.pnlred14.Name = "pnlred14"; + this.pnlred14.Size = new System.Drawing.Size(20, 13); + this.pnlred14.TabIndex = 13; + this.pnlred14.Visible = false; + // + // pnlred10 + // + this.pnlred10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred10.Location = new System.Drawing.Point(103, 25); + this.pnlred10.Name = "pnlred10"; + this.pnlred10.Size = new System.Drawing.Size(20, 13); + this.pnlred10.TabIndex = 5; + this.pnlred10.Visible = false; + // + // pnlred8 + // + this.pnlred8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred8.Location = new System.Drawing.Point(259, 8); + this.pnlred8.Name = "pnlred8"; + this.pnlred8.Size = new System.Drawing.Size(20, 13); + this.pnlred8.TabIndex = 16; + this.pnlred8.Visible = false; + // + // pnlred4 + // + this.pnlred4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred4.Location = new System.Drawing.Point(155, 8); + this.pnlred4.Name = "pnlred4"; + this.pnlred4.Size = new System.Drawing.Size(20, 13); + this.pnlred4.TabIndex = 8; + this.pnlred4.Visible = false; + // + // pnlred6 + // + this.pnlred6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred6.Location = new System.Drawing.Point(207, 8); + this.pnlred6.Name = "pnlred6"; + this.pnlred6.Size = new System.Drawing.Size(20, 13); + this.pnlred6.TabIndex = 12; + this.pnlred6.Visible = false; + // + // pnlred15 + // + this.pnlred15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred15.Location = new System.Drawing.Point(233, 25); + this.pnlred15.Name = "pnlred15"; + this.pnlred15.Size = new System.Drawing.Size(20, 13); + this.pnlred15.TabIndex = 15; + this.pnlred15.Visible = false; + // + // pnlred2 + // + this.pnlred2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred2.Location = new System.Drawing.Point(103, 8); + this.pnlred2.Name = "pnlred2"; + this.pnlred2.Size = new System.Drawing.Size(20, 13); + this.pnlred2.TabIndex = 4; + this.pnlred2.Visible = false; + // + // pnlred13 + // + this.pnlred13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred13.Location = new System.Drawing.Point(181, 25); + this.pnlred13.Name = "pnlred13"; + this.pnlred13.Size = new System.Drawing.Size(20, 13); + this.pnlred13.TabIndex = 11; + this.pnlred13.Visible = false; + // + // pnlred11 + // + this.pnlred11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred11.Location = new System.Drawing.Point(129, 25); + this.pnlred11.Name = "pnlred11"; + this.pnlred11.Size = new System.Drawing.Size(20, 13); + this.pnlred11.TabIndex = 7; + this.pnlred11.Visible = false; + // + // pnlred7 + // + this.pnlred7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred7.Location = new System.Drawing.Point(233, 8); + this.pnlred7.Name = "pnlred7"; + this.pnlred7.Size = new System.Drawing.Size(20, 13); + this.pnlred7.TabIndex = 14; + this.pnlred7.Visible = false; + // + // pnlred9 + // + this.pnlred9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred9.Location = new System.Drawing.Point(77, 25); + this.pnlred9.Name = "pnlred9"; + this.pnlred9.Size = new System.Drawing.Size(20, 13); + this.pnlred9.TabIndex = 3; + this.pnlred9.Visible = false; + // + // pnlred5 + // + this.pnlred5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred5.Location = new System.Drawing.Point(181, 8); + this.pnlred5.Name = "pnlred5"; + this.pnlred5.Size = new System.Drawing.Size(20, 13); + this.pnlred5.TabIndex = 10; + this.pnlred5.Visible = false; + // + // pnlred3 + // + this.pnlred3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred3.Location = new System.Drawing.Point(129, 8); + this.pnlred3.Name = "pnlred3"; + this.pnlred3.Size = new System.Drawing.Size(20, 13); + this.pnlred3.TabIndex = 6; + this.pnlred3.Visible = false; + // + // pnlred1 + // + this.pnlred1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred1.Location = new System.Drawing.Point(77, 8); + this.pnlred1.Name = "pnlred1"; + this.pnlred1.Size = new System.Drawing.Size(20, 13); + this.pnlred1.TabIndex = 2; + this.pnlred1.Visible = false; + // + // lblredlevel + // + this.lblredlevel.AutoSize = true; + this.lblredlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblredlevel.Location = new System.Drawing.Point(5, 25); + this.lblredlevel.Name = "lblredlevel"; + this.lblredlevel.Size = new System.Drawing.Size(49, 15); + this.lblredlevel.TabIndex = 1; + this.lblredlevel.Text = "Level: 4"; + // + // Label21 + // + this.Label21.AutoSize = true; + this.Label21.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label21.Location = new System.Drawing.Point(3, 2); + this.Label21.Name = "Label21"; + this.Label21.Size = new System.Drawing.Size(42, 22); + this.Label21.TabIndex = 0; + this.Label21.Text = "Red"; + // + // pnlbrowncolours + // + this.pnlbrowncolours.BackColor = System.Drawing.Color.White; + this.pnlbrowncolours.Controls.Add(this.pnlbrownoptions); + this.pnlbrowncolours.Controls.Add(this.pnlbrowncustomcolour); + this.pnlbrowncolours.Controls.Add(this.pnlbrown16); + this.pnlbrowncolours.Controls.Add(this.pnlbrown12); + this.pnlbrowncolours.Controls.Add(this.pnlbrown14); + this.pnlbrowncolours.Controls.Add(this.pnlbrown10); + this.pnlbrowncolours.Controls.Add(this.pnlbrown8); + this.pnlbrowncolours.Controls.Add(this.pnlbrown4); + this.pnlbrowncolours.Controls.Add(this.pnlbrown6); + this.pnlbrowncolours.Controls.Add(this.pnlbrown15); + this.pnlbrowncolours.Controls.Add(this.pnlbrown2); + this.pnlbrowncolours.Controls.Add(this.pnlbrown13); + this.pnlbrowncolours.Controls.Add(this.pnlbrown11); + this.pnlbrowncolours.Controls.Add(this.pnlbrown7); + this.pnlbrowncolours.Controls.Add(this.pnlbrown9); + this.pnlbrowncolours.Controls.Add(this.pnlbrown5); + this.pnlbrowncolours.Controls.Add(this.pnlbrown3); + this.pnlbrowncolours.Controls.Add(this.pnlbrown1); + this.pnlbrowncolours.Controls.Add(this.lblbrownlevel); + this.pnlbrowncolours.Controls.Add(this.Label19); + this.pnlbrowncolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlbrowncolours.Location = new System.Drawing.Point(0, 429); + this.pnlbrowncolours.Name = "pnlbrowncolours"; + this.pnlbrowncolours.Size = new System.Drawing.Size(447, 46); + this.pnlbrowncolours.TabIndex = 8; + this.pnlbrowncolours.Visible = false; + // + // pnlbrownoptions + // + this.pnlbrownoptions.Controls.Add(this.Label29); + this.pnlbrownoptions.Controls.Add(this.txtbrownsblue); + this.pnlbrownoptions.Controls.Add(this.txtbrownsred); + this.pnlbrownoptions.Controls.Add(this.Label30); + this.pnlbrownoptions.Controls.Add(this.Label31); + this.pnlbrownoptions.Controls.Add(this.txtbrownsgreen); + this.pnlbrownoptions.Location = new System.Drawing.Point(282, 3); + this.pnlbrownoptions.Name = "pnlbrownoptions"; + this.pnlbrownoptions.Size = new System.Drawing.Size(120, 40); + this.pnlbrownoptions.TabIndex = 31; + this.pnlbrownoptions.Visible = false; + // + // Label29 + // + this.Label29.AutoSize = true; + this.Label29.BackColor = System.Drawing.Color.Transparent; + this.Label29.Location = new System.Drawing.Point(64, 24); + this.Label29.Name = "Label29"; + this.Label29.Size = new System.Drawing.Size(31, 13); + this.Label29.TabIndex = 26; + this.Label29.Text = "Blue:"; + // + // txtbrownsblue + // + this.txtbrownsblue.BackColor = System.Drawing.Color.White; + this.txtbrownsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbrownsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbrownsblue.Location = new System.Drawing.Point(95, 22); + this.txtbrownsblue.Multiline = true; + this.txtbrownsblue.Name = "txtbrownsblue"; + this.txtbrownsblue.Size = new System.Drawing.Size(23, 17); + this.txtbrownsblue.TabIndex = 25; + this.txtbrownsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtbrownsred + // + this.txtbrownsred.BackColor = System.Drawing.Color.White; + this.txtbrownsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbrownsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbrownsred.Location = new System.Drawing.Point(64, 2); + this.txtbrownsred.Multiline = true; + this.txtbrownsred.Name = "txtbrownsred"; + this.txtbrownsred.Size = new System.Drawing.Size(23, 17); + this.txtbrownsred.TabIndex = 21; + this.txtbrownsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label30 + // + this.Label30.AutoSize = true; + this.Label30.BackColor = System.Drawing.Color.Transparent; + this.Label30.Location = new System.Drawing.Point(1, 23); + this.Label30.Name = "Label30"; + this.Label30.Size = new System.Drawing.Size(39, 13); + this.Label30.TabIndex = 24; + this.Label30.Text = "Green:"; + // + // Label31 + // + this.Label31.AutoSize = true; + this.Label31.BackColor = System.Drawing.Color.Transparent; + this.Label31.Location = new System.Drawing.Point(33, 4); + this.Label31.Name = "Label31"; + this.Label31.Size = new System.Drawing.Size(30, 13); + this.Label31.TabIndex = 22; + this.Label31.Text = "Red:"; + // + // txtbrownsgreen + // + this.txtbrownsgreen.BackColor = System.Drawing.Color.White; + this.txtbrownsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbrownsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbrownsgreen.Location = new System.Drawing.Point(40, 22); + this.txtbrownsgreen.Multiline = true; + this.txtbrownsgreen.Name = "txtbrownsgreen"; + this.txtbrownsgreen.Size = new System.Drawing.Size(23, 17); + this.txtbrownsgreen.TabIndex = 23; + this.txtbrownsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlbrowncustomcolour + // + this.pnlbrowncustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrowncustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlbrowncustomcolour.Name = "pnlbrowncustomcolour"; + this.pnlbrowncustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlbrowncustomcolour.TabIndex = 18; + this.pnlbrowncustomcolour.Visible = false; + // + // pnlbrown16 + // + this.pnlbrown16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown16.Location = new System.Drawing.Point(259, 25); + this.pnlbrown16.Name = "pnlbrown16"; + this.pnlbrown16.Size = new System.Drawing.Size(20, 13); + this.pnlbrown16.TabIndex = 17; + this.pnlbrown16.Visible = false; + // + // pnlbrown12 + // + this.pnlbrown12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown12.Location = new System.Drawing.Point(155, 25); + this.pnlbrown12.Name = "pnlbrown12"; + this.pnlbrown12.Size = new System.Drawing.Size(20, 13); + this.pnlbrown12.TabIndex = 9; + this.pnlbrown12.Visible = false; + // + // pnlbrown14 + // + this.pnlbrown14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown14.Location = new System.Drawing.Point(207, 25); + this.pnlbrown14.Name = "pnlbrown14"; + this.pnlbrown14.Size = new System.Drawing.Size(20, 13); + this.pnlbrown14.TabIndex = 13; + this.pnlbrown14.Visible = false; + // + // pnlbrown10 + // + this.pnlbrown10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown10.Location = new System.Drawing.Point(103, 25); + this.pnlbrown10.Name = "pnlbrown10"; + this.pnlbrown10.Size = new System.Drawing.Size(20, 13); + this.pnlbrown10.TabIndex = 5; + this.pnlbrown10.Visible = false; + // + // pnlbrown8 + // + this.pnlbrown8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown8.Location = new System.Drawing.Point(259, 8); + this.pnlbrown8.Name = "pnlbrown8"; + this.pnlbrown8.Size = new System.Drawing.Size(20, 13); + this.pnlbrown8.TabIndex = 16; + this.pnlbrown8.Visible = false; + // + // pnlbrown4 + // + this.pnlbrown4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown4.Location = new System.Drawing.Point(155, 8); + this.pnlbrown4.Name = "pnlbrown4"; + this.pnlbrown4.Size = new System.Drawing.Size(20, 13); + this.pnlbrown4.TabIndex = 8; + this.pnlbrown4.Visible = false; + // + // pnlbrown6 + // + this.pnlbrown6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown6.Location = new System.Drawing.Point(207, 8); + this.pnlbrown6.Name = "pnlbrown6"; + this.pnlbrown6.Size = new System.Drawing.Size(20, 13); + this.pnlbrown6.TabIndex = 12; + this.pnlbrown6.Visible = false; + // + // pnlbrown15 + // + this.pnlbrown15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown15.Location = new System.Drawing.Point(233, 25); + this.pnlbrown15.Name = "pnlbrown15"; + this.pnlbrown15.Size = new System.Drawing.Size(20, 13); + this.pnlbrown15.TabIndex = 15; + this.pnlbrown15.Visible = false; + // + // pnlbrown2 + // + this.pnlbrown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown2.Location = new System.Drawing.Point(103, 8); + this.pnlbrown2.Name = "pnlbrown2"; + this.pnlbrown2.Size = new System.Drawing.Size(20, 13); + this.pnlbrown2.TabIndex = 4; + this.pnlbrown2.Visible = false; + // + // pnlbrown13 + // + this.pnlbrown13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown13.Location = new System.Drawing.Point(181, 25); + this.pnlbrown13.Name = "pnlbrown13"; + this.pnlbrown13.Size = new System.Drawing.Size(20, 13); + this.pnlbrown13.TabIndex = 11; + this.pnlbrown13.Visible = false; + // + // pnlbrown11 + // + this.pnlbrown11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown11.Location = new System.Drawing.Point(129, 25); + this.pnlbrown11.Name = "pnlbrown11"; + this.pnlbrown11.Size = new System.Drawing.Size(20, 13); + this.pnlbrown11.TabIndex = 7; + this.pnlbrown11.Visible = false; + // + // pnlbrown7 + // + this.pnlbrown7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown7.Location = new System.Drawing.Point(233, 8); + this.pnlbrown7.Name = "pnlbrown7"; + this.pnlbrown7.Size = new System.Drawing.Size(20, 13); + this.pnlbrown7.TabIndex = 14; + this.pnlbrown7.Visible = false; + // + // pnlbrown9 + // + this.pnlbrown9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown9.Location = new System.Drawing.Point(77, 25); + this.pnlbrown9.Name = "pnlbrown9"; + this.pnlbrown9.Size = new System.Drawing.Size(20, 13); + this.pnlbrown9.TabIndex = 3; + this.pnlbrown9.Visible = false; + // + // pnlbrown5 + // + this.pnlbrown5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown5.Location = new System.Drawing.Point(181, 8); + this.pnlbrown5.Name = "pnlbrown5"; + this.pnlbrown5.Size = new System.Drawing.Size(20, 13); + this.pnlbrown5.TabIndex = 10; + this.pnlbrown5.Visible = false; + // + // pnlbrown3 + // + this.pnlbrown3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown3.Location = new System.Drawing.Point(129, 8); + this.pnlbrown3.Name = "pnlbrown3"; + this.pnlbrown3.Size = new System.Drawing.Size(20, 13); + this.pnlbrown3.TabIndex = 6; + this.pnlbrown3.Visible = false; + // + // pnlbrown1 + // + this.pnlbrown1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown1.Location = new System.Drawing.Point(77, 8); + this.pnlbrown1.Name = "pnlbrown1"; + this.pnlbrown1.Size = new System.Drawing.Size(20, 13); + this.pnlbrown1.TabIndex = 2; + this.pnlbrown1.Visible = false; + // + // lblbrownlevel + // + this.lblbrownlevel.AutoSize = true; + this.lblbrownlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblbrownlevel.Location = new System.Drawing.Point(5, 25); + this.lblbrownlevel.Name = "lblbrownlevel"; + this.lblbrownlevel.Size = new System.Drawing.Size(49, 15); + this.lblbrownlevel.TabIndex = 1; + this.lblbrownlevel.Text = "Level: 4"; + // + // Label19 + // + this.Label19.AutoSize = true; + this.Label19.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label19.Location = new System.Drawing.Point(3, 2); + this.Label19.Name = "Label19"; + this.Label19.Size = new System.Drawing.Size(67, 22); + this.Label19.TabIndex = 0; + this.Label19.Text = "Brown"; + // + // pnlorangecolours + // + this.pnlorangecolours.BackColor = System.Drawing.Color.White; + this.pnlorangecolours.Controls.Add(this.pnlorangeoptions); + this.pnlorangecolours.Controls.Add(this.pnlorangecustomcolour); + this.pnlorangecolours.Controls.Add(this.pnlorange16); + this.pnlorangecolours.Controls.Add(this.pnlorange12); + this.pnlorangecolours.Controls.Add(this.pnlorange14); + this.pnlorangecolours.Controls.Add(this.pnlorange10); + this.pnlorangecolours.Controls.Add(this.pnlorange8); + this.pnlorangecolours.Controls.Add(this.pnlorange4); + this.pnlorangecolours.Controls.Add(this.pnlorange6); + this.pnlorangecolours.Controls.Add(this.pnlorange15); + this.pnlorangecolours.Controls.Add(this.pnlorange2); + this.pnlorangecolours.Controls.Add(this.pnlorange13); + this.pnlorangecolours.Controls.Add(this.pnlorange11); + this.pnlorangecolours.Controls.Add(this.pnlorange7); + this.pnlorangecolours.Controls.Add(this.pnlorange9); + this.pnlorangecolours.Controls.Add(this.pnlorange5); + this.pnlorangecolours.Controls.Add(this.pnlorange3); + this.pnlorangecolours.Controls.Add(this.pnlorange1); + this.pnlorangecolours.Controls.Add(this.lblorangelevel); + this.pnlorangecolours.Controls.Add(this.Label13); + this.pnlorangecolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlorangecolours.Location = new System.Drawing.Point(0, 383); + this.pnlorangecolours.Name = "pnlorangecolours"; + this.pnlorangecolours.Size = new System.Drawing.Size(447, 46); + this.pnlorangecolours.TabIndex = 7; + this.pnlorangecolours.Visible = false; + // + // pnlorangeoptions + // + this.pnlorangeoptions.Controls.Add(this.Label25); + this.pnlorangeoptions.Controls.Add(this.txtorangesblue); + this.pnlorangeoptions.Controls.Add(this.txtorangesred); + this.pnlorangeoptions.Controls.Add(this.Label27); + this.pnlorangeoptions.Controls.Add(this.Label28); + this.pnlorangeoptions.Controls.Add(this.txtorangesgreen); + this.pnlorangeoptions.Location = new System.Drawing.Point(282, 3); + this.pnlorangeoptions.Name = "pnlorangeoptions"; + this.pnlorangeoptions.Size = new System.Drawing.Size(120, 40); + this.pnlorangeoptions.TabIndex = 30; + this.pnlorangeoptions.Visible = false; + // + // Label25 + // + this.Label25.AutoSize = true; + this.Label25.BackColor = System.Drawing.Color.Transparent; + this.Label25.Location = new System.Drawing.Point(64, 24); + this.Label25.Name = "Label25"; + this.Label25.Size = new System.Drawing.Size(31, 13); + this.Label25.TabIndex = 26; + this.Label25.Text = "Blue:"; + // + // txtorangesblue + // + this.txtorangesblue.BackColor = System.Drawing.Color.White; + this.txtorangesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtorangesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtorangesblue.Location = new System.Drawing.Point(95, 22); + this.txtorangesblue.Multiline = true; + this.txtorangesblue.Name = "txtorangesblue"; + this.txtorangesblue.Size = new System.Drawing.Size(23, 17); + this.txtorangesblue.TabIndex = 25; + this.txtorangesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtorangesred + // + this.txtorangesred.BackColor = System.Drawing.Color.White; + this.txtorangesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtorangesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtorangesred.Location = new System.Drawing.Point(64, 2); + this.txtorangesred.Multiline = true; + this.txtorangesred.Name = "txtorangesred"; + this.txtorangesred.Size = new System.Drawing.Size(23, 17); + this.txtorangesred.TabIndex = 21; + this.txtorangesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label27 + // + this.Label27.AutoSize = true; + this.Label27.BackColor = System.Drawing.Color.Transparent; + this.Label27.Location = new System.Drawing.Point(1, 23); + this.Label27.Name = "Label27"; + this.Label27.Size = new System.Drawing.Size(39, 13); + this.Label27.TabIndex = 24; + this.Label27.Text = "Green:"; + // + // Label28 + // + this.Label28.AutoSize = true; + this.Label28.BackColor = System.Drawing.Color.Transparent; + this.Label28.Location = new System.Drawing.Point(33, 4); + this.Label28.Name = "Label28"; + this.Label28.Size = new System.Drawing.Size(30, 13); + this.Label28.TabIndex = 22; + this.Label28.Text = "Red:"; + // + // txtorangesgreen + // + this.txtorangesgreen.BackColor = System.Drawing.Color.White; + this.txtorangesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtorangesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtorangesgreen.Location = new System.Drawing.Point(40, 22); + this.txtorangesgreen.Multiline = true; + this.txtorangesgreen.Name = "txtorangesgreen"; + this.txtorangesgreen.Size = new System.Drawing.Size(23, 17); + this.txtorangesgreen.TabIndex = 23; + this.txtorangesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlorangecustomcolour + // + this.pnlorangecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorangecustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlorangecustomcolour.Name = "pnlorangecustomcolour"; + this.pnlorangecustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlorangecustomcolour.TabIndex = 18; + this.pnlorangecustomcolour.Visible = false; + // + // pnlorange16 + // + this.pnlorange16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange16.Location = new System.Drawing.Point(259, 25); + this.pnlorange16.Name = "pnlorange16"; + this.pnlorange16.Size = new System.Drawing.Size(20, 13); + this.pnlorange16.TabIndex = 17; + this.pnlorange16.Visible = false; + // + // pnlorange12 + // + this.pnlorange12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange12.Location = new System.Drawing.Point(155, 25); + this.pnlorange12.Name = "pnlorange12"; + this.pnlorange12.Size = new System.Drawing.Size(20, 13); + this.pnlorange12.TabIndex = 9; + this.pnlorange12.Visible = false; + // + // pnlorange14 + // + this.pnlorange14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange14.Location = new System.Drawing.Point(207, 25); + this.pnlorange14.Name = "pnlorange14"; + this.pnlorange14.Size = new System.Drawing.Size(20, 13); + this.pnlorange14.TabIndex = 13; + this.pnlorange14.Visible = false; + // + // pnlorange10 + // + this.pnlorange10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange10.Location = new System.Drawing.Point(103, 25); + this.pnlorange10.Name = "pnlorange10"; + this.pnlorange10.Size = new System.Drawing.Size(20, 13); + this.pnlorange10.TabIndex = 5; + this.pnlorange10.Visible = false; + // + // pnlorange8 + // + this.pnlorange8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange8.Location = new System.Drawing.Point(259, 8); + this.pnlorange8.Name = "pnlorange8"; + this.pnlorange8.Size = new System.Drawing.Size(20, 13); + this.pnlorange8.TabIndex = 16; + this.pnlorange8.Visible = false; + // + // pnlorange4 + // + this.pnlorange4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange4.Location = new System.Drawing.Point(155, 8); + this.pnlorange4.Name = "pnlorange4"; + this.pnlorange4.Size = new System.Drawing.Size(20, 13); + this.pnlorange4.TabIndex = 8; + this.pnlorange4.Visible = false; + // + // pnlorange6 + // + this.pnlorange6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange6.Location = new System.Drawing.Point(207, 8); + this.pnlorange6.Name = "pnlorange6"; + this.pnlorange6.Size = new System.Drawing.Size(20, 13); + this.pnlorange6.TabIndex = 12; + this.pnlorange6.Visible = false; + // + // pnlorange15 + // + this.pnlorange15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange15.Location = new System.Drawing.Point(233, 25); + this.pnlorange15.Name = "pnlorange15"; + this.pnlorange15.Size = new System.Drawing.Size(20, 13); + this.pnlorange15.TabIndex = 15; + this.pnlorange15.Visible = false; + // + // pnlorange2 + // + this.pnlorange2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange2.Location = new System.Drawing.Point(103, 8); + this.pnlorange2.Name = "pnlorange2"; + this.pnlorange2.Size = new System.Drawing.Size(20, 13); + this.pnlorange2.TabIndex = 4; + this.pnlorange2.Visible = false; + // + // pnlorange13 + // + this.pnlorange13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange13.Location = new System.Drawing.Point(181, 25); + this.pnlorange13.Name = "pnlorange13"; + this.pnlorange13.Size = new System.Drawing.Size(20, 13); + this.pnlorange13.TabIndex = 11; + this.pnlorange13.Visible = false; + // + // pnlorange11 + // + this.pnlorange11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange11.Location = new System.Drawing.Point(129, 25); + this.pnlorange11.Name = "pnlorange11"; + this.pnlorange11.Size = new System.Drawing.Size(20, 13); + this.pnlorange11.TabIndex = 7; + this.pnlorange11.Visible = false; + // + // pnlorange7 + // + this.pnlorange7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange7.Location = new System.Drawing.Point(233, 8); + this.pnlorange7.Name = "pnlorange7"; + this.pnlorange7.Size = new System.Drawing.Size(20, 13); + this.pnlorange7.TabIndex = 14; + this.pnlorange7.Visible = false; + // + // pnlorange9 + // + this.pnlorange9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange9.Location = new System.Drawing.Point(77, 25); + this.pnlorange9.Name = "pnlorange9"; + this.pnlorange9.Size = new System.Drawing.Size(20, 13); + this.pnlorange9.TabIndex = 3; + this.pnlorange9.Visible = false; + // + // pnlorange5 + // + this.pnlorange5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange5.Location = new System.Drawing.Point(181, 8); + this.pnlorange5.Name = "pnlorange5"; + this.pnlorange5.Size = new System.Drawing.Size(20, 13); + this.pnlorange5.TabIndex = 10; + this.pnlorange5.Visible = false; + // + // pnlorange3 + // + this.pnlorange3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange3.Location = new System.Drawing.Point(129, 8); + this.pnlorange3.Name = "pnlorange3"; + this.pnlorange3.Size = new System.Drawing.Size(20, 13); + this.pnlorange3.TabIndex = 6; + this.pnlorange3.Visible = false; + // + // pnlorange1 + // + this.pnlorange1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange1.Location = new System.Drawing.Point(77, 8); + this.pnlorange1.Name = "pnlorange1"; + this.pnlorange1.Size = new System.Drawing.Size(20, 13); + this.pnlorange1.TabIndex = 2; + this.pnlorange1.Visible = false; + // + // lblorangelevel + // + this.lblorangelevel.AutoSize = true; + this.lblorangelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblorangelevel.Location = new System.Drawing.Point(5, 25); + this.lblorangelevel.Name = "lblorangelevel"; + this.lblorangelevel.Size = new System.Drawing.Size(49, 15); + this.lblorangelevel.TabIndex = 1; + this.lblorangelevel.Text = "Level: 4"; + // + // Label13 + // + this.Label13.AutoSize = true; + this.Label13.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label13.Location = new System.Drawing.Point(3, 2); + this.Label13.Name = "Label13"; + this.Label13.Size = new System.Drawing.Size(74, 22); + this.Label13.TabIndex = 0; + this.Label13.Text = "Orange"; + // + // pnlyellowcolours + // + this.pnlyellowcolours.BackColor = System.Drawing.Color.White; + this.pnlyellowcolours.Controls.Add(this.pnlyellowoptions); + this.pnlyellowcolours.Controls.Add(this.pnlyellowcustomcolour); + this.pnlyellowcolours.Controls.Add(this.pnlyellow16); + this.pnlyellowcolours.Controls.Add(this.pnlyellow12); + this.pnlyellowcolours.Controls.Add(this.pnlyellow14); + this.pnlyellowcolours.Controls.Add(this.pnlyellow10); + this.pnlyellowcolours.Controls.Add(this.pnlyellow8); + this.pnlyellowcolours.Controls.Add(this.pnlyellow4); + this.pnlyellowcolours.Controls.Add(this.pnlyellow6); + this.pnlyellowcolours.Controls.Add(this.pnlyellow15); + this.pnlyellowcolours.Controls.Add(this.pnlyellow2); + this.pnlyellowcolours.Controls.Add(this.pnlyellow13); + this.pnlyellowcolours.Controls.Add(this.pnlyellow11); + this.pnlyellowcolours.Controls.Add(this.pnlyellow7); + this.pnlyellowcolours.Controls.Add(this.pnlyellow9); + this.pnlyellowcolours.Controls.Add(this.pnlyellow5); + this.pnlyellowcolours.Controls.Add(this.pnlyellow3); + this.pnlyellowcolours.Controls.Add(this.pnlyellow1); + this.pnlyellowcolours.Controls.Add(this.lblyellowlevel); + this.pnlyellowcolours.Controls.Add(this.Label11); + this.pnlyellowcolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlyellowcolours.Location = new System.Drawing.Point(0, 337); + this.pnlyellowcolours.Name = "pnlyellowcolours"; + this.pnlyellowcolours.Size = new System.Drawing.Size(447, 46); + this.pnlyellowcolours.TabIndex = 6; + this.pnlyellowcolours.Visible = false; + // + // pnlyellowoptions + // + this.pnlyellowoptions.Controls.Add(this.Label20); + this.pnlyellowoptions.Controls.Add(this.txtyellowsblue); + this.pnlyellowoptions.Controls.Add(this.txtyellowsred); + this.pnlyellowoptions.Controls.Add(this.Label22); + this.pnlyellowoptions.Controls.Add(this.Label24); + this.pnlyellowoptions.Controls.Add(this.txtyellowsgreen); + this.pnlyellowoptions.Location = new System.Drawing.Point(282, 3); + this.pnlyellowoptions.Name = "pnlyellowoptions"; + this.pnlyellowoptions.Size = new System.Drawing.Size(120, 40); + this.pnlyellowoptions.TabIndex = 29; + this.pnlyellowoptions.Visible = false; + // + // Label20 + // + this.Label20.AutoSize = true; + this.Label20.BackColor = System.Drawing.Color.Transparent; + this.Label20.Location = new System.Drawing.Point(64, 24); + this.Label20.Name = "Label20"; + this.Label20.Size = new System.Drawing.Size(31, 13); + this.Label20.TabIndex = 26; + this.Label20.Text = "Blue:"; + // + // txtyellowsblue + // + this.txtyellowsblue.BackColor = System.Drawing.Color.White; + this.txtyellowsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtyellowsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtyellowsblue.Location = new System.Drawing.Point(95, 22); + this.txtyellowsblue.Multiline = true; + this.txtyellowsblue.Name = "txtyellowsblue"; + this.txtyellowsblue.Size = new System.Drawing.Size(23, 17); + this.txtyellowsblue.TabIndex = 25; + this.txtyellowsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtyellowsred + // + this.txtyellowsred.BackColor = System.Drawing.Color.White; + this.txtyellowsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtyellowsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtyellowsred.Location = new System.Drawing.Point(64, 2); + this.txtyellowsred.Multiline = true; + this.txtyellowsred.Name = "txtyellowsred"; + this.txtyellowsred.Size = new System.Drawing.Size(23, 17); + this.txtyellowsred.TabIndex = 21; + this.txtyellowsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label22 + // + this.Label22.AutoSize = true; + this.Label22.BackColor = System.Drawing.Color.Transparent; + this.Label22.Location = new System.Drawing.Point(1, 23); + this.Label22.Name = "Label22"; + this.Label22.Size = new System.Drawing.Size(39, 13); + this.Label22.TabIndex = 24; + this.Label22.Text = "Green:"; + // + // Label24 + // + this.Label24.AutoSize = true; + this.Label24.BackColor = System.Drawing.Color.Transparent; + this.Label24.Location = new System.Drawing.Point(33, 4); + this.Label24.Name = "Label24"; + this.Label24.Size = new System.Drawing.Size(30, 13); + this.Label24.TabIndex = 22; + this.Label24.Text = "Red:"; + // + // txtyellowsgreen + // + this.txtyellowsgreen.BackColor = System.Drawing.Color.White; + this.txtyellowsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtyellowsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtyellowsgreen.Location = new System.Drawing.Point(40, 22); + this.txtyellowsgreen.Multiline = true; + this.txtyellowsgreen.Name = "txtyellowsgreen"; + this.txtyellowsgreen.Size = new System.Drawing.Size(23, 17); + this.txtyellowsgreen.TabIndex = 23; + this.txtyellowsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlyellowcustomcolour + // + this.pnlyellowcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellowcustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlyellowcustomcolour.Name = "pnlyellowcustomcolour"; + this.pnlyellowcustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlyellowcustomcolour.TabIndex = 18; + this.pnlyellowcustomcolour.Visible = false; + // + // pnlyellow16 + // + this.pnlyellow16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow16.Location = new System.Drawing.Point(259, 25); + this.pnlyellow16.Name = "pnlyellow16"; + this.pnlyellow16.Size = new System.Drawing.Size(20, 13); + this.pnlyellow16.TabIndex = 17; + this.pnlyellow16.Visible = false; + // + // pnlyellow12 + // + this.pnlyellow12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow12.Location = new System.Drawing.Point(155, 25); + this.pnlyellow12.Name = "pnlyellow12"; + this.pnlyellow12.Size = new System.Drawing.Size(20, 13); + this.pnlyellow12.TabIndex = 9; + this.pnlyellow12.Visible = false; + // + // pnlyellow14 + // + this.pnlyellow14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow14.Location = new System.Drawing.Point(207, 25); + this.pnlyellow14.Name = "pnlyellow14"; + this.pnlyellow14.Size = new System.Drawing.Size(20, 13); + this.pnlyellow14.TabIndex = 13; + this.pnlyellow14.Visible = false; + // + // pnlyellow10 + // + this.pnlyellow10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow10.Location = new System.Drawing.Point(103, 25); + this.pnlyellow10.Name = "pnlyellow10"; + this.pnlyellow10.Size = new System.Drawing.Size(20, 13); + this.pnlyellow10.TabIndex = 5; + this.pnlyellow10.Visible = false; + // + // pnlyellow8 + // + this.pnlyellow8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow8.Location = new System.Drawing.Point(259, 8); + this.pnlyellow8.Name = "pnlyellow8"; + this.pnlyellow8.Size = new System.Drawing.Size(20, 13); + this.pnlyellow8.TabIndex = 16; + this.pnlyellow8.Visible = false; + // + // pnlyellow4 + // + this.pnlyellow4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow4.Location = new System.Drawing.Point(155, 8); + this.pnlyellow4.Name = "pnlyellow4"; + this.pnlyellow4.Size = new System.Drawing.Size(20, 13); + this.pnlyellow4.TabIndex = 8; + this.pnlyellow4.Visible = false; + // + // pnlyellow6 + // + this.pnlyellow6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow6.Location = new System.Drawing.Point(207, 8); + this.pnlyellow6.Name = "pnlyellow6"; + this.pnlyellow6.Size = new System.Drawing.Size(20, 13); + this.pnlyellow6.TabIndex = 12; + this.pnlyellow6.Visible = false; + // + // pnlyellow15 + // + this.pnlyellow15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow15.Location = new System.Drawing.Point(233, 25); + this.pnlyellow15.Name = "pnlyellow15"; + this.pnlyellow15.Size = new System.Drawing.Size(20, 13); + this.pnlyellow15.TabIndex = 15; + this.pnlyellow15.Visible = false; + // + // pnlyellow2 + // + this.pnlyellow2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow2.Location = new System.Drawing.Point(103, 8); + this.pnlyellow2.Name = "pnlyellow2"; + this.pnlyellow2.Size = new System.Drawing.Size(20, 13); + this.pnlyellow2.TabIndex = 4; + this.pnlyellow2.Visible = false; + // + // pnlyellow13 + // + this.pnlyellow13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow13.Location = new System.Drawing.Point(181, 25); + this.pnlyellow13.Name = "pnlyellow13"; + this.pnlyellow13.Size = new System.Drawing.Size(20, 13); + this.pnlyellow13.TabIndex = 11; + this.pnlyellow13.Visible = false; + // + // pnlyellow11 + // + this.pnlyellow11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow11.Location = new System.Drawing.Point(129, 25); + this.pnlyellow11.Name = "pnlyellow11"; + this.pnlyellow11.Size = new System.Drawing.Size(20, 13); + this.pnlyellow11.TabIndex = 7; + this.pnlyellow11.Visible = false; + // + // pnlyellow7 + // + this.pnlyellow7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow7.Location = new System.Drawing.Point(233, 8); + this.pnlyellow7.Name = "pnlyellow7"; + this.pnlyellow7.Size = new System.Drawing.Size(20, 13); + this.pnlyellow7.TabIndex = 14; + this.pnlyellow7.Visible = false; + // + // pnlyellow9 + // + this.pnlyellow9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow9.Location = new System.Drawing.Point(77, 25); + this.pnlyellow9.Name = "pnlyellow9"; + this.pnlyellow9.Size = new System.Drawing.Size(20, 13); + this.pnlyellow9.TabIndex = 3; + this.pnlyellow9.Visible = false; + // + // pnlyellow5 + // + this.pnlyellow5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow5.Location = new System.Drawing.Point(181, 8); + this.pnlyellow5.Name = "pnlyellow5"; + this.pnlyellow5.Size = new System.Drawing.Size(20, 13); + this.pnlyellow5.TabIndex = 10; + this.pnlyellow5.Visible = false; + // + // pnlyellow3 + // + this.pnlyellow3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow3.Location = new System.Drawing.Point(129, 8); + this.pnlyellow3.Name = "pnlyellow3"; + this.pnlyellow3.Size = new System.Drawing.Size(20, 13); + this.pnlyellow3.TabIndex = 6; + this.pnlyellow3.Visible = false; + // + // pnlyellow1 + // + this.pnlyellow1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow1.Location = new System.Drawing.Point(77, 8); + this.pnlyellow1.Name = "pnlyellow1"; + this.pnlyellow1.Size = new System.Drawing.Size(20, 13); + this.pnlyellow1.TabIndex = 2; + this.pnlyellow1.Visible = false; + // + // lblyellowlevel + // + this.lblyellowlevel.AutoSize = true; + this.lblyellowlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblyellowlevel.Location = new System.Drawing.Point(5, 25); + this.lblyellowlevel.Name = "lblyellowlevel"; + this.lblyellowlevel.Size = new System.Drawing.Size(49, 15); + this.lblyellowlevel.TabIndex = 1; + this.lblyellowlevel.Text = "Level: 4"; + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label11.Location = new System.Drawing.Point(3, 2); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(65, 22); + this.Label11.TabIndex = 0; + this.Label11.Text = "Yellow"; + // + // pnlgreencolours + // + this.pnlgreencolours.BackColor = System.Drawing.Color.White; + this.pnlgreencolours.Controls.Add(this.pnlgreenoptions); + this.pnlgreencolours.Controls.Add(this.pnlgreencustomcolour); + this.pnlgreencolours.Controls.Add(this.pnlgreen16); + this.pnlgreencolours.Controls.Add(this.pnlgreen12); + this.pnlgreencolours.Controls.Add(this.pnlgreen14); + this.pnlgreencolours.Controls.Add(this.pnlgreen10); + this.pnlgreencolours.Controls.Add(this.pnlgreen8); + this.pnlgreencolours.Controls.Add(this.pnlgreen4); + this.pnlgreencolours.Controls.Add(this.pnlgreen6); + this.pnlgreencolours.Controls.Add(this.pnlgreen15); + this.pnlgreencolours.Controls.Add(this.pnlgreen2); + this.pnlgreencolours.Controls.Add(this.pnlgreen13); + this.pnlgreencolours.Controls.Add(this.pnlgreen11); + this.pnlgreencolours.Controls.Add(this.pnlgreen7); + this.pnlgreencolours.Controls.Add(this.pnlgreen9); + this.pnlgreencolours.Controls.Add(this.pnlgreen5); + this.pnlgreencolours.Controls.Add(this.pnlgreen3); + this.pnlgreencolours.Controls.Add(this.pnlgreen1); + this.pnlgreencolours.Controls.Add(this.lblgreenlevel); + this.pnlgreencolours.Controls.Add(this.Label9); + this.pnlgreencolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlgreencolours.Location = new System.Drawing.Point(0, 291); + this.pnlgreencolours.Name = "pnlgreencolours"; + this.pnlgreencolours.Size = new System.Drawing.Size(447, 46); + this.pnlgreencolours.TabIndex = 5; + this.pnlgreencolours.Visible = false; + // + // pnlgreenoptions + // + this.pnlgreenoptions.Controls.Add(this.Label15); + this.pnlgreenoptions.Controls.Add(this.txtgreensred); + this.pnlgreenoptions.Controls.Add(this.txtgreensgreen); + this.pnlgreenoptions.Controls.Add(this.Label16); + this.pnlgreenoptions.Controls.Add(this.Label18); + this.pnlgreenoptions.Controls.Add(this.txtgreensblue); + this.pnlgreenoptions.Location = new System.Drawing.Point(282, 3); + this.pnlgreenoptions.Name = "pnlgreenoptions"; + this.pnlgreenoptions.Size = new System.Drawing.Size(120, 40); + this.pnlgreenoptions.TabIndex = 29; + this.pnlgreenoptions.Visible = false; + // + // Label15 + // + this.Label15.AutoSize = true; + this.Label15.BackColor = System.Drawing.Color.Transparent; + this.Label15.Location = new System.Drawing.Point(62, 24); + this.Label15.Name = "Label15"; + this.Label15.Size = new System.Drawing.Size(30, 13); + this.Label15.TabIndex = 26; + this.Label15.Text = "Red:"; + // + // txtgreensred + // + this.txtgreensred.BackColor = System.Drawing.Color.White; + this.txtgreensred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgreensred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtgreensred.Location = new System.Drawing.Point(92, 22); + this.txtgreensred.Multiline = true; + this.txtgreensred.Name = "txtgreensred"; + this.txtgreensred.Size = new System.Drawing.Size(23, 17); + this.txtgreensred.TabIndex = 25; + this.txtgreensred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtgreensgreen + // + this.txtgreensgreen.BackColor = System.Drawing.Color.White; + this.txtgreensgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgreensgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtgreensgreen.Location = new System.Drawing.Point(66, 2); + this.txtgreensgreen.Multiline = true; + this.txtgreensgreen.Name = "txtgreensgreen"; + this.txtgreensgreen.Size = new System.Drawing.Size(23, 17); + this.txtgreensgreen.TabIndex = 21; + this.txtgreensgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label16 + // + this.Label16.AutoSize = true; + this.Label16.BackColor = System.Drawing.Color.Transparent; + this.Label16.Location = new System.Drawing.Point(2, 23); + this.Label16.Name = "Label16"; + this.Label16.Size = new System.Drawing.Size(31, 13); + this.Label16.TabIndex = 24; + this.Label16.Text = "Blue:"; + // + // Label18 + // + this.Label18.AutoSize = true; + this.Label18.BackColor = System.Drawing.Color.Transparent; + this.Label18.Location = new System.Drawing.Point(28, 4); + this.Label18.Name = "Label18"; + this.Label18.Size = new System.Drawing.Size(39, 13); + this.Label18.TabIndex = 22; + this.Label18.Text = "Green:"; + // + // txtgreensblue + // + this.txtgreensblue.BackColor = System.Drawing.Color.White; + this.txtgreensblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgreensblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtgreensblue.Location = new System.Drawing.Point(33, 22); + this.txtgreensblue.Multiline = true; + this.txtgreensblue.Name = "txtgreensblue"; + this.txtgreensblue.Size = new System.Drawing.Size(23, 17); + this.txtgreensblue.TabIndex = 23; + this.txtgreensblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlgreencustomcolour + // + this.pnlgreencustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreencustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlgreencustomcolour.Name = "pnlgreencustomcolour"; + this.pnlgreencustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlgreencustomcolour.TabIndex = 18; + this.pnlgreencustomcolour.Visible = false; + // + // pnlgreen16 + // + this.pnlgreen16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen16.Location = new System.Drawing.Point(259, 25); + this.pnlgreen16.Name = "pnlgreen16"; + this.pnlgreen16.Size = new System.Drawing.Size(20, 13); + this.pnlgreen16.TabIndex = 17; + this.pnlgreen16.Visible = false; + // + // pnlgreen12 + // + this.pnlgreen12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen12.Location = new System.Drawing.Point(155, 25); + this.pnlgreen12.Name = "pnlgreen12"; + this.pnlgreen12.Size = new System.Drawing.Size(20, 13); + this.pnlgreen12.TabIndex = 9; + this.pnlgreen12.Visible = false; + // + // pnlgreen14 + // + this.pnlgreen14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen14.Location = new System.Drawing.Point(207, 25); + this.pnlgreen14.Name = "pnlgreen14"; + this.pnlgreen14.Size = new System.Drawing.Size(20, 13); + this.pnlgreen14.TabIndex = 13; + this.pnlgreen14.Visible = false; + // + // pnlgreen10 + // + this.pnlgreen10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen10.Location = new System.Drawing.Point(103, 25); + this.pnlgreen10.Name = "pnlgreen10"; + this.pnlgreen10.Size = new System.Drawing.Size(20, 13); + this.pnlgreen10.TabIndex = 5; + this.pnlgreen10.Visible = false; + // + // pnlgreen8 + // + this.pnlgreen8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen8.Location = new System.Drawing.Point(259, 8); + this.pnlgreen8.Name = "pnlgreen8"; + this.pnlgreen8.Size = new System.Drawing.Size(20, 13); + this.pnlgreen8.TabIndex = 16; + this.pnlgreen8.Visible = false; + // + // pnlgreen4 + // + this.pnlgreen4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen4.Location = new System.Drawing.Point(155, 8); + this.pnlgreen4.Name = "pnlgreen4"; + this.pnlgreen4.Size = new System.Drawing.Size(20, 13); + this.pnlgreen4.TabIndex = 8; + this.pnlgreen4.Visible = false; + // + // pnlgreen6 + // + this.pnlgreen6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen6.Location = new System.Drawing.Point(207, 8); + this.pnlgreen6.Name = "pnlgreen6"; + this.pnlgreen6.Size = new System.Drawing.Size(20, 13); + this.pnlgreen6.TabIndex = 12; + this.pnlgreen6.Visible = false; + // + // pnlgreen15 + // + this.pnlgreen15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen15.Location = new System.Drawing.Point(233, 25); + this.pnlgreen15.Name = "pnlgreen15"; + this.pnlgreen15.Size = new System.Drawing.Size(20, 13); + this.pnlgreen15.TabIndex = 15; + this.pnlgreen15.Visible = false; + // + // pnlgreen2 + // + this.pnlgreen2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen2.Location = new System.Drawing.Point(103, 8); + this.pnlgreen2.Name = "pnlgreen2"; + this.pnlgreen2.Size = new System.Drawing.Size(20, 13); + this.pnlgreen2.TabIndex = 4; + this.pnlgreen2.Visible = false; + // + // pnlgreen13 + // + this.pnlgreen13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen13.Location = new System.Drawing.Point(181, 25); + this.pnlgreen13.Name = "pnlgreen13"; + this.pnlgreen13.Size = new System.Drawing.Size(20, 13); + this.pnlgreen13.TabIndex = 11; + this.pnlgreen13.Visible = false; + // + // pnlgreen11 + // + this.pnlgreen11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen11.Location = new System.Drawing.Point(129, 25); + this.pnlgreen11.Name = "pnlgreen11"; + this.pnlgreen11.Size = new System.Drawing.Size(20, 13); + this.pnlgreen11.TabIndex = 7; + this.pnlgreen11.Visible = false; + // + // pnlgreen7 + // + this.pnlgreen7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen7.Location = new System.Drawing.Point(233, 8); + this.pnlgreen7.Name = "pnlgreen7"; + this.pnlgreen7.Size = new System.Drawing.Size(20, 13); + this.pnlgreen7.TabIndex = 14; + this.pnlgreen7.Visible = false; + // + // pnlgreen9 + // + this.pnlgreen9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen9.Location = new System.Drawing.Point(77, 25); + this.pnlgreen9.Name = "pnlgreen9"; + this.pnlgreen9.Size = new System.Drawing.Size(20, 13); + this.pnlgreen9.TabIndex = 3; + this.pnlgreen9.Visible = false; + // + // pnlgreen5 + // + this.pnlgreen5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen5.Location = new System.Drawing.Point(181, 8); + this.pnlgreen5.Name = "pnlgreen5"; + this.pnlgreen5.Size = new System.Drawing.Size(20, 13); + this.pnlgreen5.TabIndex = 10; + this.pnlgreen5.Visible = false; + // + // pnlgreen3 + // + this.pnlgreen3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen3.Location = new System.Drawing.Point(129, 8); + this.pnlgreen3.Name = "pnlgreen3"; + this.pnlgreen3.Size = new System.Drawing.Size(20, 13); + this.pnlgreen3.TabIndex = 6; + this.pnlgreen3.Visible = false; + // + // pnlgreen1 + // + this.pnlgreen1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen1.Location = new System.Drawing.Point(77, 8); + this.pnlgreen1.Name = "pnlgreen1"; + this.pnlgreen1.Size = new System.Drawing.Size(20, 13); + this.pnlgreen1.TabIndex = 2; + this.pnlgreen1.Visible = false; + // + // lblgreenlevel + // + this.lblgreenlevel.AutoSize = true; + this.lblgreenlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblgreenlevel.Location = new System.Drawing.Point(5, 25); + this.lblgreenlevel.Name = "lblgreenlevel"; + this.lblgreenlevel.Size = new System.Drawing.Size(49, 15); + this.lblgreenlevel.TabIndex = 1; + this.lblgreenlevel.Text = "Level: 4"; + // + // Label9 + // + this.Label9.AutoSize = true; + this.Label9.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label9.Location = new System.Drawing.Point(3, 2); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(60, 22); + this.Label9.TabIndex = 0; + this.Label9.Text = "Green"; + // + // pnlbluecolours + // + this.pnlbluecolours.BackColor = System.Drawing.Color.White; + this.pnlbluecolours.Controls.Add(this.pnlblueoptions); + this.pnlbluecolours.Controls.Add(this.pnlbluecustomcolour); + this.pnlbluecolours.Controls.Add(this.pnlblue16); + this.pnlbluecolours.Controls.Add(this.pnlblue12); + this.pnlbluecolours.Controls.Add(this.pnlblue14); + this.pnlbluecolours.Controls.Add(this.pnlblue10); + this.pnlbluecolours.Controls.Add(this.pnlblue8); + this.pnlbluecolours.Controls.Add(this.pnlblue4); + this.pnlbluecolours.Controls.Add(this.pnlblue6); + this.pnlbluecolours.Controls.Add(this.pnlblue15); + this.pnlbluecolours.Controls.Add(this.pnlblue2); + this.pnlbluecolours.Controls.Add(this.pnlblue13); + this.pnlbluecolours.Controls.Add(this.pnlblue11); + this.pnlbluecolours.Controls.Add(this.pnlblue7); + this.pnlbluecolours.Controls.Add(this.pnlblue9); + this.pnlbluecolours.Controls.Add(this.pnlblue5); + this.pnlbluecolours.Controls.Add(this.pnlblue3); + this.pnlbluecolours.Controls.Add(this.pnlblue1); + this.pnlbluecolours.Controls.Add(this.lblbluelevel); + this.pnlbluecolours.Controls.Add(this.Label7); + this.pnlbluecolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlbluecolours.Location = new System.Drawing.Point(0, 245); + this.pnlbluecolours.Name = "pnlbluecolours"; + this.pnlbluecolours.Size = new System.Drawing.Size(447, 46); + this.pnlbluecolours.TabIndex = 4; + this.pnlbluecolours.Visible = false; + // + // pnlblueoptions + // + this.pnlblueoptions.Controls.Add(this.Label6); + this.pnlblueoptions.Controls.Add(this.txtbluesred); + this.pnlblueoptions.Controls.Add(this.txtbluesblue); + this.pnlblueoptions.Controls.Add(this.Label4); + this.pnlblueoptions.Controls.Add(this.Label2); + this.pnlblueoptions.Controls.Add(this.txtbluesgreen); + this.pnlblueoptions.Location = new System.Drawing.Point(282, 3); + this.pnlblueoptions.Name = "pnlblueoptions"; + this.pnlblueoptions.Size = new System.Drawing.Size(120, 40); + this.pnlblueoptions.TabIndex = 27; + this.pnlblueoptions.Visible = false; + // + // Label6 + // + this.Label6.AutoSize = true; + this.Label6.BackColor = System.Drawing.Color.Transparent; + this.Label6.Location = new System.Drawing.Point(65, 24); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(30, 13); + this.Label6.TabIndex = 26; + this.Label6.Text = "Red:"; + // + // txtbluesred + // + this.txtbluesred.BackColor = System.Drawing.Color.White; + this.txtbluesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbluesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbluesred.Location = new System.Drawing.Point(95, 22); + this.txtbluesred.Multiline = true; + this.txtbluesred.Name = "txtbluesred"; + this.txtbluesred.Size = new System.Drawing.Size(23, 17); + this.txtbluesred.TabIndex = 25; + this.txtbluesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtbluesblue + // + this.txtbluesblue.BackColor = System.Drawing.Color.White; + this.txtbluesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbluesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbluesblue.Location = new System.Drawing.Point(65, 2); + this.txtbluesblue.Multiline = true; + this.txtbluesblue.Name = "txtbluesblue"; + this.txtbluesblue.Size = new System.Drawing.Size(23, 17); + this.txtbluesblue.TabIndex = 21; + this.txtbluesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.BackColor = System.Drawing.Color.Transparent; + this.Label4.Location = new System.Drawing.Point(2, 23); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(39, 13); + this.Label4.TabIndex = 24; + this.Label4.Text = "Green:"; + // + // Label2 + // + this.Label2.AutoSize = true; + this.Label2.BackColor = System.Drawing.Color.Transparent; + this.Label2.Location = new System.Drawing.Point(33, 4); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(31, 13); + this.Label2.TabIndex = 22; + this.Label2.Text = "Blue:"; + // + // txtbluesgreen + // + this.txtbluesgreen.BackColor = System.Drawing.Color.White; + this.txtbluesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbluesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbluesgreen.Location = new System.Drawing.Point(41, 22); + this.txtbluesgreen.Multiline = true; + this.txtbluesgreen.Name = "txtbluesgreen"; + this.txtbluesgreen.Size = new System.Drawing.Size(23, 17); + this.txtbluesgreen.TabIndex = 23; + this.txtbluesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlbluecustomcolour + // + this.pnlbluecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbluecustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlbluecustomcolour.Name = "pnlbluecustomcolour"; + this.pnlbluecustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlbluecustomcolour.TabIndex = 18; + this.pnlbluecustomcolour.Visible = false; + // + // pnlblue16 + // + this.pnlblue16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue16.Location = new System.Drawing.Point(259, 25); + this.pnlblue16.Name = "pnlblue16"; + this.pnlblue16.Size = new System.Drawing.Size(20, 13); + this.pnlblue16.TabIndex = 17; + this.pnlblue16.Visible = false; + // + // pnlblue12 + // + this.pnlblue12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue12.Location = new System.Drawing.Point(155, 25); + this.pnlblue12.Name = "pnlblue12"; + this.pnlblue12.Size = new System.Drawing.Size(20, 13); + this.pnlblue12.TabIndex = 9; + this.pnlblue12.Visible = false; + // + // pnlblue14 + // + this.pnlblue14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue14.Location = new System.Drawing.Point(207, 25); + this.pnlblue14.Name = "pnlblue14"; + this.pnlblue14.Size = new System.Drawing.Size(20, 13); + this.pnlblue14.TabIndex = 13; + this.pnlblue14.Visible = false; + // + // pnlblue10 + // + this.pnlblue10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue10.Location = new System.Drawing.Point(103, 25); + this.pnlblue10.Name = "pnlblue10"; + this.pnlblue10.Size = new System.Drawing.Size(20, 13); + this.pnlblue10.TabIndex = 5; + this.pnlblue10.Visible = false; + // + // pnlblue8 + // + this.pnlblue8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue8.Location = new System.Drawing.Point(259, 8); + this.pnlblue8.Name = "pnlblue8"; + this.pnlblue8.Size = new System.Drawing.Size(20, 13); + this.pnlblue8.TabIndex = 16; + this.pnlblue8.Visible = false; + // + // pnlblue4 + // + this.pnlblue4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue4.Location = new System.Drawing.Point(155, 8); + this.pnlblue4.Name = "pnlblue4"; + this.pnlblue4.Size = new System.Drawing.Size(20, 13); + this.pnlblue4.TabIndex = 8; + this.pnlblue4.Visible = false; + // + // pnlblue6 + // + this.pnlblue6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue6.Location = new System.Drawing.Point(207, 8); + this.pnlblue6.Name = "pnlblue6"; + this.pnlblue6.Size = new System.Drawing.Size(20, 13); + this.pnlblue6.TabIndex = 12; + this.pnlblue6.Visible = false; + // + // pnlblue15 + // + this.pnlblue15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue15.Location = new System.Drawing.Point(233, 25); + this.pnlblue15.Name = "pnlblue15"; + this.pnlblue15.Size = new System.Drawing.Size(20, 13); + this.pnlblue15.TabIndex = 15; + this.pnlblue15.Visible = false; + // + // pnlblue2 + // + this.pnlblue2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue2.Location = new System.Drawing.Point(103, 8); + this.pnlblue2.Name = "pnlblue2"; + this.pnlblue2.Size = new System.Drawing.Size(20, 13); + this.pnlblue2.TabIndex = 4; + this.pnlblue2.Visible = false; + // + // pnlblue13 + // + this.pnlblue13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue13.Location = new System.Drawing.Point(181, 25); + this.pnlblue13.Name = "pnlblue13"; + this.pnlblue13.Size = new System.Drawing.Size(20, 13); + this.pnlblue13.TabIndex = 11; + this.pnlblue13.Visible = false; + // + // pnlblue11 + // + this.pnlblue11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue11.Location = new System.Drawing.Point(129, 25); + this.pnlblue11.Name = "pnlblue11"; + this.pnlblue11.Size = new System.Drawing.Size(20, 13); + this.pnlblue11.TabIndex = 7; + this.pnlblue11.Visible = false; + // + // pnlblue7 + // + this.pnlblue7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue7.Location = new System.Drawing.Point(233, 8); + this.pnlblue7.Name = "pnlblue7"; + this.pnlblue7.Size = new System.Drawing.Size(20, 13); + this.pnlblue7.TabIndex = 14; + this.pnlblue7.Visible = false; + // + // pnlblue9 + // + this.pnlblue9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue9.Location = new System.Drawing.Point(77, 25); + this.pnlblue9.Name = "pnlblue9"; + this.pnlblue9.Size = new System.Drawing.Size(20, 13); + this.pnlblue9.TabIndex = 3; + this.pnlblue9.Visible = false; + // + // pnlblue5 + // + this.pnlblue5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue5.Location = new System.Drawing.Point(181, 8); + this.pnlblue5.Name = "pnlblue5"; + this.pnlblue5.Size = new System.Drawing.Size(20, 13); + this.pnlblue5.TabIndex = 10; + this.pnlblue5.Visible = false; + // + // pnlblue3 + // + this.pnlblue3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue3.Location = new System.Drawing.Point(129, 8); + this.pnlblue3.Name = "pnlblue3"; + this.pnlblue3.Size = new System.Drawing.Size(20, 13); + this.pnlblue3.TabIndex = 6; + this.pnlblue3.Visible = false; + // + // pnlblue1 + // + this.pnlblue1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue1.Location = new System.Drawing.Point(77, 8); + this.pnlblue1.Name = "pnlblue1"; + this.pnlblue1.Size = new System.Drawing.Size(20, 13); + this.pnlblue1.TabIndex = 2; + this.pnlblue1.Visible = false; + // + // lblbluelevel + // + this.lblbluelevel.AutoSize = true; + this.lblbluelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblbluelevel.Location = new System.Drawing.Point(5, 25); + this.lblbluelevel.Name = "lblbluelevel"; + this.lblbluelevel.Size = new System.Drawing.Size(49, 15); + this.lblbluelevel.TabIndex = 1; + this.lblbluelevel.Text = "Level: 4"; + // + // Label7 + // + this.Label7.AutoSize = true; + this.Label7.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(3, 2); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(48, 22); + this.Label7.TabIndex = 0; + this.Label7.Text = "Blue"; + // + // pnlpurplecolours + // + this.pnlpurplecolours.BackColor = System.Drawing.Color.White; + this.pnlpurplecolours.Controls.Add(this.pnlpurpleoptions); + this.pnlpurplecolours.Controls.Add(this.pnlpurplecustomcolour); + this.pnlpurplecolours.Controls.Add(this.pnlpurple16); + this.pnlpurplecolours.Controls.Add(this.pnlpurple12); + this.pnlpurplecolours.Controls.Add(this.pnlpurple14); + this.pnlpurplecolours.Controls.Add(this.pnlpurple10); + this.pnlpurplecolours.Controls.Add(this.pnlpurple8); + this.pnlpurplecolours.Controls.Add(this.pnlpurple4); + this.pnlpurplecolours.Controls.Add(this.pnlpurple6); + this.pnlpurplecolours.Controls.Add(this.pnlpurple15); + this.pnlpurplecolours.Controls.Add(this.pnlpurple2); + this.pnlpurplecolours.Controls.Add(this.pnlpurple13); + this.pnlpurplecolours.Controls.Add(this.pnlpurple11); + this.pnlpurplecolours.Controls.Add(this.pnlpurple7); + this.pnlpurplecolours.Controls.Add(this.pnlpurple9); + this.pnlpurplecolours.Controls.Add(this.pnlpurple5); + this.pnlpurplecolours.Controls.Add(this.pnlpurple3); + this.pnlpurplecolours.Controls.Add(this.pnlpurple1); + this.pnlpurplecolours.Controls.Add(this.lblpurplelevel); + this.pnlpurplecolours.Controls.Add(this.Label5); + this.pnlpurplecolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlpurplecolours.Location = new System.Drawing.Point(0, 199); + this.pnlpurplecolours.Name = "pnlpurplecolours"; + this.pnlpurplecolours.Size = new System.Drawing.Size(447, 46); + this.pnlpurplecolours.TabIndex = 3; + this.pnlpurplecolours.Visible = false; + // + // pnlpurpleoptions + // + this.pnlpurpleoptions.Controls.Add(this.Label8); + this.pnlpurpleoptions.Controls.Add(this.txtpurplesgreen); + this.pnlpurpleoptions.Controls.Add(this.txtpurplesblue); + this.pnlpurpleoptions.Controls.Add(this.Label10); + this.pnlpurpleoptions.Controls.Add(this.Label12); + this.pnlpurpleoptions.Controls.Add(this.txtpurplesred); + this.pnlpurpleoptions.Location = new System.Drawing.Point(282, 3); + this.pnlpurpleoptions.Name = "pnlpurpleoptions"; + this.pnlpurpleoptions.Size = new System.Drawing.Size(120, 40); + this.pnlpurpleoptions.TabIndex = 28; + this.pnlpurpleoptions.Visible = false; + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.BackColor = System.Drawing.Color.Transparent; + this.Label8.Location = new System.Drawing.Point(56, 24); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(39, 13); + this.Label8.TabIndex = 26; + this.Label8.Text = "Green:"; + // + // txtpurplesgreen + // + this.txtpurplesgreen.BackColor = System.Drawing.Color.White; + this.txtpurplesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpurplesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpurplesgreen.Location = new System.Drawing.Point(95, 22); + this.txtpurplesgreen.Multiline = true; + this.txtpurplesgreen.Name = "txtpurplesgreen"; + this.txtpurplesgreen.Size = new System.Drawing.Size(23, 17); + this.txtpurplesgreen.TabIndex = 25; + this.txtpurplesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtpurplesblue + // + this.txtpurplesblue.BackColor = System.Drawing.Color.White; + this.txtpurplesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpurplesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpurplesblue.Location = new System.Drawing.Point(65, 2); + this.txtpurplesblue.Multiline = true; + this.txtpurplesblue.Name = "txtpurplesblue"; + this.txtpurplesblue.Size = new System.Drawing.Size(23, 17); + this.txtpurplesblue.TabIndex = 21; + this.txtpurplesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label10 + // + this.Label10.AutoSize = true; + this.Label10.BackColor = System.Drawing.Color.Transparent; + this.Label10.Location = new System.Drawing.Point(2, 23); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(30, 13); + this.Label10.TabIndex = 24; + this.Label10.Text = "Red:"; + // + // Label12 + // + this.Label12.AutoSize = true; + this.Label12.BackColor = System.Drawing.Color.Transparent; + this.Label12.Location = new System.Drawing.Point(33, 4); + this.Label12.Name = "Label12"; + this.Label12.Size = new System.Drawing.Size(31, 13); + this.Label12.TabIndex = 22; + this.Label12.Text = "Blue:"; + // + // txtpurplesred + // + this.txtpurplesred.BackColor = System.Drawing.Color.White; + this.txtpurplesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpurplesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpurplesred.Location = new System.Drawing.Point(32, 22); + this.txtpurplesred.Multiline = true; + this.txtpurplesred.Name = "txtpurplesred"; + this.txtpurplesred.Size = new System.Drawing.Size(23, 17); + this.txtpurplesred.TabIndex = 23; + this.txtpurplesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlpurplecustomcolour + // + this.pnlpurplecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurplecustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlpurplecustomcolour.Name = "pnlpurplecustomcolour"; + this.pnlpurplecustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlpurplecustomcolour.TabIndex = 18; + this.pnlpurplecustomcolour.Visible = false; + // + // pnlpurple16 + // + this.pnlpurple16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple16.Location = new System.Drawing.Point(259, 25); + this.pnlpurple16.Name = "pnlpurple16"; + this.pnlpurple16.Size = new System.Drawing.Size(20, 13); + this.pnlpurple16.TabIndex = 17; + this.pnlpurple16.Visible = false; + // + // pnlpurple12 + // + this.pnlpurple12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple12.Location = new System.Drawing.Point(155, 25); + this.pnlpurple12.Name = "pnlpurple12"; + this.pnlpurple12.Size = new System.Drawing.Size(20, 13); + this.pnlpurple12.TabIndex = 9; + this.pnlpurple12.Visible = false; + // + // pnlpurple14 + // + this.pnlpurple14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple14.Location = new System.Drawing.Point(207, 25); + this.pnlpurple14.Name = "pnlpurple14"; + this.pnlpurple14.Size = new System.Drawing.Size(20, 13); + this.pnlpurple14.TabIndex = 13; + this.pnlpurple14.Visible = false; + // + // pnlpurple10 + // + this.pnlpurple10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple10.Location = new System.Drawing.Point(103, 25); + this.pnlpurple10.Name = "pnlpurple10"; + this.pnlpurple10.Size = new System.Drawing.Size(20, 13); + this.pnlpurple10.TabIndex = 5; + this.pnlpurple10.Visible = false; + // + // pnlpurple8 + // + this.pnlpurple8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple8.Location = new System.Drawing.Point(259, 8); + this.pnlpurple8.Name = "pnlpurple8"; + this.pnlpurple8.Size = new System.Drawing.Size(20, 13); + this.pnlpurple8.TabIndex = 16; + this.pnlpurple8.Visible = false; + // + // pnlpurple4 + // + this.pnlpurple4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple4.Location = new System.Drawing.Point(155, 8); + this.pnlpurple4.Name = "pnlpurple4"; + this.pnlpurple4.Size = new System.Drawing.Size(20, 13); + this.pnlpurple4.TabIndex = 8; + this.pnlpurple4.Visible = false; + // + // pnlpurple6 + // + this.pnlpurple6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple6.Location = new System.Drawing.Point(207, 8); + this.pnlpurple6.Name = "pnlpurple6"; + this.pnlpurple6.Size = new System.Drawing.Size(20, 13); + this.pnlpurple6.TabIndex = 12; + this.pnlpurple6.Visible = false; + // + // pnlpurple15 + // + this.pnlpurple15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple15.Location = new System.Drawing.Point(233, 25); + this.pnlpurple15.Name = "pnlpurple15"; + this.pnlpurple15.Size = new System.Drawing.Size(20, 13); + this.pnlpurple15.TabIndex = 15; + this.pnlpurple15.Visible = false; + // + // pnlpurple2 + // + this.pnlpurple2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple2.Location = new System.Drawing.Point(103, 8); + this.pnlpurple2.Name = "pnlpurple2"; + this.pnlpurple2.Size = new System.Drawing.Size(20, 13); + this.pnlpurple2.TabIndex = 4; + this.pnlpurple2.Visible = false; + // + // pnlpurple13 + // + this.pnlpurple13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple13.Location = new System.Drawing.Point(181, 25); + this.pnlpurple13.Name = "pnlpurple13"; + this.pnlpurple13.Size = new System.Drawing.Size(20, 13); + this.pnlpurple13.TabIndex = 11; + this.pnlpurple13.Visible = false; + // + // pnlpurple11 + // + this.pnlpurple11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple11.Location = new System.Drawing.Point(129, 25); + this.pnlpurple11.Name = "pnlpurple11"; + this.pnlpurple11.Size = new System.Drawing.Size(20, 13); + this.pnlpurple11.TabIndex = 7; + this.pnlpurple11.Visible = false; + // + // pnlpurple7 + // + this.pnlpurple7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple7.Location = new System.Drawing.Point(233, 8); + this.pnlpurple7.Name = "pnlpurple7"; + this.pnlpurple7.Size = new System.Drawing.Size(20, 13); + this.pnlpurple7.TabIndex = 14; + this.pnlpurple7.Visible = false; + // + // pnlpurple9 + // + this.pnlpurple9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple9.Location = new System.Drawing.Point(77, 25); + this.pnlpurple9.Name = "pnlpurple9"; + this.pnlpurple9.Size = new System.Drawing.Size(20, 13); + this.pnlpurple9.TabIndex = 3; + this.pnlpurple9.Visible = false; + // + // pnlpurple5 + // + this.pnlpurple5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple5.Location = new System.Drawing.Point(181, 8); + this.pnlpurple5.Name = "pnlpurple5"; + this.pnlpurple5.Size = new System.Drawing.Size(20, 13); + this.pnlpurple5.TabIndex = 10; + this.pnlpurple5.Visible = false; + // + // pnlpurple3 + // + this.pnlpurple3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple3.Location = new System.Drawing.Point(129, 8); + this.pnlpurple3.Name = "pnlpurple3"; + this.pnlpurple3.Size = new System.Drawing.Size(20, 13); + this.pnlpurple3.TabIndex = 6; + this.pnlpurple3.Visible = false; + // + // pnlpurple1 + // + this.pnlpurple1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple1.Location = new System.Drawing.Point(77, 8); + this.pnlpurple1.Name = "pnlpurple1"; + this.pnlpurple1.Size = new System.Drawing.Size(20, 13); + this.pnlpurple1.TabIndex = 2; + this.pnlpurple1.Visible = false; + // + // lblpurplelevel + // + this.lblpurplelevel.AutoSize = true; + this.lblpurplelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblpurplelevel.Location = new System.Drawing.Point(5, 25); + this.lblpurplelevel.Name = "lblpurplelevel"; + this.lblpurplelevel.Size = new System.Drawing.Size(49, 15); + this.lblpurplelevel.TabIndex = 1; + this.lblpurplelevel.Text = "Level: 4"; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(3, 2); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(67, 22); + this.Label5.TabIndex = 0; + this.Label5.Text = "Purple"; + // + // pnlgraycolours + // + this.pnlgraycolours.BackColor = System.Drawing.Color.White; + this.pnlgraycolours.Controls.Add(this.lblcustomshadetut); + this.pnlgraycolours.Controls.Add(this.txtcustomgrayshade); + this.pnlgraycolours.Controls.Add(this.pnlgraycustomcolour); + this.pnlgraycolours.Controls.Add(this.pnlgray16); + this.pnlgraycolours.Controls.Add(this.pnlgray12); + this.pnlgraycolours.Controls.Add(this.pnlgray14); + this.pnlgraycolours.Controls.Add(this.pnlgray10); + this.pnlgraycolours.Controls.Add(this.pnlgray8); + this.pnlgraycolours.Controls.Add(this.pnlgray4); + this.pnlgraycolours.Controls.Add(this.pnlgray6); + this.pnlgraycolours.Controls.Add(this.pnlgray15); + this.pnlgraycolours.Controls.Add(this.pnlgray2); + this.pnlgraycolours.Controls.Add(this.pnlgray13); + this.pnlgraycolours.Controls.Add(this.pnlgray11); + this.pnlgraycolours.Controls.Add(this.pnlgray7); + this.pnlgraycolours.Controls.Add(this.pnlgray9); + this.pnlgraycolours.Controls.Add(this.pnlgray5); + this.pnlgraycolours.Controls.Add(this.pnlgray3); + this.pnlgraycolours.Controls.Add(this.pnlgray1); + this.pnlgraycolours.Controls.Add(this.lblgraylevel); + this.pnlgraycolours.Controls.Add(this.Label3); + this.pnlgraycolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlgraycolours.Location = new System.Drawing.Point(0, 153); + this.pnlgraycolours.Name = "pnlgraycolours"; + this.pnlgraycolours.Size = new System.Drawing.Size(447, 46); + this.pnlgraycolours.TabIndex = 2; + this.pnlgraycolours.Visible = false; + // + // lblcustomshadetut + // + this.lblcustomshadetut.AutoSize = true; + this.lblcustomshadetut.BackColor = System.Drawing.Color.Transparent; + this.lblcustomshadetut.Location = new System.Drawing.Point(290, 5); + this.lblcustomshadetut.Name = "lblcustomshadetut"; + this.lblcustomshadetut.Size = new System.Drawing.Size(102, 13); + this.lblcustomshadetut.TabIndex = 20; + this.lblcustomshadetut.Text = "Enter Shade (0-255)"; + this.lblcustomshadetut.Visible = false; + // + // txtcustomgrayshade + // + this.txtcustomgrayshade.BackColor = System.Drawing.Color.White; + this.txtcustomgrayshade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtcustomgrayshade.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtcustomgrayshade.Location = new System.Drawing.Point(317, 20); + this.txtcustomgrayshade.Multiline = true; + this.txtcustomgrayshade.Name = "txtcustomgrayshade"; + this.txtcustomgrayshade.Size = new System.Drawing.Size(45, 17); + this.txtcustomgrayshade.TabIndex = 19; + this.txtcustomgrayshade.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtcustomgrayshade.Visible = false; + this.txtcustomgrayshade.TextChanged += new System.EventHandler(this.txtcustomgrayshade_TextChanged); + // + // pnlgraycustomcolour + // + this.pnlgraycustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgraycustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlgraycustomcolour.Name = "pnlgraycustomcolour"; + this.pnlgraycustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlgraycustomcolour.TabIndex = 18; + this.pnlgraycustomcolour.Visible = false; + // + // pnlgray16 + // + this.pnlgray16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray16.Location = new System.Drawing.Point(259, 25); + this.pnlgray16.Name = "pnlgray16"; + this.pnlgray16.Size = new System.Drawing.Size(20, 13); + this.pnlgray16.TabIndex = 17; + this.pnlgray16.Visible = false; + // + // pnlgray12 + // + this.pnlgray12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray12.Location = new System.Drawing.Point(155, 25); + this.pnlgray12.Name = "pnlgray12"; + this.pnlgray12.Size = new System.Drawing.Size(20, 13); + this.pnlgray12.TabIndex = 9; + this.pnlgray12.Visible = false; + // + // pnlgray14 + // + this.pnlgray14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray14.Location = new System.Drawing.Point(207, 25); + this.pnlgray14.Name = "pnlgray14"; + this.pnlgray14.Size = new System.Drawing.Size(20, 13); + this.pnlgray14.TabIndex = 13; + this.pnlgray14.Visible = false; + // + // pnlgray10 + // + this.pnlgray10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray10.Location = new System.Drawing.Point(103, 25); + this.pnlgray10.Name = "pnlgray10"; + this.pnlgray10.Size = new System.Drawing.Size(20, 13); + this.pnlgray10.TabIndex = 5; + this.pnlgray10.Visible = false; + // + // pnlgray8 + // + this.pnlgray8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray8.Location = new System.Drawing.Point(259, 8); + this.pnlgray8.Name = "pnlgray8"; + this.pnlgray8.Size = new System.Drawing.Size(20, 13); + this.pnlgray8.TabIndex = 16; + this.pnlgray8.Visible = false; + // + // pnlgray4 + // + this.pnlgray4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray4.Location = new System.Drawing.Point(155, 8); + this.pnlgray4.Name = "pnlgray4"; + this.pnlgray4.Size = new System.Drawing.Size(20, 13); + this.pnlgray4.TabIndex = 8; + this.pnlgray4.Visible = false; + // + // pnlgray6 + // + this.pnlgray6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray6.Location = new System.Drawing.Point(207, 8); + this.pnlgray6.Name = "pnlgray6"; + this.pnlgray6.Size = new System.Drawing.Size(20, 13); + this.pnlgray6.TabIndex = 12; + this.pnlgray6.Visible = false; + // + // pnlgray15 + // + this.pnlgray15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray15.Location = new System.Drawing.Point(233, 25); + this.pnlgray15.Name = "pnlgray15"; + this.pnlgray15.Size = new System.Drawing.Size(20, 13); + this.pnlgray15.TabIndex = 15; + this.pnlgray15.Visible = false; + // + // pnlgray2 + // + this.pnlgray2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray2.Location = new System.Drawing.Point(103, 8); + this.pnlgray2.Name = "pnlgray2"; + this.pnlgray2.Size = new System.Drawing.Size(20, 13); + this.pnlgray2.TabIndex = 4; + this.pnlgray2.Visible = false; + // + // pnlgray13 + // + this.pnlgray13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray13.Location = new System.Drawing.Point(181, 25); + this.pnlgray13.Name = "pnlgray13"; + this.pnlgray13.Size = new System.Drawing.Size(20, 13); + this.pnlgray13.TabIndex = 11; + this.pnlgray13.Visible = false; + // + // pnlgray11 + // + this.pnlgray11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray11.Location = new System.Drawing.Point(129, 25); + this.pnlgray11.Name = "pnlgray11"; + this.pnlgray11.Size = new System.Drawing.Size(20, 13); + this.pnlgray11.TabIndex = 7; + this.pnlgray11.Visible = false; + // + // pnlgray7 + // + this.pnlgray7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray7.Location = new System.Drawing.Point(233, 8); + this.pnlgray7.Name = "pnlgray7"; + this.pnlgray7.Size = new System.Drawing.Size(20, 13); + this.pnlgray7.TabIndex = 14; + this.pnlgray7.Visible = false; + // + // pnlgray9 + // + this.pnlgray9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray9.Location = new System.Drawing.Point(77, 25); + this.pnlgray9.Name = "pnlgray9"; + this.pnlgray9.Size = new System.Drawing.Size(20, 13); + this.pnlgray9.TabIndex = 3; + this.pnlgray9.Visible = false; + // + // pnlgray5 + // + this.pnlgray5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray5.Location = new System.Drawing.Point(181, 8); + this.pnlgray5.Name = "pnlgray5"; + this.pnlgray5.Size = new System.Drawing.Size(20, 13); + this.pnlgray5.TabIndex = 10; + this.pnlgray5.Visible = false; + // + // pnlgray3 + // + this.pnlgray3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray3.Location = new System.Drawing.Point(129, 8); + this.pnlgray3.Name = "pnlgray3"; + this.pnlgray3.Size = new System.Drawing.Size(20, 13); + this.pnlgray3.TabIndex = 6; + this.pnlgray3.Visible = false; + // + // pnlgray1 + // + this.pnlgray1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray1.Location = new System.Drawing.Point(77, 8); + this.pnlgray1.Name = "pnlgray1"; + this.pnlgray1.Size = new System.Drawing.Size(20, 13); + this.pnlgray1.TabIndex = 2; + this.pnlgray1.Visible = false; + // + // lblgraylevel + // + this.lblgraylevel.AutoSize = true; + this.lblgraylevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblgraylevel.Location = new System.Drawing.Point(5, 25); + this.lblgraylevel.Name = "lblgraylevel"; + this.lblgraylevel.Size = new System.Drawing.Size(49, 15); + this.lblgraylevel.TabIndex = 1; + this.lblgraylevel.Text = "Level: 4"; + // + // Label3 + // + this.Label3.AutoSize = true; + this.Label3.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(3, 2); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(52, 22); + this.Label3.TabIndex = 0; + this.Label3.Text = "Gray"; + // + // pnlanycolours + // + this.pnlanycolours.BackColor = System.Drawing.Color.White; + this.pnlanycolours.Controls.Add(this.pnlanyoptions); + this.pnlanycolours.Controls.Add(this.pnlanycustomcolour); + this.pnlanycolours.Controls.Add(this.pnlany16); + this.pnlanycolours.Controls.Add(this.pnlany12); + this.pnlanycolours.Controls.Add(this.pnlany14); + this.pnlanycolours.Controls.Add(this.pnlany10); + this.pnlanycolours.Controls.Add(this.pnlany8); + this.pnlanycolours.Controls.Add(this.pnlany4); + this.pnlanycolours.Controls.Add(this.pnlany6); + this.pnlanycolours.Controls.Add(this.pnlany15); + this.pnlanycolours.Controls.Add(this.pnlany2); + this.pnlanycolours.Controls.Add(this.pnlany13); + this.pnlanycolours.Controls.Add(this.pnlany11); + this.pnlanycolours.Controls.Add(this.pnlany7); + this.pnlanycolours.Controls.Add(this.pnlany9); + this.pnlanycolours.Controls.Add(this.pnlany5); + this.pnlanycolours.Controls.Add(this.pnlany3); + this.pnlanycolours.Controls.Add(this.pnlany1); + this.pnlanycolours.Controls.Add(this.lblanylevel); + this.pnlanycolours.Controls.Add(this.Label1); + this.pnlanycolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlanycolours.Location = new System.Drawing.Point(0, 107); + this.pnlanycolours.Name = "pnlanycolours"; + this.pnlanycolours.Size = new System.Drawing.Size(447, 46); + this.pnlanycolours.TabIndex = 1; + this.pnlanycolours.Visible = false; + // + // pnlanyoptions + // + this.pnlanyoptions.Controls.Add(this.Label38); + this.pnlanyoptions.Controls.Add(this.txtanysgreen); + this.pnlanyoptions.Controls.Add(this.txtanysred); + this.pnlanyoptions.Controls.Add(this.Label39); + this.pnlanyoptions.Controls.Add(this.Label40); + this.pnlanyoptions.Controls.Add(this.txtanysblue); + this.pnlanyoptions.Location = new System.Drawing.Point(282, 3); + this.pnlanyoptions.Name = "pnlanyoptions"; + this.pnlanyoptions.Size = new System.Drawing.Size(120, 40); + this.pnlanyoptions.TabIndex = 34; + this.pnlanyoptions.Visible = false; + this.pnlanyoptions.MouseLeave += new System.EventHandler(this.pnlanyoptions_MouseLeave); + // + // Label38 + // + this.Label38.AutoSize = true; + this.Label38.BackColor = System.Drawing.Color.Transparent; + this.Label38.Location = new System.Drawing.Point(56, 24); + this.Label38.Name = "Label38"; + this.Label38.Size = new System.Drawing.Size(39, 13); + this.Label38.TabIndex = 26; + this.Label38.Text = "Green:"; + // + // txtanysgreen + // + this.txtanysgreen.BackColor = System.Drawing.Color.White; + this.txtanysgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtanysgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtanysgreen.Location = new System.Drawing.Point(95, 22); + this.txtanysgreen.Multiline = true; + this.txtanysgreen.Name = "txtanysgreen"; + this.txtanysgreen.Size = new System.Drawing.Size(23, 17); + this.txtanysgreen.TabIndex = 25; + this.txtanysgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtanysgreen.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); + // + // txtanysred + // + this.txtanysred.BackColor = System.Drawing.Color.White; + this.txtanysred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtanysred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtanysred.Location = new System.Drawing.Point(62, 2); + this.txtanysred.Multiline = true; + this.txtanysred.Name = "txtanysred"; + this.txtanysred.Size = new System.Drawing.Size(23, 17); + this.txtanysred.TabIndex = 21; + this.txtanysred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtanysred.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); + // + // Label39 + // + this.Label39.AutoSize = true; + this.Label39.BackColor = System.Drawing.Color.Transparent; + this.Label39.Location = new System.Drawing.Point(1, 23); + this.Label39.Name = "Label39"; + this.Label39.Size = new System.Drawing.Size(31, 13); + this.Label39.TabIndex = 24; + this.Label39.Text = "Blue:"; + // + // Label40 + // + this.Label40.AutoSize = true; + this.Label40.BackColor = System.Drawing.Color.Transparent; + this.Label40.Location = new System.Drawing.Point(31, 4); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(30, 13); + this.Label40.TabIndex = 22; + this.Label40.Text = "Red:"; + // + // txtanysblue + // + this.txtanysblue.BackColor = System.Drawing.Color.White; + this.txtanysblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtanysblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtanysblue.Location = new System.Drawing.Point(32, 22); + this.txtanysblue.Multiline = true; + this.txtanysblue.Name = "txtanysblue"; + this.txtanysblue.Size = new System.Drawing.Size(23, 17); + this.txtanysblue.TabIndex = 23; + this.txtanysblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtanysblue.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); + // + // pnlanycustomcolour + // + this.pnlanycustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlanycustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlanycustomcolour.Name = "pnlanycustomcolour"; + this.pnlanycustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlanycustomcolour.TabIndex = 17; + this.pnlanycustomcolour.Visible = false; + // + // pnlany16 + // + this.pnlany16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany16.Location = new System.Drawing.Point(259, 25); + this.pnlany16.Name = "pnlany16"; + this.pnlany16.Size = new System.Drawing.Size(20, 13); + this.pnlany16.TabIndex = 17; + this.pnlany16.Visible = false; + // + // pnlany12 + // + this.pnlany12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany12.Location = new System.Drawing.Point(155, 25); + this.pnlany12.Name = "pnlany12"; + this.pnlany12.Size = new System.Drawing.Size(20, 13); + this.pnlany12.TabIndex = 9; + this.pnlany12.Visible = false; + // + // pnlany14 + // + this.pnlany14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany14.Location = new System.Drawing.Point(207, 25); + this.pnlany14.Name = "pnlany14"; + this.pnlany14.Size = new System.Drawing.Size(20, 13); + this.pnlany14.TabIndex = 13; + this.pnlany14.Visible = false; + // + // pnlany10 + // + this.pnlany10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany10.Location = new System.Drawing.Point(103, 25); + this.pnlany10.Name = "pnlany10"; + this.pnlany10.Size = new System.Drawing.Size(20, 13); + this.pnlany10.TabIndex = 5; + this.pnlany10.Visible = false; + // + // pnlany8 + // + this.pnlany8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany8.Location = new System.Drawing.Point(259, 8); + this.pnlany8.Name = "pnlany8"; + this.pnlany8.Size = new System.Drawing.Size(20, 13); + this.pnlany8.TabIndex = 16; + this.pnlany8.Visible = false; + // + // pnlany4 + // + this.pnlany4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany4.Location = new System.Drawing.Point(155, 8); + this.pnlany4.Name = "pnlany4"; + this.pnlany4.Size = new System.Drawing.Size(20, 13); + this.pnlany4.TabIndex = 8; + this.pnlany4.Visible = false; + // + // pnlany6 + // + this.pnlany6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany6.Location = new System.Drawing.Point(207, 8); + this.pnlany6.Name = "pnlany6"; + this.pnlany6.Size = new System.Drawing.Size(20, 13); + this.pnlany6.TabIndex = 12; + this.pnlany6.Visible = false; + // + // pnlany15 + // + this.pnlany15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany15.Location = new System.Drawing.Point(233, 25); + this.pnlany15.Name = "pnlany15"; + this.pnlany15.Size = new System.Drawing.Size(20, 13); + this.pnlany15.TabIndex = 15; + this.pnlany15.Visible = false; + // + // pnlany2 + // + this.pnlany2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany2.Location = new System.Drawing.Point(103, 8); + this.pnlany2.Name = "pnlany2"; + this.pnlany2.Size = new System.Drawing.Size(20, 13); + this.pnlany2.TabIndex = 4; + this.pnlany2.Visible = false; + // + // pnlany13 + // + this.pnlany13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany13.Location = new System.Drawing.Point(181, 25); + this.pnlany13.Name = "pnlany13"; + this.pnlany13.Size = new System.Drawing.Size(20, 13); + this.pnlany13.TabIndex = 11; + this.pnlany13.Visible = false; + // + // pnlany11 + // + this.pnlany11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany11.Location = new System.Drawing.Point(129, 25); + this.pnlany11.Name = "pnlany11"; + this.pnlany11.Size = new System.Drawing.Size(20, 13); + this.pnlany11.TabIndex = 7; + this.pnlany11.Visible = false; + // + // pnlany7 + // + this.pnlany7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany7.Location = new System.Drawing.Point(233, 8); + this.pnlany7.Name = "pnlany7"; + this.pnlany7.Size = new System.Drawing.Size(20, 13); + this.pnlany7.TabIndex = 14; + this.pnlany7.Visible = false; + // + // pnlany9 + // + this.pnlany9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany9.Location = new System.Drawing.Point(77, 25); + this.pnlany9.Name = "pnlany9"; + this.pnlany9.Size = new System.Drawing.Size(20, 13); + this.pnlany9.TabIndex = 3; + this.pnlany9.Visible = false; + // + // pnlany5 + // + this.pnlany5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany5.Location = new System.Drawing.Point(181, 8); + this.pnlany5.Name = "pnlany5"; + this.pnlany5.Size = new System.Drawing.Size(20, 13); + this.pnlany5.TabIndex = 10; + this.pnlany5.Visible = false; + // + // pnlany3 + // + this.pnlany3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany3.Location = new System.Drawing.Point(129, 8); + this.pnlany3.Name = "pnlany3"; + this.pnlany3.Size = new System.Drawing.Size(20, 13); + this.pnlany3.TabIndex = 6; + this.pnlany3.Visible = false; + // + // pnlany1 + // + this.pnlany1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany1.Location = new System.Drawing.Point(77, 8); + this.pnlany1.Name = "pnlany1"; + this.pnlany1.Size = new System.Drawing.Size(20, 13); + this.pnlany1.TabIndex = 2; + this.pnlany1.Visible = false; + // + // lblanylevel + // + this.lblanylevel.AutoSize = true; + this.lblanylevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblanylevel.Location = new System.Drawing.Point(5, 25); + this.lblanylevel.Name = "lblanylevel"; + this.lblanylevel.Size = new System.Drawing.Size(49, 15); + this.lblanylevel.TabIndex = 1; + this.lblanylevel.Text = "Level: 4"; + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(3, 2); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(43, 22); + this.Label1.TabIndex = 0; + this.Label1.Text = "Any"; + // + // Panel1 + // + this.Panel1.BackColor = System.Drawing.Color.White; + this.Panel1.Controls.Add(this.lblnewcolourrgb); + this.Panel1.Controls.Add(this.lblnewcolourname); + this.Panel1.Controls.Add(this.Label26); + this.Panel1.Controls.Add(this.Label17); + this.Panel1.Controls.Add(this.lbloldcolourrgb); + this.Panel1.Controls.Add(this.lbloldcolourname); + this.Panel1.Controls.Add(this.Label14); + this.Panel1.Controls.Add(this.pnlnewcolour); + this.Panel1.Controls.Add(this.pnloldcolour); + this.Panel1.Controls.Add(this.lblobjecttocolour); + this.Panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.Panel1.Location = new System.Drawing.Point(0, 0); + this.Panel1.Name = "Panel1"; + this.Panel1.Size = new System.Drawing.Size(447, 107); + this.Panel1.TabIndex = 0; + // + // lblnewcolourrgb + // + this.lblnewcolourrgb.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblnewcolourrgb.Location = new System.Drawing.Point(298, 66); + this.lblnewcolourrgb.Name = "lblnewcolourrgb"; + this.lblnewcolourrgb.Size = new System.Drawing.Size(147, 18); + this.lblnewcolourrgb.TabIndex = 10; + this.lblnewcolourrgb.Text = "RGB: 234, 341, 111"; + // + // lblnewcolourname + // + this.lblnewcolourname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblnewcolourname.Location = new System.Drawing.Point(298, 49); + this.lblnewcolourname.Name = "lblnewcolourname"; + this.lblnewcolourname.Size = new System.Drawing.Size(145, 18); + this.lblnewcolourname.TabIndex = 9; + this.lblnewcolourname.Text = "Name: Whitesmoke"; + // + // Label26 + // + this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label26.Location = new System.Drawing.Point(298, 32); + this.Label26.Name = "Label26"; + this.Label26.Size = new System.Drawing.Size(145, 18); + this.Label26.TabIndex = 8; + this.Label26.Text = "New Colour"; + // + // Label17 + // + this.Label17.AutoSize = true; + this.Label17.Location = new System.Drawing.Point(7, 87); + this.Label17.Name = "Label17"; + this.Label17.Size = new System.Drawing.Size(426, 13); + this.Label17.TabIndex = 7; + this.Label17.Text = "Click the new colour above to confirm your colour choice or click the old colour " + + "to cancel"; + // + // lbloldcolourrgb + // + this.lbloldcolourrgb.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbloldcolourrgb.Location = new System.Drawing.Point(-2, 66); + this.lbloldcolourrgb.Name = "lbloldcolourrgb"; + this.lbloldcolourrgb.Size = new System.Drawing.Size(151, 18); + this.lbloldcolourrgb.TabIndex = 6; + this.lbloldcolourrgb.Text = "50, 60, 20 :RGB"; + this.lbloldcolourrgb.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // lbloldcolourname + // + this.lbloldcolourname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbloldcolourname.Location = new System.Drawing.Point(-2, 49); + this.lbloldcolourname.Name = "lbloldcolourname"; + this.lbloldcolourname.Size = new System.Drawing.Size(151, 18); + this.lbloldcolourname.TabIndex = 5; + this.lbloldcolourname.Text = "Red :Name"; + this.lbloldcolourname.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // Label14 + // + this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label14.Location = new System.Drawing.Point(-2, 32); + this.Label14.Name = "Label14"; + this.Label14.Size = new System.Drawing.Size(151, 18); + this.Label14.TabIndex = 4; + this.Label14.Text = "Old Colour"; + this.Label14.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // pnlnewcolour + // + this.pnlnewcolour.Location = new System.Drawing.Point(227, 32); + this.pnlnewcolour.Name = "pnlnewcolour"; + this.pnlnewcolour.Size = new System.Drawing.Size(67, 52); + this.pnlnewcolour.TabIndex = 3; + // + // pnloldcolour + // + this.pnloldcolour.Location = new System.Drawing.Point(153, 32); + this.pnloldcolour.Name = "pnloldcolour"; + this.pnloldcolour.Size = new System.Drawing.Size(67, 52); + this.pnloldcolour.TabIndex = 2; + // + // lblobjecttocolour + // + this.lblobjecttocolour.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblobjecttocolour.Location = new System.Drawing.Point(10, 5); + this.lblobjecttocolour.Name = "lblobjecttocolour"; + this.lblobjecttocolour.Size = new System.Drawing.Size(423, 23); + this.lblobjecttocolour.TabIndex = 1; + this.lblobjecttocolour.Text = "Close Button Colour"; + this.lblobjecttocolour.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Color_Picker + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(447, 600); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.Name = "Color_Picker"; + this.Text = "Colour_Picker"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Color_Picker_Load); + this.pgcontents.ResumeLayout(false); + this.pnlpinkcolours.ResumeLayout(false); + this.pnlpinkcolours.PerformLayout(); + this.pnlpinkoptions.ResumeLayout(false); + this.pnlpinkoptions.PerformLayout(); + this.pnlredcolours.ResumeLayout(false); + this.pnlredcolours.PerformLayout(); + this.pnlredoptions.ResumeLayout(false); + this.pnlredoptions.PerformLayout(); + this.pnlbrowncolours.ResumeLayout(false); + this.pnlbrowncolours.PerformLayout(); + this.pnlbrownoptions.ResumeLayout(false); + this.pnlbrownoptions.PerformLayout(); + this.pnlorangecolours.ResumeLayout(false); + this.pnlorangecolours.PerformLayout(); + this.pnlorangeoptions.ResumeLayout(false); + this.pnlorangeoptions.PerformLayout(); + this.pnlyellowcolours.ResumeLayout(false); + this.pnlyellowcolours.PerformLayout(); + this.pnlyellowoptions.ResumeLayout(false); + this.pnlyellowoptions.PerformLayout(); + this.pnlgreencolours.ResumeLayout(false); + this.pnlgreencolours.PerformLayout(); + this.pnlgreenoptions.ResumeLayout(false); + this.pnlgreenoptions.PerformLayout(); + this.pnlbluecolours.ResumeLayout(false); + this.pnlbluecolours.PerformLayout(); + this.pnlblueoptions.ResumeLayout(false); + this.pnlblueoptions.PerformLayout(); + this.pnlpurplecolours.ResumeLayout(false); + this.pnlpurplecolours.PerformLayout(); + this.pnlpurpleoptions.ResumeLayout(false); + this.pnlpurpleoptions.PerformLayout(); + this.pnlgraycolours.ResumeLayout(false); + this.pnlgraycolours.PerformLayout(); + this.pnlanycolours.ResumeLayout(false); + this.pnlanycolours.PerformLayout(); + this.pnlanyoptions.ResumeLayout(false); + this.pnlanyoptions.PerformLayout(); + this.Panel1.ResumeLayout(false); + this.Panel1.PerformLayout(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Panel pnlanycolours; + internal System.Windows.Forms.Panel pnlany16; + internal System.Windows.Forms.Panel pnlany12; + internal System.Windows.Forms.Panel pnlany14; + internal System.Windows.Forms.Panel pnlany10; + internal System.Windows.Forms.Panel pnlany4; + internal System.Windows.Forms.Panel pnlany6; + internal System.Windows.Forms.Panel pnlany15; + internal System.Windows.Forms.Panel pnlany2; + internal System.Windows.Forms.Panel pnlany13; + internal System.Windows.Forms.Panel pnlany11; + internal System.Windows.Forms.Panel pnlany7; + internal System.Windows.Forms.Panel pnlany9; + internal System.Windows.Forms.Panel pnlany5; + internal System.Windows.Forms.Panel pnlany3; + internal System.Windows.Forms.Panel pnlany1; + internal System.Windows.Forms.Label lblanylevel; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Panel Panel1; + internal System.Windows.Forms.Panel pnlnewcolour; + internal System.Windows.Forms.Panel pnloldcolour; + internal System.Windows.Forms.Label lblobjecttocolour; + internal System.Windows.Forms.Label Label17; + internal System.Windows.Forms.Label lbloldcolourrgb; + internal System.Windows.Forms.Label lbloldcolourname; + internal System.Windows.Forms.Label Label14; + internal System.Windows.Forms.Panel pnlpinkcolours; + internal System.Windows.Forms.Panel pnlpink16; + internal System.Windows.Forms.Panel pnlpink12; + internal System.Windows.Forms.Panel pnlpink14; + internal System.Windows.Forms.Panel pnlpink10; + internal System.Windows.Forms.Panel pnlpink8; + internal System.Windows.Forms.Panel pnlpink4; + internal System.Windows.Forms.Panel pnlpink6; + internal System.Windows.Forms.Panel pnlpink15; + internal System.Windows.Forms.Panel pnlpink2; + internal System.Windows.Forms.Panel pnlpink13; + internal System.Windows.Forms.Panel pnlpink11; + internal System.Windows.Forms.Panel pnlpink7; + internal System.Windows.Forms.Panel pnlpink9; + internal System.Windows.Forms.Panel pnlpink5; + internal System.Windows.Forms.Panel pnlpink3; + internal System.Windows.Forms.Panel pnlpink1; + internal System.Windows.Forms.Label lblpinklevel; + internal System.Windows.Forms.Label Label23; + internal System.Windows.Forms.Panel pnlredcolours; + internal System.Windows.Forms.Panel pnlred16; + internal System.Windows.Forms.Panel pnlred12; + internal System.Windows.Forms.Panel pnlred14; + internal System.Windows.Forms.Panel pnlred10; + internal System.Windows.Forms.Panel pnlred8; + internal System.Windows.Forms.Panel pnlred4; + internal System.Windows.Forms.Panel pnlred6; + internal System.Windows.Forms.Panel pnlred15; + internal System.Windows.Forms.Panel pnlred2; + internal System.Windows.Forms.Panel pnlred13; + internal System.Windows.Forms.Panel pnlred11; + internal System.Windows.Forms.Panel pnlred7; + internal System.Windows.Forms.Panel pnlred9; + internal System.Windows.Forms.Panel pnlred5; + internal System.Windows.Forms.Panel pnlred3; + internal System.Windows.Forms.Panel pnlred1; + internal System.Windows.Forms.Label lblredlevel; + internal System.Windows.Forms.Label Label21; + internal System.Windows.Forms.Panel pnlbrowncolours; + internal System.Windows.Forms.Panel pnlbrown16; + internal System.Windows.Forms.Panel pnlbrown12; + internal System.Windows.Forms.Panel pnlbrown14; + internal System.Windows.Forms.Panel pnlbrown10; + internal System.Windows.Forms.Panel pnlbrown8; + internal System.Windows.Forms.Panel pnlbrown4; + internal System.Windows.Forms.Panel pnlbrown6; + internal System.Windows.Forms.Panel pnlbrown15; + internal System.Windows.Forms.Panel pnlbrown2; + internal System.Windows.Forms.Panel pnlbrown13; + internal System.Windows.Forms.Panel pnlbrown11; + internal System.Windows.Forms.Panel pnlbrown7; + internal System.Windows.Forms.Panel pnlbrown9; + internal System.Windows.Forms.Panel pnlbrown5; + internal System.Windows.Forms.Panel pnlbrown3; + internal System.Windows.Forms.Panel pnlbrown1; + internal System.Windows.Forms.Label lblbrownlevel; + internal System.Windows.Forms.Label Label19; + internal System.Windows.Forms.Panel pnlorangecolours; + internal System.Windows.Forms.Panel pnlorange16; + internal System.Windows.Forms.Panel pnlorange12; + internal System.Windows.Forms.Panel pnlorange14; + internal System.Windows.Forms.Panel pnlorange10; + internal System.Windows.Forms.Panel pnlorange8; + internal System.Windows.Forms.Panel pnlorange4; + internal System.Windows.Forms.Panel pnlorange6; + internal System.Windows.Forms.Panel pnlorange15; + internal System.Windows.Forms.Panel pnlorange2; + internal System.Windows.Forms.Panel pnlorange13; + internal System.Windows.Forms.Panel pnlorange11; + internal System.Windows.Forms.Panel pnlorange7; + internal System.Windows.Forms.Panel pnlorange9; + internal System.Windows.Forms.Panel pnlorange5; + internal System.Windows.Forms.Panel pnlorange3; + internal System.Windows.Forms.Panel pnlorange1; + internal System.Windows.Forms.Label lblorangelevel; + internal System.Windows.Forms.Label Label13; + internal System.Windows.Forms.Panel pnlyellowcolours; + internal System.Windows.Forms.Panel pnlyellow16; + internal System.Windows.Forms.Panel pnlyellow12; + internal System.Windows.Forms.Panel pnlyellow14; + internal System.Windows.Forms.Panel pnlyellow10; + internal System.Windows.Forms.Panel pnlyellow8; + internal System.Windows.Forms.Panel pnlyellow4; + internal System.Windows.Forms.Panel pnlyellow6; + internal System.Windows.Forms.Panel pnlyellow15; + internal System.Windows.Forms.Panel pnlyellow2; + internal System.Windows.Forms.Panel pnlyellow13; + internal System.Windows.Forms.Panel pnlyellow11; + internal System.Windows.Forms.Panel pnlyellow7; + internal System.Windows.Forms.Panel pnlyellow9; + internal System.Windows.Forms.Panel pnlyellow5; + internal System.Windows.Forms.Panel pnlyellow3; + internal System.Windows.Forms.Panel pnlyellow1; + internal System.Windows.Forms.Label lblyellowlevel; + internal System.Windows.Forms.Label Label11; + internal System.Windows.Forms.Panel pnlgreencolours; + internal System.Windows.Forms.Panel pnlgreen16; + internal System.Windows.Forms.Panel pnlgreen12; + internal System.Windows.Forms.Panel pnlgreen14; + internal System.Windows.Forms.Panel pnlgreen10; + internal System.Windows.Forms.Panel pnlgreen8; + internal System.Windows.Forms.Panel pnlgreen4; + internal System.Windows.Forms.Panel pnlgreen6; + internal System.Windows.Forms.Panel pnlgreen15; + internal System.Windows.Forms.Panel pnlgreen2; + internal System.Windows.Forms.Panel pnlgreen13; + internal System.Windows.Forms.Panel pnlgreen11; + internal System.Windows.Forms.Panel pnlgreen7; + internal System.Windows.Forms.Panel pnlgreen9; + internal System.Windows.Forms.Panel pnlgreen5; + internal System.Windows.Forms.Panel pnlgreen3; + internal System.Windows.Forms.Panel pnlgreen1; + internal System.Windows.Forms.Label lblgreenlevel; + internal System.Windows.Forms.Label Label9; + internal System.Windows.Forms.Panel pnlbluecolours; + internal System.Windows.Forms.Panel pnlblue16; + internal System.Windows.Forms.Panel pnlblue12; + internal System.Windows.Forms.Panel pnlblue14; + internal System.Windows.Forms.Panel pnlblue10; + internal System.Windows.Forms.Panel pnlblue8; + internal System.Windows.Forms.Panel pnlblue4; + internal System.Windows.Forms.Panel pnlblue6; + internal System.Windows.Forms.Panel pnlblue15; + internal System.Windows.Forms.Panel pnlblue2; + internal System.Windows.Forms.Panel pnlblue13; + internal System.Windows.Forms.Panel pnlblue11; + internal System.Windows.Forms.Panel pnlblue7; + internal System.Windows.Forms.Panel pnlblue9; + internal System.Windows.Forms.Panel pnlblue5; + internal System.Windows.Forms.Panel pnlblue3; + internal System.Windows.Forms.Panel pnlblue1; + internal System.Windows.Forms.Label lblbluelevel; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.Panel pnlpurplecolours; + internal System.Windows.Forms.Panel pnlpurple16; + internal System.Windows.Forms.Panel pnlpurple12; + internal System.Windows.Forms.Panel pnlpurple14; + internal System.Windows.Forms.Panel pnlpurple10; + internal System.Windows.Forms.Panel pnlpurple8; + internal System.Windows.Forms.Panel pnlpurple4; + internal System.Windows.Forms.Panel pnlpurple6; + internal System.Windows.Forms.Panel pnlpurple15; + internal System.Windows.Forms.Panel pnlpurple2; + internal System.Windows.Forms.Panel pnlpurple13; + internal System.Windows.Forms.Panel pnlpurple11; + internal System.Windows.Forms.Panel pnlpurple7; + internal System.Windows.Forms.Panel pnlpurple9; + internal System.Windows.Forms.Panel pnlpurple5; + internal System.Windows.Forms.Panel pnlpurple3; + internal System.Windows.Forms.Panel pnlpurple1; + internal System.Windows.Forms.Label lblpurplelevel; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Panel pnlgraycolours; + internal System.Windows.Forms.Panel pnlgray16; + internal System.Windows.Forms.Panel pnlgray12; + internal System.Windows.Forms.Panel pnlgray14; + internal System.Windows.Forms.Panel pnlgray10; + internal System.Windows.Forms.Panel pnlgray8; + internal System.Windows.Forms.Panel pnlgray4; + internal System.Windows.Forms.Panel pnlgray6; + internal System.Windows.Forms.Panel pnlgray15; + internal System.Windows.Forms.Panel pnlgray2; + internal System.Windows.Forms.Panel pnlgray13; + internal System.Windows.Forms.Panel pnlgray11; + internal System.Windows.Forms.Panel pnlgray7; + internal System.Windows.Forms.Panel pnlgray9; + internal System.Windows.Forms.Panel pnlgray5; + internal System.Windows.Forms.Panel pnlgray3; + internal System.Windows.Forms.Panel pnlgray1; + internal System.Windows.Forms.Label lblgraylevel; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Panel pnlpinkcustomcolour; + internal System.Windows.Forms.Panel pnlredcustomcolour; + internal System.Windows.Forms.Panel pnlbrowncustomcolour; + internal System.Windows.Forms.Panel pnlorangecustomcolour; + internal System.Windows.Forms.Panel pnlyellowcustomcolour; + internal System.Windows.Forms.Panel pnlgreencustomcolour; + internal System.Windows.Forms.Panel pnlbluecustomcolour; + internal System.Windows.Forms.Panel pnlpurplecustomcolour; + internal System.Windows.Forms.Panel pnlgraycustomcolour; + internal System.Windows.Forms.Panel pnlanycustomcolour; + internal System.Windows.Forms.Panel pnlany8; + internal System.Windows.Forms.Label lblnewcolourrgb; + internal System.Windows.Forms.Label lblnewcolourname; + internal System.Windows.Forms.Label Label26; + internal System.Windows.Forms.Label lblcustomshadetut; + internal System.Windows.Forms.TextBox txtcustomgrayshade; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.TextBox txtbluesred; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.TextBox txtbluesgreen; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.TextBox txtbluesblue; + internal System.Windows.Forms.Panel pnlblueoptions; + internal System.Windows.Forms.Panel pnlyellowoptions; + internal System.Windows.Forms.Label Label20; + internal System.Windows.Forms.TextBox txtyellowsblue; + internal System.Windows.Forms.TextBox txtyellowsred; + internal System.Windows.Forms.Label Label22; + internal System.Windows.Forms.Label Label24; + internal System.Windows.Forms.TextBox txtyellowsgreen; + internal System.Windows.Forms.Panel pnlgreenoptions; + internal System.Windows.Forms.Label Label15; + internal System.Windows.Forms.TextBox txtgreensred; + internal System.Windows.Forms.TextBox txtgreensgreen; + internal System.Windows.Forms.Label Label16; + internal System.Windows.Forms.Label Label18; + internal System.Windows.Forms.TextBox txtgreensblue; + internal System.Windows.Forms.Panel pnlpurpleoptions; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.TextBox txtpurplesgreen; + internal System.Windows.Forms.TextBox txtpurplesblue; + internal System.Windows.Forms.Label Label10; + internal System.Windows.Forms.Label Label12; + internal System.Windows.Forms.TextBox txtpurplesred; + internal System.Windows.Forms.Panel pnlpinkoptions; + internal System.Windows.Forms.Label Label35; + internal System.Windows.Forms.TextBox txtpinksgreen; + internal System.Windows.Forms.TextBox txtpinksred; + internal System.Windows.Forms.Label Label36; + internal System.Windows.Forms.Label Label37; + internal System.Windows.Forms.TextBox txtpinksblue; + internal System.Windows.Forms.Panel pnlredoptions; + internal System.Windows.Forms.Label Label32; + internal System.Windows.Forms.TextBox txtredsblue; + internal System.Windows.Forms.TextBox txtredsred; + internal System.Windows.Forms.Label Label33; + internal System.Windows.Forms.Label Label34; + internal System.Windows.Forms.TextBox txtredsgreen; + internal System.Windows.Forms.Panel pnlbrownoptions; + internal System.Windows.Forms.Label Label29; + internal System.Windows.Forms.TextBox txtbrownsblue; + internal System.Windows.Forms.TextBox txtbrownsred; + internal System.Windows.Forms.Label Label30; + internal System.Windows.Forms.Label Label31; + internal System.Windows.Forms.TextBox txtbrownsgreen; + internal System.Windows.Forms.Panel pnlorangeoptions; + internal System.Windows.Forms.Label Label25; + internal System.Windows.Forms.TextBox txtorangesblue; + internal System.Windows.Forms.TextBox txtorangesred; + internal System.Windows.Forms.Label Label27; + internal System.Windows.Forms.Label Label28; + internal System.Windows.Forms.TextBox txtorangesgreen; + internal System.Windows.Forms.Panel pnlanyoptions; + internal System.Windows.Forms.Label Label38; + internal System.Windows.Forms.TextBox txtanysgreen; + internal System.Windows.Forms.TextBox txtanysred; + internal System.Windows.Forms.Label Label39; + internal System.Windows.Forms.Label Label40; + internal System.Windows.Forms.TextBox txtanysblue; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Dialogs/Color_Picker.cs b/source/WindowsFormsApplication1/Dialogs/Color_Picker.cs new file mode 100644 index 0000000..ea33415 --- /dev/null +++ b/source/WindowsFormsApplication1/Dialogs/Color_Picker.cs @@ -0,0 +1,2438 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Color_Picker : Form + { + public Color_Picker(string ctc, Color oldcol) + { + InitializeComponent(); + oldcolour = oldcol; + colourtochange = ctc; + } + + public Color NewColor = Color.Black; + + public void Color_Picker_Load(object sender, EventArgs e) + { + getoldcolour(); + determinelevels(); + shrinktosizebasedoncoloursbought(); + setupboughtcolours(); + loadmemory(); + + foreach (Control ctrl in pnlanycolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionany); + } + foreach (Control ctrl in pnlgraycolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctiongray); + } + + foreach (Control ctrl in pnlredcolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionred); + } + + foreach (Control ctrl in pnlgreencolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctiongreen); + } + + foreach (Control ctrl in pnlbluecolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionblue); + } + + foreach (Control ctrl in pnlorangecolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionorange); + } + + foreach (Control ctrl in pnlyellowcolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionyellow); + } + + foreach (Control ctrl in pnlbrowncolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionbrown); + } + + foreach (Control ctrl in pnlpurplecolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionpurple); + } + + foreach (Control ctrl in pnlpinkcolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionpink); + } + + pnloldcolour.Click += new EventHandler(pnloldcolour_Click); + pnlnewcolour.Click += new EventHandler(pnlnewcolour_Click); + } + + public int anylevel = 0; + public int graylevel = 0; + public int greenlevel = 0; + public int redlevel = 0; + public int bluelevel = 0; + public int yellowlevel = 0; + public int orangelevel = 0; + public int brownlevel = 0; + public int purplelevel = 0; + public int pinklevel = 0; + + + + public void loadmemory() + { + ///NYI + + + + + + + } + + public void saveanymemory() + { + API.anymemory[0] = pnlany1.BackColor; + API.anymemory[1] = pnlany2.BackColor; + API.anymemory[2] = pnlany3.BackColor; + API.anymemory[3] = pnlany4.BackColor; + API.anymemory[4] = pnlany5.BackColor; + API.anymemory[5] = pnlany6.BackColor; + API.anymemory[6] = pnlany7.BackColor; + API.anymemory[7] = pnlany8.BackColor; + API.anymemory[8] = pnlany9.BackColor; + API.anymemory[9] = pnlany10.BackColor; + API.anymemory[10] = pnlany11.BackColor; + API.anymemory[11] = pnlany12.BackColor; + API.anymemory[12] = pnlany13.BackColor; + API.anymemory[13] = pnlany14.BackColor; + API.anymemory[14] = pnlany15.BackColor; + API.anymemory[15] = pnlany16.BackColor; + } + + public void savegraymemory() + { + API.graymemory[0] = pnlgray1.BackColor; + API.graymemory[1] = pnlgray2.BackColor; + API.graymemory[2] = pnlgray3.BackColor; + API.graymemory[3] = pnlgray4.BackColor; + API.graymemory[4] = pnlgray5.BackColor; + API.graymemory[5] = pnlgray6.BackColor; + API.graymemory[6] = pnlgray7.BackColor; + API.graymemory[7] = pnlgray8.BackColor; + API.graymemory[8] = pnlgray9.BackColor; + API.graymemory[9] = pnlgray10.BackColor; + API.graymemory[10] = pnlgray11.BackColor; + API.graymemory[11] = pnlgray12.BackColor; + API.graymemory[12] = pnlgray13.BackColor; + API.graymemory[13] = pnlgray14.BackColor; + API.graymemory[14] = pnlgray15.BackColor; + API.graymemory[15] = pnlgray16.BackColor; + } + + public void savepurplememory() + { + API.purplememory[0] = pnlpurple1.BackColor; + API.purplememory[1] = pnlpurple2.BackColor; + API.purplememory[2] = pnlpurple3.BackColor; + API.purplememory[3] = pnlpurple4.BackColor; + API.purplememory[4] = pnlpurple5.BackColor; + API.purplememory[5] = pnlpurple6.BackColor; + API.purplememory[6] = pnlpurple7.BackColor; + API.purplememory[7] = pnlpurple8.BackColor; + API.purplememory[8] = pnlpurple9.BackColor; + API.purplememory[9] = pnlpurple10.BackColor; + API.purplememory[10] = pnlpurple11.BackColor; + API.purplememory[11] = pnlpurple12.BackColor; + API.purplememory[12] = pnlpurple13.BackColor; + API.purplememory[13] = pnlpurple14.BackColor; + API.purplememory[14] = pnlpurple15.BackColor; + API.purplememory[15] = pnlpurple16.BackColor; + } + + public void savebluememory() + { + API.bluememory[0] = pnlblue1.BackColor; + API.bluememory[1] = pnlblue2.BackColor; + API.bluememory[2] = pnlblue3.BackColor; + API.bluememory[3] = pnlblue4.BackColor; + API.bluememory[4] = pnlblue5.BackColor; + API.bluememory[5] = pnlblue6.BackColor; + API.bluememory[6] = pnlblue7.BackColor; + API.bluememory[7] = pnlblue8.BackColor; + API.bluememory[8] = pnlblue9.BackColor; + API.bluememory[9] = pnlblue10.BackColor; + API.bluememory[10] = pnlblue11.BackColor; + API.bluememory[11] = pnlblue12.BackColor; + API.bluememory[12] = pnlblue13.BackColor; + API.bluememory[13] = pnlblue14.BackColor; + API.bluememory[14] = pnlblue15.BackColor; + API.bluememory[15] = pnlblue16.BackColor; + } + + public void savegreenmemory() + { + API.greenmemory[0] = pnlgreen1.BackColor; + API.greenmemory[1] = pnlgreen2.BackColor; + API.greenmemory[2] = pnlgreen3.BackColor; + API.greenmemory[3] = pnlgreen4.BackColor; + API.greenmemory[4] = pnlgreen5.BackColor; + API.greenmemory[5] = pnlgreen6.BackColor; + API.greenmemory[6] = pnlgreen7.BackColor; + API.greenmemory[7] = pnlgreen8.BackColor; + API.greenmemory[8] = pnlgreen9.BackColor; + API.greenmemory[9] = pnlgreen10.BackColor; + API.greenmemory[10] = pnlgreen11.BackColor; + API.greenmemory[11] = pnlgreen12.BackColor; + API.greenmemory[12] = pnlgreen13.BackColor; + API.greenmemory[13] = pnlgreen14.BackColor; + API.greenmemory[14] = pnlgreen15.BackColor; + API.greenmemory[15] = pnlgreen16.BackColor; + } + + public void saveyellowmemory() + { + API.yellowmemory[0] = pnlyellow1.BackColor; + API.yellowmemory[1] = pnlyellow2.BackColor; + API.yellowmemory[2] = pnlyellow3.BackColor; + API.yellowmemory[3] = pnlyellow4.BackColor; + API.yellowmemory[4] = pnlyellow5.BackColor; + API.yellowmemory[5] = pnlyellow6.BackColor; + API.yellowmemory[6] = pnlyellow7.BackColor; + API.yellowmemory[7] = pnlyellow8.BackColor; + API.yellowmemory[8] = pnlyellow9.BackColor; + API.yellowmemory[9] = pnlyellow10.BackColor; + API.yellowmemory[10] = pnlyellow11.BackColor; + API.yellowmemory[11] = pnlyellow12.BackColor; + API.yellowmemory[12] = pnlyellow13.BackColor; + API.yellowmemory[13] = pnlyellow14.BackColor; + API.yellowmemory[14] = pnlyellow15.BackColor; + API.yellowmemory[15] = pnlyellow16.BackColor; + } + + public void saveorangememory() + { + API.orangememory[0] = pnlorange1.BackColor; + API.orangememory[1] = pnlorange2.BackColor; + API.orangememory[2] = pnlorange3.BackColor; + API.orangememory[3] = pnlorange4.BackColor; + API.orangememory[4] = pnlorange5.BackColor; + API.orangememory[5] = pnlorange6.BackColor; + API.orangememory[6] = pnlorange7.BackColor; + API.orangememory[7] = pnlorange8.BackColor; + API.orangememory[8] = pnlorange9.BackColor; + API.orangememory[9] = pnlorange10.BackColor; + API.orangememory[10] = pnlorange11.BackColor; + API.orangememory[11] = pnlorange12.BackColor; + API.orangememory[12] = pnlorange13.BackColor; + API.orangememory[13] = pnlorange14.BackColor; + API.orangememory[14] = pnlorange15.BackColor; + API.orangememory[15] = pnlorange16.BackColor; + } + + public void savebrownmemory() + { + API.brownmemory[0] = pnlbrown1.BackColor; + API.brownmemory[1] = pnlbrown2.BackColor; + API.brownmemory[2] = pnlbrown3.BackColor; + API.brownmemory[3] = pnlbrown4.BackColor; + API.brownmemory[4] = pnlbrown5.BackColor; + API.brownmemory[5] = pnlbrown6.BackColor; + API.brownmemory[6] = pnlbrown7.BackColor; + API.brownmemory[7] = pnlbrown8.BackColor; + API.brownmemory[8] = pnlbrown9.BackColor; + API.brownmemory[9] = pnlbrown10.BackColor; + API.brownmemory[10] = pnlbrown11.BackColor; + API.brownmemory[11] = pnlbrown12.BackColor; + API.brownmemory[12] = pnlbrown13.BackColor; + API.brownmemory[13] = pnlbrown14.BackColor; + API.brownmemory[14] = pnlbrown15.BackColor; + API.brownmemory[15] = pnlbrown16.BackColor; + } + + public void saveredmemory() + { + API.redmemory[0] = pnlred1.BackColor; + API.redmemory[1] = pnlred2.BackColor; + API.redmemory[2] = pnlred3.BackColor; + API.redmemory[3] = pnlred4.BackColor; + API.redmemory[4] = pnlred5.BackColor; + API.redmemory[5] = pnlred6.BackColor; + API.redmemory[6] = pnlred7.BackColor; + API.redmemory[7] = pnlred8.BackColor; + API.redmemory[8] = pnlred9.BackColor; + API.redmemory[9] = pnlred10.BackColor; + API.redmemory[10] = pnlred11.BackColor; + API.redmemory[11] = pnlred12.BackColor; + API.redmemory[12] = pnlred13.BackColor; + API.redmemory[13] = pnlred14.BackColor; + API.redmemory[14] = pnlred15.BackColor; + API.redmemory[15] = pnlred16.BackColor; + } + + public void savepinkmemory() + { + API.pinkmemory[0] = pnlpink1.BackColor; + API.pinkmemory[1] = pnlpink2.BackColor; + API.pinkmemory[2] = pnlpink3.BackColor; + API.pinkmemory[3] = pnlpink4.BackColor; + API.pinkmemory[4] = pnlpink5.BackColor; + API.pinkmemory[5] = pnlpink6.BackColor; + API.pinkmemory[6] = pnlpink7.BackColor; + API.pinkmemory[7] = pnlpink8.BackColor; + API.pinkmemory[8] = pnlpink9.BackColor; + API.pinkmemory[9] = pnlpink10.BackColor; + API.pinkmemory[10] = pnlpink11.BackColor; + API.pinkmemory[11] = pnlpink12.BackColor; + API.pinkmemory[12] = pnlpink13.BackColor; + API.pinkmemory[13] = pnlpink14.BackColor; + API.pinkmemory[14] = pnlpink15.BackColor; + API.pinkmemory[15] = pnlpink16.BackColor; + } + + public string colourtochange = ""; + public Color oldcolour = Color.White; + + private void getoldcolour() + { + lblobjecttocolour.Text = colourtochange; + pnloldcolour.BackColor = oldcolour; + if (pnloldcolour.BackColor.IsNamedColor) + { + lbloldcolourname.Text = pnloldcolour.BackColor.Name + " :Name"; + } + else { + lbloldcolourname.Text = "Custom :Name"; + } + lbloldcolourrgb.Text = pnloldcolour.BackColor.R + ", " + pnloldcolour.BackColor.G + ", " + pnloldcolour.BackColor.B + " :RGB"; + + pnlnewcolour.BackColor = API.lastcolourpick; + if (pnlnewcolour.BackColor.IsNamedColor) + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + + private void determinelevels() + { + if (API.Upgrades["gray"] == true) + graylevel = 1; + if (API.Upgrades["grayshades"] == true) + graylevel = 2; + if (API.Upgrades["fullgrayshadeset"] == true) + graylevel = 3; + if (API.Upgrades["customgrayshades"] == true) + graylevel = 4; + if (API.Upgrades["basiccustomshade"] == true) + anylevel = 1; + if (API.Upgrades["generalcustomshades"] == true) + anylevel = 2; + if (API.Upgrades["advancedcustomshades"] == true) + anylevel = 3; + if (API.Upgrades["limitlesscustomshades"] == true) + anylevel = 4; + if (API.Upgrades["purple"] == true) + purplelevel = 1; + if (API.Upgrades["purpleshades"] == true) + purplelevel = 2; + if (API.Upgrades["fullpurpleshadeset"] == true) + purplelevel = 3; + if (API.Upgrades["custompurpleshades"] == true) + purplelevel = 4; + if (API.Upgrades["blue"] == true) + bluelevel = 1; + if (API.Upgrades["blueshades"] == true) + bluelevel = 2; + if (API.Upgrades["fullblueshadeset"] == true) + bluelevel = 3; + if (API.Upgrades["customblueshades"] == true) + bluelevel = 4; + if (API.Upgrades["green"] == true) + greenlevel = 1; + if (API.Upgrades["greenshades"] == true) + greenlevel = 2; + if (API.Upgrades["fullgreenshadeset"] == true) + greenlevel = 3; + if (API.Upgrades["customgreenshades"] == true) + greenlevel = 4; + if (API.Upgrades["yellow"] == true) + yellowlevel = 1; + if (API.Upgrades["yellowshades"] == true) + yellowlevel = 2; + if (API.Upgrades["fullyellowshadeset"] == true) + yellowlevel = 3; + if (API.Upgrades["customyellowshades"] == true) + yellowlevel = 4; + if (API.Upgrades["orange"] == true) + orangelevel = 1; + if (API.Upgrades["orangeshades"] == true) + orangelevel = 2; + if (API.Upgrades["fullorangeshadeset"] == true) + orangelevel = 3; + if (API.Upgrades["customorangeshades"] == true) + orangelevel = 4; + if (API.Upgrades["brown"] == true) + brownlevel = 1; + if (API.Upgrades["brownshades"] == true) + brownlevel = 2; + if (API.Upgrades["fullbrownshadeset"] == true) + brownlevel = 3; + if (API.Upgrades["custombrownshades"] == true) + brownlevel = 4; + if (API.Upgrades["red"] == true) + redlevel = 1; + if (API.Upgrades["redshades"] == true) + redlevel = 2; + if (API.Upgrades["fullredshadeset"] == true) + redlevel = 3; + if (API.Upgrades["customredshades"] == true) + redlevel = 4; + if (API.Upgrades["pink"] == true) + pinklevel = 1; + if (API.Upgrades["pinkshades"] == true) + pinklevel = 2; + if (API.Upgrades["fullpinkshadeset"] == true) + pinklevel = 3; + if (API.Upgrades["custompinkshades"] == true) + pinklevel = 4; + } + + private void shrinktosizebasedoncoloursbought() + { + if (API.Upgrades["pink"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlpinkcolours.Show(); + } + if (API.Upgrades["red"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlredcolours.Show(); + } + if (API.Upgrades["brown"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlbrowncolours.Show(); + } + if (API.Upgrades["orange"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlorangecolours.Show(); + } + if (API.Upgrades["yellow"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlyellowcolours.Show(); + } + if (API.Upgrades["green"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlgreencolours.Show(); + } + if (API.Upgrades["blue"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlbluecolours.Show(); + } + if (API.Upgrades["purple"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlpurplecolours.Show(); + } + if (API.Upgrades["gray"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlgraycolours.Show(); + } + if (API.Upgrades["basiccustomshade"] == false) + { + this.Height = this.Height - 46; + } + else { + pnlanycolours.Show(); + } + } + + private void setupboughtcolours() + { + switch (graylevel) + { + case 1: + lblgraylevel.Text = "Level 1"; + pnlgray1.BackColor = Color.Black; + pnlgray1.Show(); + pnlgray2.BackColor = Color.Gray; + pnlgray2.Show(); + pnlgray3.BackColor = Color.White; + pnlgray3.Show(); + break; + case 2: + lblgraylevel.Text = "Level 2"; + pnlgray1.BackColor = Color.Black; + pnlgray1.Show(); + pnlgray2.BackColor = Color.DimGray; + pnlgray2.Show(); + pnlgray3.BackColor = Color.Gray; + pnlgray3.Show(); + pnlgray4.BackColor = Color.LightGray; + pnlgray4.Show(); + pnlgray5.BackColor = Color.White; + pnlgray5.Show(); + break; + case 3: + lblgraylevel.Text = "Level 3"; + pnlgray1.BackColor = Color.Black; + pnlgray1.Show(); + pnlgray2.BackColor = Color.DimGray; + pnlgray2.Show(); + pnlgray3.BackColor = Color.Gray; + pnlgray3.Show(); + pnlgray4.BackColor = Color.DarkGray; + pnlgray4.Show(); + pnlgray5.BackColor = Color.Silver; + pnlgray5.Show(); + pnlgray6.BackColor = Color.LightGray; + pnlgray6.Show(); + pnlgray7.BackColor = Color.Gainsboro; + pnlgray7.Show(); + pnlgray8.BackColor = Color.WhiteSmoke; + pnlgray8.Show(); + pnlgray9.BackColor = Color.White; + pnlgray9.Show(); + break; + case 4: + lblgraylevel.Text = "Level 4"; + pnlgray1.BackColor = Color.Black; + pnlgray1.Show(); + pnlgray2.BackColor = Color.DimGray; + pnlgray2.Show(); + pnlgray3.BackColor = Color.Gray; + pnlgray3.Show(); + pnlgray4.BackColor = Color.DarkGray; + pnlgray4.Show(); + pnlgray5.BackColor = Color.Silver; + pnlgray5.Show(); + pnlgray6.BackColor = Color.LightGray; + pnlgray6.Show(); + pnlgray7.BackColor = Color.Gainsboro; + pnlgray7.Show(); + pnlgray8.BackColor = Color.WhiteSmoke; + pnlgray8.Show(); + pnlgray9.BackColor = Color.White; + pnlgray9.Show(); + pnlgray10.BackColor = Color.White; + pnlgray10.Show(); + pnlgray11.BackColor = Color.White; + pnlgray11.Show(); + pnlgray12.BackColor = Color.White; + pnlgray12.Show(); + pnlgray13.BackColor = Color.White; + pnlgray13.Show(); + pnlgray14.BackColor = Color.White; + pnlgray14.Show(); + pnlgray15.BackColor = Color.White; + pnlgray15.Show(); + pnlgray16.BackColor = Color.White; + pnlgray16.Show(); + pnlgraycustomcolour.Show(); + lblcustomshadetut.Show(); + txtcustomgrayshade.Show(); + break; + } + + switch (purplelevel) + { + case 1: + lblpurplelevel.Text = "Level 1"; + pnlpurple1.BackColor = Color.Purple; + pnlpurple1.Show(); + break; + case 2: + lblpurplelevel.Text = "Level 2"; + pnlpurple1.BackColor = Color.Indigo; + pnlpurple1.Show(); + pnlpurple2.BackColor = Color.Purple; + pnlpurple2.Show(); + pnlpurple3.BackColor = Color.MediumPurple; + pnlpurple3.Show(); + break; + case 3: + lblpurplelevel.Text = "Level 3"; + pnlpurple1.BackColor = Color.Indigo; + pnlpurple1.Show(); + pnlpurple2.BackColor = Color.DarkSlateBlue; + pnlpurple2.Show(); + pnlpurple3.BackColor = Color.Purple; + pnlpurple3.Show(); + pnlpurple4.BackColor = Color.DarkOrchid; + pnlpurple4.Show(); + pnlpurple5.BackColor = Color.DarkViolet; + pnlpurple5.Show(); + pnlpurple6.BackColor = Color.BlueViolet; + pnlpurple6.Show(); + pnlpurple7.BackColor = Color.SlateBlue; + pnlpurple7.Show(); + pnlpurple8.BackColor = Color.MediumSlateBlue; + pnlpurple8.Show(); + pnlpurple9.BackColor = Color.MediumPurple; + pnlpurple9.Show(); + pnlpurple10.BackColor = Color.MediumOrchid; + pnlpurple10.Show(); + pnlpurple11.BackColor = Color.Magenta; + pnlpurple11.Show(); + pnlpurple12.BackColor = Color.Orchid; + pnlpurple12.Show(); + pnlpurple13.BackColor = Color.Violet; + pnlpurple13.Show(); + pnlpurple14.BackColor = Color.Plum; + pnlpurple14.Show(); + pnlpurple15.BackColor = Color.Thistle; + pnlpurple15.Show(); + pnlpurple16.BackColor = Color.Lavender; + pnlpurple16.Show(); + break; + case 4: + lblpurplelevel.Text = "Level 4"; + pnlpurple1.BackColor = Color.Indigo; + pnlpurple1.Show(); + pnlpurple2.BackColor = Color.DarkSlateBlue; + pnlpurple2.Show(); + pnlpurple3.BackColor = Color.Purple; + pnlpurple3.Show(); + pnlpurple4.BackColor = Color.DarkOrchid; + pnlpurple4.Show(); + pnlpurple5.BackColor = Color.DarkViolet; + pnlpurple5.Show(); + pnlpurple6.BackColor = Color.BlueViolet; + pnlpurple6.Show(); + pnlpurple7.BackColor = Color.SlateBlue; + pnlpurple7.Show(); + pnlpurple8.BackColor = Color.MediumSlateBlue; + pnlpurple8.Show(); + pnlpurple9.BackColor = Color.MediumPurple; + pnlpurple9.Show(); + pnlpurple10.BackColor = Color.MediumOrchid; + pnlpurple10.Show(); + pnlpurple11.BackColor = Color.Magenta; + pnlpurple11.Show(); + pnlpurple12.BackColor = Color.Orchid; + pnlpurple12.Show(); + pnlpurple13.BackColor = Color.Violet; + pnlpurple13.Show(); + pnlpurple14.BackColor = Color.Plum; + pnlpurple14.Show(); + pnlpurple15.BackColor = Color.Thistle; + pnlpurple15.Show(); + pnlpurple16.BackColor = Color.Lavender; + pnlpurple16.Show(); + pnlpurplecustomcolour.Show(); + pnlpurpleoptions.Show(); + break; + } + + switch (bluelevel) + { + case 1: + lblbluelevel.Text = "Level 1"; + pnlblue1.BackColor = Color.Blue; + pnlblue1.Show(); + break; + case 2: + lblbluelevel.Text = "Level 2"; + pnlblue1.BackColor = Color.Navy; + pnlblue1.Show(); + pnlblue2.BackColor = Color.Blue; + pnlblue2.Show(); + pnlblue3.BackColor = Color.LightBlue; + pnlblue3.Show(); + break; + case 3: + lblbluelevel.Text = "Level 3"; + pnlblue1.BackColor = Color.MidnightBlue; + pnlblue1.Show(); + pnlblue2.BackColor = Color.Navy; + pnlblue2.Show(); + pnlblue3.BackColor = Color.Blue; + pnlblue3.Show(); + pnlblue4.BackColor = Color.RoyalBlue; + pnlblue4.Show(); + pnlblue5.BackColor = Color.CornflowerBlue; + pnlblue5.Show(); + pnlblue6.BackColor = Color.DeepSkyBlue; + pnlblue6.Show(); + pnlblue7.BackColor = Color.SkyBlue; + pnlblue7.Show(); + pnlblue8.BackColor = Color.LightBlue; + pnlblue8.Show(); + pnlblue9.BackColor = Color.LightSteelBlue; + pnlblue9.Show(); + pnlblue10.BackColor = Color.Cyan; + pnlblue10.Show(); + pnlblue11.BackColor = Color.Aquamarine; + pnlblue11.Show(); + pnlblue12.BackColor = Color.DarkTurquoise; + pnlblue12.Show(); + pnlblue13.BackColor = Color.LightSeaGreen; + pnlblue13.Show(); + pnlblue14.BackColor = Color.MediumAquamarine; + pnlblue14.Show(); + pnlblue15.BackColor = Color.CadetBlue; + pnlblue15.Show(); + pnlblue16.BackColor = Color.Teal; + pnlblue16.Show(); + break; + case 4: + lblbluelevel.Text = "Level 4"; + pnlblue1.BackColor = Color.MidnightBlue; + pnlblue1.Show(); + pnlblue2.BackColor = Color.Navy; + pnlblue2.Show(); + pnlblue3.BackColor = Color.Blue; + pnlblue3.Show(); + pnlblue4.BackColor = Color.RoyalBlue; + pnlblue4.Show(); + pnlblue5.BackColor = Color.CornflowerBlue; + pnlblue5.Show(); + pnlblue6.BackColor = Color.DeepSkyBlue; + pnlblue6.Show(); + pnlblue7.BackColor = Color.SkyBlue; + pnlblue7.Show(); + pnlblue8.BackColor = Color.LightBlue; + pnlblue8.Show(); + pnlblue9.BackColor = Color.LightSteelBlue; + pnlblue9.Show(); + pnlblue10.BackColor = Color.Cyan; + pnlblue10.Show(); + pnlblue11.BackColor = Color.Aquamarine; + pnlblue11.Show(); + pnlblue12.BackColor = Color.DarkTurquoise; + pnlblue12.Show(); + pnlblue13.BackColor = Color.LightSeaGreen; + pnlblue13.Show(); + pnlblue14.BackColor = Color.MediumAquamarine; + pnlblue14.Show(); + pnlblue15.BackColor = Color.CadetBlue; + pnlblue15.Show(); + pnlblue16.BackColor = Color.Teal; + pnlblue16.Show(); + pnlbluecustomcolour.Show(); + pnlblueoptions.Show(); + break; + } + + switch (greenlevel) + { + case 1: + lblgreenlevel.Text = "Level 1"; + pnlgreen1.BackColor = Color.Green; + pnlgreen1.Show(); + break; + case 2: + lblgreenlevel.Text = "Level 2"; + pnlgreen1.BackColor = Color.DarkGreen; + pnlgreen1.Show(); + pnlgreen2.BackColor = Color.Green; + pnlgreen2.Show(); + pnlgreen3.BackColor = Color.LightGreen; + pnlgreen3.Show(); + break; + case 3: + lblgreenlevel.Text = "Level 3"; + pnlgreen1.BackColor = Color.DarkGreen; + pnlgreen1.Show(); + pnlgreen2.BackColor = Color.Green; + pnlgreen2.Show(); + pnlgreen3.BackColor = Color.SeaGreen; + pnlgreen3.Show(); + pnlgreen4.BackColor = Color.MediumSeaGreen; + pnlgreen4.Show(); + pnlgreen5.BackColor = Color.DarkSeaGreen; + pnlgreen5.Show(); + pnlgreen6.BackColor = Color.LightGreen; + pnlgreen6.Show(); + pnlgreen7.BackColor = Color.MediumSpringGreen; + pnlgreen7.Show(); + pnlgreen8.BackColor = Color.SpringGreen; + pnlgreen8.Show(); + pnlgreen9.BackColor = Color.GreenYellow; + pnlgreen9.Show(); + pnlgreen10.BackColor = Color.LawnGreen; + pnlgreen10.Show(); + pnlgreen11.BackColor = Color.Lime; + pnlgreen11.Show(); + pnlgreen12.BackColor = Color.LimeGreen; + pnlgreen12.Show(); + pnlgreen13.BackColor = Color.YellowGreen; + pnlgreen13.Show(); + pnlgreen14.BackColor = Color.OliveDrab; + pnlgreen14.Show(); + pnlgreen15.BackColor = Color.Olive; + pnlgreen15.Show(); + pnlgreen16.BackColor = Color.DarkOliveGreen; + pnlgreen16.Show(); + break; + case 4: + lblgreenlevel.Text = "Level 4"; + pnlgreen1.BackColor = Color.DarkGreen; + pnlgreen1.Show(); + pnlgreen2.BackColor = Color.Green; + pnlgreen2.Show(); + pnlgreen3.BackColor = Color.SeaGreen; + pnlgreen3.Show(); + pnlgreen4.BackColor = Color.MediumSeaGreen; + pnlgreen4.Show(); + pnlgreen5.BackColor = Color.DarkSeaGreen; + pnlgreen5.Show(); + pnlgreen6.BackColor = Color.LightGreen; + pnlgreen6.Show(); + pnlgreen7.BackColor = Color.MediumSpringGreen; + pnlgreen7.Show(); + pnlgreen8.BackColor = Color.SpringGreen; + pnlgreen8.Show(); + pnlgreen9.BackColor = Color.GreenYellow; + pnlgreen9.Show(); + pnlgreen10.BackColor = Color.LawnGreen; + pnlgreen10.Show(); + pnlgreen11.BackColor = Color.Lime; + pnlgreen11.Show(); + pnlgreen12.BackColor = Color.LimeGreen; + pnlgreen12.Show(); + pnlgreen13.BackColor = Color.YellowGreen; + pnlgreen13.Show(); + pnlgreen14.BackColor = Color.OliveDrab; + pnlgreen14.Show(); + pnlgreen15.BackColor = Color.Olive; + pnlgreen15.Show(); + pnlgreen16.BackColor = Color.DarkOliveGreen; + pnlgreen16.Show(); + pnlgreencustomcolour.Show(); + pnlgreenoptions.Show(); + break; + } + + switch (yellowlevel) + { + case 1: + lblyellowlevel.Text = "Level 1"; + pnlyellow1.BackColor = Color.Yellow; + pnlyellow1.Show(); + break; + case 2: + lblyellowlevel.Text = "Level 2"; + pnlyellow1.BackColor = Color.DarkKhaki; + pnlyellow1.Show(); + pnlyellow2.BackColor = Color.Yellow; + pnlyellow2.Show(); + pnlyellow3.BackColor = Color.PaleGoldenrod; + pnlyellow3.Show(); + break; + case 3: + lblyellowlevel.Text = "Level 3"; + pnlyellow1.BackColor = Color.DarkKhaki; + pnlyellow1.Show(); + pnlyellow2.BackColor = Color.Yellow; + pnlyellow2.Show(); + pnlyellow3.BackColor = Color.Khaki; + pnlyellow3.Show(); + pnlyellow4.BackColor = Color.PaleGoldenrod; + pnlyellow4.Show(); + pnlyellow5.BackColor = Color.PeachPuff; + pnlyellow5.Show(); + pnlyellow6.BackColor = Color.Moccasin; + pnlyellow6.Show(); + pnlyellow7.BackColor = Color.PapayaWhip; + pnlyellow7.Show(); + pnlyellow8.BackColor = Color.LightGoldenrodYellow; + pnlyellow8.Show(); + pnlyellow9.BackColor = Color.LemonChiffon; + pnlyellow9.Show(); + pnlyellow10.BackColor = Color.LightYellow; + pnlyellow10.Show(); + break; + case 4: + lblyellowlevel.Text = "Level 4"; + pnlyellow1.BackColor = Color.DarkKhaki; + pnlyellow1.Show(); + pnlyellow2.BackColor = Color.Yellow; + pnlyellow2.Show(); + pnlyellow3.BackColor = Color.Khaki; + pnlyellow3.Show(); + pnlyellow4.BackColor = Color.PaleGoldenrod; + pnlyellow4.Show(); + pnlyellow5.BackColor = Color.PeachPuff; + pnlyellow5.Show(); + pnlyellow6.BackColor = Color.Moccasin; + pnlyellow6.Show(); + pnlyellow7.BackColor = Color.PapayaWhip; + pnlyellow7.Show(); + pnlyellow8.BackColor = Color.LightGoldenrodYellow; + pnlyellow8.Show(); + pnlyellow9.BackColor = Color.LemonChiffon; + pnlyellow9.Show(); + pnlyellow10.BackColor = Color.LightYellow; + pnlyellow10.Show(); + pnlyellow11.BackColor = Color.White; + pnlyellow11.Show(); + pnlyellow12.BackColor = Color.White; + pnlyellow12.Show(); + pnlyellow13.BackColor = Color.White; + pnlyellow13.Show(); + pnlyellow14.BackColor = Color.White; + pnlyellow14.Show(); + pnlyellow15.BackColor = Color.White; + pnlyellow15.Show(); + pnlyellow16.BackColor = Color.White; + pnlyellow16.Show(); + pnlyellowcustomcolour.Show(); + pnlyellowoptions.Show(); + break; + } + + switch (orangelevel) + { + case 1: + lblorangelevel.Text = "Level 1"; + pnlorange1.BackColor = Color.DarkOrange; + pnlorange1.Show(); + break; + case 2: + lblorangelevel.Text = "Level 2"; + pnlorange1.BackColor = Color.OrangeRed; + pnlorange1.Show(); + pnlorange2.BackColor = Color.DarkOrange; + pnlorange2.Show(); + pnlorange3.BackColor = Color.Orange; + pnlorange3.Show(); + break; + case 3: + lblorangelevel.Text = "Level 3"; + pnlorange1.BackColor = Color.OrangeRed; + pnlorange1.Show(); + pnlorange2.BackColor = Color.Tomato; + pnlorange2.Show(); + pnlorange3.BackColor = Color.Coral; + pnlorange3.Show(); + pnlorange4.BackColor = Color.DarkOrange; + pnlorange4.Show(); + pnlorange5.BackColor = Color.Orange; + pnlorange5.Show(); + pnlorange6.BackColor = Color.Gold; + pnlorange6.Show(); + break; + case 4: + lblorangelevel.Text = "Level 4"; + pnlorange1.BackColor = Color.OrangeRed; + pnlorange1.Show(); + pnlorange2.BackColor = Color.Tomato; + pnlorange2.Show(); + pnlorange3.BackColor = Color.Coral; + pnlorange3.Show(); + pnlorange4.BackColor = Color.DarkOrange; + pnlorange4.Show(); + pnlorange5.BackColor = Color.Orange; + pnlorange5.Show(); + pnlorange6.BackColor = Color.Gold; + pnlorange6.Show(); + pnlorange7.BackColor = Color.White; + pnlorange7.Show(); + pnlorange8.BackColor = Color.White; + pnlorange8.Show(); + pnlorange9.BackColor = Color.White; + pnlorange9.Show(); + pnlorange10.BackColor = Color.White; + pnlorange10.Show(); + pnlorange11.BackColor = Color.White; + pnlorange11.Show(); + pnlorange12.BackColor = Color.White; + pnlorange12.Show(); + pnlorange13.BackColor = Color.White; + pnlorange13.Show(); + pnlorange14.BackColor = Color.White; + pnlorange14.Show(); + pnlorange15.BackColor = Color.White; + pnlorange15.Show(); + pnlorange16.BackColor = Color.White; + pnlorange16.Show(); + pnlorangecustomcolour.Show(); + pnlorangeoptions.Show(); + break; + } + + switch (brownlevel) + { + case 1: + lblbrownlevel.Text = "Level 1"; + pnlbrown1.BackColor = Color.Sienna; + pnlbrown1.Show(); + break; + case 2: + lblbrownlevel.Text = "Level 2"; + pnlbrown1.BackColor = Color.SaddleBrown; + pnlbrown1.Show(); + pnlbrown2.BackColor = Color.Sienna; + pnlbrown2.Show(); + pnlbrown3.BackColor = Color.BurlyWood; + pnlbrown3.Show(); + break; + case 3: + lblbrownlevel.Text = "Level 3"; + pnlbrown1.BackColor = Color.Maroon; + pnlbrown1.Show(); + pnlbrown2.BackColor = Color.Brown; + pnlbrown2.Show(); + pnlbrown3.BackColor = Color.Sienna; + pnlbrown3.Show(); + pnlbrown4.BackColor = Color.SaddleBrown; + pnlbrown4.Show(); + pnlbrown5.BackColor = Color.Chocolate; + pnlbrown5.Show(); + pnlbrown6.BackColor = Color.Peru; + pnlbrown6.Show(); + pnlbrown7.BackColor = Color.DarkGoldenrod; + pnlbrown7.Show(); + pnlbrown8.BackColor = Color.Goldenrod; + pnlbrown8.Show(); + pnlbrown9.BackColor = Color.SandyBrown; + pnlbrown9.Show(); + pnlbrown10.BackColor = Color.RosyBrown; + pnlbrown10.Show(); + pnlbrown11.BackColor = Color.Tan; + pnlbrown11.Show(); + pnlbrown12.BackColor = Color.BurlyWood; + pnlbrown12.Show(); + pnlbrown13.BackColor = Color.Wheat; + pnlbrown13.Show(); + pnlbrown14.BackColor = Color.NavajoWhite; + pnlbrown14.Show(); + pnlbrown15.BackColor = Color.Bisque; + pnlbrown15.Show(); + pnlbrown16.BackColor = Color.BlanchedAlmond; + pnlbrown16.Show(); + break; + case 4: + lblbrownlevel.Text = "Level 4"; + pnlbrown1.BackColor = Color.Maroon; + pnlbrown1.Show(); + pnlbrown2.BackColor = Color.Brown; + pnlbrown2.Show(); + pnlbrown3.BackColor = Color.Sienna; + pnlbrown3.Show(); + pnlbrown4.BackColor = Color.SaddleBrown; + pnlbrown4.Show(); + pnlbrown5.BackColor = Color.Chocolate; + pnlbrown5.Show(); + pnlbrown6.BackColor = Color.Peru; + pnlbrown6.Show(); + pnlbrown7.BackColor = Color.DarkGoldenrod; + pnlbrown7.Show(); + pnlbrown8.BackColor = Color.Goldenrod; + pnlbrown8.Show(); + pnlbrown9.BackColor = Color.SandyBrown; + pnlbrown9.Show(); + pnlbrown10.BackColor = Color.RosyBrown; + pnlbrown10.Show(); + pnlbrown11.BackColor = Color.Tan; + pnlbrown11.Show(); + pnlbrown12.BackColor = Color.BurlyWood; + pnlbrown12.Show(); + pnlbrown13.BackColor = Color.Wheat; + pnlbrown13.Show(); + pnlbrown14.BackColor = Color.NavajoWhite; + pnlbrown14.Show(); + pnlbrown15.BackColor = Color.Bisque; + pnlbrown15.Show(); + pnlbrown16.BackColor = Color.BlanchedAlmond; + pnlbrown16.Show(); + pnlbrowncustomcolour.Show(); + pnlbrownoptions.Show(); + break; + } + + switch (redlevel) + { + case 1: + lblredlevel.Text = "Level 1"; + pnlred1.BackColor = Color.Red; + pnlred1.Show(); + break; + case 2: + lblredlevel.Text = "Level 2"; + pnlred1.BackColor = Color.DarkRed; + pnlred1.Show(); + pnlred2.BackColor = Color.Red; + pnlred2.Show(); + pnlred3.BackColor = Color.Salmon; + pnlred3.Show(); + break; + case 3: + lblredlevel.Text = "Level 3"; + pnlred1.BackColor = Color.DarkRed; + pnlred1.Show(); + pnlred2.BackColor = Color.Red; + pnlred2.Show(); + pnlred3.BackColor = Color.Firebrick; + pnlred3.Show(); + pnlred4.BackColor = Color.Crimson; + pnlred4.Show(); + pnlred5.BackColor = Color.IndianRed; + pnlred5.Show(); + pnlred6.BackColor = Color.LightCoral; + pnlred6.Show(); + pnlred7.BackColor = Color.DarkSalmon; + pnlred7.Show(); + pnlred8.BackColor = Color.Salmon; + pnlred8.Show(); + pnlred9.BackColor = Color.LightSalmon; + pnlred9.Show(); + break; + case 4: + lblredlevel.Text = "Level 4"; + pnlred1.BackColor = Color.DarkRed; + pnlred1.Show(); + pnlred2.BackColor = Color.Red; + pnlred2.Show(); + pnlred3.BackColor = Color.Firebrick; + pnlred3.Show(); + pnlred4.BackColor = Color.Crimson; + pnlred4.Show(); + pnlred5.BackColor = Color.IndianRed; + pnlred5.Show(); + pnlred6.BackColor = Color.LightCoral; + pnlred6.Show(); + pnlred7.BackColor = Color.DarkSalmon; + pnlred7.Show(); + pnlred8.BackColor = Color.Salmon; + pnlred8.Show(); + pnlred9.BackColor = Color.LightSalmon; + pnlred9.Show(); + pnlred10.BackColor = Color.White; + pnlred10.Show(); + pnlred11.BackColor = Color.White; + pnlred11.Show(); + pnlred12.BackColor = Color.White; + pnlred12.Show(); + pnlred13.BackColor = Color.White; + pnlred13.Show(); + pnlred14.BackColor = Color.White; + pnlred14.Show(); + pnlred15.BackColor = Color.White; + pnlred15.Show(); + pnlred16.BackColor = Color.White; + pnlred16.Show(); + pnlredcustomcolour.Show(); + pnlredoptions.Show(); + break; + } + + switch (pinklevel) + { + case 1: + lblpinklevel.Text = "Level 1"; + pnlpink1.BackColor = Color.HotPink; + pnlpink1.Show(); + break; + case 2: + lblpinklevel.Text = "Level 2"; + pnlpink1.BackColor = Color.DeepPink; + pnlpink1.Show(); + pnlpink2.BackColor = Color.HotPink; + pnlpink2.Show(); + pnlpink3.BackColor = Color.LightPink; + pnlpink3.Show(); + break; + case 3: + lblpinklevel.Text = "Level 3"; + pnlpink1.BackColor = Color.MediumVioletRed; + pnlpink1.Show(); + pnlpink2.BackColor = Color.PaleVioletRed; + pnlpink2.Show(); + pnlpink3.BackColor = Color.DeepPink; + pnlpink3.Show(); + pnlpink4.BackColor = Color.HotPink; + pnlpink4.Show(); + pnlpink5.BackColor = Color.LightPink; + pnlpink5.Show(); + pnlpink6.BackColor = Color.Pink; + pnlpink6.Show(); + break; + case 4: + lblpinklevel.Text = "Level 4"; + pnlpink1.BackColor = Color.MediumVioletRed; + pnlpink1.Show(); + pnlpink2.BackColor = Color.PaleVioletRed; + pnlpink2.Show(); + pnlpink3.BackColor = Color.DeepPink; + pnlpink3.Show(); + pnlpink4.BackColor = Color.HotPink; + pnlpink4.Show(); + pnlpink5.BackColor = Color.LightPink; + pnlpink5.Show(); + pnlpink6.BackColor = Color.Pink; + pnlpink6.Show(); + pnlpink7.BackColor = Color.White; + pnlpink7.Show(); + pnlpink8.BackColor = Color.White; + pnlpink8.Show(); + pnlpink9.BackColor = Color.White; + pnlpink9.Show(); + pnlpink10.BackColor = Color.White; + pnlpink10.Show(); + pnlpink11.BackColor = Color.White; + pnlpink11.Show(); + pnlpink12.BackColor = Color.White; + pnlpink12.Show(); + pnlpink13.BackColor = Color.White; + pnlpink13.Show(); + pnlpink14.BackColor = Color.White; + pnlpink14.Show(); + pnlpink15.BackColor = Color.White; + pnlpink15.Show(); + pnlpink16.BackColor = Color.White; + pnlpink16.Show(); + pnlpinkcustomcolour.Show(); + pnlpinkoptions.Show(); + break; + } + + switch (anylevel) + { + case 1: + lblanylevel.Text = "Level 1"; + pnlany1.BackColor = Color.White; + pnlany1.Show(); + pnlanycustomcolour.Show(); + pnlanyoptions.Show(); + break; + case 2: + lblanylevel.Text = "Level 2"; + pnlany1.BackColor = Color.White; + pnlany1.Show(); + pnlany2.BackColor = Color.White; + pnlany2.Show(); + pnlany3.BackColor = Color.White; + pnlany3.Show(); + pnlany4.BackColor = Color.White; + pnlany4.Show(); + pnlanycustomcolour.Show(); + pnlanyoptions.Show(); + break; + case 3: + lblanylevel.Text = "Level 3"; + pnlany1.BackColor = Color.White; + pnlany1.Show(); + pnlany2.BackColor = Color.White; + pnlany2.Show(); + pnlany3.BackColor = Color.White; + pnlany3.Show(); + pnlany4.BackColor = Color.White; + pnlany4.Show(); + pnlany5.BackColor = Color.White; + pnlany5.Show(); + pnlany6.BackColor = Color.White; + pnlany6.Show(); + pnlany7.BackColor = Color.White; + pnlany7.Show(); + pnlany8.BackColor = Color.White; + pnlany8.Show(); + pnlanycustomcolour.Show(); + pnlanyoptions.Show(); + break; + case 4: + lblanylevel.Text = "Level 4"; + pnlany1.BackColor = Color.White; + pnlany1.Show(); + pnlany2.BackColor = Color.White; + pnlany2.Show(); + pnlany3.BackColor = Color.White; + pnlany3.Show(); + pnlany4.BackColor = Color.White; + pnlany4.Show(); + pnlany5.BackColor = Color.White; + pnlany5.Show(); + pnlany6.BackColor = Color.White; + pnlany6.Show(); + pnlany7.BackColor = Color.White; + pnlany7.Show(); + pnlany8.BackColor = Color.White; + pnlany8.Show(); + pnlany9.BackColor = Color.White; + pnlany9.Show(); + pnlany10.BackColor = Color.White; + pnlany10.Show(); + pnlany11.BackColor = Color.White; + pnlany11.Show(); + pnlany12.BackColor = Color.White; + pnlany12.Show(); + pnlany13.BackColor = Color.White; + pnlany13.Show(); + pnlany14.BackColor = Color.White; + pnlany14.Show(); + pnlany15.BackColor = Color.White; + pnlany15.Show(); + pnlany16.BackColor = Color.White; + pnlany16.Show(); + pnlanycustomcolour.Show(); + pnlanyoptions.Show(); + break; + } + } + + public string Result = "Nothing"; + + // ERROR: Handles clauses are not supported in C# + private void pnloldcolour_Click(object sender, EventArgs e) + { + Result = "Cancelled"; + this.Close(); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlnewcolour_Click(object sender, EventArgs e) + { + Result = "OK"; + NewColor = pnlnewcolour.BackColor; + this.Close(); + } + + // ERROR: Handles clauses are not supported in C# + private void pnloldcolour_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 2), pnloldcolour.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlanycolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlanycolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgraycolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlgraycolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpurplecolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlpurplecolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbluecolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlbluecolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgreencolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlgreencolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlyellowcolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlyellowcolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlorangecolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlorangecolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbrowncolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlbrowncolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlredcolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlredcolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpinkcolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlpinkcolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlnewcolour_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 2), pnlnewcolour.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctiongray(object sender, MouseEventArgs e) + { + + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlgraycustomcolour.BackColor; + savegraymemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionpurple(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlpurplecustomcolour.BackColor; + savepurplememory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionblue(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlbluecustomcolour.BackColor; + savebluememory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctiongreen(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlgreencustomcolour.BackColor; + savegreenmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionyellow(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlyellowcustomcolour.BackColor; + saveyellowmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionorange(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlorangecustomcolour.BackColor; + saveorangememory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionbrown(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlbrowncustomcolour.BackColor; + savebrownmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionred(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlredcustomcolour.BackColor; + saveredmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionpink(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlpinkcustomcolour.BackColor; + savepinkmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionany(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlanycustomcolour.BackColor; + saveanymemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void txtcustomgrayshade_TextChanged(object sender, EventArgs e) + { + if (txtcustomgrayshade.Text == "") + { + txtcustomgrayshade.Text = "0"; + } + else { + if (Convert.ToInt32(txtcustomgrayshade.Text) > 255) + { + txtcustomgrayshade.Text = "255"; + } + else { + pnlgraycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtcustomgrayshade.Text), Convert.ToInt16(txtcustomgrayshade.Text), Convert.ToInt16(txtcustomgrayshade.Text)); + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void CheckForNumber(object sender, KeyPressEventArgs e) + { + switch (e.KeyChar) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + e.Handled = true; + break; + } + } + + private void customcolourfailsafe() + { + if (txtcustomgrayshade.Text == "") + txtcustomgrayshade.Text = "0"; + + if (txtanysblue.Text == "") + txtanysblue.Text = "0"; + if (txtanysred.Text == "") + txtanysred.Text = "0"; + if (txtanysgreen.Text == "") + txtanysgreen.Text = "0"; + + if (txtpurplesblue.Text == "") + txtpurplesblue.Text = "255"; + if (txtpurplesred.Text == "") + txtpurplesred.Text = "150"; + if (txtpurplesgreen.Text == "") + txtpurplesgreen.Text = "0"; + + if (txtbluesblue.Text == "") + txtbluesblue.Text = "255"; + if (txtbluesred.Text == "") + txtbluesred.Text = "0"; + if (txtbluesgreen.Text == "") + txtbluesgreen.Text = "0"; + + if (txtgreensblue.Text == "") + txtgreensblue.Text = "0"; + if (txtgreensred.Text == "") + txtgreensred.Text = "0"; + if (txtgreensgreen.Text == "") + txtgreensgreen.Text = "255"; + + if (txtyellowsblue.Text == "") + txtyellowsblue.Text = "0"; + if (txtyellowsred.Text == "") + txtyellowsred.Text = "255"; + if (txtyellowsgreen.Text == "") + txtyellowsgreen.Text = "255"; + + if (txtorangesblue.Text == "") + txtorangesblue.Text = "0"; + if (txtorangesred.Text == "") + txtorangesred.Text = "255"; + if (txtorangesgreen.Text == "") + txtorangesgreen.Text = "60"; + + if (txtbrownsblue.Text == "") + txtbrownsblue.Text = "0"; + if (txtbrownsred.Text == "") + txtbrownsred.Text = "140"; + if (txtbrownsgreen.Text == "") + txtbrownsgreen.Text = "60"; + + if (txtredsblue.Text == "") + txtredsblue.Text = "0"; + if (txtredsred.Text == "") + txtredsred.Text = "255"; + if (txtredsgreen.Text == "") + txtredsgreen.Text = "0"; + + if (txtpinksblue.Text == "") + txtpinksblue.Text = "150"; + if (txtpinksred.Text == "") + txtpinksred.Text = "250"; + if (txtpinksgreen.Text == "") + txtpinksgreen.Text = "0"; + } + + // ERROR: Handles clauses are not supported in C# + private void txtpurplesgreen_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlpurplecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpurplesred.Text), Convert.ToInt16(txtpurplesgreen.Text), Convert.ToInt16(txtpurplesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpurpleoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtpurplesblue.Text) > 255) + { + txtpurplesblue.Text = "255"; + } + if (Convert.ToInt32(txtpurplesred.Text) > Convert.ToInt32(txtpurplesblue.Text)) + { + txtpurplesred.Text = txtpurplesblue.Text; + } + if (Convert.ToInt32(txtpurplesgreen.Text) > Convert.ToInt32(txtpurplesblue.Text)) + { + txtpurplesgreen.Text = txtpurplesred.Text; + } + if (Convert.ToInt32(txtpurplesgreen.Text) > Convert.ToInt32(txtpurplesred.Text)) + { + txtpurplesgreen.Text = txtpurplesred.Text; + } + pnlpurplecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpurplesred.Text), Convert.ToInt16(txtpurplesgreen.Text), Convert.ToInt16(txtpurplesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtbluesgreen_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlbluecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbluesred.Text), Convert.ToInt16(txtbluesgreen.Text), Convert.ToInt16(txtbluesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlblueoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtbluesblue.Text) > 255) + { + txtbluesblue.Text = "255"; + } + if (Convert.ToInt32(txtbluesgreen.Text) > Convert.ToInt32(txtbluesblue.Text)) + { + txtbluesgreen.Text = txtbluesblue.Text; + } + if (Convert.ToInt32(txtbluesred.Text) > Convert.ToInt32(txtbluesblue.Text)) + { + txtbluesred.Text = txtbluesgreen.Text; + } + if (Convert.ToInt32(txtbluesred.Text) > Convert.ToInt32(txtbluesgreen.Text)) + { + txtbluesred.Text = txtbluesgreen.Text; + } + pnlbluecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbluesred.Text), Convert.ToInt16(txtbluesgreen.Text), Convert.ToInt16(txtbluesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtgreensgreen_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlgreencustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtgreensred.Text), Convert.ToInt16(txtgreensgreen.Text), Convert.ToInt16(txtgreensblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgreenoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtgreensgreen.Text) > 255) + { + txtgreensgreen.Text = "255"; + } + if (Convert.ToInt32(txtgreensblue.Text) > Convert.ToInt32(txtgreensgreen.Text)) + { + txtgreensblue.Text = txtgreensgreen.Text; + } + if (Convert.ToInt32(txtgreensred.Text) > Convert.ToInt32(txtgreensgreen.Text)) + { + txtgreensred.Text = txtgreensgreen.Text; + } + if (Convert.ToInt32(txtgreensblue.Text) > Convert.ToInt32(txtgreensred.Text + 150)) + { + txtgreensblue.Text = (Convert.ToInt16(txtgreensred.Text) + 150).ToString(); + } + if (Convert.ToInt32(txtgreensred.Text) > Convert.ToInt32(txtgreensblue.Text + 150)) + { + txtgreensred.Text = (Convert.ToInt32(txtgreensblue.Text) + 150).ToString(); + } + pnlgreencustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtgreensred.Text), Convert.ToInt16(txtgreensgreen.Text), Convert.ToInt16(txtgreensblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtyellowsred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlyellowcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtyellowsred.Text), Convert.ToInt16(txtyellowsgreen.Text), Convert.ToInt16(txtyellowsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlyellowoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtyellowsred.Text) > 255) + { + txtyellowsred.Text = "255"; + } + if (Convert.ToInt32(txtyellowsred.Text) < 180) + { + txtyellowsred.Text = "180"; + } + if (Convert.ToInt32(txtyellowsgreen.Text) > Convert.ToInt32(txtyellowsred.Text)) + { + txtyellowsgreen.Text = txtyellowsred.Text; + } + if (Convert.ToInt32(txtyellowsgreen.Text) < (Convert.ToInt32(txtyellowsred.Text) - 30)) + { + txtyellowsgreen.Text = (Convert.ToInt32(txtyellowsred.Text) - 30).ToString(); + } + if (Convert.ToInt32(txtyellowsblue.Text) > Convert.ToInt32(txtyellowsgreen.Text)) + { + txtyellowsblue.Text = txtyellowsgreen.Text; + } + pnlyellowcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtyellowsred.Text), Convert.ToInt16(txtyellowsgreen.Text), Convert.ToInt16(txtyellowsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtorangesred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlorangecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtorangesred.Text), Convert.ToInt16(txtorangesgreen.Text), Convert.ToInt16(txtorangesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlorangeoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtorangesred.Text) > 255) + { + txtorangesred.Text = "255"; + } + if (Convert.ToInt32(txtorangesred.Text) < 255) + { + txtorangesred.Text = "255"; + } + if (Convert.ToInt32(txtorangesgreen.Text) > Convert.ToInt32(txtorangesred.Text) - 100) + { + txtorangesgreen.Text = (Convert.ToInt32(txtorangesred.Text) - 100).ToString(); + } + if (Convert.ToInt32(txtorangesgreen.Text) < 30) + { + txtorangesgreen.Text = "30"; + } + if (Convert.ToInt32(txtorangesblue.Text) > (Convert.ToInt32(txtorangesgreen.Text) - 30)) + { + txtorangesblue.Text = (Convert.ToInt32(txtorangesgreen.Text) - 30).ToString(); + } + pnlorangecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtorangesred.Text), Convert.ToInt16(txtorangesgreen.Text), Convert.ToInt16(txtorangesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtbrownsred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlbrowncustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbrownsred.Text), Convert.ToInt16(txtbrownsgreen.Text), Convert.ToInt16(txtbrownsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbrownoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtbrownsred.Text) > 255) + { + txtbrownsred.Text = "255"; + } + if (Convert.ToInt32(txtbrownsred.Text) < 90) + { + txtbrownsred.Text = "90"; + } + if (Convert.ToInt32(txtbrownsgreen.Text) > Convert.ToInt32(txtbrownsred.Text) - 30) + { + txtbrownsgreen.Text = (Convert.ToInt32(txtbrownsred.Text) - 30).ToString(); + } + if (Convert.ToInt32(txtbrownsgreen.Text) < Convert.ToInt32(txtbrownsred.Text) - 128) + { + txtbrownsgreen.Text = (Convert.ToInt32(txtbrownsred.Text) - 128).ToString(); + } + if (Convert.ToInt32(txtbrownsgreen.Text) < 60) + { + txtbrownsgreen.Text = "60"; + } + if (Convert.ToInt32(txtbrownsblue.Text) > Convert.ToInt32(txtbrownsgreen.Text) - 60) + { + txtbrownsblue.Text = (Convert.ToInt32(txtbrownsgreen.Text) - 60).ToString(); + } + pnlbrowncustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbrownsred.Text), Convert.ToInt16(txtbrownsgreen.Text), Convert.ToInt16(txtbrownsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtsred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlredcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtredsred.Text), Convert.ToInt16(txtredsgreen.Text), Convert.ToInt16(txtredsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlredoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtredsred.Text) > 255) + { + txtredsred.Text = "255"; + } + if (Convert.ToInt32(txtredsblue.Text) > Convert.ToInt32(txtredsred.Text) - 80) + { + txtredsblue.Text = (Convert.ToInt32(txtredsred.Text) - 80).ToString(); + } + if (Convert.ToInt32(txtredsgreen.Text) > Convert.ToInt32(txtredsred.Text) - 80) + { + txtredsgreen.Text = (Convert.ToInt32(txtredsred.Text) - 80).ToString(); + } + if (Convert.ToInt32(txtredsgreen.Text) > Convert.ToInt32(txtredsblue.Text + 50)) + { + txtredsgreen.Text = (Convert.ToInt32(txtredsblue.Text) + 50).ToString(); + } + if (Convert.ToInt32(txtredsblue.Text) > Convert.ToInt32(txtredsgreen.Text + 50)) + { + txtredsblue.Text = (Convert.ToInt32(txtredsgreen.Text) + 50).ToString(); + } + pnlredcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtredsred.Text), Convert.ToInt16(txtredsgreen.Text), Convert.ToInt16(txtredsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtpinksred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + try + { + pnlpinkcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpinksred.Text), Convert.ToInt16(txtpinksgreen.Text), Convert.ToInt16(txtpinksblue.Text)); + } + catch { } + } + + + + // ERROR: Handles clauses are not supported in C# + private void pnlpinkoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtpinksred.Text) > 255) + { + txtpinksred.Text = "255"; + } + if (Convert.ToInt32(txtpinksblue.Text) > Convert.ToInt32(txtpinksred.Text) - 50) + { + txtpinksblue.Text = (Convert.ToInt32(txtpinksred.Text) - 50).ToString(); + } + if (Convert.ToInt32(txtpinksgreen.Text) > Convert.ToInt32(txtpinksblue.Text)) + { + txtpinksgreen.Text = txtpinksblue.Text; + } + pnlpinkcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpinksred.Text), Convert.ToInt16(txtpinksgreen.Text), Convert.ToInt16(txtpinksblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtanysred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + try + { + pnlanycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtanysred.Text), Convert.ToInt16(txtanysgreen.Text), Convert.ToInt16(txtanysblue.Text)); + } + catch + { + + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlanyoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + switch (anylevel) + { + case 1: + if (Convert.ToInt32(txtanysred.Text) > 150) + { + txtanysred.Text = "150"; + } + if (Convert.ToInt32(txtanysred.Text) < 100) + { + txtanysred.Text = "100"; + } + if (Convert.ToInt32(txtanysblue.Text) > 150) + { + txtanysblue.Text = "150"; + } + if (Convert.ToInt32(txtanysblue.Text) < 100) + { + txtanysblue.Text = "100"; + } + if (Convert.ToInt32(txtanysgreen.Text) > 150) + { + txtanysgreen.Text = "150"; + } + if (Convert.ToInt32(txtanysgreen.Text) < 100) + { + txtanysgreen.Text = "100"; + } + break; + case 2: + if (Convert.ToInt32(txtanysred.Text) > 200) + { + txtanysred.Text = "200"; + } + if (Convert.ToInt32(txtanysred.Text) < 100) + { + txtanysred.Text = "100"; + } + if (Convert.ToInt32(txtanysblue.Text) > 200) + { + txtanysblue.Text = "200"; + } + if (Convert.ToInt32(txtanysblue.Text) < 100) + { + txtanysblue.Text = "100"; + } + if (Convert.ToInt32(txtanysgreen.Text) > 200) + { + txtanysgreen.Text = "200"; + } + if (Convert.ToInt32(txtanysgreen.Text) < 100) + { + txtanysgreen.Text = "100"; + } + break; + case 3: + if (Convert.ToInt32(txtanysred.Text) > 225) + { + txtanysred.Text = "225"; + } + if (Convert.ToInt32(txtanysred.Text) < 75) + { + txtanysred.Text = "75"; + } + if (Convert.ToInt32(txtanysblue.Text) > 225) + { + txtanysblue.Text = "225"; + } + if (Convert.ToInt32(txtanysblue.Text) < 75) + { + txtanysblue.Text = "75"; + } + if (Convert.ToInt32(txtanysgreen.Text) > 225) + { + txtanysgreen.Text = "225"; + } + if (Convert.ToInt32(txtanysgreen.Text) < 75) + { + txtanysgreen.Text = "75"; + } + break; + case 4: + if (Convert.ToInt32(txtanysred.Text) > 255) + { + txtanysred.Text = "255"; + } + if (Convert.ToInt32(txtanysred.Text) < 0) + { + txtanysred.Text = "0"; + } + if (Convert.ToInt32(txtanysblue.Text) > 255) + { + txtanysblue.Text = "255"; + } + if (Convert.ToInt32(txtanysblue.Text) < 0) + { + txtanysblue.Text = "0"; + } + if (Convert.ToInt32(txtanysgreen.Text) > 255) + { + txtanysgreen.Text = "255"; + } + if (Convert.ToInt32(txtanysgreen.Text) < 0) + { + txtanysgreen.Text = "0"; + } + break; + } + pnlanycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtanysred.Text), Convert.ToInt16(txtanysgreen.Text), Convert.ToInt16(txtanysblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgraycustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Gray Rules"; + //infobox.textinfo = "You must input a value between 0 (black) and 255 (white) to form a shade of gray." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Gray Memory Wiped"; + //infobox.textinfo = "All your custom shades of Gray have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.graymemory, 0, API.graymemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpurplecustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Purple Rules"; + //infobox.textinfo = "Blue must have the highest value followed by red. Green must then have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Purple Memory Wiped"; + //infobox.textinfo = "All your custom shades of Purple have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.purplememory, 0, API.purplememory.Length); + setupboughtcolours(); + loadmemory(); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbluecustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Blue Rules"; + //infobox.textinfo = "Blue must have the highest value followed by green. Red must then have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Blue Memory Wiped"; + //infobox.textinfo = "All your custom shades of Blue have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.bluememory, 0, API.bluememory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgreencustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Green Rules"; + //infobox.textinfo = "Green must have the highest value. Red and Blue need to have values within 150 of eachother." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Green Memory Wiped"; + //infobox.textinfo = "All your custom shades of Green have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.greenmemory, 0, API.greenmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlyellowcustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Yellow Rules"; + //infobox.textinfo = "Red must have the highest value and be over 180. Green must be within 30 values of red. Blue must be the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Yellow Memory Wiped"; + //infobox.textinfo = "All your custom shades of Yellow have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.yellowmemory, 0, API.yellowmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlorangecustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Orange Rules"; + //infobox.textinfo = "Red must have a value of 255. Green must be 100 or more values less than red. Blue must be 30 or more values less than green." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Orange Memory Wiped"; + //infobox.textinfo = "All your custom shades of Orange have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.orangememory, 0, API.orangememory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbrowncustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Brown Rules"; + //infobox.textinfo = "Red must have the highest value. Green must be 30 - 128 values lower than red. Blue must be 60 or more values less than green." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Brown Memory Wiped"; + //infobox.textinfo = "All your custom shades of Brown have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.brownmemory, 0, API.brownmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlredcustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Red Rules"; + //infobox.textinfo = "Red must have the highest value. Green and blue must be 80 or more values less than red but within 50 values of eachother." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Red Memory Wiped"; + //infobox.textinfo = "All your custom shades of Red have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.redmemory, 0, API.redmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpinkcustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Pink Rules"; + //infobox.textinfo = "Red must have the highest value. Blue must be 50 or more values less than red. Green must have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Pink Memory Wiped"; + //infobox.textinfo = "All your custom shades of Pink have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.pinkmemory, 0, API.pinkmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlanycustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + switch (anylevel) + { + case 1: + //infobox.title = "Custom Rules"; + //infobox.textinfo = "Red, Green and Blue may be set to any value between 100 and 150" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + break; + case 2: + //infobox.title = "Custom Rules"; + //infobox.textinfo = "Red, Green and Blue may be set to any value between 100 and 200" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + break; + case 3: + //infobox.title = "Custom Rules"; + //infobox.textinfo = "Red, Green and Blue may be set to any value between 75 and 225" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + break; + case 4: + //infobox.title = "Custom Rules"; + //infobox.textinfo = "Red, Green and Blue may be set to any value between 0 and 255" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + break; + } + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Custom Colour Memory Wiped"; + //infobox.textinfo = "All your custom colour shades of have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.anymemory, 0, API.anymemory.Length); + setupboughtcolours(); + loadmemory(); + } + + } + } +} diff --git a/source/WindowsFormsApplication1/Dialogs/Color_Picker.resx b/source/WindowsFormsApplication1/Dialogs/Color_Picker.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Dialogs/Color_Picker.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.Designer.cs b/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.Designer.cs new file mode 100644 index 0000000..5cc62ea --- /dev/null +++ b/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.Designer.cs @@ -0,0 +1,400 @@ +using System; + +namespace ShiftOS +{ + partial class Graphic_Picker + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.pgcontents = new System.Windows.Forms.Panel(); + this.btncancel = new System.Windows.Forms.Button(); + this.btnreset = new System.Windows.Forms.Button(); + this.btnapply = new System.Windows.Forms.Button(); + this.Label4 = new System.Windows.Forms.Label(); + this.btnmousedownbrowse = new System.Windows.Forms.Button(); + this.txtmousedownfile = new System.Windows.Forms.TextBox(); + this.picmousedown = new System.Windows.Forms.PictureBox(); + this.Label3 = new System.Windows.Forms.Label(); + this.btnmouseoverbrowse = new System.Windows.Forms.Button(); + this.txtmouseoverfile = new System.Windows.Forms.TextBox(); + this.picmouseover = new System.Windows.Forms.PictureBox(); + this.Label2 = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.btnidlebrowse = new System.Windows.Forms.Button(); + this.txtidlefile = new System.Windows.Forms.TextBox(); + this.picidle = new System.Windows.Forms.PictureBox(); + this.btnzoom = new System.Windows.Forms.Button(); + this.btnstretch = new System.Windows.Forms.Button(); + this.btncentre = new System.Windows.Forms.Button(); + this.btntile = new System.Windows.Forms.Button(); + this.pnlgraphicholder = new System.Windows.Forms.Panel(); + this.picgraphic = new System.Windows.Forms.PictureBox(); + this.lblobjecttoskin = new System.Windows.Forms.Label(); + this.OpenFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.pgcontents.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picmousedown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.picmouseover)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.picidle)).BeginInit(); + this.pnlgraphicholder.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picgraphic)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.btncancel); + this.pgcontents.Controls.Add(this.btnreset); + this.pgcontents.Controls.Add(this.btnapply); + this.pgcontents.Controls.Add(this.Label4); + this.pgcontents.Controls.Add(this.btnmousedownbrowse); + this.pgcontents.Controls.Add(this.txtmousedownfile); + this.pgcontents.Controls.Add(this.picmousedown); + this.pgcontents.Controls.Add(this.Label3); + this.pgcontents.Controls.Add(this.btnmouseoverbrowse); + this.pgcontents.Controls.Add(this.txtmouseoverfile); + this.pgcontents.Controls.Add(this.picmouseover); + this.pgcontents.Controls.Add(this.Label2); + this.pgcontents.Controls.Add(this.Label1); + this.pgcontents.Controls.Add(this.btnidlebrowse); + this.pgcontents.Controls.Add(this.txtidlefile); + this.pgcontents.Controls.Add(this.picidle); + this.pgcontents.Controls.Add(this.btnzoom); + this.pgcontents.Controls.Add(this.btnstretch); + this.pgcontents.Controls.Add(this.btncentre); + this.pgcontents.Controls.Add(this.btntile); + this.pgcontents.Controls.Add(this.pnlgraphicholder); + this.pgcontents.Controls.Add(this.lblobjecttoskin); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(390, 594); + this.pgcontents.TabIndex = 20; + // + // btncancel + // + this.btncancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.btncancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncancel.Location = new System.Drawing.Point(21, 546); + this.btncancel.Name = "btncancel"; + this.btncancel.Size = new System.Drawing.Size(109, 32); + this.btncancel.TabIndex = 23; + this.btncancel.Text = "Cancel"; + this.btncancel.UseVisualStyleBackColor = true; + this.btncancel.Click += new System.EventHandler(this.btncancel_Click); + // + // btnreset + // + this.btnreset.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.btnreset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnreset.Location = new System.Drawing.Point(136, 546); + this.btnreset.Name = "btnreset"; + this.btnreset.Size = new System.Drawing.Size(109, 32); + this.btnreset.TabIndex = 22; + this.btnreset.Text = "Reset"; + this.btnreset.UseVisualStyleBackColor = true; + this.btnreset.Click += new System.EventHandler(this.btnreset_Click); + // + // btnapply + // + this.btnapply.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapply.Location = new System.Drawing.Point(251, 546); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(118, 32); + this.btnapply.TabIndex = 21; + this.btnapply.Text = "Apply"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); + // + // Label4 + // + this.Label4.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(125, 411); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(163, 28); + this.Label4.TabIndex = 20; + this.Label4.Text = "Mouse Down"; + this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnmousedownbrowse + // + this.btnmousedownbrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmousedownbrowse.Location = new System.Drawing.Point(295, 411); + this.btnmousedownbrowse.Name = "btnmousedownbrowse"; + this.btnmousedownbrowse.Size = new System.Drawing.Size(73, 60); + this.btnmousedownbrowse.TabIndex = 19; + this.btnmousedownbrowse.Text = "Browse"; + this.btnmousedownbrowse.UseVisualStyleBackColor = true; + this.btnmousedownbrowse.Click += new System.EventHandler(this.btnmousedownbrowse_Click); + // + // txtmousedownfile + // + this.txtmousedownfile.BackColor = System.Drawing.Color.White; + this.txtmousedownfile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtmousedownfile.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); + this.txtmousedownfile.Location = new System.Drawing.Point(125, 442); + this.txtmousedownfile.Multiline = true; + this.txtmousedownfile.Name = "txtmousedownfile"; + this.txtmousedownfile.Size = new System.Drawing.Size(163, 29); + this.txtmousedownfile.TabIndex = 18; + this.txtmousedownfile.Text = "None"; + this.txtmousedownfile.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // picmousedown + // + this.picmousedown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.picmousedown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.picmousedown.Location = new System.Drawing.Point(19, 411); + this.picmousedown.Name = "picmousedown"; + this.picmousedown.Size = new System.Drawing.Size(100, 60); + this.picmousedown.TabIndex = 17; + this.picmousedown.TabStop = false; + // + // Label3 + // + this.Label3.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(125, 336); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(163, 28); + this.Label3.TabIndex = 16; + this.Label3.Text = "Mouse Over"; + this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnmouseoverbrowse + // + this.btnmouseoverbrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmouseoverbrowse.Location = new System.Drawing.Point(295, 336); + this.btnmouseoverbrowse.Name = "btnmouseoverbrowse"; + this.btnmouseoverbrowse.Size = new System.Drawing.Size(73, 60); + this.btnmouseoverbrowse.TabIndex = 15; + this.btnmouseoverbrowse.Text = "Browse"; + this.btnmouseoverbrowse.UseVisualStyleBackColor = true; + this.btnmouseoverbrowse.Click += new System.EventHandler(this.btnmouseoverbrowse_Click); + // + // txtmouseoverfile + // + this.txtmouseoverfile.BackColor = System.Drawing.Color.White; + this.txtmouseoverfile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtmouseoverfile.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); + this.txtmouseoverfile.Location = new System.Drawing.Point(125, 367); + this.txtmouseoverfile.Multiline = true; + this.txtmouseoverfile.Name = "txtmouseoverfile"; + this.txtmouseoverfile.Size = new System.Drawing.Size(163, 29); + this.txtmouseoverfile.TabIndex = 14; + this.txtmouseoverfile.Text = "None"; + this.txtmouseoverfile.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // picmouseover + // + this.picmouseover.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.picmouseover.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.picmouseover.Location = new System.Drawing.Point(19, 336); + this.picmouseover.Name = "picmouseover"; + this.picmouseover.Size = new System.Drawing.Size(100, 60); + this.picmouseover.TabIndex = 13; + this.picmouseover.TabStop = false; + // + // Label2 + // + this.Label2.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(125, 260); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(163, 28); + this.Label2.TabIndex = 12; + this.Label2.Text = "Idle"; + this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Font = new System.Drawing.Font("Bookman Old Style", 14.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(17, 228); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(70, 23); + this.Label1.TabIndex = 11; + this.Label1.Text = "States"; + // + // btnidlebrowse + // + this.btnidlebrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnidlebrowse.Location = new System.Drawing.Point(295, 260); + this.btnidlebrowse.Name = "btnidlebrowse"; + this.btnidlebrowse.Size = new System.Drawing.Size(73, 60); + this.btnidlebrowse.TabIndex = 10; + this.btnidlebrowse.Text = "Browse"; + this.btnidlebrowse.UseVisualStyleBackColor = true; + this.btnidlebrowse.Click += new System.EventHandler(this.btnidlebrowse_Click); + // + // txtidlefile + // + this.txtidlefile.BackColor = System.Drawing.Color.White; + this.txtidlefile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtidlefile.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtidlefile.Location = new System.Drawing.Point(125, 291); + this.txtidlefile.Multiline = true; + this.txtidlefile.Name = "txtidlefile"; + this.txtidlefile.Size = new System.Drawing.Size(163, 29); + this.txtidlefile.TabIndex = 9; + this.txtidlefile.Text = "None"; + this.txtidlefile.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // picidle + // + this.picidle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.picidle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.picidle.Location = new System.Drawing.Point(19, 260); + this.picidle.Name = "picidle"; + this.picidle.Size = new System.Drawing.Size(100, 60); + this.picidle.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.picidle.TabIndex = 8; + this.picidle.TabStop = false; + // + // btnzoom + // + this.btnzoom.BackgroundImage = global::ShiftOS.Properties.Resources.zoombutton; + this.btnzoom.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnzoom.FlatAppearance.BorderSize = 0; + this.btnzoom.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnzoom.Location = new System.Drawing.Point(286, 144); + this.btnzoom.Name = "btnzoom"; + this.btnzoom.Size = new System.Drawing.Size(82, 65); + this.btnzoom.TabIndex = 7; + this.btnzoom.UseVisualStyleBackColor = true; + this.btnzoom.Click += new System.EventHandler(this.btnzoom_Click); + // + // btnstretch + // + this.btnstretch.BackgroundImage = global::ShiftOS.Properties.Resources.stretchbutton; + this.btnstretch.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnstretch.FlatAppearance.BorderSize = 0; + this.btnstretch.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstretch.Location = new System.Drawing.Point(197, 144); + this.btnstretch.Name = "btnstretch"; + this.btnstretch.Size = new System.Drawing.Size(82, 65); + this.btnstretch.TabIndex = 6; + this.btnstretch.UseVisualStyleBackColor = true; + this.btnstretch.Click += new System.EventHandler(this.btnstretch_Click); + // + // btncentre + // + this.btncentre.BackgroundImage = global::ShiftOS.Properties.Resources.centrebutton; + this.btncentre.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btncentre.FlatAppearance.BorderSize = 0; + this.btncentre.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncentre.Location = new System.Drawing.Point(108, 144); + this.btncentre.Name = "btncentre"; + this.btncentre.Size = new System.Drawing.Size(82, 65); + this.btncentre.TabIndex = 5; + this.btncentre.UseVisualStyleBackColor = true; + this.btncentre.Click += new System.EventHandler(this.btncentre_Click); + // + // btntile + // + this.btntile.BackgroundImage = global::ShiftOS.Properties.Resources.tilebutton; + this.btntile.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btntile.FlatAppearance.BorderSize = 0; + this.btntile.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntile.Location = new System.Drawing.Point(19, 144); + this.btntile.Name = "btntile"; + this.btntile.Size = new System.Drawing.Size(82, 65); + this.btntile.TabIndex = 4; + this.btntile.UseVisualStyleBackColor = true; + this.btntile.Click += new System.EventHandler(this.btntile_Click); + // + // pnlgraphicholder + // + this.pnlgraphicholder.Controls.Add(this.picgraphic); + this.pnlgraphicholder.Location = new System.Drawing.Point(19, 38); + this.pnlgraphicholder.Name = "pnlgraphicholder"; + this.pnlgraphicholder.Size = new System.Drawing.Size(350, 100); + this.pnlgraphicholder.TabIndex = 3; + // + // picgraphic + // + this.picgraphic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.picgraphic.Location = new System.Drawing.Point(0, 0); + this.picgraphic.Name = "picgraphic"; + this.picgraphic.Size = new System.Drawing.Size(350, 100); + this.picgraphic.TabIndex = 0; + this.picgraphic.TabStop = false; + // + // lblobjecttoskin + // + this.lblobjecttoskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblobjecttoskin.Location = new System.Drawing.Point(19, 9); + this.lblobjecttoskin.Name = "lblobjecttoskin"; + this.lblobjecttoskin.Size = new System.Drawing.Size(350, 23); + this.lblobjecttoskin.TabIndex = 2; + this.lblobjecttoskin.Text = "Close Button"; + this.lblobjecttoskin.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // OpenFileDialog1 + // + this.OpenFileDialog1.FileName = "OpenFileDialog1"; + // + // Graphic_Picker + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(390, 594); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Graphic_Picker"; + this.Text = "Graphic_Picker"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Graphic_Picker_Load); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picmousedown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.picmouseover)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.picidle)).EndInit(); + this.pnlgraphicholder.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.picgraphic)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Button btncancel; + internal System.Windows.Forms.Button btnreset; + internal System.Windows.Forms.Button btnapply; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Button btnmousedownbrowse; + internal System.Windows.Forms.TextBox txtmousedownfile; + internal System.Windows.Forms.PictureBox picmousedown; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Button btnmouseoverbrowse; + internal System.Windows.Forms.TextBox txtmouseoverfile; + internal System.Windows.Forms.PictureBox picmouseover; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Button btnidlebrowse; + internal System.Windows.Forms.TextBox txtidlefile; + internal System.Windows.Forms.PictureBox picidle; + internal System.Windows.Forms.Button btnzoom; + internal System.Windows.Forms.Button btnstretch; + internal System.Windows.Forms.Button btncentre; + internal System.Windows.Forms.Button btntile; + internal System.Windows.Forms.Panel pnlgraphicholder; + internal System.Windows.Forms.PictureBox picgraphic; + internal System.Windows.Forms.Label lblobjecttoskin; + internal System.Windows.Forms.OpenFileDialog OpenFileDialog1; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.cs b/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.cs new file mode 100644 index 0000000..1df302d --- /dev/null +++ b/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.cs @@ -0,0 +1,249 @@ +using Svg; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + + public partial class Graphic_Picker : Form + { + /// + /// Graphic Picker GUI. + /// + /// Name of element. + /// Should mouse images be shown? + public Graphic_Picker(string elementName, bool showMouseImages) + { + InitializeComponent(); + ElementName = elementName; + ShowMouseImages = showMouseImages; + } + + private string ElementName = "Close Button"; + public ImageLayout ImageLayout = ImageLayout.Stretch; + public Image IdleImage = null; + public Image MouseOverImage = null; + public Image MouseDownImage = null; + private bool ShowMouseImages = false; + + /// + /// Sets up the user interface. + /// + private void SetupGUI() + { + lblobjecttoskin.Text = ElementName; + btnstretch.BackgroundImage = Properties.Resources.stretchbutton; + btntile.BackgroundImage = Properties.Resources.tilebutton; + btncentre.BackgroundImage = Properties.Resources.centrebutton; + btnzoom.BackgroundImage = Properties.Resources.zoombutton; + switch(this.ImageLayout) + { + case ImageLayout.Stretch: + btnstretch.BackgroundImage = Properties.Resources.stretchbuttonpressed; + break; + case ImageLayout.Tile: + btntile.BackgroundImage = Properties.Resources.tilebuttonpressed; + break; + case ImageLayout.Center: + btncentre.BackgroundImage = Properties.Resources.centrebuttonpressed; + break; + default: + btnzoom.BackgroundImage = Properties.Resources.zoombuttonpressed; + break; + } + if(ShowMouseImages == true) + { + txtmousedownfile.Show(); + txtmouseoverfile.Show(); + Label3.Show(); + Label4.Show(); + picmousedown.Show(); + picmouseover.Show(); + btnmousedownbrowse.Show(); + btnmouseoverbrowse.Show(); + this.Height = MOUSE_IMAGES_WINDOW_HEIGHT; + } + else + { + txtmousedownfile.Hide(); + txtmouseoverfile.Hide(); + Label3.Hide(); + Label4.Hide(); + picmousedown.Hide(); + picmouseover.Hide(); + btnmousedownbrowse.Hide(); + btnmouseoverbrowse.Hide(); + this.Height = IDLE_ONLY_WINDOW_HEIGHT; + + } + picidle.BackgroundImage = IdleImage; + picidle.BackgroundImageLayout = this.ImageLayout; + picmousedown.BackgroundImage = MouseDownImage; + picidle.BackgroundImageLayout = this.ImageLayout; + picmouseover.BackgroundImage = MouseOverImage; + picidle.BackgroundImageLayout = this.ImageLayout; + txtidlefile.Text = idle_filename; + txtmousedownfile.Text = mousedown_filename; + txtmouseoverfile.Text = mouseover_filename; + } + + private const int MOUSE_IMAGES_WINDOW_HEIGHT = 570; + private const int IDLE_ONLY_WINDOW_HEIGHT = 382; + private void btntile_Click(object sender, EventArgs e) + { + this.ImageLayout = ImageLayout.Tile; + SetupGUI(); + } + + private void btncentre_Click(object sender, EventArgs e) + { + this.ImageLayout = ImageLayout.Center; + SetupGUI(); + } + + private void btnstretch_Click(object sender, EventArgs e) + { + this.ImageLayout = ImageLayout.Stretch; + SetupGUI(); + } + + private string idle_filename = "None"; + private string mouseover_filename = "None"; + private string mousedown_filename = "None"; + + + private void btnzoom_Click(object sender, EventArgs e) + { + this.ImageLayout = ImageLayout.Zoom; + SetupGUI(); + } + + private void btnmouseoverbrowse_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".pic;.svg;.png;.bmp;.jpg", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetFSResult(); + if(result != "fail") + { + var finf = new FileInfo(result); + if (finf.Extension == ".svg") + { + MouseOverImage = SVGtoPNG(finf.FullName); + } + else { + MouseOverImage = Image.FromFile(result); + } + + mouseover_filename = finf.Name; + MOFullName = finf.FullName; + } + SetupGUI(); + }; + } + + /// + /// Scalable Vector Graphics parser. + /// + /// Path to .svg file. + /// The new System.Drawing.Image. + private Image SVGtoPNG(string svg) + { + + + var svgDocument = SvgDocument.Open(svg); + return svgDocument.Draw(); + + } + + private void btnidlebrowse_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".pic;.svg;.png;.bmp;.jpg", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetFSResult(); + if (result != "fail") + { + var finf = new FileInfo(result); + if (finf.Extension == ".svg") + { + IdleImage = SVGtoPNG(finf.FullName); + } + else { + IdleImage = Image.FromFile(result); + } + idle_filename = finf.Name; + IdleFullName = finf.FullName; + } + SetupGUI(); + }; + } + + private void btnmousedownbrowse_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".pic;.svg;.png;.bmp;.jpg", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetFSResult(); + if (result != "fail") + { + var finf = new FileInfo(result); + if (finf.Extension == ".svg") + { + MouseDownImage = SVGtoPNG(finf.FullName); + } + else { + MouseDownImage = Image.FromFile(result); + } + + mousedown_filename = finf.Name; + MDFullName = finf.FullName; + } + SetupGUI(); + }; + } + + public string Result = "Cancelled"; + + private void Graphic_Picker_Load(object sender, EventArgs e) + { + + SetupGUI(); + } + + private void btnreset_Click(object sender, EventArgs e) + { + IdleImage = null; + MouseOverImage = null; + MouseDownImage = null; + idle_filename = "None"; + mouseover_filename = "None"; + mousedown_filename = "None"; + SetupGUI(); + } + + private void btncancel_Click(object sender, EventArgs e) + { + Result = "Cancelled"; + this.Close(); + } + + public string IdleFullName = null; + public string MOFullName = null; + public string MDFullName = null; + + private void btnapply_Click(object sender, EventArgs e) + { + Result = "OK"; + this.Close(); + } + } +} diff --git a/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.resx b/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.resx new file mode 100644 index 0000000..33c7f67 --- /dev/null +++ b/source/WindowsFormsApplication1/Dialogs/Graphic_Picker.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Dodge.Designer.cs b/source/WindowsFormsApplication1/Dodge.Designer.cs deleted file mode 100644 index 46fce33..0000000 --- a/source/WindowsFormsApplication1/Dodge.Designer.cs +++ /dev/null @@ -1,230 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class Dodge - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.player = new System.Windows.Forms.PictureBox(); - this.QuitButton = new System.Windows.Forms.PictureBox(); - this.BeginButton = new System.Windows.Forms.PictureBox(); - this.DescriptionLabel = new System.Windows.Forms.Label(); - this.object_small2 = new System.Windows.Forms.PictureBox(); - this.object_mid2 = new System.Windows.Forms.PictureBox(); - this.object_large = new System.Windows.Forms.PictureBox(); - this.object_small = new System.Windows.Forms.PictureBox(); - this.object_mid = new System.Windows.Forms.PictureBox(); - this.scorelabel = new System.Windows.Forms.Label(); - this.PicBonus = new System.Windows.Forms.PictureBox(); - this.clock = new System.Windows.Forms.Timer(this.components); - this.pgcontents.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.player)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.QuitButton)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.BeginButton)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_small2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_mid2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_large)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_small)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_mid)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PicBonus)).BeginInit(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.player); - this.pgcontents.Controls.Add(this.QuitButton); - this.pgcontents.Controls.Add(this.BeginButton); - this.pgcontents.Controls.Add(this.DescriptionLabel); - this.pgcontents.Controls.Add(this.object_small2); - this.pgcontents.Controls.Add(this.object_mid2); - this.pgcontents.Controls.Add(this.object_large); - this.pgcontents.Controls.Add(this.object_small); - this.pgcontents.Controls.Add(this.object_mid); - this.pgcontents.Controls.Add(this.scorelabel); - this.pgcontents.Controls.Add(this.PicBonus); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(418, 478); - this.pgcontents.TabIndex = 20; - // - // player - // - this.player.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.player.BackColor = System.Drawing.Color.Transparent; - this.player.Image = global::ShiftOS.Properties.Resources.player_Image; - this.player.Location = new System.Drawing.Point(192, 445); - this.player.Name = "player"; - this.player.Size = new System.Drawing.Size(32, 32); - this.player.TabIndex = 18; - this.player.TabStop = false; - // - // QuitButton - // - this.QuitButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.QuitButton.Image = global::ShiftOS.Properties.Resources.QuitButton_Image; - this.QuitButton.InitialImage = global::ShiftOS.Properties.Resources.QuitButton_Image; - this.QuitButton.Location = new System.Drawing.Point(216, 424); - this.QuitButton.Name = "QuitButton"; - this.QuitButton.Size = new System.Drawing.Size(200, 50); - this.QuitButton.TabIndex = 12; - this.QuitButton.TabStop = false; - this.QuitButton.Click += new System.EventHandler(this.QuitButton_Click); - // - // BeginButton - // - this.BeginButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.BeginButton.Image = global::ShiftOS.Properties.Resources.BeginButton1; - this.BeginButton.InitialImage = global::ShiftOS.Properties.Resources.BeginButton_Image; - this.BeginButton.Location = new System.Drawing.Point(3, 424); - this.BeginButton.Name = "BeginButton"; - this.BeginButton.Size = new System.Drawing.Size(200, 50); - this.BeginButton.TabIndex = 11; - this.BeginButton.TabStop = false; - this.BeginButton.Click += new System.EventHandler(this.BeginButton_Click); - // - // DescriptionLabel - // - this.DescriptionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.DescriptionLabel.Location = new System.Drawing.Point(3, 3); - this.DescriptionLabel.Name = "DescriptionLabel"; - this.DescriptionLabel.Size = new System.Drawing.Size(413, 409); - this.DescriptionLabel.TabIndex = 10; - this.DescriptionLabel.Text = "Placeholder"; - // - // object_small2 - // - this.object_small2.Image = global::ShiftOS.Properties.Resources.object_small2_Image; - this.object_small2.Location = new System.Drawing.Point(75, 43); - this.object_small2.Name = "object_small2"; - this.object_small2.Size = new System.Drawing.Size(75, 20); - this.object_small2.TabIndex = 17; - this.object_small2.TabStop = false; - // - // object_mid2 - // - this.object_mid2.Image = global::ShiftOS.Properties.Resources.object_mid2_Image; - this.object_mid2.Location = new System.Drawing.Point(279, 134); - this.object_mid2.Name = "object_mid2"; - this.object_mid2.Size = new System.Drawing.Size(125, 20); - this.object_mid2.TabIndex = 16; - this.object_mid2.TabStop = false; - // - // object_large - // - this.object_large.Image = global::ShiftOS.Properties.Resources.object_large_Image; - this.object_large.Location = new System.Drawing.Point(49, 208); - this.object_large.Name = "object_large"; - this.object_large.Size = new System.Drawing.Size(175, 20); - this.object_large.TabIndex = 15; - this.object_large.TabStop = false; - // - // object_small - // - this.object_small.Image = global::ShiftOS.Properties.Resources.object_small_Image; - this.object_small.Location = new System.Drawing.Point(290, 294); - this.object_small.Name = "object_small"; - this.object_small.Size = new System.Drawing.Size(75, 20); - this.object_small.TabIndex = 13; - this.object_small.TabStop = false; - // - // object_mid - // - this.object_mid.Image = global::ShiftOS.Properties.Resources.object_mid_Image; - this.object_mid.Location = new System.Drawing.Point(58, 371); - this.object_mid.Name = "object_mid"; - this.object_mid.Size = new System.Drawing.Size(125, 20); - this.object_mid.TabIndex = 14; - this.object_mid.TabStop = false; - // - // scorelabel - // - this.scorelabel.AutoSize = true; - this.scorelabel.BackColor = System.Drawing.Color.Transparent; - this.scorelabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.scorelabel.Location = new System.Drawing.Point(3, 4); - this.scorelabel.Name = "scorelabel"; - this.scorelabel.Size = new System.Drawing.Size(51, 55); - this.scorelabel.TabIndex = 19; - this.scorelabel.Text = "0"; - // - // PicBonus - // - this.PicBonus.Image = global::ShiftOS.Properties.Resources.PicBonus_Image; - this.PicBonus.Location = new System.Drawing.Point(187, 84); - this.PicBonus.Name = "PicBonus"; - this.PicBonus.Size = new System.Drawing.Size(16, 11); - this.PicBonus.TabIndex = 20; - this.PicBonus.TabStop = false; - this.PicBonus.Visible = false; - // - // clock - // - this.clock.Interval = 20; - this.clock.Tick += new System.EventHandler(this.clock_Tick); - // - // Dodge - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(418, 478); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.MaximizeBox = false; - this.Name = "Dodge"; - this.Text = "Dodge"; - this.TopMost = true; - this.Load += new System.EventHandler(this.Form1_Load); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_keydown); - this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); - this.pgcontents.ResumeLayout(false); - this.pgcontents.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.player)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.QuitButton)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.BeginButton)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_small2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_mid2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_large)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_small)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.object_mid)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PicBonus)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.PictureBox player; - internal System.Windows.Forms.PictureBox QuitButton; - internal System.Windows.Forms.PictureBox BeginButton; - internal System.Windows.Forms.Label DescriptionLabel; - internal System.Windows.Forms.PictureBox object_small2; - internal System.Windows.Forms.PictureBox object_mid2; - internal System.Windows.Forms.PictureBox object_large; - internal System.Windows.Forms.PictureBox object_small; - internal System.Windows.Forms.PictureBox object_mid; - internal System.Windows.Forms.Label scorelabel; - internal System.Windows.Forms.Timer clock; - internal System.Windows.Forms.PictureBox PicBonus; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Dodge.cs b/source/WindowsFormsApplication1/Dodge.cs deleted file mode 100644 index 320347d..0000000 --- a/source/WindowsFormsApplication1/Dodge.cs +++ /dev/null @@ -1,291 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Dodge : Form - { - /// - /// C# port of Dodge made by william.1008 in ShiftOS 0.0.8. - /// - public Dodge() - { - InitializeComponent(); - } - - //the speed the game runs at - decimal speed; - //the score/code points the player gets - int score; - //user can use mouse or keyboard, mouse by default, chnages to true if key pressed - bool usingkeys = false; - //Records the time spent playing, used for codepoints formula - decimal time = 0; - //Number or bonus play collects - int bonusesfound; - //for smooth keyboard gameplay, 1=left, 2=right, 0=none - int keyboardinput = 0; - - //When quit clicked - // ERROR: Handles clauses are not supported in C# - private void QuitButton_Click(object sender, EventArgs e) - { - this.Close(); - } - - // ERROR: Handles clauses are not supported in C# - private void Form1_KeyUp(object sender, KeyEventArgs e) - { - keyboardinput = 0; - } - - // ERROR: Handles clauses are not supported in C# - private void Form1_Load(object sender, EventArgs e) - { - player.Visible = false; - // hide player and score until game starts - scorelabel.Visible = false; - DescriptionLabel.Text = "Welcome to Dodge. Dodge is a simple arcade game with one objective: survive the falling objects! Use the arrow or mouse to move the player and avoid as many objects as you can. The longer you survive, the more code point you will be rewarded with. Beware, it gets harder..."; - // set the description text - - //to impliment skinning, simply set the picturebox to the new skinned image. - //For example: - //player.Image = Image.FromFile("PATH TO SKINNED IMAGE") - } - - //When begin click - // ERROR: Handles clauses are not supported in C# - private void BeginButton_Click(object sender, EventArgs e) - { - - //Hide buttons - BeginButton.Visible = false; - QuitButton.Visible = false; - DescriptionLabel.Visible = false; - - player.Visible = true; - // show the player - speed = 2; - // controls speed of game, will increase as game progresses - scorelabel.Visible = true; - // show score label - bonusesfound = 0; - - //Make sure all objects are in the correct position - object_small.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 300); - object_small2.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 49); - object_mid.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 377); - object_mid2.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 140); - object_large.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 214); - PicBonus.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), -20); - - //Reset time - time = 0; - - usingkeys = false; - - System.Threading.Thread.Sleep(100); - // slight delay before game starts (in milliseconds) - - main(); - // start the main game sub - - //sig() 'infobox sigs - COMMENT THIS OUT - } - - public decimal Rnd() - { - return new Random().Next(0, pgcontents.Width); - } - - public void Form1_keydown(System.Object sender, System.Windows.Forms.KeyEventArgs e) - { - switch (e.KeyCode) - { - case Keys.Right: - // detect right key press - usingkeys = true; - // turn off mouse control - keyboardinput = 2; - break; - case Keys.Left: - usingkeys = true; - keyboardinput = 1; - break; - } - - } - - private bool BlindMode = false; - - private void main() - { - if(BlindMode == true) - { - object_large.Image = null; - object_mid.Image = null; - object_mid2.Image = null; - object_small.Image = null; - object_small2.Image = null; - object_large.BackColor = Color.Black; - object_mid.BackColor = Color.Black; - object_mid2.BackColor = Color.Black; - object_small.BackColor = Color.Black; - object_small2.BackColor = Color.Black; - } - else - { - object_large.Image = Properties.Resources.object_large_Image; - object_mid.Image = null; - object_mid2.Image = null; - object_small.Image = null; - object_small2.Image = null; - object_large.BackColor = Color.Black; - object_mid.BackColor = Color.Black; - object_mid2.BackColor = Color.Black; - object_small.BackColor = Color.Black; - object_small2.BackColor = Color.Black; - } - - clock.Start(); - //the timer restart this sub every tick, making an endless loop between them. - - //score system - scorelabel.Text = score.ToString(); - score = Convert.ToInt16((speed / 10) + (time / 20) + bonusesfound); - - //Speed increase - speed = speed + (speed * (decimal)0.001); - - //increase time - time = time + (decimal)0.05; - //loops every 0.05 seconds so time increases by 1 every second (have I done the maths correctly?) - - //Make objects fall - object_large.Location = new Point(object_large.Location.X, object_large.Location.Y + (int)speed); - object_mid.Location = new Point(object_mid.Location.X, object_mid.Location.Y + (int)speed); - object_mid2.Location = new Point(object_mid2.Location.X, object_mid2.Location.Y + (int)speed); - object_small.Location = new Point(object_small.Location.X, object_small.Location.Y + (int)speed); - object_small2.Location = new Point(object_small2.Location.X, object_small2.Location.Y + (int)speed); - - //mouse controls - // tests if mouse control is enabled - if (usingkeys == false) - { - player.Location = new Point(MousePosition.X - this.Location.X - (player.Size.Width / 2) - 5, player.Location.Y); - //sets the x location to that of the mouse - } - - //keyboard controls - if (usingkeys == true) - { - if (keyboardinput == 1) - { - player.Location = new Point(player.Location.X - ((int)speed * 4), player.Location.Y); - } - if (keyboardinput == 2) - { - player.Location = new Point(player.Location.X + ((int)speed * 4), player.Location.Y); - // move right - } - } - - //move object back to the top of the screen - if (object_small.Location.Y > 522) - { - object_small.Location = new Point((int)(Math.Ceiling((decimal)Rnd())), -20); - //picks a random number between 0 and 453 (window width) and sets the x position to this value. uses -20 for y as it is above the top of window - } - if (object_small2.Location.Y > 522) - { - object_small2.Location = new Point((int)(Math.Ceiling((decimal)Rnd())), -20); - } - if (object_mid.Location.Y > 522) - { - object_mid.Location = new Point((int)(Math.Ceiling(Rnd())), -20); - } - if (object_mid2.Location.Y > 522) - { - object_mid2.Location = new Point((int)(Math.Ceiling(Rnd())), -20); - } - if (object_large.Location.Y > 522) - { - object_large.Location = new Point((int)(Math.Ceiling(Rnd())), -20); - } - - //Makes sure the player is on the screen (Anti-cheating) - if (player.Location.X > 375) - { - player.Location = new Point(385, player.Location.Y); - } - if (player.Location.X < 0) - { - player.Location = new Point(0, player.Location.Y); - } - - //Bonus - if (PicBonus.Visible == false) - { - int ran = (int)Math.Ceiling(Rnd() * 300); - //random 1 in 500 chance - if (ran == 1) - { - PicBonus.Visible = true; - } - } - else { - PicBonus.Location = new Point(PicBonus.Location.X, PicBonus.Location.Y + (int)speed); - if (PicBonus.Location.Y > 522) - { - PicBonus.Location = new Point((int)Math.Ceiling(Rnd()), -20); - PicBonus.Visible = false; - } - } - - //check collisions - if (player.Bounds.IntersectsWith(object_mid.Bounds) | player.Bounds.IntersectsWith(object_mid2.Bounds) | player.Bounds.IntersectsWith(object_large.Bounds) | player.Bounds.IntersectsWith(object_small.Bounds) | player.Bounds.IntersectsWith(object_small2.Bounds)) - { - clock.Stop(); - //breaks loop - System.Threading.Thread.Sleep(333); - //delay for a third of a second - player.Visible = false; - //hide game - DescriptionLabel.Text = "Sorry, you just lost the game, however, you earnt a total of " + score + " code points. To earn more code points, press the begin button now. To exit, press the quit button"; - // change the description to the die message - API.AddCodepoints(score); - DescriptionLabel.Visible = true; - //show non-game elements - BeginButton.Visible = true; - QuitButton.Visible = true; - scorelabel.Visible = false; - } - if (player.Bounds.IntersectsWith(PicBonus.Bounds)) - { - PicBonus.Visible = false; - bonusesfound = bonusesfound + 1; - PicBonus.Location = new Point((int)(Math.Ceiling(Rnd())), -20); - } - - } - - // ERROR: Handles clauses are not supported in C# - private void clock_Tick(object sender, EventArgs e) - { - main(); - //repeat the main sub (endless loop) - } - - private void sig() - { - API.CreateInfoboxSession("FLAG", "There is no foul on the play, the punt was blocked.", infobox.InfoboxMode.Info); - } - } -} diff --git a/source/WindowsFormsApplication1/Dodge.resx b/source/WindowsFormsApplication1/Dodge.resx deleted file mode 100644 index f6e2b3b..0000000 --- a/source/WindowsFormsApplication1/Dodge.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 48 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Engine/AudioResourceClient.cs b/source/WindowsFormsApplication1/Engine/AudioResourceClient.cs new file mode 100644 index 0000000..717d43a --- /dev/null +++ b/source/WindowsFormsApplication1/Engine/AudioResourceClient.cs @@ -0,0 +1,208 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using NAudio; +using NAudio.Wave; +using System.Threading; +using Newtonsoft.Json; +using AxWMPLib; +using System.Windows.Forms; +using WMPLib; + +namespace ShiftOS +{ + public class AudioData + { + public string StartURL { get; set; } + public Dictionary> Files { get; set; } + public Dictionary> Visualizers = null; + } + + public class Audio + { + public static string Name + { + get + { + string res = null; + try + { + if (_wmp != null) + { + if (_wmp.currentMedia != null) + { + res = _wmp.currentMedia.name; + } + + } + } + catch + { + + } + return res; + } + } + + private static AudioData _ad = null; + public static WindowsMediaPlayer _wmp = null; + public static bool running = true; + + public static int CurrentPosition + { + get + { + try + { + if (_wmp != null) + { + return (int)_wmp.controls.currentPosition; + } + else + { + return 0; + } + } + catch + { + return 0; + } + } + } + + public static int CurrentPositionMS + { + get + { + try + { + if (_wmp != null) + { + return (int)(_wmp.controls.currentPosition * 100); + } + else + { + return 0; + } + } + catch + { + return 0; + } + } + } + + + public static void LoadAudioData() + { + var t = new Thread(new ThreadStart(() => + { + _wmp = new WindowsMediaPlayer(); + _wmp.settings.autoStart = true; + _wmp.settings.volume = API.LoadedSettings.MusicVolume; + })); + t.Start(); + _ad = JsonConvert.DeserializeObject(Properties.Resources.MusicData); + } + + public static void Play(string list) + { + _forceStop = false; + var lst = _ad.Files[list]; + var rnd = new Random(); + int i = rnd.Next(0, lst.Count); + _wmp.URL = _ad.StartURL + list + "/" + _ad.Files[list][i] + ".mp3"; + _wmp.PlayStateChange += (o) => + { + if (o == (int)WMPPlayState.wmppsMediaEnded) + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 1000; + t.Tick += (object s, EventArgs a) => + { + t.Stop(); + Stopped?.Invoke(_wmp, new EventArgs()); + }; + t.Start(); + } + }; + + } + + public static event EventHandler Stopped; + + public static bool _forceStop = false; + + public static void Mute() + { + _wmp.settings.volume = 0; + } + + public static void VolumeUp() + { + if(_wmp.settings.volume < 90) + { + _wmp.settings.volume += 10; + } + } + + public static void VolumeDown() + { + if(_wmp.settings.volume > 0) + { + _wmp.settings.volume -= 10; + } + } + + public static void Pause() + { + _wmp.controls.pause(); + } + + public static void Unpause() + { + _wmp.controls.play(); + } + + public static void ForceStop() + { + new Thread(new ThreadStart(() => + { + _forceStop = true; + _wmp.controls.stop(); + })).Start(); + } + + internal static Visualizer GetVisualizer() + { + Visualizer v = null; + foreach(var vis in _ad.Visualizers[Name]) + { + if (vis.startTime <= CurrentPosition && vis.endTime >= CurrentPosition) + v = vis; + } + return v; + } + } + + public class Visualizer + { + public int startTime { get; set; } + public int endTime { get; set; } + public VisualizerType type { get; set; } + public bool R { get; set; } + public bool G { get; set; } + public bool B { get; set; } + } + + public enum VisualizerType + { + Pulse, + BuildUp, + CalmDown + } + +} diff --git a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs new file mode 100644 index 0000000..ab87fa7 --- /dev/null +++ b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs @@ -0,0 +1,1280 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using DynamicLua; +using System.IO; +using System.Drawing; +using System.Windows.Forms; +using Gecko; +using System.Net; +using System.IO.Compression; +using System.ComponentModel; +using System.Threading; +using Newtonsoft.Json; + +namespace ShiftOS +{ + public class Lua_API + { + public static List RunningMods = new List(); + public static bool UseLuaAPI = false; + } + + public class LuaInterpreter + { + public dynamic mod = new DynamicLua.DynamicLua(); + public List Errors = new List(); + + /// + /// Creates a new Lua interpreter and interprets a .lua file. + /// + /// The file to interpret. + public LuaInterpreter(string modfile) + { + Errors.Clear(); + //Initiate the interpreter + mod = new DynamicLua.DynamicLua(); + //Register core functions with the interpreter + RegisterCore(); + //Parse the file contents. + var lua = File.ReadAllText(modfile); + var t = new System.Windows.Forms.Timer(); + ThisDirectory = Directory.GetParent(modfile).FullName; + t.Interval = 50; + t.Tick += (object se, EventArgs ea) => + { + if (Errors.Count > 0) + { + if (API.LoggerTerminal != null) + { + API.LoggerTerminal.WriteLine(Errors[0]); + Errors.Remove(Errors[0]); + } + else + { + API.CreateInfoboxSession("Script Error", $"An error has occurred in your script: {Errors[0]}", infobox.InfoboxMode.Info); + Errors.Remove(Errors[0]); + } + ExitScript(); + } + }; + t.Start(); + try + { + mod(lua); + } + catch (Exception ex) + { + API.CreateInfoboxSession("Mod Interpretation Error", "An error has occurred in your mod." + Environment.NewLine + Environment.NewLine + ex.Message, infobox.InfoboxMode.Info); + } + } + + /// + /// Creates a new Lua Interpreter but doesn't interpret a file. + /// + public LuaInterpreter() + { + Errors.Clear(); + //Initiate the interpreter + mod = new DynamicLua.DynamicLua(); + //Register core functions with the interpreter + RegisterCore(); + var t = new System.Windows.Forms.Timer(); + t.Interval = 50; + ThisDirectory = Paths.SaveRoot; + t.Tick += (object se, EventArgs ea) => + { + if (Errors.Count > 0) + { + if (API.LoggerTerminal != null) + { + API.LoggerTerminal.WriteLine(Errors[0]); + Errors.Remove(Errors[0]); + } + else + { + API.CreateInfoboxSession("Script Error", $"An error has occurred in your script: {Errors[0]}", infobox.InfoboxMode.Info); + Errors.Remove(Errors[0]); + } + ExitScript(); + } + }; + t.Start(); + } + + /// + /// Registers all core ShiftOS Lua functions with their C# counterparts. + /// + /// This is so we don't have to expose the entire source code to the interpreter. Add new functions here. + /// + public void RegisterCore() + { + //Shifter Extension API + mod.shifter_add_category = new Action((name) => + { + bool add = true; + if(API.LuaShifterRegistry == null) + { + API.LuaShifterRegistry = new Dictionary>(); + } + foreach(var kv in API.LuaShifterRegistry) + { + if (kv.Key == name) + add = false; + } + if(add == true) + { + API.LuaShifterRegistry.Add(name, new Dictionary()); + } + else + { + Errors.Add($"shifter_add_category(\"{name}\"): Error: Category already exists!"); + } + }); + mod.shifter_remove_category = new Action((name) => + { + if(API.LuaShifterRegistry.ContainsKey(name)) + { + API.LuaShifterRegistry.Remove(name); + } + else + { + Errors.Add($"shifter_remove_category(\"{name}\"): No such category."); + } + }); + mod.shifter_add_value = new Action((cat, name, in_value) => + { + if(API.LuaShifterRegistry.ContainsKey(cat)) + { + var lst = API.LuaShifterRegistry[cat]; + if(!lst.ContainsKey(name)) + { + lst.Add(name, in_value); + } + else + { + Errors.Add($"shifter_add_value(\"{cat}\", \"{name}\", in_value): Category was found, but it already contained a value with the specified name."); + } + } + else + { + Errors.Add($"shifter_add_value(\"{cat}\", \"{name}\", in_value): Category not found."); + } + }); + mod.shifter_get_value = new Func((cat, name) => + { + if (API.LuaShifterRegistry.ContainsKey(cat)) + { + var lst = API.LuaShifterRegistry[cat]; + if (lst.ContainsKey(name)) + { + return lst[name]; + } + else + { + Errors.Add($"shifter_add_value(\"{cat}\", \"{name}\", in_value): Category was found, but it already contained a value with the specified name."); + return null; + } + } + else + { + Errors.Add($"shifter_add_value(\"{cat}\", \"{name}\", in_value): Category not found."); + return null; + } + }); + + + //APIs. + mod.load_api = new Action((name) => + { + if(File.Exists(Paths.APIs + name + ".lua")) + { + mod(File.ReadAllText(Paths.APIs + name + ".lua")); + } + }); + + //Functions with Return Values + mod.get_app_launcher_items = new Func>(() => + { + var lst = new List(); + API.GetAppLauncherItems(); + foreach(var itm in API.AppLauncherItems) + { + if(itm.Display == true) + { + lst.Add(itm); + } + } + return lst; + }); + mod.local_image = new Func((filepath) => OpenLocalImage(filepath)); + mod.json_serialize = new Func((objectToSerialize) => Newtonsoft.Json.JsonConvert.SerializeObject(objectToSerialize)); + mod.json_unserialize = new Func((json_string) => Newtonsoft.Json.JsonConvert.DeserializeObject(json_string)); + mod.open_image = new Func((filename) => OpenImage(filename)); + mod.get_skin = new Func(() => + { + return API.CurrentSkin; + }); + mod.get_skin_images = new Func(() => + { + return API.CurrentSkinImages; + }); + mod.upgrades = new Func((id) => GetUpgrade(id)); + mod.create_widget = new Func((type, text, x, y, width, height, dark_mode) => ConstructControl(type, text, x, y, width, height, dark_mode)); + mod.screen_get_width = new Func(() => + { + return System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width; + }); + mod.screen_get_height = new Func(() => + { + return System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height; + }); + mod.create_window_borderless = new Func((x, y, width, height) => CreateForm(x, y, width, height)); + + mod.random = new Func((min, max) => + { + return new Random().Next(min, max); + }); + mod.color = new Func((r, g, b) => + { + try + { + return Color.FromArgb(r, g, b); + } + catch + { + Errors.Add("Invalid color values. Values must be a minimum of 0 and a maximum of 255."); + return new Color(); + } + }); + mod.speechrec_create = new Func(() => + { + return new SpeechListener(); + }); + mod.speechrec_on_recognize = new Action((obj, func) => + { + obj.OnRecognize += (object s, EventArgs a) => + { + mod($"{func}('{s.ToString()}')"); + }; + obj.Engine.RecognizeAsync(); + }); + mod.get_desktop_session = new Func
(() => + { + return API.CurrentSession; + }); + mod.get_icon = new Func((id) => API.GetIcon(id)); + mod.add_icon = new Action((id, img) => + { + if(!API.IconRegistry.ContainsKey(id)) + { + API.IconRegistry.Add(id, img); + Skinning.Utilities.saveimages(); + } + }); + mod.icon_exists = new Func((id) => + { + return API.IconRegistry.ContainsKey(id); + }); + mod.create_window = new Func((title, icon, width, height) => CreateForm(title, icon, width, height)); + mod.get_codepoints = new Func(() => GetCP()); + mod.buy_upgrade = new Func((id) => BuyUPG(id)); + mod.time = new Func(() => API.GetTime()); + mod.encrypt = new Func((raw) => API.Encryption.Encrypt(raw)); + mod.decrypt = new Func((raw) => API.Encryption.Decrypt(raw)); + mod.fread = new Func((filepath) => SafeFileRead(filepath)); + mod.terminal = new Action((command) => + { + var t = new Terminal(); + API.CreateForm(t, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); + t.command = command; + t.DoCommand(); + }); + mod.fwrite = new Action((path, contents) => + { + if (path.StartsWith("/")) + { + var real_path = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; + if(!Directory.Exists(real_path)) + { + File.WriteAllText(real_path, contents); + } + } + }); + mod.add_menu_item = new Func((text, parent) => AddMenuItem(text, parent)); + mod.add_child_menu_item = new Func((text, parent) => + { + try + { + var i = new ToolStripMenuItem(); + i.Text = text; + parent.DropDownItems.Add(i); + return i; + } + catch(Exception ex) + { + Errors.Add("add_child_menu_item(): Error adding child item to parent. " + ex.Message); + return null; + } + }); + mod.set_anchor = new Action((ctrl, anchorstyle) => SetAnchor(ctrl, anchorstyle)); + + //Standard API Functions + mod.include = new Action((filepath) => IncludeScript(filepath)); + mod.log = new Action((msg) => API.Log(msg)); + mod.add_codepoints = new Action((amount) => API.AddCodepoints(amount)); + mod.remove_codepoints = new Action((amount) => API.RemoveCodepoints(amount)); + mod.launch_mod = new Action((modSAA) => API.LaunchMod(Paths.SaveRoot + modSAA.Replace("/", OSInfo.DirectorySeparator))); + mod.open_program = new Action((progname) => API.OpenProgram(progname)); + mod.close_program = new Action((progname) => API.CloseProgram(progname)); + mod.close_everything = new Action(() => API.CloseEverything()); + mod.shutdown = new Action(() => API.ShutDownShiftOS()); + mod.update_ui = new Action(() => { API.UpdateWindows(); API.CurrentSession.SetupDesktop(); }); + mod.load_skin = new Action((filepath) => Skinning.Utilities.loadsknfile(filepath)); + mod.save_to_skin_file = new Action((filepath) => Skinning.Utilities.saveskintofile(filepath)); + mod.on_click = new Action((ctrl, funcname) => RegClick(ctrl, funcname)); + mod.add_widget_to_window = new Action((win, ctrl) => AddCtrl(win, ctrl)); + mod.open_file = new Action((filters, function) => OpenFile(filters, function)); + mod.panel_add_widget = new Action((ctrl, parent) => + { + try { + var p = (Panel)parent; + p.Controls.Add(ctrl); + } catch(Exception ex) + { + Errors.Add(ex.Message); + } + }); + mod.flow_add_widget = new Action((ctrl, parent) => + { + try + { + var p = (FlowLayoutPanel)parent; + p.Controls.Add(ctrl); + } + catch (Exception ex) + { + Errors.Add(ex.Message); + } + }); + mod.info = new Action((title, message) => + + API.CreateInfoboxSession(title, message, infobox.InfoboxMode.Info) + + ); + mod.on_menu_item_activate = new Action((item, function) => + { + item.Click += (object s, EventArgs a) => + { + mod($"{function}()"); + }; + }); + mod.create_timer = new Func((interval) => + { + var t = new System.Windows.Forms.Timer(); + t.Interval = interval; + return t; + }); + mod.timer_on_tick = new Action((tmr, func) => + { + try + { + tmr.Tick += (object s, EventArgs a) => + { + mod($"{func}()"); + }; + } + catch(Exception ex) + { + Errors.Add(ex.Message); + } + }); + mod.add_widget_to_desktop = new Action((ctrl) => AddToDesktop(ctrl)); + mod.set_dock = new Action((ctrl, dstyle) => + { + API.CurrentSession.Invoke(new Action(() => + { + switch (dstyle.ToLower()) + { + case "fill": + ctrl.Dock = DockStyle.Fill; + break; + case "top": + ctrl.Dock = DockStyle.Top; + break; + case "bottom": + ctrl.Dock = DockStyle.Bottom; + break; + case "left": + ctrl.Dock = DockStyle.Left; + break; + case "right": + ctrl.Dock = DockStyle.Right; + break; + case "none": + ctrl.Dock = DockStyle.None; + break; + + + + + } + })); + }); + mod.webview_navigate = new Action((wv, url) => Navigate(wv, url)); + mod.open_terminal = new Action(() => + { + var t = new Terminal(); + API.CreateForm(t, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); + }); + mod.create_directory = new Action((path) => + { + path = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + }); + mod.exists = new Func((path) => + { + path = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; + if(Directory.Exists(path)) + { + return true; + } + else if(File.Exists(path)) + { + return true; + } + else + { + return false; + } + }); + mod.notify = new Action((title, message) => API.CurrentSession.AddNotification(title, message)); + mod.download_file = new Action((web_address, local) => DownloadFile(web_address, local)); + mod.on_key_down = new Action((ctrl, action) => RegKeyDown(ctrl, action)); + mod.get_files = new Func>((path) => GetFiles(path)); + mod.get_folders = new Func>((path) => GetFolders(path)); + mod.zip = new Action((source, destination) => + { + var real = $"{Paths.SaveRoot}{source.Replace("/", OSInfo.DirectorySeparator)}"; + if(Directory.Exists(real)) + { + var real_dest = $"{Paths.SaveRoot}{destination.Replace("/", OSInfo.DirectorySeparator)}"; + ZipFile.CreateFromDirectory(real, real_dest); + } + else + { + mod.info("Script Error", "Your script tried to zip up a non-existent folder."); + } + }); + mod.beep = new Action((freq, dur) => Beep(freq, dur)); + mod.color_picker += new Action((title, oldcolor, func) => + { + API.CreateColorPickerSession(title, oldcolor); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var c = API.GetLastColorFromSession(); + mod($"{func}(color({c.R}, {c.G}, {c.B}))"); + }; + }); + mod.info_yes_no += new Action((title, message, func) => + { + API.CreateInfoboxSession(title, message, infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if(res == "Yes" || res == "No") + { + mod($"{func}(\"{res}\")"); + } + }; + }); + + + //Script Management + mod.exit = new Action(() => ExitScript()); + mod.shutdown = new Action(() => API.ShutDownShiftOS()); + mod.toggle_unity = new Action(() => API.CurrentSession.SetUnityMode()); + mod.lua = new Func((luacode) => + { + var li = new LuaInterpreter(); + try + { + li.mod(luacode); + return "success"; + } + catch (Exception ex) + { + return ex.Message; + } + }); + mod.fileskimmer_open += new Action((filters, func) => + { + API.CreateFileSkimmerSession(filters, File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + var real_path = res.Replace(Paths.SaveRoot, "/").Replace("\\", "/"); + mod($"{func}(\"{real_path}\")"); + } + }; + }); + mod.fileskimmer_save += new Action((filters, func) => + { + API.CreateFileSkimmerSession(filters, File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + var real_path = res.Replace(Paths.SaveRoot, "/").Replace("\\", "/"); + mod($"{func}(\"{real_path}\")"); + } + }; + }); + mod.gen_font = new Func((style, size) => { + return new Font(style, size); + }); + + + //other + mod.fileskimmer = new Action((folder) => OpenFS(folder)); + mod.fopen = new Action((file) => OpenFile(file)); + mod.loadstring = new Action((code) => { mod(code); }); + + //Multithreading + mod.new_thread = new Func((code) => + { + return new Thread(() => + { + mod(code); + }); + }); + mod.start_async = new Action((t) => { t.Start(); }); + + mod.add_applauncher_item = new Action((name, lua) => + { + var m = new ModApplauncherItem(); + m.Name = name; + m.Lua = lua; + File.WriteAllText(Paths.Mod_AppLauncherEntries + m.Name, JsonConvert.SerializeObject(m)); + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + }); + mod.get_loaded_skin = new Func(() => { return API.CurrentSkin; }); + mod.reload_skin = new Action(() => { API.CurrentSession.SetupDesktop(); API.UpdateWindows(); }); + mod.get_applauncher_item = new Func((name) => + { + ToolStripMenuItem i = null; + foreach(var item in API.CurrentSession.ApplicationsToolStripMenuItem.DropDownItems) + { + try { + ToolStripMenuItem it = (ToolStripMenuItem)item; + if (it.Text == name) + { + i = it; + } + } + catch + { + + } + } + return i; + }); + mod.get_menu_item = new Func((parent, name) => + { + ToolStripMenuItem i = null; + foreach (ToolStripMenuItem item in parent.DropDownItems) + { + if (item.Text == name) + { + i = item; + } + } + return i; + }); + GC.Collect(); + } + + + /// + /// Sends a keydown event to Lua when you press a key on the specified control. + /// + /// Control to assign the event to. + /// Function to call on keydown. + public void RegKeyDown(Control ctrl, string action) + { /* */ + ctrl.KeyDown += (object s, KeyEventArgs a) => + { + mod($"{action}(\"{a.KeyCode.ToString().ToLower()}\")"); + }; + } + + /// + /// Gets a list of files. + /// + /// Directory to scan. + /// A System.Collections.Generic.List of all files. + public List GetFiles(string dir) + { + if (Directory.Exists($"{Paths.SaveRoot}{dir.Replace("/", OSInfo.DirectorySeparator)}")) + { + var luatable = new List(); + foreach (string val in Directory.GetFiles($"{Paths.SaveRoot}{dir.Replace("/", OSInfo.DirectorySeparator)}")) + { + luatable.Add(val); + } + return luatable; + } + else + { + return null; + } + } + + /// + /// Gets a list of folders. + /// + /// Directory to scan. + /// A System.Collections.Generic.List of all folders. + + public List GetFolders(string dir) + { + if (Directory.Exists($"{Paths.SaveRoot}{dir.Replace("/", OSInfo.DirectorySeparator)}")) + { + var luatable = new List(); + foreach(string val in Directory.GetDirectories($"{Paths.SaveRoot}{dir.Replace("/", OSInfo.DirectorySeparator)}")) + { + luatable.Add(val); + } + + + return luatable; + } + else + { + return null; + } + } + + public string ThisDirectory = null; + + /// + /// Downloads a file. + /// + /// Web URL to download + /// A ShiftOS path to download to. + public void DownloadFile(string web, string local) + { + var wc = new WebClient(); + try + { + var real_path = $"{Paths.SaveRoot}{local.Replace("/", OSInfo.DirectorySeparator)}"; + wc.DownloadFile(web, real_path); + mod.notify("Download complete", "Successfully downloaded file " + web + " from the Internet."); + } + catch(Exception ex) + { + mod.print("Could not download remote file " + web + ", " + ex.Message); + } + } + + /// + /// Interprets a script within this interpreter. + /// + /// Script file. + public void IncludeScript(string filename) + { + var real_file = $"{ThisDirectory}{filename.Replace("/", OSInfo.DirectorySeparator)}"; + var lua = File.ReadAllText(real_file); + try { + mod(lua); + } + catch(Exception ex) + { + mod.info("Script Error", "An error has occurred in your script: " + ex.Message); + } + } + + /// + /// Open a file skimmer in the specified directory. + /// + /// Directory to open in. + public void OpenFS(string dir) + { + var f = new File_Skimmer(); + API.CreateForm(f, API.LoadedNames.FileSkimmerName, Properties.Resources.iconFileSkimmer); + if(dir.StartsWith("/")) + { + var real = dir; + var real_slash = real.Replace("/", OSInfo.DirectorySeparator); + var real_path = $"{Paths.SaveRoot}{real_slash}"; + f.CurrentFolder = real_path; + f.ListFiles(); + } + } + + /// + /// Opens a file in the right program. + /// + /// The file path. Why this is named "dir", which means DIRECTORY, not FILE, by the way, is beyond me. + public void OpenFile(string dir) + { + var f = new File_Skimmer(); + if (dir.StartsWith("/")) + { + var real = dir; + var real_slash = real.Replace("/", OSInfo.DirectorySeparator); + var real_path = $"{Paths.SaveRoot}{real_slash}"; + f.OpenFile(real_path); + } + } + + public List OpenForms = new List(); + + /// + /// Exits the script. What did you think it would do? + /// + public void ExitScript() + { + foreach(Form f in OpenForms) + { + f.Close(); + } + } + + /// + /// Set control anchor from Lua. + /// + /// Target control + /// Anchor string (for example "top;left;bottom;right" or "top;left" or "top") + public void SetAnchor(Control ctrl, string anchor) + { + var a = AnchorStyles.None; + var l = anchor.ToLower(); + if(l.Contains("left")) + { + a = a | AnchorStyles.Left; + } + if (l.Contains("right")) + { + a = a | AnchorStyles.Right; + } + if (l.Contains("bottom")) + { + a = a | AnchorStyles.Bottom; + } + if (l.Contains("top")) + { + a = a | AnchorStyles.Bottom; + } + ctrl.Anchor = a; + } + + /// + /// Navigate a webview to the specified URL. + /// + /// The webview control. YES, We use Gecko, not Internet Exploder. + /// The target URL, for example "http://playshiftos.ml/forum" + public void Navigate(GeckoWebBrowser wv, string url) + { + wv.Navigate(url); + } + + /// + /// Add a control to the desktop. + /// + /// The control to add. + public void AddToDesktop(Control ctrl) + { + API.CurrentSession.Controls.Add(ctrl); + } + + /// + /// Add a child to a menu item. + /// + /// New item's text + /// New item's parent. + /// The new item. + public ToolStripMenuItem AddMenuItem(string text, MenuStrip parent) + { + var itm = new ToolStripMenuItem(); + itm.Text = text; + itm.Tag = "menu_item"; + parent.Items.Add(itm); + return itm; + } + + /// + /// Allows the user to get a user to open a file. + /// + /// File filter. + /// Function to call on select. + public void OpenFile(string fi, string fu) + { + API.CreateFileSkimmerSession(fi, File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + mod($"{fu}({API.GetFSResult()})"); + }; + } + + /// + /// Prompt user to save a file. + /// + /// File filters. + /// Function to call. + public void SaveFile(string fi, string fu) + { + API.CreateFileSkimmerSession(fi, File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + mod($"{fu}({API.GetFSResult()})"); + }; + } + + + /// + /// Safely read a file. + /// + /// File to read. + /// Contents of the file. + public string SafeFileRead(string path) + { + string contents = ""; + if(path.StartsWith("/")) + { + var real = $"{Paths.SaveRoot}{path.Replace("\\", "/")}"; + if(File.Exists(real)) + { + contents = File.ReadAllText(real); + + } + else + { + Errors.Add("fread(): File not found."); + } + } + else + { + Errors.Add("fread(): Path not valid."); + } + return contents; + } + + /// + /// Buy a shiftorium upgrade. + /// + /// Upgrade ID. + /// Did the upgrade get bought successfully? + public bool BuyUPG(string id) + { + if(API.Upgrades.ContainsKey(id)) + { + bool bought = false; + foreach(Shiftorium.Upgrade upg in SaveSystem.ShiftoriumRegistry.DefaultUpgrades) + { + if(upg.id == id) + { + bought = Shiftorium.Utilities.Buy(upg); + } + } + return bought; + } + else + { + //Upgrade doesn't exist. + return false; + } + } + + /// + /// Checks if an upgrade is bought. + /// + /// Upgrade ID. + /// Whether or not it is bought + public bool GetUpgrade(string id) + { + if(API.Upgrades.ContainsKey(id)) + { + return API.Upgrades[id]; + } + else + { + //Upgrade doesn't exist. + return false; + } + } + + /// + /// Gets the current amount of Codepoints. + /// + /// Can you read? Sorry, it's just... I don't feel like typing the same thing twice... + public int GetCP() + { + return API.CurrentSave.codepoints; + } + + /// + /// Constructs a WinForms control. + /// + /// Control type. + /// Control text. + /// X coordinate. + /// Y coordinate. + /// Width. + /// Height. + /// Is it dark? + /// The control, all ShiftOS-ified for you. + public Control ConstructControl(string type, string text, int x, int y, int width, int height, bool darkmode) + { + var ctrl = new Control(); + switch(type.ToLower()) + { + case "button": + var btn = new Button(); + btn.FlatStyle = FlatStyle.Flat; + if(darkmode) + { + //Set dark button + btn.ForeColor = API.CurrentSkin.titletextcolour; + btn.BackColor = API.CurrentSkin.titlebarcolour; + } + else + { + btn.BackColor = Color.White; + btn.ForeColor = Color.Black; + } + ctrl = (Control)btn; + break; + case "webview": + var g = new Gecko.GeckoWebBrowser(); + g.NoDefaultContextMenu = true; + ctrl = (Gecko.GeckoWebBrowser)g; + //This control renders HTML, so therefore a dark theme is futile. + break; + case "menustrip": + ctrl = new MenuStrip(); + ctrl.Tag = "menustrip"; + //Menu Strips are rendered using a custom renderer, thus, DarkMode is not required. + break; + case "panel": + ctrl = new Panel(); + if(darkmode) + { + ctrl.BackColor = API.CurrentSkin.titlebarcolour; + ctrl.ForeColor = API.CurrentSkin.titletextcolour; + } + else + { + ctrl.BackColor = Color.White; + ctrl.ForeColor = Color.Black; + } + break; + case "flow": + ctrl = new FlowLayoutPanel(); + if(darkmode) + { + ctrl.BackColor = API.CurrentSkin.titlebarcolour; + ctrl.ForeColor = API.CurrentSkin.titletextcolour; + } + else + { + ctrl.BackColor = Color.White; + ctrl.ForeColor = Color.Black; + } + break; + case "label": + ctrl = new Label(); + //Text Color and Back Color inherited from parent. + break; + case "textbox": + ctrl = new TextBox(); + if(darkmode) + { + ctrl.BackColor = API.CurrentSkin.titlebarcolour; + ctrl.ForeColor = API.CurrentSkin.titletextcolour; + } + else + { + ctrl.BackColor = Color.White; + ctrl.ForeColor = Color.Black; + } + break; + case "richtextbox": + ctrl = new RichTextBox(); + if(darkmode) + { + ctrl.BackColor = API.CurrentSkin.titlebarcolour; + ctrl.ForeColor = API.CurrentSkin.titletextcolour; + } + else + { + ctrl.BackColor = Color.White; + ctrl.ForeColor = Color.Black; + } + break; + default: + ctrl = new Control(); + if(darkmode) + { + ctrl.BackColor = API.CurrentSkin.titlebarcolour; + ctrl.ForeColor = API.CurrentSkin.titletextcolour; + } + else + { + ctrl.BackColor = Color.White; + ctrl.ForeColor = Color.Black; + } + break; + } + ctrl.Text = text; + ctrl.Name = text.ToLower().Replace(" ", "_"); + ctrl.Location = new Point(x, y); + ctrl.Size = new Size(width, height); + ctrl.Visible = true; + return ctrl; + } + + + /// + /// Broken, piece of dump beep function. + /// + /// Frequency. + /// Length. + public void Beep(int freq, int duration) + { + Beeper.Play(freq, duration); + + } + + /// + /// Adds a control to a window. + /// + /// Target window + /// Control to add. + public void AddCtrl(Form win, Control ctrl) + { + + List borders = new List(); + foreach(Control c in win.Controls) + { + if(c.Name == "api_brdr") + { + var b = (WindowBorder)c; + b.pgcontents.Controls.Add(ctrl); + ctrl.BringToFront(); + borders.Add(b); + } + } + if(borders.Count == 0) + { + win.Controls.Add(ctrl); + } + + } + + /// + /// Fire a click event when you click the control. + /// + /// Target control + /// Function to call. + public void RegClick(Control ctrl, string funcname) + { + ctrl.MouseDown += (object s, MouseEventArgs a) => + { + if (a.Button == MouseButtons.Left) + { + mod($"{funcname}()"); + } + }; + } + + /// + /// Creates a ShiftOS window. + /// + /// Window title. + /// Window icon + /// Width + /// Height + /// The new window + public Form CreateForm(string title, Image img, int width, int height) + { + GC.Collect(); + //Create new Form instance. + var f = new Form(); + //Set size of form + if(width < 100) + { + width = 100; + } + if(height < 100) + { + height = 100; + } + f.Size = new Size(width, height); + //ShiftOSify it. + API.CreateForm(f, title, img); + //Add to list of forms that should be closed on script exit + OpenForms.Add(f); + //Return it. + return f; + } + + /// + /// Creates a borderless window. + /// + /// Starting X coordinate. + /// Starting Y coordinate + /// Width + /// Height + /// The new window. + public Form CreateForm(int x, int y, int width, int height) + { + GC.Collect(); + //Create new Form instance. + var f = new Form(); + //Set size of form + if (width < 100) + { + width = 100; + } + if (height < 100) + { + height = 100; + } + f.Size = new Size(width, height); + f.FormBorderStyle = FormBorderStyle.None; + f.Location = new Point(x, y); + f.Show(); + //Add to list of forms that should be closed on script exit + OpenForms.Add(f); + //Return it. + return f; + } + + /// + /// Opens an image file. + /// + /// File path + /// Loaded image + public Image OpenLocalImage(string filepath) + { + if (filepath.StartsWith("/")) + { + var real = $"{ThisDirectory}{filepath.Replace("/", OSInfo.DirectorySeparator)}"; + if (File.Exists(real)) + { + try + { + return Image.FromFile(real); + } + catch (Exception ex) + { + Errors.Add(ex.Message); + return null; + } + + } + else + { + Errors.Add($"open_image({filepath}): File not found."); + return null; + } + } + else + { + Errors.Add($"open_image({filepath}): Not a valid file path."); + return null; + } + } + + /// + /// Opens an image file. + /// + /// File path + /// Loaded image + public Image OpenImage(string filepath) + { + if (filepath.StartsWith("/")) + { + var real = $"{Paths.SaveRoot}{filepath.Replace("/", OSInfo.DirectorySeparator)}"; + if(File.Exists(real)) + { + try + { + return Image.FromFile(real); + } + catch (Exception ex) + { + Errors.Add(ex.Message); + return null; + } + + } + else + { + Errors.Add($"open_image({filepath}): File not found."); + return null; + } + } + else + { + Errors.Add($"open_image({filepath}): Not a valid file path."); + return null; + } + } + } + + public class Beeper + { + static Thread _beepThread; + static AutoResetEvent _signalBeep; + static bool _beeping = false; + + static Beeper() + { + _signalBeep = new AutoResetEvent(false); + _beepThread = new Thread(() => + { + for (;;) + { + while(_beeping == true) + { + + } + _beeping = true; + Thread.Sleep(_freq); + Console.Beep(_freq, _dur); + _beeping = false; + } + + }, 1); + _beepThread.IsBackground = true; + _beepThread.Start(); + } + static int _freq = 38; + static int _dur = 1000; + + public static void Play(int freq, int dur) + { + _freq = freq; + if (_freq <= 37) + { + _freq = 38; + } + + _dur = dur; + _signalBeep.Set(); + } + } + + +} diff --git a/source/WindowsFormsApplication1/Engine/SaveSystem.cs b/source/WindowsFormsApplication1/Engine/SaveSystem.cs new file mode 100644 index 0000000..aab5ab2 --- /dev/null +++ b/source/WindowsFormsApplication1/Engine/SaveSystem.cs @@ -0,0 +1,662 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ShiftOS; +using System.IO; +using Newtonsoft.Json; +using System.Drawing; +using System.Windows.Forms; //Message boxes +namespace SaveSystem +{ + /// + /// This does NOT include Shiftorium upgrades. See the Shiftorium Repository for them. + /// + public class Save + { + public int codepoints = 0; + public bool forceclose = false; + public int movablewindownumber = 50; + public bool terminalfullscreen = true; + public bool newgame = true; + public string actualshiftversion = "0.1.1"; //ShiftOS 0.0.x died a peaceful death last June. + public string username = "user"; + public string TerminalName = "Terminal"; + public string ShiftoriumName = "Shiftorium"; + public string osname = "shiftos"; + public string ingameversion = "0.0.1.0"; + public string ColorPickerName = "Color Picker"; + public string FileSkimmerName = "File Skimmer"; + public string password; + public bool ChristmasRewardPast = false; + public int CodepointMultiplier = 1; + public int PriceDivider = 1; + public string CloudID = ""; + public List CompletedNets = new List(); + } + + public class PrivateBitnoteAddress + { + public string Address = null; + public decimal Bitnotes = 0; + } + + public class Utilities + { + public static Save LoadedSave = null; + public static PrivateBitnoteAddress BitnoteAddress = null; + + /// + /// Load the game. + /// + public static void loadGame() + { + ShiftoriumRegistry.UpdateShiftorium(); + string rawjson = File.ReadAllText(Paths.SaveFile); + if (rawjson.StartsWith("{")) + { + LoadedSave = JsonConvert.DeserializeObject(rawjson); + } else + { + LoadedSave = JsonConvert.DeserializeObject(API.Encryption.Decrypt(rawjson)); + } + LoadBTNAddress(); + Hacking.GetCharacters(); + } + + /// + /// Load the user's private bitnote address. + /// + public static void LoadBTNAddress() + { + if(File.Exists(Paths.Bitnote)) + { + BitnoteAddress = JsonConvert.DeserializeObject(API.BitnoteEncryption.Decrypt(File.ReadAllText(Paths.Bitnote))); + + } + else + { + BitnoteAddress = new PrivateBitnoteAddress(); + BitnoteAddress.Bitnotes = 0; + BitnoteAddress.Address = GenerateNewBitnoteAddress(); + } + } + + /// + /// Generate a random bitnote address. + /// + /// The address. + public static string GenerateNewBitnoteAddress() + { + var rnd = new Random(); + int raw = rnd.Next(10000000, 99999999); + string enc = API.Encryption.Encrypt(raw.ToString()); + return enc.Replace("/", "").Replace("\\", "").Replace("=", ""); + } + + /// + /// Saves the private bitnote address. + /// + public static void SaveBitnoteAddress() + { + File.WriteAllText(Paths.Bitnote, API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(BitnoteAddress))); + } + + /// + /// Saves the game. + /// + public static void saveGame() + { + string rawjson = JsonConvert.SerializeObject(LoadedSave); + if (API.DeveloperMode == true) + { + File.WriteAllText(Paths.SaveFile, rawjson); + } else + { + File.WriteAllText(Paths.SaveFile, API.Encryption.Encrypt(rawjson)); + } + //Shiftorium + string shiftoriumjson = JsonConvert.SerializeObject(ShiftoriumRegistry.ShiftoriumUpgrades); + if (API.DeveloperMode == true) + { + File.WriteAllText(Paths.SystemDir + "_shiftorium.json", shiftoriumjson); + } + else + { + File.WriteAllText(Paths.SystemDir + "_shiftorium.json", API.Encryption.Encrypt(shiftoriumjson)); + } + SaveBitnoteAddress(); + Hacking.SaveCharacters(); + } + + /// + /// Put ShiftOS in a New Game state. + /// + public static void NewGame() + { + Paths.WriteFileSystem(); //Writes the file system. + LoadedSave = new Save(); //Create a new Save + ShiftoriumRegistry.SetDefaultShiftoriumValues(); + string rawjson = JsonConvert.SerializeObject(LoadedSave); + if (API.DeveloperMode == true) + { + File.WriteAllText(Paths.SaveFile, rawjson); + } + else + { + File.WriteAllText(Paths.SaveFile, API.Encryption.Encrypt(rawjson)); + } + File.WriteAllText(Paths.SystemDir + "_engineInfo.txt", "engine hash: #62586247262346484"); + string shiftoriumjson = JsonConvert.SerializeObject(ShiftoriumRegistry.ShiftoriumUpgrades); + if (API.DeveloperMode == true) + { + File.WriteAllText(Paths.SystemDir + "_shiftorium.json", shiftoriumjson); + } + else + { + File.WriteAllText(Paths.SystemDir + "_shiftorium.json", API.Encryption.Encrypt(shiftoriumjson)); + } + Hacking.GetCharacters(); //I'm retarded. The save routine doesn't compensate for new games. + } + + /// + /// Check for a ShiftOS-Next or ShiftOS 0.0.x save. + /// + public static void CheckForOlderSaves() + { + if (OSInfo.GetPlatformID() == "microsoft") + { + if (Directory.Exists(Paths.SaveRoot)) + { + if (!File.Exists(Paths.SystemDir + "_engineInfo.txt")) + { + MessageBox.Show("WARNING: Older ShiftOS saves are no longer supported. This save will be converted to the new format, and will not be readable by either ShiftOS-Next or the legacy ShiftOS."); + NewGame(); + } + } + } + } + } + + public class ShiftoriumRegistry + { + public static Dictionary ShiftoriumUpgrades = new Dictionary(); + + + public static List DefaultUpgrades = new List(); + + public static List GetCategories(bool showBought) + { + List cats = new List(); + foreach(var upg in DefaultUpgrades) + { + if(upg.id.Contains("dummy")) + { + if(!cats.Contains(upg.Category.ToLower())) + { + if(API.Upgrades[upg.Category.ToLower()]) + { + if(showBought == true) + { + cats.Add(upg.Category.ToLower()); + } + } + else + { + cats.Add(upg.Category.ToLower()); + } + + } + } + } + return cats; //Meow! No. I don't mean the animal. I mean "Categories". + } + + /// + /// Adds upgrade info (such as CP, description, etc) to the registry. Add your Shiftorium upgrades here. + /// + public static void setUpgrades() + { + DefaultUpgrades.Clear(); + //Dummy Upgrades. + DefaultUpgrades.Add(new Shiftorium.Upgrade("Dummy1 - 0 CP", null, null, "dummy", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Dummy2 - 0 CP", null, null, "dummy", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Dummy3 - 0 CP", null, null, "dummy", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Dummy4 - 0 CP", null, null, "dummy", "useful")); + + /*Add new upgrades below. + + Adding an upgrade is as simple as: + DefaultUpgrades.Add(new Shiftorium.Upgrade(" - <cost> CP", <preview image>, "<description>", "<dependencies>")); + + If you were to uncomment that, and replace <cost> with a real integer, and <preview image> with a real System.Drawing.Image, + an upgrade named '<title>' with description '<description>' would be added to the Shiftorium. + + Checking if the upgrade is bought, is as simple as: + if(SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades["<id>"] == true) { + //Do code if the upgrade is bought + } + else + { + //Do code if the upgrade is not bought. + } + + <id> will always be a lowercase version of <title> in the above tutorial on adding new upgrades, with no spaces. + For example, an upgrade with a title of "ShiftOS Shiftorium Upgrade" would have an ID of "shiftosshiftoriumupgrade". + + Also, the last argument in 'new Shiftorium.Upgrade()', <dependencies> is simple. + + If your upgrade can be bought at the beginning of the game, and doesn't require any other upgrades, put 'null' as the argument. + + If your upgrade depends on another upgrade, put that upgrade's ID as the argument. + + For example: "Titlebar" depends on "Gray", as you'll see, "Titlebar"'s dependencies argument is set to 'gray'. + + If your upgrade depends on multiple features, separate each upgrade ID by a semicolon. + + Like this: "upgrade1;upgrade2;upgrade3' and so on. Do not put a semicolon at the end of the string. + + Some upgrades, like 'Shift Desktop Panel' use this, requiring both the Shifter and the desktop panel upgrades. + + ShiftOS will automatically ckeck to see if all dependencies of an upgrade have been purchased before letting the user buy it. + + */ + DefaultUpgrades.Add(new Shiftorium.Upgrade("Gray - 20 CP", ShiftOS.Properties.Resources.upgradegray, "Everything doesn't always have to be black and white. Give your programs and GUI some depth by mixing black and white together to form grey." + Environment.NewLine + Environment.NewLine + "Note: You are unable to make controls grey until you buy the Shifter.", null, "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Title Bar - 80 CP", ShiftOS.Properties.Resources.upgradetitlebar, "Your windows are looking extremely bare right now. You know what they need? A gray bar on top of them! What is the gray bar for you ask?" + Environment.NewLine + Environment.NewLine + "Depending on what kind of person you are it either \"Does Nothing\" or \"Looks Pretty\". The Title Bar has a lot of future potential though…", "gray", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Seconds Since Midnight - 10 CP", ShiftOS.Properties.Resources.upgradesecondssincemidnight, "Ever wondered how many seconds have passed since the clock struck midnight? No?" + Environment.NewLine + Environment.NewLine + "Well for just 9.99 codepoints (rounded to the nearest codepoint) you will finally have the answer to that question you have no intention of knowing the answer to.", null, "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Minutes Since Midnight - 20 CP", ShiftOS.Properties.Resources.upgrademinutesssincemidnight, "Most people would find looking out their window a better indication of what time it is than being told how many seconds have passed since midnight." + Environment.NewLine + Environment.NewLine + "If you are like most people then enhancing the computers ability to tell the time is critical.", "secondssincemidnight", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Hours Since Midnight - 40 CP", ShiftOS.Properties.Resources.upgradehoursssincemidnight, "Need a somewhat normal method of time tracking? Well now you can have it with the Hours Past Midnight time format." + Environment.NewLine + Environment.NewLine + "It's not perfectly accurate but it's easier than trying to work out the time from how many seconds or minutes have passed since midnight.", "minutessincemidnight", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Username - 15 CP", ShiftOS.Properties.Resources.upgradecustomusername, "Sick of being known as \"User\"? Want to be recognized and labeled? Then you need to replace the default username with your own!" + Environment.NewLine + Environment.NewLine + "If you want ShiftOS to refer to you by name then you are going to need this upgrade.", null, "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Windows Anywhere - 25 CP", ShiftOS.Properties.Resources.upgradewindowsanywhere, "Having all windows open in the center of the screen is seriously limiting when it comes to multitasking." + Environment.NewLine + Environment.NewLine + "Buying this upgrade is essential if you plan on multitasking or even if you just hate having windows centered in the middle of screen.", null, "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Multitasking - 50 CP", ShiftOS.Properties.Resources.upgrademultitasking, "These days people have many windows up on their computer so they can edit photos while they watch videos and chat to their friends about how good at multitasking they are." + Environment.NewLine + Environment.NewLine + "If you like multitasking and having lots of windows open then buy this upgrade!", "windowsanywhere", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Auto Scroll Terminal - 5 CP", ShiftOS.Properties.Resources.upgradeautoscrollterminal, "Getting sick of the terminal filling up with text leaving you not knowing what you have typed unless you start typing more?" + Environment.NewLine + Environment.NewLine + "Then buy this upgrade to keep the terminal scrolled to the bottom so you can always see the latest stuff you've typed.", null, "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Movable Windows - 75 CP", ShiftOS.Properties.Resources.upgrademoveablewindows, "Although it's nice to be able to type commands in the terminal to teleport windows to any spot on the screen it’s a little time consuming and difficult at times." + Environment.NewLine + Environment.NewLine + "Well, with Movable Windows you can move Windows with the keyboard WASD keys.", "windowsanywhere", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Draggable Windows - 150 CP", ShiftOS.Properties.Resources.upgradedraggablewindows, "So... I heard you have a Title Bar? I also heard that you have Movable Windows. Although Movable Windows are nice they aren't perfect." + Environment.NewLine + Environment.NewLine + "Buy this upgrade if you want to drag windows around by their Title Bar! Trust me... Its ultra-efficient!", "titlebar;movablewindows", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Window Borders - 40 CP", ShiftOS.Properties.Resources.upgradewindowborders, "A borderless window on your desktop is like a picture hung on the wall without a frame. It looks completely out of place and awful!" + Environment.NewLine + Environment.NewLine + "Without this upgrade your overlapping windows will look extremely messy and appear to merge with each other,", "gray", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("PM and AM - 60 CP", ShiftOS.Properties.Resources.upgradeamandpm, "You may be able read the time as it is now but by splitting the time into two 12 hour periods other less intelligent people around you will have an easier time reading the time." + Environment.NewLine + Environment.NewLine + "This upgrade is necessary to stop your families and friends brains exploding!", "minuteaccuracytime", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Minute Accuracy Time - 80 CP", ShiftOS.Properties.Resources.upgrademinuteaccuracytime, "Want to be completely normal for once? Well Shift your time format into one 60x more accurate. " + Environment.NewLine + Environment.NewLine + "Most people these days make plans to meet at certain times such as 5:30pm so knowing the exact minute of the exact hour is very important.", "hourssincemidnight", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Split Second Time - 100 CP", ShiftOS.Properties.Resources.upgradesplitsecondaccuracy, "You already know the exact time down to the very last minute. Do you really need to know the exact second?" + Environment.NewLine + Environment.NewLine + "If so then give this upgrade a whirl but I'm sure you have better things to do than throw 100 codepoints away like this.", "minuteaccuracytime", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Title Text - 40 CP", ShiftOS.Properties.Resources.upgradetitletext, "Since looking at a program won't tell you the name of it you need Title Text. Unless of course you want to go through the trouble of remembering the name of the program..." + Environment.NewLine + Environment.NewLine + "Title Text sits in the top left hand corner of the title bar to label each program.", "titlebar", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Close Button - 90 CP", ShiftOS.Properties.Resources.upgradeclosebutton, "Closing a program should be as easy as pressing a button. Opening up the terminal and typing \"Close [Program name]\" is just Ridiculous." + Environment.NewLine + Environment.NewLine + "Please, for your own sake... Buy this close button before you waste another second opening up that terminal!", "titlebar", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Desktop Panel - 150 CP", ShiftOS.Properties.Resources.upgradedesktoppanel, "Got a boring blank desktop? Feel it doesn't really serve a purpose? Then you need a desktop panel!" + Environment.NewLine + Environment.NewLine + "This beautiful gray desktop panel will sit at the top of your desktop and do absolutely nothing for only 150 codepoints!", "gray", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Clock - 50 CP", ShiftOS.Properties.Resources.upgradeclock, "You could type \"time\" in the terminal every time you wanted to know what the time was but that's a little inefficient don't you think?" + Environment.NewLine + Environment.NewLine + "Ever wish you could just have the time on the screen all the time? Well, there’s an app for that!", "secondssincemidnight", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("App Launcher Menu - 120 CP", ShiftOS.Properties.Resources.upgradeapplaunchermenu, "Launching programs by typing their names in the terminal is very counterproductive especially if you are bad at spelling." + Environment.NewLine + Environment.NewLine + "A menu on the desktop that displays all programs on your computer and allows you to launch them would be a huge time saver.", "desktoppanel", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Knowledge Input - 20 CP", ShiftOS.Properties.Resources.upgradeknowledgeinput, "What's the point of an App Launcher if it can't launch all your apps?" + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to knowledge input in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermemu", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Clock - 20 CP", ShiftOS.Properties.Resources.upgradealclock, "What's the point of an App Launcher if it can't launch all your apps?" + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to the clock in your app launcher so you can launch it at any time with just a few clicks.", "clock;applaunchermenu", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Shiftorium - 20 CP", ShiftOS.Properties.Resources.upgradealshiftorium, "What's the point of an App Launcher if it can't launch all your apps?" + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to shiftorium in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("App Launcher Shutdown - 40 CP", ShiftOS.Properties.Resources.upgradeapplaunchershutdown, "You want a complete graphical interface with no reliance on the terminal right? That means every possible function of the operating system must be achievable graphically." + Environment.NewLine + Environment.NewLine + "You may not shut down too often but hey, it beats opening the terminal...", "applaunchermenu", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Windowed Terminal - 45 CP", ShiftOS.Properties.Resources.upgradewindowedterminal, "A nice big terminal is useful however it can sometimes get in the way of what you are doing." + Environment.NewLine + Environment.NewLine + "With a few tweaks we may be able to program a command that allows the terminal to switch between a full screen and windowed state.", "multitasking", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Desktop Panel Clock - 75 CP", ShiftOS.Properties.Resources.upgradedesktoppanelclock, "Want to always know what the time is without typing \"time\" in the terminal or opening up an entire application?" + Environment.NewLine + Environment.NewLine + "Well, with this somewhat expensive but extremely affordable clock you will know what the time is no matter what you are doing.", "desktoppanel;clock", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Terminal Scrollbar - 20 CP", ShiftOS.Properties.Resources.upgradeterminalscrollbar, "It’s great having the terminal windowed so it doesn't block the view of your desktop but at the same time size can be an issue." + Environment.NewLine + Environment.NewLine + "This problem can easily be fixed however by adding a scrollbar to the terminal when it's windowed.", "autoscrollterminal", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("KI Addons - 15 CP", ShiftOS.Properties.Resources.upgradekiaddons, "Knowledge input is a great game to play if you want to earn codepoints but what happens when you run out of things to guess?" + Environment.NewLine + Environment.NewLine + "This upgrade will allow you to install add-ons for knowledge input.", null, "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("KI Car Brands - 10 CP", ShiftOS.Properties.Resources.upgradeskicarbrands, "Need some more lists for Knowledge input? Why not add a list of automobile manufacturers to guess?" + Environment.NewLine + Environment.NewLine + "You know the brand of car you drive right? Toyota Maybe? Suzuki? Or maybe you have a Ferrari... come on you can do this!", "kiaddons", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("KI Game Consoles - 10 CP", ShiftOS.Properties.Resources.upgradesgameconsoles, "Need some more lists for Knowledge input? Why not add a list of game consoles to guess?" + Environment.NewLine + Environment.NewLine + "You know the name of your game console right? Playstation 4 Maybe? Xbox one? Or maybe you have a Ouya... come on you can do this!", "kiaddons", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Gray Shades - 40 CP", ShiftOS.Properties.Resources.upgradegrayshades, "Seeing gray on your computer screen may be a nice break from black and white but why have just one shade of gray when you can have 3?" + Environment.NewLine + Environment.NewLine + "More shades of gray increase the uniqueness of your ShiftOS interface by expanding your range of colour options in the Shifter.", "gray", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Gray Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradegrayshadeset, "3 Shades of gray may be better than 1 shade but why not get a full gray shade set complete with 8 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of gray.", "grayshades", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Gray Shades - 100 CP", ShiftOS.Properties.Resources.upgradegraycustom, "Forget about having 8 shades of gray because this upgrade will allow you to crack the colour value code giving you the ability to create your own custom shades of gray." + Environment.NewLine + Environment.NewLine + "Further research may even allow us to create other basic colours.", "fullgrayshadeset", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Purple - 20 CP", ShiftOS.Properties.Resources.upgradepurple, "Now that we have the RBG colours \"Red\" and \"Blue\" we are able to mix them together to form purple which symbolizes spirituality, royalty, magic and mystery." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Purple.", "red;green;blue", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Purple Shades - 40 CP", ShiftOS.Properties.Resources.upgradepurpleshades, "Having a splash of purple may be cool but why have just one shade of purple when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of purple.", "purple", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Purple Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradepurpleshadeset, "3 Shades of purple may be better than 1 shade but why not get a full purple shade set complete with 16 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of purple.", "purpleshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Purple Shades - 100 CP", ShiftOS.Properties.Resources.upgradepurplecustom, "16 shades of purple gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own purple shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullpurpleshadeset", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Blue - 20 CP", ShiftOS.Properties.Resources.upgradeblue, "Blue may be the colour of the sky and the ocean but it’s also an important colour that may allow us to create more colours if we mix it with red." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Blue.", "customgrayshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Blue Shades - 40 CP", ShiftOS.Properties.Resources.upgradeblueshades, "Having a splash of blue may be cool but why have just one shade of blue when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of blue.", "blue", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Blue Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradeblueshadeset, "3 Shades of blue may be better than 1 shade but why not get a full blue shade set complete with 16 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of blue.", "blueshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Blue Shades - 100 CP", ShiftOS.Properties.Resources.upgradebluecustom, "16 shades of blue gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own blue shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullblueshadeset", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Green - 20 CP", ShiftOS.Properties.Resources.upgradegreen, "Green may be the colour of nature and life but it’s also an important colour that may allow us to create more colours if we mix it with red." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Green.", "customgrayshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Green Shades - 40 CP", ShiftOS.Properties.Resources.upgradegreenshades, "Having a splash of green may be cool but why have just one shade of green when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of green.", "green", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Green Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradegreenshadeset, "3 Shades of green may be better than 1 shade but why not get a full green shade set complete with 16 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of green.", "greenshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Green Shades - 100 CP", ShiftOS.Properties.Resources.upgradegreencustom, "16 shades of green gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own green shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullgreenshadeset", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Yellow - 20 CP", ShiftOS.Properties.Resources.upgradeyellow, "Now that we have the RBG colours \"Red\" and \"Green\" we are able to mix them together to form yellow which symbolizes happiness, creativity and high intellect." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Yellow.", "red;green;blue", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Yellow Shades - 40 CP", ShiftOS.Properties.Resources.upgradeyellowshades, "Having a splash of yellow may be cool but why have just one shade of yellow when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of yellow.", "yellow", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Yellow Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradeyellowshadeset, "3 Shades of yellow may be better than 1 shade but why not get a full yellow shade set complete with 10 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of yellow.", "yellowshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Yellow Shades - 100 CP", ShiftOS.Properties.Resources.upgradeyellowcustom, "10 shades of yellow gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own yellow shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullyellowshadeset", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Orange - 20 CP", ShiftOS.Properties.Resources.upgradeorange, "Now that we have the RBG colours \"Red\" and \"Green\" we are able to mix them together to form orange which symbolizes enthusiasm and creativity." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Orange.", "red;green;blue", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Orange Shades - 40 CP", ShiftOS.Properties.Resources.upgradeorangeshades, "Having a splash of orange may be cool but why have just one shade of orange when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of orange.", "orange", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Orange Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradeorangeshadeset, "3 Shades of orange may be better than 1 shade but why not get a full orange shade set complete with 6 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of orange.", "orangeshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Orange Shades - 100 CP", ShiftOS.Properties.Resources.upgradeorangecustom, "6 shades of orange gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own orange shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullorangeshadeset", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Brown - 20 CP", ShiftOS.Properties.Resources.upgradebrown, "Now that we have the all the RBG colours we are able to mix them together to form brown which symbolizes laziness and the earth." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Brown.", "red;green;blue", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Brown Shades - 40 CP", ShiftOS.Properties.Resources.upgradebrownshades, "Having a splash of brown may be cool but why have just one shade of brown when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of brown.", "brown", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Brown Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradebrownshadeset, "3 Shades of brown may be better than 1 shade but why not get a full brown shade set complete with 16 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of brown.", "brownshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Brown Shades - 100 CP", ShiftOS.Properties.Resources.upgradebrowncustom, "16 shades of brown gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own brown shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullbrownshadeset", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Red - 20 CP", ShiftOS.Properties.Resources.upgradered, "Red may be a demonic and evil colour that symbolizes hate and rage but it’s a very important colour that may allow us to create more colours if we mix it with Blue or Green." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to red.", "customgrayshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Red Shades - 40 CP", ShiftOS.Properties.Resources.upgraderedshades, "Having a splash of red may be cool but why have just one shade of red when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of red.", "red", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Red Shade Set - 60 CP", ShiftOS.Properties.Resources.upgraderedshadeset, "3 Shades of red may be better than 1 shade but why not get a full red shade set complete with 9 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of red.", "redshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Red Shades - 100 CP", ShiftOS.Properties.Resources.upgraderedcustom, "9 shades of red gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own red shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullredshadeset", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Pink - 20 CP", ShiftOS.Properties.Resources.upgradepink, "Now that we have the all the RBG colours we are able to mix them together to form pink which symbolizes universal love and beauty." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Pink.", "red;green;blue", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Pink Shades - 40 CP", ShiftOS.Properties.Resources.upgradepinkshades, "Having a splash of pink may be cool but why have just one shade of pink when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of pink.", "pink", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Pink Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradepinkshadeset, "3 Shades of pink may be better than 1 shade but why not get a full pink shade set complete with 6 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of pink.", "pinkshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Pink Shades - 100 CP", ShiftOS.Properties.Resources.upgradepinkcustom, "6 shades of pink gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own pink shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullpinkshadeset", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Basic Custom shade - 50 CP", ShiftOS.Properties.Resources.anycolourshade, "Now that we can create shades of colours based on certain rules our level of customization is very high." + Environment.NewLine + Environment.NewLine + "With further research ShiftOS may be able to support the ability to make a shade not linked to the rules of a certain colour.", "custompinkshades;customblueshades;custompurpleshades;customorangeshades;custombrownshades;customyellowshades;customredshades;customgreenshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("General Custom Shades - 100 CP", ShiftOS.Properties.Resources.anycolourshade2, "There isn’t much use making a single custom colour that looks mostly gray. Further research into optimizing ShiftOS may improve its compatibility with the RGB colour system." + Environment.NewLine + Environment.NewLine + "This would lead to a higher range in values and shades being stored.", "basiccustomshade", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Advanced Custom Shades - 250 CP", ShiftOS.Properties.Resources.anycolourshade3, "4 savable shade spaces is nowhere near decent for storing custom colours and with RGB limits of 100 to 200 the colours are still looking quite dull." + Environment.NewLine + Environment.NewLine + "More research into optimizing ShiftOS may further break these limits.", "generalcustomshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Limitless Custom Shades - 500 CP", ShiftOS.Properties.Resources.anycolourshade4, "It’s time to break all RGB colour limits forever! This upgrade may be expensive but it will allow us to master the RGB colour system." + Environment.NewLine + Environment.NewLine + "With total native RGB colour support in ShiftOS we will limitlessly be able to make millions of shades of colours.", "advancedcustomshades", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shifter - 40 CP", ShiftOS.Properties.Resources.upgradeshifter, "For system compatibility reasons practically all ShiftOS elements are designed to display in gray style and look dull." + Environment.NewLine + Environment.NewLine + "We may be able to overcome this dull interface however if the user is given the option to customize it through the use of an application.", "gray", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Shifter - 20 CP", ShiftOS.Properties.Resources.upgradealshifter, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to the shifter in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;shifter", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Roll Up Command - 10 CP", ShiftOS.Properties.Resources.upgraderollupcommand, "Running out of space on your desktop? Wish you could keep a window running in the background without completely closing it?" + Environment.NewLine + Environment.NewLine + "Well you 're in luck. The roll up command will allow you to roll windows up to their title bar when you want to save space.", "titlebar", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Roll Up Button - 45 CP", ShiftOS.Properties.Resources.upgraderollupbutton, "Are you a fan of the Roll Up functionality? Are you absolutely sick of opening up the terminal and typing in a command every time you want to roll up a window?" + Environment.NewLine + Environment.NewLine + "This upgrade will making rolling up windows much quicker!", "rollupcommand", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Desktop - 20 CP", ShiftOS.Properties.Resources.upgradeshiftdesktop, "The shifter is currently unable to change any settings but this simple upgrade may be able to add a module that allows you to change the colour of the desktop background." + Environment.NewLine + Environment.NewLine + "This may even unlock further Shifter functionality.", "shifter", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Panel Clock - 20 CP", ShiftOS.Properties.Resources.upgradeshiftpanelclock, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Desktop Panel Clock.", "desktoppanelclock;shifter", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift App Launcher - 20 CP", ShiftOS.Properties.Resources.upgradeshiftapplauncher, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the App Launcher.", "applaunchermenu;shifter", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Desktop Panel - 20 CP", ShiftOS.Properties.Resources.upgradeshiftdesktoppanel, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Desktop Panel.", "desktoppanel;shifter", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Title Bar - 20 CP", ShiftOS.Properties.Resources.upgradeshifttitlebar, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Title Bar.", "titlebar;shifter", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Title Text - 20 CP", ShiftOS.Properties.Resources.upgradeshifttitletext, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Title Text.", "titletext;shifter", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Title Buttons - 20 CP", ShiftOS.Properties.Resources.upgradeshiftbuttons, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Title Buttons.", "closebutton;shifter", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Borders - 20 CP", ShiftOS.Properties.Resources.upgradeshiftborders, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Window Borders.", "windowborders;shifter", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Pong - 70 CP", ShiftOS.Properties.Resources.upgradepong, "Finding it difficult to list more words with knowledge input? Everyone has their limits right? Well how about a game of pong?" + Environment.NewLine + Environment.NewLine + "This game is sure to get your adrenalin going and you can earn codepoints as you play it!", null, "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Pong - 20 CP", ShiftOS.Properties.Resources.upgradealpong, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to pong in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;pong", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL File Skimmer - 20 CP", ShiftOS.Properties.Resources.upgradealfileskimmer, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to the file skimmer in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;fileskimmer", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Textpad - 20 CP", ShiftOS.Properties.Resources.upgradealtextpad, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to textpad in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;textpad", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("File Skimmer - 60 CP", ShiftOS.Properties.Resources.upgradefileskimmer, "Almost all computers come with some form of permanent data storage." + Environment.NewLine + Environment.NewLine + "ShiftOS is storing data on your storage device (e.g. HDD or SSD) however without a way to view and browse through these files you are practically locked out of your own computer.", "gray", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Textpad - 65 CP", ShiftOS.Properties.Resources.upgradetextpad, "Need to quickly jot down something but you can’t find a pen and paper nearby? There’s an app for that!" + Environment.NewLine + Environment.NewLine + "With the Textpad you will be able to jot down whatever you like and have it displayed in all its glory on your computer screen.", "gray", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Textpad New - 25 CP", ShiftOS.Properties.Resources.upgradetextpadnew, "Have you ever been typing a document and thought ‘I don’t like what I’m writing’. Closing and opening the entire application to clear the text is too much effort right?" + Environment.NewLine + Environment.NewLine + "Well if you get this upgrade clearing the text can be as easy as pressing a button.", "textpad", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Textpad Save - 25 CP", ShiftOS.Properties.Resources.upgradetextpadsave, "Have you just written something worth keeping with Textpad? Well, what a shame you can’t save it…" + Environment.NewLine + Environment.NewLine + "Or can you? That’s right, with this upgrade your award winning documents can sit safely on your storage device.", "fileskimmer;textpad", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Textpad Open - 25 CP", ShiftOS.Properties.Resources.upgradetextpadopen, "Sure you can open your text files by going to all the effort of opening File Skimmer and then clicking on the file you want to open but it doesn’t have to be that hard." + Environment.NewLine + Environment.NewLine + "Wouldn't an open button make life much easier?", "fileskimmer;textpad", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("FS New Folder - 25 CP", ShiftOS.Properties.Resources.upgradefileskimmernew, "There are a few folders within the ShiftOS file system that you can sort your data into but why limit yourself?" + Environment.NewLine + Environment.NewLine + "In an operating system that you can shift to your liking surely you should be able to create your own folders right?", "fileskimmer", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("FS Delete - 25 CP", ShiftOS.Properties.Resources.upgradefileskimmerdelete, "You’re not a hoarder are you? If you are stop reading this and go look for another upgrade." + Environment.NewLine + Environment.NewLine + "If you keep every file you create your storage device is sure to get cluttered… seriously, you need a delete button!", "fileskimmer", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("KI Elements - 10 CP", ShiftOS.Properties.Resources.upgradekielements, "Need some more lists for Knowledge input? Why not add a list of Elements to guess?" + Environment.NewLine + Environment.NewLine + "You studied the periodic table of elements in highschool right? Hydrogen, oxygen, lead, silver… you can do this!", "kiaddons", "useful")); + //new + DefaultUpgrades.Add(new Shiftorium.Upgrade("Panel Buttons - 75 CP", ShiftOS.Properties.Resources.upgradepanelbuttons, "A desktop panel seems like it could be useful for a variety of different features." + Environment.NewLine + Environment.NewLine + "Maybe with a little more research we could find a way to display the names of all your open programs in the desktop panel", "desktoppanel", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Minimize Command - 20 CP", ShiftOS.Properties.Resources.upgrademinimizecommand, "Ever wanted to completely remove a program from the screen without actually closing it?" + Environment.NewLine + Environment.NewLine + "Well with a minimize command this may actually become possible and allow you to save the state of hidden programs in the process!", "titlebar", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Minimize Button - 50 CP", ShiftOS.Properties.Resources.upgrademinimizebutton, "As useful as the minimize feature is you still have to go to all the effort of opening the terminal and typing in a command to use it." + Environment.NewLine + Environment.NewLine + "Wouldn’t a button in the title of each window be more efficient?", "minimizecommand", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Useful Panel Buttons - 40 CP", ShiftOS.Properties.Resources.upgradeusefulpanelbuttons, "How can you call those things on the desktop panel ‘panel buttons’ when they aren’t even clickable?." + Environment.NewLine + Environment.NewLine + "A graphical unminimize feature would be handy and those panel buttons might help us…", "panelbuttons;minimizecommand", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad - 75 CP", ShiftOS.Properties.Resources.upgradeartpad, "Ever wanted to play around with pixels on your screen?" + Environment.NewLine + Environment.NewLine + "Well it looks like your newest companion may become the Artpad but be sure you know your x and y coordinates!", "gray", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 4 - 10 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit4, "With just two pixels you can’t make very interesting artworks." + Environment.NewLine + Environment.NewLine + "Doubling the pixel limit to 4 should more than double the variety of unique creations you can make with the artpad.", "artpad", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 8 - 20 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit8, "Earlier I lied about 4 pixels giving you many different types of unique artistic opportunities." + Environment.NewLine + Environment.NewLine + "A pixel limit of 8 may be a little limiting though and its still dirt cheap.", "artpadpixellimit4", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 16 - 30 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit16, "8 pixels may not be great but 16 is looking a little more pristine." + Environment.NewLine + Environment.NewLine + "It may be a silly rhyme but it’s true.", "artpadpixellimit8", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 64 - 50 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit64, "Step right up to a pixel limit 4x greater than your current one." + Environment.NewLine + Environment.NewLine + "Isn’t it usually double you say? Well this time around its quadruple but unfortunately it does come with a dearer price.", "artpadpixellimit16", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 256 - 75 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit256, "Finally we are on the verge on a decent pixel limit. Think of what you could do with 256 pixels" + Environment.NewLine + Environment.NewLine + "The width and height of your canvas could be huge!", "artpadpixellimit64", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 1024 - 100 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit1024, "Ahh, now we’re talking. This is an upgrade that will do you a world of good." + Environment.NewLine + Environment.NewLine + "It’s a shame it’s is so expensive but good things always come at a cost.", "artpadpixellimit256", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 4096 - 150 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit4096, " With a pixel limit of 4096 you would have the ability to make canvases 64 by 64 pixels." + Environment.NewLine + Environment.NewLine + "Do you really think you will need this high of a pixel limit?", "artpadpixellimit1024", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 16384 - 200 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit16384, "You may think your current pixel limit is good but you aren’t seen nothing yet." + Environment.NewLine + Environment.NewLine + "For some true 4x zoomed freehand drawing don’t miss this upgrade.", "artpadpixellimit4096", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 65536 - 250 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit65536, "Oh come on how much higher can the pixel limit go?" + Environment.NewLine + Environment.NewLine + "I doubt you actually need it but aren’t you curious how much higher this goes?", "artpadpixellimit16384", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Limitless Pixels - 350 CP", ShiftOS.Properties.Resources.upgradeartpadlimitlesspixels, "This is what you’ve been waiting for all this time after purchasing all those pixel limit upgrades" + Environment.NewLine + Environment.NewLine + "It may be ultra-expensive but you won’t have to ever get another after this one.", "artpadpixellimit65536", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad New - 10 CP", ShiftOS.Properties.Resources.upgradeartpadnew, "Ever wanted to start a fresh with a new canvas without restarting Artpad" + Environment.NewLine + Environment.NewLine + "With a little research it may be possible to add a button to do just that whenever you want.", "artpad", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Save - 50 CP", ShiftOS.Properties.Resources.upgradeartpadsave, "Artpad may be fun to play around with but wouldn’t saving be an amazing feature?" + Environment.NewLine + Environment.NewLine + "Saving your pictures may even generate codepoints and the saved pictures might be able to be used for something.", "fileskimmer;artpad", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Load - 50 CP", ShiftOS.Properties.Resources.upgradeartpadload, "Sometimes after making something and saving it you wish to alter it slightly to enhance it" + Environment.NewLine + Environment.NewLine + "A load feature in the Artpad should let you modify saved .pic files by allowing you to load them up again with the click of a button.", "fileskimmer;artpad", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Undo - 40 CP", ShiftOS.Properties.Resources.upgradeartpadundo, "Ever spilt your paint over your masterpiece? It’s an awful feeling right?" + Environment.NewLine + Environment.NewLine + "Well in situations like these an undo feature would be very useful so for backup I would definitely get this upgrade.", "artpad", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Redo - 40 CP", ShiftOS.Properties.Resources.upgradeartpadredo, "Ever clicked undo too many times and found that you have lost a large portion of work" + Environment.NewLine + Environment.NewLine + "For cases like these a redo button can be quite handy but obviously you could save your codepoints by just being careful with the undo button.", "artpadundo", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Placer - 20 CP", ShiftOS.Properties.Resources.upgradeartpadpixelplacer, "The pixel setter allows you to set pixels but do you really want to go around trying to pinpoint and calculate x and y coordinates" + Environment.NewLine + Environment.NewLine + "Clicking the pixel you want to change directly would be much more efficient don’t you agree?", "artpad", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad PP Movement Mode - 20 CP", ShiftOS.Properties.Resources.upgradeartpadpixelplacermovementmode, "Constantly clicking each individual pixel on your canvas using the Pixel Placer can be very time consuming and tiring for your hands" + Environment.NewLine + Environment.NewLine + "Wouldn’t it be easier to just click and drag? Well there’s an upgrade for that!", "artpadpixelplacer", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pencil - 30 CP", ShiftOS.Properties.Resources.upgradeartpadpenciltool, "Does the buggy Pixel placer movement mode annoy you when it skips pixels?" + Environment.NewLine + Environment.NewLine + "Well with a little more research we may be able to develop a new tool that can draw much more smoothly.", "artpadppmovementmode", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Paint Brush - 30 CP", ShiftOS.Properties.Resources.upgradeartpadpaintbrushtool, "Ever wanted to paint with a tool that can paint free handedly and be big, small, circular or square?" + Environment.NewLine + Environment.NewLine + "This paint brush tool may be the tool you want then and its pretty cheap too.", "artpadppmovementmode", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Line Tool - 30 CP", ShiftOS.Properties.Resources.upgradeartpadlinetool, "Having difficulty drawing strait lines? Then you obviously need a line tool." + Environment.NewLine + Environment.NewLine + "With a line tool you will be able to draw straight lines from any point to any point on your canvas.", "artpadpencil", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Oval Tool - 40 CP", ShiftOS.Properties.Resources.upgradeartpadovaltool, "Drawing perfect circles is a very tricky process especially if zoomed right in on the canvas" + Environment.NewLine + Environment.NewLine + "With a bit of research we may be able to discover a tool that calculates how to draw circles without much effort on our side.", "artpadlinetool", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Rectangle Tool - 40 CP", ShiftOS.Properties.Resources.upgradeartpadrectangletool, "Drawing perfect squares is a time consuming process especially if you are trying to draw them perfectly straight" + Environment.NewLine + Environment.NewLine + "With a bit of research we may be able to discover a tool that calculates how to draw squares without much effort on our side.", "artpadovaltool", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Eraser - 20 CP", ShiftOS.Properties.Resources.upgradeartpaderaser, "Made a little mistake and want to erase it? Sounds like you need an eraser" + Environment.NewLine + Environment.NewLine + "With a little bit of research an eraser tool may not be too far away as overall its just a paintbrush set to the colour of the canvas.", "artpadpencil", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Fill Tool - 60 CP", ShiftOS.Properties.Resources.upgradeartpadfilltool, "Instead of coloring in every single individual pixel sometimes it is more appropriate to simply draw an outline and instantly fill a space in." + Environment.NewLine + Environment.NewLine + "If that’s a feature you’re interested in then you should definitely buy this upgrade.", "artpadpaintbrush", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Text Tool - 45 CP", ShiftOS.Properties.Resources.upgradeartpadtexttool, "drawing text is very difficult but if you can pull it off then well done, nice accomplishment!" + Environment.NewLine + Environment.NewLine + "For those who can’t though research into a text drawing tool would be very handy unless you don’t require text in your artwork.", "artpadrectangletool", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 4 Color Pallets - 10 CP", ShiftOS.Properties.Resources.upgradeartpad4colorpallets, "Having just 2 colours in your work may give it an interesting style but overall its very limiting." + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 8 Color Pallets - 20 CP", ShiftOS.Properties.Resources.upgradeartpad8colorpallets, "4 colour pallets is still very limiting and a lot less than your average paint program." + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad4colorpallets", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 16 Color Pallets - 35 CP", ShiftOS.Properties.Resources.upgradeartpad16colorpallets, "8 colours is still going to leave you changing the colour of your pallets quite often." + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad8colorpallets", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 32 Color Pallets - 50 CP", ShiftOS.Properties.Resources.upgradeartpad32colorpallets, "16 colours is definitely usable but it certainly could get better than that right?" + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad16colorpallets", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 64 Color Pallets - 100 CP", ShiftOS.Properties.Resources.upgradeartpad64colorpallets, "32 colours is slightly more than average for a paint program but don’t you want extreme?" + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad32colorpallets", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 128 Color Pallets - 150 CP", ShiftOS.Properties.Resources.upgradeartpad128colorpallets, "For some people 64 colour pallets may already be overkill but for the extremists like yourself it’s just not enough." + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad64colorpallets", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Custom Pallets - 75 CP", ShiftOS.Properties.Resources.updatecustomcolourpallets, "It can be annoying when things are set in stone and can’t be changed." + Environment.NewLine + Environment.NewLine + "Let’s not let that happen to the Artpad by programming the colour pallets to be resizable by the user.", "artpad128colorpallets", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Skinning - 80 CP", ShiftOS.Properties.Resources.upgradeskinning, "Static colours of the windows and desktop in ShiftOS are beginning to look boring and unprofessional." + Environment.NewLine + Environment.NewLine + "Since the artpad is able to save .pic file we may be able to use them as UI elements.", "artpad;fileskimmer;shifter", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Artpad - 20 CP", ShiftOS.Properties.Resources.upgradealartpad, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to artpad in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;artpad", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Panel Buttons - 20 CP", ShiftOS.Properties.Resources.upgradeshiftpanelbuttons, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Desktop Panel Buttons.", "panelbuttons;shifter", "useful")); + // 0.0.8 + DefaultUpgrades.Add(new Shiftorium.Upgrade("Resizable Windows - 40 CP", ShiftOS.Properties.Resources.upgraderesize, "You can move and rollup windows, but with a few more Code Point, we may be able to let you change their size!" + Environment.NewLine + Environment.NewLine + "This upgrade will allow you to resize any resizable window.", "draggablewindows;windowborders", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Change OS Name - 15 CP", ShiftOS.Properties.Resources.upgradeosname, "Getting sick of being 'user@shiftos $>' Well now you can change that, how about 'user@ThEBesToSEver'?" + Environment.NewLine + Environment.NewLine + "(We like self adverising here)", null, "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("System Information - 40 CP", ShiftOS.Properties.Resources.upgradesysinfo, "Don't know your PC specs? Need to find out? want to know what version of ShiftOS your running?" + Environment.NewLine + Environment.NewLine + "Well, this is the app for you. May I present: the System Information App!", null, "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("TRM Files - 50 CP", ShiftOS.Properties.Resources.upgradetrm, "Typing commands into the terminal is all very well, but what about pre-writing the commands so you can use them at any time? What about the ability to create terminal files?" + Environment.NewLine + Environment.NewLine + "This upgrade will allow you to save textpad documents in .trm format, meaning they will run in the terminal if valid.", "fileskimmer", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Launcher Items - 20 CP", ShiftOS.Properties.Resources.upgradeshiftitems, "So you can shift the Applications Launcher button. Great, but arn't the menu items a little boring?" + Environment.NewLine + Environment.NewLine + "The Shift Launcher Items upgrade allow you to customize launcher items, as well as the button.", "shiftapplauncher", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Virus Scanner - 200 CP", ShiftOS.Properties.Resources.upgradevirusscanner, "ShiftOS is the most secure operating system ever made, but here's a virus scanner in case you feeling extra cautious..." + Environment.NewLine + Environment.NewLine + "Just making sure you're aware, this scans for viruses, it doesn't remove them...", null, "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("VS Removal Grade 1 - 100 CP", ShiftOS.Properties.Resources.upgraderemoveth1, "If your doing things properly, there is no need for this... But wounldn't it be good to remove viruses if you did find them?" + Environment.NewLine + Environment.NewLine + "This extention for the Virus Scanner will give it the ablitity to remove level 1 viruses.", "virusscanner", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("VS Removal Grade 2 - 100 CP", ShiftOS.Properties.Resources.upgraderemoveth2, "Wow, DevX better see this, still buying virus protection? You must be doing something dodgy..." + Environment.NewLine + Environment.NewLine + "This extention for the Virus Scanner will give it the ablitity to remove level 2 viruses.", "vsremovalgrade1", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("VS Removal Grade 3 - 100 CP", ShiftOS.Properties.Resources.upgraderemoveth3, "Ok, I'm calling DevX now! Seroiusly, you really don't need this... But give me your Code Points anyway!" + Environment.NewLine + Environment.NewLine + "This extention for the Virus Scanner will give it the ablitity to remove level 3 viruses.", "vsremovalgrade2", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("VS Removal Grade 4 - 100 CP", ShiftOS.Properties.Resources.upgraderemoveth4, "Fine, whatever. I'll stop warning you against useless upgrades. Why should I care. Just gime the money OK?" + Environment.NewLine + Environment.NewLine + "This extention for the Virus Scanner will give it the ablitity to remove level 4 viruses.", "vsremovalgrade3", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("App Icons - 15 CP", ShiftOS.Properties.Resources.iconArtpad, "Ever wanted to see an icon of the application on it's window, or on it's Panel Button, or on it's App Launcher entry? Well, this upgrade will allow that, for the low price of 13 CP!", "titletext", "fancy")); + + //0.1.x/re-adds + DefaultUpgrades.Add(new Shiftorium.Upgrade("Unity Mode - 1000 CP", ShiftOS.Properties.Resources.upgradeunitymode, "ShiftOS uses " + OSInfo.GetPlatformID() + " native code to run, but what if we extended our OS abstraction layer to be able to run the OS's desktop and applications? Hmmmm... this'd make for great compatibility with many software.", "limitlesscustomshades;multitasking", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Unity - 25 CP", ShiftOS.Properties.Resources.upgradealunitymode, "We have the ability to turn Unity on and off through the terminal, but let's make it better by adding an entry in the App Launcher!", "applaunchermenu;unitymode", "fancy")); + + //0.1.x/new + DefaultUpgrades.Add(new Shiftorium.Upgrade("Zoomable Terminal - 50 CP", ShiftOS.Properties.Resources.upgradeautoscrollterminal, "Now that the terminal can be scrolled, it can be useful to zoom the terminal in and out to make it more readable. Buy this upgrade and you can zoom the Terminal by holding CTRL and scrolling up or down", "terminalscrollbar", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Advanced Shifter - 100 CP", ShiftOS.Properties.Resources.upgradeadvancedshifter, "We can customize so much of ShiftOS now. App Launcher, desktop panel, titlebar, you name it. But let's do more. Let's allow even DEEPER customization, such as system menus and window backgrounds.", "shifter;skinning;shiftapplauncher;shiftdesktoppanel;shifttitlebar;basiccustomshade", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift System Menus - 25 CP", null, "The Shifter can now access deeper layers of the system, but what about adding a category to the Shifter that lets us modify something? This upgrade will add a new 'Menus' category where you can customize all aspects of the ShiftOS menu system.", "advancedshifter", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Shiftnet Apps - 15 CP", null, "With the Shiftnet installed and the ability to install even more applications, it's time to make them easier to run. With this upgrade, all your Shiftnet Apps can be ran from the App Launcher!", "shiftnet", "software")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Set Terminal Colors - 25 CP", null, "Do you want to spice up your terminal? Well, apply this upgrade and you'll be able to change it's text and background colors.", "skinning", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Set Terminal Font - 5 CP", null, "Ever wanted to set the font style of your Terminal? Well, this is the upgrade for you. Use the \"font\" command to set the font style.", "setterminalcolors", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Name Changer - 50 CP", null, "This upgrade allows you to change the names of ShiftOS applications.", "applaunchermenu", "software")); + + //0.1.x/non-shiftorium + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shiftnet - 0 CP", null, "Shiftorium Upgrade for Shiftnet and Shiftnet Package Manager", "nodisplay", "fundamental")); + + //0.1.1/re-adds + DefaultUpgrades.Add(new Shiftorium.Upgrade("Desktop Icons - 50 CP", null, "A brilliant new invention from the ShiftOS developers has come: Desktop Icons - These, much like the App Launcher, allow you to launch applications as well as other files from the desktop.", "alshiftnetapps", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Desktop Icons - 25 CP", null, "This upgrade allows the customization of ShiftOS desktop icons.", "advancedshifter;desktopicons", "fancy")); + + //0.1.1/hidden + DefaultUpgrades.Add(new Shiftorium.Upgrade("Other Player Story - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("DevX Furious - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Aiden Nirh - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Hacker101 - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Other Player Rescue - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Hacking - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Hack Command - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Hacker Battles - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Mid Game Bridge - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Network Browser - 0 CP", null, null, "nodisplay", "fundamental")); + + //0.1.1/new + DefaultUpgrades.Add(new Shiftorium.Upgrade("Fancy Effects - 5000 CP", null, "Have you ever wanted to make your operating system look fancy, adding fade effects and other animations to various parts of the UI? If so, this upgrade is for you!", "limitlesscustomshades;shiftnet", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Fancy Effects - 45 CP", null, "ShiftOS is looking pretty darn fine now. But, let's make it look even better. With this upgrade you will be able to customize fancy effects in the Shifter!", "advancedshifter;fancyeffects", "fancy")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Icon Manager - 45 CP", null, "Add even more customization options to ShiftOS using the new Icon Manager. This tool allows you to change almost any icon on the system!", "advancedshifter;appicons", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("FS External Devices - 175 CP", null, "Ever wanted to see the contents of another device on the system? For example, a USB drive, CD, floppy, or another hard drive? Well this upgrade is for you. It will give File Skimmer the ability to see other drives on the system.", "fileskimmer", "useful")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Advanced Desktop - 50 CP", null, "Want to further customize the desktop panel? Want to add even more panels, and add custom widgets to the panels? This upgrade's for you!", "desktoppanel;midgamebridge", "useful")); + //0.1.1/category + DefaultUpgrades.Add(new Shiftorium.Upgrade("Useful - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Fancy - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Software - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("HoloChat - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("Story Complete - 0 CP", null, null, "nodisplay", "fundamental")); + + //0.1.1/netbrowser/tiers + DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_easy - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_medium - 0 CP", null, null, "nodisplay", "fundamental")); + DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_hard - 0 CP", null, null, "nodisplay", "fundamental")); + + } + + /// <summary> + /// Updates the registry. + /// </summary> + public static void UpdateShiftorium() + { + ShiftoriumUpgrades.Clear(); + + SetDefaultShiftoriumValues(); + try + { + string shiftoriumjson = File.ReadAllText(Paths.SystemDir + "_shiftorium.json"); + var newUpgrades = new Dictionary<string, bool>(); + if (shiftoriumjson.StartsWith("{")) + { + newUpgrades = JsonConvert.DeserializeObject<Dictionary<string, bool>>(shiftoriumjson); + } + else + { + newUpgrades = JsonConvert.DeserializeObject<Dictionary<string, bool>>(API.Encryption.Decrypt(shiftoriumjson)); + } + foreach (KeyValuePair<string, bool> kv in newUpgrades) + { + try + { + ShiftoriumUpgrades[kv.Key] = kv.Value; + } catch + { + Console.WriteLine("[Shiftorium/Registry] [ERROR] Upgrade {0} from disk doesn't seem to be found in the 'Default Upgrades' dictionary. This may be caused by a bug.", kv.Key); + } + } + } + catch + + { + string shiftoriumjson = JsonConvert.SerializeObject(ShiftoriumUpgrades); + if (API.DeveloperMode == true) + { + File.WriteAllText(Paths.SystemDir + "_shiftorium.json", shiftoriumjson); + } + else + { + File.WriteAllText(Paths.SystemDir + "_shiftorium.json", API.Encryption.Encrypt(shiftoriumjson)); + } + } + } + + /// <summary> + /// This void adds the DEFAULT Shiftorium Upgrade values to the Upgrade dictionary to prevent a crash. Add new upgrades here. + /// </summary> + public static void SetDefaultShiftoriumValues() + { + setUpgrades(); + foreach (Shiftorium.Upgrade upgrade in DefaultUpgrades) + { + ShiftoriumUpgrades.Add(upgrade.id, false); + } + } +} +} + +namespace Shiftorium +{ + public class Utilities + { + /// <summary> + /// Buy an upgrade. + /// </summary> + /// <param name="upgradeToBuy">Upgrade name</param> + /// <returns>Whether the upgrade could be bought.</returns> + public static bool Buy(Upgrade upgradeToBuy) + { + if(API.Codepoints >= upgradeToBuy.Cost / API.CurrentSave.PriceDivider) + { + SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades[upgradeToBuy.id] = true; + SaveSystem.Utilities.LoadedSave.codepoints -= upgradeToBuy.Cost / API.CurrentSave.PriceDivider; + SaveSystem.Utilities.saveGame(); + API.UpdateWindows(); + API.Log("[Shiftorium] Upgrade \"" + upgradeToBuy.id + "\" bought successfully, game saved."); + return true; + } + else + { + return false; + } + } + + /// <summary> + /// This method is for a virus. + /// </summary> + /// <param name="id"></param> + public static void Unbuy(string id) + { + if(API.Upgrades.ContainsKey(id)) + { + foreach(Shiftorium.Upgrade upg in SaveSystem.ShiftoriumRegistry.DefaultUpgrades) + { + if(upg.Dependencies.Contains(id)) + { + Unbuy(upg.id); + } + } + API.Upgrades[id] = false; + SaveSystem.Utilities.saveGame(); + } + } + + /// <summary> + /// Gets all upgrades that have not been bought and returns them to the caller. + /// </summary> + /// <returns></returns> + public static List<Upgrade> GetAvailable() + { + List<Upgrade> available = new List<Upgrade>(); + foreach(Upgrade upgrade in SaveSystem.ShiftoriumRegistry.DefaultUpgrades) + { + if (SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades[upgrade.id] == false) + { + try + { + if (BoughtAllDependencies(upgrade)) + { + available.Add(upgrade); + + } + + + } + catch + { + if (upgrade.id.Contains("dummy")) + { + available.Add(upgrade); + + } + } + } + + + } + return available; + } + + /// <summary> + /// Checks if you've bought all the dependencies of this upgrade. + /// </summary> + /// <param name="upgradeToCheck">Upgrade to search</param> + /// <returns>Whether you bought 'em all.</returns> + public static bool BoughtAllDependencies(Upgrade upgradeToCheck) + { + bool yes = true; + foreach(string id in upgradeToCheck.Dependencies) + { + if(API.Upgrades[id] == false) + { + yes = false; + } + } + return yes; + } + } + + public class Upgrade + { + /// <summary> + /// Initializes a new Shiftorium Upgrade. + /// </summary> + /// <param name="name">Name of the upgrade shown to the user.</param> + ///<param name="preview">An image that is shown below the upgrade description.</param> + /// <param name="desc">A small description of the upgrade.</param> + public Upgrade(string name, Image preview, string desc, string dependencies, string cat) { + string[] splitname = name.Split('-'); + + string[] splitcp = splitname[1].Remove(0, 1).Split(' '); + int cp = Convert.ToInt16(splitcp[0]); + + if(dependencies != null) + { + foreach(string id in dependencies.Split(';')) + { + Dependencies.Add(id); + } + } + + Preview = preview; + id = splitname[0].ToLower().Replace(" ", ""); + Name = name; + Description = desc; + Cost = cp; + Category = cat; + } + public List<string> Dependencies = new List<string>(); + public string id = "sampleupgrade"; + public string Name = "Sample Upgrade"; + public int Cost = 0; + public Image Preview = ShiftOS.Properties.Resources.upgradegray; + public string Description = "Sample Shiftorium Upgrade."; + public string Category = "fundamental"; + } +} diff --git a/source/WindowsFormsApplication1/Engine/Viruses.cs b/source/WindowsFormsApplication1/Engine/Viruses.cs new file mode 100644 index 0000000..303da83 --- /dev/null +++ b/source/WindowsFormsApplication1/Engine/Viruses.cs @@ -0,0 +1,620 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + class Viruses + { + public static Dictionary<string, string> Infections = new Dictionary<string, string>(); + + public static void CheckForInfected() + { + VirusTimer.Interval = 1000; + Infections.Clear(); + Scan(Paths.SaveRoot); + VirusTimer.Tick += new EventHandler(VirusTimer_Tick); + VirusTimer.Start(); + } + + public static void VirusTimer_Tick(object sender, EventArgs e) + { + ShiftoriumKiller.KillRandomUpgrade(); + if(InfectedWith("beepseverysecond")) + { + API.PlaySound(Properties.Resources._3beepvirus); + } + if(InfectedWith("imtheshifternow")) + { + Skinning.Utilities.Randomize(); + } + } + + public static void Scan(string directory) + { + foreach(string file in Directory.GetFiles(directory)) + { + CheckInfected(file); + } + foreach(string dir in Directory.GetDirectories(directory)) + { + if(dir != Paths.Mod_Temp) { + Scan(dir); + } + } + } + + public static void ScanForInfectable(string directory, ref List<string> file_list) + { + foreach (string file in Directory.GetFiles(directory)) + { + var finf = new FileInfo(file); + switch (finf.Extension) { + case ".skn": + case ".spk": + case ".dri": + case ".stp": + case ".pkg": + if (finf.Name != "HDD.dri") + { + file_list.Add(file); + } + break; + } + } + foreach (string dir in Directory.GetDirectories(directory)) + { + if (dir != Paths.Mod_Temp) + { + ScanForInfectable(dir, ref file_list); + } + } + } + const string virusfilename = "00110"; + + + public static void CheckInfected(string filepath) { + var finf = new FileInfo(filepath); + switch(finf.Extension) + { + case ".stp": + case ".spk": + case ".pkg": + case ".skn": + if (File.Exists(finf.FullName)) + { + try { + string pth = Paths.SystemDir + "_virusregister"; + API.ExtractFile(finf.FullName, pth, false); + string dirsep = "\\"; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsep = "\\"; + break; + default: + dirsep = "/"; + break; + } + if (File.Exists(pth + dirsep + virusfilename)) + { + string encrypted = File.ReadAllText(pth + dirsep + virusfilename); + if (encrypted != "" && encrypted != null) + { + foreach (string line in API.Encryption.Decrypt(encrypted).Split(';')) + { + if (Infections.ContainsKey(line)) + { + Infections[line] += ";" + finf.FullName; + } + else { + Infections.Add(line, finf.FullName); + } + } + } + } + Directory.Delete(pth, true); + } + catch + { + API.LogException("Corrupted package file detected while checking for infections... skipping.", false); + } + } + break; + case ".dri": + if (finf.Name != "HDD.dri" && !finf.Name.Contains("BN") && finf.Name != "Network.dri") + { + if (File.ReadAllText(finf.FullName) != "") + { + string encrypted = File.ReadAllText(finf.FullName); + try + { + foreach (string line in API.Encryption.Decrypt(encrypted).Split(';')) + { + if (Infections.ContainsKey(line)) + { + Infections[line] += ";" + finf.FullName; + } + else { + Infections.Add(line, finf.FullName); + } + } + } + catch + { + if (encrypted != "") + { + string decrypted = API.Encryption.Decrypt(encrypted); + if (Infections.ContainsKey(decrypted)) + { + Infections[decrypted] += ";" + finf.FullName; + } + else { + Infections.Add(decrypted, finf.FullName); + } + } + } + } + } + break; + + } + } + + public enum VirusID + { + ShiftoriumKiller, + WindowsEverywhere, + WindowMicrofier, + Bye, + WindowSpazzer, + KeyboardFucker, + ImTheShifterNow, + ThanksfortheInfo, + SkinInterceptor, + HolyFuckMyEars, + BeepsEverySecond, + MouseTrap, + Seized, + FileFucker, + } + + public class FileFucker + { + public static void GetSomeFiles(string directory, ref List<string> file_list) + { + foreach (string file in Directory.GetFiles(directory)) + { + var finf = new FileInfo(file); + switch (finf.Extension) + { + case ".npk": + case ".docx": + case ".doc": + case ".owd": + case ".txt": + if (finf.Name != "names.npk" && finf.Name != "_Log.txt") + { + file_list.Add(file); + } + break; + } + } + foreach (string dir in Directory.GetDirectories(directory)) + { + if (dir != Paths.Mod_Temp) + { + GetSomeFiles(dir, ref file_list); + } + } + } + + public static void Infect() + { + List<string> files = new List<string>(); + GetSomeFiles(Paths.SaveRoot, ref files); + var rnd = new Random(); + string fname = files[rnd.Next(0, files.Count - 1)]; + string fcontents = File.ReadAllText(fname); + string encrypted = API.Encryption.Encrypt(fcontents); + File.WriteAllText(fname, encrypted); + } + } + + public static bool InfectedWith(string id) + { + if(Infections.ContainsKey("virus:" + id)) + { + return true; + } + else + { + return false; + } + } + + public static void InfectFile(string FileName, VirusID id) + { + bool cont = false; + string infectionString = "virus:"; + switch (id) + { + case VirusID.WindowSpazzer: + infectionString = "virus:windowspazzer"; + break; + case VirusID.WindowMicrofier: + infectionString = "virus:windowmicrofier"; + break; + case VirusID.Bye: + infectionString = "virus:bye"; + break; + case VirusID.ShiftoriumKiller: + infectionString = "virus:shiftoriumkiller"; + break; + case VirusID.WindowsEverywhere: + infectionString = "virus:windowseverywhere"; + break; + case VirusID.KeyboardFucker: + infectionString = "virus:keyboardfucker"; + break; + case VirusID.ImTheShifterNow: + infectionString = "virus:imtheshifternow"; + break; + case VirusID.ThanksfortheInfo: + infectionString = "virus:thanksfortheinfo"; + break; + case VirusID.SkinInterceptor: + infectionString = "virus:skininterceptor"; + break; + case VirusID.HolyFuckMyEars: + infectionString = "virus:holyfuckmyears"; + break; + case VirusID.BeepsEverySecond: + infectionString = "virus:beepseverysecond"; + break; + case VirusID.Seized: + infectionString = "virus:seized"; + break; + case VirusID.FileFucker: + infectionString = "virus:filefucker"; + break; + } + FileInfo finf = new FileInfo(FileName); + switch(finf.Extension) + { + case ".skn": + case ".spk": + case ".stp": + case ".pkg": + if(!Directory.Exists(Paths.Mod_Temp)) + { + Directory.CreateDirectory(Paths.Mod_Temp); + } + string pth = Paths.SystemDir + "_virusinfect1"; + API.ExtractFile(finf.FullName, pth, false); + string dirsep = "\\"; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsep = "\\"; + break; + default: + dirsep = "/"; + break; + } + InfectFile(pth + dirsep + virusfilename, id); + File.Delete(finf.FullName); + ZipFile.CreateFromDirectory(pth, FileName); + Directory.Delete(pth, true); + break; + case ".dri": + if(finf.Name == "HDD.dri" || finf.Name.Contains("BN") || finf.Name == "Network.dri") + { + throw new NotHappeningException("You're not going to attempt to infect that file, are you?"); + } + else + { + try { + string encryptedfile = File.ReadAllText(finf.FullName); + string unencryptedfile = API.Encryption.Decrypt(encryptedfile); + unencryptedfile += ";" + infectionString; + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); + } + catch + { + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(infectionString)); + } + } + break; + default: + cont = true; + break; + + } + if (cont == true) + { + if (finf.Name == virusfilename) + { + try + { + string encryptedfile = File.ReadAllText(finf.FullName); + string unencryptedfile = API.Encryption.Decrypt(encryptedfile); + unencryptedfile += ";" + infectionString; + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); + } + catch + { + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(infectionString)); + } + } + } + CheckForInfected(); + } + + public static void DisInfect(string FileName) + { + FileInfo finf = new FileInfo(FileName); + switch (finf.Extension) + { + case ".skn": + case ".spk": + case ".stp": + case ".pkg": + string pth = Paths.SystemDir + "_viruscheck"; + API.ExtractFile(finf.FullName, pth, false); + string dirsep = "\\"; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsep = "\\"; + break; + default: + dirsep = "/"; + break; + } + if (File.Exists(pth + dirsep + virusfilename)) + { + File.Delete(pth + dirsep + virusfilename); + } + File.Delete(finf.FullName); + ZipFile.CreateFromDirectory(pth, finf.FullName); + Directory.Delete(pth, true); + break; + case ".dri": + if (finf.Name == "HDD.dri" || finf.Name.Contains("BN") || finf.Name == "Network.dri") + { + throw new NotHappeningException("You're not going to attempt to infect that file, are you?"); + } + else + { + try + { + string encryptedfile = File.ReadAllText(finf.FullName); + string unencryptedfile = API.Encryption.Decrypt(encryptedfile); + unencryptedfile = ""; + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); + } + catch + { + File.WriteAllText(finf.FullName, ""); + } + } + break; + + + } + CheckForInfected(); + } + + public static void InfectFile(string FileName, string id) + { + bool cont = false; + string infectionString = "virus:" + id; + FileInfo finf = new FileInfo(FileName); + switch (finf.Extension) + { + case ".skn": + case ".spk": + case ".stp": + case ".pkg": + string pth = Paths.SystemDir + "_virusinfect2"; + API.ExtractFile(finf.FullName, pth, false); + string dirsep = "\\"; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsep = "\\"; + break; + default: + dirsep = "/"; + break; + } + InfectFile(pth + dirsep + virusfilename, id); + File.Delete(finf.FullName); + ZipFile.CreateFromDirectory(pth, finf.FullName); + Directory.Delete(pth, true); + break; + case ".dri": + if (finf.Name == "HDD.dri" || finf.Name.Contains("BN") || finf.Name == "Network.dri") + { + throw new NotHappeningException("You're not going to attempt to infect that file, are you?"); + } + else + { + try + { + string encryptedfile = File.ReadAllText(finf.FullName); + string unencryptedfile = API.Encryption.Decrypt(encryptedfile); + unencryptedfile += ";" + infectionString; + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); + } + catch + { + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(infectionString)); + } + } + break; + default: + cont = true; + break; + + } + if (cont == true) + { + if (finf.Name == virusfilename) + { + try + { + string encryptedfile = File.ReadAllText(finf.FullName); + string unencryptedfile = API.Encryption.Decrypt(encryptedfile); + unencryptedfile += ";" + infectionString; + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); + } + catch + { + File.WriteAllText(finf.FullName, API.Encryption.Encrypt(infectionString)); + } + } + } + CheckForInfected(); + } + + + public static void InfectRandom() + { + var rnd = new Random(); + var files = new List<string>(); + ScanForInfectable(Paths.SaveRoot, ref files); + string filetoinfect = files[rnd.Next(0, files.Count - 1)]; + VirusID v = VirusID.ShiftoriumKiller; + int vid = rnd.Next(0, 11); + switch(vid) + { + case 0: + v = VirusID.ShiftoriumKiller; + break; + case 1: + v = VirusID.WindowsEverywhere; + break; + case 2: + v = VirusID.ImTheShifterNow; + break; + case 3: + v = VirusID.BeepsEverySecond; + break; + case 4: + v = VirusID.FileFucker; + break; + case 5: + v = VirusID.MouseTrap; + break; + case 6: + v = VirusID.Seized; + break; + case 7: + v = VirusID.SkinInterceptor; + break; + case 8: + v = VirusID.ThanksfortheInfo; + break; + case 9: + v = VirusID.KeyboardFucker; + break; + case 10: + v = VirusID.WindowMicrofier; + break; + case 11: + v = VirusID.Bye; + break; + case 12: + v = VirusID.WindowSpazzer; + break; + } + InfectFile(filetoinfect, v); + } + + public static void DropDevXPayload() + { + //Viruses... + var files = new List<string>(); + ScanForInfectable(Paths.SaveRoot, ref files); + try { + var rnd = new Random(); + string file = files[rnd.Next(0, files.Count - 1)]; + InfectFile(file, VirusID.ImTheShifterNow); + InfectFile(file, VirusID.MouseTrap); + } + catch + { + DropDevXPayload(); + } + + } + + private static Timer VirusTimer = new Timer(); + + public class ShiftoriumKiller + { + public static void KillRandomUpgrade() + { + if(Viruses.InfectedWith("shiftoriumkiller")) + { + int id = new Random().Next(0, SaveSystem.ShiftoriumRegistry.DefaultUpgrades.Count - 1); + Shiftorium.Upgrade upg = SaveSystem.ShiftoriumRegistry.DefaultUpgrades[id]; + int chance = new Random().Next(0, 100); + if(chance == 50) + { + Shiftorium.Utilities.Unbuy(upg.id); + } + } + } + } + + public class KeyboardInceptor + { + public static string[] Chars = + { + "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", + "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "~", "!", "@", "#", "$", "%", "^", "&", "(", ")", "-", "_", "=", "+", + "/", "?", "\\", "|", "[", "]", "{", "}", "'", "\"", ";", ":", ".", ">", ",", "<", + }; + + public static string Intercept() + { + Random rnd = new Random(); + int shouldbeupper = rnd.Next(0, 10); + switch(shouldbeupper) + { + case 1: + case 3: + case 5: + case 7: + case 9: + return Chars[rnd.Next(0, Chars.Length - 1)].ToUpper(); + default: + return Chars[rnd.Next(0, Chars.Length - 1)].ToLower(); + } + } + } + } + + public class NotHappeningException : Exception + { + public NotHappeningException() : base("You tried to do something that ain't gonna happen.") + { + + } + + public NotHappeningException(string message) : base(message) + { + + } + } + +} diff --git a/source/WindowsFormsApplication1/Engine/undo.cs b/source/WindowsFormsApplication1/Engine/undo.cs new file mode 100644 index 0000000..98fb920 --- /dev/null +++ b/source/WindowsFormsApplication1/Engine/undo.cs @@ -0,0 +1,8 @@ +using System.Collections.Generic; +using System.Drawing; + +public class undo +{ + public Stack<Image> undoStack = new Stack<Image>(); + public Stack<Image> redoStack = new Stack<Image>(); +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/File Skimmer.Designer.cs b/source/WindowsFormsApplication1/File Skimmer.Designer.cs deleted file mode 100644 index 30d41d8..0000000 --- a/source/WindowsFormsApplication1/File Skimmer.Designer.cs +++ /dev/null @@ -1,245 +0,0 @@ -namespace ShiftOS -{ - partial class File_Skimmer - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(File_Skimmer)); - this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); - this.toolStrip2 = new System.Windows.Forms.ToolStrip(); - this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); - this.txtfilename = new System.Windows.Forms.ToolStripTextBox(); - this.cbfiletypes = new System.Windows.Forms.ToolStripComboBox(); - this.btnperformaction = new System.Windows.Forms.ToolStripButton(); - this.btncancel = new System.Windows.Forms.ToolStripButton(); - this.lvfiles = new System.Windows.Forms.ListView(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.lbcurrentfolder = new System.Windows.Forms.ToolStripLabel(); - this.imgtypes = new System.Windows.Forms.ImageList(this.components); - this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); - this.toolStripContainer1.ContentPanel.SuspendLayout(); - this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); - this.toolStripContainer1.SuspendLayout(); - this.toolStrip2.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - this.toolStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // toolStripContainer1 - // - // - // toolStripContainer1.BottomToolStripPanel - // - this.toolStripContainer1.BottomToolStripPanel.Controls.Add(this.toolStrip2); - // - // toolStripContainer1.ContentPanel - // - this.toolStripContainer1.ContentPanel.Controls.Add(this.lvfiles); - this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(763, 348); - this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); - this.toolStripContainer1.Name = "toolStripContainer1"; - this.toolStripContainer1.Size = new System.Drawing.Size(763, 413); - this.toolStripContainer1.TabIndex = 0; - this.toolStripContainer1.Text = "toolStripContainer1"; - // - // toolStripContainer1.TopToolStripPanel - // - this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1); - this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); - // - // toolStrip2 - // - this.toolStrip2.AutoSize = false; - this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None; - this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripLabel1, - this.txtfilename, - this.cbfiletypes, - this.btnperformaction, - this.btncancel}); - this.toolStrip2.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; - this.toolStrip2.Location = new System.Drawing.Point(0, 0); - this.toolStrip2.Name = "toolStrip2"; - this.toolStrip2.Size = new System.Drawing.Size(763, 23); - this.toolStrip2.Stretch = true; - this.toolStrip2.TabIndex = 0; - // - // toolStripLabel1 - // - this.toolStripLabel1.Name = "toolStripLabel1"; - this.toolStripLabel1.Size = new System.Drawing.Size(63, 15); - this.toolStripLabel1.Text = "File Name:"; - // - // txtfilename - // - this.txtfilename.Name = "txtfilename"; - this.txtfilename.Size = new System.Drawing.Size(500, 23); - // - // cbfiletypes - // - this.cbfiletypes.Name = "cbfiletypes"; - this.cbfiletypes.Size = new System.Drawing.Size(75, 23); - this.cbfiletypes.Text = ".txt"; - this.cbfiletypes.SelectedIndexChanged += new System.EventHandler(this.cbfiletypes_SelectedIndexChanged); - // - // btnperformaction - // - this.btnperformaction.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.btnperformaction.Image = ((System.Drawing.Image)(resources.GetObject("btnperformaction.Image"))); - this.btnperformaction.ImageTransparentColor = System.Drawing.Color.Magenta; - this.btnperformaction.Name = "btnperformaction"; - this.btnperformaction.Size = new System.Drawing.Size(40, 19); - this.btnperformaction.Text = "Open"; - this.btnperformaction.Click += new System.EventHandler(this.btnperformaction_Click); - // - // btncancel - // - this.btncancel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.btncancel.Image = ((System.Drawing.Image)(resources.GetObject("btncancel.Image"))); - this.btncancel.ImageTransparentColor = System.Drawing.Color.Magenta; - this.btncancel.Name = "btncancel"; - this.btncancel.Size = new System.Drawing.Size(47, 19); - this.btncancel.Text = "Cancel"; - this.btncancel.Click += new System.EventHandler(this.btncancel_Click); - // - // lvfiles - // - this.lvfiles.Dock = System.Windows.Forms.DockStyle.Fill; - this.lvfiles.Location = new System.Drawing.Point(0, 0); - this.lvfiles.Name = "lvfiles"; - this.lvfiles.Size = new System.Drawing.Size(763, 348); - this.lvfiles.TabIndex = 0; - this.lvfiles.UseCompatibleStateImageBehavior = false; - this.lvfiles.SelectedIndexChanged += new System.EventHandler(this.lvfiles_SelectedIndexChanged); - // - // menuStrip1 - // - this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newFolderToolStripMenuItem, - this.deleteToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(763, 24); - this.menuStrip1.TabIndex = 0; - this.menuStrip1.Text = "menuStrip1"; - // - // newFolderToolStripMenuItem - // - this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem"; - this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(79, 20); - this.newFolderToolStripMenuItem.Text = "New Folder"; - this.newFolderToolStripMenuItem.Click += new System.EventHandler(this.newFolderToolStripMenuItem_Click); - // - // deleteToolStripMenuItem - // - this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; - this.deleteToolStripMenuItem.Size = new System.Drawing.Size(52, 20); - this.deleteToolStripMenuItem.Text = "Delete"; - this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); - // - // toolStrip1 - // - this.toolStrip1.AutoSize = false; - this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.lbcurrentfolder}); - this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table; - this.toolStrip1.Location = new System.Drawing.Point(0, 24); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.ShowItemToolTips = false; - this.toolStrip1.Size = new System.Drawing.Size(763, 18); - this.toolStrip1.Stretch = true; - this.toolStrip1.TabIndex = 1; - // - // lbcurrentfolder - // - this.lbcurrentfolder.Name = "lbcurrentfolder"; - this.lbcurrentfolder.Size = new System.Drawing.Size(12, 15); - this.lbcurrentfolder.Text = "/"; - // - // imgtypes - // - this.imgtypes.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgtypes.ImageStream"))); - this.imgtypes.TransparentColor = System.Drawing.Color.Transparent; - this.imgtypes.Images.SetKeyName(0, "application"); - this.imgtypes.Images.SetKeyName(1, "package"); - this.imgtypes.Images.SetKeyName(2, "none"); - this.imgtypes.Images.SetKeyName(3, "doc"); - this.imgtypes.Images.SetKeyName(4, "dir"); - this.imgtypes.Images.SetKeyName(5, "skin"); - // - // File_Skimmer - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(763, 413); - this.Controls.Add(this.toolStripContainer1); - this.Name = "File_Skimmer"; - this.Text = "File_Skimmer"; - this.Load += new System.EventHandler(this.File_Skimmer_Load); - this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false); - this.toolStripContainer1.ContentPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.PerformLayout(); - this.toolStripContainer1.ResumeLayout(false); - this.toolStripContainer1.PerformLayout(); - this.toolStrip2.ResumeLayout(false); - this.toolStrip2.PerformLayout(); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.ToolStripContainer toolStripContainer1; - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem newFolderToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; - private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ListView lvfiles; - private System.Windows.Forms.ToolStripLabel lbcurrentfolder; - private System.Windows.Forms.ImageList imgtypes; - private System.Windows.Forms.ToolStrip toolStrip2; - private System.Windows.Forms.ToolStripLabel toolStripLabel1; - private System.Windows.Forms.ToolStripTextBox txtfilename; - private System.Windows.Forms.ToolStripComboBox cbfiletypes; - private System.Windows.Forms.ToolStripButton btnperformaction; - private System.Windows.Forms.ToolStripButton btncancel; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/File Skimmer.cs b/source/WindowsFormsApplication1/File Skimmer.cs deleted file mode 100644 index 4ee8531..0000000 --- a/source/WindowsFormsApplication1/File Skimmer.cs +++ /dev/null @@ -1,602 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class File_Skimmer : Form - { - /// <summary> - /// Opens a file in the proper program. - /// </summary> - /// <param name="filepath">Path to the file.</param> - public void OpenFile(string filepath) - { - bool success = true; - FileInfo finf = new FileInfo(filepath); - switch(finf.Extension) - { - case ".saa": - if(API.Upgrades["shiftnet"] == true) - { - API.LaunchMod(finf.FullName); - } - else - { - success = false; - } - break; - case ".txt": - if (API.Upgrades["textpadopen"] == true) - { - var pad = new TextPad(); - pad.txtuserinput.Text = File.ReadAllText(finf.FullName); - API.CreateForm(pad, "TextPad", Properties.Resources.iconTextPad); - } else - { - success = false; - } - break; - case ".pkg": - case ".stp": - if (API.Upgrades["shiftnet"] == true) - { - API.CreateInfoboxSession("Package Installation", "Would you like to install the package?", infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var result = API.GetInfoboxResult(); - if (result == "Yes") - { - try - { - var res = Package_Grabber.ExtractPackage(finf.FullName); - if (res == "fail") - { - throw new Exception("Michael was dumb and messed something up."); - } - else - { - Package_Grabber.InstallPackage(res + "\\"); - API.CreateInfoboxSession("Package Installer - Success", "The package has been installed successfully!", infobox.InfoboxMode.Info); - API.UpdateWindows(); - API.CurrentSession.SetupDesktop(); - } - } - catch (Exception ex) - { - if (API.DeveloperMode == true) - { - API.CreateInfoboxSession("Package Installer - Error", ex.Message, infobox.InfoboxMode.Info); - } - else - { - API.CreateInfoboxSession("Package Installer - Error", "An error has occurred while installing the package.", infobox.InfoboxMode.Info); - } - } - } - }; - } - else { - success = false; - } - break; - case ".skn": - if(API.Upgrades["skinning"] == true) - { - var loader = new SkinLoader(); - API.CreateForm(loader, API.LoadedNames.SkinLoaderName, Properties.Resources.iconSkinLoader); - loader.LoadSkin(finf.FullName); - } - else - { - success = false; - } - break; - case ".spk": - if (API.Upgrades["skinning"] == true) - { - var loader = new SkinLoader(); - loader.LoadedPack = finf.FullName; - API.CreateForm(loader, API.LoadedNames.SkinLoaderName, Properties.Resources.iconSkinLoader); - loader.SetupPackUI(); - } - else - { - success = false; - } - break; - default: - success = false; - break; - } - //If we made it this far and nothing happened, tell the user. - if(success == false) - { - API.CreateInfoboxSession("File Skimmer", "File Skimmer cannot find a program to open this file.", infobox.InfoboxMode.Info); - } - } - - /// <summary> - /// The File Skimmer. - /// </summary> - public File_Skimmer() - { - MountMgr.Init(); - InitializeComponent(); - } - - public File_Skimmer(FileSkimmerMode mode, string filters) - { - InitializeComponent(); - Mode = mode; - Filters = filters.Split(';'); - } - - public string CurrentFolder = Paths.SaveRoot; - - private void File_Skimmer_Load(object sender, EventArgs e) - { - SetupUI(); - ListFiles(); - lvfiles.DoubleClick += (object s, EventArgs a) => - { - if(lvfiles.SelectedItems.Count > 0) - { - var item = lvfiles.SelectedItems[0]; - string tag = (string)item.Tag; - if(Directory.Exists(tag)) - { - txtfilename.Text = new DirectoryInfo(tag).Name; - CurrentFolder = tag; - ListFiles(); - - } else - { - if(File.Exists(tag)) - { - if(Mode == FileSkimmerMode.Open) - { - FileInfo finf = new FileInfo(tag); - txtfilename.Text = finf.Name.Replace(finf.Extension, ""); - btnperformaction_Click(s, a); - } - else if(Mode == FileSkimmerMode.Default) - { - OpenFile(tag); - } - } else - { - if(tag == "_uponedir") - { - if (lbcurrentfolder.Text != "/") - { - if (MountPoint != null && lbcurrentfolder.Text == MountPoint.Replace("\\", "/")) - { - CurrentFolder = Paths.SaveRoot; - ListFiles(); - - } - else - { - CurrentFolder = Directory.GetParent(CurrentFolder).FullName; - ListFiles(); - } - } else - { - API.CreateInfoboxSession("Can't read directory", "File Skimmer is not able to read the requested directory as it is not formatted with the ShiftFS file system.", infobox.InfoboxMode.Info); - } - } - else if(tag.StartsWith("drv:")) - { - string drivepath = tag.Remove(0, 4); - CurrentFolder = drivepath; - MountPoint = drivepath; - ListFiles(); - } - } - } - } - }; - - txtfilename.KeyDown += (object s, KeyEventArgs a) => - { - if (a.KeyCode == Keys.Enter) - { - a.SuppressKeyPress = true; - btnperformaction_Click(s, (EventArgs)a); - } - }; - } - - string MountPoint = null; - - /// <summary> - /// Lists all the files in the current folder. - /// </summary> - public void ListFiles() - { - MountMgr.Init(); - SetupImages(); - txtfilename.Text = ""; - //SetupUI(); - newFolderToolStripMenuItem.Visible = API.Upgrades["fsnewfolder"]; - deleteToolStripMenuItem.Visible = API.Upgrades["fsdelete"]; - if(newFolderToolStripMenuItem.Visible == false && deleteToolStripMenuItem.Visible == false) - { - menuStrip1.Hide(); - } else - { - menuStrip1.Show(); - } - lbcurrentfolder.Text = CurrentFolder.Replace(Paths.SaveRoot, "/").Replace("\\", "/").Replace("//", "/"); - lvfiles.Items.Clear(); - lvfiles.LargeImageList = imgtypes; - ListViewItem upone = new ListViewItem(); - upone.Text = "Up One Level"; - upone.Tag = "_uponedir"; - upone.ImageKey = "directory"; - lvfiles.Items.Add(upone); - if(CurrentFolder == Paths.SaveRoot) - { - foreach(var drive in MountMgr.links) - { - var dinf = new DirectoryInfo(drive.Key); - var item = new ListViewItem(); - item.Text = drive.Value; - item.Tag = "drv:" + dinf.FullName; - lvfiles.Items.Add(item); - item.ImageKey = "directory"; - } - } - foreach (string dir in Directory.GetDirectories(CurrentFolder)) - { - var dirinf = new DirectoryInfo(dir); - ListViewItem lvitem = new ListViewItem(); - lvitem.Text = dirinf.Name; - lvitem.Tag = dirinf.FullName; - lvitem.ImageKey = "directory"; - if (!dirinf.Name.StartsWith("_")) - { - lvfiles.Items.Add(lvitem); - } - else { - if (API.DeveloperMode == true) - { - lvfiles.Items.Add(lvitem); - } - } - } - foreach (string file in Directory.GetFiles(CurrentFolder)) - { - var dirinf = new FileInfo(file); - ListViewItem lvitem = new ListViewItem(); - lvitem.Text = dirinf.Name; - lvitem.Tag = dirinf.FullName; - lvitem.ImageKey = GetFileType(dirinf.Extension); - if (!dirinf.Name.StartsWith("_")) - { - AddItem(lvitem); - } - else { - if (API.DeveloperMode == true) - { - AddItem(lvitem); - } - } - } - - } - - public FileSkimmerMode Mode = FileSkimmerMode.Default; - public string FileName = ""; - private string[] Filters = null; - - /// <summary> - /// Sets up the user interface. - /// </summary> - private void SetupUI() - { - switch(Mode) - { - case FileSkimmerMode.Default: - Filters = null; - this.toolStrip2.Hide(); - break; - case FileSkimmerMode.Open: - this.toolStrip2.Show(); - this.btnperformaction.Text = "Open"; - cbfiletypes.Items.Clear(); - foreach (string filter in Filters) - { - cbfiletypes.Items.Add(filter); - } - selectedFilter = Filters[0]; - cbfiletypes.Text = Filters[0]; - break; - case FileSkimmerMode.Save: - this.toolStrip2.Show(); - this.btnperformaction.Text = "Save"; - cbfiletypes.Items.Clear(); - foreach (string filter in Filters) - { - cbfiletypes.Items.Add(filter); - } - selectedFilter = Filters[0]; - cbfiletypes.Text = Filters[0]; - break; - case FileSkimmerMode.OpenFolder: - this.toolStrip2.Show(); - this.btnperformaction.Text = "Open"; - cbfiletypes.Visible = false; - selectedFilter = "dir"; - break; - } - } - - /// <summary> - /// UI mode. - /// </summary> - public enum FileSkimmerMode - { - Default, - Open, - Save, - OpenFolder - } - - /// <summary> - /// Adds an item to the file list. - /// </summary> - /// <param name="item">Item to add.</param> - private void AddItem(ListViewItem item) - { - if (Mode == FileSkimmerMode.Default) - { - lvfiles.Items.Add(item); - } else if(Mode == FileSkimmerMode.OpenFolder) { - if (Directory.Exists(item.Tag.ToString())) - { - lvfiles.Items.Add(item); - } - } else - { - if (item.Text.ToLower().EndsWith(selectedFilter.ToLower())) - { - lvfiles.Items.Add(item); - } - } - } - - /// <summary> - /// Adds appropriate icons from icon registry to display files. - /// </summary> - public void SetupImages() - { - imgtypes.Images.Clear(); - imgtypes.Images.Add("application", API.GetIcon("SAAFile")); - imgtypes.Images.Add("directory", API.GetIcon("Folder")); - imgtypes.Images.Add("doc", API.GetIcon("TextFile")); - imgtypes.Images.Add("skin", API.GetIcon("SkinFile")); - imgtypes.Images.Add("package", API.GetIcon("SetupPackage")); - imgtypes.Images.Add("none", API.GetIcon("UnrecognizedFile")); - } - - /// <summary> - /// Returns proper file ID based on extension - /// </summary> - /// <param name="extension">Extension to test.</param> - /// <returns>The File ID.</returns> - public string GetFileType(string extension) - { - SetupImages(); - switch(extension) - { - case ".owd": - case ".doc": - case ".docx": - case ".txt": - return "doc"; - case ".exe": - case ".saa": - return "application"; - case ".stp": - case ".pkg": - case ".mod": - return "package"; - case ".skn": - case ".spk": - return "skin"; - default: - return "none"; - } - } - - private void newFolderToolStripMenuItem_Click(object sender, EventArgs e) - { - API.CreateInfoboxSession("Create New Folder", "Please enter the name of the folder.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string dname = API.GetInfoboxResult(); - if (dname != "" && dname != "Cancelled") - { - string dirsepchar = ""; - switch (OSInfo.GetPlatformID()) - { - case "microsoft": - dirsepchar = "\\"; - break; - default: - dirsepchar = "/"; - break; - } - if (dname.Contains("/") || dname.Contains("\\")) - { - API.CreateInfoboxSession("Error", "Directories cannot have '\\' or '/' in their names!", infobox.InfoboxMode.Info); - } - else { - string fullname = CurrentFolder + dirsepchar + dname; - try - { - if (!Directory.Exists(fullname)) - { - Directory.CreateDirectory(fullname); - } - } - catch - { - API.CreateInfoboxSession("Error", "File Skimmer could not create the directory.", infobox.InfoboxMode.Info); - } - } - } - ListFiles(); - }; - } - - private void deleteToolStripMenuItem_Click(object sender, EventArgs e) - { - string res = "nothing"; - if(lvfiles.SelectedItems.Count > 0) - { - var lvitem = lvfiles.SelectedItems[0]; - string lvtag = (string)lvitem.Tag; - switch(lvtag) - { - - case "_upOne": - res = "up"; - break; - default: - if(Directory.Exists(lvtag)) - { - res = "dir"; - } else - { - if(File.Exists(lvtag)) - { - res = "file"; - } - } - break; - } - switch(res) - { - case "file": - API.CreateInfoboxSession("Delete File", "Are you sure you want to delete this file?", infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - if(API.GetInfoboxResult() == "Yes") - { - File.Delete(lvtag); - ListFiles(); - } - }; - break; - case "dir": - var fname = lvtag; - if(CheckTag(fname) == true) - { - API.CreateInfoboxSession("Permission denied", "You cannot delete this directory as you are denied permission.", infobox.InfoboxMode.Info); - } - else - { - API.CreateInfoboxSession("Delete Folder", "Are you sure you want to delete this folder? Everything inside it will be permanently lost!", infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - if (API.GetInfoboxResult() == "Yes") - { - Directory.Delete(lvtag, true); - ListFiles(); - } - }; - } - break; - case "up": - API.CreateInfoboxSession("File Skimmer", "You cannot delete the 'Up One Level' file because it is not a real file.", infobox.InfoboxMode.Info); - break; - } - } - } - - /// <summary> - /// No idea what this does but it seems to be needed so don't touch it. - /// </summary> - /// <param name="fullpath">Path to a file.</param> - /// <returns>Oh NOW I know what this does. It returns whether this file can be deleted or if it's a vital save file.</returns> - private bool CheckTag(string fullpath) - { - var correct = fullpath + OSInfo.DirectorySeparator; - if (correct == Paths.SystemDir || correct == Paths.Applications || correct == Paths.Skins || correct == Paths.ToBeLoaded || correct == Paths.LoadedSkin || correct == Paths.SoftwareData || correct == Paths.Drivers || correct == Paths.Mod_AppLauncherEntries || correct == Paths.Mod_Temp) - { - return true; - } - else - { - return false; - } - } - - private string selectedFilter = null; - - private void cbfiletypes_SelectedIndexChanged(object sender, EventArgs e) - { - selectedFilter = (string)cbfiletypes.SelectedItem; - ListFiles(); - } - - private void btnperformaction_Click(object sender, EventArgs e) - { - if (txtfilename.Text != "") - { - string dirsepchar = "\\"; - switch (OSInfo.GetPlatformID()) - { - case "microsoft": - dirsepchar = "\\"; - break; - default: - dirsepchar = "/"; - break; - } - string fullPath = null; - if (Mode == FileSkimmerMode.OpenFolder) - { - fullPath = CurrentFolder + dirsepchar + txtfilename.Text; - } - else { - fullPath = CurrentFolder + dirsepchar + txtfilename.Text.Replace(selectedFilter, "") + selectedFilter; - } - FileName = fullPath; - this.Close(); - } - } - - private void btncancel_Click(object sender, EventArgs e) - { - FileName = ""; - this.Close(); - } - - private void lvfiles_SelectedIndexChanged(object sender, EventArgs e) - { - try - { - var itm = lvfiles.SelectedItems[0]; - if(File.Exists(itm.Tag.ToString())) - { - txtfilename.Text = itm.Text; - } - } - catch - { - - } - } - } -} diff --git a/source/WindowsFormsApplication1/File Skimmer.resx b/source/WindowsFormsApplication1/File Skimmer.resx deleted file mode 100644 index 2d817a4..0000000 --- a/source/WindowsFormsApplication1/File Skimmer.resx +++ /dev/null @@ -1,338 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>339, 17</value> - </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="btnperformaction.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG - YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 - 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw - bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc - VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 - c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 - Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo - mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ - kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D - TgDQASA1MVpwzwAAAABJRU5ErkJggg== -</value> - </data> - <data name="btncancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG - YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 - 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw - bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc - VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 - c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 - Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo - mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ - kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D - TgDQASA1MVpwzwAAAABJRU5ErkJggg== -</value> - </data> - <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>132, 17</value> - </metadata> - <metadata name="imgtypes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>237, 17</value> - </metadata> - <data name="imgtypes.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> - <value> - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAm - JwAAAk1TRnQBSQFMAgEBBgEAAVABAAFQAQABQAEAAUABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo - BAABAQIAAYADAAEBAQABCAYAAYAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA - AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 - AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA - AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm - AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM - AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA - ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz - AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ - AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM - AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA - AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA - AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ - AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/ - AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA - AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm - ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ - Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz - AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA - AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM - AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM - ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM - Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA - AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM - AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ - AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz - AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm - AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw - AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEAQPTAAAH/Afc87AEH - AfTAAAH/ARQBDjoQAQ4B7AH0wAAB/wIUOuwBEAHsAfTAAAH/AhQ67AEQAewB9MAAAf8CFDrsARAB7AH0 - wAAB/wIUOuwBEAHsAfTAAAH/AhQ67AEQAewB9MAAAf8CFDrsARAB7AH0wAAB/wIUOuwBEAHsAfQ/9wHw - gAAB/wIUOuwBEAHsAfQBAAEQOxUBQwEOAeyAAAH/AhQ67AEQAewB9AEAAe088QEUAeyAAAH/AhQ67AEQ - AewB9AEAAe87/wH0ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AfI1vAHwAfQB/wH0ARIB7IAAAf8CFDrs - ARAB7AH0AQAB7wL/Afg1EQFDAQcB/wH0ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW01AAEOAe8B/wH0 - ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAEOCBEBDwEAAQ8IEQIOARAHEQEQAQ4BAAEOAe8B/wH0 - ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAESCLwB7AEAAewIvAFtARAB7we8AQcBQwEAAQ4B7wH/ - AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B9AHvBewB8AHvAQ4BkgHxBewB9wH0AfgBQwHw - AQcF7AEHAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B8wEUBQAB9wHv - AQ4BkgHvAQ4EAAEVAfEB6wFDAfAB+AUAAW0B8gEUAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEA - Ae8C/wFtFAABbQHzARQFAAH3Ae8BDgGSAe8BDgQAARUB8QHrAUMB8AH4BQABbQHyARQBAAEOAe8B/wH0 - ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAFtAfMBFAUAAfcB7wEOAZIB7wEOBAABFQHxAesBQwHw - AfgFAAFtAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B8wEUBQAB9wHv - AQ4BkgHvAQ4EAAEVAfEB6wFDAfAB+AUAAW0B8gEUAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEA - Ae8C/wFtFAABbQHzARQFAAH3Ae8BDgGSAe8BDgQAARUB8QHrAUMB8AH4BQABbQHyARQBAAEOAe8B/wH0 - ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAFtAfQB7QVtAbwB7wEOAZIB8AHrBG0B7AHzAesBQwHw - Ae8FbQHvAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0I8wH3AQ4B7Qjz - AesBEQG8B/MB8QEVAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEAAe8C/wFtFAABDwETBhQBEwFD - AQABEQETBhQBEwEQAQ4BFQETBxQBDgEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbTUA - AQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbTYOAQcB/wH0ARIB7IAAAf8CFDrsARAB7AH0 - AQAB7wL/Abw27wHzAf8B9AESAeyAAAH/ARQBQzptAQ8B7AH0AQAB7zv/AfQBEgHsgAAB/wEUPAAB7AH0 - AQAB7zv/AfQBEgHsgAAB/wG8AW0BDxNtARMBAAHsJAcB8QH0AQAB7zv/AfQBEgHsgAAC/wHsARAS7AFt - ARIB7AHxJf8B9AEAAe87/wH0ARIB7IAAAv8B7AEQEuwCFCf/AfQBAAHvO/8B9AESAeyAAAL/AewBEBLs - AhQn/wH0AQAB7wL/Abw27wHzAf8B9AESAeyAAAL/AewBEBHsARUB6wG8J/8B9AEAAe8C/wHvNuwB8QH/ - AfQBEgHsgAAC/wHsARAP7AHrARQB6wEHKP8B9AEAAe8C/wHvNuwB8QH/AfQBEgHsgAAC/wHsARAO7AHr - AeoBFAG8Kf8B9AEAAe8C/wHvFOwBbQhDARMB+AESCEMB6gHrARQHQwEVAW0C7AHxAf8B9AESAeyAAAL/ - AewBEA7sAhQr/wH0AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEUAW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAA - Av8B8QHtDhAB6wG8K/8B9AEAAe8C/wHvFOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AES - AeyAAAP/AfEO7AEHLP8B9AEAAe8C/wHvFOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AES - AeyAAD//AfQBAAHvAv8B7xTsARMIAAERAfgBQwgAARQBbQEOBwABDgFtAuwB8QH/AfQBEgHsgAA//wH0 - AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEUAW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAAP/8B9AEAAe8C/wHv - FOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AESAeyAAD//AfQBAAHvAv8B7xTsARMIAAER - AfgBQwgAARQBbQEOBwABDgFtAuwB8QH/AfQBEgHsgAA//wH0AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEU - AW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAAP/8B9AEAAe8C/wHvFOwBbQgUARIB+AHqCBQBbQHrARMIFAHr - AuwB8QH/AfQBEgHsgAA//wH0AQAB7wL/Ae827AHxAf8B9AESAeyAAD//AfQBAAHvAv8B7zbsAfEB/wH0 - ARIB7IAAP/8B9AEAAe8C/wHwNgcB8wH/AfQBEgHsgAA//wH0AQAB7zv/AfQBEgHsgAA//wH0AQAB7zv/ - AfQBEgHsgAA//wH0AQAB6jvtAewBEQHsgAA//wH0PxEBkoAAP/8B9D/yAfSAAD//AfTAAD//AfTAAD// - AfTAAD//AfTAAD//AfTAAD//AfTAAD//AfTAAD//AfT/AEEAgPSAAAH/Afc87AEHAfQB/wH3POwBBwH0 - gAAB/wEUARA6FAEOAewB9AH/ARQBEDoUAQ4B7AH0gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0 - gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0 - gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0AgAB/znzAfQFAAH/OfMB9AMAAf8BFAHsOv8BFAHs - AfQB/wEUAewc/wL2A/8B9hj/ARQB7AH0AgAB8wGSOO0BvAUAAfMBkjjtAbwDAAH/ARQB7Dr/ARQB7AH0 - Af8BFAHsGf8J9gb/AbwPFAHrAf8BFAHsAfQCAAHzAewB7zYHAe0BBwUAAfMB7AHvNgcB7QEHAwAB/wEU - Aew6/wEUAewB9AH/ARQB7Bj/CvYG/wHxD+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8 - Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsFv8M9hj/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUA - AfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsFv8M9hj/ARQB7AH0AgAB8wHsAbw1/wH0 - AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsEv8K9gH/BfYB9AT2Af8BvA8U - AesB/wEUAewB9AIAAfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAew6/wEUAewB9AH/ - ARQB7BP/CvYF/wL2Av8C9gHxD+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3 - AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsE/8J9gH0Cf8B9AH2Ev8BFAHsAfQCAAHzAewBvDX/AfQB9wEH - BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHsAfQB/wEUAewS/wT2Ev8B9hH/ARQB7AH0AgAB8wHs - Abw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsE/8D9gH0I/8BFAHs - AfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHsAfQB/wEUAewB8RXs - Ausg7AH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHs - AfQB/wEUAewBvBMUAxUhFAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMA - Af8BFAHsGf8B9iD/ARQB7AH0Af8BFAHsFP8B9gEbAfYd/wH2Bf8BFAHsAfQCAAHzAewBvDX/AfQB9wEH - BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsGP8B8AHrAeoB7wH2Hf8BFAHsAfQB/wEUAewV/wH2JP8BFAHs - AfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsF/8B9AHvARABDwHrAfMd/wEU - AewB9AH/ARQB7AHxN+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ - ARQB7Bf/AfIBkgIOAW0B8R3/ARQB7AH0Af8BFAHsAbw3FAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEH - BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsF/8B9AEHARQBQwHtAfYd/wEUAewB9AH/ARQB7BL/AfYn/wEU - AewB9AIAAfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewY/wH0ArwB8h7/ARQB7AH0 - Af8BFAHsMv8B9Af/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ - ARQB7AH0Af8BFAHsAfEx7ALrBOwB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3 - AQcDAAH/ARQB7Bj/AfMBBwHwAfMe/wEUAewB9AH/ARQB7AG8KRQCFQYUAUMBFQQUAesB/wEUAewB9AIA - AfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewX/wH0Ae8BAAESAQce/wEUAewB9AH/ - ARQB7Cr/AfMB9Ab/AfAB8gb/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ - ARQB7Bf/AfIBkgEAAeoBBx7/ARQB7AH0Af8BFAHsMv8D9AX/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUA - AfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bf/AfIB7QEAARIBBx7/ARQB7AH0Af8BFAHsAfEy7ALrA+wB9wH/ - ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bf/AfMB9wEOARQB9wH0 - Hf8BFAHsAfQB/wEUAewBvDIUAhUDFAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0 - AfcBBwMAAf8BFAHsGP8BvAEUAQ4BEgEHHf8BFAHsAfQB/wEUAewz/wH0AfMF/wEUAewB9AIAAfMB7AG8 - Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewY/wHzAQcBEwERARMBBwHzG/8BFAHsAfQB/wEU - Aewz/wH0ARsC8wP/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bn/ - AfQB9wESAREBEgHvAfQa/wEUAewB9AH/ARQB7AHxMuwF6wH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wEH - BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsGv8B9gHvARIBAAFtAQca/wEUAewB9AH/ARQB7AG8NRQCFQHr - Af8BFAHsAfQCAAHzAewBvDX/AfQB9wGSAgcB8gIAAfMB7AG8AfMBvAEHAu8CvALvAQcB9AHxAQcB9AH/ - AfME7wHwAf8BvAHwHf8B9AH3AZICBwHyAf8BFAHsHP8BBwEAASIBcwHzGf8BFAHsAfQB/wEUAew2/wHz - AfQC/wEUAewB9AIAAfMB7AG8Nf8B9AH3AewB9wHsAQcCAAHzAewBvAHzAQcB7wGSAewC7wHsAZIBBwH0 - AQcBkgHzAfQB8ALtAfcB7AHvAfQBkgH3AfIB9Bv/AfQB9wHsAfcB7AEHAf8BFAHsHP8B8QHsAREBEgHv - Gf8BFAHsAfQB/wEUAew6/wEUAewB9AIAAfMB7AG8Nf8B9AH3Ae8B9AH3AQcCAAHzAewBvAL/AfIBBwHs - AfcCBwHxAv8BBwGSAfMB8gIHAfAB8wGSAe8B9AHsAesB7wHyG/8B9AH3Ae8B9AH3AQcB/wEUAewU/wH0 - AfIB9AX/AfMB9wERARQB9xn/ARQB7AH0Af8BFAHsAfE37AH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wHv - Af8B7wEHAgAB8wHsAbwB9AHwAQcB7wMHAe8BvAHzAf8BBwGSAfMB8gIHAfEB9AHsAZIB9ALtAgcB8Br/ - AfQB9wHvAf8B7wEHAf8BFAHsFP8B8wHvAbwB8wT/AfEB7AEQARQB7xn/ARQB7AH0Af8BFAHsAbwRFAIV - JBQB6wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwIAAfMB7AG8AfIB7wGSAe8B8QHwAQcBkgHv - AfAB8wEHAe0C8QIHAfEB8wHrAe0B/wL3AfAB7wEHGv8B9AH3Ae8B/wHvAQcB/wEUAewU/wHxAewB6wEH - A/8B9AEHARQBDgETAe8Z/wEUAewB9AH/ARQB7BL/AfMB9Cb/ARQB7AH0AgAB8wHsAbw1/wH0AfcB7wH/ - Ae8BBwIAAfMB7AG8AfEB7QHvBAcBkgHvAQcB8AH3AewB7wEHAe8BBwHxAfMB6wHtAfQB7QHsAQcB9wEH - Gv8B9AH3Ae8B/wHvAQcB/wEUAewU/wHyAZIBFQFDARMC6wHqARQBDgEPAewBGxn/ARQB7AH0Af8BFAHs - Ov8BFAHsAfQCAAHzAewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbwB9AG8AgcBvALwAe8CBwG8Ae8B9wIH - AbwB8AHzAfQB7wEHAf8BBwHvAQcBvAHyGv8B9AH3Ae8B/wHvAQcB/wEUAewU/wH0AbwB7AETAREDEAER - ARUB7AG8Gv8BFAHsAfQB/wEUAewB8TfsAfcB/wEUAewB9AIAAfMB7AG8Nf8B9AH3Ae8B/wHvAQcCAAHz - AewBvAL/AfIB8AHxAfIB8wPwAfED8AHxAfIB8wH0Af8B8gHzAf8B8QHwAfEB9Bv/AfQB9wHvAf8B7wEH - Af8BFAHsFv8B8QHvAesCFAETAW0B7QHxG/8BFAHsAfQB/wEUAewBvDIUAhUDFAHrAf8BFAHsAfQCAAHz - AewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwH/ARQB7Dr/ARQB7AH0Af8BFAHs - M/8B9AHzBf8BFAHsAfQCAAHzAewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwH/ - ARQB7Dr/ARQB7AH0Af8BFAHsMv8C9Ab/ARQB7AH0AgAB8wHsAQc28gGSAe8B/wHvAQcCAAHzAewBBzby - AZIB7wH/Ae8BBwH/ARQB7Dr/ARQB7AH0Af8BFAHsAfEx7ALrBOwB9wH/ARQB7AH0AgAB8wLsNu0B7AHv - Af8B7wEHAgAB8wLsNu0B7AHvAf8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewBvCYUBBUNFAHrAf8BFAHs - AfQCAAHzK+wB6wETARQBEwHrAW0CFAHqAewBEgIUAW0B7wH/Ae8BBwIAAfMr7AHrARMBFAETAesBbQIU - AeoB7AESAhQBbQHvAf8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewn/wH0AhsB9g//ARQB7AH0AgAB8yvs - AW0BDgEAAQ4BbQEUAgABFQHrARABAAEOAeoB7wH/Ae8BBwIAAfMr7AFtAQ4BAAEOAW0BFAIAARUB6wEQ - AQABDgHqAe8B/wHvAQcB/wEUAew6/wEUAewB9AH/ARQB7Cj/AvYQ/wEUAewB9AIAAfMr7AFtAQ4BAAEO - AW0BFAIAARUB6wEQAQABDgHqAe8B/wHvAQcCAAHzK+wBbQEOAQABDgFtARQCAAEVAesBEAEAAQ4B6gHv - Af8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewB8TfsAfcB/wEUAewB9AIAAfMr7AHrARQBFQEUAesBbQIV - AeoB7AETARUBFAFtAe8B/wHvAQcCAAHzK+wB6wEUARUBFAHrAW0CFQHqAewBEwEVARQBbQHvAf8B7wEH - Af8BFAHsOv8BFAHsAfQB/wEUAewBvDcUAesB/wEUAewB9AIAAfMFkgHtAuwx7QEHAf8B7wEHAgAB8wWS - Ae0C7DHtAQcB/wHvAQcB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0AgAB/wX0AfEB7AHvMfIB8wH/ - Ae8BBwIAAf8F9AHxAewB7zHyAfMB/wHvAQcB/wEUAeww/wG8CRQBDgHsAfQB/wEUAeww/wG8CRQBDgHs - AfQIAAHzAe0BBzP/Ae8BBwgAAfMB7QEHM/8B7wEHAf8BFAHsMP8BBwEAAW0H7AEQAewB9AH/ARQB7AHx - LuwCBwEAAW0H7AEQAewB9AgAAfMB7QEHM/8B7wEHCAAB8wHtAQcz/wHvAQcB/wEUAeww/wEHAQABBwX/ - AfMBBwFtAfcB9AH/ARQB7AG8LhQB9wEHAQABBwX/AfMBBwFtAfcB9AgAAfMB7QEHM/8B7wEHCAAB8wHt - AQcz/wHvAQcB/wEUAeww/wEHAQABBwX/AQcBAAEHAf8B9AH/ARQB7DD/AQcBAAEHBf8BBwEAAQcB/wH0 - CAAB8wHtAe8zvAGSAQcIAAHzAe0B7zO8AZIBBwH/ARQB7DD/AQcBAAEHBP8B9wFtAQcB8wH/AfQB/wEU - Aeww/wEHAQABBwT/AfcBbQEHAfMB/wH0CAAB8wHtNewBBwgAAfMB7TXsAQcB/wEUAeww/wEHAQABBwP/ - AfcB7AH3A/8B9AH/ARQB7AHxLuwCBwEAAQcD/wH3AewB9wP/AfQIAAHzAe0n7AHrAUMBEAFDAW0B6gIQ - ARMB7AEVAhABbQEHCAAB8wHtJ+wB6wFDARABQwFtAeoCEAETAewBFQIQAW0BBwH/ARQB7DD/AQcBAAEH - Af8B8wEHAW0B9wT/AfQB/wEUAewBvC4UAfcBBwEAAQcB/wHzAQcBbQH3BP8B9AgAAfMB7SfsAW0BDwEA - AQ4BbQETAgABQwHsARACAAHqAQcIAAHzAe0n7AFtAQ8BAAEOAW0BEwIAAUMB7AEQAgAB6gEHAf8BFAHs - MP8BBwEAAQcB/wEHAQABBwX/AfQB/wEUAeww/wEHAQABBwH/AQcBAAEHBf8B9AgAAfMB7SfsAW0BDwEA - AQ4BbQETAgABQwHsARABAAEOAeoBBwgAAfMB7SfsAW0BDwEAAQ4BbQETAgABQwHsARABAAEOAeoBBwH/ - ARQB7DD/AQcBAAEHAfcBbQEHAfMF/wH0Af8BFAHsMP8BBwEAAQcB9wFtAQcB8wX/AfQIAAHzAe0o7AFt - AuoB6wFtAuoBbQHsAW0C6gHrAQcIAAHzAe0o7AFtAuoB6wFtAuoBbQHsAW0C6gHrAQcB/wIUMOwBbQEA - AW0B7AH3B/8B9AH/AhQw7AFtAQABbQHsAfcH/wH0CAAB9DYHAfEIAAH0NgcB8QH/Aes0FAH3CP8B9AH/ - Aes0FAH3CP8B9IAAP/8B9D//AfQBQgFNAT4HAAE+AwABKAQAAQECAAGAAwABAQEAAQEGAAEQFgAD/wkA - CP8YAAj/GAAI/xgACP8YAAj/GAAI/xgACP8YAAj/GAAI//8A/wD/AP8A/wD9AAj/GAAI/xgACP8YAAj/ - GAAI/xgACP8YAAj/GAAI/xAAEP8QABD/EAAQ/xAAEP8QABD/EAAQ/xAAEP8QAAHABgABBwHABgABBxAA - AcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYA - AQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHA - BgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEH - EAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHA - BgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEH - AcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYA - AQcQAAHABgABBwHABgABBxAAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHA - BwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHA - FwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAf8HAAH/FwAB/wcAAf8XAAH/ - BwAB/xcAAf8HAAH/FwAB/wcAAf8XAAH/BwAB/xcAAf8HAAH/FwAB/wcAAf8XAAH/BwAB/xcAAf8HAAH/ - FwAQ/xAACw== -</value> - </data> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Gameplay/HackUI.Designer.cs b/source/WindowsFormsApplication1/Gameplay/HackUI.Designer.cs new file mode 100644 index 0000000..6db5640 --- /dev/null +++ b/source/WindowsFormsApplication1/Gameplay/HackUI.Designer.cs @@ -0,0 +1,785 @@ +namespace ShiftOS +{ + partial class HackUI + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HackUI)); + this.tbui = new System.Windows.Forms.TableLayoutPanel(); + this.pnlenemy = new System.Windows.Forms.Panel(); + this.lbenemycompromised = new System.Windows.Forms.Label(); + this.lbenemystats = new System.Windows.Forms.Label(); + this.txtyourconsole = new System.Windows.Forms.TextBox(); + this.pnlyou = new System.Windows.Forms.Panel(); + this.lbcompromised = new System.Windows.Forms.Label(); + this.lbstats = new System.Windows.Forms.Label(); + this.txtenemyconsole = new System.Windows.Forms.TextBox(); + this.btnnext = new System.Windows.Forms.Button(); + this.pnlbuy = new System.Windows.Forms.Panel(); + this.txthostname = new System.Windows.Forms.TextBox(); + this.lbhostname = new System.Windows.Forms.Label(); + this.txtgrade = new System.Windows.Forms.TextBox(); + this.lbgrade = new System.Windows.Forms.Label(); + this.lbmoduleinfo = new System.Windows.Forms.Label(); + this.cmbbuyable = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.btndonebuying = new System.Windows.Forms.Button(); + this.pnldefensemanager = new System.Windows.Forms.Panel(); + this.btnbuy = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.cmbmodules = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.pnlpcinfo = new System.Windows.Forms.Panel(); + this.lbtargets = new System.Windows.Forms.Label(); + this.btnpoweroff = new System.Windows.Forms.Button(); + this.btnupgrade = new System.Windows.Forms.Button(); + this.lbpcinfo = new System.Windows.Forms.Label(); + this.lbmoduletitle = new System.Windows.Forms.Label(); + this.btncloseinfo = new System.Windows.Forms.Button(); + this.flcontrols = new System.Windows.Forms.FlowLayoutPanel(); + this.btnaddmodule = new System.Windows.Forms.Button(); + this.lbcodepoints = new System.Windows.Forms.Label(); + this.btntogglemusic = new System.Windows.Forms.Button(); + this.lbsong = new System.Windows.Forms.Label(); + this.panel2 = new System.Windows.Forms.Panel(); + this.pgpong = new System.Windows.Forms.Panel(); + this.lblcountdown = new System.Windows.Forms.Label(); + this.ball = new System.Windows.Forms.Panel(); + this.paddleHuman = new System.Windows.Forms.PictureBox(); + this.paddleComputer = new System.Windows.Forms.Panel(); + this.lbllevelandtime = new System.Windows.Forms.Label(); + this.lblstatsY = new System.Windows.Forms.Label(); + this.lblstatsX = new System.Windows.Forms.Label(); + this.pnltutorial = new System.Windows.Forms.Panel(); + this.lbtutorial = new System.Windows.Forms.Label(); + this.tmrplayerhealthdetect = new System.Windows.Forms.Timer(this.components); + this.tmrenemyhealthdetect = new System.Windows.Forms.Timer(this.components); + this.tmrredraw = new System.Windows.Forms.Timer(this.components); + this.tmrvisualizer = new System.Windows.Forms.Timer(this.components); + this.pongGameTimer = new System.Windows.Forms.Timer(this.components); + this.counter = new System.Windows.Forms.Timer(this.components); + this.tmrcountdown = new System.Windows.Forms.Timer(this.components); + this.tbui.SuspendLayout(); + this.pnlenemy.SuspendLayout(); + this.pnlyou.SuspendLayout(); + this.pnlbuy.SuspendLayout(); + this.pnldefensemanager.SuspendLayout(); + this.pnlpcinfo.SuspendLayout(); + this.flcontrols.SuspendLayout(); + this.panel2.SuspendLayout(); + this.pgpong.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).BeginInit(); + this.pnltutorial.SuspendLayout(); + this.SuspendLayout(); + // + // tbui + // + this.tbui.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; + this.tbui.ColumnCount = 2; + this.tbui.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tbui.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tbui.Controls.Add(this.pnlenemy, 1, 1); + this.tbui.Controls.Add(this.txtyourconsole, 0, 1); + this.tbui.Controls.Add(this.pnlyou, 0, 0); + this.tbui.Controls.Add(this.txtenemyconsole, 1, 0); + this.tbui.Dock = System.Windows.Forms.DockStyle.Fill; + this.tbui.Location = new System.Drawing.Point(0, 0); + this.tbui.Name = "tbui"; + this.tbui.RowCount = 2; + this.tbui.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tbui.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tbui.Size = new System.Drawing.Size(1339, 710); + this.tbui.TabIndex = 0; + // + // pnlenemy + // + this.pnlenemy.BackColor = System.Drawing.Color.Black; + this.pnlenemy.Controls.Add(this.lbenemycompromised); + this.pnlenemy.Controls.Add(this.lbenemystats); + this.pnlenemy.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlenemy.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.pnlenemy.ForeColor = System.Drawing.Color.White; + this.pnlenemy.Location = new System.Drawing.Point(673, 358); + this.pnlenemy.Name = "pnlenemy"; + this.pnlenemy.Size = new System.Drawing.Size(662, 348); + this.pnlenemy.TabIndex = 4; + // + // lbenemycompromised + // + this.lbenemycompromised.AutoSize = true; + this.lbenemycompromised.Location = new System.Drawing.Point(161, 90); + this.lbenemycompromised.Name = "lbenemycompromised"; + this.lbenemycompromised.Size = new System.Drawing.Size(47, 11); + this.lbenemycompromised.TabIndex = 1; + this.lbenemycompromised.Text = "label1"; + this.lbenemycompromised.Visible = false; + // + // lbenemystats + // + this.lbenemystats.AutoSize = true; + this.lbenemystats.Location = new System.Drawing.Point(13, 13); + this.lbenemystats.Name = "lbenemystats"; + this.lbenemystats.Size = new System.Drawing.Size(131, 11); + this.lbenemystats.TabIndex = 0; + this.lbenemystats.Text = "Enemy Health: 100%"; + // + // txtyourconsole + // + this.txtyourconsole.BackColor = System.Drawing.Color.Black; + this.txtyourconsole.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtyourconsole.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtyourconsole.ForeColor = System.Drawing.Color.LightGreen; + this.txtyourconsole.Location = new System.Drawing.Point(4, 358); + this.txtyourconsole.Multiline = true; + this.txtyourconsole.Name = "txtyourconsole"; + this.txtyourconsole.Size = new System.Drawing.Size(662, 348); + this.txtyourconsole.TabIndex = 3; + // + // pnlyou + // + this.pnlyou.BackColor = System.Drawing.Color.Black; + this.pnlyou.Controls.Add(this.lbcompromised); + this.pnlyou.Controls.Add(this.lbstats); + this.pnlyou.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlyou.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.pnlyou.ForeColor = System.Drawing.Color.White; + this.pnlyou.Location = new System.Drawing.Point(4, 4); + this.pnlyou.Name = "pnlyou"; + this.pnlyou.Size = new System.Drawing.Size(662, 347); + this.pnlyou.TabIndex = 1; + this.pnlyou.MouseDown += new System.Windows.Forms.MouseEventHandler(this.playfield_MouseDown); + // + // lbcompromised + // + this.lbcompromised.AutoSize = true; + this.lbcompromised.Location = new System.Drawing.Point(66, 88); + this.lbcompromised.Name = "lbcompromised"; + this.lbcompromised.Size = new System.Drawing.Size(103, 11); + this.lbcompromised.TabIndex = 3; + this.lbcompromised.Text = "SYSTEM DAMAGED"; + this.lbcompromised.Visible = false; + // + // lbstats + // + this.lbstats.AutoSize = true; + this.lbstats.Location = new System.Drawing.Point(13, 13); + this.lbstats.Name = "lbstats"; + this.lbstats.Size = new System.Drawing.Size(138, 11); + this.lbstats.TabIndex = 0; + this.lbstats.Text = "System Health: 100%"; + // + // txtenemyconsole + // + this.txtenemyconsole.BackColor = System.Drawing.Color.Black; + this.txtenemyconsole.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtenemyconsole.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtenemyconsole.ForeColor = System.Drawing.Color.LightGreen; + this.txtenemyconsole.Location = new System.Drawing.Point(673, 4); + this.txtenemyconsole.Multiline = true; + this.txtenemyconsole.Name = "txtenemyconsole"; + this.txtenemyconsole.Size = new System.Drawing.Size(662, 347); + this.txtenemyconsole.TabIndex = 2; + // + // btnnext + // + this.btnnext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnnext.AutoSize = true; + this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnnext.Location = new System.Drawing.Point(294, 161); + this.btnnext.Name = "btnnext"; + this.btnnext.Size = new System.Drawing.Size(66, 23); + this.btnnext.TabIndex = 9; + this.btnnext.Text = "Next >>"; + this.btnnext.UseVisualStyleBackColor = true; + this.btnnext.Visible = false; + this.btnnext.Click += new System.EventHandler(this.btnnext_Click); + // + // pnlbuy + // + this.pnlbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnlbuy.Controls.Add(this.txthostname); + this.pnlbuy.Controls.Add(this.lbhostname); + this.pnlbuy.Controls.Add(this.txtgrade); + this.pnlbuy.Controls.Add(this.lbgrade); + this.pnlbuy.Controls.Add(this.lbmoduleinfo); + this.pnlbuy.Controls.Add(this.cmbbuyable); + this.pnlbuy.Controls.Add(this.label4); + this.pnlbuy.Controls.Add(this.btndonebuying); + this.pnlbuy.Location = new System.Drawing.Point(7, 405); + this.pnlbuy.Name = "pnlbuy"; + this.pnlbuy.Size = new System.Drawing.Size(382, 299); + this.pnlbuy.TabIndex = 6; + this.pnlbuy.Visible = false; + // + // txthostname + // + this.txthostname.BackColor = System.Drawing.Color.Black; + this.txthostname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txthostname.ForeColor = System.Drawing.Color.White; + this.txthostname.Location = new System.Drawing.Point(186, 236); + this.txthostname.Name = "txthostname"; + this.txthostname.Size = new System.Drawing.Size(186, 18); + this.txthostname.TabIndex = 10; + // + // lbhostname + // + this.lbhostname.AutoSize = true; + this.lbhostname.Location = new System.Drawing.Point(112, 240); + this.lbhostname.Name = "lbhostname"; + this.lbhostname.Size = new System.Drawing.Size(68, 11); + this.lbhostname.TabIndex = 9; + this.lbhostname.Text = "Hostname:"; + // + // txtgrade + // + this.txtgrade.BackColor = System.Drawing.Color.Black; + this.txtgrade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgrade.ForeColor = System.Drawing.Color.White; + this.txtgrade.Location = new System.Drawing.Point(65, 236); + this.txtgrade.Name = "txtgrade"; + this.txtgrade.Size = new System.Drawing.Size(40, 18); + this.txtgrade.TabIndex = 8; + this.txtgrade.TextChanged += new System.EventHandler(this.txtgrade_TextChanged); + // + // lbgrade + // + this.lbgrade.AutoSize = true; + this.lbgrade.Location = new System.Drawing.Point(12, 240); + this.lbgrade.Name = "lbgrade"; + this.lbgrade.Size = new System.Drawing.Size(47, 11); + this.lbgrade.TabIndex = 7; + this.lbgrade.Text = "Grade:"; + // + // lbmoduleinfo + // + this.lbmoduleinfo.Location = new System.Drawing.Point(10, 63); + this.lbmoduleinfo.Name = "lbmoduleinfo"; + this.lbmoduleinfo.Size = new System.Drawing.Size(367, 156); + this.lbmoduleinfo.TabIndex = 6; + this.lbmoduleinfo.Text = resources.GetString("lbmoduleinfo.Text"); + // + // cmbbuyable + // + this.cmbbuyable.BackColor = System.Drawing.Color.Black; + this.cmbbuyable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbbuyable.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cmbbuyable.ForeColor = System.Drawing.Color.White; + this.cmbbuyable.FormattingEnabled = true; + this.cmbbuyable.Location = new System.Drawing.Point(12, 38); + this.cmbbuyable.Name = "cmbbuyable"; + this.cmbbuyable.Size = new System.Drawing.Size(360, 19); + this.cmbbuyable.TabIndex = 3; + this.cmbbuyable.SelectedIndexChanged += new System.EventHandler(this.cmbbuyable_SelectedIndexChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(10, 12); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(75, 11); + this.label4.TabIndex = 2; + this.label4.Text = "Buy Module"; + // + // btndonebuying + // + this.btndonebuying.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndonebuying.AutoSize = true; + this.btndonebuying.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndonebuying.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndonebuying.Location = new System.Drawing.Point(341, 273); + this.btndonebuying.Name = "btndonebuying"; + this.btndonebuying.Size = new System.Drawing.Size(38, 23); + this.btndonebuying.TabIndex = 1; + this.btndonebuying.Text = "Buy"; + this.btndonebuying.UseVisualStyleBackColor = true; + this.btndonebuying.Click += new System.EventHandler(this.btndonebuying_Click); + // + // pnldefensemanager + // + this.pnldefensemanager.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnldefensemanager.Controls.Add(this.btnbuy); + this.pnldefensemanager.Controls.Add(this.label3); + this.pnldefensemanager.Controls.Add(this.cmbmodules); + this.pnldefensemanager.Controls.Add(this.label1); + this.pnldefensemanager.Controls.Add(this.button1); + this.pnldefensemanager.Location = new System.Drawing.Point(395, 424); + this.pnldefensemanager.Name = "pnldefensemanager"; + this.pnldefensemanager.Size = new System.Drawing.Size(382, 280); + this.pnldefensemanager.TabIndex = 5; + this.pnldefensemanager.Visible = false; + // + // btnbuy + // + this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnbuy.AutoSize = true; + this.btnbuy.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnbuy.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbuy.Location = new System.Drawing.Point(199, 254); + this.btnbuy.Name = "btnbuy"; + this.btnbuy.Size = new System.Drawing.Size(122, 23); + this.btnbuy.TabIndex = 7; + this.btnbuy.Text = "Buy new module."; + this.btnbuy.UseVisualStyleBackColor = true; + this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click); + // + // label3 + // + this.label3.Location = new System.Drawing.Point(12, 95); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(367, 156); + this.label3.TabIndex = 6; + this.label3.Text = resources.GetString("label3.Text"); + // + // cmbmodules + // + this.cmbmodules.BackColor = System.Drawing.Color.Black; + this.cmbmodules.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbmodules.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cmbmodules.ForeColor = System.Drawing.Color.White; + this.cmbmodules.FormattingEnabled = true; + this.cmbmodules.Location = new System.Drawing.Point(12, 38); + this.cmbmodules.Name = "cmbmodules"; + this.cmbmodules.Size = new System.Drawing.Size(360, 19); + this.cmbmodules.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(10, 12); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(75, 11); + this.label1.TabIndex = 2; + this.label1.Text = "Add Module"; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.AutoSize = true; + this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(327, 254); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(52, 23); + this.button1.TabIndex = 1; + this.button1.Text = "Done."; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click_1); + // + // pnlpcinfo + // + this.pnlpcinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlpcinfo.Controls.Add(this.lbtargets); + this.pnlpcinfo.Controls.Add(this.btnpoweroff); + this.pnlpcinfo.Controls.Add(this.btnupgrade); + this.pnlpcinfo.Controls.Add(this.lbpcinfo); + this.pnlpcinfo.Controls.Add(this.lbmoduletitle); + this.pnlpcinfo.Controls.Add(this.btncloseinfo); + this.pnlpcinfo.Location = new System.Drawing.Point(783, 424); + this.pnlpcinfo.Name = "pnlpcinfo"; + this.pnlpcinfo.Size = new System.Drawing.Size(382, 280); + this.pnlpcinfo.TabIndex = 7; + this.pnlpcinfo.Visible = false; + // + // lbtargets + // + this.lbtargets.Location = new System.Drawing.Point(12, 165); + this.lbtargets.Name = "lbtargets"; + this.lbtargets.Size = new System.Drawing.Size(367, 86); + this.lbtargets.TabIndex = 9; + this.lbtargets.Text = "Targets"; + // + // btnpoweroff + // + this.btnpoweroff.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnpoweroff.AutoSize = true; + this.btnpoweroff.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnpoweroff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpoweroff.Location = new System.Drawing.Point(85, 254); + this.btnpoweroff.Name = "btnpoweroff"; + this.btnpoweroff.Size = new System.Drawing.Size(80, 23); + this.btnpoweroff.TabIndex = 8; + this.btnpoweroff.Text = "Power Off"; + this.btnpoweroff.UseVisualStyleBackColor = true; + this.btnpoweroff.Click += new System.EventHandler(this.btnpoweroff_Click); + // + // btnupgrade + // + this.btnupgrade.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnupgrade.AutoSize = true; + this.btnupgrade.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnupgrade.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnupgrade.Location = new System.Drawing.Point(171, 254); + this.btnupgrade.Name = "btnupgrade"; + this.btnupgrade.Size = new System.Drawing.Size(150, 23); + this.btnupgrade.TabIndex = 7; + this.btnupgrade.Text = "Upgrade This Module"; + this.btnupgrade.UseVisualStyleBackColor = true; + this.btnupgrade.Click += new System.EventHandler(this.btnupgrade_Click); + // + // lbpcinfo + // + this.lbpcinfo.Location = new System.Drawing.Point(12, 41); + this.lbpcinfo.Name = "lbpcinfo"; + this.lbpcinfo.Size = new System.Drawing.Size(367, 86); + this.lbpcinfo.TabIndex = 6; + this.lbpcinfo.Text = resources.GetString("lbpcinfo.Text"); + // + // lbmoduletitle + // + this.lbmoduletitle.AutoSize = true; + this.lbmoduletitle.Location = new System.Drawing.Point(10, 12); + this.lbmoduletitle.Name = "lbmoduletitle"; + this.lbmoduletitle.Size = new System.Drawing.Size(75, 11); + this.lbmoduletitle.TabIndex = 2; + this.lbmoduletitle.Text = "Add Module"; + // + // btncloseinfo + // + this.btncloseinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btncloseinfo.AutoSize = true; + this.btncloseinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btncloseinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncloseinfo.Location = new System.Drawing.Point(327, 254); + this.btncloseinfo.Name = "btncloseinfo"; + this.btncloseinfo.Size = new System.Drawing.Size(52, 23); + this.btncloseinfo.TabIndex = 1; + this.btncloseinfo.Text = "Done."; + this.btncloseinfo.UseVisualStyleBackColor = true; + this.btncloseinfo.Click += new System.EventHandler(this.btncloseinfo_Click); + // + // flcontrols + // + this.flcontrols.Controls.Add(this.btnaddmodule); + this.flcontrols.Controls.Add(this.lbcodepoints); + this.flcontrols.Controls.Add(this.btntogglemusic); + this.flcontrols.Controls.Add(this.lbsong); + this.flcontrols.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flcontrols.Location = new System.Drawing.Point(0, 710); + this.flcontrols.Name = "flcontrols"; + this.flcontrols.Size = new System.Drawing.Size(1339, 31); + this.flcontrols.TabIndex = 4; + // + // btnaddmodule + // + this.btnaddmodule.AutoSize = true; + this.btnaddmodule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnaddmodule.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnaddmodule.Location = new System.Drawing.Point(3, 3); + this.btnaddmodule.Name = "btnaddmodule"; + this.btnaddmodule.Size = new System.Drawing.Size(87, 23); + this.btnaddmodule.TabIndex = 0; + this.btnaddmodule.Text = "Add Module"; + this.btnaddmodule.UseVisualStyleBackColor = true; + this.btnaddmodule.Click += new System.EventHandler(this.btnaddmodule_Click); + // + // lbcodepoints + // + this.lbcodepoints.Location = new System.Drawing.Point(96, 0); + this.lbcodepoints.Name = "lbcodepoints"; + this.lbcodepoints.Size = new System.Drawing.Size(127, 26); + this.lbcodepoints.TabIndex = 1; + this.lbcodepoints.Text = "Codepoints:"; + this.lbcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // btntogglemusic + // + this.btntogglemusic.AutoSize = true; + this.btntogglemusic.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btntogglemusic.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntogglemusic.Location = new System.Drawing.Point(229, 3); + this.btntogglemusic.Name = "btntogglemusic"; + this.btntogglemusic.Size = new System.Drawing.Size(101, 23); + this.btntogglemusic.TabIndex = 2; + this.btntogglemusic.Text = "Toggle Music"; + this.btntogglemusic.UseVisualStyleBackColor = true; + this.btntogglemusic.Click += new System.EventHandler(this.button2_Click); + // + // lbsong + // + this.lbsong.Location = new System.Drawing.Point(336, 0); + this.lbsong.Name = "lbsong"; + this.lbsong.Size = new System.Drawing.Size(414, 26); + this.lbsong.TabIndex = 3; + this.lbsong.Text = "Codepoints:"; + this.lbsong.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // panel2 + // + this.panel2.Controls.Add(this.pgpong); + this.panel2.Controls.Add(this.pnltutorial); + this.panel2.Controls.Add(this.pnlbuy); + this.panel2.Controls.Add(this.pnlpcinfo); + this.panel2.Controls.Add(this.pnldefensemanager); + this.panel2.Controls.Add(this.tbui); + this.panel2.Controls.Add(this.flcontrols); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(1339, 741); + this.panel2.TabIndex = 1; + // + // pgpong + // + this.pgpong.BackColor = System.Drawing.Color.Black; + this.pgpong.Controls.Add(this.lblcountdown); + this.pgpong.Controls.Add(this.ball); + this.pgpong.Controls.Add(this.paddleHuman); + this.pgpong.Controls.Add(this.paddleComputer); + this.pgpong.Controls.Add(this.lbllevelandtime); + this.pgpong.Controls.Add(this.lblstatsY); + this.pgpong.Controls.Add(this.lblstatsX); + this.pgpong.ForeColor = System.Drawing.Color.White; + this.pgpong.Location = new System.Drawing.Point(0, 0); + this.pgpong.Name = "pgpong"; + this.pgpong.Size = new System.Drawing.Size(700, 400); + this.pgpong.TabIndex = 22; + this.pgpong.Visible = false; + this.pgpong.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); + // + // lblcountdown + // + this.lblcountdown.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblcountdown.Location = new System.Drawing.Point(187, 152); + this.lblcountdown.Name = "lblcountdown"; + this.lblcountdown.Size = new System.Drawing.Size(315, 49); + this.lblcountdown.TabIndex = 7; + this.lblcountdown.Text = "3"; + this.lblcountdown.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblcountdown.Visible = false; + // + // ball + // + this.ball.BackColor = System.Drawing.Color.Gray; + this.ball.Location = new System.Drawing.Point(300, 152); + this.ball.Name = "ball"; + this.ball.Size = new System.Drawing.Size(20, 20); + this.ball.TabIndex = 2; + // + // paddleHuman + // + this.paddleHuman.BackColor = System.Drawing.Color.Gray; + this.paddleHuman.Location = new System.Drawing.Point(10, 134); + this.paddleHuman.Name = "paddleHuman"; + this.paddleHuman.Size = new System.Drawing.Size(20, 100); + this.paddleHuman.TabIndex = 3; + this.paddleHuman.TabStop = false; + // + // paddleComputer + // + this.paddleComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.paddleComputer.BackColor = System.Drawing.Color.Gray; + this.paddleComputer.Location = new System.Drawing.Point(666, 134); + this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 100); + this.paddleComputer.Name = "paddleComputer"; + this.paddleComputer.Size = new System.Drawing.Size(20, 100); + this.paddleComputer.TabIndex = 1; + // + // lbllevelandtime + // + this.lbllevelandtime.Dock = System.Windows.Forms.DockStyle.Top; + this.lbllevelandtime.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbllevelandtime.Location = new System.Drawing.Point(0, 0); + this.lbllevelandtime.Name = "lbllevelandtime"; + this.lbllevelandtime.Size = new System.Drawing.Size(700, 22); + this.lbllevelandtime.TabIndex = 4; + this.lbllevelandtime.Text = "Level: 1"; + this.lbllevelandtime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblstatsY + // + this.lblstatsY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.lblstatsY.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblstatsY.Location = new System.Drawing.Point(542, 356); + this.lblstatsY.Name = "lblstatsY"; + this.lblstatsY.Size = new System.Drawing.Size(144, 35); + this.lblstatsY.TabIndex = 11; + this.lblstatsY.Text = "Yspeed:"; + this.lblstatsY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblstatsX + // + this.lblstatsX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lblstatsX.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblstatsX.Location = new System.Drawing.Point(3, 356); + this.lblstatsX.Name = "lblstatsX"; + this.lblstatsX.Size = new System.Drawing.Size(144, 35); + this.lblstatsX.TabIndex = 5; + this.lblstatsX.Text = "Xspeed: "; + this.lblstatsX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnltutorial + // + this.pnltutorial.Controls.Add(this.btnnext); + this.pnltutorial.Controls.Add(this.lbtutorial); + this.pnltutorial.Location = new System.Drawing.Point(174, 161); + this.pnltutorial.Name = "pnltutorial"; + this.pnltutorial.Size = new System.Drawing.Size(363, 187); + this.pnltutorial.TabIndex = 10; + this.pnltutorial.Visible = false; + // + // lbtutorial + // + this.lbtutorial.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.lbtutorial.Location = new System.Drawing.Point(-2, 50); + this.lbtutorial.Name = "lbtutorial"; + this.lbtutorial.Size = new System.Drawing.Size(367, 86); + this.lbtutorial.TabIndex = 9; + this.lbtutorial.Text = resources.GetString("lbtutorial.Text"); + this.lbtutorial.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbtutorial.Visible = false; + // + // tmrplayerhealthdetect + // + this.tmrplayerhealthdetect.Tick += new System.EventHandler(this.tmrplayerhealthdetect_Tick); + // + // tmrenemyhealthdetect + // + this.tmrenemyhealthdetect.Tick += new System.EventHandler(this.tmrenemyhealthdetect_Tick); + // + // tmrredraw + // + this.tmrredraw.Tick += new System.EventHandler(this.tmrredraw_Tick); + // + // tmrvisualizer + // + this.tmrvisualizer.Tick += new System.EventHandler(this.tmrvisualizer_Tick); + // + // pongGameTimer + // + this.pongGameTimer.Interval = 30; + this.pongGameTimer.Tick += new System.EventHandler(this.pongGameTimer_Tick); + // + // counter + // + this.counter.Interval = 1000; + this.counter.Tick += new System.EventHandler(this.counter_Tick); + // + // tmrcountdown + // + this.tmrcountdown.Interval = 1000; + this.tmrcountdown.Tick += new System.EventHandler(this.tmrcountdown_Tick); + // + // HackUI + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(1339, 741); + this.Controls.Add(this.panel2); + this.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.ForeColor = System.Drawing.Color.LightGreen; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "HackUI"; + this.Text = "HackUI"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.this_Closing); + this.Load += new System.EventHandler(this.HackUI_Load); + this.tbui.ResumeLayout(false); + this.tbui.PerformLayout(); + this.pnlenemy.ResumeLayout(false); + this.pnlenemy.PerformLayout(); + this.pnlyou.ResumeLayout(false); + this.pnlyou.PerformLayout(); + this.pnlbuy.ResumeLayout(false); + this.pnlbuy.PerformLayout(); + this.pnldefensemanager.ResumeLayout(false); + this.pnldefensemanager.PerformLayout(); + this.pnlpcinfo.ResumeLayout(false); + this.pnlpcinfo.PerformLayout(); + this.flcontrols.ResumeLayout(false); + this.flcontrols.PerformLayout(); + this.panel2.ResumeLayout(false); + this.pgpong.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).EndInit(); + this.pnltutorial.ResumeLayout(false); + this.pnltutorial.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tbui; + private System.Windows.Forms.Panel pnlyou; + private System.Windows.Forms.Panel pnlbuy; + private System.Windows.Forms.TextBox txthostname; + private System.Windows.Forms.Label lbhostname; + private System.Windows.Forms.TextBox txtgrade; + private System.Windows.Forms.Label lbgrade; + private System.Windows.Forms.Label lbmoduleinfo; + private System.Windows.Forms.ComboBox cmbbuyable; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button btndonebuying; + private System.Windows.Forms.Panel pnldefensemanager; + private System.Windows.Forms.Button btnbuy; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox cmbmodules; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button btnnext; + private System.Windows.Forms.Panel pnlpcinfo; + private System.Windows.Forms.Label lbtargets; + private System.Windows.Forms.Button btnpoweroff; + private System.Windows.Forms.Button btnupgrade; + private System.Windows.Forms.Label lbpcinfo; + private System.Windows.Forms.Label lbmoduletitle; + private System.Windows.Forms.Button btncloseinfo; + private System.Windows.Forms.FlowLayoutPanel flcontrols; + private System.Windows.Forms.Button btnaddmodule; + private System.Windows.Forms.Label lbcompromised; + private System.Windows.Forms.Label lbstats; + private System.Windows.Forms.TextBox txtyourconsole; + private System.Windows.Forms.TextBox txtenemyconsole; + private System.Windows.Forms.Panel pnlenemy; + private System.Windows.Forms.Label lbenemycompromised; + private System.Windows.Forms.Label lbenemystats; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Timer tmrplayerhealthdetect; + private System.Windows.Forms.Timer tmrenemyhealthdetect; + private System.Windows.Forms.Timer tmrredraw; + private System.Windows.Forms.Label lbcodepoints; + private System.Windows.Forms.Button btntogglemusic; + private System.Windows.Forms.Label lbsong; + private System.Windows.Forms.Panel pnltutorial; + private System.Windows.Forms.Label lbtutorial; + private System.Windows.Forms.Timer tmrvisualizer; + internal System.Windows.Forms.Panel pgpong; + internal System.Windows.Forms.Label lblcountdown; + internal System.Windows.Forms.Panel ball; + internal System.Windows.Forms.PictureBox paddleHuman; + internal System.Windows.Forms.Panel paddleComputer; + internal System.Windows.Forms.Label lbllevelandtime; + internal System.Windows.Forms.Label lblstatsY; + internal System.Windows.Forms.Label lblstatsX; + internal System.Windows.Forms.Timer pongGameTimer; + internal System.Windows.Forms.Timer counter; + internal System.Windows.Forms.Timer tmrcountdown; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Gameplay/HackUI.cs b/source/WindowsFormsApplication1/Gameplay/HackUI.cs new file mode 100644 index 0000000..ee36b8f --- /dev/null +++ b/source/WindowsFormsApplication1/Gameplay/HackUI.cs @@ -0,0 +1,1921 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class HackUI : Form + { + public HackUI() + { + InitializeComponent(); + this.TopMost = false; + ThisEnemyHacker = new EnemyHacker("Test Dummy", "A test hacker", "A test hacker", 1, 1, "easy"); + } + + public event EventHandler OnWin; + + public HackUI(EnemyHacker enemy) + { + ThisEnemyHacker = enemy; + InitializeComponent(); + } + + public Computer ThisPlayerPC = null; + private decimal TotalPlayerHP = 0; + private EnemyHacker EnemyNet = null; + + private List<Module> MyNetwork = new List<Module>(); + + #region PLAYER + + private void LoadPlayerScreen() + { + AntiVirusBounds = new List<Rectangle>(); + var tc = new Module(SystemType.Core, 1, "localhost"); + tc.HP = 100; + TutorialNetwork.Add(tc); + foreach (var m in GetMyNet()) + { + if (m.Type == SystemType.Core) + { + MyNetwork.Add(m); + } + } + VisualizePlayerNetwork(); + if (EnemyNet != null) + { + tmrplayerhealthdetect.Start(); + } + else + { + tmrplayerhealthdetect.Start(); + } + if (IsTutorial) + { + SetupTutorialUI(0); + } + } + + private void VisualizePlayerNetwork() + { + AllPlayerComputers = new List<Computer>(); + foreach (Module m in MyNetwork) + { + if (AllPlayerComputers.Count <= 10) + { + var c = m.Deploy(); + if (c.Type == SystemType.Core) + { + ThisPlayerPC = c; + } + AddModule(c); + } + } + if(ThisPlayerPC == null) + { + var m = new Module(SystemType.Core, 1, "localhost"); + GetMyNet().Add(m); + MyNetwork.Add(m); + var c = m.Deploy(); + ThisPlayerPC = c; + AddModule(c); + } + } + + public List<Computer> AllPlayerComputers = null; + + private void tmrplayerhealthdetect_Tick(object sender, EventArgs e) + { + if(ThisPlayerPC != null) + { + ThisPlayerPC.Left = (pnlyou.Width - ThisPlayerPC.Width) / 2; + ThisPlayerPC.Top = (pnlyou.Height - ThisPlayerPC.Height) / 2; + + } + var rnd = new Random(); + int chance = 0; + foreach (var pc in AllPlayerComputers) + { + if (pc.Disabled == false) + { + var elist = new List<Computer>(); + if (pc.Enslaved) + elist = AllPlayerComputers; + else + elist = pc.Enemies; + if (elist != null) + { + foreach (var enemy in elist) + { + if (enemy != null && enemy.HP > 0) + { + chance = rnd.Next(1, 15); + if (chance == 7) + { + if (IsTutorial) + { + if (TutorialProgress == 32 || TutorialProgress == 9) + { + enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); + } + } + else + { + enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); + } + } + } + } + } + } + } + decimal health = 0; + foreach (var pc in AllPlayerComputers) + { + health += (decimal)pc.HP; + } + if (health > TotalPlayerHP) + { + TotalPlayerHP = health; + } + try + { + decimal percent = (health / TotalPlayerHP) * 100; + lbstats.Text = $"System Health: {percent}%"; + } + catch + { + + } + if (ThisPlayerPC.HP <= 0) + { + API.CreateInfoboxSession("System compromised.", "The enemy hacker has overthrown your defenses and compromised your system. You will need to wait until your core heals before beginning another battle.", infobox.InfoboxMode.Info); + Hacking.Failure = true; + Hacking.FailDate = DateTime.Now; + UserRequestedClose = false; + this.Close(); + } + } + + public bool UserRequestedClose = true; + + private void this_Closing(object sender, FormClosingEventArgs e) + { + var t = new Thread(new ThreadStart(() => + { + int prev_volume = Audio._wmp.settings.volume; + while(Audio._wmp.settings.volume > 0) + { + Thread.Sleep(100); + Audio._wmp.settings.volume -= 1; + } + Audio.ForceStop(); + Audio._wmp.settings.volume = prev_volume; + })); + t.Start(); + if (UserRequestedClose == false) + { + this.TopMost = false; + Computer[] pcs = new Computer[AllPlayerComputers.Count]; + AllPlayerComputers.CopyTo(pcs); + foreach (var pc in pcs) + { + pc?.Dispose(); + } + Computer[] epcs = new Computer[AllEnemyComputers.Count]; + AllEnemyComputers.CopyTo(epcs); + foreach (var epc in epcs) + { + epc?.Dispose(); + } + tmrplayerhealthdetect.Stop(); + tmrenemyhealthdetect.Stop(); + Hacking.RepairTimer.Start(); //Now the player can repair. + } + else + { + e.Cancel = true; + } + } + + public Computer SelectedPlayerComputer = null; + + public Computer module_to_steal = null; + + public void AddModule(Computer newModule) + { + pnlyou.Controls.Add(newModule); + int hp = newModule.HP; + WriteLine($"[Network] Welcome to the network, {newModule.Hostname}!"); + TotalPlayerHP += newModule.HP; + AllPlayerComputers.Add(newModule); + newModule.Show(); + newModule.StolenModule += (o, a) => + { + var t = new Thread(new ThreadStart(() => + { + var rnd = new Random(); + var lst = new List<Computer>(); + if (newModule.Enslaved) + lst = AllPlayerComputers; + else + lst = AllEnemyComputers; + WriteLine($"[{newModule.Hostname}] Starting network hack..."); + Thread.Sleep(5000); + + var pc = lst[rnd.Next(0, lst.Count)]; + this.Invoke(new Action(() => + { + if (pc.Type != SystemType.Core) + { + module_to_steal = pc; + + pgpong.Left = (this.Width - pgpong.Width) / 2; + pgpong.Top = (this.Height - pgpong.Height) / 2; + + pgpong.Show(); + newgame(); + } + })); + })); + t.Start(); + }; + newModule.EnslavedModule += (o, e) => + { + if(!newModule.Enslaved) + { + var pc = AllEnemyComputers[rand.Next(0, AllEnemyComputers.Count)]; + if(!pc.Enslaved) + { + WriteLine($"[{newModule.Hostname}] Successfully enslaved {pc.Hostname}"); + pc.Enslaved = true; + } + + } + }; + newModule.OnDestruction += (object s, EventArgs a) => + { + if (this.SelectedPlayerComputer == newModule) + { + SelectedPlayerComputer = null; + } + if (newModule.Type == SystemType.Firewall) + { + Player_Firewall_Destroy(newModule); + } + AllPlayerComputers.Remove(newModule); + newModule.Dispose(); + WriteLine($"[Network] {newModule.Hostname} has gone OFFLINE."); + }; + newModule.Select += (object s, EventArgs e) => + { + SelectedPlayerComputer = newModule; + ShowPCInfo(newModule.Hostname); + if (IsTutorial) + { + if (TutorialProgress == 6) + { + if (newModule == ThisPlayerPC) + { + SetupTutorialUI(7); + } + } + } + }; + newModule.HP_Decreased += new EventHandler(Player_System_Damaged); + newModule.OnRepair += new EventHandler(Player_System_Repaired); + if (newModule.Type == SystemType.Antivirus || newModule.Type == SystemType.RepairModule) + { + var b = newModule.GetAreaOfEffect(); + AntiVirusBounds.Add(b); + pnlyou.Refresh(); + newModule.AntivirusRepair += (object s, EventArgs a) => + { + foreach (Computer pc in AllPlayerComputers) + { + if (pc != newModule && pc.Bounds.IntersectsWith(b)) + { + if (newModule.Type == SystemType.RepairModule) + { + if (pc.HP < newModule.HP) + { + if (pc.HP < pc.GetTotal()) + { + WriteLine($"[{newModule.Hostname}] Repairing neighbouring system \"{pc.Hostname}\""); + pc.Repair(1); + } + } + + } + else + { + if (pc.HP < 10) + { + WriteLine($"[{newModule.Hostname}] Repairing neighbouring system \"{pc.Hostname}\""); + pc.Repair(1); + } + } + } + } + }; + + } + if (newModule.Type == SystemType.Firewall) + { + var b = newModule.GetAreaOfEffect(); + AntiVirusBounds.Add(b); + pnlenemy.Refresh(); + Player_Firewall_Deflect(newModule); + } + if (newModule.Type == SystemType.ServerStack) + { + newModule.MassDDoS += (object s, EventArgs a) => + { + if (newModule.Enslaved) + WormToPlayer(); + else + WormToEnemy(); + }; + } + } + + public void WormToEnemy() + { + var rnd = new Random(); + int r = rnd.Next(0, 10); + WriteLine("[Network] Launching distributed denial-of-service attack on rival network."); + foreach (Computer c in AllEnemyComputers) + { + if (r == 5) + { + c.Disable(); + } + } + } + + public void ShowPCInfo(string hostname) + { + Computer c = null; + foreach (var pc in AllPlayerComputers) + { + if (pc.Hostname == hostname) + { + c = pc; + } + } + + Module mod = null; + foreach (var m in GetMyNet()) + { + if (m.Hostname == hostname) + { + mod = m; + } + } + if (mod != null) + { + pnlpcinfo.Left = 7; + pnlpcinfo.Show(); + lbmoduletitle.Text = "Module Info - " + hostname; + lbpcinfo.Text = $"Hostname: {hostname}{Environment.NewLine}Type: {mod.Type.ToString()}{Environment.NewLine}{Environment.NewLine}"; + if (mod.Type == SystemType.Core) + { + lbpcinfo.Text += Environment.NewLine + "This represents your main system. If this module is destroyed, you will automatically lose the battle. Protect it at all costs."; + btnupgrade.Hide(); + btnpoweroff.Hide(); + } + else + { + lbpcinfo.Text += $"{Environment.NewLine}Grade: {mod.Grade}"; + if (mod.Grade < 4) + { + btnupgrade.Show(); + } + else + { + btnupgrade.Hide(); + } + btnpoweroff.Show(); + } + + } + if (c != null) + { + if (c.Enslaved) + { + lbtargets.Text = "*** WARNING ***: This module has been ENSLAVED! Consider a redeploy."; + } + else + { + lbtargets.Text = "Targets: "; + if (c.Enemies != null) + { + if (c.Enemies.Count > 0) + { + foreach (var pc in c.Enemies) + { + lbtargets.Text += " " + pc.Hostname + ","; + } + } + else + { + lbtargets.Text += " - Click on an enemy module to target it."; + } + } + else + { + lbtargets.Text += " - Click on an enemy module to target it."; + } + lbtargets.Text += Environment.NewLine + "Some modules will not fire at their targets."; + } + } + } + + public void Player_Firewall_Deflect(Computer fwall) + { + //Safegaurd... + if (fwall.Type == SystemType.Firewall) + { + var r = fwall.GetAreaOfEffect(); + foreach (var pc in AllPlayerComputers) + { + if (pc != fwall) + { + if (pc.Bounds.IntersectsWith(r)) + { + pc.DamageDefector = fwall.Grade; + } + } + } + } + } + + public void Player_Firewall_Destroy(Computer fwall) + { + //Safegaurd... + if (fwall.Type == SystemType.Firewall) + { + var r = fwall.GetAreaOfEffect(); + foreach (var pc in AllPlayerComputers) + { + if (pc.Bounds.IntersectsWith(r)) + { + pc.DamageDefector = 1; + UpdatePlayerFirewalls(); + } + } + } + } + + public void UpdatePlayerFirewalls() + { + foreach (var pc in AllPlayerComputers) + { + if (pc.Type == SystemType.Firewall) + { + Player_Firewall_Deflect(pc); + } + } + } + + + private void Player_System_Repaired(object s, EventArgs e) + { + var c = (Computer)s; + WriteLine($"[{c.Hostname}] System repaired."); + lbcompromised.Text = "System regenerating..."; + int location = c.Left - (lbcompromised.Width / 4); + int y = c.Top - 25; + lbcompromised.Location = new Point(location, y); + lbcompromised.Show(); + c.Flash(lbcompromised); + + } + + + private void Player_System_Damaged(object s, EventArgs e) + { + var c = (Computer)s; + WriteLine($"[{c.Hostname}] System damaged. Total HP: {c.HP}"); + lbcompromised.Text = "System damaged!"; + int location = c.Left - (lbcompromised.Width / 4); + int y = c.Top - 25; + lbcompromised.Location = new Point(location, y); + lbcompromised.Show(); + c.Flash(lbcompromised); + } + + private void btnaddmodule_Click(object sender, EventArgs e) + { + SetupModuleList(); + pnldefensemanager.Left = 7; + pnldefensemanager.Visible = !pnldefensemanager.Visible; + if (IsTutorial) + { + if (TutorialProgress == 12) + { + SetupTutorialUI(13); + } + } + } + + private Dictionary<string, SystemType> FutureModules = null; + public List<Module> TutorialNetwork = new List<Module>(); + + public void SetupModuleList() + { + FutureModules = new Dictionary<string, SystemType>(); + cmbmodules.Items.Clear(); + List<Module> net = null; + if (IsTutorial) + { + net = TutorialNetwork; + } + else + { + net = Hacking.MyNetwork; + } + foreach (var item in net) + { + Computer m = null; + foreach (var mod in AllPlayerComputers) + { + if (mod.Hostname == item.Hostname) + { + m = mod; + } + } + if (m == null) + { + if (item.HP > 0) + { + cmbmodules.Items.Add(item.Hostname); + FutureModules.Add(item.Hostname, item.Type); + } + } + } + + } + + bool PlacingNewModule = false; + + + private void button1_Click_1(object sender, EventArgs e) + { + if (cmbmodules.Text != "") + { + PlacingNewModule = true; + pnldefensemanager.Hide(); + if (IsTutorial) + { + if (TutorialProgress == 20) + { + SetupTutorialUI(21); + } + } + } + } + + private void playfield_MouseDown(object sender, MouseEventArgs e) + { + if (PlacingNewModule == true) + { + if (e.Button == MouseButtons.Left) + { + if (AllPlayerComputers.Count < 10) + { + bool cont = true; + try + { + SystemType type = FutureModules[cmbmodules.Text]; + } + catch + { + cont = false; + API.CreateInfoboxSession("Error", "Please select a module type.", infobox.InfoboxMode.Info); + } + if (cont == true) + { + var coordinates = pnlyou.PointToClient(Cursor.Position); + int x = coordinates.X; + int y = coordinates.Y; + + var m = new Module(FutureModules[cmbmodules.Text], 1, cmbmodules.Text); + foreach (var mod in GetMyNet()) + { + if (mod.Hostname == cmbmodules.Text) + { + m = mod; + } + } + m.X = x; + m.Y = y; + var c = m.Deploy(); + AddModule(c); + API.RemoveCodepoints(10); + pnldefensemanager.Hide(); + if (IsTutorial) + { + if (TutorialProgress == 21) + { + SetupTutorialUI(22); + } + else if (TutorialProgress == 25) + { + SetupTutorialUI(26); + } + } + } + PlacingNewModule = false; + } + else + { + API.CreateInfoboxSession("Too much deployed modules", "You can have a maximum of 10 modules deployed on your network, including your main system. You will have to wait for one to be destroyed.", infobox.InfoboxMode.Info); + PlacingNewModule = false; + } + } + else + { + PlacingNewModule = false; + } + } + } + + public List<FutureModule> BuyableModules = null; + + public void SetupBuyable() + { + if (!IsTutorial) + { + BuyableModules = Hacking.GetFutureModules(); + } + cmbbuyable.Items.Clear(); + foreach (var m in BuyableModules) + { + cmbbuyable.Items.Add(m.Name); + } + lbmoduleinfo.Text = ""; + txtgrade.Text = "1"; + } + + private void btnbuy_Click(object sender, EventArgs e) + { + if (IsTutorial) + { + if (TutorialProgress == 14) + { + SetupTutorialUI(15); + } + } + SetupBuyable(); + pnlbuy.Show(); + pnldefensemanager.Hide(); + } + + public List<Rectangle> AntiVirusBounds = null; + public List<Rectangle> IndicatorsToDestroy = new List<Rectangle>(); + private void boundpaint(object sender, PaintEventArgs e) + { + foreach (Rectangle r in IndicatorsToDestroy) + { + AntiVirusBounds.Remove(r); + var sb = new SolidBrush(Color.Black); + var p = new Pen(sb); + p.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid; + p.Width = 2; + e.Graphics.DrawRectangle(p, r); + + } + IndicatorsToDestroy.Clear(); + foreach (Rectangle r in AntiVirusBounds) + { + IndicatorsToDestroy.Add(r); + tmrredraw.Start(); + var sb = new SolidBrush(Color.White); + var p = new Pen(sb); + p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; + p.Width = 2; + e.Graphics.DrawRectangle(p, r); + } + } + + private void tmrredraw_Tick(object sender, EventArgs e) + { + pnlyou.Refresh(); + tmrredraw.Stop(); + } + + private void SetupModuleInfo() + { + bool cont = false; + FutureModule m = null; + foreach (var mod in BuyableModules) + { + if (mod.Name == cmbbuyable.Text) + { + m = mod; + cont = true; + } + } + if (cont == true) + { + lbmoduleinfo.Text = m.Name; + lbmoduleinfo.Text += Environment.NewLine + $"Cost: {m.Cost * Convert.ToInt32(txtgrade.Text)} CP"; + lbmoduleinfo.Text += Environment.NewLine + $"Description: {Environment.NewLine}{m.Description}"; + } + } + + private void cmbbuyable_SelectedIndexChanged(object sender, EventArgs e) + { + SetupModuleInfo(); + if (IsTutorial) + { + if (TutorialProgress == 17) + { + if (cmbbuyable.Text == "Antivirus") + { + SetupTutorialUI(18); + } + } + } + } + + private void txtgrade_TextChanged(object sender, EventArgs e) + { + try + { + int g = Convert.ToInt32(txtgrade.Text); + if (g < 1) + { + txtgrade.Text = "1"; + } + else if (g > 4) + { + txtgrade.Text = "4"; + } + SetupModuleInfo(); + } + catch + { + txtgrade.Text = "1"; + SetupModuleInfo(); + } + } + + public List<Module> GetMyNet() + { + if (IsTutorial) + { + return TutorialNetwork; + } + else + { + return Hacking.MyNetwork; + } + } + + private void btndonebuying_Click(object sender, EventArgs e) + { + var mod = new FutureModule("", 0, "", SystemType.Core); + bool cont = false; + foreach (var m in BuyableModules) + { + if (m.Name == cmbbuyable.Text) + { + mod = m; + cont = true; + } + } + if (cont == true) + { + if (API.Codepoints >= mod.Cost) + { + if (txthostname.Text != "") + { + bool cont2 = true; + string hname = txthostname.Text.Replace(" ", "_"); + foreach (var pc in GetMyNet()) + { + if (pc.Hostname == hname) + { + cont2 = false; + } + } + if (cont2 == true) + { + var newModule = new Module(mod.Type, Convert.ToInt32(txtgrade.Text), hname); + newModule.HP = newModule.GetTotalHP(); + GetMyNet().Add(newModule); + API.RemoveCodepoints(mod.Cost); + API.CreateInfoboxSession("Module added.", "To deploy the module to the network, select 'Add Module' and choose the hostname from the menu.", infobox.InfoboxMode.Info); + pnlbuy.Hide(); + if (IsTutorial) + { + if (TutorialProgress == 19) + { + SetupTutorialUI(20); + } + else if (TutorialProgress == 24) + { + SetupTutorialUI(25); + } + } + } + else + { + API.CreateInfoboxSession("Please enter a unique hostname.", "No two computers can share the same hostname. Please choose another.", infobox.InfoboxMode.Info); + } + } + else + { + API.CreateInfoboxSession("Please enter a hostname.", "It is best to enter a hostname for your new computer so you know which one it is.", infobox.InfoboxMode.Info); + } + + } + else + { + API.CreateInfoboxSession("Insufficient Codepoints", "You do not have enough Codepoints to buy this module.", infobox.InfoboxMode.Info); + } + } + } + + private void btncloseinfo_Click(object sender, EventArgs e) + { + SelectedPlayerComputer = null; + pnlpcinfo.Hide(); + Hacking.SaveCharacters(); + } + + private void btnpoweroff_Click(object sender, EventArgs e) + { + //Remove the computer from the game. + pnlyou.Controls.Remove(SelectedPlayerComputer); + AllPlayerComputers.Remove(SelectedPlayerComputer); + btnpoweroff.Hide(); + } + + private void btnupgrade_Click(object sender, EventArgs e) + { + int price = 20 * SelectedPlayerComputer.Grade; + if (API.Codepoints >= price) + { + foreach (var m in GetMyNet()) + { + if (m.Hostname == SelectedPlayerComputer.Hostname) + { + SelectedPlayerComputer.Grade += 1; + m.Grade += 1; + Hacking.SaveCharacters(); + API.CreateInfoboxSession("Upgrade successful.", "Your module has been upgraded.", infobox.InfoboxMode.Info); + } + } + } + else + { + API.CreateInfoboxSession("Insufficient funds", $"You need at least {price} CP to upgrade this module.", infobox.InfoboxMode.Info); + } + ShowPCInfo(SelectedPlayerComputer.Hostname); + } + + public int TutorialProgress = 0; + public bool IsTutorial = false; + + public void SetupTutorialUI(int p) + { + TutorialProgress = p; + lbtutorial.Show(); + pnltutorial.Show(); + pnltutorial.Left = (this.Width - pnltutorial.Width) / 2; + pnltutorial.Top = (this.Height - pnltutorial.Height) / 2; + switch (p) + { + case 0: + lbtutorial.Text = "Welcome to the Hacker Battle tutorial. This guide will teach you the fundamentals and basics of taking part in a Hacker Battle. When you're done here, you'll be able to start up a network and start dominating others' networks."; + btnaddmodule.Hide(); + btnnext.Show(); + break; + case 1: + lbtutorial.Text = "Let's go over the user interface. It's quite simple, actually. There are 4 different displays on your screen. One for your network, one for your console, and same for the enemy."; + break; + case 2: + lbtutorial.Text = "On the left side is your console and playfield. Your console will log all the actions that happen on your network. Your Playfield is a visual representation of your network. Each square represents a different module. Most of your actions will take place in the Playfield."; + break; + case 3: + lbtutorial.Text = "On the right is the enemy's console and playfield. Both playfields will show the HP (health) of each module, and the total network HP."; + break; + case 4: + lbtutorial.Text = "If the enemy's total network health hits 0%, or his core's strength hits 0%, you win."; + break; + case 5: + lbtutorial.Text = "However, if the same happens to you, you will lose the battle, and won't be able to fight back until your Core heals."; + break; + case 6: + lbtutorial.Text = "Each network has one core. It is represented by the square in the centre of the playfield. Click on your Core to view information about it."; + btnnext.Hide(); + break; + case 7: + lbtutorial.Text = "When you click on a module, you can see information about it, such as it's grade level, HP, and type. This module is a Core, so it has no grade level. It currently has 100 HP."; + btnnext.Show(); + break; + case 8: + lbtutorial.Text = "When a module is selected you can left-click an enemy module to target it. This will make the selected module attempt to fire at the target. Cores are very weak, but are capable of bringing a target down by 1 HP."; + break; + case 9: + lbtutorial.Text = "The enemy Core is attacking your Core now. Looks like it's time to fight back. Select your core, and target the enemy's Core to fight back."; + btnnext.Hide(); + break; + case 10: + lbtutorial.Text = "Phew! He couldn't do much damage before we fought back. In a real battle, modules won't just stop fighting randomly, but for the purpose of this tutorial, your Core will stop attacking the enemy Core."; + btnnext.Show(); + ThisPlayerPC.Enemies.Clear(); + break; + case 11: + lbtutorial.Text = "Should your Core fall to a fatal state in the future, you can deploy some defenses to slow the enemy down. Any hacker knows it's best to disable defenses before attacking the main target."; + ThisPlayerPC.HP = 5; + break; + case 12: + lbtutorial.Text = "We will look at ways of healing damaged modules now. You can add new modules to the network by clicking the [Add Module] button in the lower-left corner."; + btnaddmodule.Show(); + btnnext.Hide(); + break; + case 13: + btnbuy.Hide(); + lbtutorial.Text = "You can select a module from the list of hostnames. Only modules that are not powered on will display in the menu."; + btnnext.Show(); + BuyableModules = new List<FutureModule>(); + BuyableModules.Add(new FutureModule("Antivirus", 0, "This module will heal any other module within it's area of effect to 10 HP. Higher grades can improve it's area of effect.", SystemType.Antivirus)); + break; + case 14: + btnbuy.Show(); + lbtutorial.Text = "In this demonstration, you have no other modules to deploy. You will need to buy some modules to get started. Click [Buy New Module] to continue."; + btnnext.Hide(); + break; + case 15: + cmbbuyable.Enabled = false; + lbtutorial.Text = "Let's go over the user interface, shall we? At the top is a list of all possible module types."; + btnnext.Show(); + btndonebuying.Hide(); + lbgrade.Hide(); + txtgrade.Hide(); + txthostname.Hide(); + lbhostname.Hide(); + lbmoduleinfo.Hide(); + break; + case 16: + lbtutorial.Text = "Below that, is the cost and description of the selected module type. It's invisible right now, but when you select a new module, it will populate."; + lbmoduleinfo.Show(); + break; + case 17: + cmbbuyable.Enabled = true; + lbtutorial.Text = "We need an Antivirus module, so go ahead and select it from the menu."; + btnnext.Hide(); + break; + case 18: + lbtutorial.Text = "Normally, an Antivirus would cost us 15 Codepoints, however since this is a tutorial, it is free."; + btnnext.Show(); + break; + case 19: + lbtutorial.Text = "Below the description is the Hostname box. A Hostname is used to identify the new module. Pick something you'll remember as this new Antivirus, then click [Buy] to purchase it."; + btnnext.Hide(); + lbhostname.Show(); + txthostname.Show(); + btndonebuying.Show(); + break; + case 20: + btnnext.Hide(); + lbtutorial.Text = "Now that we have an antivirus module, go ahead and deploy it by selecting [Add Module], choosing the hostname you entered, and clicking [Done]."; + break; + case 21: + btnnext.Hide(); + lbtutorial.Text = "Alrighty. Now you get to choose where you place your module. Simply left-click in a blank area where you'd like to place the module. Right-click to cancel. Oh, be sure to place close to our Core!"; + break; + case 22: + lbtutorial.Text = "The Antivirus has been placed. You may've noticed that white dotted box around it when you placed it. If the Core is even slightly within the box, the Antivirus will heal it back to 10 HP."; + btnnext.Show(); + break; + case 23: + lbtutorial.Text = "The higher the Antivirus' grade, the bigger this area of effect becomes. However, it will always only be able to heal modules to 10 HP."; + break; + case 24: + lbtutorial.Text = "A Turret has been added to the list of buyable modules. Go pick one up!"; + btnnext.Hide(); + BuyableModules.Clear(); + BuyableModules.Add(new FutureModule("Turret", 0, "It's not super-effective, but the Turret will blast through any Grade 1 defenses pretty quickly. The higher the grade, the higher the strength.", SystemType.Turret)); + break; + case 25: + lbtutorial.Text = "Turrets can fire damaging viruses at their targets. Go ahead and place your Turret somewhere within the Antivirus's Area of Effect."; + break; + case 26: + lbtutorial.Text = "Notice how the Turret only has 10 HP, just like the Antivirus?"; + btnnext.Show(); + break; + case 27: + lbtutorial.Text = "This is because both the Antivirus and Turret are at Grade 1. There are four grades of modules you can get, and you can easily upgrade by selecting a module and choosing [Upgrade This Module]."; + break; + case 28: + lbtutorial.Text = "Upgrading a module will increase it's max HP. Grade 1 is 10 HP, Grade 2 is 20 HP, Grade 3 is 40 HP, and Grade 4 is 80 HP."; + break; + case 29: + lbtutorial.Text = "Some modules will have a higher attack rate based on their grade. Others may throw more damaging attacks, and any module's Area of Effect (if it has one) will grow."; + break; + case 30: + lbtutorial.Text = "Another tip: Multiple modules can target the same module, and a module can have multiple targets. This means that you can have your Core and your Turret both attack the enemy Core."; + break; + case 31: + lbtutorial.Text = "Some modules do not work on a target-based system. Some may work using an area-of-effect system (like an Antivirus), and some may target the entire enemy network."; + break; + case 32: + pnltutorial.Left = this.Width - pnltutorial.Width; + pnltutorial.Top = this.Height - flcontrols.Height - pnltutorial.Height; + lbtutorial.Text = "We have reset both your Cores' health. Go ahead and finish off the enemy Core using your newfound skills."; + ThisPlayerPC.HP = 100; + ThisEnemyPC.HP = 100; + btnnext.Hide(); + BuyableModules = new List<FutureModule>(); + BuyableModules.Add(new FutureModule("Antivirus", 0, "This module will heal any other module within it's area of effect to 10 HP. Higher grades can improve it's area of effect.", SystemType.Antivirus)); + BuyableModules.Add(new FutureModule("Turret", 0, "It's not super-effective, but the Turret will blast through any Grade 1 defenses pretty quickly. The higher the grade, the higher the strength.", SystemType.Turret)); + break; + default: + btnnext.Show(); + lbtutorial.Text = "This concludes the Hacker Battle tutorial. Happy hunting, soldier. Just kidding. Stay safe."; + btnnext.Text = "Close"; + break; + } + } + + private void btnnext_Click(object sender, EventArgs e) + { + if (btnnext.Text == "Close") + { + UserRequestedClose = false; + this.Close(); + } + SetupTutorialUI(TutorialProgress + 1); + } + + #endregion + + private void HackUI_Load(object sender, EventArgs e) + { + this.TopMost = false; + Audio.Stopped += (o, a) => + { + if (this != null) + { + Audio.Play("hackerbattle_ambient"); + } + }; + Audio.Play("hackerbattle_ambient"); + + Hacking.RepairTimer.Stop(); //Don't want the player to be able to repair dead modules during a battle! + this.TopMost = true; + this.WindowState = FormWindowState.Maximized; + //this.TopMost = true; + LoadPlayerScreen(); + LoadEnemyScreen(); + tmrvisualizer.Interval = 10; + tmrvisualizer.Start(); + } + + #region ENEMY + private EnemyHacker ThisEnemyHacker { get; set; } + public List<Computer> AllEnemyComputers = null; + public Computer ThisEnemyPC { get; set; } + private void LoadEnemyScreen() + { + AllEnemyComputers = new List<Computer>(); + VisualizeEnemyNetwork(); + tmrenemyhealthdetect.Start(); + ThisEnemyPC.Enemy = true; + } + + private void VisualizeEnemyNetwork() + { + var rnd = new Random(); + foreach (Module m in ThisEnemyHacker.Network) + { + m.HP = m.GetTotalHP(); + var c = m.Deploy(); + if (c.Type == SystemType.Core) + { + ThisEnemyPC = c; + ThisEnemyPC.EnemyComputer = ThisPlayerPC; + ThisPlayerPC.EnemyComputer = ThisEnemyPC; + } + AddEnemyModule(c); + c.Location = new Point(m.X, m.Y); + } + } + + public void Enemy_System_Attacking(object s, EventArgs a) + { + int i = new Random().Next(AllPlayerComputers.Count); + var pc = AllPlayerComputers[i]; + var se = (Computer)s; + pc.LaunchAttack(se.GetProperType()); + } + + public Computer SelectedEnemyComputer = null; + + public void AddEnemyModule(Computer newModule) + { + if(newModule.Type == SystemType.Core) + { + newModule.Left = (pnlenemy.Width - newModule.Width) / 2; + newModule.Top = (pnlenemy.Height - newModule.Height) / 2; + } + var rnd = new Random(); + pnlenemy.Controls.Add(newModule); + foreach (var pc in AllEnemyComputers) + { + while (newModule.Bounds.IntersectsWith(pc.Bounds)) + { + newModule.Location = new Point(rnd.Next(100, 350), rnd.Next(100, 350)); + } + } + AllEnemyComputers.Add(newModule); + int hp = newModule.HP; + TotalEnemyHP += (decimal)newModule.HP; + newModule.Show(); + + newModule.StolenModule += (o, a) => + { + var t = new Thread(new ThreadStart(() => + { + var lst = new List<Computer>(); + if (!newModule.Enslaved) + lst = AllPlayerComputers; + else + lst = AllEnemyComputers; + WriteLine_Enemy($"[{newModule.Hostname}] Starting network hack..."); + Thread.Sleep(5000); + + var pc = lst[rnd.Next(0, lst.Count)]; + this.Invoke(new Action(() => + { + if (pc.Type != SystemType.Core) + { + module_to_steal = pc; + + pgpong.Left = (this.Width - pgpong.Width) / 2; + pgpong.Top = (this.Height - pgpong.Height) / 2; + + pgpong.Show(); + newgame(); + } + })); + })); + t.Start(); + }; + newModule.EnslavedModule += (o, e) => + { + if (!newModule.Enslaved) + { + var pc = AllPlayerComputers[rand.Next(0, AllPlayerComputers.Count)]; + if (!pc.Enslaved) + { + WriteLine_Enemy($"[{newModule.Hostname}] Successfully enslaved {pc.Hostname}"); + pc.Enslaved = true; + } + + } + }; + newModule.OnDestruction += (object s, EventArgs a) => + { + if (this.SelectedEnemyComputer == newModule) + { + SelectedEnemyComputer = null; + } + WriteLine_Enemy($"[Network] {newModule.Hostname} has gone OFFLINE."); + AllEnemyComputers.Remove(newModule); + newModule.Dispose(); + }; + newModule.Select += (object s, EventArgs a) => + { + bool c = true; + foreach (var pc in SelectedPlayerComputer.Enemies) + { + if (pc.Hostname == newModule.Hostname) + { + c = false; + } + } + if (c == true) + { + SelectedPlayerComputer.Enemies.Add(newModule); + ShowPCInfo(SelectedPlayerComputer.Hostname); + if (IsTutorial) + { + if (TutorialProgress == 9) + { + SetupTutorialUI(10); + } + } + WriteLine_Enemy("[Network] WARNING! Rival system has targeted a system on this network!"); + WriteLine($"[Network] System \"{SelectedPlayerComputer.Hostname}\" is now targeting rival system \"{newModule.Hostname}\"."); + } + }; + newModule.HP_Decreased += new EventHandler(Enemy_System_Damaged); + newModule.OnRepair += new EventHandler(Enemy_System_Repaired); + if (newModule.Type == SystemType.Antivirus) + { + var b = newModule.GetAreaOfEffect(); + newModule.AntivirusRepair += (object s, EventArgs a) => + { + foreach (Computer pc in AllEnemyComputers) + { + if (pc != newModule && pc.Bounds.IntersectsWith(b)) + { + if (newModule.Type == SystemType.RepairModule) + { + if (pc.HP < newModule.HP) + { + if (pc.HP < pc.GetTotal()) + { + WriteLine_Enemy($"[{newModule.Hostname}] Repairing neighbouring system \"{pc.Hostname}\"..."); + pc.Repair(1); + } + } + + } + else + { + if (pc.HP < 10) + { + pc.Repair(1); + } + } + } + } + }; + } + if (newModule.Type == SystemType.Firewall) + { + pnlenemy.Refresh(); + Enemy_Firewall_Deflect(newModule); + } + if (newModule.Type == SystemType.ServerStack) + { + newModule.MassDDoS += (object s, EventArgs a) => + { + if (newModule.Enslaved) + WormToEnemy(); + else + WormToPlayer(); + }; + } + } + + public void Enemy_Firewall_Deflect(Computer fwall) + { + //Safeguard... also apparently I can't spell... because this used to be 'Safegaurd'... + if (fwall.Enslaved == false && fwall.Type == SystemType.Firewall) + { + var r = fwall.GetAreaOfEffect(); + foreach (var pc in AllEnemyComputers) + { + if (pc != fwall) + { + if (pc.Bounds.IntersectsWith(r)) + { + pc.DamageDefector = fwall.Grade; + } + } + } + } + } + + public void Enemy_Firewall_Destroy(Computer fwall) + { + //Safegaurd... + if (fwall.Type == SystemType.Firewall) + { + var r = fwall.GetAreaOfEffect(); + foreach (var pc in AllEnemyComputers) + { + if (pc.Bounds.IntersectsWith(r)) + { + pc.DamageDefector = 1; + UpdateEnemyFirewalls(); + } + } + } + } + + public void UpdateEnemyFirewalls() + { + foreach (var pc in AllEnemyComputers) + { + if (pc.Type == SystemType.Firewall) + { + Enemy_Firewall_Deflect(pc); + } + } + } + + + private void Enemy_System_Repaired(object s, EventArgs e) + { + var c = (Computer)s; + WriteLine_Enemy($"[{c.Hostname}] System repaired."); + lbenemycompromised.Text = "System regenerating..."; + int location = c.Left - (lbenemycompromised.Width / 4); + int y = c.Top - 25; + lbenemycompromised.Location = new Point(location, y); + lbenemycompromised.Show(); + c.Flash(lbenemycompromised); + + } + + + private void Enemy_System_Damaged(object s, EventArgs e) + { + var c = (Computer)s; + WriteLine_Enemy($"[{c.Hostname}] System damaged. Current HP: {c.HP}"); + WriteLine($"[Network] Damaged system on rival network with hostname \"{c.Hostname}\""); + lbenemycompromised.Text = "System damaged!"; + int location = c.Left - (lbenemycompromised.Width / 4); + int y = c.Top - 25; + lbenemycompromised.Location = new Point(location, y); + lbenemycompromised.Show(); + c.Flash(lbenemycompromised); + } + + private decimal TotalEnemyHP = 0; + + private void tmrenemyhealthdetect_Tick(object sender, EventArgs e) + { + lbsong.Visible = true; + btntogglemusic.Visible = true; + + lbsong.Text = Audio.Name + " @ " + Audio.CurrentPosition; + + decimal health = 0; + lbcodepoints.Text = $"Codepoints: {API.Codepoints}"; + var rnd = new Random(); + int chance = 0; + foreach (var pc in AllEnemyComputers) + { + if (pc.Disabled == false) + { + var elist = new List<Computer>(); + if (pc.Enslaved) + elist = AllEnemyComputers; + else + elist = AllPlayerComputers; + foreach (var enemy in elist) + { + chance = rnd.Next(1, 20); + if (chance == 10) + { + if (IsTutorial) + { + if (TutorialProgress == 9) + { + ThisPlayerPC.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); + } + else if (TutorialProgress == 32) + { + enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); + } + else + { + enemy.Enemies.Clear(); + } + } + else + { + enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); + } + } + } + } + } + + foreach (var pc in AllEnemyComputers) + { + health += (decimal)pc.HP; + } + try + { + decimal percent = (health / TotalEnemyHP) * 100; + lbenemystats.Text = $"Enemy Health: {percent}%"; + if (ThisEnemyPC.HP <= 0) + { + if (IsTutorial) + { + SetupTutorialUI(33); + } + else + { + string message = "You have successfully beaten the enemy hacker."; + if (ThisEnemyHacker.IsLeader == false) + { + switch(rnd.Next(0, 6)) + { + case 1: + API.AddCodepoints(1000); + message = "You have beaten the enemy. You have earned some precious Codepoints for your effort!"; + break; + case 2: + message = "You have beaten the enemy. As a reward, all Shiftorium Upgrades cost half-price."; + Hacking.GiveHack(Hack.PriceDrop); + break; + case 3: + message = "You have beaten the enemy. As a reward, applications will now pay out more Codepoints than usual."; + Hacking.GiveHack(Hack.PayoutIncrease); + break; + case 4: + message = "The enemy has recognized your skill and has decided to become a friend. You can now hire them for free as a partner during a system hack."; + //befriend the enemy. + var skill = ThisEnemyHacker.FriendSkill; + var speed = ThisEnemyHacker.FriendSpeed; + var desc = ThisEnemyHacker.FriendDesc; + var name = ThisEnemyHacker.Name; + Hacking.AddCharacter(new Character(name, desc, skill, speed, 0)); + break; + case 5: + var cats = SaveSystem.ShiftoriumRegistry.GetCategories(false); + string cat = cats[rnd.Next(0, cats.Count - 1)]; + if (API.Upgrades[cat] == false) + { + API.Upgrades[cat] = true; + message = $"You have beaten the enemy, and as a result, the {cat.ToUpper()} Shiftorium category has been unlocked."; + } + break; + default: + message = "You have successfully beaten the enemy hacker."; + break; + } + } + API.CreateInfoboxSession("You won.", message, infobox.InfoboxMode.Info); + + UserRequestedClose = false; + var h = OnWin; + if(h != null) + { + h(this, new EventArgs()); + } + this.Close(); + } + } + } + catch + { + + } + } + + public void WormToPlayer() + { + var rnd = new Random(); + int r = rnd.Next(0, 10); + WriteLine_Enemy("[NETWORK] Launching distributed denial-of-service attack on rival network..."); + foreach (Computer c in AllPlayerComputers) + { + if (r == 5) + { + c.Disable(); + } + } + } + + public void WriteLine_Enemy(string text) + { + try + { + if (txtenemyconsole.Text.Length == 0) + { + txtenemyconsole.Text = text + Environment.NewLine; + } + else + { + txtenemyconsole.Text += text + Environment.NewLine; + } + txtenemyconsole.Select(txtenemyconsole.TextLength, 0); + txtenemyconsole.ScrollToCaret(); + } + catch + { + this.Invoke(new Action(() => { WriteLine_Enemy(text); })); + } + } + + public void WriteLine(string text) + { + try + { + if (txtyourconsole.Text.Length == 0) + { + txtyourconsole.Text = text + Environment.NewLine; + } + else + { + txtyourconsole.Text += text + Environment.NewLine; + } + txtyourconsole.Select(txtyourconsole.TextLength, 0); + txtyourconsole.ScrollToCaret(); + } + catch + { + this.Invoke(new Action(() => { WriteLine(text); })); + } + } + + #endregion + + bool playing = true; + + private void button2_Click(object sender, EventArgs e) + { + if (playing == true) + { + Audio.ForceStop(); + } + else + { + Audio.Play("hackerbattle_ambient"); + } + playing = !playing; + } + + Panel winningPlayfield = null; + + int bgcol = 0; + int pulse = 0; + Panel losingPlayfield = null; + private void tmrvisualizer_Tick(object sender, EventArgs e) + { + int enemy_hp = 0; + int player_hp = 0; + foreach(var p in AllPlayerComputers) + { + player_hp += p.HP; + } + foreach (var p in AllEnemyComputers) + { + enemy_hp += p.HP; + } + + if (player_hp >= enemy_hp) + { + winningPlayfield = pnlyou; + losingPlayfield = pnlenemy; + } + else + { + winningPlayfield = pnlenemy; + losingPlayfield = pnlyou; + } + + losingPlayfield.BackColor = Color.Black; + + + try + { + var visualizer = Audio.GetVisualizer(); + switch(visualizer.type) + { + case VisualizerType.Pulse: + tmrvisualizer.Interval = 1; + if(pulse == 0) + { + if(bgcol < 255) + { + bgcol += 10; + } + else + { + pulse = 1; + } + } + else + { + if(bgcol > 0) + { + bgcol -= 10; + } + else + { + pulse = 0; + } + } + break; + case VisualizerType.CalmDown: + bgcol = 255 - MathEx.LinearInterpolate(visualizer.startTime * 100, visualizer.endTime * 100, Audio.CurrentPositionMS, 0, 255); + break; + case VisualizerType.BuildUp: + bgcol = MathEx.LinearInterpolate(visualizer.startTime, visualizer.endTime, Audio.CurrentPosition, 0, 255); + break; + } + Color c = new Color(); + int r = 0; + int g = 0; + int b = 0; + if (visualizer.R) + r = bgcol; + if (visualizer.G) + g = bgcol; + if (visualizer.B) + b = bgcol; + c = Color.FromArgb(r, g, b); + if(playing) + winningPlayfield.BackColor = c; + } + catch + { + + } + } + + private void pongMain_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) + { + paddleHuman.Location = new Point(paddleHuman.Location.X, (MousePosition.Y - pgpong.Location.Y) - (paddleHuman.Height / 2)); + } + + + private void pongGameTimer_Tick(object sender, EventArgs e) + { + //Set the computer player to move according to the ball's position. + if (ball.Location.X > 500 - xVel * 10 && xVel > 0) + { + if (ball.Location.Y > paddleComputer.Location.Y + 50) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed * 2 + ((int)yveldec / 2)); + } + if (ball.Location.Y < paddleComputer.Location.Y + 50) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed * 2 + ((int)yveldec / 2)); + } + casualposition = rand.Next(-150, 201); + } + + //Set Xvel and Yvel speeds from decimal + if (xVel > 0) + xVel = (int)Math.Round(xveldec); + if (xVel < 0) + xVel = (int)-Math.Round(xveldec); + if (yVel > 0) + yVel = (int)Math.Round(yveldec); + if (yVel < 0) + yVel = (int)-Math.Round(yveldec); + + // Move the game ball. + ball.Location = new Point(ball.Location.X + xVel, ball.Location.Y + yVel); + + // Check for top wall. + if (ball.Location.Y < 0) + { + ball.Location = new Point(ball.Location.X, 0); + yVel = -yVel; + } + + // Check for bottom wall. + if (ball.Location.Y > pgpong.Height - ball.Height) + { + ball.Location = new Point(ball.Location.X, pgpong.Height - ball.Size.Height); + yVel = -yVel; + } + + // Check for player paddle. + if (ball.Bounds.IntersectsWith(paddleHuman.Bounds)) + { + ball.Location = new Point(paddleHuman.Location.X + ball.Size.Width, ball.Location.Y); + //randomly increase x or y speed of ball + switch (rand.Next(1, 3)) + { + case 1: + xveldec = xveldec + incrementx; + break; + case 2: + if (yveldec > 0) + yveldec = yveldec + incrementy; + if (yveldec < 0) + yveldec = yveldec - incrementy; + break; + } + xVel = -xVel; + } + + // Check for computer paddle. + if (ball.Bounds.IntersectsWith(paddleComputer.Bounds)) + { + ball.Location = new Point(paddleComputer.Location.X - paddleComputer.Size.Width + 1, ball.Location.Y); + xveldec = xveldec + incrementx; + xVel = -xVel; + } + + // Check for left wall. + if (ball.Location.X < -100) + { + var m = module_to_steal; + if (m.Enemy) + AllEnemyComputers.Remove(m); + + var lst = new List<Module>(); + if (!m.Enemy) + lst = MyNetwork; + else + lst = ThisEnemyHacker.Network; + + string hn = m.Hostname; + + Module mod = null; + foreach(var pc in lst) + { + if(pc.Hostname == hn) + { + mod = pc; + } + } + + if (!AllPlayerComputers.Contains(m)) + AddModule(mod.Deploy()); + + if(!Hacking.MyNetwork.Contains(mod)) + { + Hacking.MyNetwork.Add(mod); + } + + if(module_to_steal.Parent != pnlyou) + { + module_to_steal.Parent.Controls.Remove(module_to_steal); + module_to_steal.Dispose(); + } + tmrcountdown.Stop(); + pongGameTimer.Stop(); + counter.Stop(); + pgpong.Hide(); + } + + // Check for right wall. + if (ball.Location.X > pgpong.Width - ball.Size.Width - paddleComputer.Width + 100) + { + var m = module_to_steal; + if (!m.Enemy) + AllPlayerComputers.Remove(m); + + var lst = new List<Module>(); + if (!m.Enemy) + lst = MyNetwork; + else + lst = ThisEnemyHacker.Network; + + string hn = m.Hostname; + + Module mod = null; + foreach (var pc in lst) + { + if (pc.Hostname == hn) + { + mod = pc; + } + } + + if (!AllEnemyComputers.Contains(m)) + AddEnemyModule(mod.Deploy()); + + if (!ThisEnemyHacker.Network.Contains(mod)) + { + ThisEnemyHacker.Network.Add(mod); + } + + if (module_to_steal.Parent != pnlenemy) + { + module_to_steal.Parent.Controls.Remove(module_to_steal); + module_to_steal.Dispose(); + } + tmrcountdown.Stop(); + pongGameTimer.Stop(); + counter.Stop(); + pgpong.Hide(); + } + + //lblstats.Text = "Xspeed: " & Math.Abs(xVel) & " Yspeed: " & Math.Abs(yVel) & " Human Location: " & paddleHuman.Location.ToString & " Computer Location: " & paddleComputer.Location.ToString & Environment.NewLine & " Ball Location: " & ball.Location.ToString & " Xdec: " & xveldec & " Ydec: " & yveldec & " Xinc: " & incrementx & " Yinc: " & incrementy + lblstatsX.Text = "Xspeed: " + xveldec; + lblstatsY.Text = "Yspeed: " + yveldec; + + lbllevelandtime.Text = "Level: " + level; + + if (xVel > 20 || xVel < -20) + { + paddleHuman.Width = Math.Abs(xVel); + paddleComputer.Width = Math.Abs(xVel); + } + else + { + paddleHuman.Width = 20; + paddleComputer.Width = 20; + } + + computerspeed = Math.Abs(yVel); + + // pgcontents.Refresh() + // pgcontents.CreateGraphics.FillRectangle(Brushes.Black, ball.Location.X, ball.Location.Y, ball.Width, ball.Height) + + } + + #region pong visualizer variables + + Random rand = new Random(); + int xVel = 7; + int yVel = 8; + int computerspeed = 8; + int level = 1; + int secondsleft = 60; + int casualposition; + double xveldec = 3.0; + double yveldec = 3.0; + double incrementx = 0.4; + double incrementy = 0.2; + int levelxspeed = 3; + int levelyspeed = 3; + int[] levelrewards = new int[50]; + int countdown = 3; + + #endregion + + private void counter_Tick(object sender, EventArgs e) + { + secondsleft = secondsleft - 1; + if (secondsleft == -1) + { + secondsleft = 60; + level = level + 1; + } + } + + private void tmrcountdown_Tick(object sender, EventArgs e) + { + switch (countdown) + { + case 0: + countdown = 3; + lblcountdown.Hide(); + pongGameTimer.Start(); + counter.Start(); + tmrcountdown.Stop(); + break; + case 1: + lblcountdown.Text = "1"; + countdown = countdown - 1; + break; + case 2: + lblcountdown.Text = "2"; + countdown = countdown - 1; + break; + case 3: + lblcountdown.Text = "3"; + countdown = countdown - 1; + lblcountdown.Show(); + break; + } + + } + + private void newgame() + { + level = 1; + secondsleft = 60; + //reset stats text + lblstatsX.Text = "Xspeed: "; + lblstatsY.Text = "Yspeed: "; + + levelxspeed = 3; + levelyspeed = 3; + + incrementx = 0.4; + incrementy = 0.2; + + xveldec = levelxspeed; + yveldec = levelyspeed; + + tmrcountdown.Start(); + if (xVel < 0) + xVel = Math.Abs(xVel); + lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " Seconds Left"; + } + } +} + +namespace System +{ + public class MathEx + { + public static int LinearInterpolate(int input_start, int input_end, int input, int output_start, int output_end) + { + int input_range = input_end - input_start; + int output_range = output_end - output_start; + + return (input - input_start) * output_range / input_range + output_start; + } + } +} diff --git a/source/WindowsFormsApplication1/Gameplay/HackUI.resx b/source/WindowsFormsApplication1/Gameplay/HackUI.resx new file mode 100644 index 0000000..9def72b --- /dev/null +++ b/source/WindowsFormsApplication1/Gameplay/HackUI.resx @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="lbmoduleinfo.Text" xml:space="preserve"> + <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. + +Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. + +To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. + +If you would like to buy a new module, click 'Buy new module'.</value> + </data> + <data name="label3.Text" xml:space="preserve"> + <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. + +Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. + +To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. + +If you would like to buy a new module, click 'Buy new module'.</value> + </data> + <data name="lbpcinfo.Text" xml:space="preserve"> + <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. + +Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. + +To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. + +If you would like to buy a new module, click 'Buy new module'.</value> + </data> + <data name="lbtutorial.Text" xml:space="preserve"> + <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. + +Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. + +To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. + +If you would like to buy a new module, click 'Buy new module'.</value> + </data> + <metadata name="tmrplayerhealthdetect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="tmrenemyhealthdetect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>63, 42</value> + </metadata> + <metadata name="tmrredraw.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>191, 17</value> + </metadata> + <metadata name="tmrvisualizer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>238, 42</value> + </metadata> + <metadata name="pongGameTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>358, 42</value> + </metadata> + <metadata name="counter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>501, 42</value> + </metadata> + <metadata name="tmrcountdown.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>594, 42</value> + </metadata> +</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Gameplay/Hacking.cs b/source/WindowsFormsApplication1/Gameplay/Hacking.cs new file mode 100644 index 0000000..7b18852 --- /dev/null +++ b/source/WindowsFormsApplication1/Gameplay/Hacking.cs @@ -0,0 +1,801 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + /// <summary> + /// Hacker battles and stuff like that. + /// </summary> + public class Hacking + { + public static List<Character> Characters = new List<Character>(); + public static List<HackTool> Tools = new List<HackTool>(); + public static List<EnemyHacker> EnemyHackers = new List<EnemyHacker>(); + public static List<Module> MyNetwork = new List<Module>(); + public static bool Failure = false; + public static DateTime FailDate = DateTime.Now; + internal static string HackerBattleAward = null; + public static Timer RepairTimer = null; + + public static Module MyCore + { + get + { + var m = new Module(SystemType.Core, 1, "invalid"); + foreach(var mod in MyNetwork) + { + if(mod.Hostname == "localhost") + { + m = mod; + } + } + return m; + } + } + + /// <summary> + /// Gives a shiftorium upgrade for free. + /// </summary> + /// <param name="id">Upgrade ID.</param> + public static void GiveUpgrade(string id) + { + API.Upgrades[id] = true; + } + + /// <summary> + /// Increases skill of a character. + /// </summary> + /// <param name="cid">The character ID.</param> + public static void IncreaseSkill(int cid) + { + var rnd = new Random(); + int newspeed = rnd.Next(0, 5); + int newskill = rnd.Next(0, 10); + Characters[cid].Speed += newspeed; + Characters[cid].Skill += newskill; + SaveCharacters(); + API.CreateInfoboxSession("Hack complete.", $"{Characters[cid].Name} has successfully completed their hack. {Characters[cid].Name} has gained {newspeed} Speed Points, and {newskill} Skill Points.", infobox.InfoboxMode.Info); + } + + /// <summary> + /// Applies a hack. + /// </summary> + /// <param name="hack">Type of hack to apply.</param> + public static void GiveHack(Hack hack) + { + switch (hack) + { + case Hack.PayoutIncrease: + API.CurrentSave.CodepointMultiplier += 1; + break; + case Hack.PriceDrop: + API.CurrentSave.PriceDivider += 1; + break; + } + } + + /// <summary> + /// Add a new character. + /// </summary> + /// <param name="ch">The new character.</param> + public static void AddCharacter(Character ch) + { + bool c = true; + foreach(var character in Characters) + { + if(character.Name == ch.Name) + { + c = false; + } + } + if(c == true) + { + Characters.Add(ch); + SaveCharacters(); + } + } + + /// <summary> + /// Adds a new hacking tool. + /// </summary> + /// <param name="ch">The hacking tool.</param> + public static void AddTool(HackTool ch) + { + if (!Tools.Contains(ch)) + { + Tools.Add(ch); + } + } + + /// <summary> + /// Returns a random hack type. + /// </summary> + /// <returns>The hack type.</returns> + public static Hack GetRandomHack() + { + var t = new List<Hack>(Enum.GetValues(typeof(Hack)).Cast<Hack>()); + var rnd = new Random(); + return t[rnd.Next(0, t.Count - 1)]; + } + + /// <summary> + /// Start a hack with a character. + /// </summary> + /// <param name="cid">Character to hire.</param> + /// <param name="hack">Type of hack to pull off.</param> + public static void StartHackWithCharacter(int cid, Hack hack) + { + var h = Characters[cid]; + var f = new Form(); + f.BackColor = Color.Black; + f.ForeColor = Color.White; + f.Font = new Font(OSInfo.GetMonospaceFont(), 9); + var l = new Label(); + int p = 0; + int speed = 10000 / h.Speed; //If a hacker has a speed of one, it will take 10,000 milliseconds to move 1% in the hack progress. Divide it by a thousand, you get 1,000 seconds. + var t = new Timer(); + t.Interval = speed; + f.FormBorderStyle = FormBorderStyle.None; + f.Show(); + switch (API.CurrentSkin.desktoppanelposition) + { + case "Top": + f.Location = new Point(5, API.CurrentSkin.desktoppanelheight + 5); + break; + case "Bottom": + f.Location = new Point(5, 5); + break; + } + + f.Controls.Add(l); + l.Show(); + l.TextAlign = ContentAlignment.MiddleCenter; + f.Height = 25; + f.TopMost = true; + l.Text = $"Progress: {p}%"; + l.Dock = DockStyle.Fill; + t.Tick += (object s, EventArgs a) => + { + if (l.Text != "Hack failed.") + { + if (p <= 100) + { + l.Text = $"Progress: {p}%"; + int fail = new Random().Next(0, h.Skill * h.Speed); + if (fail == 1) + { + l.Text = "Hack failed."; + } + } + else + { + GiveHack(hack); + f.Close(); + t.Stop(); + IncreaseSkill(cid); + } + } + else + { + f.Close(); + t.Stop(); + } + + p += 1; + }; + t.Start(); + } + + /// <summary> + /// Hacker Battles: List of modules the user can buy. + /// </summary> + /// <returns>The list that was created by the method. What did you think it would return? A boolean?</returns> + public static List<FutureModule> GetFutureModules() + { + var lst = new List<FutureModule>(); + lst.Add(new FutureModule("Antivirus", 15, "This module will heal any other module within it's area of effect to 10 HP. Higher grades can improve it's area of effect.", SystemType.Antivirus)); + lst.Add(new FutureModule("Enslaver", 75, "The Enslaver is a scary module for an opposing network. At any time, the Enslaver can take over any module on the enemy network and turn it against them.", SystemType.Enslaver)); + lst.Add(new FutureModule("Module Thief", 100, "The Module Thief can hack into the enemy's network and attempt to steal one of their modules and bring them into your network temporarily though. Be careful though, it might not work all the time!", SystemType.ModuleStealer)); + lst.Add(new FutureModule("Dedicated DDoS module", 10, "This module will attempt to disable the enemy network by sending a DDoS attack allowing you to take a breather.", SystemType.DedicatedDDoS)); + lst.Add(new FutureModule("Turret", 5, "It's not super-effective, but the Turret will blast through any Grade 1 defenses pretty quickly. The higher the grade, the higher the strength.", SystemType.Turret)); + lst.Add(new FutureModule("Firewall", 20, "Will decrease the amount of damage taken by any module within it's area of effect. The higher the grade, the bigger the area of effect and more protection it offers.", SystemType.Firewall)); + lst.Add(new FutureModule("Repair Module", 150, "Slowly repairs all modules within the area of effect to the same HP as the repair module.", SystemType.RepairModule)); + lst.Add(new FutureModule("Server Stack", 250, "Capable of sending a worm attack to the entire enemy network, preventing it from attacking until it can recover.", SystemType.ServerStack)); + return lst; + } + + /// <summary> + /// Hire a character to attempt to hack a Shiftorium Upgrade. + /// </summary> + /// <param name="cid">The character.</param> + /// <param name="upgrade">The upgrade ID.</param> + public static void StartHackWithCharacter(int cid, string upgrade) + { + if (upgrade == "random") + { + StartHackWithCharacter(cid, GetRandomHack()); + } + else { + var h = Characters[cid]; + var f = new Form(); + f.BackColor = Color.Black; + f.ForeColor = Color.White; + f.Font = new Font(OSInfo.GetMonospaceFont(), 9); + var l = new Label(); + int p = 0; + int speed = 10000 / h.Speed; //If a hacker has a speed of one, it will take 10,000 milliseconds to move 1% in the hack progress. Divide it by a thousand, you get 1,000 seconds. + var t = new Timer(); + t.Interval = speed; + f.FormBorderStyle = FormBorderStyle.None; + f.Show(); + switch (API.CurrentSkin.desktoppanelposition) + { + case "Top": + f.Location = new Point(5, API.CurrentSkin.desktoppanelheight + 5); + break; + case "Bottom": + f.Location = new Point(5, 5); + break; + } + + f.Controls.Add(l); + l.Show(); + l.TextAlign = ContentAlignment.MiddleCenter; + f.Height = 25; + f.TopMost = true; + l.Text = $"Progress: {p}%"; + l.Dock = DockStyle.Fill; + t.Tick += (object s, EventArgs a) => + { + if (l.Text != "Hack failed.") + { + if (p <= 100) + { + l.Text = $"Progress: {p}%"; + int fail = new Random().Next(0, h.Skill * h.Speed); + if (fail == 1) + { + l.Text = "Hack failed."; + } + } + else + { + GiveUpgrade(upgrade); + f.Close(); + t.Stop(); + IncreaseSkill(cid); + } + } + else + { + f.Close(); + t.Stop(); + } + + p += 1; + }; + t.Start(); + } + } + + /// <summary> + /// Start a hack with a tool. + /// </summary> + /// <param name="cid">Tool ID.</param> + /// <param name="hack">The hack type.</param> + public static void StartHack(int cid, Hack hack) + { + var h = Tools[cid]; + switch (h.Name) + { + case "Destabilizer Attack": + var t = new Timer(); + t.Interval = 100; + var rnd = new Random(); + t.Tick += (object s, EventArgs a) => + { + int r = rnd.Next(0, 100); + if (r == 90) + { + t.Stop(); + + API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info); + GiveHack(hack); + } + else + { + try { + int p = rnd.Next(0, 10); + switch (p) + { + case 1: + API.OpenProgram("shiftorium"); + break; + case 2: + API.OpenProgram("ki"); + break; + case 3: + API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info); + break; + case 4: + API.PlaySound(Properties.Resources._3beepvirus); + break; + case 5: + API.CurrentSession.BackColor = Color.White; + break; + case 6: + API.CurrentSession.BackColor = Color.Black; + break; + case 7: + API.PlaySound(Properties.Resources.dial_up_modem_02); + break; + case 8: + API.PlaySound(Properties.Resources.writesound); + break; + case 9: + API.PlaySound(Properties.Resources.typesound); + break; + } + } + catch + { + t.Stop(); + var tr = new Terminal(); + tr.Show(); + tr.WindowState = FormWindowState.Maximized; + tr.txtterm.BackColor = Color.Red; + tr.Crash(); + } + } + }; + t.Start(); + + + break; + } + } + + /// <summary> + /// Start a hack with a tool, to attempt to get an upgrade. + /// </summary> + /// <param name="cid">Tool ID.</param> + /// <param name="upgrade">Upgrade ID.</param> + public static void StartHack(int cid, string upgrade) + { + if (upgrade == "random") + { + StartHack(cid, GetRandomHack()); + } + else { + var h = Tools[cid]; + switch(h.Name) + { + case "Destabilizer Attack": + var t = new Timer(); + t.Interval = 1000 / h.Effectiveness; + var rnd = new Random(); + t.Tick += (object s, EventArgs a) => + { + int r = rnd.Next(0, 100); + if(r == 90) + { + t.Stop(); + API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info); + GiveUpgrade(upgrade); + } + else + { + int p = rnd.Next(0, 10); + switch(p) + { + case 1: + API.OpenProgram("shiftorium"); + break; + case 2: + API.OpenProgram("ki"); + break; + case 3: + API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info); + break; + case 4: + API.PlaySound(Properties.Resources._3beepvirus); + break; + case 5: + API.CurrentSession.BackColor = Color.White; + break; + case 6: + API.CurrentSession.BackColor = Color.Black; + break; + case 7: + API.PlaySound(Properties.Resources.dial_up_modem_02); + break; + case 8: + API.PlaySound(Properties.Resources.writesound); + break; + case 9: + API.PlaySound(Properties.Resources.typesound); + break; + } + } + }; + t.Start(); + + + break; + } + } + } + + /// <summary> + /// Initiates the Hacker Battle training simulation. + /// </summary> + public static void StartBattleTutorial() + { + var e = new EnemyHacker("Tutorial", "Tutorial hacker", "Tutorial hacker", 0, 0, "easy"); + var y = new HackUI(e); + y.IsTutorial = true; + API.CreateForm(y, "You", Properties.Resources.iconTerminal); + } + + /// <summary> + /// Loads characters and other data from the save file. + /// </summary> + public static void GetCharacters() + { + if (File.Exists(Paths.SystemDir + "_hackers.json")) + { + Characters = JsonConvert.DeserializeObject<List<Character>>(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_hackers.json"))); + } + else + { + var c = new Character("BinaryFire", "I may not be good, but it's what I like to do. You don't need to pay me.", 25, 10, 0); + AddCharacter(c); + File.WriteAllText(Paths.SystemDir + "_hackers.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Characters))); + } + if(File.Exists(Paths.SystemDir + "_hacktools.json")) + { + Tools = JsonConvert.DeserializeObject<List<HackTool>>(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_hacktools.json"))); + } + else + { + var c = new HackTool("Destabilizer Attack", 10, "Destabilize ShiftOS by causing it to go beyond what it can do, opening many programs at once, and making it do things it was NEVER intended to do."); + AddTool(c); + File.WriteAllText(Paths.SystemDir + "_hacktools.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Tools))); + + } + if (File.Exists(Paths.SystemDir + "_enemies.json")) + { + EnemyHackers = JsonConvert.DeserializeObject<List<EnemyHacker>>(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_enemies.json"))); + } + else + { + var c = new EnemyHacker("Tutorial", "Enter the Tutorial Sequence.", "", 0, 0, "Easy"); + EnemyHackers.Add(c); + File.WriteAllText(Paths.SystemDir + "enemies.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(EnemyHackers))); + + } + if (File.Exists(Paths.Drivers + "Network.dri")) + { + MyNetwork = JsonConvert.DeserializeObject<List<Module>>(API.Encryption.Decrypt(File.ReadAllText(Paths.Drivers + "Network.dri"))); + } + else + { + var c = new Module(SystemType.Core, 1, "localhost"); + c.HP = 100; //bugfix: core not appearing during battle on new save + c.X = 0; + c.Y = 0; + MyNetwork.Add(c); + File.WriteAllText(Paths.Drivers + "Network.dri", API.Encryption.Encrypt(JsonConvert.SerializeObject(MyNetwork))); + + } + List<Module> coresToRemove = new List<Module>(); + foreach(var m in MyNetwork) + { + if(m.Type == SystemType.Core && m != MyCore) + { + coresToRemove.Add(m); + } + } + foreach(var m in coresToRemove) + { + MyNetwork.Remove(m); + } + RepairTimer = new Timer(); + RepairTimer.Interval = 2000; + var r = new Random(); + RepairTimer.Tick += (object s, EventArgs a) => + { + var repairable = new List<Module>(); + foreach(var mod in MyNetwork) + { + if(mod.HP < mod.GetTotalHP()) + { + repairable.Add(mod); + } + } + int index = r.Next(0, repairable.Count); + try + { + int increase = 1; + foreach(var mod in MyNetwork) + { + if(mod.Type == SystemType.RepairModule) + { + increase += mod.HP / 4; + } + } + + var m = repairable[index]; + while(m.HP + increase > m.GetTotalHP()) + { + increase -= 1; + } + if(m.HP < m.GetTotalHP()) + { + m.HP += increase; + } + } + catch + { + + } + }; + RepairTimer.Start(); + } + + /// <summary> + /// Saves characters and other data to the save file. + /// </summary> + public static void SaveCharacters() + { + if (MyNetwork == null) + { + MyNetwork = new List<Module>(); + var c = new Module(SystemType.Core, 1, "localhost"); + c.HP = 100; //bugfix: core not appearing during battle on new save + c.X = 0; + c.Y = 0; + MyNetwork.Add(c); + } + File.WriteAllText(Paths.SystemDir + "_hackers.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Characters))); + File.WriteAllText(Paths.SystemDir + "_hacktools.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Tools))); + File.WriteAllText(Paths.Drivers + "Network.dri", API.Encryption.Encrypt(JsonConvert.SerializeObject(MyNetwork))); + File.WriteAllText(Paths.SystemDir + "_enemies.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(EnemyHackers))); + + } + + /// <summary> + /// Tells user about the 'help hacking' command. + /// </summary> + public static void StartTutorial() + { + API.CreateInfoboxSession("Upgrade Category Not Available", "This upgrade category requires more capability from the OS, and is locked. You can type 'help hacking' in the Terminal for more info.", infobox.InfoboxMode.Info); + } + } + + public class Character + { + /// <summary> + /// Creates a new hirable character. + /// </summary> + /// <param name="name">The name of the character.</param> + /// <param name="bio">The bio of the character.</param> + /// <param name="skill">Starting skill level.</param> + /// <param name="speed">Starting speed level.</param> + /// <param name="cost">Amount of Codepoints required to hire the hacker.</param> + public Character(string name, string bio, int skill, int speed, int cost) + { + Name = name; + Skill = skill; + Speed = speed; + Cost = cost; + Bio = bio; + } + + public string Name { get; set; } + public int Speed { get; set; } + public int Skill { get; set; } + public int Cost { get; set; } + public string Bio { get; set; } + } + + public class HackTool + { + /// <summary> + /// Creates a new hacking tool. + /// </summary> + /// <param name="name">Tool name.</param> + /// <param name="effectiveness">Effectiveness level.</param> + /// <param name="description">Tool description.</param> + public HackTool(string name, int effectiveness, string description) + { + Name = name; + Effectiveness = effectiveness; + Description = description; + } + + public string Name { get; set; } + public int Effectiveness { get; set; } + public string Description { get; set; } + } + + /// <summary> + /// Enum representing a type of hack. + /// </summary> + public enum Hack + { + PriceDrop, + PayoutIncrease, + } + + public class Module + { + /// <summary> + /// Creates a new module. + /// </summary> + /// <param name="t">Type of module.</param> + /// <param name="grade">Starting grade level.</param> + /// <param name="hname">Hostname.</param> + public Module(SystemType t, int grade, string hname) + { + Hostname = hname; + Type = t; + Grade = grade; + } + + public string Hostname { get; set; } + public ModuleType ModuleType { get; set; } + public SystemType Type { get; set; } + public int HP { get; set; } + public int Grade { get; set; } + /// <summary> + /// X position on the virtual network. + /// </summary> + public int X { get; set; } + /// <summary> + /// Y position on the virtual network. + /// </summary> + public int Y { get; set; } + + /// <summary> + /// Deploys the module to a Computer control that can actually do things. + /// </summary> + /// <returns>The new computer.</returns> + public Computer Deploy() + { + var c = new Computer(); + c.TotalHP = GetTotalHP(); //for proper status display + c.Hostname = Hostname; + c.Type = Type; + c.HP = HP; + c.Visible = true; + c.Grade = Grade; + if(X != 0 && Y != 0) + { + c.Location = new Point(X, Y); + } + return c; + } + + public int GetTotalHP() + { + switch (Type) + { + case SystemType.Core: + return 100; + default: + switch (Grade) + { + case 1: + return 10; + case 2: + return 20; + case 3: + return 40; + case 4: + return 80; + default: + return 10; + + } + } + } + } + + /// <summary> + /// Unused... + /// </summary> + public enum ModuleType + { + Offensive, + Defensive + } + + public class EnemyHacker + { + /// <summary> + /// An enemy network. + /// </summary> + /// <param name="name">Leader or network name.</param> + /// <param name="description">Network Description</param> + /// <param name="fdesc">If the leader becomes a friend, what will his bio be?</param> + /// <param name="fskill">If the leader becomes a friend, what will his skill be?</param> + /// <param name="fspeed">If the leader becomes a friend, what will his speed be?</param> + /// <param name="difficulty">Arbitrary value that means absolutely nothing.</param> + public EnemyHacker(string name, string description, string fdesc, int fskill, int fspeed, string difficulty) + { + Name = name; + Description = description; + FriendDesc = fdesc; + FriendSkill = fskill; + FriendSpeed = fspeed; + Difficulty = difficulty; + Network = new List<Module>(); + var m = new Module(SystemType.Core, 1, name.ToLower().Replace(" ", "_")); + m.X = 0; + m.Y = 0; + Network.Add(m); //Hacker will always have a core system. + } + + public bool IsLeader = false; + public string Name { get; set; } + public string FriendDesc { get; set; } + public string Description { get; set; } + public int FriendSpeed { get; set; } + public int FriendSkill { get; set; } + public string Difficulty { get; set; } + public List<Module> Network { get; set; } + + /// <summary> + /// Add a new module to this hacker's network. + /// </summary> + /// <param name="m">The module to add.</param> + public void AddModule(Module m) + { + Network.Add(m); + } + + /// <summary> + /// Befriends the leader. + /// </summary> + /// <param name="cost">How much will it cost to hire him?</param> + public void Befriend(int cost) + { + var c = new Character(Name, FriendDesc, FriendSpeed, FriendSkill, cost); + Hacking.AddCharacter(c); + Hacking.SaveCharacters(); + } + + + } + + public class FutureModule + { + /// <summary> + /// A purchasable module. + /// </summary> + /// <param name="name">Module name.</param> + /// <param name="cost">Cost in Codepoints</param> + /// <param name="description">Module description</param> + /// <param name="type">Module type.</param> + public FutureModule(string name, int cost, string description, SystemType type) + { + Name = name; + Description = description; + Type = type; + Cost = cost; + } + + public string Name { get; set; } + public int Cost { get; set; } + public string Description { get; set; } + public SystemType Type { get; set; } + } +} diff --git a/source/WindowsFormsApplication1/Gameplay/HijackScreen.Designer.cs b/source/WindowsFormsApplication1/Gameplay/HijackScreen.Designer.cs new file mode 100644 index 0000000..12e30ab --- /dev/null +++ b/source/WindowsFormsApplication1/Gameplay/HijackScreen.Designer.cs @@ -0,0 +1,116 @@ +using System; + +namespace ShiftOS +{ + partial class HijackScreen + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.lblHijack = new System.Windows.Forms.Label(); + this.conversationtimer = new System.Windows.Forms.Timer(this.components); + this.textgen = new System.Windows.Forms.Timer(this.components); + this.lblhackwords = new System.Windows.Forms.Label(); + this.hackeffecttimer = new System.Windows.Forms.Timer(this.components); + this.BackgroundWorker1 = new System.ComponentModel.BackgroundWorker(); + this.btnskip = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // lblHijack + // + this.lblHijack.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblHijack.AutoSize = true; + this.lblHijack.BackColor = System.Drawing.Color.WhiteSmoke; + this.lblHijack.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblHijack.ForeColor = System.Drawing.Color.DimGray; + this.lblHijack.Location = new System.Drawing.Point(143, 193); + this.lblHijack.Name = "lblHijack"; + this.lblHijack.Size = new System.Drawing.Size(18, 25); + this.lblHijack.TabIndex = 0; + this.lblHijack.Text = "\\"; + // + // textgen + // + this.textgen.Interval = 20; + // + // lblhackwords + // + this.lblhackwords.AutoSize = true; + this.lblhackwords.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblhackwords.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblhackwords.ForeColor = System.Drawing.SystemColors.ButtonFace; + this.lblhackwords.Location = new System.Drawing.Point(0, 0); + this.lblhackwords.Name = "lblhackwords"; + this.lblhackwords.Size = new System.Drawing.Size(127, 18); + this.lblhackwords.TabIndex = 1; + this.lblhackwords.Text = "Hijack in progress"; + // + // hackeffecttimer + // + this.hackeffecttimer.Interval = 50; + // + // btnskip + // + this.btnskip.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnskip.ForeColor = System.Drawing.Color.White; + this.btnskip.Location = new System.Drawing.Point(566, 422); + this.btnskip.Name = "btnskip"; + this.btnskip.Size = new System.Drawing.Size(75, 23); + this.btnskip.TabIndex = 2; + this.btnskip.Text = "Skip"; + this.btnskip.UseVisualStyleBackColor = true; + this.btnskip.Visible = false; + this.btnskip.Click += new System.EventHandler(this.btnskip_Click); + // + // HijackScreen + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Silver; + this.ClientSize = new System.Drawing.Size(653, 457); + this.Controls.Add(this.btnskip); + this.Controls.Add(this.lblhackwords); + this.Controls.Add(this.lblHijack); + this.Name = "HijackScreen"; + this.Text = "ShiftOS"; + this.TransparencyKey = System.Drawing.Color.White; + this.Load += new System.EventHandler(this.HijackScreen_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + internal System.Windows.Forms.Label lblHijack; + internal System.Windows.Forms.Timer conversationtimer; + internal System.Windows.Forms.Timer textgen; + internal System.Windows.Forms.Label lblhackwords; + internal System.Windows.Forms.Timer hackeffecttimer; + internal System.ComponentModel.BackgroundWorker BackgroundWorker1; + #endregion + + private System.Windows.Forms.Button btnskip; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Gameplay/HijackScreen.cs b/source/WindowsFormsApplication1/Gameplay/HijackScreen.cs new file mode 100644 index 0000000..e234514 --- /dev/null +++ b/source/WindowsFormsApplication1/Gameplay/HijackScreen.cs @@ -0,0 +1,723 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class HijackScreen : Form + { + public HijackScreen() + { + InitializeComponent(); + } + + + string rtext; + string gtexttotype; + int charcount; + int currentletter; + int slashcount; + int conversationcount = 0; + Label textgeninput; + bool needtoclose = false; + public bool upgraded = false; + FileStream fs; + int hackeffect; + int percentcount; + + // ERROR: Handles clauses are not supported in C# + private void HijackScreen_Load(object sender, EventArgs e) + { + hackeffecttimer.Tick += new EventHandler(hackeffecttimer_Tick); + conversationtimer.Tick += new EventHandler(conversationtimer_Tick); + textgen.Tick += new EventHandler(textgen_Tick); + + this.FormBorderStyle = FormBorderStyle.None; + this.WindowState = FormWindowState.Maximized; + BackgroundWorker1.RunWorkerAsync(); + conversationtimer.Start(); + hackeffecttimer.Start(); + } + + private void TextType(string texttotype) + { + conversationtimer.Stop(); + charcount = texttotype.Length; + gtexttotype = texttotype; + currentletter = 0; + slashcount = 1; + textgen.Start(); + } + + + // ERROR: Handles clauses are not supported in C# + private void textgen_Tick(object sender, EventArgs e) + { + switch (slashcount) + { + case 1: + if (currentletter < gtexttotype.Length) + { + textgeninput.Text = rtext + "\\"; + } + + break; + case 2: + if (currentletter < gtexttotype.Length) + { + textgeninput.Text = rtext + "|"; + } + + break; + case 3: + if (currentletter < gtexttotype.Length) + { + textgeninput.Text = rtext + "/"; + } + + break; + case 4: + if (currentletter < gtexttotype.Length) + { + rtext = rtext + gtexttotype.Substring(currentletter, 1); + currentletter = currentletter + 1; + textgeninput.Text = rtext; + API.PlaySound(Properties.Resources.typesound); + } + break; + } + + slashcount = slashcount + 1; + + if (slashcount == 5) + slashcount = 1; + if (currentletter == gtexttotype.Length) + { + gtexttotype = ""; + conversationtimer.Start(); + textgen.Stop(); + } + + + } + + // ERROR: Handles clauses are not supported in C# + private void conversationtimer_Tick(object sender, EventArgs e) + { + switch (conversationcount) + { + case 0: + if (needtoclose == true) + this.Close(); + break; + case 1: + + textgeninput = lblHijack; + TextType("Your computer is now being Hijacked"); + conversationtimer.Interval = 1000; + + break; + case 3: + textgeninput = lblhackwords; + textgen.Interval = 10; + rtext = ""; + btnskip.Show(); + TextType("Congratulations, you have been involuntarily selected to be an Alpha Tester for ShiftOS." + Environment.NewLine + Environment.NewLine); + break; + case 4: + TextType("At this current point in time I do not wish to reveal my identity or future intentions." + Environment.NewLine + Environment.NewLine); + break; + case 5: + TextType("I just need to use you and your computer as an external test bed to evolve my experimental operating system." + Environment.NewLine + Environment.NewLine); + break; + case 6: + TextType("Right now ShiftOS is practically non-existent but I’ll work on coding it remotely as you use it." + Environment.NewLine + Environment.NewLine); + break; + case 7: + TextType("Your hard drive will now be formatted in preparation for the installation of ShiftOS" + Environment.NewLine + Environment.NewLine); + break; + case 8: + TextType("Starting Format."); + conversationtimer.Interval = 500; + break; + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + TextType("."); + break; + case 19: + rtext = ""; + break; + case 20: + TextType("Scanning System Drive..."); + break; + case 21: + TextType(Environment.NewLine + Environment.NewLine + "Current OS: " + OSInfo.GetPlatformID().Replace("microsoft", "Windows")); + break; + case 22: + if(OSInfo.GetPlatformID() == "microsoft") + { + var dinf = new DriveInfo(Environment.GetFolderPath(Environment.SpecialFolder.Windows).Substring(0, 3)); + TextType(Environment.NewLine + $"Mountpoint and File System: {dinf.Name} ({dinf.DriveFormat})"); + } + break; + case 23: + if (OSInfo.GetPlatformID() == "microsoft") + { + var dinf = new DriveInfo(Environment.GetFolderPath(Environment.SpecialFolder.Windows).Substring(0, 3)); + TextType(Environment.NewLine + $"Size: {dinf.TotalFreeSpace} free, {dinf.TotalSize} total"); + } + break; + case 24: + TextType(Environment.NewLine + "New File System: ShiftFS"); + break; + case 25: + TextType(Environment.NewLine + Environment.NewLine + "Formatting system drive - "); + conversationtimer.Interval = 100; + break; + case 26: + case 28: + case 30: + case 32: + case 36: + case 38: + case 40: + case 42: + case 44: + case 46: + case 48: + case 50: + case 52: + case 54: + case 56: + case 58: + case 60: + case 62: + case 64: + case 66: + case 68: + case 70: + case 72: + case 74: + case 76: + case 78: + case 80: + case 82: + case 84: + case 86: + case 88: + case 90: + case 92: + case 94: + case 96: + case 98: + case 100: + case 102: + case 104: + case 106: + case 108: + case 110: + case 112: + case 114: + case 116: + case 118: + case 120: + case 122: + case 124: + case 126: + textgeninput.Text = rtext + percentcount + "%"; + if (percentcount < 101) + { + percentcount += 2; + API.PlaySound(Properties.Resources.writesound); + } + break; + case 127: + rtext = rtext + "100%"; + conversationtimer.Interval = 1000; + break; + case 128: + TextType(Environment.NewLine + "Format Complete"); + break; + case 129: + rtext = ""; + percentcount = 0; + TextType("Installing ShiftOS Alpha 0.0.1 - "); + conversationtimer.Interval = 200; + break; + case 130: + case 131: + case 132: + case 133: + case 134: + case 135: + case 136: + case 137: + case 138: + case 139: + case 140: + case 141: + case 142: + case 143: + case 144: + case 145: + case 146: + case 147: + case 148: + case 149: + case 150: + case 151: + case 152: + case 153: + case 154: + case 155: + case 156: + case 157: + case 158: + case 159: + case 160: + case 161: + case 162: + case 163: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 170: + case 171: + case 172: + case 173: + case 174: + case 175: + case 176: + case 177: + case 178: + case 179: + case 180: + case 181: + case 182: + case 183: + case 184: + case 185: + case 186: + case 187: + case 188: + case 189: + case 190: + case 191: + case 192: + case 193: + case 194: + case 195: + case 196: + case 197: + case 198: + case 199: + case 200: + case 201: + case 202: + case 203: + case 204: + case 205: + case 206: + case 207: + case 208: + case 209: + case 210: + case 211: + case 212: + case 213: + case 214: + case 215: + case 216: + case 217: + case 218: + case 219: + case 220: + case 221: + case 222: + case 223: + case 224: + case 225: + case 226: + case 227: + case 228: + case 229: + case 230: + + textgeninput.Text = rtext + percentcount + "%" + Environment.NewLine + Environment.NewLine; + if (percentcount < 101) + { + percentcount = percentcount + 1; + API.PlaySound(Properties.Resources.writesound); + } + switch (percentcount) + { + case 1: + case 2: + textgeninput.Text = textgeninput.Text + "/Home"; + if ((!System.IO.Directory.Exists(Paths.Home))) + System.IO.Directory.CreateDirectory(Paths.Home); + break; + case 3: + case 4: + textgeninput.Text = textgeninput.Text + "/Home/Documents"; + if ((!System.IO.Directory.Exists(Paths.Documents))) + System.IO.Directory.CreateDirectory(Paths.Documents); + break; + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + textgeninput.Text = textgeninput.Text + "/Home/Music"; + if ((!System.IO.Directory.Exists(Paths.Music))) + System.IO.Directory.CreateDirectory(Paths.Music); + break; + case 13: + case 14: + case 15: + textgeninput.Text = textgeninput.Text + "/Home/Pictures"; + if ((!System.IO.Directory.Exists(Paths.Pictures))) + System.IO.Directory.CreateDirectory(Paths.Pictures); + break; + case 16: + case 17: + case 18: + textgeninput.Text = textgeninput.Text + "/Shiftum42"; + if ((!System.IO.Directory.Exists(Paths.SystemDir))) + System.IO.Directory.CreateDirectory(Paths.SystemDir); + break; + case 19: + case 20: + textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers"; + if ((!System.IO.Directory.Exists(Paths.Drivers))) + System.IO.Directory.CreateDirectory(Paths.Drivers); + break; + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/HDD.dri"; + break; + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/Keyboard.dri"; + fs = File.Create(Paths.Drivers + "Keyboard.dri"); + fs.Close(); + break; + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/Monitor.dri"; + fs = File.Create(Paths.Drivers + "Monitor.dri"); + fs.Close(); + break; + case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/Mouse.dri"; + fs = File.Create(Paths.Drivers + "Mouse.dri"); + fs.Close(); + break; + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/Printer.dri"; + fs = File.Create(Paths.Drivers + "Printer.dri"); + fs.Close(); + break; + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + textgeninput.Text = textgeninput.Text + "/Shiftum42/Languages/"; + if ((!System.IO.Directory.Exists(Paths.SystemDir + "Languages"))) + System.IO.Directory.CreateDirectory(Paths.SystemDir + "Languages"); + break; + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + textgeninput.Text = textgeninput.Text + "/Shiftum42/Languages/Current.lang"; + fs = File.Create(Paths.SystemDir + "Languages/Current.lang"); + fs.Close(); + break; + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + textgeninput.Text = textgeninput.Text + "/Shiftum42/HDAccess.sft"; + break; + case 85: + case 86: + case 87: + case 88: + case 89: + textgeninput.Text = textgeninput.Text + "/Shiftum42/ShiftGUI.sft"; + fs = File.Create(Paths.SystemDir + "ShiftGUI.sft"); + fs.Close(); + break; + case 90: + case 91: + case 92: + case 93: + textgeninput.Text = textgeninput.Text + "/Shiftum42/SKernal.sft"; + fs = File.Create(Paths.SystemDir + "SKernal.sft"); + fs.Close(); + break; + case 94: + case 95: + case 96: + case 97: + textgeninput.Text = textgeninput.Text + "/Shiftum42/SRead.sft"; + fs = File.Create(Paths.SystemDir + "SRead.sft"); + fs.Close(); + break; + case 98: + case 99: + case 100: + case 101: + textgeninput.Text = textgeninput.Text + "/Shiftum42/SWrite.sft"; + fs = File.Create(Paths.SystemDir + "SWrite.sft"); + fs.Close(); + break; + } + + break; + + case 231: + textgeninput.Text = rtext + "100%" + Environment.NewLine + Environment.NewLine + "/Shiftum42/SWrite.sft"; + conversationtimer.Interval = 1000; + API.PlaySound(Properties.Resources.writesound); + break; + case 232: + textgeninput.Text = rtext + "100%" + Environment.NewLine + Environment.NewLine + "ShiftOS Installation Complete!"; + API.PlaySound(Properties.Resources.typesound); + if ((!System.IO.Directory.Exists(Paths.SoftwareData))) + System.IO.Directory.CreateDirectory(Paths.SoftwareData); + if ((!System.IO.Directory.Exists(Paths.KnowledgeInput))) + System.IO.Directory.CreateDirectory(Paths.KnowledgeInput); + break; + case 234: + SaveSystem.Utilities.LoadedSave.newgame = false; + API.CurrentSession.Opacity = 100; + Terminal term = new Terminal(); + term.Show(); + term.tmrfirstrun.Start(); + this.Close(); + + break; + } + conversationcount = conversationcount + 1; + } + + // ERROR: Handles clauses are not supported in C# + private void hackeffecttimer_Tick(object sender, EventArgs e) + { + if (hackeffect < 101) + { + switch (hackeffect) + { + case 1: + case 3: + case 5: + case 7: + case 9: + case 11: + case 13: + case 15: + case 17: + case 19: + case 21: + case 23: + case 25: + case 27: + case 29: + case 31: + case 33: + case 35: + case 37: + case 39: + case 41: + case 43: + case 45: + case 47: + case 49: + case 51: + case 53: + case 55: + case 57: + case 59: + case 61: + case 63: + case 65: + case 67: + case 69: + case 71: + case 73: + case 75: + case 77: + case 79: + case 81: + case 83: + case 85: + case 87: + case 89: + case 91: + case 93: + case 95: + this.BackColor = Color.Magenta; + this.TransparencyKey = Color.Magenta; + API.PlaySound(Properties.Resources.writesound); + this.TopMost = true; + break; + case 2: + case 4: + case 6: + case 8: + case 10: + case 12: + case 14: + case 16: + case 18: + case 20: + case 22: + case 24: + case 26: + case 28: + this.BackColor = Color.Magenta; + API.PlaySound(Properties.Resources.typesound); + break; + case 30: + case 32: + case 34: + case 36: + case 38: + case 40: + case 42: + case 44: + case 46: + case 48: + case 50: + this.BackColor = Color.Magenta; + API.PlaySound(Properties.Resources.typesound); + break; + case 52: + case 54: + case 56: + case 58: + case 60: + case 62: + case 64: + case 66: + case 68: + case 70: + case 72: + case 74: + case 76: + this.BackColor = Color.Magenta; + API.PlaySound(Properties.Resources.typesound); + + break; + case 78: + case 80: + case 82: + case 84: + case 86: + case 88: + case 90: + case 92: + case 94: + this.BackColor = Color.DimGray; + API.PlaySound(Properties.Resources.typesound); + + break; + case 96: + lblHijack.BackColor = Color.LightGray; + break; + case 97: + lblHijack.BackColor = Color.DarkGray; + break; + case 98: + lblHijack.BackColor = Color.DimGray; + break; + case 99: + this.BackColor = Color.Black; + lblHijack.BackColor = Color.Black; + lblHijack.ForeColor = Color.DimGray; + break; + case 100: + lblHijack.Hide(); + break; + } + } + else { + hackeffecttimer.Stop(); + } + hackeffect = hackeffect + 1; + } + + private void btnskip_Click(object sender, EventArgs e) + { + conversationcount = 19; + btnskip.Hide(); + } + } +} diff --git a/source/WindowsFormsApplication1/Gameplay/HijackScreen.resx b/source/WindowsFormsApplication1/Gameplay/HijackScreen.resx new file mode 100644 index 0000000..89116b6 --- /dev/null +++ b/source/WindowsFormsApplication1/Gameplay/HijackScreen.resx @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="conversationtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="textgen.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>167, 17</value> + </metadata> + <metadata name="hackeffecttimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>260, 17</value> + </metadata> + <metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>396, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Graphic_Picker.Designer.cs b/source/WindowsFormsApplication1/Graphic_Picker.Designer.cs deleted file mode 100644 index 5cc62ea..0000000 --- a/source/WindowsFormsApplication1/Graphic_Picker.Designer.cs +++ /dev/null @@ -1,400 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class Graphic_Picker - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.pgcontents = new System.Windows.Forms.Panel(); - this.btncancel = new System.Windows.Forms.Button(); - this.btnreset = new System.Windows.Forms.Button(); - this.btnapply = new System.Windows.Forms.Button(); - this.Label4 = new System.Windows.Forms.Label(); - this.btnmousedownbrowse = new System.Windows.Forms.Button(); - this.txtmousedownfile = new System.Windows.Forms.TextBox(); - this.picmousedown = new System.Windows.Forms.PictureBox(); - this.Label3 = new System.Windows.Forms.Label(); - this.btnmouseoverbrowse = new System.Windows.Forms.Button(); - this.txtmouseoverfile = new System.Windows.Forms.TextBox(); - this.picmouseover = new System.Windows.Forms.PictureBox(); - this.Label2 = new System.Windows.Forms.Label(); - this.Label1 = new System.Windows.Forms.Label(); - this.btnidlebrowse = new System.Windows.Forms.Button(); - this.txtidlefile = new System.Windows.Forms.TextBox(); - this.picidle = new System.Windows.Forms.PictureBox(); - this.btnzoom = new System.Windows.Forms.Button(); - this.btnstretch = new System.Windows.Forms.Button(); - this.btncentre = new System.Windows.Forms.Button(); - this.btntile = new System.Windows.Forms.Button(); - this.pnlgraphicholder = new System.Windows.Forms.Panel(); - this.picgraphic = new System.Windows.Forms.PictureBox(); - this.lblobjecttoskin = new System.Windows.Forms.Label(); - this.OpenFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.pgcontents.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picmousedown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.picmouseover)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.picidle)).BeginInit(); - this.pnlgraphicholder.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picgraphic)).BeginInit(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.btncancel); - this.pgcontents.Controls.Add(this.btnreset); - this.pgcontents.Controls.Add(this.btnapply); - this.pgcontents.Controls.Add(this.Label4); - this.pgcontents.Controls.Add(this.btnmousedownbrowse); - this.pgcontents.Controls.Add(this.txtmousedownfile); - this.pgcontents.Controls.Add(this.picmousedown); - this.pgcontents.Controls.Add(this.Label3); - this.pgcontents.Controls.Add(this.btnmouseoverbrowse); - this.pgcontents.Controls.Add(this.txtmouseoverfile); - this.pgcontents.Controls.Add(this.picmouseover); - this.pgcontents.Controls.Add(this.Label2); - this.pgcontents.Controls.Add(this.Label1); - this.pgcontents.Controls.Add(this.btnidlebrowse); - this.pgcontents.Controls.Add(this.txtidlefile); - this.pgcontents.Controls.Add(this.picidle); - this.pgcontents.Controls.Add(this.btnzoom); - this.pgcontents.Controls.Add(this.btnstretch); - this.pgcontents.Controls.Add(this.btncentre); - this.pgcontents.Controls.Add(this.btntile); - this.pgcontents.Controls.Add(this.pnlgraphicholder); - this.pgcontents.Controls.Add(this.lblobjecttoskin); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(390, 594); - this.pgcontents.TabIndex = 20; - // - // btncancel - // - this.btncancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.btncancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncancel.Location = new System.Drawing.Point(21, 546); - this.btncancel.Name = "btncancel"; - this.btncancel.Size = new System.Drawing.Size(109, 32); - this.btncancel.TabIndex = 23; - this.btncancel.Text = "Cancel"; - this.btncancel.UseVisualStyleBackColor = true; - this.btncancel.Click += new System.EventHandler(this.btncancel_Click); - // - // btnreset - // - this.btnreset.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.btnreset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnreset.Location = new System.Drawing.Point(136, 546); - this.btnreset.Name = "btnreset"; - this.btnreset.Size = new System.Drawing.Size(109, 32); - this.btnreset.TabIndex = 22; - this.btnreset.Text = "Reset"; - this.btnreset.UseVisualStyleBackColor = true; - this.btnreset.Click += new System.EventHandler(this.btnreset_Click); - // - // btnapply - // - this.btnapply.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnapply.Location = new System.Drawing.Point(251, 546); - this.btnapply.Name = "btnapply"; - this.btnapply.Size = new System.Drawing.Size(118, 32); - this.btnapply.TabIndex = 21; - this.btnapply.Text = "Apply"; - this.btnapply.UseVisualStyleBackColor = true; - this.btnapply.Click += new System.EventHandler(this.btnapply_Click); - // - // Label4 - // - this.Label4.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label4.Location = new System.Drawing.Point(125, 411); - this.Label4.Name = "Label4"; - this.Label4.Size = new System.Drawing.Size(163, 28); - this.Label4.TabIndex = 20; - this.Label4.Text = "Mouse Down"; - this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnmousedownbrowse - // - this.btnmousedownbrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnmousedownbrowse.Location = new System.Drawing.Point(295, 411); - this.btnmousedownbrowse.Name = "btnmousedownbrowse"; - this.btnmousedownbrowse.Size = new System.Drawing.Size(73, 60); - this.btnmousedownbrowse.TabIndex = 19; - this.btnmousedownbrowse.Text = "Browse"; - this.btnmousedownbrowse.UseVisualStyleBackColor = true; - this.btnmousedownbrowse.Click += new System.EventHandler(this.btnmousedownbrowse_Click); - // - // txtmousedownfile - // - this.txtmousedownfile.BackColor = System.Drawing.Color.White; - this.txtmousedownfile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtmousedownfile.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); - this.txtmousedownfile.Location = new System.Drawing.Point(125, 442); - this.txtmousedownfile.Multiline = true; - this.txtmousedownfile.Name = "txtmousedownfile"; - this.txtmousedownfile.Size = new System.Drawing.Size(163, 29); - this.txtmousedownfile.TabIndex = 18; - this.txtmousedownfile.Text = "None"; - this.txtmousedownfile.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // picmousedown - // - this.picmousedown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.picmousedown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.picmousedown.Location = new System.Drawing.Point(19, 411); - this.picmousedown.Name = "picmousedown"; - this.picmousedown.Size = new System.Drawing.Size(100, 60); - this.picmousedown.TabIndex = 17; - this.picmousedown.TabStop = false; - // - // Label3 - // - this.Label3.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label3.Location = new System.Drawing.Point(125, 336); - this.Label3.Name = "Label3"; - this.Label3.Size = new System.Drawing.Size(163, 28); - this.Label3.TabIndex = 16; - this.Label3.Text = "Mouse Over"; - this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnmouseoverbrowse - // - this.btnmouseoverbrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnmouseoverbrowse.Location = new System.Drawing.Point(295, 336); - this.btnmouseoverbrowse.Name = "btnmouseoverbrowse"; - this.btnmouseoverbrowse.Size = new System.Drawing.Size(73, 60); - this.btnmouseoverbrowse.TabIndex = 15; - this.btnmouseoverbrowse.Text = "Browse"; - this.btnmouseoverbrowse.UseVisualStyleBackColor = true; - this.btnmouseoverbrowse.Click += new System.EventHandler(this.btnmouseoverbrowse_Click); - // - // txtmouseoverfile - // - this.txtmouseoverfile.BackColor = System.Drawing.Color.White; - this.txtmouseoverfile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtmouseoverfile.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); - this.txtmouseoverfile.Location = new System.Drawing.Point(125, 367); - this.txtmouseoverfile.Multiline = true; - this.txtmouseoverfile.Name = "txtmouseoverfile"; - this.txtmouseoverfile.Size = new System.Drawing.Size(163, 29); - this.txtmouseoverfile.TabIndex = 14; - this.txtmouseoverfile.Text = "None"; - this.txtmouseoverfile.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // picmouseover - // - this.picmouseover.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.picmouseover.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.picmouseover.Location = new System.Drawing.Point(19, 336); - this.picmouseover.Name = "picmouseover"; - this.picmouseover.Size = new System.Drawing.Size(100, 60); - this.picmouseover.TabIndex = 13; - this.picmouseover.TabStop = false; - // - // Label2 - // - this.Label2.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label2.Location = new System.Drawing.Point(125, 260); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(163, 28); - this.Label2.TabIndex = 12; - this.Label2.Text = "Idle"; - this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.Font = new System.Drawing.Font("Bookman Old Style", 14.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.Location = new System.Drawing.Point(17, 228); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(70, 23); - this.Label1.TabIndex = 11; - this.Label1.Text = "States"; - // - // btnidlebrowse - // - this.btnidlebrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnidlebrowse.Location = new System.Drawing.Point(295, 260); - this.btnidlebrowse.Name = "btnidlebrowse"; - this.btnidlebrowse.Size = new System.Drawing.Size(73, 60); - this.btnidlebrowse.TabIndex = 10; - this.btnidlebrowse.Text = "Browse"; - this.btnidlebrowse.UseVisualStyleBackColor = true; - this.btnidlebrowse.Click += new System.EventHandler(this.btnidlebrowse_Click); - // - // txtidlefile - // - this.txtidlefile.BackColor = System.Drawing.Color.White; - this.txtidlefile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtidlefile.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtidlefile.Location = new System.Drawing.Point(125, 291); - this.txtidlefile.Multiline = true; - this.txtidlefile.Name = "txtidlefile"; - this.txtidlefile.Size = new System.Drawing.Size(163, 29); - this.txtidlefile.TabIndex = 9; - this.txtidlefile.Text = "None"; - this.txtidlefile.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // picidle - // - this.picidle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.picidle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.picidle.Location = new System.Drawing.Point(19, 260); - this.picidle.Name = "picidle"; - this.picidle.Size = new System.Drawing.Size(100, 60); - this.picidle.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.picidle.TabIndex = 8; - this.picidle.TabStop = false; - // - // btnzoom - // - this.btnzoom.BackgroundImage = global::ShiftOS.Properties.Resources.zoombutton; - this.btnzoom.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btnzoom.FlatAppearance.BorderSize = 0; - this.btnzoom.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnzoom.Location = new System.Drawing.Point(286, 144); - this.btnzoom.Name = "btnzoom"; - this.btnzoom.Size = new System.Drawing.Size(82, 65); - this.btnzoom.TabIndex = 7; - this.btnzoom.UseVisualStyleBackColor = true; - this.btnzoom.Click += new System.EventHandler(this.btnzoom_Click); - // - // btnstretch - // - this.btnstretch.BackgroundImage = global::ShiftOS.Properties.Resources.stretchbutton; - this.btnstretch.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btnstretch.FlatAppearance.BorderSize = 0; - this.btnstretch.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnstretch.Location = new System.Drawing.Point(197, 144); - this.btnstretch.Name = "btnstretch"; - this.btnstretch.Size = new System.Drawing.Size(82, 65); - this.btnstretch.TabIndex = 6; - this.btnstretch.UseVisualStyleBackColor = true; - this.btnstretch.Click += new System.EventHandler(this.btnstretch_Click); - // - // btncentre - // - this.btncentre.BackgroundImage = global::ShiftOS.Properties.Resources.centrebutton; - this.btncentre.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btncentre.FlatAppearance.BorderSize = 0; - this.btncentre.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncentre.Location = new System.Drawing.Point(108, 144); - this.btncentre.Name = "btncentre"; - this.btncentre.Size = new System.Drawing.Size(82, 65); - this.btncentre.TabIndex = 5; - this.btncentre.UseVisualStyleBackColor = true; - this.btncentre.Click += new System.EventHandler(this.btncentre_Click); - // - // btntile - // - this.btntile.BackgroundImage = global::ShiftOS.Properties.Resources.tilebutton; - this.btntile.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btntile.FlatAppearance.BorderSize = 0; - this.btntile.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btntile.Location = new System.Drawing.Point(19, 144); - this.btntile.Name = "btntile"; - this.btntile.Size = new System.Drawing.Size(82, 65); - this.btntile.TabIndex = 4; - this.btntile.UseVisualStyleBackColor = true; - this.btntile.Click += new System.EventHandler(this.btntile_Click); - // - // pnlgraphicholder - // - this.pnlgraphicholder.Controls.Add(this.picgraphic); - this.pnlgraphicholder.Location = new System.Drawing.Point(19, 38); - this.pnlgraphicholder.Name = "pnlgraphicholder"; - this.pnlgraphicholder.Size = new System.Drawing.Size(350, 100); - this.pnlgraphicholder.TabIndex = 3; - // - // picgraphic - // - this.picgraphic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.picgraphic.Location = new System.Drawing.Point(0, 0); - this.picgraphic.Name = "picgraphic"; - this.picgraphic.Size = new System.Drawing.Size(350, 100); - this.picgraphic.TabIndex = 0; - this.picgraphic.TabStop = false; - // - // lblobjecttoskin - // - this.lblobjecttoskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblobjecttoskin.Location = new System.Drawing.Point(19, 9); - this.lblobjecttoskin.Name = "lblobjecttoskin"; - this.lblobjecttoskin.Size = new System.Drawing.Size(350, 23); - this.lblobjecttoskin.TabIndex = 2; - this.lblobjecttoskin.Text = "Close Button"; - this.lblobjecttoskin.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // OpenFileDialog1 - // - this.OpenFileDialog1.FileName = "OpenFileDialog1"; - // - // Graphic_Picker - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(390, 594); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "Graphic_Picker"; - this.Text = "Graphic_Picker"; - this.TopMost = true; - this.Load += new System.EventHandler(this.Graphic_Picker_Load); - this.pgcontents.ResumeLayout(false); - this.pgcontents.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picmousedown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.picmouseover)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.picidle)).EndInit(); - this.pnlgraphicholder.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.picgraphic)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Button btncancel; - internal System.Windows.Forms.Button btnreset; - internal System.Windows.Forms.Button btnapply; - internal System.Windows.Forms.Label Label4; - internal System.Windows.Forms.Button btnmousedownbrowse; - internal System.Windows.Forms.TextBox txtmousedownfile; - internal System.Windows.Forms.PictureBox picmousedown; - internal System.Windows.Forms.Label Label3; - internal System.Windows.Forms.Button btnmouseoverbrowse; - internal System.Windows.Forms.TextBox txtmouseoverfile; - internal System.Windows.Forms.PictureBox picmouseover; - internal System.Windows.Forms.Label Label2; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.Button btnidlebrowse; - internal System.Windows.Forms.TextBox txtidlefile; - internal System.Windows.Forms.PictureBox picidle; - internal System.Windows.Forms.Button btnzoom; - internal System.Windows.Forms.Button btnstretch; - internal System.Windows.Forms.Button btncentre; - internal System.Windows.Forms.Button btntile; - internal System.Windows.Forms.Panel pnlgraphicholder; - internal System.Windows.Forms.PictureBox picgraphic; - internal System.Windows.Forms.Label lblobjecttoskin; - internal System.Windows.Forms.OpenFileDialog OpenFileDialog1; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Graphic_Picker.cs b/source/WindowsFormsApplication1/Graphic_Picker.cs deleted file mode 100644 index 1df302d..0000000 --- a/source/WindowsFormsApplication1/Graphic_Picker.cs +++ /dev/null @@ -1,249 +0,0 @@ -using Svg; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - - public partial class Graphic_Picker : Form - { - /// <summary> - /// Graphic Picker GUI. - /// </summary> - /// <param name="elementName">Name of element.</param> - /// <param name="showMouseImages">Should mouse images be shown?</param> - public Graphic_Picker(string elementName, bool showMouseImages) - { - InitializeComponent(); - ElementName = elementName; - ShowMouseImages = showMouseImages; - } - - private string ElementName = "Close Button"; - public ImageLayout ImageLayout = ImageLayout.Stretch; - public Image IdleImage = null; - public Image MouseOverImage = null; - public Image MouseDownImage = null; - private bool ShowMouseImages = false; - - /// <summary> - /// Sets up the user interface. - /// </summary> - private void SetupGUI() - { - lblobjecttoskin.Text = ElementName; - btnstretch.BackgroundImage = Properties.Resources.stretchbutton; - btntile.BackgroundImage = Properties.Resources.tilebutton; - btncentre.BackgroundImage = Properties.Resources.centrebutton; - btnzoom.BackgroundImage = Properties.Resources.zoombutton; - switch(this.ImageLayout) - { - case ImageLayout.Stretch: - btnstretch.BackgroundImage = Properties.Resources.stretchbuttonpressed; - break; - case ImageLayout.Tile: - btntile.BackgroundImage = Properties.Resources.tilebuttonpressed; - break; - case ImageLayout.Center: - btncentre.BackgroundImage = Properties.Resources.centrebuttonpressed; - break; - default: - btnzoom.BackgroundImage = Properties.Resources.zoombuttonpressed; - break; - } - if(ShowMouseImages == true) - { - txtmousedownfile.Show(); - txtmouseoverfile.Show(); - Label3.Show(); - Label4.Show(); - picmousedown.Show(); - picmouseover.Show(); - btnmousedownbrowse.Show(); - btnmouseoverbrowse.Show(); - this.Height = MOUSE_IMAGES_WINDOW_HEIGHT; - } - else - { - txtmousedownfile.Hide(); - txtmouseoverfile.Hide(); - Label3.Hide(); - Label4.Hide(); - picmousedown.Hide(); - picmouseover.Hide(); - btnmousedownbrowse.Hide(); - btnmouseoverbrowse.Hide(); - this.Height = IDLE_ONLY_WINDOW_HEIGHT; - - } - picidle.BackgroundImage = IdleImage; - picidle.BackgroundImageLayout = this.ImageLayout; - picmousedown.BackgroundImage = MouseDownImage; - picidle.BackgroundImageLayout = this.ImageLayout; - picmouseover.BackgroundImage = MouseOverImage; - picidle.BackgroundImageLayout = this.ImageLayout; - txtidlefile.Text = idle_filename; - txtmousedownfile.Text = mousedown_filename; - txtmouseoverfile.Text = mouseover_filename; - } - - private const int MOUSE_IMAGES_WINDOW_HEIGHT = 570; - private const int IDLE_ONLY_WINDOW_HEIGHT = 382; - private void btntile_Click(object sender, EventArgs e) - { - this.ImageLayout = ImageLayout.Tile; - SetupGUI(); - } - - private void btncentre_Click(object sender, EventArgs e) - { - this.ImageLayout = ImageLayout.Center; - SetupGUI(); - } - - private void btnstretch_Click(object sender, EventArgs e) - { - this.ImageLayout = ImageLayout.Stretch; - SetupGUI(); - } - - private string idle_filename = "None"; - private string mouseover_filename = "None"; - private string mousedown_filename = "None"; - - - private void btnzoom_Click(object sender, EventArgs e) - { - this.ImageLayout = ImageLayout.Zoom; - SetupGUI(); - } - - private void btnmouseoverbrowse_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".pic;.svg;.png;.bmp;.jpg", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetFSResult(); - if(result != "fail") - { - var finf = new FileInfo(result); - if (finf.Extension == ".svg") - { - MouseOverImage = SVGtoPNG(finf.FullName); - } - else { - MouseOverImage = Image.FromFile(result); - } - - mouseover_filename = finf.Name; - MOFullName = finf.FullName; - } - SetupGUI(); - }; - } - - /// <summary> - /// Scalable Vector Graphics parser. - /// </summary> - /// <param name="svg">Path to .svg file.</param> - /// <returns>The new System.Drawing.Image.</returns> - private Image SVGtoPNG(string svg) - { - - - var svgDocument = SvgDocument.Open(svg); - return svgDocument.Draw(); - - } - - private void btnidlebrowse_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".pic;.svg;.png;.bmp;.jpg", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetFSResult(); - if (result != "fail") - { - var finf = new FileInfo(result); - if (finf.Extension == ".svg") - { - IdleImage = SVGtoPNG(finf.FullName); - } - else { - IdleImage = Image.FromFile(result); - } - idle_filename = finf.Name; - IdleFullName = finf.FullName; - } - SetupGUI(); - }; - } - - private void btnmousedownbrowse_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".pic;.svg;.png;.bmp;.jpg", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetFSResult(); - if (result != "fail") - { - var finf = new FileInfo(result); - if (finf.Extension == ".svg") - { - MouseDownImage = SVGtoPNG(finf.FullName); - } - else { - MouseDownImage = Image.FromFile(result); - } - - mousedown_filename = finf.Name; - MDFullName = finf.FullName; - } - SetupGUI(); - }; - } - - public string Result = "Cancelled"; - - private void Graphic_Picker_Load(object sender, EventArgs e) - { - - SetupGUI(); - } - - private void btnreset_Click(object sender, EventArgs e) - { - IdleImage = null; - MouseOverImage = null; - MouseDownImage = null; - idle_filename = "None"; - mouseover_filename = "None"; - mousedown_filename = "None"; - SetupGUI(); - } - - private void btncancel_Click(object sender, EventArgs e) - { - Result = "Cancelled"; - this.Close(); - } - - public string IdleFullName = null; - public string MOFullName = null; - public string MDFullName = null; - - private void btnapply_Click(object sender, EventArgs e) - { - Result = "OK"; - this.Close(); - } - } -} diff --git a/source/WindowsFormsApplication1/Graphic_Picker.resx b/source/WindowsFormsApplication1/Graphic_Picker.resx deleted file mode 100644 index 33c7f67..0000000 --- a/source/WindowsFormsApplication1/Graphic_Picker.resx +++ /dev/null @@ -1,123 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/HackUI.Designer.cs b/source/WindowsFormsApplication1/HackUI.Designer.cs deleted file mode 100644 index 6db5640..0000000 --- a/source/WindowsFormsApplication1/HackUI.Designer.cs +++ /dev/null @@ -1,785 +0,0 @@ -namespace ShiftOS -{ - partial class HackUI - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HackUI)); - this.tbui = new System.Windows.Forms.TableLayoutPanel(); - this.pnlenemy = new System.Windows.Forms.Panel(); - this.lbenemycompromised = new System.Windows.Forms.Label(); - this.lbenemystats = new System.Windows.Forms.Label(); - this.txtyourconsole = new System.Windows.Forms.TextBox(); - this.pnlyou = new System.Windows.Forms.Panel(); - this.lbcompromised = new System.Windows.Forms.Label(); - this.lbstats = new System.Windows.Forms.Label(); - this.txtenemyconsole = new System.Windows.Forms.TextBox(); - this.btnnext = new System.Windows.Forms.Button(); - this.pnlbuy = new System.Windows.Forms.Panel(); - this.txthostname = new System.Windows.Forms.TextBox(); - this.lbhostname = new System.Windows.Forms.Label(); - this.txtgrade = new System.Windows.Forms.TextBox(); - this.lbgrade = new System.Windows.Forms.Label(); - this.lbmoduleinfo = new System.Windows.Forms.Label(); - this.cmbbuyable = new System.Windows.Forms.ComboBox(); - this.label4 = new System.Windows.Forms.Label(); - this.btndonebuying = new System.Windows.Forms.Button(); - this.pnldefensemanager = new System.Windows.Forms.Panel(); - this.btnbuy = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); - this.cmbmodules = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.pnlpcinfo = new System.Windows.Forms.Panel(); - this.lbtargets = new System.Windows.Forms.Label(); - this.btnpoweroff = new System.Windows.Forms.Button(); - this.btnupgrade = new System.Windows.Forms.Button(); - this.lbpcinfo = new System.Windows.Forms.Label(); - this.lbmoduletitle = new System.Windows.Forms.Label(); - this.btncloseinfo = new System.Windows.Forms.Button(); - this.flcontrols = new System.Windows.Forms.FlowLayoutPanel(); - this.btnaddmodule = new System.Windows.Forms.Button(); - this.lbcodepoints = new System.Windows.Forms.Label(); - this.btntogglemusic = new System.Windows.Forms.Button(); - this.lbsong = new System.Windows.Forms.Label(); - this.panel2 = new System.Windows.Forms.Panel(); - this.pgpong = new System.Windows.Forms.Panel(); - this.lblcountdown = new System.Windows.Forms.Label(); - this.ball = new System.Windows.Forms.Panel(); - this.paddleHuman = new System.Windows.Forms.PictureBox(); - this.paddleComputer = new System.Windows.Forms.Panel(); - this.lbllevelandtime = new System.Windows.Forms.Label(); - this.lblstatsY = new System.Windows.Forms.Label(); - this.lblstatsX = new System.Windows.Forms.Label(); - this.pnltutorial = new System.Windows.Forms.Panel(); - this.lbtutorial = new System.Windows.Forms.Label(); - this.tmrplayerhealthdetect = new System.Windows.Forms.Timer(this.components); - this.tmrenemyhealthdetect = new System.Windows.Forms.Timer(this.components); - this.tmrredraw = new System.Windows.Forms.Timer(this.components); - this.tmrvisualizer = new System.Windows.Forms.Timer(this.components); - this.pongGameTimer = new System.Windows.Forms.Timer(this.components); - this.counter = new System.Windows.Forms.Timer(this.components); - this.tmrcountdown = new System.Windows.Forms.Timer(this.components); - this.tbui.SuspendLayout(); - this.pnlenemy.SuspendLayout(); - this.pnlyou.SuspendLayout(); - this.pnlbuy.SuspendLayout(); - this.pnldefensemanager.SuspendLayout(); - this.pnlpcinfo.SuspendLayout(); - this.flcontrols.SuspendLayout(); - this.panel2.SuspendLayout(); - this.pgpong.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).BeginInit(); - this.pnltutorial.SuspendLayout(); - this.SuspendLayout(); - // - // tbui - // - this.tbui.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; - this.tbui.ColumnCount = 2; - this.tbui.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tbui.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tbui.Controls.Add(this.pnlenemy, 1, 1); - this.tbui.Controls.Add(this.txtyourconsole, 0, 1); - this.tbui.Controls.Add(this.pnlyou, 0, 0); - this.tbui.Controls.Add(this.txtenemyconsole, 1, 0); - this.tbui.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbui.Location = new System.Drawing.Point(0, 0); - this.tbui.Name = "tbui"; - this.tbui.RowCount = 2; - this.tbui.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tbui.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tbui.Size = new System.Drawing.Size(1339, 710); - this.tbui.TabIndex = 0; - // - // pnlenemy - // - this.pnlenemy.BackColor = System.Drawing.Color.Black; - this.pnlenemy.Controls.Add(this.lbenemycompromised); - this.pnlenemy.Controls.Add(this.lbenemystats); - this.pnlenemy.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlenemy.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.pnlenemy.ForeColor = System.Drawing.Color.White; - this.pnlenemy.Location = new System.Drawing.Point(673, 358); - this.pnlenemy.Name = "pnlenemy"; - this.pnlenemy.Size = new System.Drawing.Size(662, 348); - this.pnlenemy.TabIndex = 4; - // - // lbenemycompromised - // - this.lbenemycompromised.AutoSize = true; - this.lbenemycompromised.Location = new System.Drawing.Point(161, 90); - this.lbenemycompromised.Name = "lbenemycompromised"; - this.lbenemycompromised.Size = new System.Drawing.Size(47, 11); - this.lbenemycompromised.TabIndex = 1; - this.lbenemycompromised.Text = "label1"; - this.lbenemycompromised.Visible = false; - // - // lbenemystats - // - this.lbenemystats.AutoSize = true; - this.lbenemystats.Location = new System.Drawing.Point(13, 13); - this.lbenemystats.Name = "lbenemystats"; - this.lbenemystats.Size = new System.Drawing.Size(131, 11); - this.lbenemystats.TabIndex = 0; - this.lbenemystats.Text = "Enemy Health: 100%"; - // - // txtyourconsole - // - this.txtyourconsole.BackColor = System.Drawing.Color.Black; - this.txtyourconsole.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtyourconsole.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtyourconsole.ForeColor = System.Drawing.Color.LightGreen; - this.txtyourconsole.Location = new System.Drawing.Point(4, 358); - this.txtyourconsole.Multiline = true; - this.txtyourconsole.Name = "txtyourconsole"; - this.txtyourconsole.Size = new System.Drawing.Size(662, 348); - this.txtyourconsole.TabIndex = 3; - // - // pnlyou - // - this.pnlyou.BackColor = System.Drawing.Color.Black; - this.pnlyou.Controls.Add(this.lbcompromised); - this.pnlyou.Controls.Add(this.lbstats); - this.pnlyou.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlyou.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.pnlyou.ForeColor = System.Drawing.Color.White; - this.pnlyou.Location = new System.Drawing.Point(4, 4); - this.pnlyou.Name = "pnlyou"; - this.pnlyou.Size = new System.Drawing.Size(662, 347); - this.pnlyou.TabIndex = 1; - this.pnlyou.MouseDown += new System.Windows.Forms.MouseEventHandler(this.playfield_MouseDown); - // - // lbcompromised - // - this.lbcompromised.AutoSize = true; - this.lbcompromised.Location = new System.Drawing.Point(66, 88); - this.lbcompromised.Name = "lbcompromised"; - this.lbcompromised.Size = new System.Drawing.Size(103, 11); - this.lbcompromised.TabIndex = 3; - this.lbcompromised.Text = "SYSTEM DAMAGED"; - this.lbcompromised.Visible = false; - // - // lbstats - // - this.lbstats.AutoSize = true; - this.lbstats.Location = new System.Drawing.Point(13, 13); - this.lbstats.Name = "lbstats"; - this.lbstats.Size = new System.Drawing.Size(138, 11); - this.lbstats.TabIndex = 0; - this.lbstats.Text = "System Health: 100%"; - // - // txtenemyconsole - // - this.txtenemyconsole.BackColor = System.Drawing.Color.Black; - this.txtenemyconsole.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtenemyconsole.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtenemyconsole.ForeColor = System.Drawing.Color.LightGreen; - this.txtenemyconsole.Location = new System.Drawing.Point(673, 4); - this.txtenemyconsole.Multiline = true; - this.txtenemyconsole.Name = "txtenemyconsole"; - this.txtenemyconsole.Size = new System.Drawing.Size(662, 347); - this.txtenemyconsole.TabIndex = 2; - // - // btnnext - // - this.btnnext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnnext.AutoSize = true; - this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnnext.Location = new System.Drawing.Point(294, 161); - this.btnnext.Name = "btnnext"; - this.btnnext.Size = new System.Drawing.Size(66, 23); - this.btnnext.TabIndex = 9; - this.btnnext.Text = "Next >>"; - this.btnnext.UseVisualStyleBackColor = true; - this.btnnext.Visible = false; - this.btnnext.Click += new System.EventHandler(this.btnnext_Click); - // - // pnlbuy - // - this.pnlbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.pnlbuy.Controls.Add(this.txthostname); - this.pnlbuy.Controls.Add(this.lbhostname); - this.pnlbuy.Controls.Add(this.txtgrade); - this.pnlbuy.Controls.Add(this.lbgrade); - this.pnlbuy.Controls.Add(this.lbmoduleinfo); - this.pnlbuy.Controls.Add(this.cmbbuyable); - this.pnlbuy.Controls.Add(this.label4); - this.pnlbuy.Controls.Add(this.btndonebuying); - this.pnlbuy.Location = new System.Drawing.Point(7, 405); - this.pnlbuy.Name = "pnlbuy"; - this.pnlbuy.Size = new System.Drawing.Size(382, 299); - this.pnlbuy.TabIndex = 6; - this.pnlbuy.Visible = false; - // - // txthostname - // - this.txthostname.BackColor = System.Drawing.Color.Black; - this.txthostname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txthostname.ForeColor = System.Drawing.Color.White; - this.txthostname.Location = new System.Drawing.Point(186, 236); - this.txthostname.Name = "txthostname"; - this.txthostname.Size = new System.Drawing.Size(186, 18); - this.txthostname.TabIndex = 10; - // - // lbhostname - // - this.lbhostname.AutoSize = true; - this.lbhostname.Location = new System.Drawing.Point(112, 240); - this.lbhostname.Name = "lbhostname"; - this.lbhostname.Size = new System.Drawing.Size(68, 11); - this.lbhostname.TabIndex = 9; - this.lbhostname.Text = "Hostname:"; - // - // txtgrade - // - this.txtgrade.BackColor = System.Drawing.Color.Black; - this.txtgrade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtgrade.ForeColor = System.Drawing.Color.White; - this.txtgrade.Location = new System.Drawing.Point(65, 236); - this.txtgrade.Name = "txtgrade"; - this.txtgrade.Size = new System.Drawing.Size(40, 18); - this.txtgrade.TabIndex = 8; - this.txtgrade.TextChanged += new System.EventHandler(this.txtgrade_TextChanged); - // - // lbgrade - // - this.lbgrade.AutoSize = true; - this.lbgrade.Location = new System.Drawing.Point(12, 240); - this.lbgrade.Name = "lbgrade"; - this.lbgrade.Size = new System.Drawing.Size(47, 11); - this.lbgrade.TabIndex = 7; - this.lbgrade.Text = "Grade:"; - // - // lbmoduleinfo - // - this.lbmoduleinfo.Location = new System.Drawing.Point(10, 63); - this.lbmoduleinfo.Name = "lbmoduleinfo"; - this.lbmoduleinfo.Size = new System.Drawing.Size(367, 156); - this.lbmoduleinfo.TabIndex = 6; - this.lbmoduleinfo.Text = resources.GetString("lbmoduleinfo.Text"); - // - // cmbbuyable - // - this.cmbbuyable.BackColor = System.Drawing.Color.Black; - this.cmbbuyable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbbuyable.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cmbbuyable.ForeColor = System.Drawing.Color.White; - this.cmbbuyable.FormattingEnabled = true; - this.cmbbuyable.Location = new System.Drawing.Point(12, 38); - this.cmbbuyable.Name = "cmbbuyable"; - this.cmbbuyable.Size = new System.Drawing.Size(360, 19); - this.cmbbuyable.TabIndex = 3; - this.cmbbuyable.SelectedIndexChanged += new System.EventHandler(this.cmbbuyable_SelectedIndexChanged); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(10, 12); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(75, 11); - this.label4.TabIndex = 2; - this.label4.Text = "Buy Module"; - // - // btndonebuying - // - this.btndonebuying.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btndonebuying.AutoSize = true; - this.btndonebuying.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btndonebuying.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndonebuying.Location = new System.Drawing.Point(341, 273); - this.btndonebuying.Name = "btndonebuying"; - this.btndonebuying.Size = new System.Drawing.Size(38, 23); - this.btndonebuying.TabIndex = 1; - this.btndonebuying.Text = "Buy"; - this.btndonebuying.UseVisualStyleBackColor = true; - this.btndonebuying.Click += new System.EventHandler(this.btndonebuying_Click); - // - // pnldefensemanager - // - this.pnldefensemanager.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.pnldefensemanager.Controls.Add(this.btnbuy); - this.pnldefensemanager.Controls.Add(this.label3); - this.pnldefensemanager.Controls.Add(this.cmbmodules); - this.pnldefensemanager.Controls.Add(this.label1); - this.pnldefensemanager.Controls.Add(this.button1); - this.pnldefensemanager.Location = new System.Drawing.Point(395, 424); - this.pnldefensemanager.Name = "pnldefensemanager"; - this.pnldefensemanager.Size = new System.Drawing.Size(382, 280); - this.pnldefensemanager.TabIndex = 5; - this.pnldefensemanager.Visible = false; - // - // btnbuy - // - this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnbuy.AutoSize = true; - this.btnbuy.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnbuy.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnbuy.Location = new System.Drawing.Point(199, 254); - this.btnbuy.Name = "btnbuy"; - this.btnbuy.Size = new System.Drawing.Size(122, 23); - this.btnbuy.TabIndex = 7; - this.btnbuy.Text = "Buy new module."; - this.btnbuy.UseVisualStyleBackColor = true; - this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click); - // - // label3 - // - this.label3.Location = new System.Drawing.Point(12, 95); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(367, 156); - this.label3.TabIndex = 6; - this.label3.Text = resources.GetString("label3.Text"); - // - // cmbmodules - // - this.cmbmodules.BackColor = System.Drawing.Color.Black; - this.cmbmodules.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbmodules.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cmbmodules.ForeColor = System.Drawing.Color.White; - this.cmbmodules.FormattingEnabled = true; - this.cmbmodules.Location = new System.Drawing.Point(12, 38); - this.cmbmodules.Name = "cmbmodules"; - this.cmbmodules.Size = new System.Drawing.Size(360, 19); - this.cmbmodules.TabIndex = 3; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(10, 12); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(75, 11); - this.label1.TabIndex = 2; - this.label1.Text = "Add Module"; - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.AutoSize = true; - this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Location = new System.Drawing.Point(327, 254); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(52, 23); - this.button1.TabIndex = 1; - this.button1.Text = "Done."; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click_1); - // - // pnlpcinfo - // - this.pnlpcinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlpcinfo.Controls.Add(this.lbtargets); - this.pnlpcinfo.Controls.Add(this.btnpoweroff); - this.pnlpcinfo.Controls.Add(this.btnupgrade); - this.pnlpcinfo.Controls.Add(this.lbpcinfo); - this.pnlpcinfo.Controls.Add(this.lbmoduletitle); - this.pnlpcinfo.Controls.Add(this.btncloseinfo); - this.pnlpcinfo.Location = new System.Drawing.Point(783, 424); - this.pnlpcinfo.Name = "pnlpcinfo"; - this.pnlpcinfo.Size = new System.Drawing.Size(382, 280); - this.pnlpcinfo.TabIndex = 7; - this.pnlpcinfo.Visible = false; - // - // lbtargets - // - this.lbtargets.Location = new System.Drawing.Point(12, 165); - this.lbtargets.Name = "lbtargets"; - this.lbtargets.Size = new System.Drawing.Size(367, 86); - this.lbtargets.TabIndex = 9; - this.lbtargets.Text = "Targets"; - // - // btnpoweroff - // - this.btnpoweroff.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnpoweroff.AutoSize = true; - this.btnpoweroff.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnpoweroff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpoweroff.Location = new System.Drawing.Point(85, 254); - this.btnpoweroff.Name = "btnpoweroff"; - this.btnpoweroff.Size = new System.Drawing.Size(80, 23); - this.btnpoweroff.TabIndex = 8; - this.btnpoweroff.Text = "Power Off"; - this.btnpoweroff.UseVisualStyleBackColor = true; - this.btnpoweroff.Click += new System.EventHandler(this.btnpoweroff_Click); - // - // btnupgrade - // - this.btnupgrade.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnupgrade.AutoSize = true; - this.btnupgrade.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnupgrade.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnupgrade.Location = new System.Drawing.Point(171, 254); - this.btnupgrade.Name = "btnupgrade"; - this.btnupgrade.Size = new System.Drawing.Size(150, 23); - this.btnupgrade.TabIndex = 7; - this.btnupgrade.Text = "Upgrade This Module"; - this.btnupgrade.UseVisualStyleBackColor = true; - this.btnupgrade.Click += new System.EventHandler(this.btnupgrade_Click); - // - // lbpcinfo - // - this.lbpcinfo.Location = new System.Drawing.Point(12, 41); - this.lbpcinfo.Name = "lbpcinfo"; - this.lbpcinfo.Size = new System.Drawing.Size(367, 86); - this.lbpcinfo.TabIndex = 6; - this.lbpcinfo.Text = resources.GetString("lbpcinfo.Text"); - // - // lbmoduletitle - // - this.lbmoduletitle.AutoSize = true; - this.lbmoduletitle.Location = new System.Drawing.Point(10, 12); - this.lbmoduletitle.Name = "lbmoduletitle"; - this.lbmoduletitle.Size = new System.Drawing.Size(75, 11); - this.lbmoduletitle.TabIndex = 2; - this.lbmoduletitle.Text = "Add Module"; - // - // btncloseinfo - // - this.btncloseinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btncloseinfo.AutoSize = true; - this.btncloseinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btncloseinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncloseinfo.Location = new System.Drawing.Point(327, 254); - this.btncloseinfo.Name = "btncloseinfo"; - this.btncloseinfo.Size = new System.Drawing.Size(52, 23); - this.btncloseinfo.TabIndex = 1; - this.btncloseinfo.Text = "Done."; - this.btncloseinfo.UseVisualStyleBackColor = true; - this.btncloseinfo.Click += new System.EventHandler(this.btncloseinfo_Click); - // - // flcontrols - // - this.flcontrols.Controls.Add(this.btnaddmodule); - this.flcontrols.Controls.Add(this.lbcodepoints); - this.flcontrols.Controls.Add(this.btntogglemusic); - this.flcontrols.Controls.Add(this.lbsong); - this.flcontrols.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flcontrols.Location = new System.Drawing.Point(0, 710); - this.flcontrols.Name = "flcontrols"; - this.flcontrols.Size = new System.Drawing.Size(1339, 31); - this.flcontrols.TabIndex = 4; - // - // btnaddmodule - // - this.btnaddmodule.AutoSize = true; - this.btnaddmodule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnaddmodule.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnaddmodule.Location = new System.Drawing.Point(3, 3); - this.btnaddmodule.Name = "btnaddmodule"; - this.btnaddmodule.Size = new System.Drawing.Size(87, 23); - this.btnaddmodule.TabIndex = 0; - this.btnaddmodule.Text = "Add Module"; - this.btnaddmodule.UseVisualStyleBackColor = true; - this.btnaddmodule.Click += new System.EventHandler(this.btnaddmodule_Click); - // - // lbcodepoints - // - this.lbcodepoints.Location = new System.Drawing.Point(96, 0); - this.lbcodepoints.Name = "lbcodepoints"; - this.lbcodepoints.Size = new System.Drawing.Size(127, 26); - this.lbcodepoints.TabIndex = 1; - this.lbcodepoints.Text = "Codepoints:"; - this.lbcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // btntogglemusic - // - this.btntogglemusic.AutoSize = true; - this.btntogglemusic.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btntogglemusic.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btntogglemusic.Location = new System.Drawing.Point(229, 3); - this.btntogglemusic.Name = "btntogglemusic"; - this.btntogglemusic.Size = new System.Drawing.Size(101, 23); - this.btntogglemusic.TabIndex = 2; - this.btntogglemusic.Text = "Toggle Music"; - this.btntogglemusic.UseVisualStyleBackColor = true; - this.btntogglemusic.Click += new System.EventHandler(this.button2_Click); - // - // lbsong - // - this.lbsong.Location = new System.Drawing.Point(336, 0); - this.lbsong.Name = "lbsong"; - this.lbsong.Size = new System.Drawing.Size(414, 26); - this.lbsong.TabIndex = 3; - this.lbsong.Text = "Codepoints:"; - this.lbsong.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // panel2 - // - this.panel2.Controls.Add(this.pgpong); - this.panel2.Controls.Add(this.pnltutorial); - this.panel2.Controls.Add(this.pnlbuy); - this.panel2.Controls.Add(this.pnlpcinfo); - this.panel2.Controls.Add(this.pnldefensemanager); - this.panel2.Controls.Add(this.tbui); - this.panel2.Controls.Add(this.flcontrols); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(0, 0); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(1339, 741); - this.panel2.TabIndex = 1; - // - // pgpong - // - this.pgpong.BackColor = System.Drawing.Color.Black; - this.pgpong.Controls.Add(this.lblcountdown); - this.pgpong.Controls.Add(this.ball); - this.pgpong.Controls.Add(this.paddleHuman); - this.pgpong.Controls.Add(this.paddleComputer); - this.pgpong.Controls.Add(this.lbllevelandtime); - this.pgpong.Controls.Add(this.lblstatsY); - this.pgpong.Controls.Add(this.lblstatsX); - this.pgpong.ForeColor = System.Drawing.Color.White; - this.pgpong.Location = new System.Drawing.Point(0, 0); - this.pgpong.Name = "pgpong"; - this.pgpong.Size = new System.Drawing.Size(700, 400); - this.pgpong.TabIndex = 22; - this.pgpong.Visible = false; - this.pgpong.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); - // - // lblcountdown - // - this.lblcountdown.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblcountdown.Location = new System.Drawing.Point(187, 152); - this.lblcountdown.Name = "lblcountdown"; - this.lblcountdown.Size = new System.Drawing.Size(315, 49); - this.lblcountdown.TabIndex = 7; - this.lblcountdown.Text = "3"; - this.lblcountdown.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.lblcountdown.Visible = false; - // - // ball - // - this.ball.BackColor = System.Drawing.Color.Gray; - this.ball.Location = new System.Drawing.Point(300, 152); - this.ball.Name = "ball"; - this.ball.Size = new System.Drawing.Size(20, 20); - this.ball.TabIndex = 2; - // - // paddleHuman - // - this.paddleHuman.BackColor = System.Drawing.Color.Gray; - this.paddleHuman.Location = new System.Drawing.Point(10, 134); - this.paddleHuman.Name = "paddleHuman"; - this.paddleHuman.Size = new System.Drawing.Size(20, 100); - this.paddleHuman.TabIndex = 3; - this.paddleHuman.TabStop = false; - // - // paddleComputer - // - this.paddleComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.paddleComputer.BackColor = System.Drawing.Color.Gray; - this.paddleComputer.Location = new System.Drawing.Point(666, 134); - this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 100); - this.paddleComputer.Name = "paddleComputer"; - this.paddleComputer.Size = new System.Drawing.Size(20, 100); - this.paddleComputer.TabIndex = 1; - // - // lbllevelandtime - // - this.lbllevelandtime.Dock = System.Windows.Forms.DockStyle.Top; - this.lbllevelandtime.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbllevelandtime.Location = new System.Drawing.Point(0, 0); - this.lbllevelandtime.Name = "lbllevelandtime"; - this.lbllevelandtime.Size = new System.Drawing.Size(700, 22); - this.lbllevelandtime.TabIndex = 4; - this.lbllevelandtime.Text = "Level: 1"; - this.lbllevelandtime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblstatsY - // - this.lblstatsY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.lblstatsY.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblstatsY.Location = new System.Drawing.Point(542, 356); - this.lblstatsY.Name = "lblstatsY"; - this.lblstatsY.Size = new System.Drawing.Size(144, 35); - this.lblstatsY.TabIndex = 11; - this.lblstatsY.Text = "Yspeed:"; - this.lblstatsY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblstatsX - // - this.lblstatsX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblstatsX.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblstatsX.Location = new System.Drawing.Point(3, 356); - this.lblstatsX.Name = "lblstatsX"; - this.lblstatsX.Size = new System.Drawing.Size(144, 35); - this.lblstatsX.TabIndex = 5; - this.lblstatsX.Text = "Xspeed: "; - this.lblstatsX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnltutorial - // - this.pnltutorial.Controls.Add(this.btnnext); - this.pnltutorial.Controls.Add(this.lbtutorial); - this.pnltutorial.Location = new System.Drawing.Point(174, 161); - this.pnltutorial.Name = "pnltutorial"; - this.pnltutorial.Size = new System.Drawing.Size(363, 187); - this.pnltutorial.TabIndex = 10; - this.pnltutorial.Visible = false; - // - // lbtutorial - // - this.lbtutorial.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.lbtutorial.Location = new System.Drawing.Point(-2, 50); - this.lbtutorial.Name = "lbtutorial"; - this.lbtutorial.Size = new System.Drawing.Size(367, 86); - this.lbtutorial.TabIndex = 9; - this.lbtutorial.Text = resources.GetString("lbtutorial.Text"); - this.lbtutorial.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.lbtutorial.Visible = false; - // - // tmrplayerhealthdetect - // - this.tmrplayerhealthdetect.Tick += new System.EventHandler(this.tmrplayerhealthdetect_Tick); - // - // tmrenemyhealthdetect - // - this.tmrenemyhealthdetect.Tick += new System.EventHandler(this.tmrenemyhealthdetect_Tick); - // - // tmrredraw - // - this.tmrredraw.Tick += new System.EventHandler(this.tmrredraw_Tick); - // - // tmrvisualizer - // - this.tmrvisualizer.Tick += new System.EventHandler(this.tmrvisualizer_Tick); - // - // pongGameTimer - // - this.pongGameTimer.Interval = 30; - this.pongGameTimer.Tick += new System.EventHandler(this.pongGameTimer_Tick); - // - // counter - // - this.counter.Interval = 1000; - this.counter.Tick += new System.EventHandler(this.counter_Tick); - // - // tmrcountdown - // - this.tmrcountdown.Interval = 1000; - this.tmrcountdown.Tick += new System.EventHandler(this.tmrcountdown_Tick); - // - // HackUI - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Black; - this.ClientSize = new System.Drawing.Size(1339, 741); - this.Controls.Add(this.panel2); - this.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.ForeColor = System.Drawing.Color.LightGreen; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "HackUI"; - this.Text = "HackUI"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.this_Closing); - this.Load += new System.EventHandler(this.HackUI_Load); - this.tbui.ResumeLayout(false); - this.tbui.PerformLayout(); - this.pnlenemy.ResumeLayout(false); - this.pnlenemy.PerformLayout(); - this.pnlyou.ResumeLayout(false); - this.pnlyou.PerformLayout(); - this.pnlbuy.ResumeLayout(false); - this.pnlbuy.PerformLayout(); - this.pnldefensemanager.ResumeLayout(false); - this.pnldefensemanager.PerformLayout(); - this.pnlpcinfo.ResumeLayout(false); - this.pnlpcinfo.PerformLayout(); - this.flcontrols.ResumeLayout(false); - this.flcontrols.PerformLayout(); - this.panel2.ResumeLayout(false); - this.pgpong.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).EndInit(); - this.pnltutorial.ResumeLayout(false); - this.pnltutorial.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tbui; - private System.Windows.Forms.Panel pnlyou; - private System.Windows.Forms.Panel pnlbuy; - private System.Windows.Forms.TextBox txthostname; - private System.Windows.Forms.Label lbhostname; - private System.Windows.Forms.TextBox txtgrade; - private System.Windows.Forms.Label lbgrade; - private System.Windows.Forms.Label lbmoduleinfo; - private System.Windows.Forms.ComboBox cmbbuyable; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Button btndonebuying; - private System.Windows.Forms.Panel pnldefensemanager; - private System.Windows.Forms.Button btnbuy; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.ComboBox cmbmodules; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button btnnext; - private System.Windows.Forms.Panel pnlpcinfo; - private System.Windows.Forms.Label lbtargets; - private System.Windows.Forms.Button btnpoweroff; - private System.Windows.Forms.Button btnupgrade; - private System.Windows.Forms.Label lbpcinfo; - private System.Windows.Forms.Label lbmoduletitle; - private System.Windows.Forms.Button btncloseinfo; - private System.Windows.Forms.FlowLayoutPanel flcontrols; - private System.Windows.Forms.Button btnaddmodule; - private System.Windows.Forms.Label lbcompromised; - private System.Windows.Forms.Label lbstats; - private System.Windows.Forms.TextBox txtyourconsole; - private System.Windows.Forms.TextBox txtenemyconsole; - private System.Windows.Forms.Panel pnlenemy; - private System.Windows.Forms.Label lbenemycompromised; - private System.Windows.Forms.Label lbenemystats; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Timer tmrplayerhealthdetect; - private System.Windows.Forms.Timer tmrenemyhealthdetect; - private System.Windows.Forms.Timer tmrredraw; - private System.Windows.Forms.Label lbcodepoints; - private System.Windows.Forms.Button btntogglemusic; - private System.Windows.Forms.Label lbsong; - private System.Windows.Forms.Panel pnltutorial; - private System.Windows.Forms.Label lbtutorial; - private System.Windows.Forms.Timer tmrvisualizer; - internal System.Windows.Forms.Panel pgpong; - internal System.Windows.Forms.Label lblcountdown; - internal System.Windows.Forms.Panel ball; - internal System.Windows.Forms.PictureBox paddleHuman; - internal System.Windows.Forms.Panel paddleComputer; - internal System.Windows.Forms.Label lbllevelandtime; - internal System.Windows.Forms.Label lblstatsY; - internal System.Windows.Forms.Label lblstatsX; - internal System.Windows.Forms.Timer pongGameTimer; - internal System.Windows.Forms.Timer counter; - internal System.Windows.Forms.Timer tmrcountdown; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/HackUI.cs b/source/WindowsFormsApplication1/HackUI.cs deleted file mode 100644 index ee36b8f..0000000 --- a/source/WindowsFormsApplication1/HackUI.cs +++ /dev/null @@ -1,1921 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class HackUI : Form - { - public HackUI() - { - InitializeComponent(); - this.TopMost = false; - ThisEnemyHacker = new EnemyHacker("Test Dummy", "A test hacker", "A test hacker", 1, 1, "easy"); - } - - public event EventHandler OnWin; - - public HackUI(EnemyHacker enemy) - { - ThisEnemyHacker = enemy; - InitializeComponent(); - } - - public Computer ThisPlayerPC = null; - private decimal TotalPlayerHP = 0; - private EnemyHacker EnemyNet = null; - - private List<Module> MyNetwork = new List<Module>(); - - #region PLAYER - - private void LoadPlayerScreen() - { - AntiVirusBounds = new List<Rectangle>(); - var tc = new Module(SystemType.Core, 1, "localhost"); - tc.HP = 100; - TutorialNetwork.Add(tc); - foreach (var m in GetMyNet()) - { - if (m.Type == SystemType.Core) - { - MyNetwork.Add(m); - } - } - VisualizePlayerNetwork(); - if (EnemyNet != null) - { - tmrplayerhealthdetect.Start(); - } - else - { - tmrplayerhealthdetect.Start(); - } - if (IsTutorial) - { - SetupTutorialUI(0); - } - } - - private void VisualizePlayerNetwork() - { - AllPlayerComputers = new List<Computer>(); - foreach (Module m in MyNetwork) - { - if (AllPlayerComputers.Count <= 10) - { - var c = m.Deploy(); - if (c.Type == SystemType.Core) - { - ThisPlayerPC = c; - } - AddModule(c); - } - } - if(ThisPlayerPC == null) - { - var m = new Module(SystemType.Core, 1, "localhost"); - GetMyNet().Add(m); - MyNetwork.Add(m); - var c = m.Deploy(); - ThisPlayerPC = c; - AddModule(c); - } - } - - public List<Computer> AllPlayerComputers = null; - - private void tmrplayerhealthdetect_Tick(object sender, EventArgs e) - { - if(ThisPlayerPC != null) - { - ThisPlayerPC.Left = (pnlyou.Width - ThisPlayerPC.Width) / 2; - ThisPlayerPC.Top = (pnlyou.Height - ThisPlayerPC.Height) / 2; - - } - var rnd = new Random(); - int chance = 0; - foreach (var pc in AllPlayerComputers) - { - if (pc.Disabled == false) - { - var elist = new List<Computer>(); - if (pc.Enslaved) - elist = AllPlayerComputers; - else - elist = pc.Enemies; - if (elist != null) - { - foreach (var enemy in elist) - { - if (enemy != null && enemy.HP > 0) - { - chance = rnd.Next(1, 15); - if (chance == 7) - { - if (IsTutorial) - { - if (TutorialProgress == 32 || TutorialProgress == 9) - { - enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - } - else - { - enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - } - } - } - } - } - } - decimal health = 0; - foreach (var pc in AllPlayerComputers) - { - health += (decimal)pc.HP; - } - if (health > TotalPlayerHP) - { - TotalPlayerHP = health; - } - try - { - decimal percent = (health / TotalPlayerHP) * 100; - lbstats.Text = $"System Health: {percent}%"; - } - catch - { - - } - if (ThisPlayerPC.HP <= 0) - { - API.CreateInfoboxSession("System compromised.", "The enemy hacker has overthrown your defenses and compromised your system. You will need to wait until your core heals before beginning another battle.", infobox.InfoboxMode.Info); - Hacking.Failure = true; - Hacking.FailDate = DateTime.Now; - UserRequestedClose = false; - this.Close(); - } - } - - public bool UserRequestedClose = true; - - private void this_Closing(object sender, FormClosingEventArgs e) - { - var t = new Thread(new ThreadStart(() => - { - int prev_volume = Audio._wmp.settings.volume; - while(Audio._wmp.settings.volume > 0) - { - Thread.Sleep(100); - Audio._wmp.settings.volume -= 1; - } - Audio.ForceStop(); - Audio._wmp.settings.volume = prev_volume; - })); - t.Start(); - if (UserRequestedClose == false) - { - this.TopMost = false; - Computer[] pcs = new Computer[AllPlayerComputers.Count]; - AllPlayerComputers.CopyTo(pcs); - foreach (var pc in pcs) - { - pc?.Dispose(); - } - Computer[] epcs = new Computer[AllEnemyComputers.Count]; - AllEnemyComputers.CopyTo(epcs); - foreach (var epc in epcs) - { - epc?.Dispose(); - } - tmrplayerhealthdetect.Stop(); - tmrenemyhealthdetect.Stop(); - Hacking.RepairTimer.Start(); //Now the player can repair. - } - else - { - e.Cancel = true; - } - } - - public Computer SelectedPlayerComputer = null; - - public Computer module_to_steal = null; - - public void AddModule(Computer newModule) - { - pnlyou.Controls.Add(newModule); - int hp = newModule.HP; - WriteLine($"[Network] Welcome to the network, {newModule.Hostname}!"); - TotalPlayerHP += newModule.HP; - AllPlayerComputers.Add(newModule); - newModule.Show(); - newModule.StolenModule += (o, a) => - { - var t = new Thread(new ThreadStart(() => - { - var rnd = new Random(); - var lst = new List<Computer>(); - if (newModule.Enslaved) - lst = AllPlayerComputers; - else - lst = AllEnemyComputers; - WriteLine($"[{newModule.Hostname}] Starting network hack..."); - Thread.Sleep(5000); - - var pc = lst[rnd.Next(0, lst.Count)]; - this.Invoke(new Action(() => - { - if (pc.Type != SystemType.Core) - { - module_to_steal = pc; - - pgpong.Left = (this.Width - pgpong.Width) / 2; - pgpong.Top = (this.Height - pgpong.Height) / 2; - - pgpong.Show(); - newgame(); - } - })); - })); - t.Start(); - }; - newModule.EnslavedModule += (o, e) => - { - if(!newModule.Enslaved) - { - var pc = AllEnemyComputers[rand.Next(0, AllEnemyComputers.Count)]; - if(!pc.Enslaved) - { - WriteLine($"[{newModule.Hostname}] Successfully enslaved {pc.Hostname}"); - pc.Enslaved = true; - } - - } - }; - newModule.OnDestruction += (object s, EventArgs a) => - { - if (this.SelectedPlayerComputer == newModule) - { - SelectedPlayerComputer = null; - } - if (newModule.Type == SystemType.Firewall) - { - Player_Firewall_Destroy(newModule); - } - AllPlayerComputers.Remove(newModule); - newModule.Dispose(); - WriteLine($"[Network] {newModule.Hostname} has gone OFFLINE."); - }; - newModule.Select += (object s, EventArgs e) => - { - SelectedPlayerComputer = newModule; - ShowPCInfo(newModule.Hostname); - if (IsTutorial) - { - if (TutorialProgress == 6) - { - if (newModule == ThisPlayerPC) - { - SetupTutorialUI(7); - } - } - } - }; - newModule.HP_Decreased += new EventHandler(Player_System_Damaged); - newModule.OnRepair += new EventHandler(Player_System_Repaired); - if (newModule.Type == SystemType.Antivirus || newModule.Type == SystemType.RepairModule) - { - var b = newModule.GetAreaOfEffect(); - AntiVirusBounds.Add(b); - pnlyou.Refresh(); - newModule.AntivirusRepair += (object s, EventArgs a) => - { - foreach (Computer pc in AllPlayerComputers) - { - if (pc != newModule && pc.Bounds.IntersectsWith(b)) - { - if (newModule.Type == SystemType.RepairModule) - { - if (pc.HP < newModule.HP) - { - if (pc.HP < pc.GetTotal()) - { - WriteLine($"[{newModule.Hostname}] Repairing neighbouring system \"{pc.Hostname}\""); - pc.Repair(1); - } - } - - } - else - { - if (pc.HP < 10) - { - WriteLine($"[{newModule.Hostname}] Repairing neighbouring system \"{pc.Hostname}\""); - pc.Repair(1); - } - } - } - } - }; - - } - if (newModule.Type == SystemType.Firewall) - { - var b = newModule.GetAreaOfEffect(); - AntiVirusBounds.Add(b); - pnlenemy.Refresh(); - Player_Firewall_Deflect(newModule); - } - if (newModule.Type == SystemType.ServerStack) - { - newModule.MassDDoS += (object s, EventArgs a) => - { - if (newModule.Enslaved) - WormToPlayer(); - else - WormToEnemy(); - }; - } - } - - public void WormToEnemy() - { - var rnd = new Random(); - int r = rnd.Next(0, 10); - WriteLine("[Network] Launching distributed denial-of-service attack on rival network."); - foreach (Computer c in AllEnemyComputers) - { - if (r == 5) - { - c.Disable(); - } - } - } - - public void ShowPCInfo(string hostname) - { - Computer c = null; - foreach (var pc in AllPlayerComputers) - { - if (pc.Hostname == hostname) - { - c = pc; - } - } - - Module mod = null; - foreach (var m in GetMyNet()) - { - if (m.Hostname == hostname) - { - mod = m; - } - } - if (mod != null) - { - pnlpcinfo.Left = 7; - pnlpcinfo.Show(); - lbmoduletitle.Text = "Module Info - " + hostname; - lbpcinfo.Text = $"Hostname: {hostname}{Environment.NewLine}Type: {mod.Type.ToString()}{Environment.NewLine}{Environment.NewLine}"; - if (mod.Type == SystemType.Core) - { - lbpcinfo.Text += Environment.NewLine + "This represents your main system. If this module is destroyed, you will automatically lose the battle. Protect it at all costs."; - btnupgrade.Hide(); - btnpoweroff.Hide(); - } - else - { - lbpcinfo.Text += $"{Environment.NewLine}Grade: {mod.Grade}"; - if (mod.Grade < 4) - { - btnupgrade.Show(); - } - else - { - btnupgrade.Hide(); - } - btnpoweroff.Show(); - } - - } - if (c != null) - { - if (c.Enslaved) - { - lbtargets.Text = "*** WARNING ***: This module has been ENSLAVED! Consider a redeploy."; - } - else - { - lbtargets.Text = "Targets: "; - if (c.Enemies != null) - { - if (c.Enemies.Count > 0) - { - foreach (var pc in c.Enemies) - { - lbtargets.Text += " " + pc.Hostname + ","; - } - } - else - { - lbtargets.Text += " - Click on an enemy module to target it."; - } - } - else - { - lbtargets.Text += " - Click on an enemy module to target it."; - } - lbtargets.Text += Environment.NewLine + "Some modules will not fire at their targets."; - } - } - } - - public void Player_Firewall_Deflect(Computer fwall) - { - //Safegaurd... - if (fwall.Type == SystemType.Firewall) - { - var r = fwall.GetAreaOfEffect(); - foreach (var pc in AllPlayerComputers) - { - if (pc != fwall) - { - if (pc.Bounds.IntersectsWith(r)) - { - pc.DamageDefector = fwall.Grade; - } - } - } - } - } - - public void Player_Firewall_Destroy(Computer fwall) - { - //Safegaurd... - if (fwall.Type == SystemType.Firewall) - { - var r = fwall.GetAreaOfEffect(); - foreach (var pc in AllPlayerComputers) - { - if (pc.Bounds.IntersectsWith(r)) - { - pc.DamageDefector = 1; - UpdatePlayerFirewalls(); - } - } - } - } - - public void UpdatePlayerFirewalls() - { - foreach (var pc in AllPlayerComputers) - { - if (pc.Type == SystemType.Firewall) - { - Player_Firewall_Deflect(pc); - } - } - } - - - private void Player_System_Repaired(object s, EventArgs e) - { - var c = (Computer)s; - WriteLine($"[{c.Hostname}] System repaired."); - lbcompromised.Text = "System regenerating..."; - int location = c.Left - (lbcompromised.Width / 4); - int y = c.Top - 25; - lbcompromised.Location = new Point(location, y); - lbcompromised.Show(); - c.Flash(lbcompromised); - - } - - - private void Player_System_Damaged(object s, EventArgs e) - { - var c = (Computer)s; - WriteLine($"[{c.Hostname}] System damaged. Total HP: {c.HP}"); - lbcompromised.Text = "System damaged!"; - int location = c.Left - (lbcompromised.Width / 4); - int y = c.Top - 25; - lbcompromised.Location = new Point(location, y); - lbcompromised.Show(); - c.Flash(lbcompromised); - } - - private void btnaddmodule_Click(object sender, EventArgs e) - { - SetupModuleList(); - pnldefensemanager.Left = 7; - pnldefensemanager.Visible = !pnldefensemanager.Visible; - if (IsTutorial) - { - if (TutorialProgress == 12) - { - SetupTutorialUI(13); - } - } - } - - private Dictionary<string, SystemType> FutureModules = null; - public List<Module> TutorialNetwork = new List<Module>(); - - public void SetupModuleList() - { - FutureModules = new Dictionary<string, SystemType>(); - cmbmodules.Items.Clear(); - List<Module> net = null; - if (IsTutorial) - { - net = TutorialNetwork; - } - else - { - net = Hacking.MyNetwork; - } - foreach (var item in net) - { - Computer m = null; - foreach (var mod in AllPlayerComputers) - { - if (mod.Hostname == item.Hostname) - { - m = mod; - } - } - if (m == null) - { - if (item.HP > 0) - { - cmbmodules.Items.Add(item.Hostname); - FutureModules.Add(item.Hostname, item.Type); - } - } - } - - } - - bool PlacingNewModule = false; - - - private void button1_Click_1(object sender, EventArgs e) - { - if (cmbmodules.Text != "") - { - PlacingNewModule = true; - pnldefensemanager.Hide(); - if (IsTutorial) - { - if (TutorialProgress == 20) - { - SetupTutorialUI(21); - } - } - } - } - - private void playfield_MouseDown(object sender, MouseEventArgs e) - { - if (PlacingNewModule == true) - { - if (e.Button == MouseButtons.Left) - { - if (AllPlayerComputers.Count < 10) - { - bool cont = true; - try - { - SystemType type = FutureModules[cmbmodules.Text]; - } - catch - { - cont = false; - API.CreateInfoboxSession("Error", "Please select a module type.", infobox.InfoboxMode.Info); - } - if (cont == true) - { - var coordinates = pnlyou.PointToClient(Cursor.Position); - int x = coordinates.X; - int y = coordinates.Y; - - var m = new Module(FutureModules[cmbmodules.Text], 1, cmbmodules.Text); - foreach (var mod in GetMyNet()) - { - if (mod.Hostname == cmbmodules.Text) - { - m = mod; - } - } - m.X = x; - m.Y = y; - var c = m.Deploy(); - AddModule(c); - API.RemoveCodepoints(10); - pnldefensemanager.Hide(); - if (IsTutorial) - { - if (TutorialProgress == 21) - { - SetupTutorialUI(22); - } - else if (TutorialProgress == 25) - { - SetupTutorialUI(26); - } - } - } - PlacingNewModule = false; - } - else - { - API.CreateInfoboxSession("Too much deployed modules", "You can have a maximum of 10 modules deployed on your network, including your main system. You will have to wait for one to be destroyed.", infobox.InfoboxMode.Info); - PlacingNewModule = false; - } - } - else - { - PlacingNewModule = false; - } - } - } - - public List<FutureModule> BuyableModules = null; - - public void SetupBuyable() - { - if (!IsTutorial) - { - BuyableModules = Hacking.GetFutureModules(); - } - cmbbuyable.Items.Clear(); - foreach (var m in BuyableModules) - { - cmbbuyable.Items.Add(m.Name); - } - lbmoduleinfo.Text = ""; - txtgrade.Text = "1"; - } - - private void btnbuy_Click(object sender, EventArgs e) - { - if (IsTutorial) - { - if (TutorialProgress == 14) - { - SetupTutorialUI(15); - } - } - SetupBuyable(); - pnlbuy.Show(); - pnldefensemanager.Hide(); - } - - public List<Rectangle> AntiVirusBounds = null; - public List<Rectangle> IndicatorsToDestroy = new List<Rectangle>(); - private void boundpaint(object sender, PaintEventArgs e) - { - foreach (Rectangle r in IndicatorsToDestroy) - { - AntiVirusBounds.Remove(r); - var sb = new SolidBrush(Color.Black); - var p = new Pen(sb); - p.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid; - p.Width = 2; - e.Graphics.DrawRectangle(p, r); - - } - IndicatorsToDestroy.Clear(); - foreach (Rectangle r in AntiVirusBounds) - { - IndicatorsToDestroy.Add(r); - tmrredraw.Start(); - var sb = new SolidBrush(Color.White); - var p = new Pen(sb); - p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; - p.Width = 2; - e.Graphics.DrawRectangle(p, r); - } - } - - private void tmrredraw_Tick(object sender, EventArgs e) - { - pnlyou.Refresh(); - tmrredraw.Stop(); - } - - private void SetupModuleInfo() - { - bool cont = false; - FutureModule m = null; - foreach (var mod in BuyableModules) - { - if (mod.Name == cmbbuyable.Text) - { - m = mod; - cont = true; - } - } - if (cont == true) - { - lbmoduleinfo.Text = m.Name; - lbmoduleinfo.Text += Environment.NewLine + $"Cost: {m.Cost * Convert.ToInt32(txtgrade.Text)} CP"; - lbmoduleinfo.Text += Environment.NewLine + $"Description: {Environment.NewLine}{m.Description}"; - } - } - - private void cmbbuyable_SelectedIndexChanged(object sender, EventArgs e) - { - SetupModuleInfo(); - if (IsTutorial) - { - if (TutorialProgress == 17) - { - if (cmbbuyable.Text == "Antivirus") - { - SetupTutorialUI(18); - } - } - } - } - - private void txtgrade_TextChanged(object sender, EventArgs e) - { - try - { - int g = Convert.ToInt32(txtgrade.Text); - if (g < 1) - { - txtgrade.Text = "1"; - } - else if (g > 4) - { - txtgrade.Text = "4"; - } - SetupModuleInfo(); - } - catch - { - txtgrade.Text = "1"; - SetupModuleInfo(); - } - } - - public List<Module> GetMyNet() - { - if (IsTutorial) - { - return TutorialNetwork; - } - else - { - return Hacking.MyNetwork; - } - } - - private void btndonebuying_Click(object sender, EventArgs e) - { - var mod = new FutureModule("", 0, "", SystemType.Core); - bool cont = false; - foreach (var m in BuyableModules) - { - if (m.Name == cmbbuyable.Text) - { - mod = m; - cont = true; - } - } - if (cont == true) - { - if (API.Codepoints >= mod.Cost) - { - if (txthostname.Text != "") - { - bool cont2 = true; - string hname = txthostname.Text.Replace(" ", "_"); - foreach (var pc in GetMyNet()) - { - if (pc.Hostname == hname) - { - cont2 = false; - } - } - if (cont2 == true) - { - var newModule = new Module(mod.Type, Convert.ToInt32(txtgrade.Text), hname); - newModule.HP = newModule.GetTotalHP(); - GetMyNet().Add(newModule); - API.RemoveCodepoints(mod.Cost); - API.CreateInfoboxSession("Module added.", "To deploy the module to the network, select 'Add Module' and choose the hostname from the menu.", infobox.InfoboxMode.Info); - pnlbuy.Hide(); - if (IsTutorial) - { - if (TutorialProgress == 19) - { - SetupTutorialUI(20); - } - else if (TutorialProgress == 24) - { - SetupTutorialUI(25); - } - } - } - else - { - API.CreateInfoboxSession("Please enter a unique hostname.", "No two computers can share the same hostname. Please choose another.", infobox.InfoboxMode.Info); - } - } - else - { - API.CreateInfoboxSession("Please enter a hostname.", "It is best to enter a hostname for your new computer so you know which one it is.", infobox.InfoboxMode.Info); - } - - } - else - { - API.CreateInfoboxSession("Insufficient Codepoints", "You do not have enough Codepoints to buy this module.", infobox.InfoboxMode.Info); - } - } - } - - private void btncloseinfo_Click(object sender, EventArgs e) - { - SelectedPlayerComputer = null; - pnlpcinfo.Hide(); - Hacking.SaveCharacters(); - } - - private void btnpoweroff_Click(object sender, EventArgs e) - { - //Remove the computer from the game. - pnlyou.Controls.Remove(SelectedPlayerComputer); - AllPlayerComputers.Remove(SelectedPlayerComputer); - btnpoweroff.Hide(); - } - - private void btnupgrade_Click(object sender, EventArgs e) - { - int price = 20 * SelectedPlayerComputer.Grade; - if (API.Codepoints >= price) - { - foreach (var m in GetMyNet()) - { - if (m.Hostname == SelectedPlayerComputer.Hostname) - { - SelectedPlayerComputer.Grade += 1; - m.Grade += 1; - Hacking.SaveCharacters(); - API.CreateInfoboxSession("Upgrade successful.", "Your module has been upgraded.", infobox.InfoboxMode.Info); - } - } - } - else - { - API.CreateInfoboxSession("Insufficient funds", $"You need at least {price} CP to upgrade this module.", infobox.InfoboxMode.Info); - } - ShowPCInfo(SelectedPlayerComputer.Hostname); - } - - public int TutorialProgress = 0; - public bool IsTutorial = false; - - public void SetupTutorialUI(int p) - { - TutorialProgress = p; - lbtutorial.Show(); - pnltutorial.Show(); - pnltutorial.Left = (this.Width - pnltutorial.Width) / 2; - pnltutorial.Top = (this.Height - pnltutorial.Height) / 2; - switch (p) - { - case 0: - lbtutorial.Text = "Welcome to the Hacker Battle tutorial. This guide will teach you the fundamentals and basics of taking part in a Hacker Battle. When you're done here, you'll be able to start up a network and start dominating others' networks."; - btnaddmodule.Hide(); - btnnext.Show(); - break; - case 1: - lbtutorial.Text = "Let's go over the user interface. It's quite simple, actually. There are 4 different displays on your screen. One for your network, one for your console, and same for the enemy."; - break; - case 2: - lbtutorial.Text = "On the left side is your console and playfield. Your console will log all the actions that happen on your network. Your Playfield is a visual representation of your network. Each square represents a different module. Most of your actions will take place in the Playfield."; - break; - case 3: - lbtutorial.Text = "On the right is the enemy's console and playfield. Both playfields will show the HP (health) of each module, and the total network HP."; - break; - case 4: - lbtutorial.Text = "If the enemy's total network health hits 0%, or his core's strength hits 0%, you win."; - break; - case 5: - lbtutorial.Text = "However, if the same happens to you, you will lose the battle, and won't be able to fight back until your Core heals."; - break; - case 6: - lbtutorial.Text = "Each network has one core. It is represented by the square in the centre of the playfield. Click on your Core to view information about it."; - btnnext.Hide(); - break; - case 7: - lbtutorial.Text = "When you click on a module, you can see information about it, such as it's grade level, HP, and type. This module is a Core, so it has no grade level. It currently has 100 HP."; - btnnext.Show(); - break; - case 8: - lbtutorial.Text = "When a module is selected you can left-click an enemy module to target it. This will make the selected module attempt to fire at the target. Cores are very weak, but are capable of bringing a target down by 1 HP."; - break; - case 9: - lbtutorial.Text = "The enemy Core is attacking your Core now. Looks like it's time to fight back. Select your core, and target the enemy's Core to fight back."; - btnnext.Hide(); - break; - case 10: - lbtutorial.Text = "Phew! He couldn't do much damage before we fought back. In a real battle, modules won't just stop fighting randomly, but for the purpose of this tutorial, your Core will stop attacking the enemy Core."; - btnnext.Show(); - ThisPlayerPC.Enemies.Clear(); - break; - case 11: - lbtutorial.Text = "Should your Core fall to a fatal state in the future, you can deploy some defenses to slow the enemy down. Any hacker knows it's best to disable defenses before attacking the main target."; - ThisPlayerPC.HP = 5; - break; - case 12: - lbtutorial.Text = "We will look at ways of healing damaged modules now. You can add new modules to the network by clicking the [Add Module] button in the lower-left corner."; - btnaddmodule.Show(); - btnnext.Hide(); - break; - case 13: - btnbuy.Hide(); - lbtutorial.Text = "You can select a module from the list of hostnames. Only modules that are not powered on will display in the menu."; - btnnext.Show(); - BuyableModules = new List<FutureModule>(); - BuyableModules.Add(new FutureModule("Antivirus", 0, "This module will heal any other module within it's area of effect to 10 HP. Higher grades can improve it's area of effect.", SystemType.Antivirus)); - break; - case 14: - btnbuy.Show(); - lbtutorial.Text = "In this demonstration, you have no other modules to deploy. You will need to buy some modules to get started. Click [Buy New Module] to continue."; - btnnext.Hide(); - break; - case 15: - cmbbuyable.Enabled = false; - lbtutorial.Text = "Let's go over the user interface, shall we? At the top is a list of all possible module types."; - btnnext.Show(); - btndonebuying.Hide(); - lbgrade.Hide(); - txtgrade.Hide(); - txthostname.Hide(); - lbhostname.Hide(); - lbmoduleinfo.Hide(); - break; - case 16: - lbtutorial.Text = "Below that, is the cost and description of the selected module type. It's invisible right now, but when you select a new module, it will populate."; - lbmoduleinfo.Show(); - break; - case 17: - cmbbuyable.Enabled = true; - lbtutorial.Text = "We need an Antivirus module, so go ahead and select it from the menu."; - btnnext.Hide(); - break; - case 18: - lbtutorial.Text = "Normally, an Antivirus would cost us 15 Codepoints, however since this is a tutorial, it is free."; - btnnext.Show(); - break; - case 19: - lbtutorial.Text = "Below the description is the Hostname box. A Hostname is used to identify the new module. Pick something you'll remember as this new Antivirus, then click [Buy] to purchase it."; - btnnext.Hide(); - lbhostname.Show(); - txthostname.Show(); - btndonebuying.Show(); - break; - case 20: - btnnext.Hide(); - lbtutorial.Text = "Now that we have an antivirus module, go ahead and deploy it by selecting [Add Module], choosing the hostname you entered, and clicking [Done]."; - break; - case 21: - btnnext.Hide(); - lbtutorial.Text = "Alrighty. Now you get to choose where you place your module. Simply left-click in a blank area where you'd like to place the module. Right-click to cancel. Oh, be sure to place close to our Core!"; - break; - case 22: - lbtutorial.Text = "The Antivirus has been placed. You may've noticed that white dotted box around it when you placed it. If the Core is even slightly within the box, the Antivirus will heal it back to 10 HP."; - btnnext.Show(); - break; - case 23: - lbtutorial.Text = "The higher the Antivirus' grade, the bigger this area of effect becomes. However, it will always only be able to heal modules to 10 HP."; - break; - case 24: - lbtutorial.Text = "A Turret has been added to the list of buyable modules. Go pick one up!"; - btnnext.Hide(); - BuyableModules.Clear(); - BuyableModules.Add(new FutureModule("Turret", 0, "It's not super-effective, but the Turret will blast through any Grade 1 defenses pretty quickly. The higher the grade, the higher the strength.", SystemType.Turret)); - break; - case 25: - lbtutorial.Text = "Turrets can fire damaging viruses at their targets. Go ahead and place your Turret somewhere within the Antivirus's Area of Effect."; - break; - case 26: - lbtutorial.Text = "Notice how the Turret only has 10 HP, just like the Antivirus?"; - btnnext.Show(); - break; - case 27: - lbtutorial.Text = "This is because both the Antivirus and Turret are at Grade 1. There are four grades of modules you can get, and you can easily upgrade by selecting a module and choosing [Upgrade This Module]."; - break; - case 28: - lbtutorial.Text = "Upgrading a module will increase it's max HP. Grade 1 is 10 HP, Grade 2 is 20 HP, Grade 3 is 40 HP, and Grade 4 is 80 HP."; - break; - case 29: - lbtutorial.Text = "Some modules will have a higher attack rate based on their grade. Others may throw more damaging attacks, and any module's Area of Effect (if it has one) will grow."; - break; - case 30: - lbtutorial.Text = "Another tip: Multiple modules can target the same module, and a module can have multiple targets. This means that you can have your Core and your Turret both attack the enemy Core."; - break; - case 31: - lbtutorial.Text = "Some modules do not work on a target-based system. Some may work using an area-of-effect system (like an Antivirus), and some may target the entire enemy network."; - break; - case 32: - pnltutorial.Left = this.Width - pnltutorial.Width; - pnltutorial.Top = this.Height - flcontrols.Height - pnltutorial.Height; - lbtutorial.Text = "We have reset both your Cores' health. Go ahead and finish off the enemy Core using your newfound skills."; - ThisPlayerPC.HP = 100; - ThisEnemyPC.HP = 100; - btnnext.Hide(); - BuyableModules = new List<FutureModule>(); - BuyableModules.Add(new FutureModule("Antivirus", 0, "This module will heal any other module within it's area of effect to 10 HP. Higher grades can improve it's area of effect.", SystemType.Antivirus)); - BuyableModules.Add(new FutureModule("Turret", 0, "It's not super-effective, but the Turret will blast through any Grade 1 defenses pretty quickly. The higher the grade, the higher the strength.", SystemType.Turret)); - break; - default: - btnnext.Show(); - lbtutorial.Text = "This concludes the Hacker Battle tutorial. Happy hunting, soldier. Just kidding. Stay safe."; - btnnext.Text = "Close"; - break; - } - } - - private void btnnext_Click(object sender, EventArgs e) - { - if (btnnext.Text == "Close") - { - UserRequestedClose = false; - this.Close(); - } - SetupTutorialUI(TutorialProgress + 1); - } - - #endregion - - private void HackUI_Load(object sender, EventArgs e) - { - this.TopMost = false; - Audio.Stopped += (o, a) => - { - if (this != null) - { - Audio.Play("hackerbattle_ambient"); - } - }; - Audio.Play("hackerbattle_ambient"); - - Hacking.RepairTimer.Stop(); //Don't want the player to be able to repair dead modules during a battle! - this.TopMost = true; - this.WindowState = FormWindowState.Maximized; - //this.TopMost = true; - LoadPlayerScreen(); - LoadEnemyScreen(); - tmrvisualizer.Interval = 10; - tmrvisualizer.Start(); - } - - #region ENEMY - private EnemyHacker ThisEnemyHacker { get; set; } - public List<Computer> AllEnemyComputers = null; - public Computer ThisEnemyPC { get; set; } - private void LoadEnemyScreen() - { - AllEnemyComputers = new List<Computer>(); - VisualizeEnemyNetwork(); - tmrenemyhealthdetect.Start(); - ThisEnemyPC.Enemy = true; - } - - private void VisualizeEnemyNetwork() - { - var rnd = new Random(); - foreach (Module m in ThisEnemyHacker.Network) - { - m.HP = m.GetTotalHP(); - var c = m.Deploy(); - if (c.Type == SystemType.Core) - { - ThisEnemyPC = c; - ThisEnemyPC.EnemyComputer = ThisPlayerPC; - ThisPlayerPC.EnemyComputer = ThisEnemyPC; - } - AddEnemyModule(c); - c.Location = new Point(m.X, m.Y); - } - } - - public void Enemy_System_Attacking(object s, EventArgs a) - { - int i = new Random().Next(AllPlayerComputers.Count); - var pc = AllPlayerComputers[i]; - var se = (Computer)s; - pc.LaunchAttack(se.GetProperType()); - } - - public Computer SelectedEnemyComputer = null; - - public void AddEnemyModule(Computer newModule) - { - if(newModule.Type == SystemType.Core) - { - newModule.Left = (pnlenemy.Width - newModule.Width) / 2; - newModule.Top = (pnlenemy.Height - newModule.Height) / 2; - } - var rnd = new Random(); - pnlenemy.Controls.Add(newModule); - foreach (var pc in AllEnemyComputers) - { - while (newModule.Bounds.IntersectsWith(pc.Bounds)) - { - newModule.Location = new Point(rnd.Next(100, 350), rnd.Next(100, 350)); - } - } - AllEnemyComputers.Add(newModule); - int hp = newModule.HP; - TotalEnemyHP += (decimal)newModule.HP; - newModule.Show(); - - newModule.StolenModule += (o, a) => - { - var t = new Thread(new ThreadStart(() => - { - var lst = new List<Computer>(); - if (!newModule.Enslaved) - lst = AllPlayerComputers; - else - lst = AllEnemyComputers; - WriteLine_Enemy($"[{newModule.Hostname}] Starting network hack..."); - Thread.Sleep(5000); - - var pc = lst[rnd.Next(0, lst.Count)]; - this.Invoke(new Action(() => - { - if (pc.Type != SystemType.Core) - { - module_to_steal = pc; - - pgpong.Left = (this.Width - pgpong.Width) / 2; - pgpong.Top = (this.Height - pgpong.Height) / 2; - - pgpong.Show(); - newgame(); - } - })); - })); - t.Start(); - }; - newModule.EnslavedModule += (o, e) => - { - if (!newModule.Enslaved) - { - var pc = AllPlayerComputers[rand.Next(0, AllPlayerComputers.Count)]; - if (!pc.Enslaved) - { - WriteLine_Enemy($"[{newModule.Hostname}] Successfully enslaved {pc.Hostname}"); - pc.Enslaved = true; - } - - } - }; - newModule.OnDestruction += (object s, EventArgs a) => - { - if (this.SelectedEnemyComputer == newModule) - { - SelectedEnemyComputer = null; - } - WriteLine_Enemy($"[Network] {newModule.Hostname} has gone OFFLINE."); - AllEnemyComputers.Remove(newModule); - newModule.Dispose(); - }; - newModule.Select += (object s, EventArgs a) => - { - bool c = true; - foreach (var pc in SelectedPlayerComputer.Enemies) - { - if (pc.Hostname == newModule.Hostname) - { - c = false; - } - } - if (c == true) - { - SelectedPlayerComputer.Enemies.Add(newModule); - ShowPCInfo(SelectedPlayerComputer.Hostname); - if (IsTutorial) - { - if (TutorialProgress == 9) - { - SetupTutorialUI(10); - } - } - WriteLine_Enemy("[Network] WARNING! Rival system has targeted a system on this network!"); - WriteLine($"[Network] System \"{SelectedPlayerComputer.Hostname}\" is now targeting rival system \"{newModule.Hostname}\"."); - } - }; - newModule.HP_Decreased += new EventHandler(Enemy_System_Damaged); - newModule.OnRepair += new EventHandler(Enemy_System_Repaired); - if (newModule.Type == SystemType.Antivirus) - { - var b = newModule.GetAreaOfEffect(); - newModule.AntivirusRepair += (object s, EventArgs a) => - { - foreach (Computer pc in AllEnemyComputers) - { - if (pc != newModule && pc.Bounds.IntersectsWith(b)) - { - if (newModule.Type == SystemType.RepairModule) - { - if (pc.HP < newModule.HP) - { - if (pc.HP < pc.GetTotal()) - { - WriteLine_Enemy($"[{newModule.Hostname}] Repairing neighbouring system \"{pc.Hostname}\"..."); - pc.Repair(1); - } - } - - } - else - { - if (pc.HP < 10) - { - pc.Repair(1); - } - } - } - } - }; - } - if (newModule.Type == SystemType.Firewall) - { - pnlenemy.Refresh(); - Enemy_Firewall_Deflect(newModule); - } - if (newModule.Type == SystemType.ServerStack) - { - newModule.MassDDoS += (object s, EventArgs a) => - { - if (newModule.Enslaved) - WormToEnemy(); - else - WormToPlayer(); - }; - } - } - - public void Enemy_Firewall_Deflect(Computer fwall) - { - //Safeguard... also apparently I can't spell... because this used to be 'Safegaurd'... - if (fwall.Enslaved == false && fwall.Type == SystemType.Firewall) - { - var r = fwall.GetAreaOfEffect(); - foreach (var pc in AllEnemyComputers) - { - if (pc != fwall) - { - if (pc.Bounds.IntersectsWith(r)) - { - pc.DamageDefector = fwall.Grade; - } - } - } - } - } - - public void Enemy_Firewall_Destroy(Computer fwall) - { - //Safegaurd... - if (fwall.Type == SystemType.Firewall) - { - var r = fwall.GetAreaOfEffect(); - foreach (var pc in AllEnemyComputers) - { - if (pc.Bounds.IntersectsWith(r)) - { - pc.DamageDefector = 1; - UpdateEnemyFirewalls(); - } - } - } - } - - public void UpdateEnemyFirewalls() - { - foreach (var pc in AllEnemyComputers) - { - if (pc.Type == SystemType.Firewall) - { - Enemy_Firewall_Deflect(pc); - } - } - } - - - private void Enemy_System_Repaired(object s, EventArgs e) - { - var c = (Computer)s; - WriteLine_Enemy($"[{c.Hostname}] System repaired."); - lbenemycompromised.Text = "System regenerating..."; - int location = c.Left - (lbenemycompromised.Width / 4); - int y = c.Top - 25; - lbenemycompromised.Location = new Point(location, y); - lbenemycompromised.Show(); - c.Flash(lbenemycompromised); - - } - - - private void Enemy_System_Damaged(object s, EventArgs e) - { - var c = (Computer)s; - WriteLine_Enemy($"[{c.Hostname}] System damaged. Current HP: {c.HP}"); - WriteLine($"[Network] Damaged system on rival network with hostname \"{c.Hostname}\""); - lbenemycompromised.Text = "System damaged!"; - int location = c.Left - (lbenemycompromised.Width / 4); - int y = c.Top - 25; - lbenemycompromised.Location = new Point(location, y); - lbenemycompromised.Show(); - c.Flash(lbenemycompromised); - } - - private decimal TotalEnemyHP = 0; - - private void tmrenemyhealthdetect_Tick(object sender, EventArgs e) - { - lbsong.Visible = true; - btntogglemusic.Visible = true; - - lbsong.Text = Audio.Name + " @ " + Audio.CurrentPosition; - - decimal health = 0; - lbcodepoints.Text = $"Codepoints: {API.Codepoints}"; - var rnd = new Random(); - int chance = 0; - foreach (var pc in AllEnemyComputers) - { - if (pc.Disabled == false) - { - var elist = new List<Computer>(); - if (pc.Enslaved) - elist = AllEnemyComputers; - else - elist = AllPlayerComputers; - foreach (var enemy in elist) - { - chance = rnd.Next(1, 20); - if (chance == 10) - { - if (IsTutorial) - { - if (TutorialProgress == 9) - { - ThisPlayerPC.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - else if (TutorialProgress == 32) - { - enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - else - { - enemy.Enemies.Clear(); - } - } - else - { - enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - } - } - } - } - - foreach (var pc in AllEnemyComputers) - { - health += (decimal)pc.HP; - } - try - { - decimal percent = (health / TotalEnemyHP) * 100; - lbenemystats.Text = $"Enemy Health: {percent}%"; - if (ThisEnemyPC.HP <= 0) - { - if (IsTutorial) - { - SetupTutorialUI(33); - } - else - { - string message = "You have successfully beaten the enemy hacker."; - if (ThisEnemyHacker.IsLeader == false) - { - switch(rnd.Next(0, 6)) - { - case 1: - API.AddCodepoints(1000); - message = "You have beaten the enemy. You have earned some precious Codepoints for your effort!"; - break; - case 2: - message = "You have beaten the enemy. As a reward, all Shiftorium Upgrades cost half-price."; - Hacking.GiveHack(Hack.PriceDrop); - break; - case 3: - message = "You have beaten the enemy. As a reward, applications will now pay out more Codepoints than usual."; - Hacking.GiveHack(Hack.PayoutIncrease); - break; - case 4: - message = "The enemy has recognized your skill and has decided to become a friend. You can now hire them for free as a partner during a system hack."; - //befriend the enemy. - var skill = ThisEnemyHacker.FriendSkill; - var speed = ThisEnemyHacker.FriendSpeed; - var desc = ThisEnemyHacker.FriendDesc; - var name = ThisEnemyHacker.Name; - Hacking.AddCharacter(new Character(name, desc, skill, speed, 0)); - break; - case 5: - var cats = SaveSystem.ShiftoriumRegistry.GetCategories(false); - string cat = cats[rnd.Next(0, cats.Count - 1)]; - if (API.Upgrades[cat] == false) - { - API.Upgrades[cat] = true; - message = $"You have beaten the enemy, and as a result, the {cat.ToUpper()} Shiftorium category has been unlocked."; - } - break; - default: - message = "You have successfully beaten the enemy hacker."; - break; - } - } - API.CreateInfoboxSession("You won.", message, infobox.InfoboxMode.Info); - - UserRequestedClose = false; - var h = OnWin; - if(h != null) - { - h(this, new EventArgs()); - } - this.Close(); - } - } - } - catch - { - - } - } - - public void WormToPlayer() - { - var rnd = new Random(); - int r = rnd.Next(0, 10); - WriteLine_Enemy("[NETWORK] Launching distributed denial-of-service attack on rival network..."); - foreach (Computer c in AllPlayerComputers) - { - if (r == 5) - { - c.Disable(); - } - } - } - - public void WriteLine_Enemy(string text) - { - try - { - if (txtenemyconsole.Text.Length == 0) - { - txtenemyconsole.Text = text + Environment.NewLine; - } - else - { - txtenemyconsole.Text += text + Environment.NewLine; - } - txtenemyconsole.Select(txtenemyconsole.TextLength, 0); - txtenemyconsole.ScrollToCaret(); - } - catch - { - this.Invoke(new Action(() => { WriteLine_Enemy(text); })); - } - } - - public void WriteLine(string text) - { - try - { - if (txtyourconsole.Text.Length == 0) - { - txtyourconsole.Text = text + Environment.NewLine; - } - else - { - txtyourconsole.Text += text + Environment.NewLine; - } - txtyourconsole.Select(txtyourconsole.TextLength, 0); - txtyourconsole.ScrollToCaret(); - } - catch - { - this.Invoke(new Action(() => { WriteLine(text); })); - } - } - - #endregion - - bool playing = true; - - private void button2_Click(object sender, EventArgs e) - { - if (playing == true) - { - Audio.ForceStop(); - } - else - { - Audio.Play("hackerbattle_ambient"); - } - playing = !playing; - } - - Panel winningPlayfield = null; - - int bgcol = 0; - int pulse = 0; - Panel losingPlayfield = null; - private void tmrvisualizer_Tick(object sender, EventArgs e) - { - int enemy_hp = 0; - int player_hp = 0; - foreach(var p in AllPlayerComputers) - { - player_hp += p.HP; - } - foreach (var p in AllEnemyComputers) - { - enemy_hp += p.HP; - } - - if (player_hp >= enemy_hp) - { - winningPlayfield = pnlyou; - losingPlayfield = pnlenemy; - } - else - { - winningPlayfield = pnlenemy; - losingPlayfield = pnlyou; - } - - losingPlayfield.BackColor = Color.Black; - - - try - { - var visualizer = Audio.GetVisualizer(); - switch(visualizer.type) - { - case VisualizerType.Pulse: - tmrvisualizer.Interval = 1; - if(pulse == 0) - { - if(bgcol < 255) - { - bgcol += 10; - } - else - { - pulse = 1; - } - } - else - { - if(bgcol > 0) - { - bgcol -= 10; - } - else - { - pulse = 0; - } - } - break; - case VisualizerType.CalmDown: - bgcol = 255 - MathEx.LinearInterpolate(visualizer.startTime * 100, visualizer.endTime * 100, Audio.CurrentPositionMS, 0, 255); - break; - case VisualizerType.BuildUp: - bgcol = MathEx.LinearInterpolate(visualizer.startTime, visualizer.endTime, Audio.CurrentPosition, 0, 255); - break; - } - Color c = new Color(); - int r = 0; - int g = 0; - int b = 0; - if (visualizer.R) - r = bgcol; - if (visualizer.G) - g = bgcol; - if (visualizer.B) - b = bgcol; - c = Color.FromArgb(r, g, b); - if(playing) - winningPlayfield.BackColor = c; - } - catch - { - - } - } - - private void pongMain_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) - { - paddleHuman.Location = new Point(paddleHuman.Location.X, (MousePosition.Y - pgpong.Location.Y) - (paddleHuman.Height / 2)); - } - - - private void pongGameTimer_Tick(object sender, EventArgs e) - { - //Set the computer player to move according to the ball's position. - if (ball.Location.X > 500 - xVel * 10 && xVel > 0) - { - if (ball.Location.Y > paddleComputer.Location.Y + 50) - { - paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed * 2 + ((int)yveldec / 2)); - } - if (ball.Location.Y < paddleComputer.Location.Y + 50) - { - paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed * 2 + ((int)yveldec / 2)); - } - casualposition = rand.Next(-150, 201); - } - - //Set Xvel and Yvel speeds from decimal - if (xVel > 0) - xVel = (int)Math.Round(xveldec); - if (xVel < 0) - xVel = (int)-Math.Round(xveldec); - if (yVel > 0) - yVel = (int)Math.Round(yveldec); - if (yVel < 0) - yVel = (int)-Math.Round(yveldec); - - // Move the game ball. - ball.Location = new Point(ball.Location.X + xVel, ball.Location.Y + yVel); - - // Check for top wall. - if (ball.Location.Y < 0) - { - ball.Location = new Point(ball.Location.X, 0); - yVel = -yVel; - } - - // Check for bottom wall. - if (ball.Location.Y > pgpong.Height - ball.Height) - { - ball.Location = new Point(ball.Location.X, pgpong.Height - ball.Size.Height); - yVel = -yVel; - } - - // Check for player paddle. - if (ball.Bounds.IntersectsWith(paddleHuman.Bounds)) - { - ball.Location = new Point(paddleHuman.Location.X + ball.Size.Width, ball.Location.Y); - //randomly increase x or y speed of ball - switch (rand.Next(1, 3)) - { - case 1: - xveldec = xveldec + incrementx; - break; - case 2: - if (yveldec > 0) - yveldec = yveldec + incrementy; - if (yveldec < 0) - yveldec = yveldec - incrementy; - break; - } - xVel = -xVel; - } - - // Check for computer paddle. - if (ball.Bounds.IntersectsWith(paddleComputer.Bounds)) - { - ball.Location = new Point(paddleComputer.Location.X - paddleComputer.Size.Width + 1, ball.Location.Y); - xveldec = xveldec + incrementx; - xVel = -xVel; - } - - // Check for left wall. - if (ball.Location.X < -100) - { - var m = module_to_steal; - if (m.Enemy) - AllEnemyComputers.Remove(m); - - var lst = new List<Module>(); - if (!m.Enemy) - lst = MyNetwork; - else - lst = ThisEnemyHacker.Network; - - string hn = m.Hostname; - - Module mod = null; - foreach(var pc in lst) - { - if(pc.Hostname == hn) - { - mod = pc; - } - } - - if (!AllPlayerComputers.Contains(m)) - AddModule(mod.Deploy()); - - if(!Hacking.MyNetwork.Contains(mod)) - { - Hacking.MyNetwork.Add(mod); - } - - if(module_to_steal.Parent != pnlyou) - { - module_to_steal.Parent.Controls.Remove(module_to_steal); - module_to_steal.Dispose(); - } - tmrcountdown.Stop(); - pongGameTimer.Stop(); - counter.Stop(); - pgpong.Hide(); - } - - // Check for right wall. - if (ball.Location.X > pgpong.Width - ball.Size.Width - paddleComputer.Width + 100) - { - var m = module_to_steal; - if (!m.Enemy) - AllPlayerComputers.Remove(m); - - var lst = new List<Module>(); - if (!m.Enemy) - lst = MyNetwork; - else - lst = ThisEnemyHacker.Network; - - string hn = m.Hostname; - - Module mod = null; - foreach (var pc in lst) - { - if (pc.Hostname == hn) - { - mod = pc; - } - } - - if (!AllEnemyComputers.Contains(m)) - AddEnemyModule(mod.Deploy()); - - if (!ThisEnemyHacker.Network.Contains(mod)) - { - ThisEnemyHacker.Network.Add(mod); - } - - if (module_to_steal.Parent != pnlenemy) - { - module_to_steal.Parent.Controls.Remove(module_to_steal); - module_to_steal.Dispose(); - } - tmrcountdown.Stop(); - pongGameTimer.Stop(); - counter.Stop(); - pgpong.Hide(); - } - - //lblstats.Text = "Xspeed: " & Math.Abs(xVel) & " Yspeed: " & Math.Abs(yVel) & " Human Location: " & paddleHuman.Location.ToString & " Computer Location: " & paddleComputer.Location.ToString & Environment.NewLine & " Ball Location: " & ball.Location.ToString & " Xdec: " & xveldec & " Ydec: " & yveldec & " Xinc: " & incrementx & " Yinc: " & incrementy - lblstatsX.Text = "Xspeed: " + xveldec; - lblstatsY.Text = "Yspeed: " + yveldec; - - lbllevelandtime.Text = "Level: " + level; - - if (xVel > 20 || xVel < -20) - { - paddleHuman.Width = Math.Abs(xVel); - paddleComputer.Width = Math.Abs(xVel); - } - else - { - paddleHuman.Width = 20; - paddleComputer.Width = 20; - } - - computerspeed = Math.Abs(yVel); - - // pgcontents.Refresh() - // pgcontents.CreateGraphics.FillRectangle(Brushes.Black, ball.Location.X, ball.Location.Y, ball.Width, ball.Height) - - } - - #region pong visualizer variables - - Random rand = new Random(); - int xVel = 7; - int yVel = 8; - int computerspeed = 8; - int level = 1; - int secondsleft = 60; - int casualposition; - double xveldec = 3.0; - double yveldec = 3.0; - double incrementx = 0.4; - double incrementy = 0.2; - int levelxspeed = 3; - int levelyspeed = 3; - int[] levelrewards = new int[50]; - int countdown = 3; - - #endregion - - private void counter_Tick(object sender, EventArgs e) - { - secondsleft = secondsleft - 1; - if (secondsleft == -1) - { - secondsleft = 60; - level = level + 1; - } - } - - private void tmrcountdown_Tick(object sender, EventArgs e) - { - switch (countdown) - { - case 0: - countdown = 3; - lblcountdown.Hide(); - pongGameTimer.Start(); - counter.Start(); - tmrcountdown.Stop(); - break; - case 1: - lblcountdown.Text = "1"; - countdown = countdown - 1; - break; - case 2: - lblcountdown.Text = "2"; - countdown = countdown - 1; - break; - case 3: - lblcountdown.Text = "3"; - countdown = countdown - 1; - lblcountdown.Show(); - break; - } - - } - - private void newgame() - { - level = 1; - secondsleft = 60; - //reset stats text - lblstatsX.Text = "Xspeed: "; - lblstatsY.Text = "Yspeed: "; - - levelxspeed = 3; - levelyspeed = 3; - - incrementx = 0.4; - incrementy = 0.2; - - xveldec = levelxspeed; - yveldec = levelyspeed; - - tmrcountdown.Start(); - if (xVel < 0) - xVel = Math.Abs(xVel); - lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " Seconds Left"; - } - } -} - -namespace System -{ - public class MathEx - { - public static int LinearInterpolate(int input_start, int input_end, int input, int output_start, int output_end) - { - int input_range = input_end - input_start; - int output_range = output_end - output_start; - - return (input - input_start) * output_range / input_range + output_start; - } - } -} diff --git a/source/WindowsFormsApplication1/HackUI.resx b/source/WindowsFormsApplication1/HackUI.resx deleted file mode 100644 index 9def72b..0000000 --- a/source/WindowsFormsApplication1/HackUI.resx +++ /dev/null @@ -1,177 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="lbmoduleinfo.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <data name="label3.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <data name="lbpcinfo.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <data name="lbtutorial.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <metadata name="tmrplayerhealthdetect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="tmrenemyhealthdetect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>63, 42</value> - </metadata> - <metadata name="tmrredraw.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>191, 17</value> - </metadata> - <metadata name="tmrvisualizer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>238, 42</value> - </metadata> - <metadata name="pongGameTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>358, 42</value> - </metadata> - <metadata name="counter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>501, 42</value> - </metadata> - <metadata name="tmrcountdown.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>594, 42</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Hacking.cs b/source/WindowsFormsApplication1/Hacking.cs deleted file mode 100644 index 7b18852..0000000 --- a/source/WindowsFormsApplication1/Hacking.cs +++ /dev/null @@ -1,801 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - /// <summary> - /// Hacker battles and stuff like that. - /// </summary> - public class Hacking - { - public static List<Character> Characters = new List<Character>(); - public static List<HackTool> Tools = new List<HackTool>(); - public static List<EnemyHacker> EnemyHackers = new List<EnemyHacker>(); - public static List<Module> MyNetwork = new List<Module>(); - public static bool Failure = false; - public static DateTime FailDate = DateTime.Now; - internal static string HackerBattleAward = null; - public static Timer RepairTimer = null; - - public static Module MyCore - { - get - { - var m = new Module(SystemType.Core, 1, "invalid"); - foreach(var mod in MyNetwork) - { - if(mod.Hostname == "localhost") - { - m = mod; - } - } - return m; - } - } - - /// <summary> - /// Gives a shiftorium upgrade for free. - /// </summary> - /// <param name="id">Upgrade ID.</param> - public static void GiveUpgrade(string id) - { - API.Upgrades[id] = true; - } - - /// <summary> - /// Increases skill of a character. - /// </summary> - /// <param name="cid">The character ID.</param> - public static void IncreaseSkill(int cid) - { - var rnd = new Random(); - int newspeed = rnd.Next(0, 5); - int newskill = rnd.Next(0, 10); - Characters[cid].Speed += newspeed; - Characters[cid].Skill += newskill; - SaveCharacters(); - API.CreateInfoboxSession("Hack complete.", $"{Characters[cid].Name} has successfully completed their hack. {Characters[cid].Name} has gained {newspeed} Speed Points, and {newskill} Skill Points.", infobox.InfoboxMode.Info); - } - - /// <summary> - /// Applies a hack. - /// </summary> - /// <param name="hack">Type of hack to apply.</param> - public static void GiveHack(Hack hack) - { - switch (hack) - { - case Hack.PayoutIncrease: - API.CurrentSave.CodepointMultiplier += 1; - break; - case Hack.PriceDrop: - API.CurrentSave.PriceDivider += 1; - break; - } - } - - /// <summary> - /// Add a new character. - /// </summary> - /// <param name="ch">The new character.</param> - public static void AddCharacter(Character ch) - { - bool c = true; - foreach(var character in Characters) - { - if(character.Name == ch.Name) - { - c = false; - } - } - if(c == true) - { - Characters.Add(ch); - SaveCharacters(); - } - } - - /// <summary> - /// Adds a new hacking tool. - /// </summary> - /// <param name="ch">The hacking tool.</param> - public static void AddTool(HackTool ch) - { - if (!Tools.Contains(ch)) - { - Tools.Add(ch); - } - } - - /// <summary> - /// Returns a random hack type. - /// </summary> - /// <returns>The hack type.</returns> - public static Hack GetRandomHack() - { - var t = new List<Hack>(Enum.GetValues(typeof(Hack)).Cast<Hack>()); - var rnd = new Random(); - return t[rnd.Next(0, t.Count - 1)]; - } - - /// <summary> - /// Start a hack with a character. - /// </summary> - /// <param name="cid">Character to hire.</param> - /// <param name="hack">Type of hack to pull off.</param> - public static void StartHackWithCharacter(int cid, Hack hack) - { - var h = Characters[cid]; - var f = new Form(); - f.BackColor = Color.Black; - f.ForeColor = Color.White; - f.Font = new Font(OSInfo.GetMonospaceFont(), 9); - var l = new Label(); - int p = 0; - int speed = 10000 / h.Speed; //If a hacker has a speed of one, it will take 10,000 milliseconds to move 1% in the hack progress. Divide it by a thousand, you get 1,000 seconds. - var t = new Timer(); - t.Interval = speed; - f.FormBorderStyle = FormBorderStyle.None; - f.Show(); - switch (API.CurrentSkin.desktoppanelposition) - { - case "Top": - f.Location = new Point(5, API.CurrentSkin.desktoppanelheight + 5); - break; - case "Bottom": - f.Location = new Point(5, 5); - break; - } - - f.Controls.Add(l); - l.Show(); - l.TextAlign = ContentAlignment.MiddleCenter; - f.Height = 25; - f.TopMost = true; - l.Text = $"Progress: {p}%"; - l.Dock = DockStyle.Fill; - t.Tick += (object s, EventArgs a) => - { - if (l.Text != "Hack failed.") - { - if (p <= 100) - { - l.Text = $"Progress: {p}%"; - int fail = new Random().Next(0, h.Skill * h.Speed); - if (fail == 1) - { - l.Text = "Hack failed."; - } - } - else - { - GiveHack(hack); - f.Close(); - t.Stop(); - IncreaseSkill(cid); - } - } - else - { - f.Close(); - t.Stop(); - } - - p += 1; - }; - t.Start(); - } - - /// <summary> - /// Hacker Battles: List of modules the user can buy. - /// </summary> - /// <returns>The list that was created by the method. What did you think it would return? A boolean?</returns> - public static List<FutureModule> GetFutureModules() - { - var lst = new List<FutureModule>(); - lst.Add(new FutureModule("Antivirus", 15, "This module will heal any other module within it's area of effect to 10 HP. Higher grades can improve it's area of effect.", SystemType.Antivirus)); - lst.Add(new FutureModule("Enslaver", 75, "The Enslaver is a scary module for an opposing network. At any time, the Enslaver can take over any module on the enemy network and turn it against them.", SystemType.Enslaver)); - lst.Add(new FutureModule("Module Thief", 100, "The Module Thief can hack into the enemy's network and attempt to steal one of their modules and bring them into your network temporarily though. Be careful though, it might not work all the time!", SystemType.ModuleStealer)); - lst.Add(new FutureModule("Dedicated DDoS module", 10, "This module will attempt to disable the enemy network by sending a DDoS attack allowing you to take a breather.", SystemType.DedicatedDDoS)); - lst.Add(new FutureModule("Turret", 5, "It's not super-effective, but the Turret will blast through any Grade 1 defenses pretty quickly. The higher the grade, the higher the strength.", SystemType.Turret)); - lst.Add(new FutureModule("Firewall", 20, "Will decrease the amount of damage taken by any module within it's area of effect. The higher the grade, the bigger the area of effect and more protection it offers.", SystemType.Firewall)); - lst.Add(new FutureModule("Repair Module", 150, "Slowly repairs all modules within the area of effect to the same HP as the repair module.", SystemType.RepairModule)); - lst.Add(new FutureModule("Server Stack", 250, "Capable of sending a worm attack to the entire enemy network, preventing it from attacking until it can recover.", SystemType.ServerStack)); - return lst; - } - - /// <summary> - /// Hire a character to attempt to hack a Shiftorium Upgrade. - /// </summary> - /// <param name="cid">The character.</param> - /// <param name="upgrade">The upgrade ID.</param> - public static void StartHackWithCharacter(int cid, string upgrade) - { - if (upgrade == "random") - { - StartHackWithCharacter(cid, GetRandomHack()); - } - else { - var h = Characters[cid]; - var f = new Form(); - f.BackColor = Color.Black; - f.ForeColor = Color.White; - f.Font = new Font(OSInfo.GetMonospaceFont(), 9); - var l = new Label(); - int p = 0; - int speed = 10000 / h.Speed; //If a hacker has a speed of one, it will take 10,000 milliseconds to move 1% in the hack progress. Divide it by a thousand, you get 1,000 seconds. - var t = new Timer(); - t.Interval = speed; - f.FormBorderStyle = FormBorderStyle.None; - f.Show(); - switch (API.CurrentSkin.desktoppanelposition) - { - case "Top": - f.Location = new Point(5, API.CurrentSkin.desktoppanelheight + 5); - break; - case "Bottom": - f.Location = new Point(5, 5); - break; - } - - f.Controls.Add(l); - l.Show(); - l.TextAlign = ContentAlignment.MiddleCenter; - f.Height = 25; - f.TopMost = true; - l.Text = $"Progress: {p}%"; - l.Dock = DockStyle.Fill; - t.Tick += (object s, EventArgs a) => - { - if (l.Text != "Hack failed.") - { - if (p <= 100) - { - l.Text = $"Progress: {p}%"; - int fail = new Random().Next(0, h.Skill * h.Speed); - if (fail == 1) - { - l.Text = "Hack failed."; - } - } - else - { - GiveUpgrade(upgrade); - f.Close(); - t.Stop(); - IncreaseSkill(cid); - } - } - else - { - f.Close(); - t.Stop(); - } - - p += 1; - }; - t.Start(); - } - } - - /// <summary> - /// Start a hack with a tool. - /// </summary> - /// <param name="cid">Tool ID.</param> - /// <param name="hack">The hack type.</param> - public static void StartHack(int cid, Hack hack) - { - var h = Tools[cid]; - switch (h.Name) - { - case "Destabilizer Attack": - var t = new Timer(); - t.Interval = 100; - var rnd = new Random(); - t.Tick += (object s, EventArgs a) => - { - int r = rnd.Next(0, 100); - if (r == 90) - { - t.Stop(); - - API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info); - GiveHack(hack); - } - else - { - try { - int p = rnd.Next(0, 10); - switch (p) - { - case 1: - API.OpenProgram("shiftorium"); - break; - case 2: - API.OpenProgram("ki"); - break; - case 3: - API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info); - break; - case 4: - API.PlaySound(Properties.Resources._3beepvirus); - break; - case 5: - API.CurrentSession.BackColor = Color.White; - break; - case 6: - API.CurrentSession.BackColor = Color.Black; - break; - case 7: - API.PlaySound(Properties.Resources.dial_up_modem_02); - break; - case 8: - API.PlaySound(Properties.Resources.writesound); - break; - case 9: - API.PlaySound(Properties.Resources.typesound); - break; - } - } - catch - { - t.Stop(); - var tr = new Terminal(); - tr.Show(); - tr.WindowState = FormWindowState.Maximized; - tr.txtterm.BackColor = Color.Red; - tr.Crash(); - } - } - }; - t.Start(); - - - break; - } - } - - /// <summary> - /// Start a hack with a tool, to attempt to get an upgrade. - /// </summary> - /// <param name="cid">Tool ID.</param> - /// <param name="upgrade">Upgrade ID.</param> - public static void StartHack(int cid, string upgrade) - { - if (upgrade == "random") - { - StartHack(cid, GetRandomHack()); - } - else { - var h = Tools[cid]; - switch(h.Name) - { - case "Destabilizer Attack": - var t = new Timer(); - t.Interval = 1000 / h.Effectiveness; - var rnd = new Random(); - t.Tick += (object s, EventArgs a) => - { - int r = rnd.Next(0, 100); - if(r == 90) - { - t.Stop(); - API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info); - GiveUpgrade(upgrade); - } - else - { - int p = rnd.Next(0, 10); - switch(p) - { - case 1: - API.OpenProgram("shiftorium"); - break; - case 2: - API.OpenProgram("ki"); - break; - case 3: - API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info); - break; - case 4: - API.PlaySound(Properties.Resources._3beepvirus); - break; - case 5: - API.CurrentSession.BackColor = Color.White; - break; - case 6: - API.CurrentSession.BackColor = Color.Black; - break; - case 7: - API.PlaySound(Properties.Resources.dial_up_modem_02); - break; - case 8: - API.PlaySound(Properties.Resources.writesound); - break; - case 9: - API.PlaySound(Properties.Resources.typesound); - break; - } - } - }; - t.Start(); - - - break; - } - } - } - - /// <summary> - /// Initiates the Hacker Battle training simulation. - /// </summary> - public static void StartBattleTutorial() - { - var e = new EnemyHacker("Tutorial", "Tutorial hacker", "Tutorial hacker", 0, 0, "easy"); - var y = new HackUI(e); - y.IsTutorial = true; - API.CreateForm(y, "You", Properties.Resources.iconTerminal); - } - - /// <summary> - /// Loads characters and other data from the save file. - /// </summary> - public static void GetCharacters() - { - if (File.Exists(Paths.SystemDir + "_hackers.json")) - { - Characters = JsonConvert.DeserializeObject<List<Character>>(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_hackers.json"))); - } - else - { - var c = new Character("BinaryFire", "I may not be good, but it's what I like to do. You don't need to pay me.", 25, 10, 0); - AddCharacter(c); - File.WriteAllText(Paths.SystemDir + "_hackers.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Characters))); - } - if(File.Exists(Paths.SystemDir + "_hacktools.json")) - { - Tools = JsonConvert.DeserializeObject<List<HackTool>>(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_hacktools.json"))); - } - else - { - var c = new HackTool("Destabilizer Attack", 10, "Destabilize ShiftOS by causing it to go beyond what it can do, opening many programs at once, and making it do things it was NEVER intended to do."); - AddTool(c); - File.WriteAllText(Paths.SystemDir + "_hacktools.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Tools))); - - } - if (File.Exists(Paths.SystemDir + "_enemies.json")) - { - EnemyHackers = JsonConvert.DeserializeObject<List<EnemyHacker>>(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_enemies.json"))); - } - else - { - var c = new EnemyHacker("Tutorial", "Enter the Tutorial Sequence.", "", 0, 0, "Easy"); - EnemyHackers.Add(c); - File.WriteAllText(Paths.SystemDir + "enemies.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(EnemyHackers))); - - } - if (File.Exists(Paths.Drivers + "Network.dri")) - { - MyNetwork = JsonConvert.DeserializeObject<List<Module>>(API.Encryption.Decrypt(File.ReadAllText(Paths.Drivers + "Network.dri"))); - } - else - { - var c = new Module(SystemType.Core, 1, "localhost"); - c.HP = 100; //bugfix: core not appearing during battle on new save - c.X = 0; - c.Y = 0; - MyNetwork.Add(c); - File.WriteAllText(Paths.Drivers + "Network.dri", API.Encryption.Encrypt(JsonConvert.SerializeObject(MyNetwork))); - - } - List<Module> coresToRemove = new List<Module>(); - foreach(var m in MyNetwork) - { - if(m.Type == SystemType.Core && m != MyCore) - { - coresToRemove.Add(m); - } - } - foreach(var m in coresToRemove) - { - MyNetwork.Remove(m); - } - RepairTimer = new Timer(); - RepairTimer.Interval = 2000; - var r = new Random(); - RepairTimer.Tick += (object s, EventArgs a) => - { - var repairable = new List<Module>(); - foreach(var mod in MyNetwork) - { - if(mod.HP < mod.GetTotalHP()) - { - repairable.Add(mod); - } - } - int index = r.Next(0, repairable.Count); - try - { - int increase = 1; - foreach(var mod in MyNetwork) - { - if(mod.Type == SystemType.RepairModule) - { - increase += mod.HP / 4; - } - } - - var m = repairable[index]; - while(m.HP + increase > m.GetTotalHP()) - { - increase -= 1; - } - if(m.HP < m.GetTotalHP()) - { - m.HP += increase; - } - } - catch - { - - } - }; - RepairTimer.Start(); - } - - /// <summary> - /// Saves characters and other data to the save file. - /// </summary> - public static void SaveCharacters() - { - if (MyNetwork == null) - { - MyNetwork = new List<Module>(); - var c = new Module(SystemType.Core, 1, "localhost"); - c.HP = 100; //bugfix: core not appearing during battle on new save - c.X = 0; - c.Y = 0; - MyNetwork.Add(c); - } - File.WriteAllText(Paths.SystemDir + "_hackers.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Characters))); - File.WriteAllText(Paths.SystemDir + "_hacktools.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Tools))); - File.WriteAllText(Paths.Drivers + "Network.dri", API.Encryption.Encrypt(JsonConvert.SerializeObject(MyNetwork))); - File.WriteAllText(Paths.SystemDir + "_enemies.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(EnemyHackers))); - - } - - /// <summary> - /// Tells user about the 'help hacking' command. - /// </summary> - public static void StartTutorial() - { - API.CreateInfoboxSession("Upgrade Category Not Available", "This upgrade category requires more capability from the OS, and is locked. You can type 'help hacking' in the Terminal for more info.", infobox.InfoboxMode.Info); - } - } - - public class Character - { - /// <summary> - /// Creates a new hirable character. - /// </summary> - /// <param name="name">The name of the character.</param> - /// <param name="bio">The bio of the character.</param> - /// <param name="skill">Starting skill level.</param> - /// <param name="speed">Starting speed level.</param> - /// <param name="cost">Amount of Codepoints required to hire the hacker.</param> - public Character(string name, string bio, int skill, int speed, int cost) - { - Name = name; - Skill = skill; - Speed = speed; - Cost = cost; - Bio = bio; - } - - public string Name { get; set; } - public int Speed { get; set; } - public int Skill { get; set; } - public int Cost { get; set; } - public string Bio { get; set; } - } - - public class HackTool - { - /// <summary> - /// Creates a new hacking tool. - /// </summary> - /// <param name="name">Tool name.</param> - /// <param name="effectiveness">Effectiveness level.</param> - /// <param name="description">Tool description.</param> - public HackTool(string name, int effectiveness, string description) - { - Name = name; - Effectiveness = effectiveness; - Description = description; - } - - public string Name { get; set; } - public int Effectiveness { get; set; } - public string Description { get; set; } - } - - /// <summary> - /// Enum representing a type of hack. - /// </summary> - public enum Hack - { - PriceDrop, - PayoutIncrease, - } - - public class Module - { - /// <summary> - /// Creates a new module. - /// </summary> - /// <param name="t">Type of module.</param> - /// <param name="grade">Starting grade level.</param> - /// <param name="hname">Hostname.</param> - public Module(SystemType t, int grade, string hname) - { - Hostname = hname; - Type = t; - Grade = grade; - } - - public string Hostname { get; set; } - public ModuleType ModuleType { get; set; } - public SystemType Type { get; set; } - public int HP { get; set; } - public int Grade { get; set; } - /// <summary> - /// X position on the virtual network. - /// </summary> - public int X { get; set; } - /// <summary> - /// Y position on the virtual network. - /// </summary> - public int Y { get; set; } - - /// <summary> - /// Deploys the module to a Computer control that can actually do things. - /// </summary> - /// <returns>The new computer.</returns> - public Computer Deploy() - { - var c = new Computer(); - c.TotalHP = GetTotalHP(); //for proper status display - c.Hostname = Hostname; - c.Type = Type; - c.HP = HP; - c.Visible = true; - c.Grade = Grade; - if(X != 0 && Y != 0) - { - c.Location = new Point(X, Y); - } - return c; - } - - public int GetTotalHP() - { - switch (Type) - { - case SystemType.Core: - return 100; - default: - switch (Grade) - { - case 1: - return 10; - case 2: - return 20; - case 3: - return 40; - case 4: - return 80; - default: - return 10; - - } - } - } - } - - /// <summary> - /// Unused... - /// </summary> - public enum ModuleType - { - Offensive, - Defensive - } - - public class EnemyHacker - { - /// <summary> - /// An enemy network. - /// </summary> - /// <param name="name">Leader or network name.</param> - /// <param name="description">Network Description</param> - /// <param name="fdesc">If the leader becomes a friend, what will his bio be?</param> - /// <param name="fskill">If the leader becomes a friend, what will his skill be?</param> - /// <param name="fspeed">If the leader becomes a friend, what will his speed be?</param> - /// <param name="difficulty">Arbitrary value that means absolutely nothing.</param> - public EnemyHacker(string name, string description, string fdesc, int fskill, int fspeed, string difficulty) - { - Name = name; - Description = description; - FriendDesc = fdesc; - FriendSkill = fskill; - FriendSpeed = fspeed; - Difficulty = difficulty; - Network = new List<Module>(); - var m = new Module(SystemType.Core, 1, name.ToLower().Replace(" ", "_")); - m.X = 0; - m.Y = 0; - Network.Add(m); //Hacker will always have a core system. - } - - public bool IsLeader = false; - public string Name { get; set; } - public string FriendDesc { get; set; } - public string Description { get; set; } - public int FriendSpeed { get; set; } - public int FriendSkill { get; set; } - public string Difficulty { get; set; } - public List<Module> Network { get; set; } - - /// <summary> - /// Add a new module to this hacker's network. - /// </summary> - /// <param name="m">The module to add.</param> - public void AddModule(Module m) - { - Network.Add(m); - } - - /// <summary> - /// Befriends the leader. - /// </summary> - /// <param name="cost">How much will it cost to hire him?</param> - public void Befriend(int cost) - { - var c = new Character(Name, FriendDesc, FriendSpeed, FriendSkill, cost); - Hacking.AddCharacter(c); - Hacking.SaveCharacters(); - } - - - } - - public class FutureModule - { - /// <summary> - /// A purchasable module. - /// </summary> - /// <param name="name">Module name.</param> - /// <param name="cost">Cost in Codepoints</param> - /// <param name="description">Module description</param> - /// <param name="type">Module type.</param> - public FutureModule(string name, int cost, string description, SystemType type) - { - Name = name; - Description = description; - Type = type; - Cost = cost; - } - - public string Name { get; set; } - public int Cost { get; set; } - public string Description { get; set; } - public SystemType Type { get; set; } - } -} diff --git a/source/WindowsFormsApplication1/Hacking_Enemy.Designer.cs b/source/WindowsFormsApplication1/Hacking_Enemy.Designer.cs deleted file mode 100644 index 5d83abd..0000000 --- a/source/WindowsFormsApplication1/Hacking_Enemy.Designer.cs +++ /dev/null @@ -1,98 +0,0 @@ -namespace ShiftOS -{ - partial class Hacking_Enemy - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.panel1 = new System.Windows.Forms.Panel(); - this.lbcompromised = new System.Windows.Forms.Label(); - this.lbstats = new System.Windows.Forms.Label(); - this.tmrhealthdetect = new System.Windows.Forms.Timer(this.components); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.Black; - this.panel1.Controls.Add(this.lbcompromised); - this.panel1.Controls.Add(this.lbstats); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.panel1.ForeColor = System.Drawing.Color.White; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(872, 458); - this.panel1.TabIndex = 1; - // - // lbcompromised - // - this.lbcompromised.AutoSize = true; - this.lbcompromised.Location = new System.Drawing.Point(242, 174); - this.lbcompromised.Name = "lbcompromised"; - this.lbcompromised.Size = new System.Drawing.Size(47, 11); - this.lbcompromised.TabIndex = 1; - this.lbcompromised.Text = "label1"; - this.lbcompromised.Visible = false; - // - // lbstats - // - this.lbstats.AutoSize = true; - this.lbstats.Location = new System.Drawing.Point(13, 13); - this.lbstats.Name = "lbstats"; - this.lbstats.Size = new System.Drawing.Size(131, 11); - this.lbstats.TabIndex = 0; - this.lbstats.Text = "Enemy Health: 100%"; - // - // tmrhealthdetect - // - this.tmrhealthdetect.Tick += new System.EventHandler(this.tmrhealthdetect_Tick); - // - // Hacking_Enemy - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(872, 458); - this.Controls.Add(this.panel1); - this.Name = "Hacking_Enemy"; - this.Text = "Hacking_Enemy"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.this_Closing); - this.Load += new System.EventHandler(this.Hacking_Enemy_Load); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Label lbstats; - private System.Windows.Forms.Timer tmrhealthdetect; - private System.Windows.Forms.Label lbcompromised; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Hacking_Enemy.cs b/source/WindowsFormsApplication1/Hacking_Enemy.cs deleted file mode 100644 index 3f6ab63..0000000 --- a/source/WindowsFormsApplication1/Hacking_Enemy.cs +++ /dev/null @@ -1,322 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Hacking_Enemy : Form - { - public Hacking_Enemy(Hacking_YourHealth enemy, EnemyHacker thisHacker) - { - ThisHacker = thisHacker; - Enemy = enemy; - InitializeComponent(); - } - - private EnemyHacker ThisHacker { get; set; } - public Hacking_YourHealth Enemy { get; set; } - public List<Computer> AllComputers = null; - public Computer ThisPC { get; set; } - private void Hacking_Enemy_Load(object sender, EventArgs e) - { - AllComputers = new List<Computer>(); - VisualizeNetwork(); - tmrhealthdetect.Start(); - ThisPC.Enemy = true; - } - - private void VisualizeNetwork() - { - var rnd = new Random(); - foreach (Module m in ThisHacker.Network) - { - var c = m.Deploy(); - if (c.Type == SystemType.Core) - { - ThisPC = c; - ThisPC.EnemyComputer = Enemy.ThisPC; - Enemy.ThisPC.EnemyComputer = ThisPC; - } - c.Location = new Point(rnd.Next(100, 350), rnd.Next(100, 350)); - AddModule(c); - } - } - - public void System_Attacking(object s, EventArgs a) - { - int i = new Random().Next(Enemy.AllComputers.Count); - var pc = Enemy.AllComputers[i]; - var se = (Computer)s; - pc.LaunchAttack(se.GetProperType()); - } - - public Computer SelectedComputer = null; - - public void AddModule(Computer newModule) - { - var rnd = new Random(); - panel1.Controls.Add(newModule); - foreach(var pc in AllComputers) - { - while (newModule.Bounds.IntersectsWith(pc.Bounds)) - { - newModule.Location = new Point(rnd.Next(100, 350), rnd.Next(100, 350)); - } - } - AllComputers.Add(newModule); - int hp = newModule.HP; - TotalHP += (decimal)newModule.HP; - newModule.Show(); - newModule.OnDestruction += (object s, EventArgs a) => - { - if(this.SelectedComputer == newModule) - { - SelectedComputer = null; - } - AllComputers.Remove(newModule); - newModule.Dispose(); - }; - newModule.Select += (object s, EventArgs a) => - { - bool c = true; - foreach(var pc in Enemy.SelectedComputer.Enemies) - { - if(pc.Hostname == newModule.Hostname) - { - c = false; - } - } - if (c == true) - { - Enemy.SelectedComputer.Enemies.Add(newModule); - Enemy.ShowPCInfo(Enemy.SelectedComputer.Hostname); - if(Enemy.IsTutorial) - { - if(Enemy.TutorialProgress == 9) - { - Enemy.SetupTutorialUI(10); - } - } - } - }; - newModule.HP_Decreased += new EventHandler(System_Damaged); - newModule.OnRepair += new EventHandler(System_Repaired); - if (newModule.Type == SystemType.Antivirus) - { - var b = newModule.GetAreaOfEffect(); - newModule.AntivirusRepair += (object s, EventArgs a) => - { - foreach (Computer pc in AllComputers) - { - if (pc != newModule && pc.Bounds.IntersectsWith(b)) - { - if (newModule.Type == SystemType.RepairModule) - { - if (pc.HP < newModule.HP) - { - if (pc.HP < pc.GetTotal()) - { - pc.Repair(1); - } - } - - } - else { - if (pc.HP < 10) - { - pc.Repair(1); - } - } - } - } - }; - } - if (newModule.Type == SystemType.Firewall) - { - panel1.Refresh(); - Firewall_Deflect(newModule); - } - if (newModule.Type == SystemType.ServerStack) - { - newModule.MassDDoS += (object s, EventArgs a) => - { - Enemy.Worm(); - }; - } - } - - public void Firewall_Deflect(Computer fwall) - { - //Safegaurd... - if (fwall.Type == SystemType.Firewall) - { - var r = fwall.GetAreaOfEffect(); - foreach (var pc in AllComputers) - { - if (pc != fwall) - { - if (pc.Bounds.IntersectsWith(r)) - { - pc.DamageDefector = fwall.Grade; - } - } - } - } - } - - public void Firewall_Destroy(Computer fwall) - { - //Safegaurd... - if (fwall.Type == SystemType.Firewall) - { - var r = fwall.GetAreaOfEffect(); - foreach (var pc in AllComputers) - { - if (pc.Bounds.IntersectsWith(r)) - { - pc.DamageDefector = 1; - UpdateFirewalls(); - } - } - } - } - - public void UpdateFirewalls() - { - foreach (var pc in AllComputers) - { - if (pc.Type == SystemType.Firewall) - { - Firewall_Deflect(pc); - } - } - } - - - private void System_Repaired(object s, EventArgs e) - { - var c = (Computer)s; - lbcompromised.Text = "System regenerating..."; - int location = c.Left - (lbcompromised.Width / 4); - int y = c.Top - 25; - lbcompromised.Location = new Point(location, y); - lbcompromised.Show(); - c.Flash(lbcompromised); - - } - - - private void System_Damaged(object s, EventArgs e) - { - var c = (Computer)s; - lbcompromised.Text = "System damaged!"; - int location = c.Left - (lbcompromised.Width / 4); - int y = c.Top - 25; - lbcompromised.Location = new Point(location, y); - lbcompromised.Show(); - c.Flash(lbcompromised); - } - - private decimal TotalHP = 0; - - private void tmrhealthdetect_Tick(object sender, EventArgs e) - { - decimal health = 0; - - var rnd = new Random(); - int chance = 0; - foreach (var pc in AllComputers) - { - if (pc.Disabled == false) - { - foreach (var enemy in Enemy.AllComputers) - { - chance = rnd.Next(1, 20); - if (chance == 10) - { - if (Enemy.IsTutorial) - { - if (Enemy.TutorialProgress == 9) - { - Enemy.ThisPC.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - else if (Enemy.TutorialProgress == 32) - { - enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - else - { - enemy.Enemies.Clear(); - } - } - else { - enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - } - } - } - } - - foreach (var pc in AllComputers) - { - health += (decimal)pc.HP; - } - try { - decimal percent = (health / TotalHP) * 100; - lbstats.Text = $"Enemy Health: {percent}%"; - if (ThisPC.HP <= 0) - { - if (Enemy.IsTutorial) - { - Enemy.SetupTutorialUI(33); - } - else { - API.CreateInfoboxSession("You won.", "You have successfully overthrown the enemy network.", infobox.InfoboxMode.Info); - UserRequestedClose = false; - Enemy.UserRequestedClose = false; - Enemy.Close(); - this.Close(); - } - } - } - catch - { - - } - } - - public void Worm() - { - var rnd = new Random(); - int r = rnd.Next(0, 10); - - foreach (Computer c in AllComputers) - { - if(r == 5) - { - c.Disable(); - } - } - } - - public bool UserRequestedClose = true; - - private void this_Closing(object sender, FormClosingEventArgs e) - { - if(UserRequestedClose == false) - { - tmrhealthdetect.Stop(); - foreach(var pc in AllComputers) - { - pc.HP = 0; - } - } - } - } -} diff --git a/source/WindowsFormsApplication1/Hacking_Enemy.resx b/source/WindowsFormsApplication1/Hacking_Enemy.resx deleted file mode 100644 index 760f267..0000000 --- a/source/WindowsFormsApplication1/Hacking_Enemy.resx +++ /dev/null @@ -1,123 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="tmrhealthdetect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Hacking_YourHealth.Designer.cs b/source/WindowsFormsApplication1/Hacking_YourHealth.Designer.cs deleted file mode 100644 index e8fce43..0000000 --- a/source/WindowsFormsApplication1/Hacking_YourHealth.Designer.cs +++ /dev/null @@ -1,479 +0,0 @@ -namespace ShiftOS -{ - partial class Hacking_YourHealth - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Hacking_YourHealth)); - this.panel1 = new System.Windows.Forms.Panel(); - this.pnlpcinfo = new System.Windows.Forms.Panel(); - this.lbtargets = new System.Windows.Forms.Label(); - this.btnpoweroff = new System.Windows.Forms.Button(); - this.btnupgrade = new System.Windows.Forms.Button(); - this.lbpcinfo = new System.Windows.Forms.Label(); - this.lbmoduletitle = new System.Windows.Forms.Label(); - this.btncloseinfo = new System.Windows.Forms.Button(); - this.pnldefensemanager = new System.Windows.Forms.Panel(); - this.btnbuy = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); - this.cmbmodules = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.pnlbuy = new System.Windows.Forms.Panel(); - this.txthostname = new System.Windows.Forms.TextBox(); - this.lbhostname = new System.Windows.Forms.Label(); - this.txtgrade = new System.Windows.Forms.TextBox(); - this.lbgrade = new System.Windows.Forms.Label(); - this.lbmoduleinfo = new System.Windows.Forms.Label(); - this.cmbbuyable = new System.Windows.Forms.ComboBox(); - this.label4 = new System.Windows.Forms.Label(); - this.btndonebuying = new System.Windows.Forms.Button(); - this.flcontrols = new System.Windows.Forms.FlowLayoutPanel(); - this.btnaddmodule = new System.Windows.Forms.Button(); - this.lbcompromised = new System.Windows.Forms.Label(); - this.lbstats = new System.Windows.Forms.Label(); - this.tmrhealthdetect = new System.Windows.Forms.Timer(this.components); - this.tmrredraw = new System.Windows.Forms.Timer(this.components); - this.lbtutorial = new System.Windows.Forms.Label(); - this.btnnext = new System.Windows.Forms.Button(); - this.panel1.SuspendLayout(); - this.pnlpcinfo.SuspendLayout(); - this.pnldefensemanager.SuspendLayout(); - this.pnlbuy.SuspendLayout(); - this.flcontrols.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.Black; - this.panel1.Controls.Add(this.pnlbuy); - this.panel1.Controls.Add(this.pnldefensemanager); - this.panel1.Controls.Add(this.btnnext); - this.panel1.Controls.Add(this.lbtutorial); - this.panel1.Controls.Add(this.pnlpcinfo); - this.panel1.Controls.Add(this.flcontrols); - this.panel1.Controls.Add(this.lbcompromised); - this.panel1.Controls.Add(this.lbstats); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.panel1.ForeColor = System.Drawing.Color.White; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(793, 461); - this.panel1.TabIndex = 0; - this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.boundpaint); - this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.playfield_MouseDown); - // - // pnlpcinfo - // - this.pnlpcinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlpcinfo.Controls.Add(this.lbtargets); - this.pnlpcinfo.Controls.Add(this.btnpoweroff); - this.pnlpcinfo.Controls.Add(this.btnupgrade); - this.pnlpcinfo.Controls.Add(this.lbpcinfo); - this.pnlpcinfo.Controls.Add(this.lbmoduletitle); - this.pnlpcinfo.Controls.Add(this.btncloseinfo); - this.pnlpcinfo.Location = new System.Drawing.Point(399, 144); - this.pnlpcinfo.Name = "pnlpcinfo"; - this.pnlpcinfo.Size = new System.Drawing.Size(382, 280); - this.pnlpcinfo.TabIndex = 7; - this.pnlpcinfo.Visible = false; - // - // lbtargets - // - this.lbtargets.Location = new System.Drawing.Point(12, 165); - this.lbtargets.Name = "lbtargets"; - this.lbtargets.Size = new System.Drawing.Size(367, 86); - this.lbtargets.TabIndex = 9; - this.lbtargets.Text = "Targets"; - // - // btnpoweroff - // - this.btnpoweroff.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnpoweroff.AutoSize = true; - this.btnpoweroff.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnpoweroff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpoweroff.Location = new System.Drawing.Point(85, 254); - this.btnpoweroff.Name = "btnpoweroff"; - this.btnpoweroff.Size = new System.Drawing.Size(80, 23); - this.btnpoweroff.TabIndex = 8; - this.btnpoweroff.Text = "Power Off"; - this.btnpoweroff.UseVisualStyleBackColor = true; - this.btnpoweroff.Click += new System.EventHandler(this.btnpoweroff_Click); - // - // btnupgrade - // - this.btnupgrade.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnupgrade.AutoSize = true; - this.btnupgrade.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnupgrade.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnupgrade.Location = new System.Drawing.Point(171, 254); - this.btnupgrade.Name = "btnupgrade"; - this.btnupgrade.Size = new System.Drawing.Size(150, 23); - this.btnupgrade.TabIndex = 7; - this.btnupgrade.Text = "Upgrade This Module"; - this.btnupgrade.UseVisualStyleBackColor = true; - this.btnupgrade.Click += new System.EventHandler(this.btnupgrade_Click); - // - // lbpcinfo - // - this.lbpcinfo.Location = new System.Drawing.Point(12, 41); - this.lbpcinfo.Name = "lbpcinfo"; - this.lbpcinfo.Size = new System.Drawing.Size(367, 86); - this.lbpcinfo.TabIndex = 6; - this.lbpcinfo.Text = resources.GetString("lbpcinfo.Text"); - // - // lbmoduletitle - // - this.lbmoduletitle.AutoSize = true; - this.lbmoduletitle.Location = new System.Drawing.Point(10, 12); - this.lbmoduletitle.Name = "lbmoduletitle"; - this.lbmoduletitle.Size = new System.Drawing.Size(75, 11); - this.lbmoduletitle.TabIndex = 2; - this.lbmoduletitle.Text = "Add Module"; - // - // btncloseinfo - // - this.btncloseinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btncloseinfo.AutoSize = true; - this.btncloseinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btncloseinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncloseinfo.Location = new System.Drawing.Point(327, 254); - this.btncloseinfo.Name = "btncloseinfo"; - this.btncloseinfo.Size = new System.Drawing.Size(52, 23); - this.btncloseinfo.TabIndex = 1; - this.btncloseinfo.Text = "Done."; - this.btncloseinfo.UseVisualStyleBackColor = true; - this.btncloseinfo.Click += new System.EventHandler(this.btncloseinfo_Click); - // - // pnldefensemanager - // - this.pnldefensemanager.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.pnldefensemanager.Controls.Add(this.btnbuy); - this.pnldefensemanager.Controls.Add(this.label3); - this.pnldefensemanager.Controls.Add(this.cmbmodules); - this.pnldefensemanager.Controls.Add(this.label1); - this.pnldefensemanager.Controls.Add(this.button1); - this.pnldefensemanager.Location = new System.Drawing.Point(3, 147); - this.pnldefensemanager.Name = "pnldefensemanager"; - this.pnldefensemanager.Size = new System.Drawing.Size(382, 280); - this.pnldefensemanager.TabIndex = 5; - this.pnldefensemanager.Visible = false; - // - // btnbuy - // - this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnbuy.AutoSize = true; - this.btnbuy.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnbuy.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnbuy.Location = new System.Drawing.Point(199, 254); - this.btnbuy.Name = "btnbuy"; - this.btnbuy.Size = new System.Drawing.Size(122, 23); - this.btnbuy.TabIndex = 7; - this.btnbuy.Text = "Buy new module."; - this.btnbuy.UseVisualStyleBackColor = true; - this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click); - // - // label3 - // - this.label3.Location = new System.Drawing.Point(12, 95); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(367, 156); - this.label3.TabIndex = 6; - this.label3.Text = resources.GetString("label3.Text"); - // - // cmbmodules - // - this.cmbmodules.BackColor = System.Drawing.Color.Black; - this.cmbmodules.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbmodules.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cmbmodules.ForeColor = System.Drawing.Color.White; - this.cmbmodules.FormattingEnabled = true; - this.cmbmodules.Location = new System.Drawing.Point(12, 38); - this.cmbmodules.Name = "cmbmodules"; - this.cmbmodules.Size = new System.Drawing.Size(360, 19); - this.cmbmodules.TabIndex = 3; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(10, 12); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(75, 11); - this.label1.TabIndex = 2; - this.label1.Text = "Add Module"; - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.AutoSize = true; - this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Location = new System.Drawing.Point(327, 254); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(52, 23); - this.button1.TabIndex = 1; - this.button1.Text = "Done."; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click_1); - // - // pnlbuy - // - this.pnlbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.pnlbuy.Controls.Add(this.txthostname); - this.pnlbuy.Controls.Add(this.lbhostname); - this.pnlbuy.Controls.Add(this.txtgrade); - this.pnlbuy.Controls.Add(this.lbgrade); - this.pnlbuy.Controls.Add(this.lbmoduleinfo); - this.pnlbuy.Controls.Add(this.cmbbuyable); - this.pnlbuy.Controls.Add(this.label4); - this.pnlbuy.Controls.Add(this.btndonebuying); - this.pnlbuy.Location = new System.Drawing.Point(3, 128); - this.pnlbuy.Name = "pnlbuy"; - this.pnlbuy.Size = new System.Drawing.Size(382, 299); - this.pnlbuy.TabIndex = 6; - this.pnlbuy.Visible = false; - // - // txthostname - // - this.txthostname.BackColor = System.Drawing.Color.Black; - this.txthostname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txthostname.ForeColor = System.Drawing.Color.White; - this.txthostname.Location = new System.Drawing.Point(186, 236); - this.txthostname.Name = "txthostname"; - this.txthostname.Size = new System.Drawing.Size(186, 18); - this.txthostname.TabIndex = 10; - // - // lbhostname - // - this.lbhostname.AutoSize = true; - this.lbhostname.Location = new System.Drawing.Point(112, 240); - this.lbhostname.Name = "lbhostname"; - this.lbhostname.Size = new System.Drawing.Size(68, 11); - this.lbhostname.TabIndex = 9; - this.lbhostname.Text = "Hostname:"; - // - // txtgrade - // - this.txtgrade.BackColor = System.Drawing.Color.Black; - this.txtgrade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtgrade.ForeColor = System.Drawing.Color.White; - this.txtgrade.Location = new System.Drawing.Point(65, 236); - this.txtgrade.Name = "txtgrade"; - this.txtgrade.Size = new System.Drawing.Size(40, 18); - this.txtgrade.TabIndex = 8; - this.txtgrade.TextChanged += new System.EventHandler(this.txtgrade_TextChanged); - // - // lbgrade - // - this.lbgrade.AutoSize = true; - this.lbgrade.Location = new System.Drawing.Point(12, 240); - this.lbgrade.Name = "lbgrade"; - this.lbgrade.Size = new System.Drawing.Size(47, 11); - this.lbgrade.TabIndex = 7; - this.lbgrade.Text = "Grade:"; - // - // lbmoduleinfo - // - this.lbmoduleinfo.Location = new System.Drawing.Point(10, 63); - this.lbmoduleinfo.Name = "lbmoduleinfo"; - this.lbmoduleinfo.Size = new System.Drawing.Size(367, 156); - this.lbmoduleinfo.TabIndex = 6; - this.lbmoduleinfo.Text = resources.GetString("lbmoduleinfo.Text"); - // - // cmbbuyable - // - this.cmbbuyable.BackColor = System.Drawing.Color.Black; - this.cmbbuyable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbbuyable.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cmbbuyable.ForeColor = System.Drawing.Color.White; - this.cmbbuyable.FormattingEnabled = true; - this.cmbbuyable.Location = new System.Drawing.Point(12, 38); - this.cmbbuyable.Name = "cmbbuyable"; - this.cmbbuyable.Size = new System.Drawing.Size(360, 19); - this.cmbbuyable.TabIndex = 3; - this.cmbbuyable.SelectedIndexChanged += new System.EventHandler(this.cmbbuyable_SelectedIndexChanged); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(10, 12); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(75, 11); - this.label4.TabIndex = 2; - this.label4.Text = "Buy Module"; - // - // btndonebuying - // - this.btndonebuying.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btndonebuying.AutoSize = true; - this.btndonebuying.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btndonebuying.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndonebuying.Location = new System.Drawing.Point(341, 273); - this.btndonebuying.Name = "btndonebuying"; - this.btndonebuying.Size = new System.Drawing.Size(38, 23); - this.btndonebuying.TabIndex = 1; - this.btndonebuying.Text = "Buy"; - this.btndonebuying.UseVisualStyleBackColor = true; - this.btndonebuying.Click += new System.EventHandler(this.btndonebuying_Click); - // - // flcontrols - // - this.flcontrols.Controls.Add(this.btnaddmodule); - this.flcontrols.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flcontrols.Location = new System.Drawing.Point(0, 430); - this.flcontrols.Name = "flcontrols"; - this.flcontrols.Size = new System.Drawing.Size(793, 31); - this.flcontrols.TabIndex = 4; - // - // btnaddmodule - // - this.btnaddmodule.AutoSize = true; - this.btnaddmodule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnaddmodule.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnaddmodule.Location = new System.Drawing.Point(3, 3); - this.btnaddmodule.Name = "btnaddmodule"; - this.btnaddmodule.Size = new System.Drawing.Size(87, 23); - this.btnaddmodule.TabIndex = 0; - this.btnaddmodule.Text = "Add Module"; - this.btnaddmodule.UseVisualStyleBackColor = true; - this.btnaddmodule.Click += new System.EventHandler(this.btnaddmodule_Click); - // - // lbcompromised - // - this.lbcompromised.AutoSize = true; - this.lbcompromised.Location = new System.Drawing.Point(251, 85); - this.lbcompromised.Name = "lbcompromised"; - this.lbcompromised.Size = new System.Drawing.Size(103, 11); - this.lbcompromised.TabIndex = 3; - this.lbcompromised.Text = "SYSTEM DAMAGED"; - this.lbcompromised.Visible = false; - // - // lbstats - // - this.lbstats.AutoSize = true; - this.lbstats.Location = new System.Drawing.Point(13, 13); - this.lbstats.Name = "lbstats"; - this.lbstats.Size = new System.Drawing.Size(138, 11); - this.lbstats.TabIndex = 0; - this.lbstats.Text = "System Health: 100%"; - // - // tmrhealthdetect - // - this.tmrhealthdetect.Tick += new System.EventHandler(this.tmrhealthdetect_Tick); - // - // tmrredraw - // - this.tmrredraw.Interval = 5000; - this.tmrredraw.Tick += new System.EventHandler(this.tmrredraw_Tick); - // - // lbtutorial - // - this.lbtutorial.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.lbtutorial.Location = new System.Drawing.Point(411, 13); - this.lbtutorial.Name = "lbtutorial"; - this.lbtutorial.Size = new System.Drawing.Size(367, 86); - this.lbtutorial.TabIndex = 8; - this.lbtutorial.Text = resources.GetString("lbtutorial.Text"); - this.lbtutorial.TextAlign = System.Drawing.ContentAlignment.TopRight; - this.lbtutorial.Visible = false; - // - // btnnext - // - this.btnnext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnnext.AutoSize = true; - this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnnext.Location = new System.Drawing.Point(712, 102); - this.btnnext.Name = "btnnext"; - this.btnnext.Size = new System.Drawing.Size(66, 23); - this.btnnext.TabIndex = 9; - this.btnnext.Text = "Next >>"; - this.btnnext.UseVisualStyleBackColor = true; - this.btnnext.Visible = false; - this.btnnext.Click += new System.EventHandler(this.btnnext_Click); - // - // Hacking_YourHealth - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(793, 461); - this.Controls.Add(this.panel1); - this.Name = "Hacking_YourHealth"; - this.Text = "Hacking_YourHealth"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.this_Closing); - this.Load += new System.EventHandler(this.Hacking_YourHealth_Load); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.pnlpcinfo.ResumeLayout(false); - this.pnlpcinfo.PerformLayout(); - this.pnldefensemanager.ResumeLayout(false); - this.pnldefensemanager.PerformLayout(); - this.pnlbuy.ResumeLayout(false); - this.pnlbuy.PerformLayout(); - this.flcontrols.ResumeLayout(false); - this.flcontrols.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Label lbstats; - private System.Windows.Forms.Timer tmrhealthdetect; - private System.Windows.Forms.Label lbcompromised; - private System.Windows.Forms.FlowLayoutPanel flcontrols; - private System.Windows.Forms.Button btnaddmodule; - private System.Windows.Forms.Panel pnldefensemanager; - private System.Windows.Forms.ComboBox cmbmodules; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button btnbuy; - private System.Windows.Forms.Timer tmrredraw; - private System.Windows.Forms.Panel pnlbuy; - private System.Windows.Forms.TextBox txtgrade; - private System.Windows.Forms.Label lbgrade; - private System.Windows.Forms.Label lbmoduleinfo; - private System.Windows.Forms.ComboBox cmbbuyable; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Button btndonebuying; - private System.Windows.Forms.TextBox txthostname; - private System.Windows.Forms.Label lbhostname; - private System.Windows.Forms.Panel pnlpcinfo; - private System.Windows.Forms.Button btnpoweroff; - private System.Windows.Forms.Button btnupgrade; - private System.Windows.Forms.Label lbpcinfo; - private System.Windows.Forms.Label lbmoduletitle; - private System.Windows.Forms.Button btncloseinfo; - private System.Windows.Forms.Label lbtargets; - private System.Windows.Forms.Button btnnext; - private System.Windows.Forms.Label lbtutorial; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Hacking_YourHealth.cs b/source/WindowsFormsApplication1/Hacking_YourHealth.cs deleted file mode 100644 index b6689fc..0000000 --- a/source/WindowsFormsApplication1/Hacking_YourHealth.cs +++ /dev/null @@ -1,950 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Hacking_YourHealth : Form - { - public Hacking_YourHealth() - { - InitializeComponent(); - } - - public Hacking_YourHealth(EnemyHacker enemy) - { - EnemyNet = enemy; - InitializeComponent(); - } - - public Computer ThisPC = null; - public Hacking_Enemy EnemyScreen = null; - public EnemyHacker EnemyNet = null; - private decimal TotalHP = 0; - - private List<Module> MyNetwork = new List<Module>(); - - private void Hacking_YourHealth_Load(object sender, EventArgs e) - { - AntiVirusBounds = new List<Rectangle>(); - TutorialNetwork.Add(new Module(SystemType.Core, 1, "localhost")); - foreach(var m in GetMyNet()) - { - if(m.Type == SystemType.Core) - { - MyNetwork.Add(m); - } - } - VisualizeNetwork(); - if (EnemyNet != null) - { - var h = new Hacking_Enemy(this, EnemyNet); - tmrhealthdetect.Start(); - EnemyScreen = h; - API.CreateForm(h, "Enemy Hacker", Properties.Resources.iconTerminal); - - } - else - { - var h = new Hacking_Enemy(this, Hacking.EnemyHackers[new Random().Next(0, Hacking.EnemyHackers.Count - 1)]); - tmrhealthdetect.Start(); - EnemyScreen = h; - API.CreateForm(h, "Enemy Hacker", Properties.Resources.iconTerminal); - } - ThisPC.EnemyComputer = EnemyScreen.ThisPC; - if(IsTutorial) - { - SetupTutorialUI(0); - } - } - - private void VisualizeNetwork() - { - AllComputers = new List<Computer>(); - foreach(Module m in MyNetwork) - { - if (AllComputers.Count <= 10) - { - var c = m.Deploy(); - if (c.Type == SystemType.Core) - { - ThisPC = c; - } - AddModule(c); - } - } - } - - - - private void btnvirus_Click(object sender, EventArgs e) - { - ThisPC.EnemyComputer.LaunchAttack(AttackType.Virus); - } - - public List<Computer> AllComputers = null; - - private void tmrhealthdetect_Tick(object sender, EventArgs e) - { - var rnd = new Random(); - int chance = 0; - foreach(var pc in AllComputers) - { - if (pc.Disabled == false) - { - if (pc.Enemies != null) - { - foreach (var enemy in pc.Enemies) - { - if (EnemyScreen.AllComputers.Contains(enemy)) - { - chance = rnd.Next(1, 15); - if (chance == 7) - { - if (IsTutorial) - { - if (TutorialProgress == 32 || TutorialProgress == 9) - { - enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - } - else { - enemy.LaunchAttack(pc.GetProperType(), pc.GetDamageRate()); - } - } - } - } - } - } - } - decimal health = 0; - EnemyScreen.Enemy = this; - foreach (var pc in AllComputers) - { - health += (decimal)pc.HP; - } - if(health > TotalHP) - { - TotalHP = health; - } - decimal percent = (health / TotalHP) * 100; - lbstats.Text = $"System Health: {percent}%"; - if(ThisPC.HP <= 0) - { - API.CreateInfoboxSession("System compromised.", "The enemy hacker has overthrown your defenses and compromised your system. You will need to wait an hour before you can start another hack battle.", infobox.InfoboxMode.Info); - Hacking.Failure = true; - Hacking.FailDate = DateTime.Now; - UserRequestedClose = false; - this.Close(); - EnemyScreen.UserRequestedClose = false; - EnemyScreen.Close(); - this.Close(); - } - } - - public bool UserRequestedClose = true; - - private void this_Closing(object sender, FormClosingEventArgs e) - { - if (UserRequestedClose == false) - { - tmrhealthdetect.Stop(); - foreach (var pc in AllComputers) - { - pc.HP = 0; - } - } - } - - public Computer SelectedComputer = null; - - public void AddModule(Computer newModule) { - panel1.Controls.Add(newModule); - int hp = newModule.HP; - - TotalHP += newModule.HP; - AllComputers.Add(newModule); - newModule.Show(); - newModule.OnDestruction += (object s, EventArgs a) => - { - if (this.SelectedComputer == newModule) - { - SelectedComputer = null; - } - if(newModule.Type == SystemType.Firewall) - { - Firewall_Destroy(newModule); - } - AllComputers.Remove(newModule); - newModule.Dispose(); - }; - newModule.Select += (object s, EventArgs e) => - { - SelectedComputer = newModule; - ShowPCInfo(newModule.Hostname); - if(IsTutorial) - { - if(TutorialProgress == 6) - { - if(newModule == ThisPC) - { - SetupTutorialUI(7); - } - } - } - }; - newModule.HP_Decreased += new EventHandler(System_Damaged); - newModule.OnRepair += new EventHandler(System_Repaired); - if (newModule.Type == SystemType.Antivirus || newModule.Type == SystemType.RepairModule) - { - var b = newModule.GetAreaOfEffect(); - AntiVirusBounds.Add(b); - panel1.Refresh(); - newModule.AntivirusRepair += (object s, EventArgs a) => - { - foreach (Computer pc in AllComputers) - { - if (pc != newModule && pc.Bounds.IntersectsWith(b)) - { - if (newModule.Type == SystemType.RepairModule) - { - if (pc.HP < newModule.HP) - { - if (pc.HP < pc.GetTotal()) - { - pc.Repair(1); - } - } - - } - else { - if (pc.HP < 10) - { - pc.Repair(1); - } - } - } - } - }; - - } - if(newModule.Type == SystemType.Firewall) - { - var b = newModule.GetAreaOfEffect(); - AntiVirusBounds.Add(b); - panel1.Refresh(); - Firewall_Deflect(newModule); - } - if(newModule.Type == SystemType.ServerStack) - { - newModule.MassDDoS += (object s, EventArgs a) => - { - EnemyScreen.Worm(); - }; - } - } - - public void Worm() - { - var rnd = new Random(); - int r = rnd.Next(0, 10); - - foreach (Computer c in AllComputers) - { - if (r == 5) - { - c.Disable(); - } - } - } - - public void ShowPCInfo(string hostname) - { - Module mod = null; - foreach(var m in GetMyNet()) - { - if(m.Hostname == hostname) - { - mod = m; - } - } - if(mod != null) - { - pnlpcinfo.Show(); - lbmoduletitle.Text = "Module Info - " + hostname; - lbpcinfo.Text = $"Hostname: {hostname}{Environment.NewLine}Type: {mod.Type.ToString()}"; - if (mod.Type == SystemType.Core) - { - lbpcinfo.Text += Environment.NewLine + "This represents your main system. If this module is destroyed, you will automatically lose the battle. Protect it at all costs."; - btnupgrade.Hide(); - btnpoweroff.Hide(); - } - else { - lbpcinfo.Text += $"{Environment.NewLine}Grade: {mod.Grade}"; - if (mod.Grade < 4) - { - btnupgrade.Show(); - } - else - { - btnupgrade.Hide(); - } - btnpoweroff.Show(); - } - } - Computer c = null; - foreach(var pc in AllComputers) - { - if(pc.Hostname == hostname) - { - c = pc; - } - } - if(c != null) - { - lbtargets.Text = "Targets: "; - if (c.Enemies != null) - { - if(c.Enemies.Count > 0) - { - foreach(var pc in c.Enemies) - { - lbtargets.Text += " " + pc.Hostname + ","; - } - } - else - { - lbtargets.Text += " - Click on an enemy module to target it."; - } - } - else - { - lbtargets.Text += " - Click on an enemy module to target it."; - } - lbtargets.Text += Environment.NewLine + "Some modules will not fire at their targets."; - } - } - - public void Firewall_Deflect(Computer fwall) - { - //Safegaurd... - if(fwall.Type == SystemType.Firewall) - { - var r = fwall.GetAreaOfEffect(); - foreach(var pc in AllComputers) - { - if (pc != fwall) - { - if (pc.Bounds.IntersectsWith(r)) - { - pc.DamageDefector = fwall.Grade; - } - } - } - } - } - - public void Firewall_Destroy(Computer fwall) - { - //Safegaurd... - if (fwall.Type == SystemType.Firewall) - { - var r = fwall.GetAreaOfEffect(); - foreach (var pc in AllComputers) - { - if (pc.Bounds.IntersectsWith(r)) - { - pc.DamageDefector = 1; - UpdateFirewalls(); - } - } - } - } - - public void UpdateFirewalls() - { - foreach(var pc in AllComputers) - { - if(pc.Type == SystemType.Firewall) - { - Firewall_Deflect(pc); - } - } - } - - - private void System_Repaired(object s, EventArgs e) - { - var c = (Computer)s; - lbcompromised.Text = "System regenerating..."; - int location = c.Left - (lbcompromised.Width / 4); - int y = c.Top - 25; - lbcompromised.Location = new Point(location, y); - lbcompromised.Show(); - c.Flash(lbcompromised); - - } - - - private void System_Damaged(object s, EventArgs e) - { - var c = (Computer)s; - lbcompromised.Text = "System damaged!"; - int location = c.Left - (lbcompromised.Width / 4); - int y = c.Top - 25; - lbcompromised.Location = new Point(location, y); - lbcompromised.Show(); - c.Flash(lbcompromised); - } - - private void button1_Click(object sender, EventArgs e) - { - EnemyScreen.Worm(); - } - - private void btnaddmodule_Click(object sender, EventArgs e) - { - SetupModuleList(); - pnldefensemanager.Visible = !pnldefensemanager.Visible; - if(IsTutorial) - { - if(TutorialProgress == 12) - { - SetupTutorialUI(13); - } - } - } - - private Dictionary<string, SystemType> FutureModules = null; - public List<Module> TutorialNetwork = new List<Module>(); - - public void SetupModuleList() - { - FutureModules = new Dictionary<string, SystemType>(); - cmbmodules.Items.Clear(); - List<Module> net = null; - if(IsTutorial) - { - net = TutorialNetwork; - } - else - { - net = Hacking.MyNetwork; - } - foreach (var item in net) - { - Computer m = null; - foreach(var mod in AllComputers) - { - if(mod.Hostname == item.Hostname) - { - m = mod; - } - } - if (m == null) - { - cmbmodules.Items.Add(item.Hostname); - FutureModules.Add(item.Hostname, item.Type); - } - } - - } - - bool PlacingNewModule = false; - - - private void button1_Click_1(object sender, EventArgs e) - { - if (cmbmodules.Text != "") - { - PlacingNewModule = true; - pnldefensemanager.Hide(); - if (IsTutorial) - { - if (TutorialProgress == 20) - { - SetupTutorialUI(21); - } - } - } - } - - private void playfield_MouseDown(object sender, MouseEventArgs e) - { - if (PlacingNewModule == true) - { - if (e.Button == MouseButtons.Left) - { - if (AllComputers.Count < 10) - { - bool cont = true; - try - { - SystemType type = FutureModules[cmbmodules.Text]; - } - catch - { - cont = false; - API.CreateInfoboxSession("Error", "Please select a module type.", infobox.InfoboxMode.Info); - } - if (cont == true) - { - var coordinates = panel1.PointToClient(Cursor.Position); - int x = coordinates.X; - int y = coordinates.Y; - - var m = new Module(FutureModules[cmbmodules.Text], 1, cmbmodules.Text); - foreach (var mod in GetMyNet()) - { - if (mod.Hostname == cmbmodules.Text) - { - m = mod; - } - } - m.X = x; - m.Y = y; - var c = m.Deploy(); - AddModule(c); - API.RemoveCodepoints(10); - pnldefensemanager.Hide(); - if(IsTutorial) - { - if(TutorialProgress == 21) - { - SetupTutorialUI(22); - } - else if(TutorialProgress == 25) - { - SetupTutorialUI(26); - } - } - } - PlacingNewModule = false; - } - else - { - API.CreateInfoboxSession("Too much deployed modules", "You can have a maximum of 10 modules deployed on your network, including your main system. You will have to wait for one to be destroyed.", infobox.InfoboxMode.Info); - PlacingNewModule = false; - } - } - else - { - PlacingNewModule = false; - } - } - } - - public List<FutureModule> BuyableModules = null; - - public void SetupBuyable() - { - if(!IsTutorial) - { - BuyableModules = Hacking.GetFutureModules(); - } - cmbbuyable.Items.Clear(); - foreach(var m in BuyableModules) - { - cmbbuyable.Items.Add(m.Name); - } - lbmoduleinfo.Text = ""; - txtgrade.Text = "1"; - } - - private void btnbuy_Click(object sender, EventArgs e) - { - if(IsTutorial) - { - if(TutorialProgress == 14) - { - SetupTutorialUI(15); - } - } - SetupBuyable(); - pnlbuy.Show(); - pnldefensemanager.Hide(); - } - - public List<Rectangle> AntiVirusBounds = null; - public List<Rectangle> IndicatorsToDestroy = new List<Rectangle>(); - private void boundpaint(object sender, PaintEventArgs e) - { - foreach(Rectangle r in IndicatorsToDestroy) - { - AntiVirusBounds.Remove(r); - var sb = new SolidBrush(Color.Black); - var p = new Pen(sb); - p.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid; - p.Width = 2; - e.Graphics.DrawRectangle(p, r); - - } - IndicatorsToDestroy.Clear(); - foreach (Rectangle r in AntiVirusBounds) - { - IndicatorsToDestroy.Add(r); - tmrredraw.Start(); - var sb = new SolidBrush(Color.White); - var p = new Pen(sb); - p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; - p.Width = 2; - e.Graphics.DrawRectangle(p, r); - } - } - - private void tmrredraw_Tick(object sender, EventArgs e) - { - panel1.Refresh(); - tmrredraw.Stop(); - } - - private void SetupModuleInfo() - { - bool cont = false; - FutureModule m = null; - foreach(var mod in BuyableModules) - { - if(mod.Name == cmbbuyable.Text) - { - m = mod; - cont = true; - } - } - if(cont == true) - { - lbmoduleinfo.Text = m.Name; - lbmoduleinfo.Text += Environment.NewLine + $"Cost: {m.Cost * Convert.ToInt32(txtgrade.Text)} CP"; - lbmoduleinfo.Text += Environment.NewLine + $"Description: {Environment.NewLine}{m.Description}"; - } - } - - private void cmbbuyable_SelectedIndexChanged(object sender, EventArgs e) - { - SetupModuleInfo(); - if(IsTutorial) - { - if(TutorialProgress == 17) - { - if(cmbbuyable.Text == "Antivirus") - { - SetupTutorialUI(18); - } - } - } - } - - private void txtgrade_TextChanged(object sender, EventArgs e) - { - try - { - int g = Convert.ToInt32(txtgrade.Text); - if(g < 1) - { - txtgrade.Text = "1"; - } - else if(g > 4) - { - txtgrade.Text = "4"; - } - SetupModuleInfo(); - } - catch - { - txtgrade.Text = "1"; - SetupModuleInfo(); - } - } - - public List<Module> GetMyNet() - { - if(IsTutorial) - { - return TutorialNetwork; - } - else - { - return Hacking.MyNetwork; - } - } - - private void btndonebuying_Click(object sender, EventArgs e) - { - var mod = new FutureModule("", 0, "", SystemType.Core); - bool cont = false; - foreach(var m in BuyableModules) - { - if(m.Name == cmbbuyable.Text) - { - mod = m; - cont = true; - } - } - if(cont == true) - { - if(API.Codepoints >= mod.Cost) - { - if (txthostname.Text != "") - { - bool cont2 = true; - string hname = txthostname.Text.Replace(" ", "_"); - foreach (var pc in GetMyNet()) - { - if (pc.Hostname == hname) - { - cont2 = false; - } - } - if (cont2 == true) - { - GetMyNet().Add(new Module(mod.Type, Convert.ToInt32(txtgrade.Text), hname)); - API.RemoveCodepoints(mod.Cost); - API.CreateInfoboxSession("Module added.", "To deploy the module to the network, select 'Add Module' and choose the hostname from the menu.", infobox.InfoboxMode.Info); - pnlbuy.Hide(); - if(IsTutorial) - { - if(TutorialProgress == 19) - { - SetupTutorialUI(20); - } - else if(TutorialProgress == 24) - { - SetupTutorialUI(25); - } - } - } - else - { - API.CreateInfoboxSession("Please enter a unique hostname.", "No two computers can share the same hostname. Please choose another.", infobox.InfoboxMode.Info); - } - } - else - { - API.CreateInfoboxSession("Please enter a hostname.", "It is best to enter a hostname for your new computer so you know which one it is.", infobox.InfoboxMode.Info); - } - - } - else - { - API.CreateInfoboxSession("Insufficient Codepoints", "You do not have enough Codepoints to buy this module.", infobox.InfoboxMode.Info); - } - } - } - - private void btncloseinfo_Click(object sender, EventArgs e) - { - SelectedComputer = null; - pnlpcinfo.Hide(); - Hacking.SaveCharacters(); - } - - private void btnpoweroff_Click(object sender, EventArgs e) - { - //Remove the computer from the game. - panel1.Controls.Remove(SelectedComputer); - AllComputers.Remove(SelectedComputer); - btnpoweroff.Hide(); - } - - private void btnupgrade_Click(object sender, EventArgs e) - { - int price = 20 * SelectedComputer.Grade; - if(API.Codepoints >= price) - { - foreach(var m in GetMyNet()) - { - if(m.Hostname == SelectedComputer.Hostname) - { - SelectedComputer.Grade += 1; - m.Grade += 1; - Hacking.SaveCharacters(); - API.CreateInfoboxSession("Upgrade successful.", "Your module has been upgraded.", infobox.InfoboxMode.Info); - } - } - } - else - { - API.CreateInfoboxSession("Insufficient funds", $"You need at least {price} CP to upgrade this module.", infobox.InfoboxMode.Info); - } - ShowPCInfo(SelectedComputer.Hostname); - } - - public int TutorialProgress = 0; - public bool IsTutorial = false; - - public void SetupTutorialUI(int p) - { - TutorialProgress = p; - lbtutorial.Show(); - switch(p) - { - case 0: - lbtutorial.Text = "Welcome to the Hacker Battle tutorial. This guide will teach you the fundamentals and basics of taking part in a Hacker Battle. When you're done here, you'll have all you need for a very basic network."; - btnaddmodule.Hide(); - btnnext.Show(); - break; - case 1: - lbtutorial.Text = "When a battle commenses, you will see two windows. The one on the left, is your network. You can view information about all computers on the network, buy new systems, upgrade them and deploy them."; - break; - case 2: - lbtutorial.Text = "On the right is the enemy's network. This window will show you the strength (HP) of all enemy systems, and will allow you to target specific systems to take down."; - break; - case 3: - lbtutorial.Text = "On the top-left corner of both windows is the network health indicator. It will display a percentage of the entire network health."; - break; - case 4: - lbtutorial.Text = "If the enemy's total network health hits 0%, or his core's strength hits 0%, you win."; - break; - case 5: - lbtutorial.Text = "However, if the same happens to you, you will lose the battle."; - break; - case 6: - lbtutorial.Text = "You can click on your Core to view information about it."; - btnnext.Hide(); - break; - case 7: - lbtutorial.Text = "When you click on a module, you can see information about it, such as it's grade level, HP, and type. This module is a Core, so it has no grade level. It currently has 100 HP."; - btnnext.Show(); - break; - case 8: - lbtutorial.Text = "When a module is selected you can left-click an enemy module to target it. This will make the selected module attempt to fire at the target. Cores are very weak, but are capable of bringing a target down by 1 HP."; - break; - case 9: - lbtutorial.Text = "The enemy Core is attacking your Core now. Looks like it's time to fight back. Select your core, and target the enemy's Core to fight back."; - btnnext.Hide(); - break; - case 10: - lbtutorial.Text = "Phew! He couldn't do much damage before we fought back. In a real battle, modules won't just stop fighting randomly, but for the purpose of this tutorial, your Core will stop attacking the enemy Core."; - btnnext.Show(); - ThisPC.Enemies.Clear(); - break; - case 11: - lbtutorial.Text = "Should your Core fall to a fatal state in the future, you can deploy some defenses to slow the enemy down. Any hacker knows it's best to disable defenses before attacking the main target."; - ThisPC.HP = 5; - break; - case 12: - lbtutorial.Text = "We will look at ways of healing damaged modules now. You can add new modules to the network by clicking the [Add Module] button in the lower-left corner."; - btnaddmodule.Show(); - btnnext.Hide(); - break; - case 13: - lbtutorial.Text = "You can select a module from the list of hostnames. Only modules that are not powered on will display in the menu."; - btnnext.Show(); - BuyableModules = new List<FutureModule>(); - BuyableModules.Add(new FutureModule("Antivirus", 0, "This module will heal any other module within it's area of effect to 10 HP. Higher grades can improve it's area of effect.", SystemType.Antivirus)); - break; - case 14: - lbtutorial.Text = "In this demonstration, you have no other modules to deploy. You will need to buy some modules to get started. Click [Buy New Module] to continue."; - btnnext.Hide(); - break; - case 15: - lbtutorial.Text = "Let's go over the user interface, shall we? At the top is a list of all possible module types."; - btnnext.Show(); - btndonebuying.Hide(); - lbgrade.Hide(); - txtgrade.Hide(); - txthostname.Hide(); - lbhostname.Hide(); - lbmoduleinfo.Hide(); - break; - case 16: - lbtutorial.Text = "Below that, is the cost and description of the selected module type. It's invisible right now, but when you select a new module, it will populate."; - lbmoduleinfo.Show(); - break; - case 17: - lbtutorial.Text = "We need an Antivirus module, so go ahead and select it from the menu."; - btnnext.Hide(); - break; - case 18: - lbtutorial.Text = "Normally, an Antivirus would cost us 15 Codepoints, however since this is a tutorial, it is free."; - btnnext.Show(); - break; - case 19: - lbtutorial.Text = "Below the description is the Hostname box. A Hostname is used to identify the new module. Pick something you'll remember as this new Antivirus, then click [Buy] to purchase it."; - btnnext.Hide(); - lbhostname.Show(); - txthostname.Show(); - btndonebuying.Show(); - break; - case 20: - btnnext.Hide(); - lbtutorial.Text = "Now that we have an antivirus module, go ahead and deploy it by selecting [Add Module], choosing the hostname you entered, and clicking [Done]."; - break; - case 21: - btnnext.Hide(); - lbtutorial.Text = "Alrighty. Now you get to choose where you place your module. Simply left-click in a blank area where you'd like to place the module. Right-click to cancel. Oh, be sure to place close to our Core!"; - break; - case 22: - lbtutorial.Text = "The Antivirus has been placed. You may've noticed that white dotted box around it when you placed it. If the Core is even slightly within the box, the Antivirus will heal it back to 10 HP."; - btnnext.Show(); - break; - case 23: - lbtutorial.Text = "The higher the Antivirus' grade, the bigger this area of effect becomes. However, it will always only be able to heal modules to 10 HP."; - break; - case 24: - lbtutorial.Text = "A Turret has been added to the list of buyable modules. Go pick one up!"; - btnnext.Hide(); - BuyableModules.Clear(); - BuyableModules.Add(new FutureModule("Turret", 0, "It's not super-effective, but the Turret will blast through any Grade 1 defenses pretty quickly. The higher the grade, the higher the strength.", SystemType.Turret)); - break; - case 25: - lbtutorial.Text = "Turrets can fire damaging viruses at their targets. Go ahead and place your Turret somewhere within the Antivirus's Area of Effect."; - break; - case 26: - lbtutorial.Text = "Notice how the Turret only has 10 HP, just like the Antivirus?"; - btnnext.Show(); - break; - case 27: - lbtutorial.Text = "This is because both the Antivirus and Turret are at Grade 1. There are four grades of modules you can get, and you can easily upgrade by selecting a module and choosing [Upgrade This Module]."; - break; - case 28: - lbtutorial.Text = "Upgrading a module will increase it's max HP. Grade 1 is 10 HP, Grade 2 is 20 HP, Grade 3 is 40 HP, and Grade 4 is 80 HP."; - break; - case 29: - lbtutorial.Text = "Some modules will have a higher attack rate based on their grade. Others may throw more damaging attacks, and any module's Area of Effect (if it has one) will grow."; - break; - case 30: - lbtutorial.Text = "Another tip: Multiple modules can target the same module, and a module can have multiple targets. This means that you can have your Core and your Turret both attack the enemy Core."; - break; - case 31: - lbtutorial.Text = "Some modules do not work on a target-based system. Some may work using an area-of-effect system (like an Antivirus), and some may target the entire enemy network."; - break; - case 32: - lbtutorial.Text = "We have reset both your Cores' health. Go ahead and finish off the enemy Core using your newfound skills."; - ThisPC.HP = 100; - EnemyScreen.ThisPC.HP = 100; - btnnext.Hide(); - BuyableModules = new List<FutureModule>(); - BuyableModules.Add(new FutureModule("Antivirus", 0, "This module will heal any other module within it's area of effect to 10 HP. Higher grades can improve it's area of effect.", SystemType.Antivirus)); - BuyableModules.Add(new FutureModule("Turret", 0, "It's not super-effective, but the Turret will blast through any Grade 1 defenses pretty quickly. The higher the grade, the higher the strength.", SystemType.Turret)); - break; - default: - lbtutorial.Text = "This concludes the Hacker Battle tutorial. Happy hunting, soldier. Just kidding. Stay safe."; - btnnext.Text = "Close"; - break; - } - } - - private void btnnext_Click(object sender, EventArgs e) - { - if(btnnext.Text == "Close") - { - UserRequestedClose = false; - this.Close(); - EnemyScreen.UserRequestedClose = false; - EnemyScreen.Close(); - } - SetupTutorialUI(TutorialProgress + 1); - } - } - - public enum ConnectionDirection - { - Left, Right, Top, Bottom, NoBridge - } -} diff --git a/source/WindowsFormsApplication1/Hacking_YourHealth.resx b/source/WindowsFormsApplication1/Hacking_YourHealth.resx deleted file mode 100644 index 1ba310a..0000000 --- a/source/WindowsFormsApplication1/Hacking_YourHealth.resx +++ /dev/null @@ -1,162 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="lbtutorial.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <data name="lbpcinfo.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <data name="label3.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <data name="lbmoduleinfo.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <metadata name="tmrhealthdetect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="tmrredraw.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>156, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/HijackScreen.Designer.cs b/source/WindowsFormsApplication1/HijackScreen.Designer.cs deleted file mode 100644 index 12e30ab..0000000 --- a/source/WindowsFormsApplication1/HijackScreen.Designer.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class HijackScreen - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.lblHijack = new System.Windows.Forms.Label(); - this.conversationtimer = new System.Windows.Forms.Timer(this.components); - this.textgen = new System.Windows.Forms.Timer(this.components); - this.lblhackwords = new System.Windows.Forms.Label(); - this.hackeffecttimer = new System.Windows.Forms.Timer(this.components); - this.BackgroundWorker1 = new System.ComponentModel.BackgroundWorker(); - this.btnskip = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // lblHijack - // - this.lblHijack.Anchor = System.Windows.Forms.AnchorStyles.None; - this.lblHijack.AutoSize = true; - this.lblHijack.BackColor = System.Drawing.Color.WhiteSmoke; - this.lblHijack.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblHijack.ForeColor = System.Drawing.Color.DimGray; - this.lblHijack.Location = new System.Drawing.Point(143, 193); - this.lblHijack.Name = "lblHijack"; - this.lblHijack.Size = new System.Drawing.Size(18, 25); - this.lblHijack.TabIndex = 0; - this.lblHijack.Text = "\\"; - // - // textgen - // - this.textgen.Interval = 20; - // - // lblhackwords - // - this.lblhackwords.AutoSize = true; - this.lblhackwords.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblhackwords.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblhackwords.ForeColor = System.Drawing.SystemColors.ButtonFace; - this.lblhackwords.Location = new System.Drawing.Point(0, 0); - this.lblhackwords.Name = "lblhackwords"; - this.lblhackwords.Size = new System.Drawing.Size(127, 18); - this.lblhackwords.TabIndex = 1; - this.lblhackwords.Text = "Hijack in progress"; - // - // hackeffecttimer - // - this.hackeffecttimer.Interval = 50; - // - // btnskip - // - this.btnskip.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnskip.ForeColor = System.Drawing.Color.White; - this.btnskip.Location = new System.Drawing.Point(566, 422); - this.btnskip.Name = "btnskip"; - this.btnskip.Size = new System.Drawing.Size(75, 23); - this.btnskip.TabIndex = 2; - this.btnskip.Text = "Skip"; - this.btnskip.UseVisualStyleBackColor = true; - this.btnskip.Visible = false; - this.btnskip.Click += new System.EventHandler(this.btnskip_Click); - // - // HijackScreen - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Silver; - this.ClientSize = new System.Drawing.Size(653, 457); - this.Controls.Add(this.btnskip); - this.Controls.Add(this.lblhackwords); - this.Controls.Add(this.lblHijack); - this.Name = "HijackScreen"; - this.Text = "ShiftOS"; - this.TransparencyKey = System.Drawing.Color.White; - this.Load += new System.EventHandler(this.HijackScreen_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - internal System.Windows.Forms.Label lblHijack; - internal System.Windows.Forms.Timer conversationtimer; - internal System.Windows.Forms.Timer textgen; - internal System.Windows.Forms.Label lblhackwords; - internal System.Windows.Forms.Timer hackeffecttimer; - internal System.ComponentModel.BackgroundWorker BackgroundWorker1; - #endregion - - private System.Windows.Forms.Button btnskip; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/HijackScreen.cs b/source/WindowsFormsApplication1/HijackScreen.cs deleted file mode 100644 index e234514..0000000 --- a/source/WindowsFormsApplication1/HijackScreen.cs +++ /dev/null @@ -1,723 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class HijackScreen : Form - { - public HijackScreen() - { - InitializeComponent(); - } - - - string rtext; - string gtexttotype; - int charcount; - int currentletter; - int slashcount; - int conversationcount = 0; - Label textgeninput; - bool needtoclose = false; - public bool upgraded = false; - FileStream fs; - int hackeffect; - int percentcount; - - // ERROR: Handles clauses are not supported in C# - private void HijackScreen_Load(object sender, EventArgs e) - { - hackeffecttimer.Tick += new EventHandler(hackeffecttimer_Tick); - conversationtimer.Tick += new EventHandler(conversationtimer_Tick); - textgen.Tick += new EventHandler(textgen_Tick); - - this.FormBorderStyle = FormBorderStyle.None; - this.WindowState = FormWindowState.Maximized; - BackgroundWorker1.RunWorkerAsync(); - conversationtimer.Start(); - hackeffecttimer.Start(); - } - - private void TextType(string texttotype) - { - conversationtimer.Stop(); - charcount = texttotype.Length; - gtexttotype = texttotype; - currentletter = 0; - slashcount = 1; - textgen.Start(); - } - - - // ERROR: Handles clauses are not supported in C# - private void textgen_Tick(object sender, EventArgs e) - { - switch (slashcount) - { - case 1: - if (currentletter < gtexttotype.Length) - { - textgeninput.Text = rtext + "\\"; - } - - break; - case 2: - if (currentletter < gtexttotype.Length) - { - textgeninput.Text = rtext + "|"; - } - - break; - case 3: - if (currentletter < gtexttotype.Length) - { - textgeninput.Text = rtext + "/"; - } - - break; - case 4: - if (currentletter < gtexttotype.Length) - { - rtext = rtext + gtexttotype.Substring(currentletter, 1); - currentletter = currentletter + 1; - textgeninput.Text = rtext; - API.PlaySound(Properties.Resources.typesound); - } - break; - } - - slashcount = slashcount + 1; - - if (slashcount == 5) - slashcount = 1; - if (currentletter == gtexttotype.Length) - { - gtexttotype = ""; - conversationtimer.Start(); - textgen.Stop(); - } - - - } - - // ERROR: Handles clauses are not supported in C# - private void conversationtimer_Tick(object sender, EventArgs e) - { - switch (conversationcount) - { - case 0: - if (needtoclose == true) - this.Close(); - break; - case 1: - - textgeninput = lblHijack; - TextType("Your computer is now being Hijacked"); - conversationtimer.Interval = 1000; - - break; - case 3: - textgeninput = lblhackwords; - textgen.Interval = 10; - rtext = ""; - btnskip.Show(); - TextType("Congratulations, you have been involuntarily selected to be an Alpha Tester for ShiftOS." + Environment.NewLine + Environment.NewLine); - break; - case 4: - TextType("At this current point in time I do not wish to reveal my identity or future intentions." + Environment.NewLine + Environment.NewLine); - break; - case 5: - TextType("I just need to use you and your computer as an external test bed to evolve my experimental operating system." + Environment.NewLine + Environment.NewLine); - break; - case 6: - TextType("Right now ShiftOS is practically non-existent but I’ll work on coding it remotely as you use it." + Environment.NewLine + Environment.NewLine); - break; - case 7: - TextType("Your hard drive will now be formatted in preparation for the installation of ShiftOS" + Environment.NewLine + Environment.NewLine); - break; - case 8: - TextType("Starting Format."); - conversationtimer.Interval = 500; - break; - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - TextType("."); - break; - case 19: - rtext = ""; - break; - case 20: - TextType("Scanning System Drive..."); - break; - case 21: - TextType(Environment.NewLine + Environment.NewLine + "Current OS: " + OSInfo.GetPlatformID().Replace("microsoft", "Windows")); - break; - case 22: - if(OSInfo.GetPlatformID() == "microsoft") - { - var dinf = new DriveInfo(Environment.GetFolderPath(Environment.SpecialFolder.Windows).Substring(0, 3)); - TextType(Environment.NewLine + $"Mountpoint and File System: {dinf.Name} ({dinf.DriveFormat})"); - } - break; - case 23: - if (OSInfo.GetPlatformID() == "microsoft") - { - var dinf = new DriveInfo(Environment.GetFolderPath(Environment.SpecialFolder.Windows).Substring(0, 3)); - TextType(Environment.NewLine + $"Size: {dinf.TotalFreeSpace} free, {dinf.TotalSize} total"); - } - break; - case 24: - TextType(Environment.NewLine + "New File System: ShiftFS"); - break; - case 25: - TextType(Environment.NewLine + Environment.NewLine + "Formatting system drive - "); - conversationtimer.Interval = 100; - break; - case 26: - case 28: - case 30: - case 32: - case 36: - case 38: - case 40: - case 42: - case 44: - case 46: - case 48: - case 50: - case 52: - case 54: - case 56: - case 58: - case 60: - case 62: - case 64: - case 66: - case 68: - case 70: - case 72: - case 74: - case 76: - case 78: - case 80: - case 82: - case 84: - case 86: - case 88: - case 90: - case 92: - case 94: - case 96: - case 98: - case 100: - case 102: - case 104: - case 106: - case 108: - case 110: - case 112: - case 114: - case 116: - case 118: - case 120: - case 122: - case 124: - case 126: - textgeninput.Text = rtext + percentcount + "%"; - if (percentcount < 101) - { - percentcount += 2; - API.PlaySound(Properties.Resources.writesound); - } - break; - case 127: - rtext = rtext + "100%"; - conversationtimer.Interval = 1000; - break; - case 128: - TextType(Environment.NewLine + "Format Complete"); - break; - case 129: - rtext = ""; - percentcount = 0; - TextType("Installing ShiftOS Alpha 0.0.1 - "); - conversationtimer.Interval = 200; - break; - case 130: - case 131: - case 132: - case 133: - case 134: - case 135: - case 136: - case 137: - case 138: - case 139: - case 140: - case 141: - case 142: - case 143: - case 144: - case 145: - case 146: - case 147: - case 148: - case 149: - case 150: - case 151: - case 152: - case 153: - case 154: - case 155: - case 156: - case 157: - case 158: - case 159: - case 160: - case 161: - case 162: - case 163: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 170: - case 171: - case 172: - case 173: - case 174: - case 175: - case 176: - case 177: - case 178: - case 179: - case 180: - case 181: - case 182: - case 183: - case 184: - case 185: - case 186: - case 187: - case 188: - case 189: - case 190: - case 191: - case 192: - case 193: - case 194: - case 195: - case 196: - case 197: - case 198: - case 199: - case 200: - case 201: - case 202: - case 203: - case 204: - case 205: - case 206: - case 207: - case 208: - case 209: - case 210: - case 211: - case 212: - case 213: - case 214: - case 215: - case 216: - case 217: - case 218: - case 219: - case 220: - case 221: - case 222: - case 223: - case 224: - case 225: - case 226: - case 227: - case 228: - case 229: - case 230: - - textgeninput.Text = rtext + percentcount + "%" + Environment.NewLine + Environment.NewLine; - if (percentcount < 101) - { - percentcount = percentcount + 1; - API.PlaySound(Properties.Resources.writesound); - } - switch (percentcount) - { - case 1: - case 2: - textgeninput.Text = textgeninput.Text + "/Home"; - if ((!System.IO.Directory.Exists(Paths.Home))) - System.IO.Directory.CreateDirectory(Paths.Home); - break; - case 3: - case 4: - textgeninput.Text = textgeninput.Text + "/Home/Documents"; - if ((!System.IO.Directory.Exists(Paths.Documents))) - System.IO.Directory.CreateDirectory(Paths.Documents); - break; - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - textgeninput.Text = textgeninput.Text + "/Home/Music"; - if ((!System.IO.Directory.Exists(Paths.Music))) - System.IO.Directory.CreateDirectory(Paths.Music); - break; - case 13: - case 14: - case 15: - textgeninput.Text = textgeninput.Text + "/Home/Pictures"; - if ((!System.IO.Directory.Exists(Paths.Pictures))) - System.IO.Directory.CreateDirectory(Paths.Pictures); - break; - case 16: - case 17: - case 18: - textgeninput.Text = textgeninput.Text + "/Shiftum42"; - if ((!System.IO.Directory.Exists(Paths.SystemDir))) - System.IO.Directory.CreateDirectory(Paths.SystemDir); - break; - case 19: - case 20: - textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers"; - if ((!System.IO.Directory.Exists(Paths.Drivers))) - System.IO.Directory.CreateDirectory(Paths.Drivers); - break; - case 21: - case 22: - case 23: - case 24: - case 25: - case 26: - case 27: - textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/HDD.dri"; - break; - case 28: - case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - case 35: - textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/Keyboard.dri"; - fs = File.Create(Paths.Drivers + "Keyboard.dri"); - fs.Close(); - break; - case 36: - case 37: - case 38: - case 39: - case 40: - case 41: - case 42: - case 43: - case 44: - textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/Monitor.dri"; - fs = File.Create(Paths.Drivers + "Monitor.dri"); - fs.Close(); - break; - case 45: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/Mouse.dri"; - fs = File.Create(Paths.Drivers + "Mouse.dri"); - fs.Close(); - break; - case 53: - case 54: - case 55: - case 56: - case 57: - case 58: - case 59: - case 60: - textgeninput.Text = textgeninput.Text + "/Shiftum42/Drivers/Printer.dri"; - fs = File.Create(Paths.Drivers + "Printer.dri"); - fs.Close(); - break; - case 61: - case 62: - case 63: - case 64: - case 65: - case 66: - case 67: - case 68: - textgeninput.Text = textgeninput.Text + "/Shiftum42/Languages/"; - if ((!System.IO.Directory.Exists(Paths.SystemDir + "Languages"))) - System.IO.Directory.CreateDirectory(Paths.SystemDir + "Languages"); - break; - case 69: - case 70: - case 71: - case 72: - case 73: - case 74: - case 75: - case 76: - textgeninput.Text = textgeninput.Text + "/Shiftum42/Languages/Current.lang"; - fs = File.Create(Paths.SystemDir + "Languages/Current.lang"); - fs.Close(); - break; - case 77: - case 78: - case 79: - case 80: - case 81: - case 82: - case 83: - case 84: - textgeninput.Text = textgeninput.Text + "/Shiftum42/HDAccess.sft"; - break; - case 85: - case 86: - case 87: - case 88: - case 89: - textgeninput.Text = textgeninput.Text + "/Shiftum42/ShiftGUI.sft"; - fs = File.Create(Paths.SystemDir + "ShiftGUI.sft"); - fs.Close(); - break; - case 90: - case 91: - case 92: - case 93: - textgeninput.Text = textgeninput.Text + "/Shiftum42/SKernal.sft"; - fs = File.Create(Paths.SystemDir + "SKernal.sft"); - fs.Close(); - break; - case 94: - case 95: - case 96: - case 97: - textgeninput.Text = textgeninput.Text + "/Shiftum42/SRead.sft"; - fs = File.Create(Paths.SystemDir + "SRead.sft"); - fs.Close(); - break; - case 98: - case 99: - case 100: - case 101: - textgeninput.Text = textgeninput.Text + "/Shiftum42/SWrite.sft"; - fs = File.Create(Paths.SystemDir + "SWrite.sft"); - fs.Close(); - break; - } - - break; - - case 231: - textgeninput.Text = rtext + "100%" + Environment.NewLine + Environment.NewLine + "/Shiftum42/SWrite.sft"; - conversationtimer.Interval = 1000; - API.PlaySound(Properties.Resources.writesound); - break; - case 232: - textgeninput.Text = rtext + "100%" + Environment.NewLine + Environment.NewLine + "ShiftOS Installation Complete!"; - API.PlaySound(Properties.Resources.typesound); - if ((!System.IO.Directory.Exists(Paths.SoftwareData))) - System.IO.Directory.CreateDirectory(Paths.SoftwareData); - if ((!System.IO.Directory.Exists(Paths.KnowledgeInput))) - System.IO.Directory.CreateDirectory(Paths.KnowledgeInput); - break; - case 234: - SaveSystem.Utilities.LoadedSave.newgame = false; - API.CurrentSession.Opacity = 100; - Terminal term = new Terminal(); - term.Show(); - term.tmrfirstrun.Start(); - this.Close(); - - break; - } - conversationcount = conversationcount + 1; - } - - // ERROR: Handles clauses are not supported in C# - private void hackeffecttimer_Tick(object sender, EventArgs e) - { - if (hackeffect < 101) - { - switch (hackeffect) - { - case 1: - case 3: - case 5: - case 7: - case 9: - case 11: - case 13: - case 15: - case 17: - case 19: - case 21: - case 23: - case 25: - case 27: - case 29: - case 31: - case 33: - case 35: - case 37: - case 39: - case 41: - case 43: - case 45: - case 47: - case 49: - case 51: - case 53: - case 55: - case 57: - case 59: - case 61: - case 63: - case 65: - case 67: - case 69: - case 71: - case 73: - case 75: - case 77: - case 79: - case 81: - case 83: - case 85: - case 87: - case 89: - case 91: - case 93: - case 95: - this.BackColor = Color.Magenta; - this.TransparencyKey = Color.Magenta; - API.PlaySound(Properties.Resources.writesound); - this.TopMost = true; - break; - case 2: - case 4: - case 6: - case 8: - case 10: - case 12: - case 14: - case 16: - case 18: - case 20: - case 22: - case 24: - case 26: - case 28: - this.BackColor = Color.Magenta; - API.PlaySound(Properties.Resources.typesound); - break; - case 30: - case 32: - case 34: - case 36: - case 38: - case 40: - case 42: - case 44: - case 46: - case 48: - case 50: - this.BackColor = Color.Magenta; - API.PlaySound(Properties.Resources.typesound); - break; - case 52: - case 54: - case 56: - case 58: - case 60: - case 62: - case 64: - case 66: - case 68: - case 70: - case 72: - case 74: - case 76: - this.BackColor = Color.Magenta; - API.PlaySound(Properties.Resources.typesound); - - break; - case 78: - case 80: - case 82: - case 84: - case 86: - case 88: - case 90: - case 92: - case 94: - this.BackColor = Color.DimGray; - API.PlaySound(Properties.Resources.typesound); - - break; - case 96: - lblHijack.BackColor = Color.LightGray; - break; - case 97: - lblHijack.BackColor = Color.DarkGray; - break; - case 98: - lblHijack.BackColor = Color.DimGray; - break; - case 99: - this.BackColor = Color.Black; - lblHijack.BackColor = Color.Black; - lblHijack.ForeColor = Color.DimGray; - break; - case 100: - lblHijack.Hide(); - break; - } - } - else { - hackeffecttimer.Stop(); - } - hackeffect = hackeffect + 1; - } - - private void btnskip_Click(object sender, EventArgs e) - { - conversationcount = 19; - btnskip.Hide(); - } - } -} diff --git a/source/WindowsFormsApplication1/HijackScreen.resx b/source/WindowsFormsApplication1/HijackScreen.resx deleted file mode 100644 index 89116b6..0000000 --- a/source/WindowsFormsApplication1/HijackScreen.resx +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="conversationtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="textgen.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>167, 17</value> - </metadata> - <metadata name="hackeffecttimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>260, 17</value> - </metadata> - <metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>396, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/HoloChat.Designer.cs b/source/WindowsFormsApplication1/HoloChat.Designer.cs deleted file mode 100644 index 6f040ec..0000000 --- a/source/WindowsFormsApplication1/HoloChat.Designer.cs +++ /dev/null @@ -1,254 +0,0 @@ -namespace ShiftOS -{ - partial class HoloChat - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HoloChat)); - this.panel1 = new System.Windows.Forms.Panel(); - this.pnlintro = new System.Windows.Forms.Panel(); - this.flintrobuttons = new System.Windows.Forms.FlowLayoutPanel(); - this.btnconnect = new System.Windows.Forms.Button(); - this.btnrefresh = new System.Windows.Forms.Button(); - this.lbrooms = new System.Windows.Forms.ListBox(); - this.label1 = new System.Windows.Forms.Label(); - this.lblintro = new System.Windows.Forms.Label(); - this.lblheader = new System.Windows.Forms.Label(); - this.txtchat = new System.Windows.Forms.RichTextBox(); - this.txtsend = new System.Windows.Forms.TextBox(); - this.pnlusers = new System.Windows.Forms.Panel(); - this.lbusers = new System.Windows.Forms.ListBox(); - this.lbtopic = new System.Windows.Forms.Label(); - this.tmrui = new System.Windows.Forms.Timer(this.components); - this.panel1.SuspendLayout(); - this.pnlintro.SuspendLayout(); - this.flintrobuttons.SuspendLayout(); - this.pnlusers.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.White; - this.panel1.Controls.Add(this.pnlintro); - this.panel1.Controls.Add(this.txtchat); - this.panel1.Controls.Add(this.txtsend); - this.panel1.Controls.Add(this.pnlusers); - this.panel1.Controls.Add(this.lbtopic); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.ForeColor = System.Drawing.Color.Black; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(772, 431); - this.panel1.TabIndex = 0; - // - // pnlintro - // - this.pnlintro.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlintro.Controls.Add(this.flintrobuttons); - this.pnlintro.Controls.Add(this.lbrooms); - this.pnlintro.Controls.Add(this.label1); - this.pnlintro.Controls.Add(this.lblintro); - this.pnlintro.Controls.Add(this.lblheader); - this.pnlintro.Location = new System.Drawing.Point(36, 35); - this.pnlintro.Name = "pnlintro"; - this.pnlintro.Size = new System.Drawing.Size(706, 341); - this.pnlintro.TabIndex = 3; - // - // flintrobuttons - // - this.flintrobuttons.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flintrobuttons.Controls.Add(this.btnconnect); - this.flintrobuttons.Controls.Add(this.btnrefresh); - this.flintrobuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.flintrobuttons.Location = new System.Drawing.Point(337, 284); - this.flintrobuttons.Name = "flintrobuttons"; - this.flintrobuttons.Size = new System.Drawing.Size(350, 42); - this.flintrobuttons.TabIndex = 4; - // - // btnconnect - // - this.btnconnect.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnconnect.Location = new System.Drawing.Point(272, 3); - this.btnconnect.Name = "btnconnect"; - this.btnconnect.Size = new System.Drawing.Size(75, 33); - this.btnconnect.TabIndex = 0; - this.btnconnect.Text = "Connect"; - this.btnconnect.UseVisualStyleBackColor = true; - this.btnconnect.Click += new System.EventHandler(this.btnconnect_Click); - // - // btnrefresh - // - this.btnrefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnrefresh.Location = new System.Drawing.Point(191, 3); - this.btnrefresh.Name = "btnrefresh"; - this.btnrefresh.Size = new System.Drawing.Size(75, 33); - this.btnrefresh.TabIndex = 1; - this.btnrefresh.Text = "Refresh"; - this.btnrefresh.UseVisualStyleBackColor = true; - this.btnrefresh.Click += new System.EventHandler(this.btnrefresh_Click); - // - // lbrooms - // - this.lbrooms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbrooms.FormattingEnabled = true; - this.lbrooms.Location = new System.Drawing.Point(337, 75); - this.lbrooms.Name = "lbrooms"; - this.lbrooms.Size = new System.Drawing.Size(350, 199); - this.lbrooms.TabIndex = 3; - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); - this.label1.Location = new System.Drawing.Point(342, 38); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(330, 34); - this.label1.TabIndex = 2; - this.label1.Text = "Choose a Room"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblintro - // - this.lblintro.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.lblintro.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.lblintro.Location = new System.Drawing.Point(4, 38); - this.lblintro.Name = "lblintro"; - this.lblintro.Size = new System.Drawing.Size(289, 288); - this.lblintro.TabIndex = 1; - this.lblintro.Text = resources.GetString("lblintro.Text"); - this.lblintro.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblheader - // - this.lblheader.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblheader.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F); - this.lblheader.Location = new System.Drawing.Point(4, 4); - this.lblheader.Name = "lblheader"; - this.lblheader.Size = new System.Drawing.Size(699, 34); - this.lblheader.TabIndex = 0; - this.lblheader.Text = "Welcome to HoloChat!"; - this.lblheader.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // txtchat - // - this.txtchat.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtchat.Location = new System.Drawing.Point(0, 23); - this.txtchat.Name = "txtchat"; - this.txtchat.ReadOnly = true; - this.txtchat.Size = new System.Drawing.Size(641, 388); - this.txtchat.TabIndex = 2; - this.txtchat.Text = ""; - this.txtchat.TextChanged += new System.EventHandler(this.txtchat_TextChanged); - // - // txtsend - // - this.txtsend.Dock = System.Windows.Forms.DockStyle.Bottom; - this.txtsend.Location = new System.Drawing.Point(0, 411); - this.txtsend.Name = "txtsend"; - this.txtsend.Size = new System.Drawing.Size(641, 20); - this.txtsend.TabIndex = 1; - this.txtsend.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtsend_KeyDown); - // - // pnlusers - // - this.pnlusers.Controls.Add(this.lbusers); - this.pnlusers.Dock = System.Windows.Forms.DockStyle.Right; - this.pnlusers.Location = new System.Drawing.Point(641, 23); - this.pnlusers.Name = "pnlusers"; - this.pnlusers.Size = new System.Drawing.Size(131, 408); - this.pnlusers.TabIndex = 0; - // - // lbusers - // - this.lbusers.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbusers.FormattingEnabled = true; - this.lbusers.Location = new System.Drawing.Point(0, 0); - this.lbusers.Name = "lbusers"; - this.lbusers.Size = new System.Drawing.Size(131, 408); - this.lbusers.TabIndex = 0; - // - // lbtopic - // - this.lbtopic.Dock = System.Windows.Forms.DockStyle.Top; - this.lbtopic.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.lbtopic.Location = new System.Drawing.Point(0, 0); - this.lbtopic.Name = "lbtopic"; - this.lbtopic.Size = new System.Drawing.Size(772, 23); - this.lbtopic.TabIndex = 4; - this.lbtopic.Text = "Welcome to HoloChat!"; - this.lbtopic.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // tmrui - // - this.tmrui.Tick += new System.EventHandler(this.tmrui_Tick); - // - // HoloChat - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(772, 431); - this.Controls.Add(this.panel1); - this.Name = "HoloChat"; - this.Text = "HoloChat"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.me_Closing); - this.Load += new System.EventHandler(this.HoloChat_Load); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.pnlintro.ResumeLayout(false); - this.flintrobuttons.ResumeLayout(false); - this.pnlusers.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.RichTextBox txtchat; - private System.Windows.Forms.TextBox txtsend; - private System.Windows.Forms.Panel pnlusers; - private System.Windows.Forms.ListBox lbusers; - private System.Windows.Forms.Panel pnlintro; - private System.Windows.Forms.FlowLayoutPanel flintrobuttons; - private System.Windows.Forms.Button btnconnect; - private System.Windows.Forms.Button btnrefresh; - private System.Windows.Forms.ListBox lbrooms; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label lblintro; - private System.Windows.Forms.Label lblheader; - private System.Windows.Forms.Timer tmrui; - private System.Windows.Forms.Label lbtopic; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/HoloChat.cs b/source/WindowsFormsApplication1/HoloChat.cs deleted file mode 100644 index 1795d7b..0000000 --- a/source/WindowsFormsApplication1/HoloChat.cs +++ /dev/null @@ -1,666 +0,0 @@ -using NetSockets; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class HoloChat : Form - { - /// <summary> - /// Front-end for the HoloChat chat system. - /// </summary> - public HoloChat() - { - InitializeComponent(); - } - - public ChatClient Client = null; - public Dictionary<string, string> IPs = null; - - private void HoloChat_Load(object sender, EventArgs e) - { - SetupUI(); - tmrui.Start(); - } - - /// <summary> - /// Sets up the HoloCHat UI. - /// </summary> - public void SetupUI() - { - if (!API.LimitedMode) - { - IPs = new Dictionary<string, string>(); - lbrooms.Items.Clear(); - this.Invoke(new Action(() => - { - if (API.Upgrades["networkbrowser"] == false) - { - lbrooms.Items.Add(Hacker_Alliance.Name); - } - })); - - foreach (var client in Package_Grabber.clients) - { - if (client.Value.IsConnected) - { - client.Value.OnReceived += (object s, NetReceivedEventArgs<NetObject> a) => - { - try - { - if (!IPs.ContainsKey(client.Key)) - { - var obj = (ObjectModel)a.Data.Object; - if (obj.Command == "name") - { - string name = (string)obj.OptionalObject; - IPs.Add(client.Key, name); - } - } - else - { - var obj = (ObjectModel)a.Data.Object; - if (obj.Command == "name") - { - string name = (string)obj.OptionalObject; - IPs[client.Key] = name; - } - } - this.Invoke(new Action(() => - { - string r = ""; - foreach (string room in lbrooms.Items) - { - if (room == IPs[client.Key]) - { - r = room; - } - } - if (r == "") - { - lbrooms.Items.Add(IPs[client.Key]); - } - })); - } - catch - { - - } - }; - Package_Grabber.SendMessage(client.Key, "chat get_name"); - } - } - - } - else - { - if (FinalMission.EndGameHandler.FakeHoloChatRoom != null) - { - lbrooms.Items.Clear(); - lbrooms.Items.Add(FinalMission.EndGameHandler.FakeHoloChatRoom.Name); - } - } - } - - private FakeChatClient Hacker_Alliance - { - get - { - var r = new FakeChatClient(); - r.Name = "The Hacker Alliance"; - r.OtherCharacters = new List<string>(); - if (!API.Upgrades["networkbrowser"]) - { - r.OtherCharacters.Add("Richard Ladouceur"); //Dear djdeedahx0 and other non-ShiftOS members: DEAL with the last name - I'm not creative. - Michael - r.OtherCharacters.Add("Hacker101"); - r.Messages = JsonConvert.DeserializeObject<Dictionary<string, string>>(Properties.Resources.MidGame_Holochat); - r.Topic = "The Hacker Alliance - Please welcome our newest user!"; - } - return r; - - } - } - - private void btnconnect_Click(object sender, EventArgs e) - { - if(lbrooms.SelectedItem != null) - { - if (!API.LimitedMode) - { - string topic = (string)lbrooms.SelectedItem; - if (topic == Hacker_Alliance.Name) - { - SetupFakeClient(Hacker_Alliance); - } - else - { - string ip = ""; - foreach (var obj in IPs) - { - if (obj.Value == topic) - { - ip = obj.Key; - } - } - if (ip != "") - { - API.CreateInfoboxSession("Choose a Nickname", "Please enter a nick name.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetInfoboxResult(); - if (res != "fail") - { - SetupClient(ip, res); - } - }; - } - } - } - else - { - if((string)lbrooms.SelectedItem == FinalMission.EndGameHandler.FakeHoloChatRoom.Name) - { - SetupFakeClient(FinalMission.EndGameHandler.FakeHoloChatRoom); - } - } - } - } - - /// <summary> - /// Set up a new client. - /// </summary> - /// <param name="address">IP address.</param> - /// <param name="nick">User nickname.</param> - public void SetupClient(string address, string nick) - { - var c = new ChatClient(address, nick); - c.OnMessageReceive += (object s, EventArgs a) => - { - var obj = (ChatMessage)s; - this.Invoke(new Action(() => - { - txtchat.AppendText(Environment.NewLine + $"<{obj.User.Name}> {obj.Text}"); - })); - c.GetUsers(); - }; - c.OnUserListReceived += (object s, EventArgs a) => - { - var obj = (List<ChatUser>)s; - this.Invoke(new Action(() => - { - lbusers.Items.Clear(); - foreach (var user in obj) - { - lbusers.Items.Add(user.Name); - } - })); - }; - c.OnUserJoin += (object s, EventArgs a) => - { - var obj = (ChatUser)s; - this.Invoke(new Action(() => - { - - txtchat.AppendText(Environment.NewLine + $"{obj.Name} has joined this room."); - })); - c.GetUsers(); - }; - c.OnTopicReceived += (object s, EventArgs a) => - { - string topic = (string)s; - this.Invoke(new Action(() => - { - lbtopic.Text = topic; - })); - }; - c.OnUserLeave += (object s, EventArgs a) => - { - var obj = (ChatUser)s; - this.Invoke(new Action(() => - { - txtchat.AppendText(Environment.NewLine + $"{obj.Name} has left this room."); - })); - c.GetUsers(); - }; - c.GetUsers(); - c.GetTopic(); - Client = c; - - } - - public void SetupFakeClient(FakeChatClient fClient) - { - lbtopic.Text = fClient.Topic; - var t = new System.Windows.Forms.Timer(); - t.Interval = 500; - t.Tick += (object s, EventArgs a) => - { - //userlist - lbusers.Items.Clear(); - foreach (var user in fClient.OtherCharacters) - { - lbusers.Items.Add(user); - } - }; - t.Start(); - - int m = 0; - //message buffer - var mb = new System.Windows.Forms.Timer(); - mb.Tick += (object s, EventArgs a) => - { - string message = fClient.Messages.Keys.ElementAt(m); - string user = fClient.Messages[message]; - //show message on textbox - if (message.StartsWith("install:")) - { - try - { - string upg = message.Remove(0, 8); - API.Upgrades[upg] = true; - API.CurrentSession.SetupDesktop(); - } - catch - { - - } - } - else - { - txtchat.AppendText(Environment.NewLine + $"<{user}> {message}"); - } - if (m < fClient.Messages.Count - 1) - { - m += 1; - } - else - { - mb.Stop(); - //Completed the objective! - FinalMission.EndGameHandler.GoToNextObjective(); - } - }; - mb.Interval = 4000; - mb.Start(); - tmrui.Stop(); - pnlintro.Hide(); - } - - private void txtsend_KeyDown(object sender, KeyEventArgs e) - { - if(e.KeyCode == Keys.Enter) - { - e.SuppressKeyPress = true; - if (txtsend.Text != "") - { - if (txtsend.Text.ToLower() == "/disconnect") - { - Client.Leave(); - Client = null; - txtsend.Text = ""; - } - else { - Client.Send(txtsend.Text); - txtsend.Text = ""; - } - } - } - } - - private void me_Closing(object sender, FormClosingEventArgs e) - { - if(Client != null) - { - Client.Leave(); - } - } - - private void tmrui_Tick(object sender, EventArgs e) - { - if(Client == null) - { - pnlintro.Show(); - txtsend.Enabled = false; - } - else - { - pnlintro.Hide(); - txtsend.Enabled = true; - } - } - - private void btnrefresh_Click(object sender, EventArgs e) - { - SetupUI(); - } - - private void txtchat_TextChanged(object sender, EventArgs e) - { - txtchat.Select(txtchat.TextLength, 0); - txtchat.ScrollToCaret(); - txtsend.Focus(); - } - } - - public class ChatClient - { - #region Constructors - - /// <summary> - /// Creates a new chat client. - /// </summary> - /// <param name="IP">IP address</param> - /// <param name="nick">User nickname</param> - public ChatClient(string IP, string nick) - { - NetObjectClient c = null; - foreach(var client in Package_Grabber.clients) - { - if(client.Key == IP) - { - if(client.Value.IsConnected == true) - { - c = client.Value; - IP_Address = IP; - } - } - } - if(c != null) - { - c.OnReceived += (object s, NetReceivedEventArgs<NetObject> a) => - { - try { - var obj = (ObjectModel)a.Data.Object; - string[] args = obj.Command.Split(' '); - if (args[0] == "chat") - { - switch (args[1]) - { - case "userbanned": - try - { - var usr = (ChatUser)obj.OptionalObject; - if(usr.Name == nick) - { - API.CurrentSession.Invoke(new Action(() => - { - API.CreateInfoboxSession("You're banned.", "You have been banned from this chat.", infobox.InfoboxMode.Info); - Leave(); - })); - } - } - catch - { - - } - break; - case "auth_req": - try - { - var usr = (ChatUser)obj.OptionalObject; - if (usr.Name == nick) - { - Thread.Sleep(1000); - API.CurrentSession.Invoke(new Action(() => - { - API.CreateInfoboxSession("Enter Password", "Please enter your password.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (object sen, FormClosingEventArgs arg) => - { - var result = API.GetInfoboxResult(); - AuthenticateWithServer(usr.Name, result); - }; - })); - } - } - catch - { - - } - break; - case "auth_fail": - try - { - var usr = (ChatUser)obj.OptionalObject; - if (usr.Name == nick) - { - API.CurrentSession.Invoke(new Action(() => - { - API.CreateInfoboxSession("Error", "You have entered an incorrect password.", infobox.InfoboxMode.Info); - })); - } - } - catch - { - - } - - break; - case "joined": - try - { - var usr = (ChatUser)obj.OptionalObject; - if (usr.Name == nick) - { - if (_User == null) - { - _User = usr; - } - } - if (_User != usr) - { - var h = OnUserJoin; - if (h != null) - { - h(usr, new EventArgs()); - } - } - } - catch - { - - } - break; - case "userlist": - try - { - var lst = (List<ChatUser>)obj.OptionalObject; - var h = OnUserListReceived; - if (h != null) - { - h(lst, new EventArgs()); - } - } - catch - { - - } - break; - case "left": - try - { - var usr = (ChatUser)obj.OptionalObject; - var h = OnUserLeave; - if (h != null) - { - h(usr, new EventArgs()); - } - } - catch - { - - } - break; - case "message_received": - try - { - var usr = (ChatMessage)obj.OptionalObject; - var h = OnMessageReceive; - if (h != null) - { - h(usr, new EventArgs()); - } - } - catch - { - - } - break; - } - } - else if (args[0] == "topic") - { - try - { - string name = (string)obj.OptionalObject; - var h = OnTopicReceived; - if(h != null) - { - h(name, new EventArgs()); - } - } - catch - { - - } - } - } - catch - { - - } - }; - Join(nick); - } - else - { - throw new ArgumentException("IP Address not found."); - } - } - #endregion - - #region Events - - public event EventHandler OnUserJoin; - public event EventHandler OnUserLeave; - public event EventHandler OnMessageReceive; - public event EventHandler OnUserListReceived; - public event EventHandler OnTopicReceived; - - - #endregion - - #region Variables - - private string IP_Address = null; - public ChatUser User { get { return _User; } } - private ChatUser _User = null; - #endregion - - #region Methods - - /// <summary> - /// Authenticates with the server. - /// </summary> - /// <param name="password">Password to authenticate using.</param> - public void AuthenticateWithServer(string nick, string password) - { - var usr = new ChatUser(); - usr.Name = nick; - var msg = new ChatMessage(); - msg.Text = password; - msg.User = usr; - Package_Grabber.SendMessage(IP_Address, "chat authenticate", msg); - } - - /// <summary> - /// Joins the server. - /// </summary> - /// <param name="nick">Nickname.</param> - public void Join(string nick) - { - var usr = new ChatUser(); - usr.Name = nick; - var msg = new ChatMessage(); - msg.User = usr; - Package_Grabber.SendMessage(IP_Address, "chat join", msg); - } - - /// <summary> - /// Leaves the server. - /// </summary> - public void Leave() - { - if (_User != null) - { - var msg = new ChatMessage(); - msg.User = _User; - Package_Grabber.SendMessage(IP_Address, "chat leave", msg); - } - } - - /// <summary> - /// Requests a list of online users. - /// </summary> - public void GetUsers() - { - try - { - Package_Grabber.SendMessage(IP_Address, "chat get_users"); - } - catch - { - - } - } - - /// <summary> - /// Requests the topic string of the server. - /// </summary> - public void GetTopic() - { - try - { - Package_Grabber.SendMessage(IP_Address, "chat get_topic"); - } - catch - { - - } - } - - /// <summary> - /// Sends a message to the server. - /// </summary> - /// <param name="Text">Message text.</param> - public void Send(string Text) - { - if (_User != null) - { - var msg = new ChatMessage(); - msg.User = _User; - msg.Text = Text; - Package_Grabber.SendMessage(IP_Address, "chat normal", msg); - - } - } - - #endregion - } - - public class FakeChatClient - { - public string Name { get; set; } - public string Topic { get; set; } - public List<string> OtherCharacters { get; set; } - public Dictionary<string, string> Messages { get; set; } - } -} diff --git a/source/WindowsFormsApplication1/HoloChat.resx b/source/WindowsFormsApplication1/HoloChat.resx deleted file mode 100644 index 53f34aa..0000000 --- a/source/WindowsFormsApplication1/HoloChat.resx +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="lblintro.Text" xml:space="preserve"> - <value>HoloChat is a revolutionary new program made only for ShiftOS. - -Come, and explore the various HoloChat communities, and meet some new friends! - -You can send text, files, and other cool things to people in a HoloChat room. - -Have fun!</value> - </data> - <metadata name="tmrui.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/HostLayer/MountMgr.cs b/source/WindowsFormsApplication1/HostLayer/MountMgr.cs new file mode 100644 index 0000000..3981b64 --- /dev/null +++ b/source/WindowsFormsApplication1/HostLayer/MountMgr.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; + +namespace ShiftOS +{ + class MountMgr + { + public static Dictionary<string, string> links = null; + + public static void Init() + { + links = new Dictionary<string, string>(); + if (API.Upgrades["fsexternaldevices"] == true) + { + var drives = DriveInfo.GetDrives(); + foreach (var drive in drives) + { + try + { + if (!Paths.SaveRoot.Contains(drive.Name)) + { + links.Add(drive.Name, drive.VolumeLabel); + } + } + catch + { + + } + } + } + } + } +} diff --git a/source/WindowsFormsApplication1/HostLayer/OSInfo.cs b/source/WindowsFormsApplication1/HostLayer/OSInfo.cs new file mode 100644 index 0000000..53e51dc --- /dev/null +++ b/source/WindowsFormsApplication1/HostLayer/OSInfo.cs @@ -0,0 +1,72 @@ +using System; + +namespace ShiftOS +{ + public class OSInfo + { + + /// <summary> + /// System directory separator charactor. + /// </summary> + public static string DirectorySeparator + { + get + { + switch(GetPlatformID()) + { + case "microsoft": + return "\\"; + default: + return "/"; + } + } + } + + /// <summary> + /// Selects a default, monospace font name from the OS. This is typically used for creating ingame terminals. + /// </summary> + /// <returns>The monospace font.</returns> + public static string GetMonospaceFont() { + string fname = null; + switch (GetPlatformID ()) { + case "microsoft": + fname = "Lucida Console"; + break; + case "unix": + fname = "Monospace"; + break; + case "macosx": + fname = "Menlo"; + break; + } + return fname; + } + + /// <summary> + /// This refers to the Home directory of the current user. For example, if the user's name is 'Michael', and the user is on Windows Vista/7/8/10, this value would be 'C:\Users\Michael'. + /// </summary> + public static string homePath () + { + return (Environment.OSVersion.Platform == PlatformID.Unix || + Environment.OSVersion.Platform == PlatformID.MacOSX) + ? Environment.GetEnvironmentVariable ("HOME") + : Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%"); + } + + /// <summary> + /// Is it Linux? Is it Mac OS? Did Microsoft make it? + /// </summary> + /// <returns>The platform ID.</returns> + public static string GetPlatformID() { + switch (Environment.OSVersion.Platform) { + case PlatformID.Unix: + return "unix"; + case PlatformID.MacOSX: + return "macosx"; + default: + return "microsoft"; + } + } + } +} + diff --git a/source/WindowsFormsApplication1/HostLayer/Paths.cs b/source/WindowsFormsApplication1/HostLayer/Paths.cs new file mode 100644 index 0000000..32e8c3a --- /dev/null +++ b/source/WindowsFormsApplication1/HostLayer/Paths.cs @@ -0,0 +1,144 @@ +using System; +using System.IO; +using System.Windows.Forms; + +namespace ShiftOS +{ + /// <summary> + /// ShiftOS Path Variables. + /// + /// This class is cross-platform enabled, and will adapt to the currently running OS. + /// </summary> + public class Paths + { + public OSInfo oi = new OSInfo(); + + public static string SaveRoot; + public static string Home; + public static string Desktop; + public static string Documents; + public static string Music; + public static string Pictures; + public static string Skins; + public static string Videos; + public static string SystemDir; + public static string AutoStart; + public static string APIs; + public static string SkinDir; + public static string LoadedSkin; + public static string Icons; + public static string ToBeLoaded; + public static string Drivers; + public static string SaveFile; + public static string Bitnote; + public static string Applications; + public static string PackageManager; + public static string Shiftnet; + public static string SoftwareData; + public static string KnowledgeInput; + + //Mod Directories + public static string Mod_Temp; + public static string Mod_AppLauncherEntries; + public static string Desktop_Icons; + public static string WidgetFiles; + + /// <summary> + /// Registers path variables. + /// </summary> + public static void RegisterPaths() + { + switch (OSInfo.GetPlatformID()) { + case "microsoft": + var windir = Environment.GetFolderPath(Environment.SpecialFolder.Windows); + var splitter = windir.Split('\\'); + var driveletter = splitter[0]; + SaveRoot = $"{driveletter}\\ShiftOS"; + Home = SaveRoot + "\\Home\\"; + Desktop = Home + "Desktop\\"; + Documents = Home + "Documents\\"; + Music = Home + "Music\\"; + Pictures = Home + "Pictures\\"; + Skins = Home + "Skins\\"; + Videos = Home + "Videos\\"; + SystemDir = SaveRoot + "\\Shiftum42\\"; + SkinDir = SystemDir + "SkinData\\"; + LoadedSkin = SkinDir + "Loaded\\"; + ToBeLoaded = SkinDir + "Preview\\"; + Drivers = SystemDir + "Drivers\\"; + SaveFile = Drivers + "HDD.dri"; + SoftwareData = SaveRoot + "\\SoftwareData"; + KnowledgeInput = SoftwareData + "\\_knowledgeinput\\"; + Applications = SystemDir + "Apps\\"; + PackageManager = Applications + "Package Manager\\"; + Shiftnet = Applications + "Shiftnet\\"; + Mod_AppLauncherEntries = SystemDir + "_applauncher\\"; + Mod_Temp = SystemDir + "_temp\\"; + AutoStart = SystemDir + "AutoStart\\"; + Bitnote = Drivers + "BNWallet.dri"; + Icons = LoadedSkin + "Icons\\"; + WidgetFiles = SystemDir + "Widgets\\"; + APIs = SystemDir + "APIs\\"; + break; + default: + SaveRoot = OSInfo.homePath () + "/.local/lib/.shiftos"; + Home = SaveRoot + "/Home/"; + Desktop = Home + "Desktop/"; + Documents = Home + "Documents/"; + Music = Home + "Music/"; + Pictures = Home + "Pictures/"; + Skins = Home + "Skins/"; + Videos = Home + "Videos/"; + SystemDir = SaveRoot + "/Shiftum42/"; + SkinDir = SystemDir + "SkinData/"; + LoadedSkin = SkinDir + "Loaded/"; + ToBeLoaded = SkinDir + "Preview/"; + Drivers = SystemDir + "Drivers/"; + SaveFile = Drivers + "HDD.dri"; + SoftwareData = SaveRoot + "/SoftwareData"; + KnowledgeInput = SoftwareData + "/_knowledgeinput/"; + Applications = SystemDir + "/Apps/"; + PackageManager = Applications + "Package Manager/"; + Shiftnet = Applications + "Shiftnet/"; + Mod_AppLauncherEntries = SystemDir + "_applauncher/"; + Mod_Temp = SystemDir + "_temp/"; + AutoStart = SystemDir + "AutoStart/"; + Bitnote = Drivers + "BNWallet.dri"; + Icons = LoadedSkin + "Icons/"; + WidgetFiles = SystemDir + "Widgets/"; + APIs = SystemDir + "APIs/"; + break; + } + + } + + /// <summary> + /// Writes the barebones ShiftOS file system; skipping folders like the Desktop, which will appear as the user upgrades the OS. + /// </summary> + public static void WriteFileSystem() { + WriteDirectory (SaveRoot); + WriteDirectory (Home); + WriteDirectory (Documents); + WriteDirectory (SystemDir); + WriteDirectory (SkinDir); + WriteDirectory (LoadedSkin); + WriteDirectory (ToBeLoaded); + WriteDirectory(Drivers); + } + + /// <summary> + /// Create a directory + /// </summary> + /// <param name="dir">New DIR.</param> + public static void WriteDirectory(string dir) { + if(!Directory.Exists(dir)) { + Console.WriteLine ("[FS] Creating directory '{0}'", dir); + Directory.CreateDirectory (dir); + } else { + Console.WriteLine ("[FS] That directory at {0} exists.", dir); + } + } + + } +} + diff --git a/source/WindowsFormsApplication1/IconControl.Designer.cs b/source/WindowsFormsApplication1/IconControl.Designer.cs deleted file mode 100644 index b86f908..0000000 --- a/source/WindowsFormsApplication1/IconControl.Designer.cs +++ /dev/null @@ -1,92 +0,0 @@ -namespace ShiftOS -{ - partial class IconControl - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.panel1 = new System.Windows.Forms.Panel(); - this.pblarge = new System.Windows.Forms.PictureBox(); - this.lbname = new System.Windows.Forms.Label(); - this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pblarge)).BeginInit(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.pblarge); - this.panel1.Controls.Add(this.lbname); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(171, 56); - this.panel1.TabIndex = 0; - // - // pblarge - // - this.pblarge.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pblarge.Location = new System.Drawing.Point(135, 3); - this.pblarge.Name = "pblarge"; - this.pblarge.Size = new System.Drawing.Size(32, 32); - this.pblarge.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.pblarge.TabIndex = 2; - this.pblarge.TabStop = false; - this.pblarge.Click += new System.EventHandler(this.pblarge_Click); - // - // lbname - // - this.lbname.Cursor = System.Windows.Forms.Cursors.IBeam; - this.lbname.Dock = System.Windows.Forms.DockStyle.Left; - this.lbname.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.lbname.Location = new System.Drawing.Point(0, 0); - this.lbname.Name = "lbname"; - this.lbname.Size = new System.Drawing.Size(154, 54); - this.lbname.TabIndex = 0; - this.lbname.Text = "Icon Name"; - this.lbname.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // IconControl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.panel1); - this.Name = "IconControl"; - this.Size = new System.Drawing.Size(171, 56); - this.Load += new System.EventHandler(this.IconControl_Load); - this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pblarge)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Label lbname; - private System.Windows.Forms.PictureBox pblarge; - } -} diff --git a/source/WindowsFormsApplication1/IconControl.cs b/source/WindowsFormsApplication1/IconControl.cs deleted file mode 100644 index e103ced..0000000 --- a/source/WindowsFormsApplication1/IconControl.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.Drawing.Imaging; -using Newtonsoft.Json; -using System.IO; - -namespace ShiftOS -{ - public partial class IconControl : UserControl - { - public IconControl() - { - InitializeComponent(); - } - - private void IconControl_Load(object sender, EventArgs e) - { - pblarge.Top = (this.Height - pblarge.Height) / 2; - } - - - - public Image LargeImage - { - get - { - return pblarge.Image; - } - set - { - pblarge.Image = value; - } - } - - public string IconName - { - get - { - return lbname.Text; - - } - set - { - lbname.Text = value; - } - } - - private void pblarge_Click(object sender, EventArgs e) - { - API.CreateGraphicPickerSession($"Icon - {IconName}", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - if(API.GraphicPickerSession.IdleImage != null) - { - LargeImage = API.GraphicPickerSession.IdleImage; - } - }; - } - } - - -} diff --git a/source/WindowsFormsApplication1/IconControl.resx b/source/WindowsFormsApplication1/IconControl.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/IconControl.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/IconManager.Designer.cs b/source/WindowsFormsApplication1/IconManager.Designer.cs deleted file mode 100644 index 3203088..0000000 --- a/source/WindowsFormsApplication1/IconManager.Designer.cs +++ /dev/null @@ -1,135 +0,0 @@ -namespace ShiftOS -{ - partial class IconManager - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.pnlactions = new System.Windows.Forms.Panel(); - this.pnlicons = new System.Windows.Forms.FlowLayoutPanel(); - this.panel1 = new System.Windows.Forms.Panel(); - this.btnsave = new System.Windows.Forms.Button(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.pnlactions.SuspendLayout(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // pnlactions - // - this.pnlactions.BackColor = System.Drawing.Color.Gray; - this.pnlactions.Controls.Add(this.button2); - this.pnlactions.Controls.Add(this.button1); - this.pnlactions.Controls.Add(this.btnsave); - this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlactions.ForeColor = System.Drawing.Color.White; - this.pnlactions.Location = new System.Drawing.Point(0, 511); - this.pnlactions.Name = "pnlactions"; - this.pnlactions.Size = new System.Drawing.Size(720, 41); - this.pnlactions.TabIndex = 0; - // - // pnlicons - // - this.pnlicons.BackColor = System.Drawing.Color.White; - this.pnlicons.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlicons.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.pnlicons.ForeColor = System.Drawing.Color.Black; - this.pnlicons.Location = new System.Drawing.Point(0, 0); - this.pnlicons.Name = "pnlicons"; - this.pnlicons.Size = new System.Drawing.Size(720, 511); - this.pnlicons.TabIndex = 1; - // - // panel1 - // - this.panel1.Controls.Add(this.pnlicons); - this.panel1.Controls.Add(this.pnlactions); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(720, 552); - this.panel1.TabIndex = 0; - // - // btnsave - // - this.btnsave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsave.Location = new System.Drawing.Point(3, 3); - this.btnsave.Name = "btnsave"; - this.btnsave.Size = new System.Drawing.Size(75, 35); - this.btnsave.TabIndex = 0; - this.btnsave.Text = "Done"; - this.btnsave.UseVisualStyleBackColor = true; - this.btnsave.Click += new System.EventHandler(this.btnsave_Click); - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Location = new System.Drawing.Point(84, 3); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 35); - this.button1.TabIndex = 1; - this.button1.Text = "Load Pack"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Location = new System.Drawing.Point(165, 3); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 35); - this.button2.TabIndex = 2; - this.button2.Text = "Export"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // IconManager - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(720, 552); - this.Controls.Add(this.panel1); - this.Name = "IconManager"; - this.Text = "IconManager"; - this.Load += new System.EventHandler(this.IconManager_Load); - this.pnlactions.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel pnlactions; - private System.Windows.Forms.FlowLayoutPanel pnlicons; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button btnsave; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/IconManager.cs b/source/WindowsFormsApplication1/IconManager.cs deleted file mode 100644 index 2ffa24a..0000000 --- a/source/WindowsFormsApplication1/IconManager.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class IconManager : Form - { - public IconManager() - { - InitializeComponent(); - } - - private void IconManager_Load(object sender, EventArgs e) - { - GetAllIcons(); - } - - public void GetAllIcons() - { - pnlicons.Controls.Clear(); - pnlicons.Margin = new Padding(0); - foreach(var kv in API.IconRegistry) - { - var ctrl = new IconControl(); - ctrl.Margin = new Padding(0); - ctrl.IconName = kv.Key; - ctrl.LargeImage = kv.Value; - pnlicons.Controls.Add(ctrl); - ctrl.Show(); - } - } - - private void btnsave_Click(object sender, EventArgs e) - { - foreach (Control ctrl in pnlicons.Controls) - { - try - { - IconControl ic = (IconControl)ctrl; - Skinning.Utilities.IconRegistry[ic.IconName] = ic.LargeImage; - } - catch - { - IconControl ic = (IconControl)ctrl; - Skinning.Utilities.IconRegistry.Add(ic.IconName, ic.LargeImage); - } - } - - var rnd = new Random(); - int cp = rnd.Next(0, 10); - Skinning.Utilities.saveimages(); - API.AddCodepoints(cp); - if(API.CurrentSession != null) - { - API.CurrentSession.SetupAppLauncher(); - API.CurrentSession.SetupDesktopIcons(); - } - GetAllIcons(); - API.CreateInfoboxSession("Icon pack set.", $"Your icon pack has been set successfully. You have earned {cp} Codepoints.", infobox.InfoboxMode.Info); - } - - private void button2_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".icn", File_Skimmer.FileSkimmerMode.Save); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if(res != "fail") - { - ZipFile.CreateFromDirectory(Paths.Icons, res); - } - }; - } - - private void button1_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".icn", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if (res != "fail") - { - if(Directory.Exists(Paths.Mod_Temp + "icn")) - { - Directory.Delete(Paths.Mod_Temp + "icn", true); - } - ZipFile.ExtractToDirectory(res, Paths.Mod_Temp + "icn"); - foreach (var f in Directory.GetFiles(Paths.Mod_Temp + "icn")) - { - var finf = new FileInfo(f); - try - { - var bytes = File.ReadAllBytes(finf.FullName); - using (var stream = new MemoryStream(bytes)) - { - API.IconRegistry[finf.Name] = Image.FromStream(stream); - } - } - catch - { - API.IconRegistry.Add(finf.Name, Image.FromFile(finf.FullName)); - } - finf = null; - } - if (API.CurrentSession != null) - { - API.CurrentSession.SetupAppLauncher(); - API.CurrentSession.SetupDesktopIcons(); - } - GetAllIcons(); - Directory.Delete(Paths.Mod_Temp + "icn", true); - } - }; - } - } -} diff --git a/source/WindowsFormsApplication1/IconManager.resx b/source/WindowsFormsApplication1/IconManager.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/IconManager.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ImageSelector.Designer.cs b/source/WindowsFormsApplication1/ImageSelector.Designer.cs deleted file mode 100644 index 7340ceb..0000000 --- a/source/WindowsFormsApplication1/ImageSelector.Designer.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace ShiftOS -{ - partial class ImageSelector - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.btnselect = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // label1 - // - this.label1.BackColor = System.Drawing.Color.White; - this.label1.Dock = System.Windows.Forms.DockStyle.Left; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.label1.ForeColor = System.Drawing.Color.Black; - this.label1.Location = new System.Drawing.Point(0, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(186, 33); - this.label1.TabIndex = 0; - this.label1.Text = "Image:"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // btnselect - // - this.btnselect.Dock = System.Windows.Forms.DockStyle.Fill; - this.btnselect.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnselect.Location = new System.Drawing.Point(186, 0); - this.btnselect.Name = "btnselect"; - this.btnselect.Size = new System.Drawing.Size(40, 33); - this.btnselect.TabIndex = 1; - this.btnselect.UseVisualStyleBackColor = true; - this.btnselect.Click += new System.EventHandler(this.btnselect_Click); - // - // ImageSelector - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.btnselect); - this.Controls.Add(this.label1); - this.Name = "ImageSelector"; - this.Size = new System.Drawing.Size(226, 33); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button btnselect; - } -} diff --git a/source/WindowsFormsApplication1/ImageSelector.cs b/source/WindowsFormsApplication1/ImageSelector.cs deleted file mode 100644 index b1aa4d2..0000000 --- a/source/WindowsFormsApplication1/ImageSelector.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.IO; - -namespace ShiftOS -{ - public partial class ImageSelector : UserControl - { - public ImageSelector() - { - InitializeComponent(); - } - - public Image Image - { - get - { - return btnselect.BackgroundImage; - } - } - - private string _ImagePath = null; - - public string ImagePath - { - get - { - return _ImagePath; - } - } - - private void btnselect_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".pic;.png;.jpg;.bmp", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if(res != "fail") - { - var finf = new FileInfo(res); - _ImagePath = finf.Name; - btnselect.BackgroundImage = Image.FromFile(res); - btnselect.BackgroundImageLayout = ImageLayout.Center; - } - }; - } - } -} diff --git a/source/WindowsFormsApplication1/ImageSelector.resx b/source/WindowsFormsApplication1/ImageSelector.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/ImageSelector.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Jumper.Designer.cs b/source/WindowsFormsApplication1/Jumper.Designer.cs deleted file mode 100644 index 096dc47..0000000 --- a/source/WindowsFormsApplication1/Jumper.Designer.cs +++ /dev/null @@ -1,130 +0,0 @@ -namespace ShiftOS -{ - partial class Jumper - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.pnlstatus = new System.Windows.Forms.FlowLayoutPanel(); - this.btnplay = new System.Windows.Forms.Button(); - this.lbstatus = new System.Windows.Forms.Label(); - this.lbstatus2 = new System.Windows.Forms.Label(); - this.ground = new System.Windows.Forms.Panel(); - this.tmrscreenupdate = new System.Windows.Forms.Timer(this.components); - this.player = new System.Windows.Forms.PictureBox(); - this.pnlstatus.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.player)).BeginInit(); - this.SuspendLayout(); - // - // pnlstatus - // - this.pnlstatus.Controls.Add(this.btnplay); - this.pnlstatus.Controls.Add(this.lbstatus); - this.pnlstatus.Controls.Add(this.lbstatus2); - this.pnlstatus.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlstatus.Location = new System.Drawing.Point(0, 408); - this.pnlstatus.Name = "pnlstatus"; - this.pnlstatus.Size = new System.Drawing.Size(800, 30); - this.pnlstatus.TabIndex = 0; - // - // btnplay - // - this.btnplay.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnplay.Location = new System.Drawing.Point(3, 3); - this.btnplay.Name = "btnplay"; - this.btnplay.Size = new System.Drawing.Size(75, 23); - this.btnplay.TabIndex = 0; - this.btnplay.Text = "Play"; - this.btnplay.UseVisualStyleBackColor = true; - this.btnplay.Click += new System.EventHandler(this.btnplay_Click); - // - // lbstatus - // - this.lbstatus.Location = new System.Drawing.Point(84, 0); - this.lbstatus.Name = "lbstatus"; - this.lbstatus.Size = new System.Drawing.Size(137, 23); - this.lbstatus.TabIndex = 1; - this.lbstatus.Text = "Codepoints: 0"; - this.lbstatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lbstatus2 - // - this.lbstatus2.Location = new System.Drawing.Point(227, 0); - this.lbstatus2.Name = "lbstatus2"; - this.lbstatus2.Size = new System.Drawing.Size(137, 23); - this.lbstatus2.TabIndex = 2; - this.lbstatus2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // ground - // - this.ground.Location = new System.Drawing.Point(87, 262); - this.ground.Name = "ground"; - this.ground.Size = new System.Drawing.Size(200, 35); - this.ground.TabIndex = 1; - // - // tmrscreenupdate - // - this.tmrscreenupdate.Interval = 500; - this.tmrscreenupdate.Tick += new System.EventHandler(this.tmrscreenupdate_Tick); - // - // player - // - this.player.Image = global::ShiftOS.Properties.Resources.jumperplayer; - this.player.Location = new System.Drawing.Point(219, 96); - this.player.Name = "player"; - this.player.Size = new System.Drawing.Size(32, 32); - this.player.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.player.TabIndex = 2; - this.player.TabStop = false; - // - // Jumper - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 438); - this.Controls.Add(this.player); - this.Controls.Add(this.ground); - this.Controls.Add(this.pnlstatus); - this.Name = "Jumper"; - this.Text = "Jumper"; - this.pnlstatus.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.player)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.FlowLayoutPanel pnlstatus; - private System.Windows.Forms.Button btnplay; - private System.Windows.Forms.Label lbstatus; - private System.Windows.Forms.Panel ground; - private System.Windows.Forms.Timer tmrscreenupdate; - private System.Windows.Forms.PictureBox player; - private System.Windows.Forms.Label lbstatus2; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Jumper.cs b/source/WindowsFormsApplication1/Jumper.cs deleted file mode 100644 index 766c929..0000000 --- a/source/WindowsFormsApplication1/Jumper.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Jumper : Form - { - public Jumper() - { - InitializeComponent(); - } - - enum GameStatus - { - Idle, - GameOver, - Playing - } - - private GameStatus status = GameStatus.Idle; - private int JumpingStage = 0; //not jumping - - int gamespeed = 1; - int codepointsearned = 0; - - Random rand = new Random(); - - private void tmrscreenupdate_Tick(object sender, EventArgs e) - { - ground.Location = new Point(0, 260); - ground.Size = new Size(this.ClientRectangle.Width, 2); - ground.BackColor = Color.Black; - switch(JumpingStage) - { - case 0: - player.Location = new Point(100, 228); - break; - case 1: - if(player.Location.Y != 200) - { - player.Location = new Point(player.Location.X, player.Location.Y - 5); - } else - { - JumpingStage = 2; - } - break; - case 2: - if (player.Location.Y != 228) - { - player.Location = new Point(player.Location.X, player.Location.Y + 5); - } - else - { - JumpingStage = 0; - lbstatus.Text = "Landed"; - } - break; - - } - int randres = rand.Next(0, 9); - switch(randres) - { - case 5: - Panel enemy = new Panel(); - this.Controls.Add(enemy); - enemy.Location = new Point(this.ClientRectangle.Width, 227); - enemy.BackColor = Color.Black; - enemy.Size = new Size(32, 27); - enemy.Tag = "enemy"; - enemy.Show(); - break; - } - - foreach (Control ctrl in this.Controls) - { - string enemytag = "enemy"; - if (enemytag == (string)ctrl.Tag) - { - if (ctrl.Location.X < 0 - ctrl.Width) - { - ctrl.Hide(); - } - else - { - ctrl.Location = new Point(ctrl.Location.X - (2 * gamespeed), ctrl.Location.Y); - } - if (ctrl.Left >= player.Left && ctrl.Left <= player.Right) - { - if(ctrl.Top >= player.Top && ctrl.Bottom <= player.Bottom) - { - status = GameStatus.GameOver; - } - } - } - } - - switch(status) - { - case GameStatus.Playing: - codepointsearned += gamespeed; - btnplay.Hide(); - lbstatus.Text = "Codepoints: " + codepointsearned.ToString(); - break; - case GameStatus.GameOver: - tmrscreenupdate.Stop(); - API.CreateInfoboxSession("You hit an obstacle.", "You have run into an obstacle. You have earned " + codepointsearned.ToString() + " Codepoints.", infobox.InfoboxMode.Info); - API.AddCodepoints(codepointsearned); - codepointsearned = 0; - if(API.Upgrades["multitasking"] == true) - { - this.Close(); //Close if multitasking is true. - } - break; - } - } - - private void btnplay_Click(object sender, EventArgs e) - { - if(this.status == GameStatus.Idle) - { - this.status = GameStatus.Playing; - this.Focus(); - this.KeyDown += (object s, KeyEventArgs a) => - { - if (a.KeyCode == Keys.Space) - { - if (JumpingStage == 0) - { - JumpingStage = 1; - lbstatus2.Text = "Jumping..."; - } - a.SuppressKeyPress = true; - } - }; - tmrscreenupdate.Start(); - } - } - } -} diff --git a/source/WindowsFormsApplication1/Jumper.resx b/source/WindowsFormsApplication1/Jumper.resx deleted file mode 100644 index f724b8c..0000000 --- a/source/WindowsFormsApplication1/Jumper.resx +++ /dev/null @@ -1,123 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="tmrscreenupdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/KnowledgeInput.Designer.cs b/source/WindowsFormsApplication1/KnowledgeInput.Designer.cs deleted file mode 100644 index 3fc5f81..0000000 --- a/source/WindowsFormsApplication1/KnowledgeInput.Designer.cs +++ /dev/null @@ -1,345 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class KnowledgeInput - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - //Required by the Windows Form Designer - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(KnowledgeInput)); - this.ListBox1 = new System.Windows.Forms.ListBox(); - this.pnlintro = new System.Windows.Forms.Panel(); - this.pnlcategorydisplay = new System.Windows.Forms.Panel(); - this.lblnextreward = new System.Windows.Forms.Label(); - this.guessbox = new System.Windows.Forms.TextBox(); - this.lblcurrentlevel = new System.Windows.Forms.Label(); - this.Label5 = new System.Windows.Forms.Label(); - this.listblistedstuff = new System.Windows.Forms.ListBox(); - this.lbltillnextlevel = new System.Windows.Forms.Label(); - this.lbltotal = new System.Windows.Forms.Label(); - this.btnstart = new System.Windows.Forms.Button(); - this.lblcatedescription = new System.Windows.Forms.Label(); - this.lblcategory = new System.Windows.Forms.Label(); - this.Label4 = new System.Windows.Forms.Label(); - this.Label3 = new System.Windows.Forms.Label(); - this.Label2 = new System.Windows.Forms.Label(); - this.Label1 = new System.Windows.Forms.Label(); - this.decider = new System.Windows.Forms.Timer(this.components); - this.Label6 = new System.Windows.Forms.Label(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.tmrstoryline = new System.Windows.Forms.Timer(this.components); - this.pnlintro.SuspendLayout(); - this.pnlcategorydisplay.SuspendLayout(); - this.pgcontents.SuspendLayout(); - this.SuspendLayout(); - // - // ListBox1 - // - this.ListBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ListBox1.BackColor = System.Drawing.Color.White; - this.ListBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.ListBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.ListBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ListBox1.ForeColor = System.Drawing.Color.Black; - this.ListBox1.FormattingEnabled = true; - this.ListBox1.ItemHeight = 24; - this.ListBox1.Items.AddRange(new object[] { - "Animals", - "Countries", - "Fruits"}); - this.ListBox1.Location = new System.Drawing.Point(9, 49); - this.ListBox1.Name = "ListBox1"; - this.ListBox1.Size = new System.Drawing.Size(179, 240); - this.ListBox1.TabIndex = 0; - this.ListBox1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ListBox1_DrawItem); - this.ListBox1.SelectedIndexChanged += new System.EventHandler(this.ListBox1_SelectedIndexChanged); - // - // pnlintro - // - this.pnlintro.Controls.Add(this.pnlcategorydisplay); - this.pnlintro.Controls.Add(this.Label4); - this.pnlintro.Controls.Add(this.Label3); - this.pnlintro.Controls.Add(this.Label2); - this.pnlintro.Controls.Add(this.Label1); - this.pnlintro.Location = new System.Drawing.Point(190, 0); - this.pnlintro.Name = "pnlintro"; - this.pnlintro.Size = new System.Drawing.Size(479, 272); - this.pnlintro.TabIndex = 1; - // - // pnlcategorydisplay - // - this.pnlcategorydisplay.Controls.Add(this.lblnextreward); - this.pnlcategorydisplay.Controls.Add(this.guessbox); - this.pnlcategorydisplay.Controls.Add(this.lblcurrentlevel); - this.pnlcategorydisplay.Controls.Add(this.Label5); - this.pnlcategorydisplay.Controls.Add(this.listblistedstuff); - this.pnlcategorydisplay.Controls.Add(this.lbltillnextlevel); - this.pnlcategorydisplay.Controls.Add(this.lbltotal); - this.pnlcategorydisplay.Controls.Add(this.btnstart); - this.pnlcategorydisplay.Controls.Add(this.lblcatedescription); - this.pnlcategorydisplay.Controls.Add(this.lblcategory); - this.pnlcategorydisplay.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlcategorydisplay.ForeColor = System.Drawing.Color.Black; - this.pnlcategorydisplay.Location = new System.Drawing.Point(0, 0); - this.pnlcategorydisplay.Name = "pnlcategorydisplay"; - this.pnlcategorydisplay.Size = new System.Drawing.Size(479, 272); - this.pnlcategorydisplay.TabIndex = 2; - // - // lblnextreward - // - this.lblnextreward.AutoSize = true; - this.lblnextreward.Font = new System.Drawing.Font("Palatino Linotype", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblnextreward.Location = new System.Drawing.Point(36, 110); - this.lblnextreward.Name = "lblnextreward"; - this.lblnextreward.Size = new System.Drawing.Size(244, 20); - this.lblnextreward.TabIndex = 11; - this.lblnextreward.Text = "Reward for completing level 1: 5CP"; - this.lblnextreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // guessbox - // - this.guessbox.BackColor = System.Drawing.Color.White; - this.guessbox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.guessbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.guessbox.ForeColor = System.Drawing.Color.Black; - this.guessbox.Location = new System.Drawing.Point(11, 147); - this.guessbox.Multiline = true; - this.guessbox.Name = "guessbox"; - this.guessbox.Size = new System.Drawing.Size(297, 45); - this.guessbox.TabIndex = 9; - this.guessbox.Text = "Enter Guess Here"; - this.guessbox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.guessbox.Click += new System.EventHandler(this.guessbox_click); - this.guessbox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.guessbox_keydown); - // - // lblcurrentlevel - // - this.lblcurrentlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblcurrentlevel.Location = new System.Drawing.Point(-6, 77); - this.lblcurrentlevel.Name = "lblcurrentlevel"; - this.lblcurrentlevel.Size = new System.Drawing.Size(331, 42); - this.lblcurrentlevel.TabIndex = 8; - this.lblcurrentlevel.Text = "Current Level: 1"; - this.lblcurrentlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label5 - // - this.Label5.AutoSize = true; - this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label5.Location = new System.Drawing.Point(340, 12); - this.Label5.Name = "Label5"; - this.Label5.Size = new System.Drawing.Size(123, 18); - this.Label5.TabIndex = 7; - this.Label5.Text = "All Ready Done"; - // - // listblistedstuff - // - this.listblistedstuff.BackColor = System.Drawing.Color.Black; - this.listblistedstuff.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listblistedstuff.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.listblistedstuff.ForeColor = System.Drawing.Color.White; - this.listblistedstuff.FormattingEnabled = true; - this.listblistedstuff.Location = new System.Drawing.Point(340, 41); - this.listblistedstuff.Name = "listblistedstuff"; - this.listblistedstuff.ScrollAlwaysVisible = true; - this.listblistedstuff.Size = new System.Drawing.Size(129, 221); - this.listblistedstuff.TabIndex = 6; - this.listblistedstuff.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listblistedstuff_DrawItem); - // - // lbltillnextlevel - // - this.lbltillnextlevel.AutoSize = true; - this.lbltillnextlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbltillnextlevel.Location = new System.Drawing.Point(8, 250); - this.lbltillnextlevel.Name = "lbltillnextlevel"; - this.lbltillnextlevel.Size = new System.Drawing.Size(146, 16); - this.lbltillnextlevel.TabIndex = 5; - this.lbltillnextlevel.Text = "Words Until Next Level:"; - // - // lbltotal - // - this.lbltotal.AutoSize = true; - this.lbltotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbltotal.Location = new System.Drawing.Point(191, 250); - this.lbltotal.Name = "lbltotal"; - this.lbltotal.Size = new System.Drawing.Size(66, 16); - this.lbltotal.TabIndex = 3; - this.lbltotal.Text = "Guessed:"; - // - // btnstart - // - this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnstart.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnstart.Location = new System.Drawing.Point(11, 198); - this.btnstart.Name = "btnstart"; - this.btnstart.Size = new System.Drawing.Size(297, 46); - this.btnstart.TabIndex = 2; - this.btnstart.Text = "Submit Word"; - this.btnstart.UseVisualStyleBackColor = true; - this.btnstart.Click += new System.EventHandler(this.btnstart_Click); - // - // lblcatedescription - // - this.lblcatedescription.Location = new System.Drawing.Point(11, 48); - this.lblcatedescription.Name = "lblcatedescription"; - this.lblcatedescription.Size = new System.Drawing.Size(297, 26); - this.lblcatedescription.TabIndex = 1; - this.lblcatedescription.Text = "There are many animals out there! Can you list them all? Note that this is a list" + - " of common animals, not every animal!"; - this.lblcatedescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblcategory - // - this.lblcategory.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblcategory.Location = new System.Drawing.Point(11, 8); - this.lblcategory.Name = "lblcategory"; - this.lblcategory.Size = new System.Drawing.Size(297, 39); - this.lblcategory.TabIndex = 0; - this.lblcategory.Text = "Animals"; - this.lblcategory.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // Label4 - // - this.Label4.AutoSize = true; - this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label4.Location = new System.Drawing.Point(52, 235); - this.Label4.Name = "Label4"; - this.Label4.Size = new System.Drawing.Size(382, 20); - this.Label4.TabIndex = 3; - this.Label4.Text = "Select A Category On the Left To Start Playing"; - // - // Label3 - // - this.Label3.AutoSize = true; - this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label3.Location = new System.Drawing.Point(187, 72); - this.Label3.Name = "Label3"; - this.Label3.Size = new System.Drawing.Size(112, 20); - this.Label3.TabIndex = 2; - this.Label3.Text = "How To Play:"; - // - // Label2 - // - this.Label2.AutoSize = true; - this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label2.Location = new System.Drawing.Point(61, 97); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(383, 80); - this.Label2.TabIndex = 1; - this.Label2.Text = resources.GetString("Label2.Text"); - this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.ForeColor = System.Drawing.Color.Black; - this.Label1.Location = new System.Drawing.Point(75, 12); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(316, 25); - this.Label1.TabIndex = 0; - this.Label1.Text = "Welcome to Knowledge Input"; - // - // decider - // - this.decider.Interval = 500; - this.decider.Tick += new System.EventHandler(this.decider_Tick); - // - // Label6 - // - this.Label6.AutoSize = true; - this.Label6.Font = new System.Drawing.Font("Cambria", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label6.Location = new System.Drawing.Point(30, 8); - this.Label6.Name = "Label6"; - this.Label6.Size = new System.Drawing.Size(130, 28); - this.Label6.TabIndex = 8; - this.Label6.Text = "Categories"; - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.pnlintro); - this.pgcontents.Controls.Add(this.Label6); - this.pgcontents.Controls.Add(this.ListBox1); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(673, 304); - this.pgcontents.TabIndex = 10; - // - // tmrstoryline - // - this.tmrstoryline.Interval = 1000; - // - // KnowledgeInput - // - this.AcceptButton = this.btnstart; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.Control; - this.ClientSize = new System.Drawing.Size(673, 304); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.KeyPreview = true; - this.Name = "KnowledgeInput"; - this.Text = "Knowledge_Input"; - this.TopMost = true; - this.Load += new System.EventHandler(this.Template_Load); - this.pnlintro.ResumeLayout(false); - this.pnlintro.PerformLayout(); - this.pnlcategorydisplay.ResumeLayout(false); - this.pnlcategorydisplay.PerformLayout(); - this.pgcontents.ResumeLayout(false); - this.pgcontents.PerformLayout(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.ListBox ListBox1; - internal System.Windows.Forms.Panel pnlintro; - internal System.Windows.Forms.Label Label4; - internal System.Windows.Forms.Label Label3; - internal System.Windows.Forms.Label Label2; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.Panel pnlcategorydisplay; - internal System.Windows.Forms.Label lblcategory; - internal System.Windows.Forms.Button btnstart; - internal System.Windows.Forms.Label lblcatedescription; - internal System.Windows.Forms.Label lbltillnextlevel; - internal System.Windows.Forms.Label lbltotal; - internal System.Windows.Forms.ListBox listblistedstuff; - internal System.Windows.Forms.Label Label5; - internal System.Windows.Forms.TextBox guessbox; - internal System.Windows.Forms.Label lblcurrentlevel; - internal System.Windows.Forms.Timer decider; - internal System.Windows.Forms.Label lblnextreward; - internal System.Windows.Forms.Label Label6; - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Timer tmrstoryline; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/KnowledgeInput.cs b/source/WindowsFormsApplication1/KnowledgeInput.cs deleted file mode 100644 index a494a93..0000000 --- a/source/WindowsFormsApplication1/KnowledgeInput.cs +++ /dev/null @@ -1,1425 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class KnowledgeInput : Form - { - public KnowledgeInput() - { - InitializeComponent(); - } - - public int rolldownsize; - public int oldbordersize; - public int oldtitlebarheight; - public bool justopened = false; - public bool needtorollback = false; - public int minimumsizewidth = 0; - public int minimumsizeheight = 0; - - bool guessalreadydone; - bool guesscorrect; - bool levelup; - int rewardbase; - - int totalguessed; - int level; - - int tillnextlevel; - string[] animalslist = new string[227]; - string[] fruitslist = new string[76]; - string[] countrieslist = new string[205]; - string[] carbrandslist = new string[329]; - string[] gameconsoleslist = new string[125]; - - string[] elementslist = new string[118]; - - // ERROR: Handles clauses are not supported in C# - private void Template_Load(object sender, EventArgs e) - { - justopened = true; - this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; - this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; - - pnlintro.Show(); - pnlintro.BringToFront(); - pnlcategorydisplay.Hide(); - makeanimallist(); - makecarbrandslist(); - makecountrieslist(); - makeelementslist(); - makefruitlist(); - makegameconsoleslist(); - setupcategories(); - if(!Directory.Exists(Paths.KnowledgeInput)) - { - Directory.CreateDirectory(Paths.KnowledgeInput); - } - } - - // ERROR: Handles clauses are not supported in C# - private void ListBox1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) - { - e.DrawBackground(); - if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) - { - e.Graphics.FillRectangle(Brushes.Black, e.Bounds); - } - StringFormat sf = new StringFormat(); - sf.Alignment = StringAlignment.Center; - using (SolidBrush b = new SolidBrush(Color.Black)) - { - e.Graphics.DrawString(ListBox1.GetItemText(ListBox1.Items[e.Index]), e.Font, b, e.Bounds, sf); - } - e.DrawFocusRectangle(); - } - - // ERROR: Handles clauses are not supported in C# - private void listblistedstuff_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) - { - e.DrawBackground(); - if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) - { - e.Graphics.FillRectangle(Brushes.Black, e.Bounds); - } - - using (SolidBrush b = new SolidBrush(e.ForeColor)) - { - e.Graphics.DrawString(listblistedstuff.GetItemText(listblistedstuff.Items[e.Index]), e.Font, b, e.Bounds); - } - e.DrawFocusRectangle(); - } - - private void setupcategories() - { - ListBox1.Items.Clear(); - ListBox1.Items.Add("Animals"); - ListBox1.Items.Add("Fruits"); - ListBox1.Items.Add("Countries"); - if(API.Upgrades["kielements"]) - { - ListBox1.Items.Add("Elements"); - } - if (API.Upgrades["kicarbrands"]) - { - ListBox1.Items.Add("Car Brands"); - } - if (API.Upgrades["kigameconsoles"]) - { - ListBox1.Items.Add("Game Consoles"); - } - - } - - // ERROR: Handles clauses are not supported in C# - private void ListBox1_SelectedIndexChanged(object sender, EventArgs e) - { - // ERROR: Not supported in C#: OnErrorStatement - - pnlcategorydisplay.Show(); - //Remember to create the files for each category in the hijack screen and add the category in the design view and make the countries list in this load event - switch (ListBox1.SelectedItem.ToString()) - { - case "Animals": - loadsavepoint("Animals", 10, Paths.KnowledgeInput + "Animals.lst", "There are many animals out there! Can you list them all?" + Environment.NewLine + "Note that you get points for listing animals... not animal breeds!", animalslist); - - break; - case "Fruits": - loadsavepoint("Fruits", 10, Paths.KnowledgeInput + "Fruits.lst", "Do you get your daily serving of fruit each day?" + Environment.NewLine + "Really...? See if you can list them then ;)", fruitslist); - - break; - case "Countries": - loadsavepoint("Countries", 10, Paths.KnowledgeInput + "Countries.lst", "Ever wanted to travel the entire world?" + Environment.NewLine + "Well before you do see if you can list every country in the world!", countrieslist); - - break; - case "Car Brands": - loadsavepoint("Car Brands", 10, Paths.KnowledgeInput + "Car Brands.lst", "Can you list every single car brand?" + Environment.NewLine + "Don't use words like automobiles, motors or cars!", carbrandslist); - - break; - case "Game Consoles": - loadsavepoint("Game Consoles", 10, Paths.KnowledgeInput + "Game Consoles.lst", "Do you call yourself a gamer?" + Environment.NewLine + "Earn that title by listing non-handheld game consoles!", gameconsoleslist); - - break; - case "Elements": - loadsavepoint("Elements", 10, Paths.KnowledgeInput + "Elements.lst", "Have you memorized the periodic table of elements?" + Environment.NewLine + "No? Well don't even attempt trying to guess them all here!", elementslist); - break; - } - - } - - - private void handleword() - { - switch (ListBox1.SelectedItem.ToString()) - { - case "Animals": - handlewordtype(animalslist, Paths.KnowledgeInput + "Animals.lst"); - break; - case "Fruits": - handlewordtype(fruitslist, Paths.KnowledgeInput + "Fruits.lst"); - break; - case "Countries": - handlewordtype(countrieslist, Paths.KnowledgeInput + "Countries.lst"); - break; - case "Car Brands": - handlewordtype(carbrandslist, Paths.KnowledgeInput + "Car Brands.lst"); - break; - case "Game Consoles": - handlewordtype(gameconsoleslist, Paths.KnowledgeInput + "Game Consoles.lst"); - break; - case "Elements": - handlewordtype(elementslist, Paths.KnowledgeInput + "Elements.lst"); - break; - } - - guessbox.Text = ""; - listblistedstuff.TopIndex = listblistedstuff.Items.Count - 1; - } - - private void btnquit_Click(object sender, EventArgs e) - { - this.Close(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnstart_Click(object sender, EventArgs e) - { - handleword(); - } - - // ERROR: Handles clauses are not supported in C# - private void guessbox_click(object sender, EventArgs e) - { - guessbox.Text = ""; - } - - // ERROR: Handles clauses are not supported in C# - private void guessbox_keydown(object sender, System.Windows.Forms.KeyEventArgs e) - { - if (e.KeyCode == Keys.Enter) - { - e.SuppressKeyPress = true; - handleword(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void decider_Tick(object sender, EventArgs e) - { - lblcurrentlevel.Text = "Current Level: " + level; - lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; - guessalreadydone = false; - guesscorrect = false; - levelup = false; - decider.Interval = 500; - decider.Stop(); - } - - private void loadsavepoint(string title, int reward, string loadpath, string info, string[] listtype) - { - lblcategory.Text = title; - rewardbase = reward; - listblistedstuff.Items.Clear(); - if (File.Exists(loadpath)) - { - listblistedstuff.Items.AddRange(File.ReadAllLines(loadpath)); - } - totalguessed = listblistedstuff.Items.Count; - level = (int)Math.Ceiling((double)(totalguessed / 10)); - tillnextlevel = Math.Abs(totalguessed - (level * 10)); - - if (tillnextlevel == 0) - { - level = level + 1; - tillnextlevel = 10; - } - - lblcatedescription.Text = info; - pnlcategorydisplay.Show(); - lbltillnextlevel.Text = "Words Until Next Level: " + tillnextlevel; - lblcurrentlevel.Text = "Current Level: " + level; - lbltotal.Text = "Guessed: " + totalguessed + "/" + listtype.Length; - lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; - } - - - private void handlewordtype(string[] listtype, string savepath) - { - string userguess = guessbox.Text; - userguess = userguess.ToLower(); - foreach (string Str in listtype) - { - if (Str == userguess) - { - if (listblistedstuff.Items.Contains(userguess)) - { - guessalreadydone = true; - } - else { - guesscorrect = true; - listblistedstuff.Items.Add(userguess); - tillnextlevel = tillnextlevel - 1; - totalguessed = totalguessed + 1; - File.WriteAllLines(savepath, listblistedstuff.Items.Cast<string>().ToArray()); - - if (tillnextlevel == 0) - { - levelup = true; - tillnextlevel = 10; - API.AddCodepoints(rewardbase * level); - level = level + 1; - } - } - } - } - lbltillnextlevel.Text = "Words Until Next Level: " + tillnextlevel; - lblcurrentlevel.Text = "Current Level: " + level; - lbltotal.Text = "Guessed: " + totalguessed + "/" + listtype.Length; - lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; - - if (levelup == true) - { - decider.Interval = 2000; - lblcurrentlevel.Text = "Level Up!"; - lblnextreward.Text = "You have earned " + rewardbase * (level - 1) + " Code Points!"; - decider.Start(); - } - else { - if (guessalreadydone == true) - { - lblcurrentlevel.Text = "Already Guessed"; - decider.Start(); - } - else { - if (guesscorrect == true) - { - lblcurrentlevel.Text = "Correct :)"; - decider.Start(); - } - else { - lblcurrentlevel.Text = "Wrong :("; - decider.Start(); - } - } - } - } - - - // ERROR: Handles clauses are not supported in C# - private void me_closing() - { - tmrstoryline.Stop(); - } - - private void makeanimallist() - { - animalslist[0] = "aardvark"; - animalslist[1] = "albatross"; - animalslist[2] = "alligator"; - animalslist[3] = "alpaca"; - animalslist[4] = "ant"; - animalslist[5] = "anteater"; - animalslist[6] = "antelope"; - animalslist[7] = "ape"; - animalslist[8] = "armadillo"; - animalslist[9] = "ass"; - animalslist[10] = "baboon"; - animalslist[11] = "badger"; - animalslist[12] = "barracuda"; - animalslist[13] = "bat"; - animalslist[14] = "bear"; - animalslist[15] = "beaver"; - animalslist[16] = "bee"; - animalslist[17] = "bison"; - animalslist[18] = "boar"; - animalslist[19] = "buffalo"; - animalslist[20] = "butterfly"; - animalslist[21] = "camel"; - animalslist[22] = "caribou"; - animalslist[23] = "cat"; - animalslist[24] = "caterpillar"; - animalslist[25] = "cow"; - animalslist[26] = "chamois"; - animalslist[27] = "cheetah"; - animalslist[28] = "chicken"; - animalslist[29] = "chimpanzee"; - animalslist[30] = "chinchilla"; - animalslist[31] = "chough"; - animalslist[32] = "clam"; - animalslist[33] = "cobra"; - animalslist[34] = "cockroach"; - animalslist[35] = "cod"; - animalslist[36] = "cormorant"; - animalslist[37] = "coyote"; - animalslist[38] = "crab"; - animalslist[39] = "crane"; - animalslist[40] = "crocodile"; - animalslist[41] = "crow"; - animalslist[42] = "curlew"; - animalslist[43] = "deer"; - animalslist[44] = "dinosaur"; - animalslist[45] = "dog"; - animalslist[46] = "dogfish"; - animalslist[47] = "dolphin"; - animalslist[48] = "donkey"; - animalslist[49] = "dotterel"; - animalslist[50] = "dove"; - animalslist[51] = "dragonfly"; - animalslist[52] = "duck"; - animalslist[53] = "dugong"; - animalslist[54] = "dunlin"; - animalslist[55] = "eagle"; - animalslist[56] = "echidna"; - animalslist[57] = "eel"; - animalslist[58] = "eland"; - animalslist[59] = "elephant"; - animalslist[60] = "elephant seal"; - animalslist[61] = "elk"; - animalslist[62] = "emu"; - animalslist[63] = "falcon"; - animalslist[64] = "ferret"; - animalslist[65] = "finch"; - animalslist[66] = "fish"; - animalslist[67] = "flamingo"; - animalslist[68] = "fly"; - animalslist[69] = "fox"; - animalslist[70] = "frog"; - animalslist[71] = "galago"; - animalslist[72] = "gaur"; - animalslist[73] = "gazelle"; - animalslist[74] = "gerbil"; - animalslist[75] = "giant panda"; - animalslist[76] = "giraffe"; - animalslist[77] = "gnat"; - animalslist[78] = "gnu"; - animalslist[79] = "goat"; - animalslist[80] = "goldfinch"; - animalslist[81] = "goldfish"; - animalslist[82] = "goose"; - animalslist[83] = "gorilla"; - animalslist[84] = "goshawk"; - animalslist[85] = "grasshopper"; - animalslist[86] = "grouse"; - animalslist[87] = "guanaco"; - animalslist[88] = "guineafowl"; - animalslist[89] = "guinea pig"; - animalslist[90] = "gull"; - animalslist[91] = "hamster"; - animalslist[92] = "hare"; - animalslist[93] = "hawk"; - animalslist[94] = "hedgehog"; - animalslist[95] = "heron"; - animalslist[96] = "herring"; - animalslist[97] = "hippopotamus"; - animalslist[98] = "hornet"; - animalslist[99] = "horse"; - animalslist[100] = "human"; - animalslist[101] = "humming bird"; - animalslist[102] = "hyena"; - animalslist[103] = "jackal"; - animalslist[104] = "jaguar"; - animalslist[105] = "jay"; - animalslist[106] = "jellyfish"; - animalslist[107] = "kangaroo"; - animalslist[108] = "koala"; - animalslist[109] = "komodo dragon"; - animalslist[110] = "kouprey"; - animalslist[111] = "kudu"; - animalslist[112] = "lizard"; - animalslist[113] = "lark"; - animalslist[114] = "lemur"; - animalslist[115] = "leopard"; - animalslist[116] = "lion"; - animalslist[117] = "llama"; - animalslist[118] = "lobster"; - animalslist[119] = "locust"; - animalslist[120] = "loris"; - animalslist[121] = "louse"; - animalslist[122] = "lyrebird"; - animalslist[123] = "magpie"; - animalslist[124] = "mallard"; - animalslist[125] = "manatee"; - animalslist[126] = "marten"; - animalslist[127] = "meerkat"; - animalslist[128] = "mink"; - animalslist[129] = "mole"; - animalslist[130] = "monkey"; - animalslist[131] = "moose"; - animalslist[132] = "mosquito"; - animalslist[133] = "mouse"; - animalslist[134] = "mule"; - animalslist[135] = "narwhal"; - animalslist[136] = "newt"; - animalslist[137] = "nightingale"; - animalslist[138] = "octopus"; - animalslist[139] = "okapi"; - animalslist[140] = "opossum"; - animalslist[141] = "oryx"; - animalslist[142] = "ostrich"; - animalslist[143] = "otter"; - animalslist[144] = "owl"; - animalslist[145] = "ox"; - animalslist[146] = "oyster"; - animalslist[147] = "panther"; - animalslist[148] = "parrot"; - animalslist[149] = "partridge"; - animalslist[150] = "peafowl"; - animalslist[151] = "pelican"; - animalslist[152] = "penguin"; - animalslist[153] = "pheasant"; - animalslist[154] = "pig"; - animalslist[155] = "pigeon"; - animalslist[156] = "pony"; - animalslist[157] = "porcupine"; - animalslist[158] = "porpoise"; - animalslist[159] = "prairie dog"; - animalslist[160] = "quail"; - animalslist[161] = "quelea"; - animalslist[162] = "rabbit"; - animalslist[163] = "raccoon"; - animalslist[164] = "rail"; - animalslist[165] = "ram"; - animalslist[166] = "rat"; - animalslist[167] = "raven"; - animalslist[168] = "red deer"; - animalslist[169] = "red panda"; - animalslist[170] = "reindeer"; - animalslist[171] = "rhinoceros"; - animalslist[172] = "rook"; - animalslist[173] = "ruff"; - animalslist[174] = "salamander"; - animalslist[175] = "salmon"; - animalslist[176] = "sand dollar"; - animalslist[177] = "sandpiper"; - animalslist[178] = "sardine"; - animalslist[179] = "scorpion"; - animalslist[180] = "sea lion"; - animalslist[181] = "sea urchin"; - animalslist[182] = "seahorse"; - animalslist[183] = "seal"; - animalslist[184] = "shark"; - animalslist[185] = "sheep"; - animalslist[186] = "shrew"; - animalslist[187] = "shrimp"; - animalslist[188] = "skunk"; - animalslist[189] = "snail"; - animalslist[190] = "snake"; - animalslist[191] = "spider"; - animalslist[192] = "squid"; - animalslist[193] = "squirrel"; - animalslist[194] = "starling"; - animalslist[195] = "stingray"; - animalslist[196] = "stink bug"; - animalslist[197] = "stork"; - animalslist[198] = "swallow"; - animalslist[199] = "swan"; - animalslist[200] = "tapir"; - animalslist[201] = "tarsier"; - animalslist[202] = "termite"; - animalslist[203] = "tiger"; - animalslist[204] = "toad"; - animalslist[205] = "trout"; - animalslist[206] = "turkey"; - animalslist[207] = "turtle"; - animalslist[208] = "vicuña"; - animalslist[209] = "viper"; - animalslist[210] = "vulture"; - animalslist[211] = "wallaby"; - animalslist[212] = "walrus"; - animalslist[213] = "wasp"; - animalslist[214] = "water buffalo"; - animalslist[215] = "weasel"; - animalslist[216] = "whale"; - animalslist[217] = "wolf"; - animalslist[218] = "wolverine"; - animalslist[219] = "wombat"; - animalslist[220] = "woodcock"; - animalslist[221] = "woodpecker"; - animalslist[222] = "worm"; - animalslist[223] = "wren"; - animalslist[224] = "yak"; - animalslist[225] = "zebra"; - animalslist[226] = "bird"; - } - - private void makefruitlist() - { - fruitslist[0] = "apple"; - fruitslist[1] = "apricot"; - fruitslist[2] = "avocado"; - fruitslist[3] = "banana"; - fruitslist[4] = "breadfruit"; - fruitslist[5] = "bilberry"; - fruitslist[6] = "blackberry"; - fruitslist[7] = "blackcurrant"; - fruitslist[8] = "blueberry"; - fruitslist[9] = "boysenberry"; - fruitslist[10] = "cantaloupe"; - fruitslist[11] = "currant"; - fruitslist[12] = "cherry"; - fruitslist[13] = "cherimoya"; - fruitslist[14] = "chili"; - fruitslist[15] = "cloudberry"; - fruitslist[16] = "coconut"; - fruitslist[17] = "damson"; - fruitslist[18] = "date"; - fruitslist[19] = "dragonfruit"; - fruitslist[20] = "durian"; - fruitslist[21] = "elderberry"; - fruitslist[22] = "feijoa"; - fruitslist[23] = "fig"; - fruitslist[24] = "gooseberry"; - fruitslist[25] = "grape"; - fruitslist[26] = "grapefruit"; - fruitslist[27] = "guava"; - fruitslist[28] = "huckleberry"; - fruitslist[29] = "honeydew"; - fruitslist[30] = "jackfruit"; - fruitslist[31] = "jambul"; - fruitslist[32] = "jujube"; - fruitslist[33] = "kiwi fruit"; - fruitslist[34] = "kumquat"; - fruitslist[35] = "legume"; - fruitslist[36] = "lemon"; - fruitslist[37] = "lime"; - fruitslist[38] = "loquat"; - fruitslist[39] = "lychee"; - fruitslist[40] = "mango"; - fruitslist[41] = "melon"; - fruitslist[42] = "canary melon"; - fruitslist[43] = "cantaloupe"; - fruitslist[44] = "honeydew"; - fruitslist[45] = "watermelon"; - fruitslist[46] = "rock melon"; - fruitslist[47] = "nectarine"; - fruitslist[48] = "nut"; - fruitslist[49] = "orange"; - fruitslist[50] = "clementine"; - fruitslist[51] = "mandarine"; - fruitslist[52] = "tangerine"; - fruitslist[53] = "papaya"; - fruitslist[54] = "passionfruit"; - fruitslist[55] = "peach"; - fruitslist[56] = "bell pepper"; - fruitslist[57] = "pear"; - fruitslist[58] = "persimmon"; - fruitslist[59] = "physalis"; - fruitslist[60] = "plum"; - fruitslist[61] = "pineapple"; - fruitslist[62] = "pomegranate"; - fruitslist[63] = "pomelo"; - fruitslist[64] = "purple mangosteen"; - fruitslist[65] = "quince"; - fruitslist[66] = "raspberry"; - fruitslist[67] = "rambutan"; - fruitslist[68] = "redcurrant"; - fruitslist[69] = "salal berry"; - fruitslist[70] = "satsuma"; - fruitslist[71] = "star fruit"; - fruitslist[72] = "strawberry"; - fruitslist[73] = "tamarillo"; - fruitslist[74] = "tomato"; - fruitslist[75] = "ugli fruit"; - } - - //Based off United Nations member list with additions such as Vatican City - see this video about what a coutry is: https://www.youtube.com/watch?v=4AivEQmfPpk - private void makecountrieslist() - { - countrieslist[0] = "afghanistan"; - countrieslist[1] = "albania"; - countrieslist[2] = "algeria"; - countrieslist[3] = "antigua and barbuda"; - countrieslist[4] = "andorra"; - countrieslist[5] = "angola"; - countrieslist[8] = "argentina"; - countrieslist[9] = "armenia"; - countrieslist[10] = "australia"; - countrieslist[12] = "austria"; - countrieslist[14] = "azerbaijan"; - countrieslist[15] = "bahamas"; - countrieslist[16] = "bahrain"; - countrieslist[17] = "bangladesh"; - countrieslist[18] = "barbados"; - countrieslist[19] = "belarus"; - countrieslist[20] = "belgium"; - countrieslist[21] = "belize"; - countrieslist[22] = "benin"; - countrieslist[23] = "bhutan"; - countrieslist[24] = "bolivia"; - countrieslist[25] = "bosnia"; - countrieslist[26] = "botswana"; - countrieslist[27] = "brunei darussalam"; - countrieslist[28] = "brazil"; - countrieslist[29] = "cabo verde"; - countrieslist[30] = "bulgaria"; - countrieslist[31] = "burkina faso"; - countrieslist[32] = "burundi"; - countrieslist[33] = "cambodia"; - countrieslist[34] = "cameroon"; - countrieslist[35] = "canada"; - countrieslist[36] = "central african republic"; - countrieslist[37] = "chad"; - countrieslist[38] = "chile"; - countrieslist[39] = "china"; - countrieslist[40] = "democratic people's republic of korea"; - countrieslist[41] = "colombia"; - countrieslist[42] = "comoros"; - countrieslist[43] = "congo"; - countrieslist[44] = "côte d'ivoire"; - countrieslist[45] = "cook islands"; - countrieslist[46] = "costa rica"; - countrieslist[47] = "croatia"; - countrieslist[48] = "cuba"; - countrieslist[49] = "cyprus"; - countrieslist[50] = "czech republic"; - countrieslist[51] = "denmark"; - countrieslist[52] = "djibouti"; - countrieslist[53] = "dominica"; - countrieslist[54] = "dominican republic"; - countrieslist[55] = "ecuador"; - countrieslist[56] = "egypt"; - countrieslist[57] = "el salvador"; - countrieslist[58] = "equatorial guinea"; - countrieslist[59] = "eritrea"; - countrieslist[60] = "estonia"; - countrieslist[62] = "ethiopia"; - countrieslist[63] = "fiji"; - countrieslist[64] = "finland"; - countrieslist[65] = "france"; - countrieslist[66] = "gabon"; - countrieslist[67] = "gambia"; - countrieslist[68] = "georgia"; - countrieslist[69] = "germany"; - countrieslist[70] = "ghana"; - countrieslist[71] = "greece"; - countrieslist[72] = "greenland"; - countrieslist[73] = "grenada"; - countrieslist[74] = "guatemala"; - countrieslist[75] = "guinea"; - countrieslist[76] = "guinea bissau"; - countrieslist[77] = "guyana"; - countrieslist[78] = "haiti"; - countrieslist[79] = "vatican city"; - countrieslist[80] = "honduras"; - countrieslist[81] = "hungary"; - countrieslist[82] = "iceland"; - countrieslist[83] = "india"; - countrieslist[84] = "indonesia"; - countrieslist[85] = "iran"; - countrieslist[86] = "iraq"; - countrieslist[87] = "ireland"; - countrieslist[88] = "israel"; - countrieslist[89] = "italy"; - countrieslist[90] = "jamaica"; - countrieslist[91] = "japan"; - countrieslist[92] = "jordan"; - countrieslist[93] = "kazakhstan"; - countrieslist[94] = "kenya"; - countrieslist[95] = "kiribati"; - countrieslist[96] = "kuwait"; - countrieslist[97] = "kyrgyzstan"; - countrieslist[98] = "lao people's democratic republic"; - countrieslist[99] = "latvia"; - countrieslist[100] = "lebanon"; - countrieslist[101] = "lesotho"; - countrieslist[102] = "liberia"; - countrieslist[103] = "libya"; - countrieslist[104] = "liechtenstein"; - countrieslist[105] = "lithuania"; - countrieslist[106] = "luxembourg"; - countrieslist[107] = "madagascar"; - countrieslist[108] = "malawi"; - countrieslist[109] = "malaysia"; - countrieslist[110] = "maldives"; - countrieslist[111] = "mali"; - countrieslist[112] = "malta"; - countrieslist[113] = "marshall islands"; - countrieslist[114] = "mauritania"; - countrieslist[115] = "mauritius"; - countrieslist[116] = "mexico"; - countrieslist[117] = "micronesia"; - countrieslist[118] = "monaco"; - countrieslist[119] = "mongolia"; - countrieslist[120] = "montenegro"; - countrieslist[121] = "morocco"; - countrieslist[122] = "mozambique"; - countrieslist[123] = "myanmar"; - countrieslist[124] = "namibia"; - countrieslist[125] = "nauru"; - countrieslist[126] = "nepal"; - countrieslist[127] = "netherlands"; - countrieslist[128] = "new zealand"; - countrieslist[129] = "nicaragua"; - countrieslist[130] = "niger"; - countrieslist[131] = "nigeria"; - countrieslist[132] = "north korea"; - countrieslist[133] = "norway"; - countrieslist[134] = "oman"; - countrieslist[135] = "pakistan"; - countrieslist[136] = "palau"; - countrieslist[137] = "panama"; - countrieslist[138] = "papua new guinea"; - countrieslist[139] = "paraguay"; - countrieslist[140] = "peru"; - countrieslist[141] = "philippines"; - countrieslist[142] = "republic of moldova"; - countrieslist[143] = "poland"; - countrieslist[144] = "polynesia"; - countrieslist[145] = "portugal"; - countrieslist[146] = "republic of korea"; - countrieslist[147] = "romania"; - countrieslist[148] = "russia"; - countrieslist[149] = "rwanda"; - countrieslist[150] = "saint kitts and nevis"; - countrieslist[151] = "saint lucia"; - countrieslist[152] = "saint pierre and miquelon"; - countrieslist[153] = "saint vincent and grenadines"; - countrieslist[154] = "samoa"; - countrieslist[155] = "san marino"; - countrieslist[156] = "sao tome and principe"; - countrieslist[157] = "saudi arabia"; - countrieslist[158] = "senegal"; - countrieslist[159] = "serbia"; - countrieslist[160] = "seychelles"; - countrieslist[161] = "sierra leone"; - countrieslist[162] = "singapore"; - countrieslist[163] = "slovakia"; - countrieslist[164] = "slovenia"; - countrieslist[165] = "solomon islands"; - countrieslist[166] = "somalia"; - countrieslist[167] = "south africa"; - countrieslist[168] = "south korea"; - countrieslist[169] = "south sudan"; - countrieslist[170] = "spain"; - countrieslist[171] = "sri lanka"; - countrieslist[172] = "sudan"; - countrieslist[173] = "suriname"; - countrieslist[174] = "syrian arab republic"; - countrieslist[175] = "swaziland"; - countrieslist[176] = "sweden"; - countrieslist[177] = "switzerland"; - countrieslist[178] = "syria"; - countrieslist[179] = "taiwan"; - countrieslist[180] = "tajikistan"; - countrieslist[181] = "thailand"; - countrieslist[182] = "east timor"; - countrieslist[183] = "togo"; - countrieslist[184] = "tonga"; - countrieslist[185] = "trinidad and tobago"; - countrieslist[186] = "tunisia"; - countrieslist[187] = "turkey"; - countrieslist[188] = "turkmenistan"; - countrieslist[189] = "united republic of tanzania"; - countrieslist[190] = "tuvalu"; - countrieslist[191] = "uganda"; - countrieslist[192] = "ukraine"; - countrieslist[193] = "united arab emirates"; - countrieslist[194] = "united kingdom"; - //(of Great Britian and Northern Ireland) - countrieslist[195] = "united states"; - countrieslist[196] = "uruguay"; - countrieslist[197] = "uzbekistan"; - countrieslist[198] = "vanuatu"; - countrieslist[199] = "venezuela"; - countrieslist[200] = "vietnam"; - countrieslist[201] = "palestine"; - countrieslist[202] = "yemen"; - countrieslist[203] = "zambia"; - countrieslist[204] = "zimbabwe"; - } - - public void makecarbrandslist() - { - carbrandslist[0] = "8 chinkara"; - carbrandslist[1] = "aba"; - carbrandslist[2] = "abarth"; - carbrandslist[3] = "ac"; - carbrandslist[4] = "ac schnitzer"; - carbrandslist[5] = "acura"; - carbrandslist[6] = "adam"; - carbrandslist[7] = "adams-farwell"; - carbrandslist[8] = "adler"; - carbrandslist[9] = "aero"; - carbrandslist[10] = "aga"; - carbrandslist[11] = "agrale"; - carbrandslist[12] = "aixam"; - carbrandslist[13] = "alfa romeo"; - carbrandslist[14] = "allard"; - carbrandslist[15] = "alpine"; - carbrandslist[16] = "alvis"; - carbrandslist[17] = "anadol"; - carbrandslist[18] = "anasagasti"; - carbrandslist[19] = "angkor"; - carbrandslist[20] = "apollo"; - carbrandslist[21] = "armstrong siddeley"; - carbrandslist[22] = "aro"; - carbrandslist[23] = "ascari"; - carbrandslist[24] = "ashok leyland"; - carbrandslist[25] = "aston martin"; - carbrandslist[26] = "auburn"; - carbrandslist[27] = "audi"; - carbrandslist[28] = "austin"; - carbrandslist[29] = "austin-healey"; - carbrandslist[30] = "auto-mixte"; - carbrandslist[31] = "autobianchi"; - carbrandslist[32] = "automobile dacia"; - carbrandslist[33] = "avia"; - carbrandslist[34] = "avtoframos"; - carbrandslist[35] = "awz"; - carbrandslist[36] = "bahman"; - carbrandslist[37] = "bajaj"; - carbrandslist[38] = "barkas"; - carbrandslist[39] = "bate"; - carbrandslist[40] = "bentley"; - carbrandslist[41] = "bharath benz"; - carbrandslist[42] = "bitter"; - carbrandslist[43] = "bmc"; - carbrandslist[44] = "bmw"; - carbrandslist[45] = "bollore"; - carbrandslist[46] = "borgward"; - carbrandslist[47] = "bricklin"; - carbrandslist[48] = "bristol"; - carbrandslist[49] = "british leyland"; - carbrandslist[50] = "bufori"; - carbrandslist[51] = "bugatti"; - carbrandslist[52] = "buick"; - carbrandslist[53] = "bussing"; - carbrandslist[54] = "c-fee"; - carbrandslist[55] = "cadillac"; - carbrandslist[56] = "callaway"; - carbrandslist[57] = "caterham"; - carbrandslist[58] = "cherdchai"; - carbrandslist[59] = "chevrolet"; - carbrandslist[60] = "chrysler"; - carbrandslist[61] = "citroen"; - carbrandslist[62] = "cizeta"; - carbrandslist[63] = "coda"; - carbrandslist[64] = "cord"; - carbrandslist[65] = "crespi"; - carbrandslist[66] = "crobus"; - carbrandslist[67] = "daf"; - carbrandslist[68] = "daihatsu"; - carbrandslist[69] = "daimler"; - carbrandslist[70] = "datsun"; - carbrandslist[71] = "davis"; - carbrandslist[72] = "dc design"; - carbrandslist[73] = "de tomaso"; - carbrandslist[74] = "delorean"; - carbrandslist[75] = "derby"; - carbrandslist[76] = "dina"; - carbrandslist[77] = "dkw"; - carbrandslist[78] = "knowledgeinput"; - carbrandslist[79] = "dok-ing"; - carbrandslist[80] = "dok-ing xd"; - carbrandslist[81] = "dome"; - carbrandslist[82] = "donkervoort"; - carbrandslist[83] = "dr"; - carbrandslist[84] = "duesenberg"; - carbrandslist[85] = "e-z-go"; - carbrandslist[86] = "eagle"; - carbrandslist[87] = "edsel"; - carbrandslist[88] = "eicher"; - carbrandslist[89] = "elfin"; - carbrandslist[90] = "elva"; - carbrandslist[91] = "enzmann"; - carbrandslist[92] = "essex"; - carbrandslist[93] = "esther"; - carbrandslist[94] = "exagon"; - carbrandslist[95] = "falcon"; - carbrandslist[96] = "fap"; - carbrandslist[97] = "ferrari"; - carbrandslist[98] = "fiat"; - carbrandslist[99] = "fisker"; - carbrandslist[100] = "force"; - carbrandslist[101] = "ford"; - carbrandslist[102] = "fpv"; - carbrandslist[103] = "gaz"; - carbrandslist[104] = "gengatharan"; - carbrandslist[105] = "geo"; - carbrandslist[106] = "ghandhara"; - carbrandslist[107] = "ghandhara nissan"; - carbrandslist[108] = "gillet"; - carbrandslist[109] = "ginetta"; - carbrandslist[110] = "gkd"; - carbrandslist[111] = "glas"; - carbrandslist[112] = "global electric"; - carbrandslist[113] = "gm daewoo"; - carbrandslist[114] = "gm uzbekistan"; - carbrandslist[115] = "gmc"; - carbrandslist[116] = "goliath"; - carbrandslist[117] = "gordon keeble"; - carbrandslist[118] = "graham-paige"; - carbrandslist[119] = "guleryuz karoseri"; - carbrandslist[120] = "gumpert"; - carbrandslist[121] = "gurgel"; - carbrandslist[122] = "hansa"; - carbrandslist[123] = "hattat"; - carbrandslist[124] = "heinkel"; - carbrandslist[125] = "hennessey"; - carbrandslist[126] = "hero"; - carbrandslist[127] = "hillman"; - carbrandslist[128] = "hindustan"; - carbrandslist[129] = "hino"; - carbrandslist[130] = "hinopak"; - carbrandslist[131] = "hispano-argentina"; - carbrandslist[132] = "holden"; - carbrandslist[133] = "hommell"; - carbrandslist[134] = "honda"; - carbrandslist[135] = "honda atlas"; - carbrandslist[136] = "horch"; - carbrandslist[137] = "hsv"; - carbrandslist[138] = "huet brothers"; - carbrandslist[139] = "humber"; - carbrandslist[140] = "hummer"; - carbrandslist[141] = "hupmobile"; - carbrandslist[142] = "hyundai"; - carbrandslist[143] = "iame"; - carbrandslist[144] = "icml"; - carbrandslist[145] = "ida-opel"; - carbrandslist[146] = "ika"; - carbrandslist[147] = "ikarbus"; - carbrandslist[148] = "ikco"; - carbrandslist[149] = "indus"; - carbrandslist[150] = "infiniti"; - carbrandslist[151] = "inokom"; - carbrandslist[152] = "intermeccanica"; - carbrandslist[153] = "international harvester"; - carbrandslist[154] = "isuzu"; - carbrandslist[155] = "isuzu anadolu"; - carbrandslist[156] = "italika"; - carbrandslist[157] = "izh"; - carbrandslist[158] = "jaguar cars"; - carbrandslist[159] = "jeep"; - carbrandslist[160] = "jensen"; - carbrandslist[161] = "josse"; - carbrandslist[162] = "jowett"; - carbrandslist[163] = "jv man"; - carbrandslist[164] = "kaipan"; - carbrandslist[165] = "kaiser"; - carbrandslist[166] = "karsan"; - carbrandslist[167] = "kerman"; - carbrandslist[168] = "kia"; - carbrandslist[169] = "kia"; - carbrandslist[170] = "kish khodro"; - carbrandslist[171] = "kissel"; - carbrandslist[172] = "koenigsegg"; - carbrandslist[173] = "lada"; - carbrandslist[174] = "laforza"; - carbrandslist[175] = "lamborghini"; - carbrandslist[176] = "lanchester"; - carbrandslist[177] = "lancia"; - carbrandslist[178] = "land rover"; - carbrandslist[179] = "lasalle"; - carbrandslist[180] = "lexus"; - carbrandslist[181] = "ligier"; - carbrandslist[182] = "lincoln"; - carbrandslist[183] = "lister"; - carbrandslist[184] = "lloyd"; - carbrandslist[185] = "lobini"; - carbrandslist[186] = "locomobile"; - carbrandslist[187] = "lotus"; - carbrandslist[188] = "mahindra"; - carbrandslist[189] = "man"; - carbrandslist[190] = "mansory"; - carbrandslist[191] = "marcos"; - carbrandslist[192] = "marmon"; - carbrandslist[193] = "marussia"; - carbrandslist[194] = "maruti suzuki"; - carbrandslist[195] = "maserati"; - carbrandslist[196] = "master"; - carbrandslist[197] = "mastretta"; - carbrandslist[198] = "matra"; - carbrandslist[199] = "maybach"; - carbrandslist[200] = "mazda"; - carbrandslist[201] = "mclaren"; - carbrandslist[202] = "mdi"; - carbrandslist[203] = "mercedes"; - carbrandslist[204] = "mercury"; - carbrandslist[205] = "micro"; - carbrandslist[206] = "microcar"; - carbrandslist[207] = "mini"; - carbrandslist[208] = "mini cooper"; - carbrandslist[209] = "mitsubishi"; - carbrandslist[210] = "mitsuoka"; - carbrandslist[211] = "morgan"; - carbrandslist[212] = "morris"; - carbrandslist[213] = "moskvitch"; - carbrandslist[214] = "mosler"; - carbrandslist[215] = "multicar"; - carbrandslist[216] = "mvm"; - carbrandslist[217] = "nag"; - carbrandslist[218] = "nagant"; - carbrandslist[219] = "nash"; - carbrandslist[220] = "navistar"; - carbrandslist[221] = "naza"; - carbrandslist[222] = "neobus"; - carbrandslist[223] = "neoplan"; - carbrandslist[224] = "nissan"; - carbrandslist[225] = "noble"; - carbrandslist[226] = "nsu"; - carbrandslist[227] = "oldsmobile"; - carbrandslist[228] = "oltcit"; - carbrandslist[229] = "opel"; - carbrandslist[230] = "orient"; - carbrandslist[231] = "otokar"; - carbrandslist[232] = "otosan"; - carbrandslist[233] = "oyak"; - carbrandslist[234] = "p.a.r.s moto"; - carbrandslist[235] = "packard"; - carbrandslist[236] = "pagani"; - carbrandslist[237] = "pak suzuki"; - carbrandslist[238] = "panoz"; - carbrandslist[239] = "pars khodro"; - carbrandslist[240] = "perodua"; - carbrandslist[241] = "peugeot"; - carbrandslist[242] = "pgo"; - carbrandslist[243] = "pieper"; - carbrandslist[244] = "pierce-arrow"; - carbrandslist[245] = "plymouth"; - carbrandslist[246] = "pontiac"; - carbrandslist[247] = "porsche"; - carbrandslist[248] = "praga"; - carbrandslist[249] = "premier"; - carbrandslist[250] = "proto"; - carbrandslist[251] = "proton"; - carbrandslist[252] = "puma"; - carbrandslist[253] = "ram"; - carbrandslist[254] = "ramirez"; - carbrandslist[255] = "regal"; - carbrandslist[256] = "renault"; - carbrandslist[257] = "renault samsung"; - carbrandslist[258] = "reo"; - carbrandslist[259] = "riley"; - carbrandslist[260] = "rimac"; - carbrandslist[261] = "robur"; - carbrandslist[262] = "rolls royce"; - carbrandslist[263] = "rover"; - carbrandslist[264] = "ruf"; - carbrandslist[265] = "russo-balt"; - carbrandslist[266] = "saab"; - carbrandslist[267] = "saipa"; - carbrandslist[268] = "saleen"; - carbrandslist[269] = "samavto"; - carbrandslist[270] = "saturn"; - carbrandslist[271] = "sbarro"; - carbrandslist[272] = "scania"; - carbrandslist[273] = "scion"; - carbrandslist[274] = "shane moto"; - carbrandslist[275] = "siam v.m.c."; - carbrandslist[276] = "siata"; - carbrandslist[277] = "simson"; - carbrandslist[278] = "singer"; - carbrandslist[279] = "skoda"; - carbrandslist[280] = "sound"; - carbrandslist[281] = "spyker"; - carbrandslist[282] = "ssangyong"; - carbrandslist[283] = "standard"; - carbrandslist[284] = "stealth"; - carbrandslist[285] = "sterling"; - carbrandslist[286] = "studebaker"; - carbrandslist[287] = "subaru"; - carbrandslist[288] = "sunbeam"; - carbrandslist[289] = "suzuki"; - carbrandslist[290] = "tac"; - carbrandslist[291] = "tafe"; - carbrandslist[292] = "tata"; - carbrandslist[293] = "tatra"; - carbrandslist[294] = "td2000"; - carbrandslist[295] = "temsa"; - carbrandslist[296] = "tesla"; - carbrandslist[297] = "th!nk"; - carbrandslist[298] = "thai rung"; - carbrandslist[299] = "the jamie stahley car"; - carbrandslist[300] = "tickford"; - carbrandslist[301] = "toyota"; - carbrandslist[302] = "trabant"; - carbrandslist[303] = "tranvias-cimex"; - carbrandslist[304] = "triumph"; - carbrandslist[305] = "trojan"; - carbrandslist[306] = "troller"; - carbrandslist[307] = "tucker"; - carbrandslist[308] = "turk traktor"; - carbrandslist[309] = "tvr"; - carbrandslist[310] = "tvs"; - carbrandslist[311] = "uaz"; - carbrandslist[312] = "vam sa"; - carbrandslist[313] = "vauxhall"; - carbrandslist[314] = "venturi"; - carbrandslist[315] = "vignale"; - carbrandslist[316] = "volkswagen"; - carbrandslist[317] = "volvo"; - carbrandslist[318] = "wanderer"; - carbrandslist[319] = "wartburg"; - carbrandslist[320] = "wiesmann"; - carbrandslist[321] = "willys"; - carbrandslist[322] = "wolseley"; - carbrandslist[323] = "yamaha"; - carbrandslist[324] = "yo-mobile"; - carbrandslist[325] = "zastava"; - carbrandslist[326] = "zenvo"; - carbrandslist[327] = "zil"; - carbrandslist[328] = "zoragy"; - } - - public void makegameconsoleslist() - { - gameconsoleslist[0] = "magnavox odyssey"; - gameconsoleslist[1] = "ping-o-tronic"; - gameconsoleslist[2] = "telstar"; - gameconsoleslist[3] = "apf tv fun"; - gameconsoleslist[4] = "philips odyssey"; - gameconsoleslist[5] = "radio shack tv scoreboard"; - gameconsoleslist[6] = "binatone tv master mk iv"; - gameconsoleslist[7] = "color tv game 6"; - gameconsoleslist[8] = "color tv game 15"; - gameconsoleslist[9] = "color tv racing 112"; - gameconsoleslist[10] = "color tv game block breaker"; - gameconsoleslist[11] = "computer tv game"; - gameconsoleslist[12] = "bss 01"; - gameconsoleslist[13] = "fairchild channel f"; - gameconsoleslist[14] = "fairchild channel f system ii"; - gameconsoleslist[15] = "rca studio ii"; - gameconsoleslist[16] = "atari 2600"; - gameconsoleslist[17] = "atari 2600 jr"; - gameconsoleslist[18] = "atari 2800"; - gameconsoleslist[19] = "coleco gemini"; - gameconsoleslist[20] = "bally astrocade"; - gameconsoleslist[21] = "vc 4000"; - gameconsoleslist[22] = "magnavox odyssey 2"; - gameconsoleslist[23] = "apf imagination machine"; - gameconsoleslist[24] = "intellivision"; - gameconsoleslist[25] = "playcable"; - gameconsoleslist[26] = "bandai super vision 8000"; - gameconsoleslist[27] = "intellivision ii"; - gameconsoleslist[28] = "vtech creativision"; - gameconsoleslist[29] = "epoch cassette vision"; - gameconsoleslist[30] = "super cassette vision"; - gameconsoleslist[31] = "arcadia 2001"; - gameconsoleslist[32] = "atari 5200"; - gameconsoleslist[33] = "atari 5100"; - gameconsoleslist[34] = "colecovision"; - gameconsoleslist[35] = "entex adventure vision"; - gameconsoleslist[36] = "vectrex"; - gameconsoleslist[37] = "rdi halcyon"; - gameconsoleslist[38] = "pv-1000"; - gameconsoleslist[39] = "commodore 64 games system"; - gameconsoleslist[40] = "amstrad gx4000"; - gameconsoleslist[41] = "atari 7800"; - gameconsoleslist[42] = "atari xegs"; - gameconsoleslist[43] = "sega sg-1000"; - gameconsoleslist[44] = "sega master system"; - gameconsoleslist[45] = "nintendo entertainment system"; - gameconsoleslist[46] = "sharp nintendo television"; - gameconsoleslist[47] = "nes-101"; - gameconsoleslist[48] = "family computer disk system"; - gameconsoleslist[49] = "zemmix"; - gameconsoleslist[50] = "action max"; - gameconsoleslist[51] = "sega genesis"; - gameconsoleslist[52] = "sega pico"; - gameconsoleslist[53] = "pc engine"; - gameconsoleslist[54] = "konix multisystem"; - gameconsoleslist[55] = "neo-geo"; - gameconsoleslist[56] = "neo-geo cd"; - gameconsoleslist[57] = "neo-geo cdz"; - gameconsoleslist[58] = "commodore cdtv"; - gameconsoleslist[59] = "memorex vis"; - gameconsoleslist[60] = "super nintendo entertainment system"; - gameconsoleslist[61] = "sf-1 snes tv"; - gameconsoleslist[62] = "snes 2"; - gameconsoleslist[63] = "snes-cd"; - gameconsoleslist[64] = "satellaview"; - gameconsoleslist[65] = "cd-i"; - gameconsoleslist[66] = "turboduo"; - gameconsoleslist[67] = "super a'can"; - gameconsoleslist[68] = "pioneer laseractive"; - gameconsoleslist[69] = "fm towns marty"; - gameconsoleslist[70] = "apple bandai pippin"; - gameconsoleslist[71] = "pc-fx"; - gameconsoleslist[72] = "atari panther"; - gameconsoleslist[73] = "atari jaguar"; - gameconsoleslist[74] = "atari jaguar cd"; - gameconsoleslist[75] = "playstation"; - gameconsoleslist[76] = "net yaroze"; - gameconsoleslist[77] = "sega saturn"; - gameconsoleslist[78] = "3do interactive multiplayer"; - gameconsoleslist[79] = "amiga cd32"; - gameconsoleslist[80] = "casio loopy"; - gameconsoleslist[81] = "playdia"; - gameconsoleslist[82] = "nintendo 64"; - gameconsoleslist[83] = "nintendo 64dd"; - gameconsoleslist[84] = "sega neptune"; - gameconsoleslist[85] = "apextreme"; - gameconsoleslist[86] = "atari flashback"; - gameconsoleslist[87] = "atari jaguar ii"; - gameconsoleslist[88] = "dreamcast"; - gameconsoleslist[89] = "l600"; - gameconsoleslist[90] = "gamecube"; - gameconsoleslist[91] = "nuon"; - gameconsoleslist[92] = "ique player"; - gameconsoleslist[93] = "panasonic m2"; - gameconsoleslist[94] = "panasonic q"; - gameconsoleslist[95] = "playstation 2"; - gameconsoleslist[96] = "psx"; - gameconsoleslist[97] = "v.smile"; - gameconsoleslist[98] = "xavixport gaming console"; - gameconsoleslist[99] = "xbox"; - gameconsoleslist[100] = "atari flashback 2"; - gameconsoleslist[101] = "atari flashback 3"; - gameconsoleslist[102] = "atari flashback 4"; - gameconsoleslist[103] = "evo smart console"; - gameconsoleslist[104] = "retro duo"; - gameconsoleslist[105] = "game wave"; - gameconsoleslist[106] = "mattel hyperscan"; - gameconsoleslist[107] = "onlive"; - gameconsoleslist[108] = "phantom"; - gameconsoleslist[109] = "playstation 3"; - gameconsoleslist[110] = "wii"; - gameconsoleslist[111] = "xbox 360"; - gameconsoleslist[112] = "sega firecore"; - gameconsoleslist[113] = "zeebo"; - gameconsoleslist[114] = "sega zone"; - gameconsoleslist[115] = "eedoo ct510"; - gameconsoleslist[116] = "wii u"; - gameconsoleslist[117] = "ouya"; - gameconsoleslist[118] = "gamestick"; - gameconsoleslist[119] = "mojo"; - gameconsoleslist[120] = "gamepop"; - gameconsoleslist[121] = "playstation 4"; - gameconsoleslist[122] = "steam machine"; - gameconsoleslist[123] = "xbox one"; - gameconsoleslist[124] = "xi3 piston"; - - } - - public void makeelementslist() - { - elementslist[0] = "hydrogen"; - elementslist[1] = "helium"; - elementslist[2] = "lithium"; - elementslist[3] = "beryllium"; - elementslist[4] = "boron"; - elementslist[5] = "carbon"; - elementslist[6] = "nitrogen"; - elementslist[7] = "oxygen"; - elementslist[8] = "fluorine"; - elementslist[9] = "neon"; - elementslist[10] = "sodium"; - elementslist[11] = "magnesium"; - elementslist[12] = "aluminium"; - elementslist[13] = "silicon"; - elementslist[14] = "phosphorus"; - elementslist[15] = "sulfur"; - elementslist[16] = "chlorine"; - elementslist[17] = "argon"; - elementslist[18] = "potassium"; - elementslist[19] = "calcium"; - elementslist[20] = "scandium"; - elementslist[21] = "titanium"; - elementslist[22] = "vanadium"; - elementslist[23] = "chromium"; - elementslist[24] = "manganese"; - elementslist[25] = "iron"; - elementslist[26] = "cobalt"; - elementslist[27] = "nickel"; - elementslist[28] = "copper"; - elementslist[29] = "zinc"; - elementslist[30] = "gallium"; - elementslist[31] = "germanium"; - elementslist[32] = "arsenic"; - elementslist[33] = "selenium"; - elementslist[34] = "bromine"; - elementslist[35] = "krypton"; - elementslist[36] = "rubidium"; - elementslist[37] = "strontium"; - elementslist[38] = "yttrium"; - elementslist[39] = "zirconium"; - elementslist[40] = "niobium"; - elementslist[41] = "molybdenum"; - elementslist[42] = "technetium"; - elementslist[43] = "ruthenium"; - elementslist[44] = "rhodium"; - elementslist[45] = "palladium"; - elementslist[46] = "silver"; - elementslist[47] = "cadmium"; - elementslist[48] = "indium"; - elementslist[49] = "tin"; - elementslist[50] = "antimony"; - elementslist[51] = "tellurium"; - elementslist[52] = "iodine"; - elementslist[53] = "xenon"; - elementslist[54] = "caesium"; - elementslist[55] = "barium"; - elementslist[56] = "lanthanum"; - elementslist[57] = "cerium"; - elementslist[58] = "praseodymium"; - elementslist[59] = "neodymium"; - elementslist[60] = "promethium"; - elementslist[61] = "samarium"; - elementslist[62] = "europium"; - elementslist[63] = "gadolinium"; - elementslist[64] = "terbium"; - elementslist[65] = "dysprosium"; - elementslist[66] = "holmium"; - elementslist[67] = "erbium"; - elementslist[68] = "thulium"; - elementslist[69] = "ytterbium"; - elementslist[70] = "lutetium"; - elementslist[71] = "hafnium"; - elementslist[72] = "tantalum"; - elementslist[73] = "tungsten"; - elementslist[74] = "rhenium"; - elementslist[75] = "osmium"; - elementslist[76] = "iridium"; - elementslist[77] = "platinum"; - elementslist[78] = "gold"; - elementslist[79] = "mercury"; - elementslist[80] = "thallium"; - elementslist[81] = "lead"; - elementslist[82] = "bismuth"; - elementslist[83] = "polonium"; - elementslist[84] = "astatine"; - elementslist[85] = "radon"; - elementslist[86] = "francium"; - elementslist[87] = "radium"; - elementslist[88] = "actinium"; - elementslist[89] = "thorium"; - elementslist[90] = "protactinium"; - elementslist[91] = "uranium"; - elementslist[92] = "neptunium"; - elementslist[93] = "plutonium"; - elementslist[94] = "americium"; - elementslist[95] = "curium"; - elementslist[96] = "berkelium"; - elementslist[97] = "californium"; - elementslist[98] = "einsteinium"; - elementslist[99] = "fermium"; - elementslist[100] = "mendelevium"; - elementslist[101] = "nobelium"; - elementslist[102] = "lawrencium"; - elementslist[103] = "rutherfordium"; - elementslist[104] = "dubnium"; - elementslist[105] = "seaborgium"; - elementslist[106] = "bohrium"; - elementslist[107] = "hassium"; - elementslist[108] = "meitnerium"; - elementslist[109] = "darmstadtium"; - elementslist[110] = "roentgenium"; - elementslist[111] = "copernicium"; - elementslist[112] = "ununtrium"; - elementslist[113] = "flerovium"; - elementslist[114] = "ununpentium"; - elementslist[115] = "livermorium"; - elementslist[116] = "ununseptium"; - elementslist[117] = "ununoctium"; - } - } -} diff --git a/source/WindowsFormsApplication1/KnowledgeInput.resx b/source/WindowsFormsApplication1/KnowledgeInput.resx deleted file mode 100644 index 7310dd5..0000000 --- a/source/WindowsFormsApplication1/KnowledgeInput.resx +++ /dev/null @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="Label2.Text" xml:space="preserve"> - <value> - Select a category on the left to begin playing. - - Every 10 correct guesses levels you up on that category. - - Each level, the amount of codepoints you earn for levelling up -increases by 10. - - Words you have already guessed do not count.</value> - </data> - <metadata name="decider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="tmrstoryline.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>109, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Labyrinth.Designer.cs b/source/WindowsFormsApplication1/Labyrinth.Designer.cs deleted file mode 100644 index 8efe097..0000000 --- a/source/WindowsFormsApplication1/Labyrinth.Designer.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace ShiftOS -{ - partial class Labyrinth - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Text = "Labyrinth"; - } - - #endregion - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Labyrinth.cs b/source/WindowsFormsApplication1/Labyrinth.cs deleted file mode 100644 index ade5495..0000000 --- a/source/WindowsFormsApplication1/Labyrinth.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Labyrinth : Form - { - public Labyrinth() - { - InitializeComponent(); - } - } -} diff --git a/source/WindowsFormsApplication1/ListViewEx.Designer.cs b/source/WindowsFormsApplication1/ListViewEx.Designer.cs deleted file mode 100644 index 1596c8f..0000000 --- a/source/WindowsFormsApplication1/ListViewEx.Designer.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace ShiftOS -{ - partial class ListViewEx - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.tblist = new System.Windows.Forms.TableLayoutPanel(); - this.SuspendLayout(); - // - // tblist - // - this.tblist.AutoSize = true; - this.tblist.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.tblist.ColumnCount = 2; - this.tblist.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tblist.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tblist.Dock = System.Windows.Forms.DockStyle.Fill; - this.tblist.Location = new System.Drawing.Point(0, 0); - this.tblist.Name = "tblist"; - this.tblist.RowCount = 2; - this.tblist.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tblist.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tblist.Size = new System.Drawing.Size(521, 343); - this.tblist.TabIndex = 0; - // - // ListViewEx - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tblist); - this.Name = "ListViewEx"; - this.Size = new System.Drawing.Size(521, 343); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tblist; - } -} diff --git a/source/WindowsFormsApplication1/ListViewEx.cs b/source/WindowsFormsApplication1/ListViewEx.cs deleted file mode 100644 index 075c3df..0000000 --- a/source/WindowsFormsApplication1/ListViewEx.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class ListViewEx : UserControl - { - private List<Item> items = null; - private List<Column> columns = null; - - public ListViewEx() - { - InitializeComponent(); - items = new List<Item>(); - columns = new List<Column>(); - } - - private Color _item_color = Color.Gray; - - public Color ItemSelectedColor - { - get { return _item_color; } - set - { - _item_color = value; - } - } - - private void setup_ui() - { - - } - } - - public class Item - { - public Item(string text) - { - Text = text; - SubItems = new List<Item>(); - } - - public string Text { get; set; } - public List<Item> SubItems { get; set; } - public object Tag { get; set; } - } - - public class Column - { - public Column(string text) - { - Text = text; - } - - public string Text { get; set; } - } - -} diff --git a/source/WindowsFormsApplication1/ListViewEx.resx b/source/WindowsFormsApplication1/ListViewEx.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/ListViewEx.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Lua_Interp.cs b/source/WindowsFormsApplication1/Lua_Interp.cs deleted file mode 100644 index ab87fa7..0000000 --- a/source/WindowsFormsApplication1/Lua_Interp.cs +++ /dev/null @@ -1,1280 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using DynamicLua; -using System.IO; -using System.Drawing; -using System.Windows.Forms; -using Gecko; -using System.Net; -using System.IO.Compression; -using System.ComponentModel; -using System.Threading; -using Newtonsoft.Json; - -namespace ShiftOS -{ - public class Lua_API - { - public static List<LuaInterpreter> RunningMods = new List<LuaInterpreter>(); - public static bool UseLuaAPI = false; - } - - public class LuaInterpreter - { - public dynamic mod = new DynamicLua.DynamicLua(); - public List<string> Errors = new List<string>(); - - /// <summary> - /// Creates a new Lua interpreter and interprets a .lua file. - /// </summary> - /// <param name="modfile">The file to interpret.</param> - public LuaInterpreter(string modfile) - { - Errors.Clear(); - //Initiate the interpreter - mod = new DynamicLua.DynamicLua(); - //Register core functions with the interpreter - RegisterCore(); - //Parse the file contents. - var lua = File.ReadAllText(modfile); - var t = new System.Windows.Forms.Timer(); - ThisDirectory = Directory.GetParent(modfile).FullName; - t.Interval = 50; - t.Tick += (object se, EventArgs ea) => - { - if (Errors.Count > 0) - { - if (API.LoggerTerminal != null) - { - API.LoggerTerminal.WriteLine(Errors[0]); - Errors.Remove(Errors[0]); - } - else - { - API.CreateInfoboxSession("Script Error", $"An error has occurred in your script: {Errors[0]}", infobox.InfoboxMode.Info); - Errors.Remove(Errors[0]); - } - ExitScript(); - } - }; - t.Start(); - try - { - mod(lua); - } - catch (Exception ex) - { - API.CreateInfoboxSession("Mod Interpretation Error", "An error has occurred in your mod." + Environment.NewLine + Environment.NewLine + ex.Message, infobox.InfoboxMode.Info); - } - } - - /// <summary> - /// Creates a new Lua Interpreter but doesn't interpret a file. - /// </summary> - public LuaInterpreter() - { - Errors.Clear(); - //Initiate the interpreter - mod = new DynamicLua.DynamicLua(); - //Register core functions with the interpreter - RegisterCore(); - var t = new System.Windows.Forms.Timer(); - t.Interval = 50; - ThisDirectory = Paths.SaveRoot; - t.Tick += (object se, EventArgs ea) => - { - if (Errors.Count > 0) - { - if (API.LoggerTerminal != null) - { - API.LoggerTerminal.WriteLine(Errors[0]); - Errors.Remove(Errors[0]); - } - else - { - API.CreateInfoboxSession("Script Error", $"An error has occurred in your script: {Errors[0]}", infobox.InfoboxMode.Info); - Errors.Remove(Errors[0]); - } - ExitScript(); - } - }; - t.Start(); - } - - /// <summary> - /// Registers all core ShiftOS Lua functions with their C# counterparts. - /// - /// This is so we don't have to expose the entire source code to the interpreter. Add new functions here. - /// </summary> - public void RegisterCore() - { - //Shifter Extension API - mod.shifter_add_category = new Action<string>((name) => - { - bool add = true; - if(API.LuaShifterRegistry == null) - { - API.LuaShifterRegistry = new Dictionary<string, Dictionary<string, object>>(); - } - foreach(var kv in API.LuaShifterRegistry) - { - if (kv.Key == name) - add = false; - } - if(add == true) - { - API.LuaShifterRegistry.Add(name, new Dictionary<string, object>()); - } - else - { - Errors.Add($"shifter_add_category(\"{name}\"): Error: Category already exists!"); - } - }); - mod.shifter_remove_category = new Action<string>((name) => - { - if(API.LuaShifterRegistry.ContainsKey(name)) - { - API.LuaShifterRegistry.Remove(name); - } - else - { - Errors.Add($"shifter_remove_category(\"{name}\"): No such category."); - } - }); - mod.shifter_add_value = new Action<string, string, object>((cat, name, in_value) => - { - if(API.LuaShifterRegistry.ContainsKey(cat)) - { - var lst = API.LuaShifterRegistry[cat]; - if(!lst.ContainsKey(name)) - { - lst.Add(name, in_value); - } - else - { - Errors.Add($"shifter_add_value(\"{cat}\", \"{name}\", in_value): Category was found, but it already contained a value with the specified name."); - } - } - else - { - Errors.Add($"shifter_add_value(\"{cat}\", \"{name}\", in_value): Category not found."); - } - }); - mod.shifter_get_value = new Func<string, string, object>((cat, name) => - { - if (API.LuaShifterRegistry.ContainsKey(cat)) - { - var lst = API.LuaShifterRegistry[cat]; - if (lst.ContainsKey(name)) - { - return lst[name]; - } - else - { - Errors.Add($"shifter_add_value(\"{cat}\", \"{name}\", in_value): Category was found, but it already contained a value with the specified name."); - return null; - } - } - else - { - Errors.Add($"shifter_add_value(\"{cat}\", \"{name}\", in_value): Category not found."); - return null; - } - }); - - - //APIs. - mod.load_api = new Action<string>((name) => - { - if(File.Exists(Paths.APIs + name + ".lua")) - { - mod(File.ReadAllText(Paths.APIs + name + ".lua")); - } - }); - - //Functions with Return Values - mod.get_app_launcher_items = new Func<List<ApplauncherItem>>(() => - { - var lst = new List<ApplauncherItem>(); - API.GetAppLauncherItems(); - foreach(var itm in API.AppLauncherItems) - { - if(itm.Display == true) - { - lst.Add(itm); - } - } - return lst; - }); - mod.local_image = new Func<string, Image>((filepath) => OpenLocalImage(filepath)); - mod.json_serialize = new Func<object, string>((objectToSerialize) => Newtonsoft.Json.JsonConvert.SerializeObject(objectToSerialize)); - mod.json_unserialize = new Func<string, object>((json_string) => Newtonsoft.Json.JsonConvert.DeserializeObject(json_string)); - mod.open_image = new Func<string, Image>((filename) => OpenImage(filename)); - mod.get_skin = new Func<Skinning.Skin>(() => - { - return API.CurrentSkin; - }); - mod.get_skin_images = new Func<Skinning.Images>(() => - { - return API.CurrentSkinImages; - }); - mod.upgrades = new Func<string, bool>((id) => GetUpgrade(id)); - mod.create_widget = new Func<string, string, int, int, int, int, bool, Control>((type, text, x, y, width, height, dark_mode) => ConstructControl(type, text, x, y, width, height, dark_mode)); - mod.screen_get_width = new Func<int>(() => - { - return System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width; - }); - mod.screen_get_height = new Func<int>(() => - { - return System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height; - }); - mod.create_window_borderless = new Func<int, int, int, int, Form>((x, y, width, height) => CreateForm(x, y, width, height)); - - mod.random = new Func<int, int, int>((min, max) => - { - return new Random().Next(min, max); - }); - mod.color = new Func<int, int, int, Color>((r, g, b) => - { - try - { - return Color.FromArgb(r, g, b); - } - catch - { - Errors.Add("Invalid color values. Values must be a minimum of 0 and a maximum of 255."); - return new Color(); - } - }); - mod.speechrec_create = new Func<SpeechListener>(() => - { - return new SpeechListener(); - }); - mod.speechrec_on_recognize = new Action<SpeechListener, string>((obj, func) => - { - obj.OnRecognize += (object s, EventArgs a) => - { - mod($"{func}('{s.ToString()}')"); - }; - obj.Engine.RecognizeAsync(); - }); - mod.get_desktop_session = new Func<Form>(() => - { - return API.CurrentSession; - }); - mod.get_icon = new Func<string, Image>((id) => API.GetIcon(id)); - mod.add_icon = new Action<string, Image>((id, img) => - { - if(!API.IconRegistry.ContainsKey(id)) - { - API.IconRegistry.Add(id, img); - Skinning.Utilities.saveimages(); - } - }); - mod.icon_exists = new Func<string, bool>((id) => - { - return API.IconRegistry.ContainsKey(id); - }); - mod.create_window = new Func<string, Image, int, int, Form>((title, icon, width, height) => CreateForm(title, icon, width, height)); - mod.get_codepoints = new Func<int>(() => GetCP()); - mod.buy_upgrade = new Func<string, bool>((id) => BuyUPG(id)); - mod.time = new Func<string>(() => API.GetTime()); - mod.encrypt = new Func<string, string>((raw) => API.Encryption.Encrypt(raw)); - mod.decrypt = new Func<string, string>((raw) => API.Encryption.Decrypt(raw)); - mod.fread = new Func<string, string>((filepath) => SafeFileRead(filepath)); - mod.terminal = new Action<string>((command) => - { - var t = new Terminal(); - API.CreateForm(t, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); - t.command = command; - t.DoCommand(); - }); - mod.fwrite = new Action<string, string>((path, contents) => - { - if (path.StartsWith("/")) - { - var real_path = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; - if(!Directory.Exists(real_path)) - { - File.WriteAllText(real_path, contents); - } - } - }); - mod.add_menu_item = new Func<string, MenuStrip, ToolStripMenuItem>((text, parent) => AddMenuItem(text, parent)); - mod.add_child_menu_item = new Func<string, ToolStripMenuItem, ToolStripMenuItem>((text, parent) => - { - try - { - var i = new ToolStripMenuItem(); - i.Text = text; - parent.DropDownItems.Add(i); - return i; - } - catch(Exception ex) - { - Errors.Add("add_child_menu_item(): Error adding child item to parent. " + ex.Message); - return null; - } - }); - mod.set_anchor = new Action<Control, string>((ctrl, anchorstyle) => SetAnchor(ctrl, anchorstyle)); - - //Standard API Functions - mod.include = new Action<string>((filepath) => IncludeScript(filepath)); - mod.log = new Action<string>((msg) => API.Log(msg)); - mod.add_codepoints = new Action<int>((amount) => API.AddCodepoints(amount)); - mod.remove_codepoints = new Action<int>((amount) => API.RemoveCodepoints(amount)); - mod.launch_mod = new Action<string>((modSAA) => API.LaunchMod(Paths.SaveRoot + modSAA.Replace("/", OSInfo.DirectorySeparator))); - mod.open_program = new Action<string>((progname) => API.OpenProgram(progname)); - mod.close_program = new Action<string>((progname) => API.CloseProgram(progname)); - mod.close_everything = new Action(() => API.CloseEverything()); - mod.shutdown = new Action(() => API.ShutDownShiftOS()); - mod.update_ui = new Action(() => { API.UpdateWindows(); API.CurrentSession.SetupDesktop(); }); - mod.load_skin = new Action<string>((filepath) => Skinning.Utilities.loadsknfile(filepath)); - mod.save_to_skin_file = new Action<string>((filepath) => Skinning.Utilities.saveskintofile(filepath)); - mod.on_click = new Action<Control, string>((ctrl, funcname) => RegClick(ctrl, funcname)); - mod.add_widget_to_window = new Action<Form, Control>((win, ctrl) => AddCtrl(win, ctrl)); - mod.open_file = new Action<string, string>((filters, function) => OpenFile(filters, function)); - mod.panel_add_widget = new Action<Control, Control>((ctrl, parent) => - { - try { - var p = (Panel)parent; - p.Controls.Add(ctrl); - } catch(Exception ex) - { - Errors.Add(ex.Message); - } - }); - mod.flow_add_widget = new Action<Control, Control>((ctrl, parent) => - { - try - { - var p = (FlowLayoutPanel)parent; - p.Controls.Add(ctrl); - } - catch (Exception ex) - { - Errors.Add(ex.Message); - } - }); - mod.info = new Action<string, string>((title, message) => - - API.CreateInfoboxSession(title, message, infobox.InfoboxMode.Info) - - ); - mod.on_menu_item_activate = new Action<ToolStripMenuItem, string>((item, function) => - { - item.Click += (object s, EventArgs a) => - { - mod($"{function}()"); - }; - }); - mod.create_timer = new Func<int, System.Windows.Forms.Timer>((interval) => - { - var t = new System.Windows.Forms.Timer(); - t.Interval = interval; - return t; - }); - mod.timer_on_tick = new Action<System.Windows.Forms.Timer, string>((tmr, func) => - { - try - { - tmr.Tick += (object s, EventArgs a) => - { - mod($"{func}()"); - }; - } - catch(Exception ex) - { - Errors.Add(ex.Message); - } - }); - mod.add_widget_to_desktop = new Action<Control>((ctrl) => AddToDesktop(ctrl)); - mod.set_dock = new Action<Control, string>((ctrl, dstyle) => - { - API.CurrentSession.Invoke(new Action(() => - { - switch (dstyle.ToLower()) - { - case "fill": - ctrl.Dock = DockStyle.Fill; - break; - case "top": - ctrl.Dock = DockStyle.Top; - break; - case "bottom": - ctrl.Dock = DockStyle.Bottom; - break; - case "left": - ctrl.Dock = DockStyle.Left; - break; - case "right": - ctrl.Dock = DockStyle.Right; - break; - case "none": - ctrl.Dock = DockStyle.None; - break; - - - - - } - })); - }); - mod.webview_navigate = new Action<GeckoWebBrowser, string>((wv, url) => Navigate(wv, url)); - mod.open_terminal = new Action(() => - { - var t = new Terminal(); - API.CreateForm(t, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); - }); - mod.create_directory = new Action<string>((path) => - { - path = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; - if (!Directory.Exists(path)) - { - Directory.CreateDirectory(path); - } - }); - mod.exists = new Func<string, bool>((path) => - { - path = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; - if(Directory.Exists(path)) - { - return true; - } - else if(File.Exists(path)) - { - return true; - } - else - { - return false; - } - }); - mod.notify = new Action<string, string>((title, message) => API.CurrentSession.AddNotification(title, message)); - mod.download_file = new Action<string, string>((web_address, local) => DownloadFile(web_address, local)); - mod.on_key_down = new Action<Control, string>((ctrl, action) => RegKeyDown(ctrl, action)); - mod.get_files = new Func<string, List<string>>((path) => GetFiles(path)); - mod.get_folders = new Func<string, List<string>>((path) => GetFolders(path)); - mod.zip = new Action<string, string>((source, destination) => - { - var real = $"{Paths.SaveRoot}{source.Replace("/", OSInfo.DirectorySeparator)}"; - if(Directory.Exists(real)) - { - var real_dest = $"{Paths.SaveRoot}{destination.Replace("/", OSInfo.DirectorySeparator)}"; - ZipFile.CreateFromDirectory(real, real_dest); - } - else - { - mod.info("Script Error", "Your script tried to zip up a non-existent folder."); - } - }); - mod.beep = new Action<int, int>((freq, dur) => Beep(freq, dur)); - mod.color_picker += new Action<string, Color, string>((title, oldcolor, func) => - { - API.CreateColorPickerSession(title, oldcolor); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var c = API.GetLastColorFromSession(); - mod($"{func}(color({c.R}, {c.G}, {c.B}))"); - }; - }); - mod.info_yes_no += new Action<string, string, string>((title, message, func) => - { - API.CreateInfoboxSession(title, message, infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetInfoboxResult(); - if(res == "Yes" || res == "No") - { - mod($"{func}(\"{res}\")"); - } - }; - }); - - - //Script Management - mod.exit = new Action(() => ExitScript()); - mod.shutdown = new Action(() => API.ShutDownShiftOS()); - mod.toggle_unity = new Action(() => API.CurrentSession.SetUnityMode()); - mod.lua = new Func<string, string>((luacode) => - { - var li = new LuaInterpreter(); - try - { - li.mod(luacode); - return "success"; - } - catch (Exception ex) - { - return ex.Message; - } - }); - mod.fileskimmer_open += new Action<string, string>((filters, func) => - { - API.CreateFileSkimmerSession(filters, File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if(res != "fail") - { - var real_path = res.Replace(Paths.SaveRoot, "/").Replace("\\", "/"); - mod($"{func}(\"{real_path}\")"); - } - }; - }); - mod.fileskimmer_save += new Action<string, string>((filters, func) => - { - API.CreateFileSkimmerSession(filters, File_Skimmer.FileSkimmerMode.Save); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if (res != "fail") - { - var real_path = res.Replace(Paths.SaveRoot, "/").Replace("\\", "/"); - mod($"{func}(\"{real_path}\")"); - } - }; - }); - mod.gen_font = new Func<string, int, Font>((style, size) => { - return new Font(style, size); - }); - - - //other - mod.fileskimmer = new Action<string>((folder) => OpenFS(folder)); - mod.fopen = new Action<string>((file) => OpenFile(file)); - mod.loadstring = new Action<string>((code) => { mod(code); }); - - //Multithreading - mod.new_thread = new Func<string, Thread>((code) => - { - return new Thread(() => - { - mod(code); - }); - }); - mod.start_async = new Action<Thread>((t) => { t.Start(); }); - - mod.add_applauncher_item = new Action<string, string>((name, lua) => - { - var m = new ModApplauncherItem(); - m.Name = name; - m.Lua = lua; - File.WriteAllText(Paths.Mod_AppLauncherEntries + m.Name, JsonConvert.SerializeObject(m)); - API.UpdateWindows(); - API.CurrentSession.SetupDesktop(); - }); - mod.get_loaded_skin = new Func<Skinning.Skin>(() => { return API.CurrentSkin; }); - mod.reload_skin = new Action(() => { API.CurrentSession.SetupDesktop(); API.UpdateWindows(); }); - mod.get_applauncher_item = new Func<string, ToolStripMenuItem>((name) => - { - ToolStripMenuItem i = null; - foreach(var item in API.CurrentSession.ApplicationsToolStripMenuItem.DropDownItems) - { - try { - ToolStripMenuItem it = (ToolStripMenuItem)item; - if (it.Text == name) - { - i = it; - } - } - catch - { - - } - } - return i; - }); - mod.get_menu_item = new Func<ToolStripMenuItem, string, ToolStripMenuItem>((parent, name) => - { - ToolStripMenuItem i = null; - foreach (ToolStripMenuItem item in parent.DropDownItems) - { - if (item.Text == name) - { - i = item; - } - } - return i; - }); - GC.Collect(); - } - - - /// <summary> - /// Sends a keydown event to Lua when you press a key on the specified control. - /// </summary> - /// <param name="ctrl">Control to assign the event to.</param> - /// <param name="action">Function to call on keydown.</param> - public void RegKeyDown(Control ctrl, string action) - { /* */ - ctrl.KeyDown += (object s, KeyEventArgs a) => - { - mod($"{action}(\"{a.KeyCode.ToString().ToLower()}\")"); - }; - } - - /// <summary> - /// Gets a list of files. - /// </summary> - /// <param name="dir">Directory to scan.</param> - /// <returns>A System.Collections.Generic.List of all files.</returns> - public List<string> GetFiles(string dir) - { - if (Directory.Exists($"{Paths.SaveRoot}{dir.Replace("/", OSInfo.DirectorySeparator)}")) - { - var luatable = new List<string>(); - foreach (string val in Directory.GetFiles($"{Paths.SaveRoot}{dir.Replace("/", OSInfo.DirectorySeparator)}")) - { - luatable.Add(val); - } - return luatable; - } - else - { - return null; - } - } - - /// <summary> - /// Gets a list of folders. - /// </summary> - /// <param name="dir">Directory to scan.</param> - /// <returns>A System.Collections.Generic.List of all folders.</returns> - - public List<string> GetFolders(string dir) - { - if (Directory.Exists($"{Paths.SaveRoot}{dir.Replace("/", OSInfo.DirectorySeparator)}")) - { - var luatable = new List<string>(); - foreach(string val in Directory.GetDirectories($"{Paths.SaveRoot}{dir.Replace("/", OSInfo.DirectorySeparator)}")) - { - luatable.Add(val); - } - - - return luatable; - } - else - { - return null; - } - } - - public string ThisDirectory = null; - - /// <summary> - /// Downloads a file. - /// </summary> - /// <param name="web">Web URL to download</param> - /// <param name="local">A ShiftOS path to download to.</param> - public void DownloadFile(string web, string local) - { - var wc = new WebClient(); - try - { - var real_path = $"{Paths.SaveRoot}{local.Replace("/", OSInfo.DirectorySeparator)}"; - wc.DownloadFile(web, real_path); - mod.notify("Download complete", "Successfully downloaded file " + web + " from the Internet."); - } - catch(Exception ex) - { - mod.print("Could not download remote file " + web + ", " + ex.Message); - } - } - - /// <summary> - /// Interprets a script within this interpreter. - /// </summary> - /// <param name="filename">Script file.</param> - public void IncludeScript(string filename) - { - var real_file = $"{ThisDirectory}{filename.Replace("/", OSInfo.DirectorySeparator)}"; - var lua = File.ReadAllText(real_file); - try { - mod(lua); - } - catch(Exception ex) - { - mod.info("Script Error", "An error has occurred in your script: " + ex.Message); - } - } - - /// <summary> - /// Open a file skimmer in the specified directory. - /// </summary> - /// <param name="dir">Directory to open in.</param> - public void OpenFS(string dir) - { - var f = new File_Skimmer(); - API.CreateForm(f, API.LoadedNames.FileSkimmerName, Properties.Resources.iconFileSkimmer); - if(dir.StartsWith("/")) - { - var real = dir; - var real_slash = real.Replace("/", OSInfo.DirectorySeparator); - var real_path = $"{Paths.SaveRoot}{real_slash}"; - f.CurrentFolder = real_path; - f.ListFiles(); - } - } - - /// <summary> - /// Opens a file in the right program. - /// </summary> - /// <param name="dir">The file path. Why this is named "dir", which means DIRECTORY, not FILE, by the way, is beyond me.</param> - public void OpenFile(string dir) - { - var f = new File_Skimmer(); - if (dir.StartsWith("/")) - { - var real = dir; - var real_slash = real.Replace("/", OSInfo.DirectorySeparator); - var real_path = $"{Paths.SaveRoot}{real_slash}"; - f.OpenFile(real_path); - } - } - - public List<Form> OpenForms = new List<Form>(); - - /// <summary> - /// Exits the script. What did you think it would do? - /// </summary> - public void ExitScript() - { - foreach(Form f in OpenForms) - { - f.Close(); - } - } - - /// <summary> - /// Set control anchor from Lua. - /// </summary> - /// <param name="ctrl">Target control</param> - /// <param name="anchor">Anchor string (for example "top;left;bottom;right" or "top;left" or "top")</param> - public void SetAnchor(Control ctrl, string anchor) - { - var a = AnchorStyles.None; - var l = anchor.ToLower(); - if(l.Contains("left")) - { - a = a | AnchorStyles.Left; - } - if (l.Contains("right")) - { - a = a | AnchorStyles.Right; - } - if (l.Contains("bottom")) - { - a = a | AnchorStyles.Bottom; - } - if (l.Contains("top")) - { - a = a | AnchorStyles.Bottom; - } - ctrl.Anchor = a; - } - - /// <summary> - /// Navigate a webview to the specified URL. - /// </summary> - /// <param name="wv">The webview control. YES, We use Gecko, not Internet Exploder.</param> - /// <param name="url">The target URL, for example "http://playshiftos.ml/forum"</param> - public void Navigate(GeckoWebBrowser wv, string url) - { - wv.Navigate(url); - } - - /// <summary> - /// Add a control to the desktop. - /// </summary> - /// <param name="ctrl">The control to add.</param> - public void AddToDesktop(Control ctrl) - { - API.CurrentSession.Controls.Add(ctrl); - } - - /// <summary> - /// Add a child to a menu item. - /// </summary> - /// <param name="text">New item's text</param> - /// <param name="parent">New item's parent.</param> - /// <returns>The new item.</returns> - public ToolStripMenuItem AddMenuItem(string text, MenuStrip parent) - { - var itm = new ToolStripMenuItem(); - itm.Text = text; - itm.Tag = "menu_item"; - parent.Items.Add(itm); - return itm; - } - - /// <summary> - /// Allows the user to get a user to open a file. - /// </summary> - /// <param name="fi">File filter.</param> - /// <param name="fu">Function to call on select.</param> - public void OpenFile(string fi, string fu) - { - API.CreateFileSkimmerSession(fi, File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - mod($"{fu}({API.GetFSResult()})"); - }; - } - - /// <summary> - /// Prompt user to save a file. - /// </summary> - /// <param name="fi">File filters.</param> - /// <param name="fu">Function to call.</param> - public void SaveFile(string fi, string fu) - { - API.CreateFileSkimmerSession(fi, File_Skimmer.FileSkimmerMode.Save); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - mod($"{fu}({API.GetFSResult()})"); - }; - } - - - /// <summary> - /// Safely read a file. - /// </summary> - /// <param name="path">File to read.</param> - /// <returns>Contents of the file.</returns> - public string SafeFileRead(string path) - { - string contents = ""; - if(path.StartsWith("/")) - { - var real = $"{Paths.SaveRoot}{path.Replace("\\", "/")}"; - if(File.Exists(real)) - { - contents = File.ReadAllText(real); - - } - else - { - Errors.Add("fread(): File not found."); - } - } - else - { - Errors.Add("fread(): Path not valid."); - } - return contents; - } - - /// <summary> - /// Buy a shiftorium upgrade. - /// </summary> - /// <param name="id">Upgrade ID.</param> - /// <returns>Did the upgrade get bought successfully?</returns> - public bool BuyUPG(string id) - { - if(API.Upgrades.ContainsKey(id)) - { - bool bought = false; - foreach(Shiftorium.Upgrade upg in SaveSystem.ShiftoriumRegistry.DefaultUpgrades) - { - if(upg.id == id) - { - bought = Shiftorium.Utilities.Buy(upg); - } - } - return bought; - } - else - { - //Upgrade doesn't exist. - return false; - } - } - - /// <summary> - /// Checks if an upgrade is bought. - /// </summary> - /// <param name="id">Upgrade ID.</param> - /// <returns>Whether or not it is bought</returns> - public bool GetUpgrade(string id) - { - if(API.Upgrades.ContainsKey(id)) - { - return API.Upgrades[id]; - } - else - { - //Upgrade doesn't exist. - return false; - } - } - - /// <summary> - /// Gets the current amount of Codepoints. - /// </summary> - /// <returns>Can you read? Sorry, it's just... I don't feel like typing the same thing twice...</returns> - public int GetCP() - { - return API.CurrentSave.codepoints; - } - - /// <summary> - /// Constructs a WinForms control. - /// </summary> - /// <param name="type">Control type.</param> - /// <param name="text">Control text.</param> - /// <param name="x">X coordinate.</param> - /// <param name="y">Y coordinate.</param> - /// <param name="width">Width.</param> - /// <param name="height">Height.</param> - /// <param name="darkmode">Is it dark?</param> - /// <returns>The control, all ShiftOS-ified for you.</returns> - public Control ConstructControl(string type, string text, int x, int y, int width, int height, bool darkmode) - { - var ctrl = new Control(); - switch(type.ToLower()) - { - case "button": - var btn = new Button(); - btn.FlatStyle = FlatStyle.Flat; - if(darkmode) - { - //Set dark button - btn.ForeColor = API.CurrentSkin.titletextcolour; - btn.BackColor = API.CurrentSkin.titlebarcolour; - } - else - { - btn.BackColor = Color.White; - btn.ForeColor = Color.Black; - } - ctrl = (Control)btn; - break; - case "webview": - var g = new Gecko.GeckoWebBrowser(); - g.NoDefaultContextMenu = true; - ctrl = (Gecko.GeckoWebBrowser)g; - //This control renders HTML, so therefore a dark theme is futile. - break; - case "menustrip": - ctrl = new MenuStrip(); - ctrl.Tag = "menustrip"; - //Menu Strips are rendered using a custom renderer, thus, DarkMode is not required. - break; - case "panel": - ctrl = new Panel(); - if(darkmode) - { - ctrl.BackColor = API.CurrentSkin.titlebarcolour; - ctrl.ForeColor = API.CurrentSkin.titletextcolour; - } - else - { - ctrl.BackColor = Color.White; - ctrl.ForeColor = Color.Black; - } - break; - case "flow": - ctrl = new FlowLayoutPanel(); - if(darkmode) - { - ctrl.BackColor = API.CurrentSkin.titlebarcolour; - ctrl.ForeColor = API.CurrentSkin.titletextcolour; - } - else - { - ctrl.BackColor = Color.White; - ctrl.ForeColor = Color.Black; - } - break; - case "label": - ctrl = new Label(); - //Text Color and Back Color inherited from parent. - break; - case "textbox": - ctrl = new TextBox(); - if(darkmode) - { - ctrl.BackColor = API.CurrentSkin.titlebarcolour; - ctrl.ForeColor = API.CurrentSkin.titletextcolour; - } - else - { - ctrl.BackColor = Color.White; - ctrl.ForeColor = Color.Black; - } - break; - case "richtextbox": - ctrl = new RichTextBox(); - if(darkmode) - { - ctrl.BackColor = API.CurrentSkin.titlebarcolour; - ctrl.ForeColor = API.CurrentSkin.titletextcolour; - } - else - { - ctrl.BackColor = Color.White; - ctrl.ForeColor = Color.Black; - } - break; - default: - ctrl = new Control(); - if(darkmode) - { - ctrl.BackColor = API.CurrentSkin.titlebarcolour; - ctrl.ForeColor = API.CurrentSkin.titletextcolour; - } - else - { - ctrl.BackColor = Color.White; - ctrl.ForeColor = Color.Black; - } - break; - } - ctrl.Text = text; - ctrl.Name = text.ToLower().Replace(" ", "_"); - ctrl.Location = new Point(x, y); - ctrl.Size = new Size(width, height); - ctrl.Visible = true; - return ctrl; - } - - - /// <summary> - /// Broken, piece of dump beep function. - /// </summary> - /// <param name="freq">Frequency.</param> - /// <param name="duration">Length.</param> - public void Beep(int freq, int duration) - { - Beeper.Play(freq, duration); - - } - - /// <summary> - /// Adds a control to a window. - /// </summary> - /// <param name="win">Target window</param> - /// <param name="ctrl">Control to add.</param> - public void AddCtrl(Form win, Control ctrl) - { - - List<WindowBorder> borders = new List<WindowBorder>(); - foreach(Control c in win.Controls) - { - if(c.Name == "api_brdr") - { - var b = (WindowBorder)c; - b.pgcontents.Controls.Add(ctrl); - ctrl.BringToFront(); - borders.Add(b); - } - } - if(borders.Count == 0) - { - win.Controls.Add(ctrl); - } - - } - - /// <summary> - /// Fire a click event when you click the control. - /// </summary> - /// <param name="ctrl">Target control</param> - /// <param name="funcname">Function to call.</param> - public void RegClick(Control ctrl, string funcname) - { - ctrl.MouseDown += (object s, MouseEventArgs a) => - { - if (a.Button == MouseButtons.Left) - { - mod($"{funcname}()"); - } - }; - } - - /// <summary> - /// Creates a ShiftOS window. - /// </summary> - /// <param name="title">Window title.</param> - /// <param name="img">Window icon</param> - /// <param name="width">Width</param> - /// <param name="height">Height</param> - /// <returns>The new window</returns> - public Form CreateForm(string title, Image img, int width, int height) - { - GC.Collect(); - //Create new Form instance. - var f = new Form(); - //Set size of form - if(width < 100) - { - width = 100; - } - if(height < 100) - { - height = 100; - } - f.Size = new Size(width, height); - //ShiftOSify it. - API.CreateForm(f, title, img); - //Add to list of forms that should be closed on script exit - OpenForms.Add(f); - //Return it. - return f; - } - - /// <summary> - /// Creates a borderless window. - /// </summary> - /// <param name="x">Starting X coordinate.</param> - /// <param name="y">Starting Y coordinate</param> - /// <param name="width">Width</param> - /// <param name="height">Height</param> - /// <returns>The new window.</returns> - public Form CreateForm(int x, int y, int width, int height) - { - GC.Collect(); - //Create new Form instance. - var f = new Form(); - //Set size of form - if (width < 100) - { - width = 100; - } - if (height < 100) - { - height = 100; - } - f.Size = new Size(width, height); - f.FormBorderStyle = FormBorderStyle.None; - f.Location = new Point(x, y); - f.Show(); - //Add to list of forms that should be closed on script exit - OpenForms.Add(f); - //Return it. - return f; - } - - /// <summary> - /// Opens an image file. - /// </summary> - /// <param name="filepath">File path</param> - /// <returns>Loaded image</returns> - public Image OpenLocalImage(string filepath) - { - if (filepath.StartsWith("/")) - { - var real = $"{ThisDirectory}{filepath.Replace("/", OSInfo.DirectorySeparator)}"; - if (File.Exists(real)) - { - try - { - return Image.FromFile(real); - } - catch (Exception ex) - { - Errors.Add(ex.Message); - return null; - } - - } - else - { - Errors.Add($"open_image({filepath}): File not found."); - return null; - } - } - else - { - Errors.Add($"open_image({filepath}): Not a valid file path."); - return null; - } - } - - /// <summary> - /// Opens an image file. - /// </summary> - /// <param name="filepath">File path</param> - /// <returns>Loaded image</returns> - public Image OpenImage(string filepath) - { - if (filepath.StartsWith("/")) - { - var real = $"{Paths.SaveRoot}{filepath.Replace("/", OSInfo.DirectorySeparator)}"; - if(File.Exists(real)) - { - try - { - return Image.FromFile(real); - } - catch (Exception ex) - { - Errors.Add(ex.Message); - return null; - } - - } - else - { - Errors.Add($"open_image({filepath}): File not found."); - return null; - } - } - else - { - Errors.Add($"open_image({filepath}): Not a valid file path."); - return null; - } - } - } - - public class Beeper - { - static Thread _beepThread; - static AutoResetEvent _signalBeep; - static bool _beeping = false; - - static Beeper() - { - _signalBeep = new AutoResetEvent(false); - _beepThread = new Thread(() => - { - for (;;) - { - while(_beeping == true) - { - - } - _beeping = true; - Thread.Sleep(_freq); - Console.Beep(_freq, _dur); - _beeping = false; - } - - }, 1); - _beepThread.IsBackground = true; - _beepThread.Start(); - } - static int _freq = 38; - static int _dur = 1000; - - public static void Play(int freq, int dur) - { - _freq = freq; - if (_freq <= 37) - { - _freq = 38; - } - - _dur = dur; - _signalBeep.Set(); - } - } - - -} diff --git a/source/WindowsFormsApplication1/MountMgr.cs b/source/WindowsFormsApplication1/MountMgr.cs deleted file mode 100644 index 3981b64..0000000 --- a/source/WindowsFormsApplication1/MountMgr.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.IO; - -namespace ShiftOS -{ - class MountMgr - { - public static Dictionary<string, string> links = null; - - public static void Init() - { - links = new Dictionary<string, string>(); - if (API.Upgrades["fsexternaldevices"] == true) - { - var drives = DriveInfo.GetDrives(); - foreach (var drive in drives) - { - try - { - if (!Paths.SaveRoot.Contains(drive.Name)) - { - links.Add(drive.Name, drive.VolumeLabel); - } - } - catch - { - - } - } - } - } - } -} diff --git a/source/WindowsFormsApplication1/NameChanger.Designer.cs b/source/WindowsFormsApplication1/NameChanger.Designer.cs deleted file mode 100644 index c9380a8..0000000 --- a/source/WindowsFormsApplication1/NameChanger.Designer.cs +++ /dev/null @@ -1,165 +0,0 @@ -namespace ShiftOS -{ - partial class NameChanger - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); - this.pnlactions = new System.Windows.Forms.FlowLayoutPanel(); - this.btnapply = new System.Windows.Forms.Button(); - this.btnload = new System.Windows.Forms.Button(); - this.btnsave = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.panel1 = new System.Windows.Forms.Panel(); - this.pnlactions.SuspendLayout(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // propertyGrid1 - // - this.propertyGrid1.BackColor = System.Drawing.Color.White; - this.propertyGrid1.CategoryForeColor = System.Drawing.Color.Black; - this.propertyGrid1.CategorySplitterColor = System.Drawing.Color.Gray; - this.propertyGrid1.CommandsActiveLinkColor = System.Drawing.Color.Black; - this.propertyGrid1.CommandsBackColor = System.Drawing.Color.White; - this.propertyGrid1.CommandsBorderColor = System.Drawing.Color.White; - this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.Gray; - this.propertyGrid1.CommandsForeColor = System.Drawing.Color.Black; - this.propertyGrid1.CommandsLinkColor = System.Drawing.Color.Gray; - this.propertyGrid1.DisabledItemForeColor = System.Drawing.Color.Gray; - this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill; - this.propertyGrid1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.propertyGrid1.HelpVisible = false; - this.propertyGrid1.LineColor = System.Drawing.Color.White; - this.propertyGrid1.Location = new System.Drawing.Point(0, 28); - this.propertyGrid1.Name = "propertyGrid1"; - this.propertyGrid1.PropertySort = System.Windows.Forms.PropertySort.Alphabetical; - this.propertyGrid1.SelectedItemWithFocusBackColor = System.Drawing.Color.Gray; - this.propertyGrid1.SelectedItemWithFocusForeColor = System.Drawing.Color.White; - this.propertyGrid1.Size = new System.Drawing.Size(403, 400); - this.propertyGrid1.TabIndex = 0; - this.propertyGrid1.ToolbarVisible = false; - this.propertyGrid1.ViewBackColor = System.Drawing.Color.White; - this.propertyGrid1.ViewBorderColor = System.Drawing.Color.White; - this.propertyGrid1.ViewForeColor = System.Drawing.Color.Black; - // - // pnlactions - // - this.pnlactions.BackColor = System.Drawing.Color.Gray; - this.pnlactions.Controls.Add(this.btnapply); - this.pnlactions.Controls.Add(this.btnload); - this.pnlactions.Controls.Add(this.btnsave); - this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlactions.Location = new System.Drawing.Point(0, 428); - this.pnlactions.Name = "pnlactions"; - this.pnlactions.Size = new System.Drawing.Size(403, 39); - this.pnlactions.TabIndex = 1; - // - // btnapply - // - this.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnapply.ForeColor = System.Drawing.Color.White; - this.btnapply.Location = new System.Drawing.Point(3, 3); - this.btnapply.Name = "btnapply"; - this.btnapply.Size = new System.Drawing.Size(75, 33); - this.btnapply.TabIndex = 0; - this.btnapply.Text = "Apply"; - this.btnapply.UseVisualStyleBackColor = true; - this.btnapply.Click += new System.EventHandler(this.btnapply_Click); - // - // btnload - // - this.btnload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnload.ForeColor = System.Drawing.Color.White; - this.btnload.Location = new System.Drawing.Point(84, 3); - this.btnload.Name = "btnload"; - this.btnload.Size = new System.Drawing.Size(75, 33); - this.btnload.TabIndex = 1; - this.btnload.Text = "Load Pack"; - this.btnload.UseVisualStyleBackColor = true; - this.btnload.Click += new System.EventHandler(this.btnload_Click); - // - // btnsave - // - this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsave.ForeColor = System.Drawing.Color.White; - this.btnsave.Location = new System.Drawing.Point(165, 3); - this.btnsave.Name = "btnsave"; - this.btnsave.Size = new System.Drawing.Size(75, 33); - this.btnsave.TabIndex = 2; - this.btnsave.Text = "Save Pack"; - this.btnsave.UseVisualStyleBackColor = true; - this.btnsave.Click += new System.EventHandler(this.btnsave_Click); - // - // label1 - // - this.label1.Dock = System.Windows.Forms.DockStyle.Top; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); - this.label1.Location = new System.Drawing.Point(0, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(403, 28); - this.label1.TabIndex = 2; - this.label1.Text = "Name Changer"; - this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.White; - this.panel1.Controls.Add(this.propertyGrid1); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.pnlactions); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(403, 467); - this.panel1.TabIndex = 3; - // - // NameChanger - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(403, 467); - this.Controls.Add(this.panel1); - this.Name = "NameChanger"; - this.Text = "NameChanger"; - this.Load += new System.EventHandler(this.NameChanger_Load); - this.pnlactions.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - private System.Windows.Forms.FlowLayoutPanel pnlactions; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button btnapply; - private System.Windows.Forms.Button btnload; - private System.Windows.Forms.Button btnsave; - private System.Windows.Forms.Panel panel1; - public System.Windows.Forms.PropertyGrid propertyGrid1; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/NameChanger.cs b/source/WindowsFormsApplication1/NameChanger.cs deleted file mode 100644 index 0dcac90..0000000 --- a/source/WindowsFormsApplication1/NameChanger.cs +++ /dev/null @@ -1,107 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - - public partial class NameChanger : Form - { - public NameChanger() - { - InitializeComponent(); - } - - public NamePackModel np = new NamePackModel(); - - public void LoadModel() - { - var n = Skinning.Utilities.LoadedNames; - np.ArtpadName = n.ArtpadName; - np.TextpadName = n.TextpadName; - np.PongName = n.PongName; - np.TerminalName = n.TerminalName; - np.ShutdownName = n.ShutdownName; - np.ShifterName = n.ShifterName; - np.NameChangerName = n.NameChangerName; - np.ShiftoriumName = n.ShiftoriumName; - np.UnityName = n.UnityName; - np.KnowledgeInputName = n.KnowledgeInputName; - np.SkinLoaderName = n.SkinLoaderName; - np.FileSkimmerName = n.FileSkimmerName; - } - - public void SaveModel() - { - var json = JsonConvert.SerializeObject(np); - File.WriteAllText(Paths.LoadedSkin + "names.npk", json); - } - - private void NameChanger_Load(object sender, EventArgs e) - { - LoadModel(); - propertyGrid1.SelectedObject = np; - } - - private void btnapply_Click(object sender, EventArgs e) - { - int cp = new Random().Next(1, 5); - SaveModel(); - API.CreateInfoboxSession("Name Changer", "The new Name Pack has been applied! You have earned " + cp.ToString() + " Codepoints!", infobox.InfoboxMode.Info); - Skinning.Utilities.saveskin(); - API.CurrentSession.SetupDesktop(); - API.AddCodepoints(cp); - } - - private void btnload_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".npk", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if(res != "fail") - { - string json = File.ReadAllText(res); - np = JsonConvert.DeserializeObject<NamePackModel>(json); - } - }; - } - - private void btnsave_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".npk", File_Skimmer.FileSkimmerMode.Save); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if (res != "fail") - { - string json = JsonConvert.SerializeObject(np); - File.WriteAllText(res, json); - } - }; - } - } - public class NamePackModel - { - public string TerminalName { get; set; } - public string ArtpadName { get; set; } - public string TextpadName { get; set; } - public string ShiftoriumName { get; set; } - public string KnowledgeInputName { get; set; } - public string PongName { get; set; } - public string ShifterName { get; set; } - public string FileSkimmerName { get; set; } - public string SkinLoaderName { get; set; } - public string ShutdownName { get; set; } - public string UnityName { get; set; } - public string NameChangerName { get; set; } - } -} diff --git a/source/WindowsFormsApplication1/NameChanger.resx b/source/WindowsFormsApplication1/NameChanger.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/NameChanger.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/NetGen.Designer.cs b/source/WindowsFormsApplication1/NetGen.Designer.cs deleted file mode 100644 index b596cdb..0000000 --- a/source/WindowsFormsApplication1/NetGen.Designer.cs +++ /dev/null @@ -1,628 +0,0 @@ -namespace ShiftOS -{ - partial class NetGen - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetGen)); - this.panel1 = new System.Windows.Forms.Panel(); - this.pnlnetdesign = new System.Windows.Forms.Panel(); - this.pnlpcinfo = new System.Windows.Forms.Panel(); - this.btndelete = new System.Windows.Forms.Button(); - this.lbpcinfo = new System.Windows.Forms.Label(); - this.lbmoduletitle = new System.Windows.Forms.Label(); - this.btncloseinfo = new System.Windows.Forms.Button(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.btnaddmodule = new System.Windows.Forms.Button(); - this.pnlbuy = new System.Windows.Forms.Panel(); - this.txthostname = new System.Windows.Forms.TextBox(); - this.lbhostname = new System.Windows.Forms.Label(); - this.txtgrade = new System.Windows.Forms.TextBox(); - this.lbgrade = new System.Windows.Forms.Label(); - this.lbmoduleinfo = new System.Windows.Forms.Label(); - this.cmbbuyable = new System.Windows.Forms.ComboBox(); - this.label4 = new System.Windows.Forms.Label(); - this.btndonebuying = new System.Windows.Forms.Button(); - this.pnlnetinf = new System.Windows.Forms.Panel(); - this.label6 = new System.Windows.Forms.Label(); - this.cbdifficulty = new System.Windows.Forms.ComboBox(); - this.txtfspeed = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.txtfskill = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.txtnetdesc = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.txtnetname = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.flbuttons = new System.Windows.Forms.FlowLayoutPanel(); - this.btnnext = new System.Windows.Forms.Button(); - this.btnback = new System.Windows.Forms.Button(); - this.pnlnetinfo = new System.Windows.Forms.Panel(); - this.lbdescription = new System.Windows.Forms.Label(); - this.lbtitle = new System.Windows.Forms.Label(); - this.btnloadfromtemplate = new System.Windows.Forms.Button(); - this.pnltemplates = new System.Windows.Forms.Panel(); - this.label9 = new System.Windows.Forms.Label(); - this.cbnets = new System.Windows.Forms.ComboBox(); - this.label10 = new System.Windows.Forms.Label(); - this.btnrecreate = new System.Windows.Forms.Button(); - this.panel1.SuspendLayout(); - this.pnlnetdesign.SuspendLayout(); - this.pnlpcinfo.SuspendLayout(); - this.flowLayoutPanel1.SuspendLayout(); - this.pnlbuy.SuspendLayout(); - this.pnlnetinf.SuspendLayout(); - this.flbuttons.SuspendLayout(); - this.pnlnetinfo.SuspendLayout(); - this.pnltemplates.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Controls.Add(this.pnltemplates); - this.panel1.Controls.Add(this.pnlnetdesign); - this.panel1.Controls.Add(this.pnlnetinf); - this.panel1.Controls.Add(this.flbuttons); - this.panel1.Controls.Add(this.pnlnetinfo); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(894, 591); - this.panel1.TabIndex = 0; - this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); - // - // pnlnetdesign - // - this.pnlnetdesign.Controls.Add(this.pnlpcinfo); - this.pnlnetdesign.Controls.Add(this.flowLayoutPanel1); - this.pnlnetdesign.Controls.Add(this.pnlbuy); - this.pnlnetdesign.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlnetdesign.Location = new System.Drawing.Point(0, 76); - this.pnlnetdesign.Name = "pnlnetdesign"; - this.pnlnetdesign.Size = new System.Drawing.Size(894, 484); - this.pnlnetdesign.TabIndex = 6; - this.pnlnetdesign.MouseDown += new System.Windows.Forms.MouseEventHandler(this.place_module); - // - // pnlpcinfo - // - this.pnlpcinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlpcinfo.Controls.Add(this.btndelete); - this.pnlpcinfo.Controls.Add(this.lbpcinfo); - this.pnlpcinfo.Controls.Add(this.lbmoduletitle); - this.pnlpcinfo.Controls.Add(this.btncloseinfo); - this.pnlpcinfo.Location = new System.Drawing.Point(43, 167); - this.pnlpcinfo.Name = "pnlpcinfo"; - this.pnlpcinfo.Size = new System.Drawing.Size(382, 280); - this.pnlpcinfo.TabIndex = 9; - this.pnlpcinfo.Visible = false; - // - // btndelete - // - this.btndelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btndelete.AutoSize = true; - this.btndelete.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btndelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndelete.Location = new System.Drawing.Point(106, 254); - this.btndelete.Name = "btndelete"; - this.btndelete.Size = new System.Drawing.Size(59, 23); - this.btndelete.TabIndex = 8; - this.btndelete.Text = "Delete"; - this.btndelete.UseVisualStyleBackColor = true; - this.btndelete.Click += new System.EventHandler(this.btndelete_Click); - // - // lbpcinfo - // - this.lbpcinfo.Location = new System.Drawing.Point(12, 41); - this.lbpcinfo.Name = "lbpcinfo"; - this.lbpcinfo.Size = new System.Drawing.Size(367, 86); - this.lbpcinfo.TabIndex = 6; - this.lbpcinfo.Text = resources.GetString("lbpcinfo.Text"); - // - // lbmoduletitle - // - this.lbmoduletitle.AutoSize = true; - this.lbmoduletitle.Location = new System.Drawing.Point(10, 12); - this.lbmoduletitle.Name = "lbmoduletitle"; - this.lbmoduletitle.Size = new System.Drawing.Size(75, 11); - this.lbmoduletitle.TabIndex = 2; - this.lbmoduletitle.Text = "Add Module"; - // - // btncloseinfo - // - this.btncloseinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btncloseinfo.AutoSize = true; - this.btncloseinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btncloseinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncloseinfo.Location = new System.Drawing.Point(327, 254); - this.btncloseinfo.Name = "btncloseinfo"; - this.btncloseinfo.Size = new System.Drawing.Size(52, 23); - this.btncloseinfo.TabIndex = 1; - this.btncloseinfo.Text = "Done."; - this.btncloseinfo.UseVisualStyleBackColor = true; - this.btncloseinfo.Click += new System.EventHandler(this.btncloseinfo_Click); - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Controls.Add(this.btnaddmodule); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 453); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(894, 31); - this.flowLayoutPanel1.TabIndex = 8; - // - // btnaddmodule - // - this.btnaddmodule.AutoSize = true; - this.btnaddmodule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnaddmodule.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnaddmodule.Location = new System.Drawing.Point(3, 3); - this.btnaddmodule.Name = "btnaddmodule"; - this.btnaddmodule.Size = new System.Drawing.Size(87, 23); - this.btnaddmodule.TabIndex = 0; - this.btnaddmodule.Text = "Add Module"; - this.btnaddmodule.UseVisualStyleBackColor = true; - this.btnaddmodule.Click += new System.EventHandler(this.btnaddmodule_Click); - // - // pnlbuy - // - this.pnlbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.pnlbuy.Controls.Add(this.txthostname); - this.pnlbuy.Controls.Add(this.lbhostname); - this.pnlbuy.Controls.Add(this.txtgrade); - this.pnlbuy.Controls.Add(this.lbgrade); - this.pnlbuy.Controls.Add(this.lbmoduleinfo); - this.pnlbuy.Controls.Add(this.cmbbuyable); - this.pnlbuy.Controls.Add(this.label4); - this.pnlbuy.Controls.Add(this.btndonebuying); - this.pnlbuy.Location = new System.Drawing.Point(3, 148); - this.pnlbuy.Name = "pnlbuy"; - this.pnlbuy.Size = new System.Drawing.Size(382, 299); - this.pnlbuy.TabIndex = 7; - this.pnlbuy.Visible = false; - // - // txthostname - // - this.txthostname.BackColor = System.Drawing.Color.Black; - this.txthostname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txthostname.ForeColor = System.Drawing.Color.White; - this.txthostname.Location = new System.Drawing.Point(186, 236); - this.txthostname.Name = "txthostname"; - this.txthostname.Size = new System.Drawing.Size(186, 18); - this.txthostname.TabIndex = 10; - // - // lbhostname - // - this.lbhostname.AutoSize = true; - this.lbhostname.Location = new System.Drawing.Point(112, 240); - this.lbhostname.Name = "lbhostname"; - this.lbhostname.Size = new System.Drawing.Size(68, 11); - this.lbhostname.TabIndex = 9; - this.lbhostname.Text = "Hostname:"; - // - // txtgrade - // - this.txtgrade.BackColor = System.Drawing.Color.Black; - this.txtgrade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtgrade.ForeColor = System.Drawing.Color.White; - this.txtgrade.Location = new System.Drawing.Point(65, 236); - this.txtgrade.Name = "txtgrade"; - this.txtgrade.Size = new System.Drawing.Size(40, 18); - this.txtgrade.TabIndex = 8; - this.txtgrade.TextChanged += new System.EventHandler(this.txtgrade_TextChanged); - // - // lbgrade - // - this.lbgrade.AutoSize = true; - this.lbgrade.Location = new System.Drawing.Point(12, 240); - this.lbgrade.Name = "lbgrade"; - this.lbgrade.Size = new System.Drawing.Size(47, 11); - this.lbgrade.TabIndex = 7; - this.lbgrade.Text = "Grade:"; - // - // lbmoduleinfo - // - this.lbmoduleinfo.Location = new System.Drawing.Point(10, 63); - this.lbmoduleinfo.Name = "lbmoduleinfo"; - this.lbmoduleinfo.Size = new System.Drawing.Size(367, 156); - this.lbmoduleinfo.TabIndex = 6; - this.lbmoduleinfo.Text = resources.GetString("lbmoduleinfo.Text"); - // - // cmbbuyable - // - this.cmbbuyable.BackColor = System.Drawing.Color.Black; - this.cmbbuyable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbbuyable.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cmbbuyable.ForeColor = System.Drawing.Color.White; - this.cmbbuyable.FormattingEnabled = true; - this.cmbbuyable.Location = new System.Drawing.Point(12, 38); - this.cmbbuyable.Name = "cmbbuyable"; - this.cmbbuyable.Size = new System.Drawing.Size(360, 19); - this.cmbbuyable.TabIndex = 3; - this.cmbbuyable.SelectedIndexChanged += new System.EventHandler(this.cmbbuyable_SelectedIndexChanged); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(10, 12); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(75, 11); - this.label4.TabIndex = 2; - this.label4.Text = "Add Module"; - // - // btndonebuying - // - this.btndonebuying.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btndonebuying.AutoSize = true; - this.btndonebuying.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btndonebuying.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndonebuying.Location = new System.Drawing.Point(341, 273); - this.btndonebuying.Name = "btndonebuying"; - this.btndonebuying.Size = new System.Drawing.Size(38, 23); - this.btndonebuying.TabIndex = 1; - this.btndonebuying.Text = "Buy"; - this.btndonebuying.UseVisualStyleBackColor = true; - this.btndonebuying.Click += new System.EventHandler(this.btndonebuying_Click); - // - // pnlnetinf - // - this.pnlnetinf.Controls.Add(this.label6); - this.pnlnetinf.Controls.Add(this.cbdifficulty); - this.pnlnetinf.Controls.Add(this.txtfspeed); - this.pnlnetinf.Controls.Add(this.label5); - this.pnlnetinf.Controls.Add(this.txtfskill); - this.pnlnetinf.Controls.Add(this.label3); - this.pnlnetinf.Controls.Add(this.txtnetdesc); - this.pnlnetinf.Controls.Add(this.label2); - this.pnlnetinf.Controls.Add(this.txtnetname); - this.pnlnetinf.Controls.Add(this.label1); - this.pnlnetinf.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlnetinf.Location = new System.Drawing.Point(0, 76); - this.pnlnetinf.Name = "pnlnetinf"; - this.pnlnetinf.Size = new System.Drawing.Size(894, 484); - this.pnlnetinf.TabIndex = 0; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(40, 225); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(124, 11); - this.label6.TabIndex = 11; - this.label6.Text = "Difficulty (Tier)"; - // - // cbdifficulty - // - this.cbdifficulty.BackColor = System.Drawing.Color.Black; - this.cbdifficulty.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbdifficulty.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cbdifficulty.ForeColor = System.Drawing.Color.Green; - this.cbdifficulty.FormattingEnabled = true; - this.cbdifficulty.Items.AddRange(new object[] { - "easy", - "medium", - "hard"}); - this.cbdifficulty.Location = new System.Drawing.Point(170, 222); - this.cbdifficulty.Name = "cbdifficulty"; - this.cbdifficulty.Size = new System.Drawing.Size(121, 19); - this.cbdifficulty.TabIndex = 10; - // - // txtfspeed - // - this.txtfspeed.BackColor = System.Drawing.Color.Black; - this.txtfspeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtfspeed.ForeColor = System.Drawing.Color.Green; - this.txtfspeed.Location = new System.Drawing.Point(142, 172); - this.txtfspeed.Name = "txtfspeed"; - this.txtfspeed.Size = new System.Drawing.Size(41, 18); - this.txtfspeed.TabIndex = 9; - this.txtfspeed.TextChanged += new System.EventHandler(this.txtfspeed_TextChanged); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(40, 174); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(61, 11); - this.label5.TabIndex = 8; - this.label5.Text = "F. Speed"; - // - // txtfskill - // - this.txtfskill.BackColor = System.Drawing.Color.Black; - this.txtfskill.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtfskill.ForeColor = System.Drawing.Color.Green; - this.txtfskill.Location = new System.Drawing.Point(142, 146); - this.txtfskill.Name = "txtfskill"; - this.txtfskill.Size = new System.Drawing.Size(41, 18); - this.txtfskill.TabIndex = 7; - this.txtfskill.TextChanged += new System.EventHandler(this.txtfskill_TextChanged); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(40, 148); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(61, 11); - this.label3.TabIndex = 6; - this.label3.Text = "F. Skill"; - // - // txtnetdesc - // - this.txtnetdesc.BackColor = System.Drawing.Color.Black; - this.txtnetdesc.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtnetdesc.ForeColor = System.Drawing.Color.Green; - this.txtnetdesc.Location = new System.Drawing.Point(142, 80); - this.txtnetdesc.Name = "txtnetdesc"; - this.txtnetdesc.Size = new System.Drawing.Size(492, 18); - this.txtnetdesc.TabIndex = 5; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(40, 82); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(89, 11); - this.label2.TabIndex = 4; - this.label2.Text = "Description:"; - // - // txtnetname - // - this.txtnetname.BackColor = System.Drawing.Color.Black; - this.txtnetname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtnetname.ForeColor = System.Drawing.Color.Green; - this.txtnetname.Location = new System.Drawing.Point(142, 56); - this.txtnetname.Name = "txtnetname"; - this.txtnetname.Size = new System.Drawing.Size(231, 18); - this.txtnetname.TabIndex = 3; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(40, 58); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(96, 11); - this.label1.TabIndex = 2; - this.label1.Text = "Network Name:"; - // - // flbuttons - // - this.flbuttons.Controls.Add(this.btnnext); - this.flbuttons.Controls.Add(this.btnback); - this.flbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.flbuttons.Location = new System.Drawing.Point(0, 560); - this.flbuttons.Name = "flbuttons"; - this.flbuttons.Size = new System.Drawing.Size(894, 31); - this.flbuttons.TabIndex = 0; - // - // btnnext - // - this.btnnext.AutoSize = true; - this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnnext.Location = new System.Drawing.Point(846, 3); - this.btnnext.Name = "btnnext"; - this.btnnext.Size = new System.Drawing.Size(45, 23); - this.btnnext.TabIndex = 0; - this.btnnext.Text = "Next"; - this.btnnext.UseVisualStyleBackColor = true; - this.btnnext.Click += new System.EventHandler(this.btnnext_Click); - // - // btnback - // - this.btnback.AutoSize = true; - this.btnback.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnback.Location = new System.Drawing.Point(795, 3); - this.btnback.Name = "btnback"; - this.btnback.Size = new System.Drawing.Size(45, 23); - this.btnback.TabIndex = 1; - this.btnback.Text = "Back"; - this.btnback.UseVisualStyleBackColor = true; - this.btnback.Click += new System.EventHandler(this.btnback_Click); - // - // pnlnetinfo - // - this.pnlnetinfo.Controls.Add(this.btnloadfromtemplate); - this.pnlnetinfo.Controls.Add(this.lbdescription); - this.pnlnetinfo.Controls.Add(this.lbtitle); - this.pnlnetinfo.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlnetinfo.Location = new System.Drawing.Point(0, 0); - this.pnlnetinfo.Name = "pnlnetinfo"; - this.pnlnetinfo.Size = new System.Drawing.Size(894, 76); - this.pnlnetinfo.TabIndex = 1; - // - // lbdescription - // - this.lbdescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbdescription.Location = new System.Drawing.Point(15, 31); - this.lbdescription.Name = "lbdescription"; - this.lbdescription.Size = new System.Drawing.Size(867, 36); - this.lbdescription.TabIndex = 1; - this.lbdescription.Text = "Information about the network."; - // - // lbtitle - // - this.lbtitle.AutoSize = true; - this.lbtitle.Font = new System.Drawing.Font("Lucida Console", 13F); - this.lbtitle.Location = new System.Drawing.Point(12, 9); - this.lbtitle.Name = "lbtitle"; - this.lbtitle.Size = new System.Drawing.Size(217, 18); - this.lbtitle.TabIndex = 0; - this.lbtitle.Text = "Network Information"; - // - // btnloadfromtemplate - // - this.btnloadfromtemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnloadfromtemplate.AutoSize = true; - this.btnloadfromtemplate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnloadfromtemplate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnloadfromtemplate.Location = new System.Drawing.Point(683, 47); - this.btnloadfromtemplate.Name = "btnloadfromtemplate"; - this.btnloadfromtemplate.Size = new System.Drawing.Size(199, 23); - this.btnloadfromtemplate.TabIndex = 2; - this.btnloadfromtemplate.Text = "This button breaks things."; - this.btnloadfromtemplate.UseVisualStyleBackColor = true; - this.btnloadfromtemplate.Visible = false; - this.btnloadfromtemplate.Click += new System.EventHandler(this.btnloadfromtemplate_Click); - // - // pnltemplates - // - this.pnltemplates.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.pnltemplates.Controls.Add(this.label9); - this.pnltemplates.Controls.Add(this.cbnets); - this.pnltemplates.Controls.Add(this.label10); - this.pnltemplates.Controls.Add(this.btnrecreate); - this.pnltemplates.Location = new System.Drawing.Point(256, 146); - this.pnltemplates.Name = "pnltemplates"; - this.pnltemplates.Size = new System.Drawing.Size(382, 299); - this.pnltemplates.TabIndex = 8; - this.pnltemplates.Visible = false; - // - // label9 - // - this.label9.Location = new System.Drawing.Point(10, 63); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(367, 156); - this.label9.TabIndex = 6; - this.label9.Text = "Please choose a network from the above list. Net Generator will attempt to grab d" + - "ata about the network and recreate it for you."; - // - // cbnets - // - this.cbnets.BackColor = System.Drawing.Color.Black; - this.cbnets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbnets.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cbnets.ForeColor = System.Drawing.Color.White; - this.cbnets.FormattingEnabled = true; - this.cbnets.Location = new System.Drawing.Point(12, 38); - this.cbnets.Name = "cbnets"; - this.cbnets.Size = new System.Drawing.Size(360, 19); - this.cbnets.TabIndex = 3; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(10, 12); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(124, 11); - this.label10.TabIndex = 2; - this.label10.Text = "Load from Network"; - // - // btnrecreate - // - this.btnrecreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnrecreate.AutoSize = true; - this.btnrecreate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnrecreate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnrecreate.Location = new System.Drawing.Point(334, 273); - this.btnrecreate.Name = "btnrecreate"; - this.btnrecreate.Size = new System.Drawing.Size(45, 23); - this.btnrecreate.TabIndex = 1; - this.btnrecreate.Text = "Done"; - this.btnrecreate.UseVisualStyleBackColor = true; - this.btnrecreate.Click += new System.EventHandler(this.btnrecreate_Click); - // - // NetGen - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Black; - this.ClientSize = new System.Drawing.Size(894, 591); - this.Controls.Add(this.panel1); - this.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.ForeColor = System.Drawing.Color.LightGreen; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "NetGen"; - this.Text = "NetGen"; - this.Load += new System.EventHandler(this.NetGen_Load); - this.panel1.ResumeLayout(false); - this.pnlnetdesign.ResumeLayout(false); - this.pnlpcinfo.ResumeLayout(false); - this.pnlpcinfo.PerformLayout(); - this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); - this.pnlbuy.ResumeLayout(false); - this.pnlbuy.PerformLayout(); - this.pnlnetinf.ResumeLayout(false); - this.pnlnetinf.PerformLayout(); - this.flbuttons.ResumeLayout(false); - this.flbuttons.PerformLayout(); - this.pnlnetinfo.ResumeLayout(false); - this.pnlnetinfo.PerformLayout(); - this.pnltemplates.ResumeLayout(false); - this.pnltemplates.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.FlowLayoutPanel flbuttons; - private System.Windows.Forms.TextBox txtnetname; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Panel pnlnetinfo; - private System.Windows.Forms.Label lbdescription; - private System.Windows.Forms.Label lbtitle; - private System.Windows.Forms.TextBox txtnetdesc; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button btnnext; - private System.Windows.Forms.Button btnback; - private System.Windows.Forms.Panel pnlnetdesign; - private System.Windows.Forms.Panel pnlnetinf; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Button btnaddmodule; - private System.Windows.Forms.Panel pnlbuy; - private System.Windows.Forms.TextBox txthostname; - private System.Windows.Forms.Label lbhostname; - private System.Windows.Forms.TextBox txtgrade; - private System.Windows.Forms.Label lbgrade; - private System.Windows.Forms.Label lbmoduleinfo; - private System.Windows.Forms.ComboBox cmbbuyable; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Button btndonebuying; - private System.Windows.Forms.Panel pnlpcinfo; - private System.Windows.Forms.Button btndelete; - private System.Windows.Forms.Label lbpcinfo; - private System.Windows.Forms.Label lbmoduletitle; - private System.Windows.Forms.Button btncloseinfo; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.ComboBox cbdifficulty; - private System.Windows.Forms.TextBox txtfspeed; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox txtfskill; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button btnloadfromtemplate; - private System.Windows.Forms.Panel pnltemplates; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.ComboBox cbnets; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Button btnrecreate; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/NetGen.cs b/source/WindowsFormsApplication1/NetGen.cs deleted file mode 100644 index 616505d..0000000 --- a/source/WindowsFormsApplication1/NetGen.cs +++ /dev/null @@ -1,361 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class NetGen : Form - { - public NetGen() - { - InitializeComponent(); - } - - private EnemyHacker network = null; - private int stage = 0; - private List<Computer> potentialModules = null; - private Module fmod = null; - - private void NetGen_Load(object sender, EventArgs e) - { - SetupUI(); - potentialModules = new List<Computer>(); - } - - private void panel1_Paint(object sender, PaintEventArgs e) - { - - } - - public void SetupUI() - { - btnback.Hide(); - - switch(stage) - { - case 0: - lbtitle.Text = "Network Information"; - lbdescription.Text = "Information about the network."; - pnlnetinf.BringToFront(); - break; - case 1: - //clear potential - if(potentialModules != null) - { - foreach(var p in potentialModules) - { - pnlnetdesign.Controls.Remove(p); - p.Hide(); - - } - potentialModules = new List<Computer>(); - } - //create net - if (overwrite_net == true) - { - network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, this.skill, this.speed, cbdifficulty.Text); - } - else - { - network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, this.skill, this.speed, cbdifficulty.Text); - network.Network = TemplateNet; - } - network.Network[0].HP = network.Network[0].GetTotalHP(); - var c = network.Network[0].Deploy(); - c.Left = (pnlnetdesign.Width - 64) / 2; - c.Top = (pnlnetdesign.Height - 64) / 2; - pnlnetdesign.Controls.Add(c); - c.Select += (s, a) => - { - ShowSysInf(c); - }; - c.Show(); - lbtitle.Text = "Playfield Designer"; - lbdescription.Text = "Design the playfield of the network. Strategically place defensive and offensive modules to protect the Core from attacks. You can have a maximum of 20 objects (minus core) on-screen."; - pnlnetdesign.BringToFront(); - btnnext.Text = "Finish"; - break; - case 2: - var tp = new TextPad(); - var core = network.Network[0]; - core.X = 0; - core.Y = 0; - foreach (var pc in potentialModules) - { - var m = new Module(pc.Type, pc.Grade, pc.Hostname); - m.X = pc.Left; - m.Y = pc.Top; - network.AddModule(m); - } - var json = JsonConvert.SerializeObject(network); - API.CreateForm(tp, "Network JSON", API.GetIcon("TextPad")); - tp.txtuserinput.Text = json; - this.Close(); - break; - } - - } - - private void btnnext_Click(object sender, EventArgs e) - { - stage += 1; - SetupUI(); - } - - private void btnback_Click(object sender, EventArgs e) - { - stage -= 1; - } - - private void btnaddmodule_Click(object sender, EventArgs e) - { - SetupBuyable(); - pnlbuy.Visible = !pnlbuy.Visible; - } - - List<FutureModule> BuyableModules = null; - - public void SetupBuyable() - { - BuyableModules = Hacking.GetFutureModules(); - cmbbuyable.Items.Clear(); - foreach (var m in BuyableModules) - { - cmbbuyable.Items.Add(m.Name); - } - lbmoduleinfo.Text = ""; - txtgrade.Text = "1"; - } - - private void SetupModuleInfo() - { - bool cont = false; - FutureModule m = null; - foreach (var mod in BuyableModules) - { - if (mod.Name == cmbbuyable.Text) - { - m = mod; - cont = true; - } - } - if (cont == true) - { - lbmoduleinfo.Text = m.Name; - lbmoduleinfo.Text += Environment.NewLine + $"Cost: {m.Cost * Convert.ToInt32(txtgrade.Text)} CP"; - lbmoduleinfo.Text += Environment.NewLine + $"Description: {Environment.NewLine}{m.Description}"; - } - } - - private void cmbbuyable_SelectedIndexChanged(object sender, EventArgs e) - { - SetupModuleInfo(); - } - - private void txtgrade_TextChanged(object sender, EventArgs e) - { - int grade = 0; - int.TryParse(txtgrade.Text, out grade); - if(grade < 1) - { - txtgrade.Text = "1"; - } - else if(grade > 4) - { - txtgrade.Text = "4"; - } - } - - bool PlacingNewModule = false; - - private void btndonebuying_Click(object sender, EventArgs e) - { - if(!string.IsNullOrEmpty(cmbbuyable.Text)) - { - if(!string.IsNullOrEmpty(cmbbuyable.Text)) - { - int grade = Convert.ToInt32(txtgrade.Text); - string hostname = txthostname.Text; - FutureModule m = null; - foreach(var mod in BuyableModules) - { - if(mod.Name == cmbbuyable.Text) - { - m = mod; - } - } - if(m != null) - { - bool cont = true; - if (potentialModules.Count <= 20) - { - foreach (var pc in potentialModules) - { - if (pc.Hostname == hostname) - { - cont = false; - } - } - } - else - { - cont = false; - } - if(cont) - { - var newModule = new Module(m.Type, grade, hostname); - fmod = newModule; - PlacingNewModule = true; - pnlbuy.Hide(); - } - else - { - API.CreateInfoboxSession("Can't place new module", "Either an existing module with the same hostname already exists in the field, or you have hit the maximum.", infobox.InfoboxMode.Info); - } - } - } - } - } - - private void place_module(object sender, MouseEventArgs e) - { - if (PlacingNewModule == true) - { - if (e.Button == MouseButtons.Left) - { - var coordinates = pnlnetdesign.PointToClient(Cursor.Position); - int x = coordinates.X; - int y = coordinates.Y; - fmod.HP = fmod.GetTotalHP(); - var computerToPlace = fmod.Deploy(); - computerToPlace.Location = new Point(x, y); - pnlnetdesign.Controls.Add(computerToPlace); - potentialModules.Add(computerToPlace); - computerToPlace.Select += (s, a) => - { - ShowSysInf(computerToPlace); - }; - computerToPlace.Show(); - } - else - { - PlacingNewModule = false; - } - } - } - - private Computer SelectedSystem = null; - - public void ShowSysInf(Computer pc) - { - pnlpcinfo.Left = pnlbuy.Left; - var nl = Environment.NewLine; - SelectedSystem = pc; - pnlpcinfo.Show(); - lbpcinfo.Text = $"Hostname: {SelectedSystem.Hostname}"; - lbpcinfo.Text += $"{nl}Max HP: {SelectedSystem.HP}"; - lbpcinfo.Text += $"{nl}Grade: {SelectedSystem.Grade}"; - lbpcinfo.Text += $"{nl}Type: {SelectedSystem.Type}"; - } - - private void btndelete_Click(object sender, EventArgs e) - { - if(SelectedSystem != null) - { - potentialModules.Remove(SelectedSystem); - pnlnetdesign.Controls.Remove(SelectedSystem); - SelectedSystem.Dispose(); - } - SelectedSystem = null; - pnlpcinfo.Hide(); - } - - private void btncloseinfo_Click(object sender, EventArgs e) - { - SelectedSystem = null; - pnlpcinfo.Hide(); - } - - int skill = 0; - int speed = 0; - - private void txtfskill_TextChanged(object sender, EventArgs e) - { - try - { - skill = Convert.ToInt32(txtfskill.Text); - } - catch - { - txtfskill.Text = skill.ToString(); - } - } - - private void txtfspeed_TextChanged(object sender, EventArgs e) - { - try - { - speed = Convert.ToInt32(txtfspeed.Text); - } - catch - { - txtfspeed.Text = speed.ToString(); - } - } - - Dictionary<string, EnemyHacker> Templates = null; - - public void SetupTemplates() - { - Templates = JsonConvert.DeserializeObject<Dictionary<string, EnemyHacker>>(Properties.Resources.NetBrowser_Enemies); - cbnets.Items.Clear(); - foreach(var t in Templates) - { - cbnets.Items.Add(t.Key); - } - } - - private void btnloadfromtemplate_Click(object sender, EventArgs e) - { - SetupTemplates(); - pnltemplates.BringToFront(); - pnltemplates.Visible = !pnltemplates.Visible; - } - - bool overwrite_net = true; - List<Module> TemplateNet = null; - - public void SetupTemplate(EnemyHacker t) - { - txtnetname.Text = t.Name; - txtnetdesc.Text = t.Description; - txtfskill.Text = t.FriendSkill.ToString(); - txtfspeed.Text = t.FriendSpeed.ToString(); - cbdifficulty.SelectedItem = t.Difficulty; - stage = 0; - overwrite_net = false; - TemplateNet = t.Network; - SetupUI(); - } - - private void btnrecreate_Click(object sender, EventArgs e) - { - try - { - SetupTemplate(Templates[cbnets.Text]); - pnltemplates.Hide(); - } - catch - { - - } - } - } -} diff --git a/source/WindowsFormsApplication1/NetGen.resx b/source/WindowsFormsApplication1/NetGen.resx deleted file mode 100644 index c6bdcd8..0000000 --- a/source/WindowsFormsApplication1/NetGen.resx +++ /dev/null @@ -1,138 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="lbpcinfo.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> - <data name="lbmoduleinfo.Text" xml:space="preserve"> - <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. - -Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. - -To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. - -If you would like to buy a new module, click 'Buy new module'.</value> - </data> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/NetModuleStatus.Designer.cs b/source/WindowsFormsApplication1/NetModuleStatus.Designer.cs deleted file mode 100644 index 31608d4..0000000 --- a/source/WindowsFormsApplication1/NetModuleStatus.Designer.cs +++ /dev/null @@ -1,84 +0,0 @@ -namespace ShiftOS -{ - partial class NetModuleStatus - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.lbinfo = new System.Windows.Forms.Label(); - this.pghealth = new ShiftOS.ProgressBarEX(); - this.SuspendLayout(); - // - // lbinfo - // - this.lbinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.lbinfo.Location = new System.Drawing.Point(4, 4); - this.lbinfo.Name = "lbinfo"; - this.lbinfo.Size = new System.Drawing.Size(102, 22); - this.lbinfo.TabIndex = 1; - this.lbinfo.Text = "label1"; - // - // pghealth - // - this.pghealth.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pghealth.BackColor = System.Drawing.Color.Black; - this.pghealth.BlockSeparation = 3; - this.pghealth.BlockWidth = 5; - this.pghealth.Color = System.Drawing.Color.Gray; - this.pghealth.ForeColor = System.Drawing.Color.White; - this.pghealth.Location = new System.Drawing.Point(112, 4); - this.pghealth.MaxValue = 100; - this.pghealth.MinValue = 0; - this.pghealth.Name = "pghealth"; - this.pghealth.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal; - this.pghealth.ShowValue = true; - this.pghealth.Size = new System.Drawing.Size(227, 22); - this.pghealth.Step = 10; - this.pghealth.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Continuous; - this.pghealth.TabIndex = 0; - this.pghealth.Value = 0; - // - // NetModuleStatus - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.lbinfo); - this.Controls.Add(this.pghealth); - this.Name = "NetModuleStatus"; - this.Size = new System.Drawing.Size(352, 26); - this.ResumeLayout(false); - - } - - #endregion - - private ProgressBarEX pghealth; - private System.Windows.Forms.Label lbinfo; - } -} diff --git a/source/WindowsFormsApplication1/NetModuleStatus.cs b/source/WindowsFormsApplication1/NetModuleStatus.cs deleted file mode 100644 index 037f73a..0000000 --- a/source/WindowsFormsApplication1/NetModuleStatus.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class NetModuleStatus : UserControl - { - private Module _module = null; - - public NetModuleStatus(Module m) - { - _module = m; - InitializeComponent(); - var t = new Timer(); - t.Tick += (object s, EventArgs a) => - { - lbinfo.Text = _module.Hostname; - pghealth.MaxValue = _module.GetTotalHP(); - pghealth.Value = _module.HP; - if(_module.HP == _module.GetTotalHP()) - { - if(this.Visible == true) - { - this.Hide(); - } - } - else - { - if(this.Visible == false) - { - this.Show(); - } - } - }; - t.Interval = 100; - t.Start(); - } - } -} diff --git a/source/WindowsFormsApplication1/NetModuleStatus.resx b/source/WindowsFormsApplication1/NetModuleStatus.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/NetModuleStatus.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/NetworkBrowser.Designer.cs b/source/WindowsFormsApplication1/NetworkBrowser.Designer.cs deleted file mode 100644 index cf9468d..0000000 --- a/source/WindowsFormsApplication1/NetworkBrowser.Designer.cs +++ /dev/null @@ -1,290 +0,0 @@ -namespace ShiftOS -{ - partial class NetworkBrowser - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.panel1 = new System.Windows.Forms.Panel(); - this.label3 = new System.Windows.Forms.Label(); - this.btnscreen = new System.Windows.Forms.Button(); - this.pnlmynet = new System.Windows.Forms.Panel(); - this.flmodules = new System.Windows.Forms.FlowLayoutPanel(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.btntier = new System.Windows.Forms.Button(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.btnstartbattle = new System.Windows.Forms.Button(); - this.lbnets = new System.Windows.Forms.ListBox(); - this.panel2 = new System.Windows.Forms.Panel(); - this.lbnetdesc = new System.Windows.Forms.Label(); - this.lbtitle = new System.Windows.Forms.Label(); - this.pgtotalhealth = new ShiftOS.ProgressBarEX(); - this.tmrcalctotal = new System.Windows.Forms.Timer(this.components); - this.panel1.SuspendLayout(); - this.pnlmynet.SuspendLayout(); - this.panel2.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Controls.Add(this.label3); - this.panel1.Controls.Add(this.btnscreen); - this.panel1.Controls.Add(this.pnlmynet); - this.panel1.Controls.Add(this.btntier); - this.panel1.Controls.Add(this.label2); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.btnstartbattle); - this.panel1.Controls.Add(this.lbnets); - this.panel1.Controls.Add(this.panel2); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(725, 495); - this.panel1.TabIndex = 0; - // - // label3 - // - this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(282, 470); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(44, 13); - this.label3.TabIndex = 8; - this.label3.Text = "Screen:"; - // - // btnscreen - // - this.btnscreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnscreen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnscreen.Location = new System.Drawing.Point(332, 465); - this.btnscreen.Name = "btnscreen"; - this.btnscreen.Size = new System.Drawing.Size(84, 23); - this.btnscreen.TabIndex = 7; - this.btnscreen.Text = "Network List"; - this.btnscreen.UseVisualStyleBackColor = true; - this.btnscreen.Click += new System.EventHandler(this.btnscreen_Click); - // - // pnlmynet - // - this.pnlmynet.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlmynet.Controls.Add(this.pgtotalhealth); - this.pnlmynet.Controls.Add(this.flmodules); - this.pnlmynet.Controls.Add(this.label5); - this.pnlmynet.Controls.Add(this.label4); - this.pnlmynet.Location = new System.Drawing.Point(12, 12); - this.pnlmynet.Name = "pnlmynet"; - this.pnlmynet.Size = new System.Drawing.Size(404, 447); - this.pnlmynet.TabIndex = 6; - // - // flmodules - // - this.flmodules.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flmodules.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flmodules.Location = new System.Drawing.Point(7, 140); - this.flmodules.Name = "flmodules"; - this.flmodules.Size = new System.Drawing.Size(394, 298); - this.flmodules.TabIndex = 3; - this.flmodules.WrapContents = false; - // - // label5 - // - this.label5.Location = new System.Drawing.Point(4, 37); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(397, 58); - this.label5.TabIndex = 2; - this.label5.Text = "Below you can see your network\'s total health, as well as a list of any damaged m" + - "odules\' health. If \'localhost\' is on the list and it\'s health is 0, you cannot p" + - "articipate in any battles."; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.label4.Location = new System.Drawing.Point(3, 5); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(91, 20); - this.label4.TabIndex = 1; - this.label4.Text = "My Network"; - // - // btntier - // - this.btntier.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btntier.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btntier.Location = new System.Drawing.Point(47, 465); - this.btntier.Name = "btntier"; - this.btntier.Size = new System.Drawing.Size(75, 23); - this.btntier.TabIndex = 5; - this.btntier.Text = "1"; - this.btntier.UseVisualStyleBackColor = true; - this.btntier.Click += new System.EventHandler(this.btntier_Click); - // - // label2 - // - this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(13, 470); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(28, 13); - this.label2.TabIndex = 4; - this.label2.Text = "Tier:"; - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.label1.Location = new System.Drawing.Point(419, 354); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(294, 71); - this.label1.TabIndex = 3; - this.label1.Text = "When you\'re ready, click \'Start Battle\' to begin the hacker battle."; - // - // btnstartbattle - // - this.btnstartbattle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnstartbattle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnstartbattle.Location = new System.Drawing.Point(638, 465); - this.btnstartbattle.Name = "btnstartbattle"; - this.btnstartbattle.Size = new System.Drawing.Size(75, 23); - this.btnstartbattle.TabIndex = 2; - this.btnstartbattle.Text = "Start Battle"; - this.btnstartbattle.UseVisualStyleBackColor = true; - this.btnstartbattle.Click += new System.EventHandler(this.btnstartbattle_Click); - // - // lbnets - // - this.lbnets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbnets.BackColor = System.Drawing.Color.Black; - this.lbnets.ForeColor = System.Drawing.Color.White; - this.lbnets.FormattingEnabled = true; - this.lbnets.Location = new System.Drawing.Point(13, 17); - this.lbnets.Name = "lbnets"; - this.lbnets.Size = new System.Drawing.Size(403, 433); - this.lbnets.TabIndex = 1; - this.lbnets.SelectedIndexChanged += new System.EventHandler(this.lbnets_SelectedIndexChanged); - // - // panel2 - // - this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.panel2.Controls.Add(this.lbnetdesc); - this.panel2.Controls.Add(this.lbtitle); - this.panel2.Location = new System.Drawing.Point(422, 13); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(291, 326); - this.panel2.TabIndex = 0; - // - // lbnetdesc - // - this.lbnetdesc.Location = new System.Drawing.Point(5, 36); - this.lbnetdesc.Name = "lbnetdesc"; - this.lbnetdesc.Size = new System.Drawing.Size(283, 290); - this.lbnetdesc.TabIndex = 1; - this.lbnetdesc.Text = "No network selected."; - // - // lbtitle - // - this.lbtitle.AutoSize = true; - this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.lbtitle.Location = new System.Drawing.Point(4, 4); - this.lbtitle.Name = "lbtitle"; - this.lbtitle.Size = new System.Drawing.Size(129, 20); - this.lbtitle.TabIndex = 0; - this.lbtitle.Text = "Network Browser"; - // - // pgtotalhealth - // - this.pgtotalhealth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pgtotalhealth.BackColor = System.Drawing.Color.Black; - this.pgtotalhealth.BlockSeparation = 3; - this.pgtotalhealth.BlockWidth = 5; - this.pgtotalhealth.Color = System.Drawing.Color.Gray; - this.pgtotalhealth.Location = new System.Drawing.Point(7, 98); - this.pgtotalhealth.MaxValue = 100; - this.pgtotalhealth.MinValue = 0; - this.pgtotalhealth.Name = "pgtotalhealth"; - this.pgtotalhealth.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal; - this.pgtotalhealth.ShowValue = true; - this.pgtotalhealth.Size = new System.Drawing.Size(394, 32); - this.pgtotalhealth.Step = 10; - this.pgtotalhealth.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Continuous; - this.pgtotalhealth.TabIndex = 4; - this.pgtotalhealth.Value = 0; - // - // tmrcalctotal - // - this.tmrcalctotal.Enabled = true; - this.tmrcalctotal.Tick += new System.EventHandler(this.tmrcalctotal_Tick); - // - // NetworkBrowser - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(725, 495); - this.Controls.Add(this.panel1); - this.ForeColor = System.Drawing.Color.Black; - this.Name = "NetworkBrowser"; - this.Text = "NetworkBrowser"; - this.Load += new System.EventHandler(this.NetworkBrowser_Load); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.pnlmynet.ResumeLayout(false); - this.pnlmynet.PerformLayout(); - this.panel2.ResumeLayout(false); - this.panel2.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button btnstartbattle; - private System.Windows.Forms.ListBox lbnets; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Label lbnetdesc; - private System.Windows.Forms.Label lbtitle; - private System.Windows.Forms.Button btntier; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button btnscreen; - private System.Windows.Forms.Panel pnlmynet; - private System.Windows.Forms.FlowLayoutPanel flmodules; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private ProgressBarEX pgtotalhealth; - private System.Windows.Forms.Timer tmrcalctotal; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/NetworkBrowser.cs b/source/WindowsFormsApplication1/NetworkBrowser.cs deleted file mode 100644 index 127140f..0000000 --- a/source/WindowsFormsApplication1/NetworkBrowser.cs +++ /dev/null @@ -1,301 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class NetworkBrowser : Form - { - public NetworkBrowser() - { - InitializeComponent(); - } - - public Dictionary<string, EnemyHacker> Networks = null; - - private void NetworkBrowser_Load(object sender, EventArgs e) - { - LoadNetworks(); - SetupSidePane(); - pnlmynet.Hide(); - } - - public string CurrentTier = "easy"; - public EnemyHacker SelectedNet = null; - - public void LoadNetworks() - { - switch(CurrentTier) - { - case "easy": - btntier.Text = "1"; - break; - case "medium": - btntier.Text = "2"; - break; - case "hard": - btntier.Text = "3"; - break; - } - Networks = JsonConvert.DeserializeObject<Dictionary<string, EnemyHacker>>(Properties.Resources.NetBrowser_Enemies); - lbnets.Items.Clear(); - var Tier1 = new List<string>(); - var Tier2 = new List<string>(); - var Tier3 = new List<string>(); - - foreach (var net in Networks) - { - if (!API.CurrentSave.CompletedNets.Contains(net.Key)) - { - switch (net.Value.Difficulty) - { - case "easy": - Tier1.Add(net.Key); - break; - case "medium": - Tier2.Add(net.Key); - break; - case "hard": - Tier3.Add(net.Key); - break; - } - } - } - - switch (CurrentTier) - { - case "easy": - SetupUI(Tier1); - break; - case "medium": - SetupUI(Tier2); - break; - case "hard": - SetupUI(Tier3); - break; - } - } - - public void SetupSidePane() - { - if(SelectedNet != null) - { - lbtitle.Text = SelectedNet.Name; - lbnetdesc.Text = SelectedNet.Description + @" - -Leader hack speed: " + SelectedNet.FriendSpeed.ToString() + @" -Leader hack skill: " + SelectedNet.FriendSkill.ToString() + @" - -Those above values only matter if the leader decides to become a friend. If they do, you can hire them for free to hack into certain ShiftOS applications."; - btnstartbattle.Enabled = true; - } - else - { - lbtitle.Text = "Network Browser"; - lbnetdesc.Text = "No network selected."; - btnstartbattle.Enabled = false; - } - } - - public void SetupUI(List<string> tier) - { - if (tier.Count > 0) - { - foreach (var t in tier) - { - lbnets.Items.Add(t); - } - } - else - { - AddLeader(CurrentTier); - } - } - - public void AddLeader(string tier) - { - if (API.Upgrades["nb_tier_" + tier] == false) - { - var enemy = JsonConvert.DeserializeObject<EnemyHacker>(Get_Leader_JSON(tier)); - Networks.Add(enemy.Name, enemy); - lbnets.Items.Add(enemy.Name); - } - } - - public string Get_Leader_JSON(string tier) - { - switch(tier) - { - case "easy": - return Properties.Resources.Hacker_DanaRoss; - case "medium": - return Properties.Resources.Hacker_AustinWalker; - case "hard": - return Properties.Resources.Hacker_JonathanRivard; - default: - return null; - - } - } - - private void btntier_Click(object sender, EventArgs e) - { - switch(btntier.Text) - { - case "1": - if(API.Upgrades["nb_tier_easy"] == true) - { - CurrentTier = "medium"; - } - break; - case "2": - if (API.Upgrades["nb_tier_medium"] == true) - { - CurrentTier = "hard"; - } - else - { - CurrentTier = "easy"; - } - break; - case "3": - CurrentTier = "easy"; - break; - } - LoadNetworks(); - } - - private void lbnets_SelectedIndexChanged(object sender, EventArgs e) - { - var t = lbnets.SelectedItem as string; - foreach(var net in Networks) - { - if(net.Key == t) - { - SelectedNet = net.Value; - } - } - SetupSidePane(); - } - - private void btnstartbattle_Click(object sender, EventArgs e) - { - if (Hacking.MyCore.HP == 0) - { - SetupMyNet(); - pnlmynet.Show(); - btnscreen.Text = "My Network"; - API.CreateInfoboxSession("Your Core isn't ready.", "Your Core (hostname \"localhost\") has 0 HP, and cannot fight. Please wait until your Core regenerates.", infobox.InfoboxMode.Info); - } - else - { - string tier_upgrade = null; - if (SelectedNet.IsLeader == true) - { - tier_upgrade = "nb_tier_" + CurrentTier; - } - var hui = new HackUI(SelectedNet); - hui.OnWin += (object s, EventArgs a) => - { - if (tier_upgrade != null) - { - API.Upgrades[tier_upgrade] = true; - if(CurrentTier == "easy") - { - if(API.Upgrades["midgamebridge"] == false) - { - var term = new Terminal(); - API.CreateForm(term, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); - term.StartDanaRossStory(); - } - } - else if(CurrentTier == "medium") - { - var h = new HoloChat(); - var fakeroom = new FakeChatClient(); - fakeroom.Name = "The Hacker Alliance"; - fakeroom.Topic = "The Hacker Alliance - We are the masters. DevX cannot control us."; - fakeroom.OtherCharacters = new List<string>(new [] {"Richard Ladouceur"}); - fakeroom.Messages = JsonConvert.DeserializeObject<Dictionary<string, string>>(Properties.Resources.AustinWalkerCompletionStory); - API.CreateForm(h, "QuickChat", API.GetIcon("QuickChat")); - var t = new Thread(new ThreadStart(new Action(() => - { - Thread.Sleep(200); - h.Invoke(new Action(() => - { - h.SetupFakeClient(fakeroom); - })); - }))); - - } - foreach(var mod in SelectedNet.Network) - { - if (mod.Type != SystemType.Core) - { - mod.HP = 0; - Hacking.MyNetwork.Add(mod); - } - } - SetupMyNet(); - } - API.CurrentSave.CompletedNets.Add(SelectedNet.Name); - SelectedNet = null; - LoadNetworks(); - SetupSidePane(); - }; - hui.Show(); - } - } - - public void SetupMyNet() - { - flmodules.Controls.Clear(); - foreach(var m in Hacking.MyNetwork) - { - var mStatus = new NetModuleStatus(m); - flmodules.Controls.Add(mStatus); - mStatus.Show(); - } - } - - private void btnscreen_Click(object sender, EventArgs e) - { - switch (btnscreen.Text) - { - case "My Network": - LoadNetworks(); - SetupSidePane(); - pnlmynet.Hide(); - btnscreen.Text = "Network List"; - break; - case "Network List": - SetupMyNet(); - pnlmynet.Show(); - btnscreen.Text = "My Network"; - break; - } - - } - - private void tmrcalctotal_Tick(object sender, EventArgs e) - { - int total = 0; - int hp = 0; - foreach(var mod in Hacking.MyNetwork) - { - total += mod.GetTotalHP(); - hp += mod.HP; - } - pgtotalhealth.MaxValue = total; - pgtotalhealth.Value = hp; - } - } -} diff --git a/source/WindowsFormsApplication1/NetworkBrowser.resx b/source/WindowsFormsApplication1/NetworkBrowser.resx deleted file mode 100644 index fa83c0a..0000000 --- a/source/WindowsFormsApplication1/NetworkBrowser.resx +++ /dev/null @@ -1,123 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="tmrcalctotal.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Notification.Designer.cs b/source/WindowsFormsApplication1/Notification.Designer.cs deleted file mode 100644 index 57b6416..0000000 --- a/source/WindowsFormsApplication1/Notification.Designer.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace ShiftOS -{ - partial class Notification - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.lbtitle = new System.Windows.Forms.Label(); - this.lbmessage = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // lbtitle - // - this.lbtitle.AutoSize = true; - this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.lbtitle.Location = new System.Drawing.Point(3, 9); - this.lbtitle.Name = "lbtitle"; - this.lbtitle.Size = new System.Drawing.Size(135, 20); - this.lbtitle.TabIndex = 0; - this.lbtitle.Text = "Package Installed"; - // - // lbmessage - // - this.lbmessage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbmessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.lbmessage.Location = new System.Drawing.Point(7, 33); - this.lbmessage.Name = "lbmessage"; - this.lbmessage.Size = new System.Drawing.Size(345, 67); - this.lbmessage.TabIndex = 1; - this.lbmessage.Text = "The package \"shiftnet\" has been successfully installed."; - // - // Notification - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Gray; - this.Controls.Add(this.lbmessage); - this.Controls.Add(this.lbtitle); - this.ForeColor = System.Drawing.Color.White; - this.Name = "Notification"; - this.Size = new System.Drawing.Size(355, 100); - this.Load += new System.EventHandler(this.Notification_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label lbtitle; - private System.Windows.Forms.Label lbmessage; - } -} diff --git a/source/WindowsFormsApplication1/Notification.cs b/source/WindowsFormsApplication1/Notification.cs deleted file mode 100644 index b5e1693..0000000 --- a/source/WindowsFormsApplication1/Notification.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Notification : UserControl - { - public Notification(string title, string text) - { - InitializeComponent(); - Title = title; - Message = text; - var t = new Timer(); - t.Interval = 5000; - t.Tick += (object s, EventArgs a) => - { - this.Dispose(); - }; - t.Start(); - } - - public string Title { get; set; } - public string Message { get; set; } - - private void Notification_Load(object sender, EventArgs e) - { - API.PlaySound(Properties.Resources.rolldown); - lbtitle.Text = Title; - lbmessage.Text = Message; - } - } -} diff --git a/source/WindowsFormsApplication1/Notification.resx b/source/WindowsFormsApplication1/Notification.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/Notification.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/OSInfo.cs b/source/WindowsFormsApplication1/OSInfo.cs deleted file mode 100644 index 53e51dc..0000000 --- a/source/WindowsFormsApplication1/OSInfo.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; - -namespace ShiftOS -{ - public class OSInfo - { - - /// <summary> - /// System directory separator charactor. - /// </summary> - public static string DirectorySeparator - { - get - { - switch(GetPlatformID()) - { - case "microsoft": - return "\\"; - default: - return "/"; - } - } - } - - /// <summary> - /// Selects a default, monospace font name from the OS. This is typically used for creating ingame terminals. - /// </summary> - /// <returns>The monospace font.</returns> - public static string GetMonospaceFont() { - string fname = null; - switch (GetPlatformID ()) { - case "microsoft": - fname = "Lucida Console"; - break; - case "unix": - fname = "Monospace"; - break; - case "macosx": - fname = "Menlo"; - break; - } - return fname; - } - - /// <summary> - /// This refers to the Home directory of the current user. For example, if the user's name is 'Michael', and the user is on Windows Vista/7/8/10, this value would be 'C:\Users\Michael'. - /// </summary> - public static string homePath () - { - return (Environment.OSVersion.Platform == PlatformID.Unix || - Environment.OSVersion.Platform == PlatformID.MacOSX) - ? Environment.GetEnvironmentVariable ("HOME") - : Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%"); - } - - /// <summary> - /// Is it Linux? Is it Mac OS? Did Microsoft make it? - /// </summary> - /// <returns>The platform ID.</returns> - public static string GetPlatformID() { - switch (Environment.OSVersion.Platform) { - case PlatformID.Unix: - return "unix"; - case PlatformID.MacOSX: - return "macosx"; - default: - return "microsoft"; - } - } - } -} - diff --git a/source/WindowsFormsApplication1/Online/ConnectionManager.Designer.cs b/source/WindowsFormsApplication1/Online/ConnectionManager.Designer.cs new file mode 100644 index 0000000..89abcca --- /dev/null +++ b/source/WindowsFormsApplication1/Online/ConnectionManager.Designer.cs @@ -0,0 +1,129 @@ +namespace ShiftOS +{ + partial class ConnectionManager + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.lbconnections = new System.Windows.Forms.ListBox(); + this.flbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnadd = new System.Windows.Forms.Button(); + this.btnconnect = new System.Windows.Forms.Button(); + this.btndisconnect = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.flbuttons.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.flbuttons); + this.panel1.Controls.Add(this.lbconnections); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(684, 531); + this.panel1.TabIndex = 0; + // + // lbconnections + // + this.lbconnections.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbconnections.FormattingEnabled = true; + this.lbconnections.Location = new System.Drawing.Point(13, 13); + this.lbconnections.Name = "lbconnections"; + this.lbconnections.Size = new System.Drawing.Size(659, 472); + this.lbconnections.TabIndex = 0; + this.lbconnections.SelectedIndexChanged += new System.EventHandler(this.lbconnections_SelectedIndexChanged); + // + // flbuttons + // + this.flbuttons.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flbuttons.Controls.Add(this.btnadd); + this.flbuttons.Controls.Add(this.btnconnect); + this.flbuttons.Controls.Add(this.btndisconnect); + this.flbuttons.Location = new System.Drawing.Point(13, 489); + this.flbuttons.Name = "flbuttons"; + this.flbuttons.Size = new System.Drawing.Size(659, 30); + this.flbuttons.TabIndex = 1; + // + // btnadd + // + this.btnadd.Location = new System.Drawing.Point(3, 3); + this.btnadd.Name = "btnadd"; + this.btnadd.Size = new System.Drawing.Size(75, 23); + this.btnadd.TabIndex = 0; + this.btnadd.Text = "Add"; + this.btnadd.UseVisualStyleBackColor = true; + this.btnadd.Click += new System.EventHandler(this.btnadd_Click); + // + // btnconnect + // + this.btnconnect.Location = new System.Drawing.Point(84, 3); + this.btnconnect.Name = "btnconnect"; + this.btnconnect.Size = new System.Drawing.Size(75, 23); + this.btnconnect.TabIndex = 1; + this.btnconnect.Text = "Connect"; + this.btnconnect.UseVisualStyleBackColor = true; + this.btnconnect.Click += new System.EventHandler(this.btnconnect_Click); + // + // btndisconnect + // + this.btndisconnect.Location = new System.Drawing.Point(165, 3); + this.btndisconnect.Name = "btndisconnect"; + this.btndisconnect.Size = new System.Drawing.Size(75, 23); + this.btndisconnect.TabIndex = 2; + this.btndisconnect.Text = "Disconnect"; + this.btndisconnect.UseVisualStyleBackColor = true; + this.btndisconnect.Click += new System.EventHandler(this.btndisconnect_Click); + // + // ConnectionManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(684, 531); + this.Controls.Add(this.panel1); + this.Name = "ConnectionManager"; + this.Text = "ConnectionManager"; + this.Load += new System.EventHandler(this.ConnectionManager_Load); + this.panel1.ResumeLayout(false); + this.flbuttons.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.FlowLayoutPanel flbuttons; + private System.Windows.Forms.Button btnadd; + private System.Windows.Forms.Button btnconnect; + private System.Windows.Forms.Button btndisconnect; + private System.Windows.Forms.ListBox lbconnections; + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Online/ConnectionManager.cs b/source/WindowsFormsApplication1/Online/ConnectionManager.cs new file mode 100644 index 0000000..eaf2a24 --- /dev/null +++ b/source/WindowsFormsApplication1/Online/ConnectionManager.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class ConnectionManager : Form + { + public ConnectionManager() + { + InitializeComponent(); + } + + string selectednet = null; + + private void lbconnections_SelectedIndexChanged(object sender, EventArgs e) + { + try + { + selectednet = lbconnections.SelectedItem.ToString(); + SetupUI(); + } + catch + { + selectednet = null; + SetupUI(); + } + } + + public void SetupUI() + { + if(selectednet != null) + { + btnconnect.Visible = !Package_Grabber.clients[selectednet].IsConnected; + btndisconnect.Visible = Package_Grabber.clients[selectednet].IsConnected; + } + else + { + btnconnect.Hide(); + btndisconnect.Hide(); + } + } + + private void ConnectionManager_Load(object sender, EventArgs e) + { + SetupUI(); + var t = new Timer(); + t.Interval = 500; + t.Tick += (object s, EventArgs a) => + { + lbconnections.Items.Clear(); + foreach(var itm in Package_Grabber.clients) + { + lbconnections.Items.Add(itm.Key); + } + }; + t.Start(); + } + + private void btndisconnect_Click(object sender, EventArgs e) + { + Package_Grabber.Disconnect(selectednet); + SetupUI(); + } + + private void btnconnect_Click(object sender, EventArgs e) + { + Package_Grabber.ConnectToServer(selectednet, 7429); + SetupUI(); + } + + private void btnadd_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Add connection", "Please type the IP Address or hostname of the server.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (o, a) => + { + var res = API.GetInfoboxResult(); + if(res != "Cancelled") + { + Package_Grabber.ConnectToServer(res, 7429); + } + }; + } + } +} diff --git a/source/WindowsFormsApplication1/Online/ConnectionManager.resx b/source/WindowsFormsApplication1/Online/ConnectionManager.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Online/ConnectionManager.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Online/Package_Grabber.cs b/source/WindowsFormsApplication1/Online/Package_Grabber.cs new file mode 100644 index 0000000..b6bbc61 --- /dev/null +++ b/source/WindowsFormsApplication1/Online/Package_Grabber.cs @@ -0,0 +1,402 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using System.IO.Compression; +using Newtonsoft.Json; +using System.Windows.Forms; +using System.Threading; +using System.Drawing; +using NetSockets; + +namespace ShiftOS +{ + [Serializable] + public class ObjectModel + { + public string SysId { get; set; } + public string Command { get; set; } + public object OptionalObject { get; set; } + } + + [Serializable] + public class ChatUser + { + public string Name { get; set; } + public event EventHandler OnJoin; + public event EventHandler OnLeave; + } + + [Serializable] + public class ChatMessage + { + public string Text { get; set; } + public ChatUser User { get; set; } + } + + class Package_Grabber + { + + + public static Dictionary<string, NetObjectClient> clients = null; + + /// <summary> + /// Connect to a ShiftOS server + /// </summary> + /// <param name="address">IP address</param> + /// <param name="port">Port (typically this is 4433.)</param> + public static void ConnectToServer(string address, int port) + { + if(clients == null) + { + clients = new Dictionary<string, NetObjectClient>(); + } + bool blacklisted = false; + string blacklist = new WebClient().DownloadString("http://playshiftos.ml/server/blacklist"); + string[] splitter = blacklist.Split(';'); + foreach (string addr in splitter) + { + try + { + string[] addSplitter = addr.Split(':'); + string host = addSplitter[0]; + int prt = Convert.ToInt32(addSplitter[1]); + if(address == host && port == prt) + { + blacklisted = true; + } + } + catch + { + + } + } + if (!blacklisted) + { + var client = new NetObjectClient(); + client.OnReceived += (object s, NetReceivedEventArgs<NetObject> a) => + { + try + { + var obj = (ObjectModel)a.Data.Object; + if (obj.Command == "set_ident") + { + this_id = obj.SysId; + } + } + catch + { + + } + }; + + try + { + client.Connect(address, port); + clients.Add(client.RemoteHost, client); + } + catch + { + } + } + else + { + API.CreateInfoboxSession("Server Connection Error", "The server you are trying to connect to has been blacklisted for breaking the rules of the Server Showcase, therefore you may not connect to it.", infobox.InfoboxMode.Info); + } + } + + private static string this_id = ""; + + /// <summary> + /// Send a message to a server. + /// </summary> + /// <param name="host">Server hostname/IP</param> + /// <param name="text">Messge contents.</param> + public static void SendMessage(string host, string text) + { + var obj = new ObjectModel(); + obj.SysId = this_id; + obj.Command = text; + try { + clients[host].Send(new NetObject("test", obj)); + } + catch + { + + } + } + + /// <summary> + /// Send a message to a server containing a .NET object. + /// </summary> + /// <param name="host">Server hostname/IP</param> + /// <param name="text">Message text.</param> + /// <param name="optional">The object to go with it.</param> + public static void SendMessage(string host, string text, object optional) + { + var obj = new ObjectModel(); + obj.SysId = this_id; + obj.Command = text; + obj.OptionalObject = optional; + try { + clients[host].Send(obj.SysId, obj); + } + catch + { + + } + } + + + + /// <summary> + /// Disconnect from a server. + /// </summary> + /// <param name="host">Server host.</param> + public static void Disconnect(string host) + { + if(clients.ContainsKey(host)) + { + if(clients[host].IsConnected == true) + { + clients[host].Disconnect(); + } + } + } + + + /// <summary> + /// Download a package through spkg. + /// </summary> + /// <param name="pkgname">Package name</param> + /// <returns>Could it download?</returns> + public static bool GetPackage(string pkgname) + { + bool result = true; + try + { + string downloadpath = Paths.Mod_Temp; + if (!Directory.Exists(downloadpath)) + { + Directory.CreateDirectory(downloadpath); + } else + { + Directory.Delete(downloadpath, true); + Directory.CreateDirectory(downloadpath); + } + WebClient wc = new WebClient(); + wc.DownloadFile("http://playshiftos.ml/shiftnet/packages/" + pkgname + ".pkg", downloadpath + pkgname + ".pkg"); + LastPackage_DownloadPath = downloadpath + pkgname + ".pkg"; + } + catch + { + result = false; + } + return result; + } + + public static string LastPackage_DownloadPath = null; + + /// <summary> + /// Extracts the last downloaded package. + /// </summary> + /// <returns>The temp path</returns> + public static string ExtractPackage() + { + if (LastPackage_DownloadPath != null) + { + string packagedir = null; + if (LastPackage_DownloadPath.EndsWith(".pkg")) + { + packagedir = LastPackage_DownloadPath.Replace(".pkg", ""); + } + else + { + packagedir = LastPackage_DownloadPath.Replace(".stp", ""); + } + if (Directory.Exists(packagedir)) + { + Directory.Delete(packagedir, true); + } + ZipFile.ExtractToDirectory(LastPackage_DownloadPath, packagedir); + return packagedir; + } + else + { + return "fail"; + } + } + + /// <summary> + /// Extract a specified .stp or .pkg file. + /// </summary> + /// <param name="localpath">File to extract</param> + /// <returns>The new temp path</returns> + public static string ExtractPackage(string localpath) + { + try { + + string packagedir = Paths.Mod_Temp + "pkg"; + if (Directory.Exists(packagedir)) + { + Directory.Delete(packagedir, true); + } + Directory.CreateDirectory(packagedir); + ZipFile.ExtractToDirectory(localpath, packagedir); + return packagedir; + } + catch + { + return "fail"; + } + } + + /// <summary> + /// Install a package from a directory + /// </summary> + /// <param name="dir">The package directory</param> + /// <returns>Could it install?</returns> + public static string InstallPackage(string dir) + { + try + { + string dirsepchar = "\\"; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsepchar = "\\"; + break; + default: + dirsepchar = "/"; + break; + } + string alfile = null; + foreach (string file in Directory.GetFiles(dir)) + { + if (file.Contains("applauncher")) + { + alfile = file; + } + } + string json = File.ReadAllText(alfile); + if (!Directory.Exists(Paths.Mod_AppLauncherEntries)) + { + Directory.CreateDirectory(Paths.Mod_AppLauncherEntries); + } + ModApplauncherItem itm = JsonConvert.DeserializeObject<ModApplauncherItem>(json); + File.WriteAllText(Paths.Mod_AppLauncherEntries + itm.Name, json); + //Applauncher Entry installed! + if (!Directory.Exists(Paths.Applications + itm.AppDirectory)) + { + Directory.CreateDirectory(Paths.Applications + itm.AppDirectory); + } + + Thread.Sleep(200); + if (!File.Exists(Paths.Applications + itm.AppDirectory + dirsepchar + "Icon.bmp")) + { + File.Copy(dir + "Icon.bmp", Paths.Applications + itm.AppDirectory + dirsepchar + "Icon.bmp"); + } + if (File.Exists(Paths.Applications + itm.AppDirectory + dirsepchar + "app.saa")) + { + File.Delete(Paths.Applications + itm.AppDirectory + dirsepchar + "app.saa"); + } + File.Move(dir + "app.saa", Paths.Applications + itm.AppDirectory + dirsepchar + "app.saa"); + //App installed. + foreach (string file in Directory.GetFiles(dir)) + { + if (file.EndsWith(".dll")) + { + if (!File.Exists(Paths.Applications + itm.AppDirectory + dirsepchar + new FileInfo(file).Name)) + { + //Dependencies are fucking bitches. + File.Copy(file, Paths.Applications + itm.AppDirectory + dirsepchar + new FileInfo(file).Name); + } + } + } + //Dependencies installed. + API.CurrentSession.SetupAppLauncher(); + return "success"; + } + catch (Exception ex) + { + return ex.Message; + } + } + } + + class FTP_API + { + /// <summary> + /// Gets a package image from the ShiftOS website + /// </summary> + /// <param name="ftpFilePath">Image path relative to the packages directory</param> + /// <returns>The image</returns> + [Obsolete] + public static Image GetImage(string ftpFilePath) + { + var request = WebRequest.Create("http://playshiftos.ml/appscape/packages/" + ftpFilePath); + + using (var response = request.GetResponse()) + { + using (var str = response.GetResponseStream()) + { + return Image.FromStream(str); + } + } + } + + [Obsolete] + public static Image GetSkinImage(string ftpFilePath) + { + var request = WebRequest.Create("http://playshiftos.ml/appscape/skins/" + ftpFilePath); + + using (var response = request.GetResponse()) + { + using (var str = response.GetResponseStream()) + { + return Image.FromStream(str); + } + } + } + } + + + [Serializable] + public class AppscapeModder + { + public string DevKey { get; set; } + public string Name { get; set; } + public string Bio { get; set; } + public string BitnoteAddress { get; set; } + } + + [Serializable] + public class AppscapePackage + { + public string Name { get; set; } + public string Address { get; set; } + public string DevKey { get; set; } + public string Description { get; set; } + public string SetupFile { get; set; } + public string PkgIconPath { get; set; } + public string ScreenshotPath { get; set; } + public decimal Cost { get; set; } + public string Server { get; set; } + } + + [Serializable] + public class SkinData + { + public string Name { get; set; } + public string Author { get; set; } + public string Description { get; set; } + public string Download { get; set; } + public string Icon { get; set; } + public string Screenshot { get; set; } + public decimal Cost { get; set; } + public string Server { get; set; } + } +} diff --git a/source/WindowsFormsApplication1/Package_Grabber.cs b/source/WindowsFormsApplication1/Package_Grabber.cs deleted file mode 100644 index b6bbc61..0000000 --- a/source/WindowsFormsApplication1/Package_Grabber.cs +++ /dev/null @@ -1,402 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using System.IO; -using System.IO.Compression; -using Newtonsoft.Json; -using System.Windows.Forms; -using System.Threading; -using System.Drawing; -using NetSockets; - -namespace ShiftOS -{ - [Serializable] - public class ObjectModel - { - public string SysId { get; set; } - public string Command { get; set; } - public object OptionalObject { get; set; } - } - - [Serializable] - public class ChatUser - { - public string Name { get; set; } - public event EventHandler OnJoin; - public event EventHandler OnLeave; - } - - [Serializable] - public class ChatMessage - { - public string Text { get; set; } - public ChatUser User { get; set; } - } - - class Package_Grabber - { - - - public static Dictionary<string, NetObjectClient> clients = null; - - /// <summary> - /// Connect to a ShiftOS server - /// </summary> - /// <param name="address">IP address</param> - /// <param name="port">Port (typically this is 4433.)</param> - public static void ConnectToServer(string address, int port) - { - if(clients == null) - { - clients = new Dictionary<string, NetObjectClient>(); - } - bool blacklisted = false; - string blacklist = new WebClient().DownloadString("http://playshiftos.ml/server/blacklist"); - string[] splitter = blacklist.Split(';'); - foreach (string addr in splitter) - { - try - { - string[] addSplitter = addr.Split(':'); - string host = addSplitter[0]; - int prt = Convert.ToInt32(addSplitter[1]); - if(address == host && port == prt) - { - blacklisted = true; - } - } - catch - { - - } - } - if (!blacklisted) - { - var client = new NetObjectClient(); - client.OnReceived += (object s, NetReceivedEventArgs<NetObject> a) => - { - try - { - var obj = (ObjectModel)a.Data.Object; - if (obj.Command == "set_ident") - { - this_id = obj.SysId; - } - } - catch - { - - } - }; - - try - { - client.Connect(address, port); - clients.Add(client.RemoteHost, client); - } - catch - { - } - } - else - { - API.CreateInfoboxSession("Server Connection Error", "The server you are trying to connect to has been blacklisted for breaking the rules of the Server Showcase, therefore you may not connect to it.", infobox.InfoboxMode.Info); - } - } - - private static string this_id = ""; - - /// <summary> - /// Send a message to a server. - /// </summary> - /// <param name="host">Server hostname/IP</param> - /// <param name="text">Messge contents.</param> - public static void SendMessage(string host, string text) - { - var obj = new ObjectModel(); - obj.SysId = this_id; - obj.Command = text; - try { - clients[host].Send(new NetObject("test", obj)); - } - catch - { - - } - } - - /// <summary> - /// Send a message to a server containing a .NET object. - /// </summary> - /// <param name="host">Server hostname/IP</param> - /// <param name="text">Message text.</param> - /// <param name="optional">The object to go with it.</param> - public static void SendMessage(string host, string text, object optional) - { - var obj = new ObjectModel(); - obj.SysId = this_id; - obj.Command = text; - obj.OptionalObject = optional; - try { - clients[host].Send(obj.SysId, obj); - } - catch - { - - } - } - - - - /// <summary> - /// Disconnect from a server. - /// </summary> - /// <param name="host">Server host.</param> - public static void Disconnect(string host) - { - if(clients.ContainsKey(host)) - { - if(clients[host].IsConnected == true) - { - clients[host].Disconnect(); - } - } - } - - - /// <summary> - /// Download a package through spkg. - /// </summary> - /// <param name="pkgname">Package name</param> - /// <returns>Could it download?</returns> - public static bool GetPackage(string pkgname) - { - bool result = true; - try - { - string downloadpath = Paths.Mod_Temp; - if (!Directory.Exists(downloadpath)) - { - Directory.CreateDirectory(downloadpath); - } else - { - Directory.Delete(downloadpath, true); - Directory.CreateDirectory(downloadpath); - } - WebClient wc = new WebClient(); - wc.DownloadFile("http://playshiftos.ml/shiftnet/packages/" + pkgname + ".pkg", downloadpath + pkgname + ".pkg"); - LastPackage_DownloadPath = downloadpath + pkgname + ".pkg"; - } - catch - { - result = false; - } - return result; - } - - public static string LastPackage_DownloadPath = null; - - /// <summary> - /// Extracts the last downloaded package. - /// </summary> - /// <returns>The temp path</returns> - public static string ExtractPackage() - { - if (LastPackage_DownloadPath != null) - { - string packagedir = null; - if (LastPackage_DownloadPath.EndsWith(".pkg")) - { - packagedir = LastPackage_DownloadPath.Replace(".pkg", ""); - } - else - { - packagedir = LastPackage_DownloadPath.Replace(".stp", ""); - } - if (Directory.Exists(packagedir)) - { - Directory.Delete(packagedir, true); - } - ZipFile.ExtractToDirectory(LastPackage_DownloadPath, packagedir); - return packagedir; - } - else - { - return "fail"; - } - } - - /// <summary> - /// Extract a specified .stp or .pkg file. - /// </summary> - /// <param name="localpath">File to extract</param> - /// <returns>The new temp path</returns> - public static string ExtractPackage(string localpath) - { - try { - - string packagedir = Paths.Mod_Temp + "pkg"; - if (Directory.Exists(packagedir)) - { - Directory.Delete(packagedir, true); - } - Directory.CreateDirectory(packagedir); - ZipFile.ExtractToDirectory(localpath, packagedir); - return packagedir; - } - catch - { - return "fail"; - } - } - - /// <summary> - /// Install a package from a directory - /// </summary> - /// <param name="dir">The package directory</param> - /// <returns>Could it install?</returns> - public static string InstallPackage(string dir) - { - try - { - string dirsepchar = "\\"; - switch (OSInfo.GetPlatformID()) - { - case "microsoft": - dirsepchar = "\\"; - break; - default: - dirsepchar = "/"; - break; - } - string alfile = null; - foreach (string file in Directory.GetFiles(dir)) - { - if (file.Contains("applauncher")) - { - alfile = file; - } - } - string json = File.ReadAllText(alfile); - if (!Directory.Exists(Paths.Mod_AppLauncherEntries)) - { - Directory.CreateDirectory(Paths.Mod_AppLauncherEntries); - } - ModApplauncherItem itm = JsonConvert.DeserializeObject<ModApplauncherItem>(json); - File.WriteAllText(Paths.Mod_AppLauncherEntries + itm.Name, json); - //Applauncher Entry installed! - if (!Directory.Exists(Paths.Applications + itm.AppDirectory)) - { - Directory.CreateDirectory(Paths.Applications + itm.AppDirectory); - } - - Thread.Sleep(200); - if (!File.Exists(Paths.Applications + itm.AppDirectory + dirsepchar + "Icon.bmp")) - { - File.Copy(dir + "Icon.bmp", Paths.Applications + itm.AppDirectory + dirsepchar + "Icon.bmp"); - } - if (File.Exists(Paths.Applications + itm.AppDirectory + dirsepchar + "app.saa")) - { - File.Delete(Paths.Applications + itm.AppDirectory + dirsepchar + "app.saa"); - } - File.Move(dir + "app.saa", Paths.Applications + itm.AppDirectory + dirsepchar + "app.saa"); - //App installed. - foreach (string file in Directory.GetFiles(dir)) - { - if (file.EndsWith(".dll")) - { - if (!File.Exists(Paths.Applications + itm.AppDirectory + dirsepchar + new FileInfo(file).Name)) - { - //Dependencies are fucking bitches. - File.Copy(file, Paths.Applications + itm.AppDirectory + dirsepchar + new FileInfo(file).Name); - } - } - } - //Dependencies installed. - API.CurrentSession.SetupAppLauncher(); - return "success"; - } - catch (Exception ex) - { - return ex.Message; - } - } - } - - class FTP_API - { - /// <summary> - /// Gets a package image from the ShiftOS website - /// </summary> - /// <param name="ftpFilePath">Image path relative to the packages directory</param> - /// <returns>The image</returns> - [Obsolete] - public static Image GetImage(string ftpFilePath) - { - var request = WebRequest.Create("http://playshiftos.ml/appscape/packages/" + ftpFilePath); - - using (var response = request.GetResponse()) - { - using (var str = response.GetResponseStream()) - { - return Image.FromStream(str); - } - } - } - - [Obsolete] - public static Image GetSkinImage(string ftpFilePath) - { - var request = WebRequest.Create("http://playshiftos.ml/appscape/skins/" + ftpFilePath); - - using (var response = request.GetResponse()) - { - using (var str = response.GetResponseStream()) - { - return Image.FromStream(str); - } - } - } - } - - - [Serializable] - public class AppscapeModder - { - public string DevKey { get; set; } - public string Name { get; set; } - public string Bio { get; set; } - public string BitnoteAddress { get; set; } - } - - [Serializable] - public class AppscapePackage - { - public string Name { get; set; } - public string Address { get; set; } - public string DevKey { get; set; } - public string Description { get; set; } - public string SetupFile { get; set; } - public string PkgIconPath { get; set; } - public string ScreenshotPath { get; set; } - public decimal Cost { get; set; } - public string Server { get; set; } - } - - [Serializable] - public class SkinData - { - public string Name { get; set; } - public string Author { get; set; } - public string Description { get; set; } - public string Download { get; set; } - public string Icon { get; set; } - public string Screenshot { get; set; } - public decimal Cost { get; set; } - public string Server { get; set; } - } -} diff --git a/source/WindowsFormsApplication1/PanelManager.Designer.cs b/source/WindowsFormsApplication1/PanelManager.Designer.cs deleted file mode 100644 index 2ae44a8..0000000 --- a/source/WindowsFormsApplication1/PanelManager.Designer.cs +++ /dev/null @@ -1,132 +0,0 @@ -namespace ShiftOS -{ - partial class PanelManager - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.pnlmain = new System.Windows.Forms.Panel(); - this.btndone = new System.Windows.Forms.Button(); - this.pnlbgcolor = new System.Windows.Forms.Panel(); - this.Label40 = new System.Windows.Forms.Label(); - this.Label36 = new System.Windows.Forms.Label(); - this.txtheight = new System.Windows.Forms.TextBox(); - this.pnlmain.SuspendLayout(); - this.SuspendLayout(); - // - // pnlmain - // - this.pnlmain.BackColor = System.Drawing.Color.White; - this.pnlmain.Controls.Add(this.txtheight); - this.pnlmain.Controls.Add(this.Label36); - this.pnlmain.Controls.Add(this.pnlbgcolor); - this.pnlmain.Controls.Add(this.Label40); - this.pnlmain.Controls.Add(this.btndone); - this.pnlmain.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlmain.ForeColor = System.Drawing.Color.Black; - this.pnlmain.Location = new System.Drawing.Point(0, 0); - this.pnlmain.Name = "pnlmain"; - this.pnlmain.Size = new System.Drawing.Size(360, 378); - this.pnlmain.TabIndex = 0; - // - // btndone - // - this.btndone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndone.Location = new System.Drawing.Point(273, 343); - this.btndone.Name = "btndone"; - this.btndone.Size = new System.Drawing.Size(75, 23); - this.btndone.TabIndex = 0; - this.btndone.Text = "Done"; - this.btndone.UseVisualStyleBackColor = true; - this.btndone.Click += new System.EventHandler(this.btndone_Click); - // - // pnlbgcolor - // - this.pnlbgcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbgcolor.Location = new System.Drawing.Point(307, 101); - this.pnlbgcolor.Name = "pnlbgcolor"; - this.pnlbgcolor.Size = new System.Drawing.Size(41, 20); - this.pnlbgcolor.TabIndex = 22; - this.pnlbgcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.setbgcolor); - // - // Label40 - // - this.Label40.AutoSize = true; - this.Label40.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label40.Location = new System.Drawing.Point(12, 101); - this.Label40.Name = "Label40"; - this.Label40.Size = new System.Drawing.Size(259, 16); - this.Label40.TabIndex = 23; - this.Label40.Text = "Background Color (right-click to set image)"; - // - // Label36 - // - this.Label36.AutoSize = true; - this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label36.Location = new System.Drawing.Point(12, 136); - this.Label36.Name = "Label36"; - this.Label36.Size = new System.Drawing.Size(50, 16); - this.Label36.TabIndex = 24; - this.Label36.Text = "Height:"; - // - // txtheight - // - this.txtheight.BackColor = System.Drawing.Color.White; - this.txtheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtheight.ForeColor = System.Drawing.Color.Black; - this.txtheight.Location = new System.Drawing.Point(325, 134); - this.txtheight.Name = "txtheight"; - this.txtheight.Size = new System.Drawing.Size(23, 22); - this.txtheight.TabIndex = 25; - this.txtheight.TextChanged += new System.EventHandler(this.txtheight_TextChanged); - // - // PanelManager - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(360, 378); - this.Controls.Add(this.pnlmain); - this.Name = "PanelManager"; - this.Text = "PanelManager"; - this.Load += new System.EventHandler(this.PanelManager_Load); - this.pnlmain.ResumeLayout(false); - this.pnlmain.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel pnlmain; - private System.Windows.Forms.Button btndone; - private System.Windows.Forms.Panel pnlbgcolor; - private System.Windows.Forms.Label Label40; - private System.Windows.Forms.Label Label36; - private System.Windows.Forms.TextBox txtheight; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/PanelManager.cs b/source/WindowsFormsApplication1/PanelManager.cs deleted file mode 100644 index d347fb5..0000000 --- a/source/WindowsFormsApplication1/PanelManager.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class PanelManager : Form - { - public PanelManager(Skinning.DesktopPanel newPanel) - { - pnl = newPanel; - InitializeComponent(); - } - - private Skinning.DesktopPanel pnl = null; - - private void setbgcolor(object sender, MouseEventArgs e) - { - if(e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Panel Background", pnl.BackgroundColor); - API.ColorPickerSession.FormClosing += (s, a) => - { - var c = API.GetLastColorFromSession(); - pnl.BackgroundColor = c; - pnl.BackgroundImage = null; - pnl.ImagePath = null; - }; - } - else if(e.Button == MouseButtons.Right) - { - API.CreateGraphicPickerSession("Panel Background", false); - API.GraphicPickerSession.FormClosing += (s, a) => - { - var img = API.GraphicPickerSession.IdleImage; - pnl.BackgroundImage = img; - }; - } - } - - private void txtheight_TextChanged(object sender, EventArgs e) - { - try - { - int height = Convert.ToInt32(txtheight.Text); - pnl.Height = height; - } - catch - { - txtheight.Text = pnl.Height.ToString(); - } - } - - private void btndone_Click(object sender, EventArgs e) - { - API.CurrentSession.SetupDesktopPanel(); - Skinning.Utilities.saveskin(); - this.Close(); - } - - private void PanelManager_Load(object sender, EventArgs e) - { - pnlbgcolor.BackColor = pnl.BackgroundColor; - pnlbgcolor.BackgroundImage = pnl.BackgroundImage; - txtheight.Text = pnl.Height.ToString(); - } - } -} diff --git a/source/WindowsFormsApplication1/PanelManager.resx b/source/WindowsFormsApplication1/PanelManager.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/PanelManager.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Paths.cs b/source/WindowsFormsApplication1/Paths.cs deleted file mode 100644 index 32e8c3a..0000000 --- a/source/WindowsFormsApplication1/Paths.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.IO; -using System.Windows.Forms; - -namespace ShiftOS -{ - /// <summary> - /// ShiftOS Path Variables. - /// - /// This class is cross-platform enabled, and will adapt to the currently running OS. - /// </summary> - public class Paths - { - public OSInfo oi = new OSInfo(); - - public static string SaveRoot; - public static string Home; - public static string Desktop; - public static string Documents; - public static string Music; - public static string Pictures; - public static string Skins; - public static string Videos; - public static string SystemDir; - public static string AutoStart; - public static string APIs; - public static string SkinDir; - public static string LoadedSkin; - public static string Icons; - public static string ToBeLoaded; - public static string Drivers; - public static string SaveFile; - public static string Bitnote; - public static string Applications; - public static string PackageManager; - public static string Shiftnet; - public static string SoftwareData; - public static string KnowledgeInput; - - //Mod Directories - public static string Mod_Temp; - public static string Mod_AppLauncherEntries; - public static string Desktop_Icons; - public static string WidgetFiles; - - /// <summary> - /// Registers path variables. - /// </summary> - public static void RegisterPaths() - { - switch (OSInfo.GetPlatformID()) { - case "microsoft": - var windir = Environment.GetFolderPath(Environment.SpecialFolder.Windows); - var splitter = windir.Split('\\'); - var driveletter = splitter[0]; - SaveRoot = $"{driveletter}\\ShiftOS"; - Home = SaveRoot + "\\Home\\"; - Desktop = Home + "Desktop\\"; - Documents = Home + "Documents\\"; - Music = Home + "Music\\"; - Pictures = Home + "Pictures\\"; - Skins = Home + "Skins\\"; - Videos = Home + "Videos\\"; - SystemDir = SaveRoot + "\\Shiftum42\\"; - SkinDir = SystemDir + "SkinData\\"; - LoadedSkin = SkinDir + "Loaded\\"; - ToBeLoaded = SkinDir + "Preview\\"; - Drivers = SystemDir + "Drivers\\"; - SaveFile = Drivers + "HDD.dri"; - SoftwareData = SaveRoot + "\\SoftwareData"; - KnowledgeInput = SoftwareData + "\\_knowledgeinput\\"; - Applications = SystemDir + "Apps\\"; - PackageManager = Applications + "Package Manager\\"; - Shiftnet = Applications + "Shiftnet\\"; - Mod_AppLauncherEntries = SystemDir + "_applauncher\\"; - Mod_Temp = SystemDir + "_temp\\"; - AutoStart = SystemDir + "AutoStart\\"; - Bitnote = Drivers + "BNWallet.dri"; - Icons = LoadedSkin + "Icons\\"; - WidgetFiles = SystemDir + "Widgets\\"; - APIs = SystemDir + "APIs\\"; - break; - default: - SaveRoot = OSInfo.homePath () + "/.local/lib/.shiftos"; - Home = SaveRoot + "/Home/"; - Desktop = Home + "Desktop/"; - Documents = Home + "Documents/"; - Music = Home + "Music/"; - Pictures = Home + "Pictures/"; - Skins = Home + "Skins/"; - Videos = Home + "Videos/"; - SystemDir = SaveRoot + "/Shiftum42/"; - SkinDir = SystemDir + "SkinData/"; - LoadedSkin = SkinDir + "Loaded/"; - ToBeLoaded = SkinDir + "Preview/"; - Drivers = SystemDir + "Drivers/"; - SaveFile = Drivers + "HDD.dri"; - SoftwareData = SaveRoot + "/SoftwareData"; - KnowledgeInput = SoftwareData + "/_knowledgeinput/"; - Applications = SystemDir + "/Apps/"; - PackageManager = Applications + "Package Manager/"; - Shiftnet = Applications + "Shiftnet/"; - Mod_AppLauncherEntries = SystemDir + "_applauncher/"; - Mod_Temp = SystemDir + "_temp/"; - AutoStart = SystemDir + "AutoStart/"; - Bitnote = Drivers + "BNWallet.dri"; - Icons = LoadedSkin + "Icons/"; - WidgetFiles = SystemDir + "Widgets/"; - APIs = SystemDir + "APIs/"; - break; - } - - } - - /// <summary> - /// Writes the barebones ShiftOS file system; skipping folders like the Desktop, which will appear as the user upgrades the OS. - /// </summary> - public static void WriteFileSystem() { - WriteDirectory (SaveRoot); - WriteDirectory (Home); - WriteDirectory (Documents); - WriteDirectory (SystemDir); - WriteDirectory (SkinDir); - WriteDirectory (LoadedSkin); - WriteDirectory (ToBeLoaded); - WriteDirectory(Drivers); - } - - /// <summary> - /// Create a directory - /// </summary> - /// <param name="dir">New DIR.</param> - public static void WriteDirectory(string dir) { - if(!Directory.Exists(dir)) { - Console.WriteLine ("[FS] Creating directory '{0}'", dir); - Directory.CreateDirectory (dir); - } else { - Console.WriteLine ("[FS] That directory at {0} exists.", dir); - } - } - - } -} - diff --git a/source/WindowsFormsApplication1/Pong.Designer.cs b/source/WindowsFormsApplication1/Pong.Designer.cs deleted file mode 100644 index d7d7bdb..0000000 --- a/source/WindowsFormsApplication1/Pong.Designer.cs +++ /dev/null @@ -1,588 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace ShiftOS -{ - partial class Pong - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Pong)); - this.pgcontents = new System.Windows.Forms.Panel(); - this.pnlgamestats = new System.Windows.Forms.Panel(); - this.lblnextstats = new System.Windows.Forms.Label(); - this.Label7 = new System.Windows.Forms.Label(); - this.lblpreviousstats = new System.Windows.Forms.Label(); - this.Label4 = new System.Windows.Forms.Label(); - this.btnplayon = new System.Windows.Forms.Button(); - this.Label3 = new System.Windows.Forms.Label(); - this.btncashout = new System.Windows.Forms.Button(); - this.Label2 = new System.Windows.Forms.Label(); - this.lbllevelreached = new System.Windows.Forms.Label(); - this.pnllose = new System.Windows.Forms.Panel(); - this.lblmissedout = new System.Windows.Forms.Label(); - this.btnlosetryagain = new System.Windows.Forms.Button(); - this.Label5 = new System.Windows.Forms.Label(); - this.Label1 = new System.Windows.Forms.Label(); - this.pnlintro = new System.Windows.Forms.Panel(); - this.Label6 = new System.Windows.Forms.Label(); - this.btnstartgame = new System.Windows.Forms.Button(); - this.Label8 = new System.Windows.Forms.Label(); - this.pnlfinalstats = new System.Windows.Forms.Panel(); - this.btnplayagain = new System.Windows.Forms.Button(); - this.lblfinalcodepoints = new System.Windows.Forms.Label(); - this.Label11 = new System.Windows.Forms.Label(); - this.lblfinalcomputerreward = new System.Windows.Forms.Label(); - this.Label9 = new System.Windows.Forms.Label(); - this.lblfinallevelreward = new System.Windows.Forms.Label(); - this.lblfinallevelreached = new System.Windows.Forms.Label(); - this.lblfinalcodepointswithtext = new System.Windows.Forms.Label(); - this.lblbeatai = new System.Windows.Forms.Label(); - this.lblcountdown = new System.Windows.Forms.Label(); - this.ball = new System.Windows.Forms.Panel(); - this.paddleHuman = new System.Windows.Forms.PictureBox(); - this.paddleComputer = new System.Windows.Forms.Panel(); - this.lbllevelandtime = new System.Windows.Forms.Label(); - this.lblstatscodepoints = new System.Windows.Forms.Label(); - this.lblstatsY = new System.Windows.Forms.Label(); - this.lblstatsX = new System.Windows.Forms.Label(); - this.gameTimer = new System.Windows.Forms.Timer(this.components); - this.counter = new System.Windows.Forms.Timer(this.components); - this.tmrcountdown = new System.Windows.Forms.Timer(this.components); - this.tmrstoryline = new System.Windows.Forms.Timer(this.components); - this.pgcontents.SuspendLayout(); - this.pnlgamestats.SuspendLayout(); - this.pnllose.SuspendLayout(); - this.pnlintro.SuspendLayout(); - this.pnlfinalstats.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).BeginInit(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.pnlgamestats); - this.pgcontents.Controls.Add(this.pnllose); - this.pgcontents.Controls.Add(this.pnlintro); - this.pgcontents.Controls.Add(this.pnlfinalstats); - this.pgcontents.Controls.Add(this.lblbeatai); - this.pgcontents.Controls.Add(this.lblcountdown); - this.pgcontents.Controls.Add(this.ball); - this.pgcontents.Controls.Add(this.paddleHuman); - this.pgcontents.Controls.Add(this.paddleComputer); - this.pgcontents.Controls.Add(this.lbllevelandtime); - this.pgcontents.Controls.Add(this.lblstatscodepoints); - this.pgcontents.Controls.Add(this.lblstatsY); - this.pgcontents.Controls.Add(this.lblstatsX); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(700, 400); - this.pgcontents.TabIndex = 20; - this.pgcontents.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); - // - // pnlgamestats - // - this.pnlgamestats.Controls.Add(this.lblnextstats); - this.pnlgamestats.Controls.Add(this.Label7); - this.pnlgamestats.Controls.Add(this.lblpreviousstats); - this.pnlgamestats.Controls.Add(this.Label4); - this.pnlgamestats.Controls.Add(this.btnplayon); - this.pnlgamestats.Controls.Add(this.Label3); - this.pnlgamestats.Controls.Add(this.btncashout); - this.pnlgamestats.Controls.Add(this.Label2); - this.pnlgamestats.Controls.Add(this.lbllevelreached); - this.pnlgamestats.Location = new System.Drawing.Point(56, 76); - this.pnlgamestats.Name = "pnlgamestats"; - this.pnlgamestats.Size = new System.Drawing.Size(466, 206); - this.pnlgamestats.TabIndex = 6; - this.pnlgamestats.Visible = false; - // - // lblnextstats - // - this.lblnextstats.AutoSize = true; - this.lblnextstats.Location = new System.Drawing.Point(278, 136); - this.lblnextstats.Name = "lblnextstats"; - this.lblnextstats.Size = new System.Drawing.Size(0, 13); - this.lblnextstats.TabIndex = 8; - // - // Label7 - // - this.Label7.AutoSize = true; - this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label7.Location = new System.Drawing.Point(278, 119); - this.Label7.Name = "Label7"; - this.Label7.Size = new System.Drawing.Size(124, 16); - this.Label7.TabIndex = 7; - this.Label7.Text = "Next Level Stats:"; - // - // lblpreviousstats - // - this.lblpreviousstats.AutoSize = true; - this.lblpreviousstats.Location = new System.Drawing.Point(278, 54); - this.lblpreviousstats.Name = "lblpreviousstats"; - this.lblpreviousstats.Size = new System.Drawing.Size(0, 13); - this.lblpreviousstats.TabIndex = 6; - // - // Label4 - // - this.Label4.AutoSize = true; - this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label4.Location = new System.Drawing.Point(278, 37); - this.Label4.Name = "Label4"; - this.Label4.Size = new System.Drawing.Size(154, 16); - this.Label4.TabIndex = 5; - this.Label4.Text = "Previous Level Stats:"; - // - // btnplayon - // - this.btnplayon.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnplayon.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnplayon.Location = new System.Drawing.Point(32, 162); - this.btnplayon.Name = "btnplayon"; - this.btnplayon.Size = new System.Drawing.Size(191, 35); - this.btnplayon.TabIndex = 4; - this.btnplayon.Text = "Play on for 3 codepoints!"; - this.btnplayon.UseVisualStyleBackColor = true; - this.btnplayon.Click += new System.EventHandler(this.btnplayon_Click); - // - // Label3 - // - this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label3.Location = new System.Drawing.Point(8, 126); - this.Label3.Name = "Label3"; - this.Label3.Size = new System.Drawing.Size(245, 33); - this.Label3.TabIndex = 3; - this.Label3.Text = "Or do you want to try your luck on the next level to increase your reward?"; - this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btncashout - // - this.btncashout.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btncashout.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btncashout.Location = new System.Drawing.Point(32, 73); - this.btncashout.Name = "btncashout"; - this.btncashout.Size = new System.Drawing.Size(191, 35); - this.btncashout.TabIndex = 2; - this.btncashout.Text = "Cash out with 1 codepoint!"; - this.btncashout.UseVisualStyleBackColor = true; - this.btncashout.Click += new System.EventHandler(this.btncashout_Click); - // - // Label2 - // - this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label2.Location = new System.Drawing.Point(8, 37); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(245, 33); - this.Label2.TabIndex = 1; - this.Label2.Text = "Would you like the end the game now and cash out with your reward?"; - this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lbllevelreached - // - this.lbllevelreached.AutoSize = true; - this.lbllevelreached.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbllevelreached.Location = new System.Drawing.Point(149, 6); - this.lbllevelreached.Name = "lbllevelreached"; - this.lbllevelreached.Size = new System.Drawing.Size(185, 20); - this.lbllevelreached.TabIndex = 0; - this.lbllevelreached.Text = "You Reached Level 2!"; - // - // pnllose - // - this.pnllose.Controls.Add(this.lblmissedout); - this.pnllose.Controls.Add(this.btnlosetryagain); - this.pnllose.Controls.Add(this.Label5); - this.pnllose.Controls.Add(this.Label1); - this.pnllose.Location = new System.Drawing.Point(209, 71); - this.pnllose.Name = "pnllose"; - this.pnllose.Size = new System.Drawing.Size(266, 214); - this.pnllose.TabIndex = 10; - this.pnllose.Visible = false; - // - // lblmissedout - // - this.lblmissedout.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblmissedout.Location = new System.Drawing.Point(3, 175); - this.lblmissedout.Name = "lblmissedout"; - this.lblmissedout.Size = new System.Drawing.Size(146, 35); - this.lblmissedout.TabIndex = 3; - this.lblmissedout.Text = "You Missed Out On: 500 Codepoints"; - this.lblmissedout.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnlosetryagain - // - this.btnlosetryagain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnlosetryagain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnlosetryagain.Location = new System.Drawing.Point(155, 176); - this.btnlosetryagain.Name = "btnlosetryagain"; - this.btnlosetryagain.Size = new System.Drawing.Size(106, 35); - this.btnlosetryagain.TabIndex = 2; - this.btnlosetryagain.Text = "Try Again"; - this.btnlosetryagain.UseVisualStyleBackColor = true; - this.btnlosetryagain.Click += new System.EventHandler(this.btnlosetryagain_Click); - // - // Label5 - // - this.Label5.Location = new System.Drawing.Point(7, 26); - this.Label5.Name = "Label5"; - this.Label5.Size = new System.Drawing.Size(260, 163); - this.Label5.TabIndex = 1; - // - // Label1 - // - this.Label1.Dock = System.Windows.Forms.DockStyle.Top; - this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.Location = new System.Drawing.Point(0, 0); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(266, 16); - this.Label1.TabIndex = 0; - this.Label1.Text = "You lose!"; - this.Label1.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pnlintro - // - this.pnlintro.Controls.Add(this.Label6); - this.pnlintro.Controls.Add(this.btnstartgame); - this.pnlintro.Controls.Add(this.Label8); - this.pnlintro.Location = new System.Drawing.Point(52, 29); - this.pnlintro.Name = "pnlintro"; - this.pnlintro.Size = new System.Drawing.Size(595, 303); - this.pnlintro.TabIndex = 13; - // - // Label6 - // - this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label6.Location = new System.Drawing.Point(3, 39); - this.Label6.Name = "Label6"; - this.Label6.Size = new System.Drawing.Size(589, 227); - this.Label6.TabIndex = 15; - this.Label6.Text = resources.GetString("Label6.Text"); - this.Label6.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // btnstartgame - // - this.btnstartgame.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnstartgame.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnstartgame.Location = new System.Drawing.Point(186, 273); - this.btnstartgame.Name = "btnstartgame"; - this.btnstartgame.Size = new System.Drawing.Size(242, 28); - this.btnstartgame.TabIndex = 15; - this.btnstartgame.Text = "Click this button to play pong!"; - this.btnstartgame.UseVisualStyleBackColor = true; - this.btnstartgame.Click += new System.EventHandler(this.btnstartgame_Click); - // - // Label8 - // - this.Label8.AutoSize = true; - this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label8.ForeColor = System.Drawing.Color.Black; - this.Label8.Location = new System.Drawing.Point(179, 5); - this.Label8.Name = "Label8"; - this.Label8.Size = new System.Drawing.Size(250, 31); - this.Label8.TabIndex = 14; - this.Label8.Text = "Welcome to Pong!"; - // - // pnlfinalstats - // - this.pnlfinalstats.Controls.Add(this.btnplayagain); - this.pnlfinalstats.Controls.Add(this.lblfinalcodepoints); - this.pnlfinalstats.Controls.Add(this.Label11); - this.pnlfinalstats.Controls.Add(this.lblfinalcomputerreward); - this.pnlfinalstats.Controls.Add(this.Label9); - this.pnlfinalstats.Controls.Add(this.lblfinallevelreward); - this.pnlfinalstats.Controls.Add(this.lblfinallevelreached); - this.pnlfinalstats.Controls.Add(this.lblfinalcodepointswithtext); - this.pnlfinalstats.Location = new System.Drawing.Point(172, 74); - this.pnlfinalstats.Name = "pnlfinalstats"; - this.pnlfinalstats.Size = new System.Drawing.Size(362, 226); - this.pnlfinalstats.TabIndex = 9; - this.pnlfinalstats.Visible = false; - // - // btnplayagain - // - this.btnplayagain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnplayagain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnplayagain.Location = new System.Drawing.Point(5, 194); - this.btnplayagain.Name = "btnplayagain"; - this.btnplayagain.Size = new System.Drawing.Size(352, 29); - this.btnplayagain.TabIndex = 16; - this.btnplayagain.Text = "Click this button to play again!"; - this.btnplayagain.UseVisualStyleBackColor = true; - this.btnplayagain.Click += new System.EventHandler(this.btnplayagain_Click); - // - // lblfinalcodepoints - // - this.lblfinalcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblfinalcodepoints.Location = new System.Drawing.Point(3, 124); - this.lblfinalcodepoints.Name = "lblfinalcodepoints"; - this.lblfinalcodepoints.Size = new System.Drawing.Size(356, 73); - this.lblfinalcodepoints.TabIndex = 15; - this.lblfinalcodepoints.Text = "134 CP"; - this.lblfinalcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label11 - // - this.Label11.AutoSize = true; - this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label11.Location = new System.Drawing.Point(162, 82); - this.Label11.Name = "Label11"; - this.Label11.Size = new System.Drawing.Size(33, 33); - this.Label11.TabIndex = 14; - this.Label11.Text = "+"; - this.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblfinalcomputerreward - // - this.lblfinalcomputerreward.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblfinalcomputerreward.Location = new System.Drawing.Point(193, 72); - this.lblfinalcomputerreward.Name = "lblfinalcomputerreward"; - this.lblfinalcomputerreward.Size = new System.Drawing.Size(151, 52); - this.lblfinalcomputerreward.TabIndex = 12; - this.lblfinalcomputerreward.Text = "34"; - this.lblfinalcomputerreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label9 - // - this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label9.Location = new System.Drawing.Point(179, 31); - this.Label9.Name = "Label9"; - this.Label9.Size = new System.Drawing.Size(180, 49); - this.Label9.TabIndex = 11; - this.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblfinallevelreward - // - this.lblfinallevelreward.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblfinallevelreward.Location = new System.Drawing.Point(12, 72); - this.lblfinallevelreward.Name = "lblfinallevelreward"; - this.lblfinallevelreward.Size = new System.Drawing.Size(151, 52); - this.lblfinallevelreward.TabIndex = 10; - this.lblfinallevelreward.Text = "100"; - this.lblfinallevelreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblfinallevelreached - // - this.lblfinallevelreached.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblfinallevelreached.Location = new System.Drawing.Point(3, 31); - this.lblfinallevelreached.Name = "lblfinallevelreached"; - this.lblfinallevelreached.Size = new System.Drawing.Size(170, 49); - this.lblfinallevelreached.TabIndex = 9; - this.lblfinallevelreached.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblfinalcodepointswithtext - // - this.lblfinalcodepointswithtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblfinalcodepointswithtext.Location = new System.Drawing.Point(3, 2); - this.lblfinalcodepointswithtext.Name = "lblfinalcodepointswithtext"; - this.lblfinalcodepointswithtext.Size = new System.Drawing.Size(356, 26); - this.lblfinalcodepointswithtext.TabIndex = 1; - this.lblfinalcodepointswithtext.Text = "You cashed out with 134 codepoints!"; - this.lblfinalcodepointswithtext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblbeatai - // - this.lblbeatai.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblbeatai.Location = new System.Drawing.Point(47, 41); - this.lblbeatai.Name = "lblbeatai"; - this.lblbeatai.Size = new System.Drawing.Size(600, 30); - this.lblbeatai.TabIndex = 8; - this.lblbeatai.Text = "You got 2 codepoints for beating the Computer!"; - this.lblbeatai.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.lblbeatai.Visible = false; - // - // lblcountdown - // - this.lblcountdown.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblcountdown.Location = new System.Drawing.Point(182, 152); - this.lblcountdown.Name = "lblcountdown"; - this.lblcountdown.Size = new System.Drawing.Size(315, 49); - this.lblcountdown.TabIndex = 7; - this.lblcountdown.Text = "3"; - this.lblcountdown.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.lblcountdown.Visible = false; - // - // ball - // - this.ball.BackColor = System.Drawing.Color.Black; - this.ball.Location = new System.Drawing.Point(300, 152); - this.ball.Name = "ball"; - this.ball.Size = new System.Drawing.Size(20, 20); - this.ball.TabIndex = 2; - // - // paddleHuman - // - this.paddleHuman.BackColor = System.Drawing.Color.Black; - this.paddleHuman.Location = new System.Drawing.Point(10, 134); - this.paddleHuman.Name = "paddleHuman"; - this.paddleHuman.Size = new System.Drawing.Size(20, 100); - this.paddleHuman.TabIndex = 3; - this.paddleHuman.TabStop = false; - // - // paddleComputer - // - this.paddleComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.paddleComputer.BackColor = System.Drawing.Color.Black; - this.paddleComputer.Location = new System.Drawing.Point(666, 134); - this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 100); - this.paddleComputer.Name = "paddleComputer"; - this.paddleComputer.Size = new System.Drawing.Size(20, 100); - this.paddleComputer.TabIndex = 1; - // - // lbllevelandtime - // - this.lbllevelandtime.Dock = System.Windows.Forms.DockStyle.Top; - this.lbllevelandtime.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbllevelandtime.Location = new System.Drawing.Point(0, 0); - this.lbllevelandtime.Name = "lbllevelandtime"; - this.lbllevelandtime.Size = new System.Drawing.Size(700, 22); - this.lbllevelandtime.TabIndex = 4; - this.lbllevelandtime.Text = "Level: 1 - 58 Seconds Left"; - this.lbllevelandtime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblstatscodepoints - // - this.lblstatscodepoints.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblstatscodepoints.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblstatscodepoints.Location = new System.Drawing.Point(239, 356); - this.lblstatscodepoints.Name = "lblstatscodepoints"; - this.lblstatscodepoints.Size = new System.Drawing.Size(219, 35); - this.lblstatscodepoints.TabIndex = 12; - this.lblstatscodepoints.Text = "Codepoints: "; - this.lblstatscodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblstatsY - // - this.lblstatsY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.lblstatsY.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblstatsY.Location = new System.Drawing.Point(542, 356); - this.lblstatsY.Name = "lblstatsY"; - this.lblstatsY.Size = new System.Drawing.Size(144, 35); - this.lblstatsY.TabIndex = 11; - this.lblstatsY.Text = "Yspeed:"; - this.lblstatsY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblstatsX - // - this.lblstatsX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lblstatsX.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblstatsX.Location = new System.Drawing.Point(3, 356); - this.lblstatsX.Name = "lblstatsX"; - this.lblstatsX.Size = new System.Drawing.Size(144, 35); - this.lblstatsX.TabIndex = 5; - this.lblstatsX.Text = "Xspeed: "; - this.lblstatsX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // gameTimer - // - this.gameTimer.Interval = 30; - this.gameTimer.Tick += new System.EventHandler(this.gameTimer_Tick); - // - // counter - // - this.counter.Interval = 1000; - this.counter.Tick += new System.EventHandler(this.counter_Tick); - // - // tmrcountdown - // - this.tmrcountdown.Interval = 1000; - this.tmrcountdown.Tick += new System.EventHandler(this.countdown_Tick); - // - // tmrstoryline - // - this.tmrstoryline.Interval = 1000; - this.tmrstoryline.Tick += new System.EventHandler(this.tmrstoryline_Tick); - // - // Pong - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(700, 400); - this.Controls.Add(this.pgcontents); - this.DoubleBuffered = true; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "Pong"; - this.Text = "Pong"; - this.TopMost = true; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.me_closing); - this.Load += new System.EventHandler(this.Pong_Load); - this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); - this.pgcontents.ResumeLayout(false); - this.pnlgamestats.ResumeLayout(false); - this.pnlgamestats.PerformLayout(); - this.pnllose.ResumeLayout(false); - this.pnlintro.ResumeLayout(false); - this.pnlintro.PerformLayout(); - this.pnlfinalstats.ResumeLayout(false); - this.pnlfinalstats.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Panel ball; - internal System.Windows.Forms.Panel paddleComputer; - internal System.Windows.Forms.Timer gameTimer; - internal System.Windows.Forms.PictureBox paddleHuman; - internal System.Windows.Forms.Label lbllevelandtime; - internal System.Windows.Forms.Label lblstatsX; - internal System.Windows.Forms.Timer counter; - internal System.Windows.Forms.Panel pnlgamestats; - internal System.Windows.Forms.Label lblnextstats; - internal System.Windows.Forms.Label Label7; - internal System.Windows.Forms.Label lblpreviousstats; - internal System.Windows.Forms.Label Label4; - internal System.Windows.Forms.Button btnplayon; - internal System.Windows.Forms.Label Label3; - internal System.Windows.Forms.Button btncashout; - internal System.Windows.Forms.Label Label2; - internal System.Windows.Forms.Label lbllevelreached; - internal System.Windows.Forms.Label lblcountdown; - internal System.Windows.Forms.Timer tmrcountdown; - internal System.Windows.Forms.Label lblbeatai; - internal System.Windows.Forms.Panel pnlfinalstats; - internal System.Windows.Forms.Button btnplayagain; - internal System.Windows.Forms.Label lblfinalcodepoints; - internal System.Windows.Forms.Label Label11; - internal System.Windows.Forms.Label lblfinalcomputerreward; - internal System.Windows.Forms.Label Label9; - internal System.Windows.Forms.Label lblfinallevelreward; - internal System.Windows.Forms.Label lblfinallevelreached; - internal System.Windows.Forms.Label lblfinalcodepointswithtext; - internal System.Windows.Forms.Panel pnllose; - internal System.Windows.Forms.Label lblmissedout; - internal System.Windows.Forms.Button btnlosetryagain; - internal System.Windows.Forms.Label Label5; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.Label lblstatscodepoints; - internal System.Windows.Forms.Label lblstatsY; - internal System.Windows.Forms.Panel pnlintro; - internal System.Windows.Forms.Label Label6; - internal System.Windows.Forms.Button btnstartgame; - internal System.Windows.Forms.Label Label8; - internal System.Windows.Forms.Timer tmrstoryline; - - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Pong.cs b/source/WindowsFormsApplication1/Pong.cs deleted file mode 100644 index c685100..0000000 --- a/source/WindowsFormsApplication1/Pong.cs +++ /dev/null @@ -1,481 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Pong : Form - { - int xVel = 7; - int yVel = 8; - int computerspeed = 8; - int level = 1; - int secondsleft = 60; - int casualposition; - double xveldec = 3.0; - double yveldec = 3.0; - double incrementx = 0.4; - double incrementy = 0.2; - int levelxspeed = 3; - int levelyspeed = 3; - int beatairewardtotal; - int beataireward = 1; - int[] levelrewards = new int[50]; - int totalreward; - int countdown = 3; - - public Pong() - { - InitializeComponent(); - } - - private void Pong_Load(object sender, EventArgs e) - { - setuplevelrewards(); - - if(API.Upgrades["customgrayshades"] == true && API.Upgrades["multitasking"] == true) - { - if(API.Upgrades["shiftnet"] == false) - { - tmrstoryline.Start(); - } - } - } - - // Move the paddle according to the mouse position. - private void pongMain_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) - { - paddleHuman.Location = new Point(paddleHuman.Location.X, (MousePosition.Y - this.Location.Y) - (paddleHuman.Height / 2)); - } - - - // ERROR: Handles clauses are not supported in C# - private void gameTimer_Tick(object sender, EventArgs e) - { - if (this.Left < Screen.PrimaryScreen.Bounds.Width) - { - if (this.Height != API.CurrentSkin.titlebarheight) - { - //Set the computer player to move according to the ball's position. - if (ball.Location.X > 500 - xVel * 10 && xVel > 0) - { - if (ball.Location.Y > paddleComputer.Location.Y + 50) - { - paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed); - } - if (ball.Location.Y < paddleComputer.Location.Y + 50) - { - paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed); - } - casualposition = rand.Next(-150, 201); - } - else { - //used to be me.location.y - if (paddleComputer.Location.Y > this.Size.Height / 2 - paddleComputer.Height + casualposition) - { - paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed); - } - //used to be me.location.y - if (paddleComputer.Location.Y < this.Size.Height / 2 - paddleComputer.Height + casualposition) - { - paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed); - } - } - - //Set Xvel and Yvel speeds from decimal - if (xVel > 0) - xVel = (int)Math.Round(xveldec); - if (xVel < 0) - xVel = (int)-Math.Round(xveldec); - if (yVel > 0) - yVel = (int)Math.Round(yveldec); - if (yVel < 0) - yVel = (int)-Math.Round(yveldec); - - // Move the game ball. - ball.Location = new Point(ball.Location.X + xVel, ball.Location.Y + yVel); - - // Check for top wall. - if (ball.Location.Y < 0) - { - ball.Location = new Point(ball.Location.X, 0); - yVel = -yVel; - } - - // Check for bottom wall. - if (ball.Location.Y > pgcontents.Height - ball.Height) - { - ball.Location = new Point(ball.Location.X, pgcontents.Height - ball.Size.Height); - yVel = -yVel; - } - - // Check for player paddle. - if (ball.Bounds.IntersectsWith(paddleHuman.Bounds)) - { - ball.Location = new Point(paddleHuman.Location.X + ball.Size.Width, ball.Location.Y); - //randomly increase x or y speed of ball - switch (rand.Next(1, 3)) - { - case 1: - xveldec = xveldec + incrementx; - break; - case 2: - if (yveldec > 0) - yveldec = yveldec + incrementy; - if (yveldec < 0) - yveldec = yveldec - incrementy; - break; - } - xVel = -xVel; - API.PlaySound(Properties.Resources.typesound); - } - - // Check for computer paddle. - if (ball.Bounds.IntersectsWith(paddleComputer.Bounds)) - { - ball.Location = new Point(paddleComputer.Location.X - paddleComputer.Size.Width + 1, ball.Location.Y); - xveldec = xveldec + incrementx; - xVel = -xVel; - API.PlaySound(Properties.Resources.typesound); - } - - // Check for left wall. - if (ball.Location.X < -100) - { - ball.Location = new Point(this.Size.Width / 2 + 200, this.Size.Height / 2); - paddleComputer.Location = new Point(paddleComputer.Location.X, ball.Location.Y); - if (xVel > 0) - xVel = -xVel; - pnllose.Show(); - gameTimer.Stop(); - counter.Stop(); - lblmissedout.Text = "You Missed Out On:" + Environment.NewLine + lblstatscodepoints.Text.Replace("Codepoints earned: ", "") + " Codepoints"; - } - - // Check for right wall. - if (ball.Location.X > this.Width - ball.Size.Width - paddleComputer.Width + 100) - { - ball.Location = new Point(this.Size.Width / 2 + 200, this.Size.Height / 2); - paddleComputer.Location = new Point(paddleComputer.Location.X, ball.Location.Y); - if (xVel > 0) - xVel = -xVel; - beatairewardtotal = beatairewardtotal + beataireward; - lblbeatai.Show(); - lblbeatai.Text = "You got " + beataireward + " codepoints for beating the Computer!"; - tmrcountdown.Start(); - gameTimer.Stop(); - counter.Stop(); - } - - //lblstats.Text = "Xspeed: " & Math.Abs(xVel) & " Yspeed: " & Math.Abs(yVel) & " Human Location: " & paddleHuman.Location.ToString & " Computer Location: " & paddleComputer.Location.ToString & Environment.NewLine & " Ball Location: " & ball.Location.ToString & " Xdec: " & xveldec & " Ydec: " & yveldec & " Xinc: " & incrementx & " Yinc: " & incrementy - lblstatsX.Text = "Xspeed: " + xveldec; - lblstatsY.Text = "Yspeed: " + yveldec; - lblstatscodepoints.Text = "Codepoints earned: " + (levelrewards[level - 1] + beatairewardtotal).ToString(); - - lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " Seconds Left"; - - if (xVel > 20 || xVel < -20) - { - paddleHuman.Width = Math.Abs(xVel); - paddleComputer.Width = Math.Abs(xVel); - } - else { - paddleHuman.Width = 20; - paddleComputer.Width = 20; - } - - computerspeed = Math.Abs(yVel); - - // pgcontents.Refresh() - // pgcontents.CreateGraphics.FillRectangle(Brushes.Black, ball.Location.X, ball.Location.Y, ball.Width, ball.Height) - } - } - } - - // ERROR: Handles clauses are not supported in C# - private void counter_Tick(object sender, EventArgs e) - { - if (this.Left < Screen.PrimaryScreen.Bounds.Width) - { - if (this.Height != API.CurrentSkin.titlebarheight) - { - secondsleft = secondsleft - 1; - if (secondsleft == -1) - { - secondsleft = 60; - level = level + 1; - generatenextlevel(); - pnlgamestats.Show(); - pnlgamestats.BringToFront(); - pnlgamestats.Location = new Point((pgcontents.Width / 2) - (pnlgamestats.Width / 2), (pgcontents.Height / 2) - (pnlgamestats.Height / 2)); - - counter.Stop(); - gameTimer.Stop(); - } - lblstatscodepoints.Text = "Codepoints earned: " + (levelrewards[level - 1] + beatairewardtotal).ToString(); - } - } - } - - // ERROR: Handles clauses are not supported in C# - private void btnplayon_Click(object sender, EventArgs e) - { - xveldec = levelxspeed; - yveldec = levelyspeed; - - secondsleft = 60; - - tmrcountdown.Start(); - lblbeatai.Text = "Get " + beataireward + " codepoints for beating the Computer!"; - pnlgamestats.Hide(); - lblbeatai.Show(); - ball.Location = new Point(paddleHuman.Location.X + paddleHuman.Width + 50, paddleHuman.Location.Y + paddleHuman.Height / 2); - if (xVel < 0) - xVel = Math.Abs(xVel); - lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " Seconds Left"; - } - - //Increase the ball speed stats for the next level - private void generatenextlevel() - { - lbllevelreached.Text = "You Reached Level " + level + "!"; - - lblpreviousstats.Text = "Initial Ball X Speed: " + levelxspeed + Environment.NewLine + "Initial Ball Y Speed: " + levelyspeed + Environment.NewLine + "Increment X Speed: " + incrementx + Environment.NewLine + "Increment Y Speed: " + incrementy; - - switch (rand.Next(1, 3)) - { - case 1: - levelxspeed = levelxspeed + 1; - break; - case 2: - levelxspeed = levelxspeed + 2; - break; - } - - switch (rand.Next(1, 3)) - { - case 1: - levelyspeed = levelyspeed + 1; - break; - case 2: - levelyspeed = levelyspeed + 2; - break; - } - - switch (rand.Next(1, 6)) - { - case 1: - incrementx = incrementx + 0.1; - break; - case 2: - incrementx = incrementx + 0.2; - break; - case 3: - incrementy = incrementy + 0.1; - break; - case 4: - incrementy = incrementy + 0.2; - break; - case 5: - incrementy = incrementy + 0.3; - break; - } - - lblnextstats.Text = "Initial Ball X Speed: " + levelxspeed + Environment.NewLine + "Initial Ball Y Speed: " + levelyspeed + Environment.NewLine + "Increment X Speed: " + incrementx + Environment.NewLine + "Increment Y Speed: " + incrementy; - - if (level < 15) - { - beataireward = level * 2; - } - else { - double br = levelrewards[level - 1] / 10; - beataireward = (int)Math.Round(br); - } - - totalreward = levelrewards[level - 1] + beatairewardtotal; - - btncashout.Text = "Cash out with " + totalreward.ToString() + " codepoints!"; - btnplayon.Text = "Play on for " + (levelrewards[level] + beatairewardtotal).ToString() + " codepoints!"; - } - - private void setuplevelrewards() - { - levelrewards[0] = 0; - levelrewards[1] = 1; - levelrewards[2] = 3; - levelrewards[3] = 7; - levelrewards[4] = 13; - levelrewards[5] = 20; - levelrewards[6] = 30; - levelrewards[7] = 45; - levelrewards[8] = 60; - levelrewards[9] = 80; - levelrewards[10] = 100; - levelrewards[11] = 125; - levelrewards[12] = 150; - levelrewards[13] = 200; - levelrewards[14] = 250; - levelrewards[15] = 300; - levelrewards[16] = 400; - levelrewards[17] = 500; - levelrewards[18] = 650; - levelrewards[19] = 800; - levelrewards[20] = 1000; - levelrewards[21] = 1250; - levelrewards[22] = 1600; - levelrewards[23] = 2000; - levelrewards[24] = 2500; - levelrewards[25] = 3000; - levelrewards[26] = 3750; - levelrewards[27] = 4500; - levelrewards[28] = 5500; - levelrewards[29] = 7000; - levelrewards[30] = 9000; - levelrewards[31] = 11000; - levelrewards[32] = 13500; - levelrewards[33] = 16000; - levelrewards[34] = 20000; - levelrewards[35] = 25000; - levelrewards[36] = 32000; - levelrewards[37] = 40000; - levelrewards[38] = 50000; - levelrewards[39] = 75000; - levelrewards[40] = 100000; - } - - // ERROR: Handles clauses are not supported in C# - private void countdown_Tick(object sender, EventArgs e) - { - if (this.Left < Screen.PrimaryScreen.Bounds.Width) - { - if (this.Height != API.CurrentSkin.titlebarheight) - { - switch (countdown) - { - case 0: - countdown = 3; - lblcountdown.Hide(); - lblbeatai.Hide(); - API.PlaySound(Properties.Resources.writesound); - gameTimer.Start(); - counter.Start(); - tmrcountdown.Stop(); - break; - case 1: - lblcountdown.Text = "1"; - countdown = countdown - 1; - API.PlaySound(Properties.Resources.writesound); - break; - case 2: - lblcountdown.Text = "2"; - countdown = countdown - 1; - API.PlaySound(Properties.Resources.writesound); - break; - case 3: - lblcountdown.Text = "3"; - countdown = countdown - 1; - API.PlaySound(Properties.Resources.writesound); - lblcountdown.Show(); - break; - } - } - } - } - - // ERROR: Handles clauses are not supported in C# - private void btncashout_Click(object sender, EventArgs e) - { - pnlgamestats.Hide(); - pnlfinalstats.Show(); - lblfinalcodepointswithtext.Text = "You cashed out with " + totalreward + " codepoints!"; - lblfinallevelreached.Text = "Codepoints rewarded for reaching level " + (level - 1).ToString(); - lblfinallevelreward.Text = levelrewards[level - 1].ToString(); - lblfinalcomputerreward.Text = beatairewardtotal.ToString(); - lblfinalcodepoints.Text = totalreward + " CP"; - API.AddCodepoints(totalreward); - } - - private void newgame() - { - pnlfinalstats.Hide(); - pnllose.Hide(); - pnlintro.Hide(); - - level = 1; - totalreward = 0; - beataireward = 2; - beatairewardtotal = 0; - secondsleft = 60; - lblstatscodepoints.Text = "Codepoints: "; - //reset stats text - lblstatsX.Text = "Xspeed: "; - lblstatsY.Text = "Yspeed: "; - - levelxspeed = 3; - levelyspeed = 3; - - incrementx = 0.4; - incrementy = 0.2; - - xveldec = levelxspeed; - yveldec = levelyspeed; - - tmrcountdown.Start(); - lblbeatai.Text = "Get " + beataireward + " codepoints for beating the Computer!"; - pnlgamestats.Hide(); - lblbeatai.Show(); - ball.Location = new Point(paddleHuman.Location.X + paddleHuman.Width + 50, paddleHuman.Location.Y + paddleHuman.Height / 2); - if (xVel < 0) - xVel = Math.Abs(xVel); - lbllevelandtime.Text = "Level: " + level + " - " + secondsleft + " Seconds Left"; - } - - // ERROR: Handles clauses are not supported in C# - private void btnplayagain_Click(object sender, EventArgs e) - { - newgame(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnlosetryagain_Click(object sender, EventArgs e) - { - newgame(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnstartgame_Click(object sender, EventArgs e) - { - newgame(); - } - - Random rand = new Random(); - // ERROR: Handles clauses are not supported in C# - private void tmrstoryline_Tick(object sender, EventArgs e) - { - // Random chance of showing getshiftnet storyline - int i = rand.Next(0, 100); - - if (i >= 25 && i <= 50) - { - Terminal term = new Terminal(); - API.CreateForm(term, "Terminal", Properties.Resources.iconTerminal); - term.StartShiftnetStory(); - tmrstoryline.Stop(); - } - - } - - // ERROR: Handles clauses are not supported in C# - private void me_closing(object sender, FormClosingEventArgs e) - { - tmrstoryline.Stop(); - } - } -} diff --git a/source/WindowsFormsApplication1/Pong.resx b/source/WindowsFormsApplication1/Pong.resx deleted file mode 100644 index cedb787..0000000 --- a/source/WindowsFormsApplication1/Pong.resx +++ /dev/null @@ -1,143 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="Label6.Text" xml:space="preserve"> - <value>Pong is a classic arcade game from the late 20th century, ported over to ShiftOS. - -In Pong, two players move a paddle up and down to keep the ball from hitting their edge of the screen. If the ball hits a player's side of the screen, the other player gains a point. - -In ShiftOS, the second player is controlled by the computer. You can earn Codepoints by making him miss the ball. If you miss the ball, it's game over, and you don't gain any Codepoints. - -Each level is 60 seconds long, and the game gets progressively harder. At the end of each level, you can either decide to cash out your Codepoints and start over at Level 1, or you can proceed up a level and gain even more CP. - -Be careful, because missing the ball will reset you back to Level 1 and you will not be able to cash out your Codepoints!</value> - </data> - <metadata name="gameTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="counter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>130, 17</value> - </metadata> - <metadata name="tmrcountdown.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>223, 17</value> - </metadata> - <metadata name="tmrstoryline.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>355, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ProgressBarEX.Designer.cs b/source/WindowsFormsApplication1/ProgressBarEX.Designer.cs deleted file mode 100644 index 219fb73..0000000 --- a/source/WindowsFormsApplication1/ProgressBarEX.Designer.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace ShiftOS -{ - partial class ProgressBarEX - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // ProgressBarEX - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Name = "ProgressBarEX"; - this.Size = new System.Drawing.Size(340, 32); - this.ResumeLayout(false); - - } - } -} diff --git a/source/WindowsFormsApplication1/ProgressBarEX.cs b/source/WindowsFormsApplication1/ProgressBarEX.cs deleted file mode 100644 index 0e64aad..0000000 --- a/source/WindowsFormsApplication1/ProgressBarEX.cs +++ /dev/null @@ -1,340 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class ProgressBarEX : UserControl - { - public ProgressBarEX() - { - InitializeComponent(); - } - - #region " Properties " - - private string _label = "Progress:"; - private bool show_label = false; - - public string Label - { - get - { - return _label; - } - set - { - _label = value; - this.Invalidate(); - } - } - - public bool ShowLabel - { - get - { - return show_label; - } - set - { - show_label = value; - this.Invalidate(); - } - } - - - private int _Value = 0; - public int Value - { - get { return _Value; } - set - { - if (value >= this.MinValue & value <= this.MaxValue) - { - _Value = value; - this.Invalidate(); - } - else { - throw new ArgumentOutOfRangeException("The value must be between the minimum and maximum values."); - } - } - } - - private int _Step = 10; - public int Step - { - get { return _Step; } - set { _Step = value; } - } - - private ProgressBarOrientation _Orientation; - public ProgressBarOrientation Orientation - { - get { return _Orientation; } - set { _Orientation = value; } - } - - private int _MinValue = 0; - public int MinValue - { - get { return _MinValue; } - set - { - if (value < this.MaxValue) - { - _MinValue = value; - } - else { - throw new ArgumentOutOfRangeException("The minimum value must be less than the maximum value."); - } - } - } - - private int _MaxValue = 100; - public int MaxValue - { - get { return _MaxValue; } - set - { - if (value > this.MinValue) - { - _MaxValue = value; - } - else { - throw new ArgumentOutOfRangeException("The maximum value must be more than the minimum value."); - } - } - } - - private Color _Color = Color.Lime; - public Color Color - { - get { return _Color; } - set { _Color = value; } - } - - private bool _ShowValue = true; - public bool ShowValue - { - get { return _ShowValue; } - set { _ShowValue = value; } - } - - private ProgressBarExStyle _Style; - public ProgressBarExStyle Style - { - get { return _Style; } - set { _Style = value; } - } - - private int _BlockWidth = 5; - public int BlockWidth - { - get { return _BlockWidth; } - set { _BlockWidth = value; } - } - - private int _BlockSeparation = 3; - public int BlockSeparation - { - get { return _BlockSeparation; } - set { _BlockSeparation = value; } - } - -#endregion - -#region " Enums, Variables " - - public enum ProgressBarOrientation - { - Horizontal = 0, - Vertical = 1 - } - - public enum ProgressBarExStyle - { - Blocks = 0, - Continuous = 1, - Marquee = 2 - } - -#endregion - -#region " Events " - - public event PaintBackgroundEventHandler PaintBackground; - public delegate void PaintBackgroundEventHandler(object sender, PaintEventArgs e); - public event PaintProcessEventHandler PaintProcess; - public delegate void PaintProcessEventHandler(object sender, ProgressBarProcessPaintEventArgs e); - - public class ProgressBarProcessPaintEventArgs : EventArgs - { - - public ProgressBarProcessPaintEventArgs(Rectangle bounds, Graphics g, Rectangle[] blocks = null) - { - _Bounds = bounds; - _Graphics = g; - if (blocks == null) - { - _Blocks = new Rectangle[] { - - }; - } - else { - _Blocks = blocks; - } - } - - private Rectangle _Bounds; - public Rectangle Bounds - { - get { return _Bounds; } - } - - private Rectangle[] _Blocks; - public Rectangle[] Blocks - { - get { return _Blocks; } - } - - private Graphics _Graphics; - public Graphics Graphics - { - get { return _Graphics; } - } - - } - -#endregion - -#region " Methods " - - public void PerformStep() - { - if (this.Step > 0) - { - this.Value = Math.Min(this.Value + this.Step, this.MaxValue); - } - else { - this.Value = Math.Max(this.Value + this.Step, this.MinValue); - } - } - - public void Increment(int value) - { - if (value > 0) - { - this.Value = Math.Min(this.Value + value, this.MaxValue); - } - else { - this.Value = Math.Max(this.Value + value, this.MinValue); - } - } - -#endregion - -#region " Process Logic " - - private Rectangle GetProcessRect() - { - int w = this.Width; - int h = this.Height; - int valRel = GetRelativeValue(); - return new Rectangle(0, 0, w * valRel / 100, h); - } - - private Rectangle[] GetBlocks() - { - List<Rectangle> b = new List<Rectangle>(); - - int w = this.BlockWidth; - int h = this.Height; - Rectangle r; - - int x = 0; - int stopX = (int)(GetRelativeValue() / 100) * this.Width; - while ((x + w <= stopX)) - { - r = new Rectangle(x, 0, w, h); - b.Add(r); - - x += this.BlockWidth + this.BlockSeparation; - } - - return b.ToArray(); - } - - private int GetRelativeValue() - { - return (int)100 * this.Value / (this.MaxValue - this.MinValue); - } - -#endregion - -#region " Drawing " - - protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) - { - base.OnPaint(e); - DoPaintBackground(e.Graphics); - DoPaintProcess(e.Graphics); - if (this.ShowValue) - DoPaintValue(e.Graphics); - } - - private void DoPaintBackground(Graphics g) - { - if (PaintBackground != null) - { - PaintBackground(this, new PaintEventArgs(g, this.ClientRectangle)); - } - } - - private void DoPaintProcess(Graphics g) - { - Rectangle rect = GetProcessRect(); - Rectangle[] blocks = GetBlocks(); - using (SolidBrush brush = new SolidBrush(this.Color)) - { - if (this.Style == ProgressBarExStyle.Continuous) - { - g.FillRectangle(brush, rect); - } - else if (this.Style == ProgressBarExStyle.Blocks) - { - foreach (Rectangle b in blocks) - { - g.FillRectangle(brush, b); - } - } - } - - ProgressBarProcessPaintEventArgs e = new ProgressBarProcessPaintEventArgs(rect, g, blocks); - if (PaintProcess != null) - { - PaintProcess(this, e); - } - } - - private void DoPaintValue(Graphics g) - { - string valStr = GetRelativeValue().ToString() + "%"; - if (show_label) - valStr = _label + " " + valStr; - - StringFormat sf = new StringFormat(); - sf.Alignment = StringAlignment.Center; - SizeF s = g.MeasureString(valStr, this.Font); - - g.DrawString(valStr, this.Font, new SolidBrush(this.ForeColor), (this.Width - s.Width) / 2, (this.Height - s.Height) / 2); - } - -#endregion - } -} diff --git a/source/WindowsFormsApplication1/ProgressBarEX.resx b/source/WindowsFormsApplication1/ProgressBarEX.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/ProgressBarEX.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/QuickChat.Designer.cs b/source/WindowsFormsApplication1/QuickChat.Designer.cs deleted file mode 100644 index 9399496..0000000 --- a/source/WindowsFormsApplication1/QuickChat.Designer.cs +++ /dev/null @@ -1,228 +0,0 @@ -namespace ShiftOS -{ - partial class QuickChat - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.panel1 = new System.Windows.Forms.Panel(); - this.pnlsetnick = new System.Windows.Forms.Panel(); - this.label2 = new System.Windows.Forms.Label(); - this.btnconnect = new System.Windows.Forms.Button(); - this.txtsetnick = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.txtmessages = new System.Windows.Forms.RichTextBox(); - this.pnlcontrols = new System.Windows.Forms.Panel(); - this.txtmessage = new System.Windows.Forms.TextBox(); - this.btnsend = new System.Windows.Forms.Button(); - this.lbnick = new System.Windows.Forms.Label(); - this.tmrimfuckinglucky = new System.Windows.Forms.Timer(this.components); - this.panel1.SuspendLayout(); - this.pnlsetnick.SuspendLayout(); - this.pnlcontrols.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.White; - this.panel1.Controls.Add(this.pnlsetnick); - this.panel1.Controls.Add(this.txtmessages); - this.panel1.Controls.Add(this.pnlcontrols); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(701, 414); - this.panel1.TabIndex = 0; - // - // pnlsetnick - // - this.pnlsetnick.Controls.Add(this.label2); - this.pnlsetnick.Controls.Add(this.btnconnect); - this.pnlsetnick.Controls.Add(this.txtsetnick); - this.pnlsetnick.Controls.Add(this.label1); - this.pnlsetnick.Location = new System.Drawing.Point(198, 88); - this.pnlsetnick.Name = "pnlsetnick"; - this.pnlsetnick.Size = new System.Drawing.Size(289, 184); - this.pnlsetnick.TabIndex = 2; - this.pnlsetnick.Visible = false; - // - // label2 - // - this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.25F); - this.label2.Location = new System.Drawing.Point(4, 38); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(282, 80); - this.label2.TabIndex = 3; - this.label2.Text = "QuickChat is the finest chat application for ShiftOS! All you have to do is enter" + - " your nickname in the field below and hit \"Connect!\""; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnconnect - // - this.btnconnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnconnect.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnconnect.Font = new System.Drawing.Font("Times New Roman", 10F); - this.btnconnect.Location = new System.Drawing.Point(196, 152); - this.btnconnect.Name = "btnconnect"; - this.btnconnect.Size = new System.Drawing.Size(90, 29); - this.btnconnect.TabIndex = 2; - this.btnconnect.Text = "Connect!"; - this.btnconnect.UseVisualStyleBackColor = true; - this.btnconnect.Click += new System.EventHandler(this.btnconnect_Click); - // - // txtsetnick - // - this.txtsetnick.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtsetnick.BackColor = System.Drawing.Color.Gray; - this.txtsetnick.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtsetnick.ForeColor = System.Drawing.Color.White; - this.txtsetnick.Location = new System.Drawing.Point(24, 121); - this.txtsetnick.Name = "txtsetnick"; - this.txtsetnick.Size = new System.Drawing.Size(239, 13); - this.txtsetnick.TabIndex = 1; - this.txtsetnick.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtsetnick_KeyDown); - // - // label1 - // - this.label1.Dock = System.Windows.Forms.DockStyle.Top; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.label1.Location = new System.Drawing.Point(0, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(289, 34); - this.label1.TabIndex = 0; - this.label1.Text = "Welcome to QuickChat!"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // txtmessages - // - this.txtmessages.BackColor = System.Drawing.Color.White; - this.txtmessages.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtmessages.DetectUrls = false; - this.txtmessages.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtmessages.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.txtmessages.ForeColor = System.Drawing.Color.Black; - this.txtmessages.Location = new System.Drawing.Point(0, 0); - this.txtmessages.Name = "txtmessages"; - this.txtmessages.ReadOnly = true; - this.txtmessages.Size = new System.Drawing.Size(701, 380); - this.txtmessages.TabIndex = 1; - this.txtmessages.Text = ""; - this.txtmessages.TextChanged += new System.EventHandler(this.txtmessages_TextChanged); - // - // pnlcontrols - // - this.pnlcontrols.BackColor = System.Drawing.Color.Gray; - this.pnlcontrols.Controls.Add(this.txtmessage); - this.pnlcontrols.Controls.Add(this.btnsend); - this.pnlcontrols.Controls.Add(this.lbnick); - this.pnlcontrols.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlcontrols.ForeColor = System.Drawing.Color.White; - this.pnlcontrols.Location = new System.Drawing.Point(0, 380); - this.pnlcontrols.Name = "pnlcontrols"; - this.pnlcontrols.Size = new System.Drawing.Size(701, 34); - this.pnlcontrols.TabIndex = 0; - // - // txtmessage - // - this.txtmessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtmessage.BackColor = System.Drawing.Color.White; - this.txtmessage.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtmessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.txtmessage.ForeColor = System.Drawing.Color.Black; - this.txtmessage.Location = new System.Drawing.Point(70, 6); - this.txtmessage.Name = "txtmessage"; - this.txtmessage.Size = new System.Drawing.Size(547, 19); - this.txtmessage.TabIndex = 2; - // - // btnsend - // - this.btnsend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnsend.Enabled = false; - this.btnsend.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsend.Location = new System.Drawing.Point(623, 3); - this.btnsend.Name = "btnsend"; - this.btnsend.Size = new System.Drawing.Size(75, 28); - this.btnsend.TabIndex = 1; - this.btnsend.Text = "Send"; - this.btnsend.UseVisualStyleBackColor = true; - this.btnsend.Click += new System.EventHandler(this.btnsend_Click); - // - // lbnick - // - this.lbnick.Dock = System.Windows.Forms.DockStyle.Left; - this.lbnick.Location = new System.Drawing.Point(0, 0); - this.lbnick.Name = "lbnick"; - this.lbnick.Size = new System.Drawing.Size(100, 34); - this.lbnick.TabIndex = 0; - this.lbnick.Text = "Nickname"; - this.lbnick.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // tmrimfuckinglucky - // - this.tmrimfuckinglucky.Enabled = true; - this.tmrimfuckinglucky.Tick += new System.EventHandler(this.tmrimfuckinglucky_Tick); - // - // QuickChat - // - this.AcceptButton = this.btnsend; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(701, 414); - this.Controls.Add(this.panel1); - this.Name = "QuickChat"; - this.Text = "QuickChat"; - this.Load += new System.EventHandler(this.QuickChat_Load); - this.panel1.ResumeLayout(false); - this.pnlsetnick.ResumeLayout(false); - this.pnlsetnick.PerformLayout(); - this.pnlcontrols.ResumeLayout(false); - this.pnlcontrols.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.RichTextBox txtmessages; - private System.Windows.Forms.Panel pnlcontrols; - private System.Windows.Forms.Timer tmrimfuckinglucky; - private System.Windows.Forms.Label lbnick; - private System.Windows.Forms.TextBox txtmessage; - private System.Windows.Forms.Button btnsend; - private System.Windows.Forms.Panel pnlsetnick; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button btnconnect; - private System.Windows.Forms.TextBox txtsetnick; - private System.Windows.Forms.Label label1; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/QuickChat.cs b/source/WindowsFormsApplication1/QuickChat.cs deleted file mode 100644 index 9cac42e..0000000 --- a/source/WindowsFormsApplication1/QuickChat.cs +++ /dev/null @@ -1,204 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using IrcDotNet; - -namespace ShiftOS -{ - public partial class QuickChat : Form - { - public QuickChat() - { - InitializeComponent(); - } - - ShiftOSIrcClient ConnectedClient = null; - - private void QuickChat_Load(object sender, EventArgs e) - { - pnlsetnick.Show(); - pnlcontrols.Hide(); - } - - - private void txtmessages_TextChanged(object sender, EventArgs e) - { - } - - //I'm fucking lucky I was able to get this working first try. - private void tmrimfuckinglucky_Tick(object sender, EventArgs e) - { - try { - if (ConnectedClient.CanReceiveMessages == true) - { - if (ConnectedClient.Messages.Count > 20) - { - ConnectedClient.Messages.Remove(ConnectedClient.Messages[20]); - } - txtmessages.Lines = ConnectedClient.Messages.ToArray(); - lbnick.Text = ConnectedClient.LocalUser.NickName; - btnsend.Enabled = true; - } - if(ConnectedClient.ErrorMessages.Count > 0) - { - API.CreateInfoboxSession("QuickChat error", ConnectedClient.ErrorMessages[0], infobox.InfoboxMode.Info); - ConnectedClient.Dispose(); - this.Close(); - } - } - catch - { - - } - } - - private void btnsend_Click(object sender, EventArgs e) - { - try - { - if (ConnectedClient.CanReceiveMessages == true) - { - if (txtmessage.Text.Length > 0) - { - ConnectedClient.Messages.Add($"<{ConnectedClient.LocalUser.NickName}> {txtmessage.Text}"); - ConnectedClient.SendMessage($"{txtmessage.Text}"); - txtmessage.Text = ""; - } - } - } - catch - { - - } - } - - private void btnconnect_Click(object sender, EventArgs e) - { - var res = txtsetnick.Text; - if (res != "") - { - ConnectedClient = new ShiftOSIrcClient(res); - pnlsetnick.Hide(); - pnlcontrols.Show(); - } - else - { - API.CreateInfoboxSession("QuickChat - Nickname not valid.", "That nickname is not valid. Your name will be automatically generated.", infobox.InfoboxMode.Info); - ConnectedClient = new ShiftOSIrcClient(); - pnlsetnick.Hide(); - pnlcontrols.Show(); - } - } - - private void txtsetnick_KeyDown(object sender, KeyEventArgs e) - { - if(e.KeyCode == Keys.Enter) - { - btnconnect_Click(sender, (EventArgs)e); - } - } - } - - public class ShiftOSIrcClient : IrcClient - { - public ShiftOSIrcClient() - { - var rnd = new Random(); - var nick_id = rnd.Next(10000, 99999); - this.Connected += (object sender, EventArgs a) => - { - this.MotdReceived += new EventHandler<System.EventArgs>(this.motd_received); - }; - this.ConnectFailed += (object s, IrcErrorEventArgs a) => - { - ErrorMessages.Add("Could not connect to the QuickChat chatroom. " + a.Error.Message); - }; - this.RawMessageReceived += (object s, IrcRawMessageEventArgs a) => - { - - }; - this.Connect("irc.playshiftos.ml", 6667, false, new IrcUserRegistrationInfo { NickName = $"shifter_{nick_id}", RealName = $"QuickChat: {API.CurrentSave.username}", UserName = $"shifter_{nick_id}" }); - - } - private List<string> errmsg = new List<string>(); - - public List<string> ErrorMessages - { - get - { - return errmsg; - } - } - private bool running = false; - - public bool CanReceiveMessages - { - get - { - return running; - } - } - - private List<string> msgs = new List<string>(); - - public void SendMessage(string msg) - { - if(running == true) - { - SendRawMessage($"PRIVMSG #shiftos :{msg}"); - } - } - - public List<string> Messages - { - get - { - return msgs; - } - } - - public void motd_received(object sender, EventArgs a) - { - LocalUser.JoinedChannel += (object s, IrcChannelEventArgs e) => - { - running = true; - msgs.Add("<QuickChat> Welcome to QuickChat!"); - e.Channel.MessageReceived += (object se, IrcMessageEventArgs ea) => - { - if (!msgs.Contains($"<{ea.Source.Name}> {ea.GetText()}")) - { - msgs.Add($"<{ea.Source.Name}> {ea.GetText()}"); - } - }; - }; - Channels.Join("#shiftos"); - } - - public ShiftOSIrcClient(string nick) - { - this.Connected += (object sender, EventArgs a) => - { - this.MotdReceived += new EventHandler<System.EventArgs>(this.motd_received); - }; - this.ConnectFailed += (object s, IrcErrorEventArgs a) => - { - ErrorMessages.Add("Could not connect to the QuickChat chatroom. " + a.Error.Message); - }; - this.RawMessageReceived += (object s, IrcRawMessageEventArgs a) => - { - if(a.RawContent.Contains("already in use")) - { - ErrorMessages.Add("That nickname is already in use! Please restart QuickChat and try again."); - } - }; - this.Connect("irc.playshiftos.ml", 6667, false, new IrcUserRegistrationInfo { NickName = nick, RealName = $"QuickChat: {nick}", UserName = nick }); - - } - } -} diff --git a/source/WindowsFormsApplication1/QuickChat.resx b/source/WindowsFormsApplication1/QuickChat.resx deleted file mode 100644 index d17d41c..0000000 --- a/source/WindowsFormsApplication1/QuickChat.resx +++ /dev/null @@ -1,123 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="tmrimfuckinglucky.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/RemoteCoherence.cs b/source/WindowsFormsApplication1/RemoteCoherence.cs deleted file mode 100644 index bdad885..0000000 --- a/source/WindowsFormsApplication1/RemoteCoherence.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ShiftOS -{ - class RemoteCoherence - { - } -} diff --git a/source/WindowsFormsApplication1/SaveSystem.cs b/source/WindowsFormsApplication1/SaveSystem.cs deleted file mode 100644 index aab5ab2..0000000 --- a/source/WindowsFormsApplication1/SaveSystem.cs +++ /dev/null @@ -1,662 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ShiftOS; -using System.IO; -using Newtonsoft.Json; -using System.Drawing; -using System.Windows.Forms; //Message boxes -namespace SaveSystem -{ - /// <summary> - /// This does NOT include Shiftorium upgrades. See the Shiftorium Repository for them. - /// </summary> - public class Save - { - public int codepoints = 0; - public bool forceclose = false; - public int movablewindownumber = 50; - public bool terminalfullscreen = true; - public bool newgame = true; - public string actualshiftversion = "0.1.1"; //ShiftOS 0.0.x died a peaceful death last June. - public string username = "user"; - public string TerminalName = "Terminal"; - public string ShiftoriumName = "Shiftorium"; - public string osname = "shiftos"; - public string ingameversion = "0.0.1.0"; - public string ColorPickerName = "Color Picker"; - public string FileSkimmerName = "File Skimmer"; - public string password; - public bool ChristmasRewardPast = false; - public int CodepointMultiplier = 1; - public int PriceDivider = 1; - public string CloudID = ""; - public List<string> CompletedNets = new List<string>(); - } - - public class PrivateBitnoteAddress - { - public string Address = null; - public decimal Bitnotes = 0; - } - - public class Utilities - { - public static Save LoadedSave = null; - public static PrivateBitnoteAddress BitnoteAddress = null; - - /// <summary> - /// Load the game. - /// </summary> - public static void loadGame() - { - ShiftoriumRegistry.UpdateShiftorium(); - string rawjson = File.ReadAllText(Paths.SaveFile); - if (rawjson.StartsWith("{")) - { - LoadedSave = JsonConvert.DeserializeObject<Save>(rawjson); - } else - { - LoadedSave = JsonConvert.DeserializeObject<Save>(API.Encryption.Decrypt(rawjson)); - } - LoadBTNAddress(); - Hacking.GetCharacters(); - } - - /// <summary> - /// Load the user's private bitnote address. - /// </summary> - public static void LoadBTNAddress() - { - if(File.Exists(Paths.Bitnote)) - { - BitnoteAddress = JsonConvert.DeserializeObject<PrivateBitnoteAddress>(API.BitnoteEncryption.Decrypt(File.ReadAllText(Paths.Bitnote))); - - } - else - { - BitnoteAddress = new PrivateBitnoteAddress(); - BitnoteAddress.Bitnotes = 0; - BitnoteAddress.Address = GenerateNewBitnoteAddress(); - } - } - - /// <summary> - /// Generate a random bitnote address. - /// </summary> - /// <returns>The address.</returns> - public static string GenerateNewBitnoteAddress() - { - var rnd = new Random(); - int raw = rnd.Next(10000000, 99999999); - string enc = API.Encryption.Encrypt(raw.ToString()); - return enc.Replace("/", "").Replace("\\", "").Replace("=", ""); - } - - /// <summary> - /// Saves the private bitnote address. - /// </summary> - public static void SaveBitnoteAddress() - { - File.WriteAllText(Paths.Bitnote, API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(BitnoteAddress))); - } - - /// <summary> - /// Saves the game. - /// </summary> - public static void saveGame() - { - string rawjson = JsonConvert.SerializeObject(LoadedSave); - if (API.DeveloperMode == true) - { - File.WriteAllText(Paths.SaveFile, rawjson); - } else - { - File.WriteAllText(Paths.SaveFile, API.Encryption.Encrypt(rawjson)); - } - //Shiftorium - string shiftoriumjson = JsonConvert.SerializeObject(ShiftoriumRegistry.ShiftoriumUpgrades); - if (API.DeveloperMode == true) - { - File.WriteAllText(Paths.SystemDir + "_shiftorium.json", shiftoriumjson); - } - else - { - File.WriteAllText(Paths.SystemDir + "_shiftorium.json", API.Encryption.Encrypt(shiftoriumjson)); - } - SaveBitnoteAddress(); - Hacking.SaveCharacters(); - } - - /// <summary> - /// Put ShiftOS in a New Game state. - /// </summary> - public static void NewGame() - { - Paths.WriteFileSystem(); //Writes the file system. - LoadedSave = new Save(); //Create a new Save - ShiftoriumRegistry.SetDefaultShiftoriumValues(); - string rawjson = JsonConvert.SerializeObject(LoadedSave); - if (API.DeveloperMode == true) - { - File.WriteAllText(Paths.SaveFile, rawjson); - } - else - { - File.WriteAllText(Paths.SaveFile, API.Encryption.Encrypt(rawjson)); - } - File.WriteAllText(Paths.SystemDir + "_engineInfo.txt", "engine hash: #62586247262346484"); - string shiftoriumjson = JsonConvert.SerializeObject(ShiftoriumRegistry.ShiftoriumUpgrades); - if (API.DeveloperMode == true) - { - File.WriteAllText(Paths.SystemDir + "_shiftorium.json", shiftoriumjson); - } - else - { - File.WriteAllText(Paths.SystemDir + "_shiftorium.json", API.Encryption.Encrypt(shiftoriumjson)); - } - Hacking.GetCharacters(); //I'm retarded. The save routine doesn't compensate for new games. - } - - /// <summary> - /// Check for a ShiftOS-Next or ShiftOS 0.0.x save. - /// </summary> - public static void CheckForOlderSaves() - { - if (OSInfo.GetPlatformID() == "microsoft") - { - if (Directory.Exists(Paths.SaveRoot)) - { - if (!File.Exists(Paths.SystemDir + "_engineInfo.txt")) - { - MessageBox.Show("WARNING: Older ShiftOS saves are no longer supported. This save will be converted to the new format, and will not be readable by either ShiftOS-Next or the legacy ShiftOS."); - NewGame(); - } - } - } - } - } - - public class ShiftoriumRegistry - { - public static Dictionary<string, bool> ShiftoriumUpgrades = new Dictionary<string, bool>(); - - - public static List<Shiftorium.Upgrade> DefaultUpgrades = new List<Shiftorium.Upgrade>(); - - public static List<string> GetCategories(bool showBought) - { - List<string> cats = new List<string>(); - foreach(var upg in DefaultUpgrades) - { - if(upg.id.Contains("dummy")) - { - if(!cats.Contains(upg.Category.ToLower())) - { - if(API.Upgrades[upg.Category.ToLower()]) - { - if(showBought == true) - { - cats.Add(upg.Category.ToLower()); - } - } - else - { - cats.Add(upg.Category.ToLower()); - } - - } - } - } - return cats; //Meow! No. I don't mean the animal. I mean "Categories". - } - - /// <summary> - /// Adds upgrade info (such as CP, description, etc) to the registry. Add your Shiftorium upgrades here. - /// </summary> - public static void setUpgrades() - { - DefaultUpgrades.Clear(); - //Dummy Upgrades. - DefaultUpgrades.Add(new Shiftorium.Upgrade("Dummy1 - 0 CP", null, null, "dummy", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Dummy2 - 0 CP", null, null, "dummy", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Dummy3 - 0 CP", null, null, "dummy", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Dummy4 - 0 CP", null, null, "dummy", "useful")); - - /*Add new upgrades below. - - Adding an upgrade is as simple as: - DefaultUpgrades.Add(new Shiftorium.Upgrade("<title> - <cost> CP", <preview image>, "<description>", "<dependencies>")); - - If you were to uncomment that, and replace <cost> with a real integer, and <preview image> with a real System.Drawing.Image, - an upgrade named '<title>' with description '<description>' would be added to the Shiftorium. - - Checking if the upgrade is bought, is as simple as: - if(SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades["<id>"] == true) { - //Do code if the upgrade is bought - } - else - { - //Do code if the upgrade is not bought. - } - - <id> will always be a lowercase version of <title> in the above tutorial on adding new upgrades, with no spaces. - For example, an upgrade with a title of "ShiftOS Shiftorium Upgrade" would have an ID of "shiftosshiftoriumupgrade". - - Also, the last argument in 'new Shiftorium.Upgrade()', <dependencies> is simple. - - If your upgrade can be bought at the beginning of the game, and doesn't require any other upgrades, put 'null' as the argument. - - If your upgrade depends on another upgrade, put that upgrade's ID as the argument. - - For example: "Titlebar" depends on "Gray", as you'll see, "Titlebar"'s dependencies argument is set to 'gray'. - - If your upgrade depends on multiple features, separate each upgrade ID by a semicolon. - - Like this: "upgrade1;upgrade2;upgrade3' and so on. Do not put a semicolon at the end of the string. - - Some upgrades, like 'Shift Desktop Panel' use this, requiring both the Shifter and the desktop panel upgrades. - - ShiftOS will automatically ckeck to see if all dependencies of an upgrade have been purchased before letting the user buy it. - - */ - DefaultUpgrades.Add(new Shiftorium.Upgrade("Gray - 20 CP", ShiftOS.Properties.Resources.upgradegray, "Everything doesn't always have to be black and white. Give your programs and GUI some depth by mixing black and white together to form grey." + Environment.NewLine + Environment.NewLine + "Note: You are unable to make controls grey until you buy the Shifter.", null, "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Title Bar - 80 CP", ShiftOS.Properties.Resources.upgradetitlebar, "Your windows are looking extremely bare right now. You know what they need? A gray bar on top of them! What is the gray bar for you ask?" + Environment.NewLine + Environment.NewLine + "Depending on what kind of person you are it either \"Does Nothing\" or \"Looks Pretty\". The Title Bar has a lot of future potential though…", "gray", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Seconds Since Midnight - 10 CP", ShiftOS.Properties.Resources.upgradesecondssincemidnight, "Ever wondered how many seconds have passed since the clock struck midnight? No?" + Environment.NewLine + Environment.NewLine + "Well for just 9.99 codepoints (rounded to the nearest codepoint) you will finally have the answer to that question you have no intention of knowing the answer to.", null, "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Minutes Since Midnight - 20 CP", ShiftOS.Properties.Resources.upgrademinutesssincemidnight, "Most people would find looking out their window a better indication of what time it is than being told how many seconds have passed since midnight." + Environment.NewLine + Environment.NewLine + "If you are like most people then enhancing the computers ability to tell the time is critical.", "secondssincemidnight", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Hours Since Midnight - 40 CP", ShiftOS.Properties.Resources.upgradehoursssincemidnight, "Need a somewhat normal method of time tracking? Well now you can have it with the Hours Past Midnight time format." + Environment.NewLine + Environment.NewLine + "It's not perfectly accurate but it's easier than trying to work out the time from how many seconds or minutes have passed since midnight.", "minutessincemidnight", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Username - 15 CP", ShiftOS.Properties.Resources.upgradecustomusername, "Sick of being known as \"User\"? Want to be recognized and labeled? Then you need to replace the default username with your own!" + Environment.NewLine + Environment.NewLine + "If you want ShiftOS to refer to you by name then you are going to need this upgrade.", null, "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Windows Anywhere - 25 CP", ShiftOS.Properties.Resources.upgradewindowsanywhere, "Having all windows open in the center of the screen is seriously limiting when it comes to multitasking." + Environment.NewLine + Environment.NewLine + "Buying this upgrade is essential if you plan on multitasking or even if you just hate having windows centered in the middle of screen.", null, "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Multitasking - 50 CP", ShiftOS.Properties.Resources.upgrademultitasking, "These days people have many windows up on their computer so they can edit photos while they watch videos and chat to their friends about how good at multitasking they are." + Environment.NewLine + Environment.NewLine + "If you like multitasking and having lots of windows open then buy this upgrade!", "windowsanywhere", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Auto Scroll Terminal - 5 CP", ShiftOS.Properties.Resources.upgradeautoscrollterminal, "Getting sick of the terminal filling up with text leaving you not knowing what you have typed unless you start typing more?" + Environment.NewLine + Environment.NewLine + "Then buy this upgrade to keep the terminal scrolled to the bottom so you can always see the latest stuff you've typed.", null, "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Movable Windows - 75 CP", ShiftOS.Properties.Resources.upgrademoveablewindows, "Although it's nice to be able to type commands in the terminal to teleport windows to any spot on the screen it’s a little time consuming and difficult at times." + Environment.NewLine + Environment.NewLine + "Well, with Movable Windows you can move Windows with the keyboard WASD keys.", "windowsanywhere", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Draggable Windows - 150 CP", ShiftOS.Properties.Resources.upgradedraggablewindows, "So... I heard you have a Title Bar? I also heard that you have Movable Windows. Although Movable Windows are nice they aren't perfect." + Environment.NewLine + Environment.NewLine + "Buy this upgrade if you want to drag windows around by their Title Bar! Trust me... Its ultra-efficient!", "titlebar;movablewindows", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Window Borders - 40 CP", ShiftOS.Properties.Resources.upgradewindowborders, "A borderless window on your desktop is like a picture hung on the wall without a frame. It looks completely out of place and awful!" + Environment.NewLine + Environment.NewLine + "Without this upgrade your overlapping windows will look extremely messy and appear to merge with each other,", "gray", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("PM and AM - 60 CP", ShiftOS.Properties.Resources.upgradeamandpm, "You may be able read the time as it is now but by splitting the time into two 12 hour periods other less intelligent people around you will have an easier time reading the time." + Environment.NewLine + Environment.NewLine + "This upgrade is necessary to stop your families and friends brains exploding!", "minuteaccuracytime", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Minute Accuracy Time - 80 CP", ShiftOS.Properties.Resources.upgrademinuteaccuracytime, "Want to be completely normal for once? Well Shift your time format into one 60x more accurate. " + Environment.NewLine + Environment.NewLine + "Most people these days make plans to meet at certain times such as 5:30pm so knowing the exact minute of the exact hour is very important.", "hourssincemidnight", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Split Second Time - 100 CP", ShiftOS.Properties.Resources.upgradesplitsecondaccuracy, "You already know the exact time down to the very last minute. Do you really need to know the exact second?" + Environment.NewLine + Environment.NewLine + "If so then give this upgrade a whirl but I'm sure you have better things to do than throw 100 codepoints away like this.", "minuteaccuracytime", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Title Text - 40 CP", ShiftOS.Properties.Resources.upgradetitletext, "Since looking at a program won't tell you the name of it you need Title Text. Unless of course you want to go through the trouble of remembering the name of the program..." + Environment.NewLine + Environment.NewLine + "Title Text sits in the top left hand corner of the title bar to label each program.", "titlebar", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Close Button - 90 CP", ShiftOS.Properties.Resources.upgradeclosebutton, "Closing a program should be as easy as pressing a button. Opening up the terminal and typing \"Close [Program name]\" is just Ridiculous." + Environment.NewLine + Environment.NewLine + "Please, for your own sake... Buy this close button before you waste another second opening up that terminal!", "titlebar", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Desktop Panel - 150 CP", ShiftOS.Properties.Resources.upgradedesktoppanel, "Got a boring blank desktop? Feel it doesn't really serve a purpose? Then you need a desktop panel!" + Environment.NewLine + Environment.NewLine + "This beautiful gray desktop panel will sit at the top of your desktop and do absolutely nothing for only 150 codepoints!", "gray", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Clock - 50 CP", ShiftOS.Properties.Resources.upgradeclock, "You could type \"time\" in the terminal every time you wanted to know what the time was but that's a little inefficient don't you think?" + Environment.NewLine + Environment.NewLine + "Ever wish you could just have the time on the screen all the time? Well, there’s an app for that!", "secondssincemidnight", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("App Launcher Menu - 120 CP", ShiftOS.Properties.Resources.upgradeapplaunchermenu, "Launching programs by typing their names in the terminal is very counterproductive especially if you are bad at spelling." + Environment.NewLine + Environment.NewLine + "A menu on the desktop that displays all programs on your computer and allows you to launch them would be a huge time saver.", "desktoppanel", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Knowledge Input - 20 CP", ShiftOS.Properties.Resources.upgradeknowledgeinput, "What's the point of an App Launcher if it can't launch all your apps?" + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to knowledge input in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermemu", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Clock - 20 CP", ShiftOS.Properties.Resources.upgradealclock, "What's the point of an App Launcher if it can't launch all your apps?" + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to the clock in your app launcher so you can launch it at any time with just a few clicks.", "clock;applaunchermenu", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Shiftorium - 20 CP", ShiftOS.Properties.Resources.upgradealshiftorium, "What's the point of an App Launcher if it can't launch all your apps?" + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to shiftorium in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("App Launcher Shutdown - 40 CP", ShiftOS.Properties.Resources.upgradeapplaunchershutdown, "You want a complete graphical interface with no reliance on the terminal right? That means every possible function of the operating system must be achievable graphically." + Environment.NewLine + Environment.NewLine + "You may not shut down too often but hey, it beats opening the terminal...", "applaunchermenu", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Windowed Terminal - 45 CP", ShiftOS.Properties.Resources.upgradewindowedterminal, "A nice big terminal is useful however it can sometimes get in the way of what you are doing." + Environment.NewLine + Environment.NewLine + "With a few tweaks we may be able to program a command that allows the terminal to switch between a full screen and windowed state.", "multitasking", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Desktop Panel Clock - 75 CP", ShiftOS.Properties.Resources.upgradedesktoppanelclock, "Want to always know what the time is without typing \"time\" in the terminal or opening up an entire application?" + Environment.NewLine + Environment.NewLine + "Well, with this somewhat expensive but extremely affordable clock you will know what the time is no matter what you are doing.", "desktoppanel;clock", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Terminal Scrollbar - 20 CP", ShiftOS.Properties.Resources.upgradeterminalscrollbar, "It’s great having the terminal windowed so it doesn't block the view of your desktop but at the same time size can be an issue." + Environment.NewLine + Environment.NewLine + "This problem can easily be fixed however by adding a scrollbar to the terminal when it's windowed.", "autoscrollterminal", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("KI Addons - 15 CP", ShiftOS.Properties.Resources.upgradekiaddons, "Knowledge input is a great game to play if you want to earn codepoints but what happens when you run out of things to guess?" + Environment.NewLine + Environment.NewLine + "This upgrade will allow you to install add-ons for knowledge input.", null, "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("KI Car Brands - 10 CP", ShiftOS.Properties.Resources.upgradeskicarbrands, "Need some more lists for Knowledge input? Why not add a list of automobile manufacturers to guess?" + Environment.NewLine + Environment.NewLine + "You know the brand of car you drive right? Toyota Maybe? Suzuki? Or maybe you have a Ferrari... come on you can do this!", "kiaddons", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("KI Game Consoles - 10 CP", ShiftOS.Properties.Resources.upgradesgameconsoles, "Need some more lists for Knowledge input? Why not add a list of game consoles to guess?" + Environment.NewLine + Environment.NewLine + "You know the name of your game console right? Playstation 4 Maybe? Xbox one? Or maybe you have a Ouya... come on you can do this!", "kiaddons", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Gray Shades - 40 CP", ShiftOS.Properties.Resources.upgradegrayshades, "Seeing gray on your computer screen may be a nice break from black and white but why have just one shade of gray when you can have 3?" + Environment.NewLine + Environment.NewLine + "More shades of gray increase the uniqueness of your ShiftOS interface by expanding your range of colour options in the Shifter.", "gray", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Gray Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradegrayshadeset, "3 Shades of gray may be better than 1 shade but why not get a full gray shade set complete with 8 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of gray.", "grayshades", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Gray Shades - 100 CP", ShiftOS.Properties.Resources.upgradegraycustom, "Forget about having 8 shades of gray because this upgrade will allow you to crack the colour value code giving you the ability to create your own custom shades of gray." + Environment.NewLine + Environment.NewLine + "Further research may even allow us to create other basic colours.", "fullgrayshadeset", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Purple - 20 CP", ShiftOS.Properties.Resources.upgradepurple, "Now that we have the RBG colours \"Red\" and \"Blue\" we are able to mix them together to form purple which symbolizes spirituality, royalty, magic and mystery." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Purple.", "red;green;blue", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Purple Shades - 40 CP", ShiftOS.Properties.Resources.upgradepurpleshades, "Having a splash of purple may be cool but why have just one shade of purple when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of purple.", "purple", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Purple Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradepurpleshadeset, "3 Shades of purple may be better than 1 shade but why not get a full purple shade set complete with 16 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of purple.", "purpleshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Purple Shades - 100 CP", ShiftOS.Properties.Resources.upgradepurplecustom, "16 shades of purple gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own purple shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullpurpleshadeset", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Blue - 20 CP", ShiftOS.Properties.Resources.upgradeblue, "Blue may be the colour of the sky and the ocean but it’s also an important colour that may allow us to create more colours if we mix it with red." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Blue.", "customgrayshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Blue Shades - 40 CP", ShiftOS.Properties.Resources.upgradeblueshades, "Having a splash of blue may be cool but why have just one shade of blue when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of blue.", "blue", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Blue Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradeblueshadeset, "3 Shades of blue may be better than 1 shade but why not get a full blue shade set complete with 16 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of blue.", "blueshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Blue Shades - 100 CP", ShiftOS.Properties.Resources.upgradebluecustom, "16 shades of blue gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own blue shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullblueshadeset", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Green - 20 CP", ShiftOS.Properties.Resources.upgradegreen, "Green may be the colour of nature and life but it’s also an important colour that may allow us to create more colours if we mix it with red." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Green.", "customgrayshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Green Shades - 40 CP", ShiftOS.Properties.Resources.upgradegreenshades, "Having a splash of green may be cool but why have just one shade of green when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of green.", "green", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Green Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradegreenshadeset, "3 Shades of green may be better than 1 shade but why not get a full green shade set complete with 16 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of green.", "greenshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Green Shades - 100 CP", ShiftOS.Properties.Resources.upgradegreencustom, "16 shades of green gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own green shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullgreenshadeset", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Yellow - 20 CP", ShiftOS.Properties.Resources.upgradeyellow, "Now that we have the RBG colours \"Red\" and \"Green\" we are able to mix them together to form yellow which symbolizes happiness, creativity and high intellect." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Yellow.", "red;green;blue", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Yellow Shades - 40 CP", ShiftOS.Properties.Resources.upgradeyellowshades, "Having a splash of yellow may be cool but why have just one shade of yellow when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of yellow.", "yellow", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Yellow Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradeyellowshadeset, "3 Shades of yellow may be better than 1 shade but why not get a full yellow shade set complete with 10 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of yellow.", "yellowshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Yellow Shades - 100 CP", ShiftOS.Properties.Resources.upgradeyellowcustom, "10 shades of yellow gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own yellow shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullyellowshadeset", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Orange - 20 CP", ShiftOS.Properties.Resources.upgradeorange, "Now that we have the RBG colours \"Red\" and \"Green\" we are able to mix them together to form orange which symbolizes enthusiasm and creativity." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Orange.", "red;green;blue", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Orange Shades - 40 CP", ShiftOS.Properties.Resources.upgradeorangeshades, "Having a splash of orange may be cool but why have just one shade of orange when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of orange.", "orange", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Orange Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradeorangeshadeset, "3 Shades of orange may be better than 1 shade but why not get a full orange shade set complete with 6 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of orange.", "orangeshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Orange Shades - 100 CP", ShiftOS.Properties.Resources.upgradeorangecustom, "6 shades of orange gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own orange shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullorangeshadeset", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Brown - 20 CP", ShiftOS.Properties.Resources.upgradebrown, "Now that we have the all the RBG colours we are able to mix them together to form brown which symbolizes laziness and the earth." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Brown.", "red;green;blue", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Brown Shades - 40 CP", ShiftOS.Properties.Resources.upgradebrownshades, "Having a splash of brown may be cool but why have just one shade of brown when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of brown.", "brown", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Brown Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradebrownshadeset, "3 Shades of brown may be better than 1 shade but why not get a full brown shade set complete with 16 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of brown.", "brownshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Brown Shades - 100 CP", ShiftOS.Properties.Resources.upgradebrowncustom, "16 shades of brown gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own brown shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullbrownshadeset", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Red - 20 CP", ShiftOS.Properties.Resources.upgradered, "Red may be a demonic and evil colour that symbolizes hate and rage but it’s a very important colour that may allow us to create more colours if we mix it with Blue or Green." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to red.", "customgrayshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Red Shades - 40 CP", ShiftOS.Properties.Resources.upgraderedshades, "Having a splash of red may be cool but why have just one shade of red when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of red.", "red", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Red Shade Set - 60 CP", ShiftOS.Properties.Resources.upgraderedshadeset, "3 Shades of red may be better than 1 shade but why not get a full red shade set complete with 9 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of red.", "redshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Red Shades - 100 CP", ShiftOS.Properties.Resources.upgraderedcustom, "9 shades of red gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own red shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullredshadeset", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Pink - 20 CP", ShiftOS.Properties.Resources.upgradepink, "Now that we have the all the RBG colours we are able to mix them together to form pink which symbolizes universal love and beauty." + Environment.NewLine + Environment.NewLine + "Buying this upgrade would enable you to set various UI elements in ShiftOS to Pink.", "red;green;blue", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Pink Shades - 40 CP", ShiftOS.Properties.Resources.upgradepinkshades, "Having a splash of pink may be cool but why have just one shade of pink when you can have 3?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to get more shades of pink.", "pink", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Full Pink Shade Set - 60 CP", ShiftOS.Properties.Resources.upgradepinkshadeset, "3 Shades of pink may be better than 1 shade but why not get a full pink shade set complete with 6 shades?" + Environment.NewLine + Environment.NewLine + "Further upgrades may even allow you to create your own custom shades of pink.", "pinkshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Custom Pink Shades - 100 CP", ShiftOS.Properties.Resources.upgradepinkcustom, "6 shades of pink gives you plenty of customization options but further investigation into the RBG colour system will allow you to make your own pink shades." + Environment.NewLine + Environment.NewLine + "Eventually we may be able to limitlessly create shades of any colour.", "fullpinkshadeset", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Basic Custom shade - 50 CP", ShiftOS.Properties.Resources.anycolourshade, "Now that we can create shades of colours based on certain rules our level of customization is very high." + Environment.NewLine + Environment.NewLine + "With further research ShiftOS may be able to support the ability to make a shade not linked to the rules of a certain colour.", "custompinkshades;customblueshades;custompurpleshades;customorangeshades;custombrownshades;customyellowshades;customredshades;customgreenshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("General Custom Shades - 100 CP", ShiftOS.Properties.Resources.anycolourshade2, "There isn’t much use making a single custom colour that looks mostly gray. Further research into optimizing ShiftOS may improve its compatibility with the RGB colour system." + Environment.NewLine + Environment.NewLine + "This would lead to a higher range in values and shades being stored.", "basiccustomshade", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Advanced Custom Shades - 250 CP", ShiftOS.Properties.Resources.anycolourshade3, "4 savable shade spaces is nowhere near decent for storing custom colours and with RGB limits of 100 to 200 the colours are still looking quite dull." + Environment.NewLine + Environment.NewLine + "More research into optimizing ShiftOS may further break these limits.", "generalcustomshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Limitless Custom Shades - 500 CP", ShiftOS.Properties.Resources.anycolourshade4, "It’s time to break all RGB colour limits forever! This upgrade may be expensive but it will allow us to master the RGB colour system." + Environment.NewLine + Environment.NewLine + "With total native RGB colour support in ShiftOS we will limitlessly be able to make millions of shades of colours.", "advancedcustomshades", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shifter - 40 CP", ShiftOS.Properties.Resources.upgradeshifter, "For system compatibility reasons practically all ShiftOS elements are designed to display in gray style and look dull." + Environment.NewLine + Environment.NewLine + "We may be able to overcome this dull interface however if the user is given the option to customize it through the use of an application.", "gray", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Shifter - 20 CP", ShiftOS.Properties.Resources.upgradealshifter, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to the shifter in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;shifter", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Roll Up Command - 10 CP", ShiftOS.Properties.Resources.upgraderollupcommand, "Running out of space on your desktop? Wish you could keep a window running in the background without completely closing it?" + Environment.NewLine + Environment.NewLine + "Well you 're in luck. The roll up command will allow you to roll windows up to their title bar when you want to save space.", "titlebar", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Roll Up Button - 45 CP", ShiftOS.Properties.Resources.upgraderollupbutton, "Are you a fan of the Roll Up functionality? Are you absolutely sick of opening up the terminal and typing in a command every time you want to roll up a window?" + Environment.NewLine + Environment.NewLine + "This upgrade will making rolling up windows much quicker!", "rollupcommand", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Desktop - 20 CP", ShiftOS.Properties.Resources.upgradeshiftdesktop, "The shifter is currently unable to change any settings but this simple upgrade may be able to add a module that allows you to change the colour of the desktop background." + Environment.NewLine + Environment.NewLine + "This may even unlock further Shifter functionality.", "shifter", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Panel Clock - 20 CP", ShiftOS.Properties.Resources.upgradeshiftpanelclock, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Desktop Panel Clock.", "desktoppanelclock;shifter", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift App Launcher - 20 CP", ShiftOS.Properties.Resources.upgradeshiftapplauncher, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the App Launcher.", "applaunchermenu;shifter", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Desktop Panel - 20 CP", ShiftOS.Properties.Resources.upgradeshiftdesktoppanel, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Desktop Panel.", "desktoppanel;shifter", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Title Bar - 20 CP", ShiftOS.Properties.Resources.upgradeshifttitlebar, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Title Bar.", "titlebar;shifter", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Title Text - 20 CP", ShiftOS.Properties.Resources.upgradeshifttitletext, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Title Text.", "titletext;shifter", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Title Buttons - 20 CP", ShiftOS.Properties.Resources.upgradeshiftbuttons, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Title Buttons.", "closebutton;shifter", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Borders - 20 CP", ShiftOS.Properties.Resources.upgradeshiftborders, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Window Borders.", "windowborders;shifter", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Pong - 70 CP", ShiftOS.Properties.Resources.upgradepong, "Finding it difficult to list more words with knowledge input? Everyone has their limits right? Well how about a game of pong?" + Environment.NewLine + Environment.NewLine + "This game is sure to get your adrenalin going and you can earn codepoints as you play it!", null, "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Pong - 20 CP", ShiftOS.Properties.Resources.upgradealpong, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to pong in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;pong", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL File Skimmer - 20 CP", ShiftOS.Properties.Resources.upgradealfileskimmer, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to the file skimmer in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;fileskimmer", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Textpad - 20 CP", ShiftOS.Properties.Resources.upgradealtextpad, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to textpad in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;textpad", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("File Skimmer - 60 CP", ShiftOS.Properties.Resources.upgradefileskimmer, "Almost all computers come with some form of permanent data storage." + Environment.NewLine + Environment.NewLine + "ShiftOS is storing data on your storage device (e.g. HDD or SSD) however without a way to view and browse through these files you are practically locked out of your own computer.", "gray", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Textpad - 65 CP", ShiftOS.Properties.Resources.upgradetextpad, "Need to quickly jot down something but you can’t find a pen and paper nearby? There’s an app for that!" + Environment.NewLine + Environment.NewLine + "With the Textpad you will be able to jot down whatever you like and have it displayed in all its glory on your computer screen.", "gray", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Textpad New - 25 CP", ShiftOS.Properties.Resources.upgradetextpadnew, "Have you ever been typing a document and thought ‘I don’t like what I’m writing’. Closing and opening the entire application to clear the text is too much effort right?" + Environment.NewLine + Environment.NewLine + "Well if you get this upgrade clearing the text can be as easy as pressing a button.", "textpad", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Textpad Save - 25 CP", ShiftOS.Properties.Resources.upgradetextpadsave, "Have you just written something worth keeping with Textpad? Well, what a shame you can’t save it…" + Environment.NewLine + Environment.NewLine + "Or can you? That’s right, with this upgrade your award winning documents can sit safely on your storage device.", "fileskimmer;textpad", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Textpad Open - 25 CP", ShiftOS.Properties.Resources.upgradetextpadopen, "Sure you can open your text files by going to all the effort of opening File Skimmer and then clicking on the file you want to open but it doesn’t have to be that hard." + Environment.NewLine + Environment.NewLine + "Wouldn't an open button make life much easier?", "fileskimmer;textpad", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("FS New Folder - 25 CP", ShiftOS.Properties.Resources.upgradefileskimmernew, "There are a few folders within the ShiftOS file system that you can sort your data into but why limit yourself?" + Environment.NewLine + Environment.NewLine + "In an operating system that you can shift to your liking surely you should be able to create your own folders right?", "fileskimmer", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("FS Delete - 25 CP", ShiftOS.Properties.Resources.upgradefileskimmerdelete, "You’re not a hoarder are you? If you are stop reading this and go look for another upgrade." + Environment.NewLine + Environment.NewLine + "If you keep every file you create your storage device is sure to get cluttered… seriously, you need a delete button!", "fileskimmer", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("KI Elements - 10 CP", ShiftOS.Properties.Resources.upgradekielements, "Need some more lists for Knowledge input? Why not add a list of Elements to guess?" + Environment.NewLine + Environment.NewLine + "You studied the periodic table of elements in highschool right? Hydrogen, oxygen, lead, silver… you can do this!", "kiaddons", "useful")); - //new - DefaultUpgrades.Add(new Shiftorium.Upgrade("Panel Buttons - 75 CP", ShiftOS.Properties.Resources.upgradepanelbuttons, "A desktop panel seems like it could be useful for a variety of different features." + Environment.NewLine + Environment.NewLine + "Maybe with a little more research we could find a way to display the names of all your open programs in the desktop panel", "desktoppanel", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Minimize Command - 20 CP", ShiftOS.Properties.Resources.upgrademinimizecommand, "Ever wanted to completely remove a program from the screen without actually closing it?" + Environment.NewLine + Environment.NewLine + "Well with a minimize command this may actually become possible and allow you to save the state of hidden programs in the process!", "titlebar", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Minimize Button - 50 CP", ShiftOS.Properties.Resources.upgrademinimizebutton, "As useful as the minimize feature is you still have to go to all the effort of opening the terminal and typing in a command to use it." + Environment.NewLine + Environment.NewLine + "Wouldn’t a button in the title of each window be more efficient?", "minimizecommand", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Useful Panel Buttons - 40 CP", ShiftOS.Properties.Resources.upgradeusefulpanelbuttons, "How can you call those things on the desktop panel ‘panel buttons’ when they aren’t even clickable?." + Environment.NewLine + Environment.NewLine + "A graphical unminimize feature would be handy and those panel buttons might help us…", "panelbuttons;minimizecommand", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad - 75 CP", ShiftOS.Properties.Resources.upgradeartpad, "Ever wanted to play around with pixels on your screen?" + Environment.NewLine + Environment.NewLine + "Well it looks like your newest companion may become the Artpad but be sure you know your x and y coordinates!", "gray", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 4 - 10 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit4, "With just two pixels you can’t make very interesting artworks." + Environment.NewLine + Environment.NewLine + "Doubling the pixel limit to 4 should more than double the variety of unique creations you can make with the artpad.", "artpad", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 8 - 20 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit8, "Earlier I lied about 4 pixels giving you many different types of unique artistic opportunities." + Environment.NewLine + Environment.NewLine + "A pixel limit of 8 may be a little limiting though and its still dirt cheap.", "artpadpixellimit4", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 16 - 30 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit16, "8 pixels may not be great but 16 is looking a little more pristine." + Environment.NewLine + Environment.NewLine + "It may be a silly rhyme but it’s true.", "artpadpixellimit8", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 64 - 50 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit64, "Step right up to a pixel limit 4x greater than your current one." + Environment.NewLine + Environment.NewLine + "Isn’t it usually double you say? Well this time around its quadruple but unfortunately it does come with a dearer price.", "artpadpixellimit16", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 256 - 75 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit256, "Finally we are on the verge on a decent pixel limit. Think of what you could do with 256 pixels" + Environment.NewLine + Environment.NewLine + "The width and height of your canvas could be huge!", "artpadpixellimit64", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 1024 - 100 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit1024, "Ahh, now we’re talking. This is an upgrade that will do you a world of good." + Environment.NewLine + Environment.NewLine + "It’s a shame it’s is so expensive but good things always come at a cost.", "artpadpixellimit256", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 4096 - 150 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit4096, " With a pixel limit of 4096 you would have the ability to make canvases 64 by 64 pixels." + Environment.NewLine + Environment.NewLine + "Do you really think you will need this high of a pixel limit?", "artpadpixellimit1024", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 16384 - 200 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit16384, "You may think your current pixel limit is good but you aren’t seen nothing yet." + Environment.NewLine + Environment.NewLine + "For some true 4x zoomed freehand drawing don’t miss this upgrade.", "artpadpixellimit4096", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Limit 65536 - 250 CP", ShiftOS.Properties.Resources.upgradeartpadpixellimit65536, "Oh come on how much higher can the pixel limit go?" + Environment.NewLine + Environment.NewLine + "I doubt you actually need it but aren’t you curious how much higher this goes?", "artpadpixellimit16384", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Limitless Pixels - 350 CP", ShiftOS.Properties.Resources.upgradeartpadlimitlesspixels, "This is what you’ve been waiting for all this time after purchasing all those pixel limit upgrades" + Environment.NewLine + Environment.NewLine + "It may be ultra-expensive but you won’t have to ever get another after this one.", "artpadpixellimit65536", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad New - 10 CP", ShiftOS.Properties.Resources.upgradeartpadnew, "Ever wanted to start a fresh with a new canvas without restarting Artpad" + Environment.NewLine + Environment.NewLine + "With a little research it may be possible to add a button to do just that whenever you want.", "artpad", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Save - 50 CP", ShiftOS.Properties.Resources.upgradeartpadsave, "Artpad may be fun to play around with but wouldn’t saving be an amazing feature?" + Environment.NewLine + Environment.NewLine + "Saving your pictures may even generate codepoints and the saved pictures might be able to be used for something.", "fileskimmer;artpad", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Load - 50 CP", ShiftOS.Properties.Resources.upgradeartpadload, "Sometimes after making something and saving it you wish to alter it slightly to enhance it" + Environment.NewLine + Environment.NewLine + "A load feature in the Artpad should let you modify saved .pic files by allowing you to load them up again with the click of a button.", "fileskimmer;artpad", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Undo - 40 CP", ShiftOS.Properties.Resources.upgradeartpadundo, "Ever spilt your paint over your masterpiece? It’s an awful feeling right?" + Environment.NewLine + Environment.NewLine + "Well in situations like these an undo feature would be very useful so for backup I would definitely get this upgrade.", "artpad", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Redo - 40 CP", ShiftOS.Properties.Resources.upgradeartpadredo, "Ever clicked undo too many times and found that you have lost a large portion of work" + Environment.NewLine + Environment.NewLine + "For cases like these a redo button can be quite handy but obviously you could save your codepoints by just being careful with the undo button.", "artpadundo", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pixel Placer - 20 CP", ShiftOS.Properties.Resources.upgradeartpadpixelplacer, "The pixel setter allows you to set pixels but do you really want to go around trying to pinpoint and calculate x and y coordinates" + Environment.NewLine + Environment.NewLine + "Clicking the pixel you want to change directly would be much more efficient don’t you agree?", "artpad", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad PP Movement Mode - 20 CP", ShiftOS.Properties.Resources.upgradeartpadpixelplacermovementmode, "Constantly clicking each individual pixel on your canvas using the Pixel Placer can be very time consuming and tiring for your hands" + Environment.NewLine + Environment.NewLine + "Wouldn’t it be easier to just click and drag? Well there’s an upgrade for that!", "artpadpixelplacer", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Pencil - 30 CP", ShiftOS.Properties.Resources.upgradeartpadpenciltool, "Does the buggy Pixel placer movement mode annoy you when it skips pixels?" + Environment.NewLine + Environment.NewLine + "Well with a little more research we may be able to develop a new tool that can draw much more smoothly.", "artpadppmovementmode", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Paint Brush - 30 CP", ShiftOS.Properties.Resources.upgradeartpadpaintbrushtool, "Ever wanted to paint with a tool that can paint free handedly and be big, small, circular or square?" + Environment.NewLine + Environment.NewLine + "This paint brush tool may be the tool you want then and its pretty cheap too.", "artpadppmovementmode", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Line Tool - 30 CP", ShiftOS.Properties.Resources.upgradeartpadlinetool, "Having difficulty drawing strait lines? Then you obviously need a line tool." + Environment.NewLine + Environment.NewLine + "With a line tool you will be able to draw straight lines from any point to any point on your canvas.", "artpadpencil", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Oval Tool - 40 CP", ShiftOS.Properties.Resources.upgradeartpadovaltool, "Drawing perfect circles is a very tricky process especially if zoomed right in on the canvas" + Environment.NewLine + Environment.NewLine + "With a bit of research we may be able to discover a tool that calculates how to draw circles without much effort on our side.", "artpadlinetool", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Rectangle Tool - 40 CP", ShiftOS.Properties.Resources.upgradeartpadrectangletool, "Drawing perfect squares is a time consuming process especially if you are trying to draw them perfectly straight" + Environment.NewLine + Environment.NewLine + "With a bit of research we may be able to discover a tool that calculates how to draw squares without much effort on our side.", "artpadovaltool", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Eraser - 20 CP", ShiftOS.Properties.Resources.upgradeartpaderaser, "Made a little mistake and want to erase it? Sounds like you need an eraser" + Environment.NewLine + Environment.NewLine + "With a little bit of research an eraser tool may not be too far away as overall its just a paintbrush set to the colour of the canvas.", "artpadpencil", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Fill Tool - 60 CP", ShiftOS.Properties.Resources.upgradeartpadfilltool, "Instead of coloring in every single individual pixel sometimes it is more appropriate to simply draw an outline and instantly fill a space in." + Environment.NewLine + Environment.NewLine + "If that’s a feature you’re interested in then you should definitely buy this upgrade.", "artpadpaintbrush", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Text Tool - 45 CP", ShiftOS.Properties.Resources.upgradeartpadtexttool, "drawing text is very difficult but if you can pull it off then well done, nice accomplishment!" + Environment.NewLine + Environment.NewLine + "For those who can’t though research into a text drawing tool would be very handy unless you don’t require text in your artwork.", "artpadrectangletool", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 4 Color Pallets - 10 CP", ShiftOS.Properties.Resources.upgradeartpad4colorpallets, "Having just 2 colours in your work may give it an interesting style but overall its very limiting." + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 8 Color Pallets - 20 CP", ShiftOS.Properties.Resources.upgradeartpad8colorpallets, "4 colour pallets is still very limiting and a lot less than your average paint program." + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad4colorpallets", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 16 Color Pallets - 35 CP", ShiftOS.Properties.Resources.upgradeartpad16colorpallets, "8 colours is still going to leave you changing the colour of your pallets quite often." + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad8colorpallets", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 32 Color Pallets - 50 CP", ShiftOS.Properties.Resources.upgradeartpad32colorpallets, "16 colours is definitely usable but it certainly could get better than that right?" + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad16colorpallets", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 64 Color Pallets - 100 CP", ShiftOS.Properties.Resources.upgradeartpad64colorpallets, "32 colours is slightly more than average for a paint program but don’t you want extreme?" + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad32colorpallets", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad 128 Color Pallets - 150 CP", ShiftOS.Properties.Resources.upgradeartpad128colorpallets, "For some people 64 colour pallets may already be overkill but for the extremists like yourself it’s just not enough." + Environment.NewLine + Environment.NewLine + "This upgrade will double the amount of usable colour pallets in the Artpad to allow you quick access to a wider range of colours.", "artpad64colorpallets", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Artpad Custom Pallets - 75 CP", ShiftOS.Properties.Resources.updatecustomcolourpallets, "It can be annoying when things are set in stone and can’t be changed." + Environment.NewLine + Environment.NewLine + "Let’s not let that happen to the Artpad by programming the colour pallets to be resizable by the user.", "artpad128colorpallets", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Skinning - 80 CP", ShiftOS.Properties.Resources.upgradeskinning, "Static colours of the windows and desktop in ShiftOS are beginning to look boring and unprofessional." + Environment.NewLine + Environment.NewLine + "Since the artpad is able to save .pic file we may be able to use them as UI elements.", "artpad;fileskimmer;shifter", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Artpad - 20 CP", ShiftOS.Properties.Resources.upgradealartpad, "What's the point of an App Launcher if it can't launch all your apps? " + Environment.NewLine + Environment.NewLine + "Use this tweak to add a shortcut to artpad in your app launcher so you can launch it at any time with just a few clicks.", "applaunchermenu;artpad", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Panel Buttons - 20 CP", ShiftOS.Properties.Resources.upgradeshiftpanelbuttons, "The Shifter may have some functionality but why not add more modules to it so you can customize even more elements of ShiftOS?" + Environment.NewLine + Environment.NewLine + "This module will allow you to modify the Desktop Panel Buttons.", "panelbuttons;shifter", "useful")); - // 0.0.8 - DefaultUpgrades.Add(new Shiftorium.Upgrade("Resizable Windows - 40 CP", ShiftOS.Properties.Resources.upgraderesize, "You can move and rollup windows, but with a few more Code Point, we may be able to let you change their size!" + Environment.NewLine + Environment.NewLine + "This upgrade will allow you to resize any resizable window.", "draggablewindows;windowborders", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Change OS Name - 15 CP", ShiftOS.Properties.Resources.upgradeosname, "Getting sick of being 'user@shiftos $>' Well now you can change that, how about 'user@ThEBesToSEver'?" + Environment.NewLine + Environment.NewLine + "(We like self adverising here)", null, "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("System Information - 40 CP", ShiftOS.Properties.Resources.upgradesysinfo, "Don't know your PC specs? Need to find out? want to know what version of ShiftOS your running?" + Environment.NewLine + Environment.NewLine + "Well, this is the app for you. May I present: the System Information App!", null, "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("TRM Files - 50 CP", ShiftOS.Properties.Resources.upgradetrm, "Typing commands into the terminal is all very well, but what about pre-writing the commands so you can use them at any time? What about the ability to create terminal files?" + Environment.NewLine + Environment.NewLine + "This upgrade will allow you to save textpad documents in .trm format, meaning they will run in the terminal if valid.", "fileskimmer", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Launcher Items - 20 CP", ShiftOS.Properties.Resources.upgradeshiftitems, "So you can shift the Applications Launcher button. Great, but arn't the menu items a little boring?" + Environment.NewLine + Environment.NewLine + "The Shift Launcher Items upgrade allow you to customize launcher items, as well as the button.", "shiftapplauncher", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Virus Scanner - 200 CP", ShiftOS.Properties.Resources.upgradevirusscanner, "ShiftOS is the most secure operating system ever made, but here's a virus scanner in case you feeling extra cautious..." + Environment.NewLine + Environment.NewLine + "Just making sure you're aware, this scans for viruses, it doesn't remove them...", null, "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("VS Removal Grade 1 - 100 CP", ShiftOS.Properties.Resources.upgraderemoveth1, "If your doing things properly, there is no need for this... But wounldn't it be good to remove viruses if you did find them?" + Environment.NewLine + Environment.NewLine + "This extention for the Virus Scanner will give it the ablitity to remove level 1 viruses.", "virusscanner", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("VS Removal Grade 2 - 100 CP", ShiftOS.Properties.Resources.upgraderemoveth2, "Wow, DevX better see this, still buying virus protection? You must be doing something dodgy..." + Environment.NewLine + Environment.NewLine + "This extention for the Virus Scanner will give it the ablitity to remove level 2 viruses.", "vsremovalgrade1", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("VS Removal Grade 3 - 100 CP", ShiftOS.Properties.Resources.upgraderemoveth3, "Ok, I'm calling DevX now! Seroiusly, you really don't need this... But give me your Code Points anyway!" + Environment.NewLine + Environment.NewLine + "This extention for the Virus Scanner will give it the ablitity to remove level 3 viruses.", "vsremovalgrade2", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("VS Removal Grade 4 - 100 CP", ShiftOS.Properties.Resources.upgraderemoveth4, "Fine, whatever. I'll stop warning you against useless upgrades. Why should I care. Just gime the money OK?" + Environment.NewLine + Environment.NewLine + "This extention for the Virus Scanner will give it the ablitity to remove level 4 viruses.", "vsremovalgrade3", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("App Icons - 15 CP", ShiftOS.Properties.Resources.iconArtpad, "Ever wanted to see an icon of the application on it's window, or on it's Panel Button, or on it's App Launcher entry? Well, this upgrade will allow that, for the low price of 13 CP!", "titletext", "fancy")); - - //0.1.x/re-adds - DefaultUpgrades.Add(new Shiftorium.Upgrade("Unity Mode - 1000 CP", ShiftOS.Properties.Resources.upgradeunitymode, "ShiftOS uses " + OSInfo.GetPlatformID() + " native code to run, but what if we extended our OS abstraction layer to be able to run the OS's desktop and applications? Hmmmm... this'd make for great compatibility with many software.", "limitlesscustomshades;multitasking", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Unity - 25 CP", ShiftOS.Properties.Resources.upgradealunitymode, "We have the ability to turn Unity on and off through the terminal, but let's make it better by adding an entry in the App Launcher!", "applaunchermenu;unitymode", "fancy")); - - //0.1.x/new - DefaultUpgrades.Add(new Shiftorium.Upgrade("Zoomable Terminal - 50 CP", ShiftOS.Properties.Resources.upgradeautoscrollterminal, "Now that the terminal can be scrolled, it can be useful to zoom the terminal in and out to make it more readable. Buy this upgrade and you can zoom the Terminal by holding CTRL and scrolling up or down", "terminalscrollbar", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Advanced Shifter - 100 CP", ShiftOS.Properties.Resources.upgradeadvancedshifter, "We can customize so much of ShiftOS now. App Launcher, desktop panel, titlebar, you name it. But let's do more. Let's allow even DEEPER customization, such as system menus and window backgrounds.", "shifter;skinning;shiftapplauncher;shiftdesktoppanel;shifttitlebar;basiccustomshade", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift System Menus - 25 CP", null, "The Shifter can now access deeper layers of the system, but what about adding a category to the Shifter that lets us modify something? This upgrade will add a new 'Menus' category where you can customize all aspects of the ShiftOS menu system.", "advancedshifter", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("AL Shiftnet Apps - 15 CP", null, "With the Shiftnet installed and the ability to install even more applications, it's time to make them easier to run. With this upgrade, all your Shiftnet Apps can be ran from the App Launcher!", "shiftnet", "software")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Set Terminal Colors - 25 CP", null, "Do you want to spice up your terminal? Well, apply this upgrade and you'll be able to change it's text and background colors.", "skinning", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Set Terminal Font - 5 CP", null, "Ever wanted to set the font style of your Terminal? Well, this is the upgrade for you. Use the \"font\" command to set the font style.", "setterminalcolors", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Name Changer - 50 CP", null, "This upgrade allows you to change the names of ShiftOS applications.", "applaunchermenu", "software")); - - //0.1.x/non-shiftorium - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shiftnet - 0 CP", null, "Shiftorium Upgrade for Shiftnet and Shiftnet Package Manager", "nodisplay", "fundamental")); - - //0.1.1/re-adds - DefaultUpgrades.Add(new Shiftorium.Upgrade("Desktop Icons - 50 CP", null, "A brilliant new invention from the ShiftOS developers has come: Desktop Icons - These, much like the App Launcher, allow you to launch applications as well as other files from the desktop.", "alshiftnetapps", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Desktop Icons - 25 CP", null, "This upgrade allows the customization of ShiftOS desktop icons.", "advancedshifter;desktopicons", "fancy")); - - //0.1.1/hidden - DefaultUpgrades.Add(new Shiftorium.Upgrade("Other Player Story - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("DevX Furious - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Aiden Nirh - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Hacker101 - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Other Player Rescue - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Hacking - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Hack Command - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Hacker Battles - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Mid Game Bridge - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Network Browser - 0 CP", null, null, "nodisplay", "fundamental")); - - //0.1.1/new - DefaultUpgrades.Add(new Shiftorium.Upgrade("Fancy Effects - 5000 CP", null, "Have you ever wanted to make your operating system look fancy, adding fade effects and other animations to various parts of the UI? If so, this upgrade is for you!", "limitlesscustomshades;shiftnet", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Fancy Effects - 45 CP", null, "ShiftOS is looking pretty darn fine now. But, let's make it look even better. With this upgrade you will be able to customize fancy effects in the Shifter!", "advancedshifter;fancyeffects", "fancy")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Icon Manager - 45 CP", null, "Add even more customization options to ShiftOS using the new Icon Manager. This tool allows you to change almost any icon on the system!", "advancedshifter;appicons", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("FS External Devices - 175 CP", null, "Ever wanted to see the contents of another device on the system? For example, a USB drive, CD, floppy, or another hard drive? Well this upgrade is for you. It will give File Skimmer the ability to see other drives on the system.", "fileskimmer", "useful")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Advanced Desktop - 50 CP", null, "Want to further customize the desktop panel? Want to add even more panels, and add custom widgets to the panels? This upgrade's for you!", "desktoppanel;midgamebridge", "useful")); - //0.1.1/category - DefaultUpgrades.Add(new Shiftorium.Upgrade("Useful - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Fancy - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Software - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("HoloChat - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("Story Complete - 0 CP", null, null, "nodisplay", "fundamental")); - - //0.1.1/netbrowser/tiers - DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_easy - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_medium - 0 CP", null, null, "nodisplay", "fundamental")); - DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_hard - 0 CP", null, null, "nodisplay", "fundamental")); - - } - - /// <summary> - /// Updates the registry. - /// </summary> - public static void UpdateShiftorium() - { - ShiftoriumUpgrades.Clear(); - - SetDefaultShiftoriumValues(); - try - { - string shiftoriumjson = File.ReadAllText(Paths.SystemDir + "_shiftorium.json"); - var newUpgrades = new Dictionary<string, bool>(); - if (shiftoriumjson.StartsWith("{")) - { - newUpgrades = JsonConvert.DeserializeObject<Dictionary<string, bool>>(shiftoriumjson); - } - else - { - newUpgrades = JsonConvert.DeserializeObject<Dictionary<string, bool>>(API.Encryption.Decrypt(shiftoriumjson)); - } - foreach (KeyValuePair<string, bool> kv in newUpgrades) - { - try - { - ShiftoriumUpgrades[kv.Key] = kv.Value; - } catch - { - Console.WriteLine("[Shiftorium/Registry] [ERROR] Upgrade {0} from disk doesn't seem to be found in the 'Default Upgrades' dictionary. This may be caused by a bug.", kv.Key); - } - } - } - catch - - { - string shiftoriumjson = JsonConvert.SerializeObject(ShiftoriumUpgrades); - if (API.DeveloperMode == true) - { - File.WriteAllText(Paths.SystemDir + "_shiftorium.json", shiftoriumjson); - } - else - { - File.WriteAllText(Paths.SystemDir + "_shiftorium.json", API.Encryption.Encrypt(shiftoriumjson)); - } - } - } - - /// <summary> - /// This void adds the DEFAULT Shiftorium Upgrade values to the Upgrade dictionary to prevent a crash. Add new upgrades here. - /// </summary> - public static void SetDefaultShiftoriumValues() - { - setUpgrades(); - foreach (Shiftorium.Upgrade upgrade in DefaultUpgrades) - { - ShiftoriumUpgrades.Add(upgrade.id, false); - } - } -} -} - -namespace Shiftorium -{ - public class Utilities - { - /// <summary> - /// Buy an upgrade. - /// </summary> - /// <param name="upgradeToBuy">Upgrade name</param> - /// <returns>Whether the upgrade could be bought.</returns> - public static bool Buy(Upgrade upgradeToBuy) - { - if(API.Codepoints >= upgradeToBuy.Cost / API.CurrentSave.PriceDivider) - { - SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades[upgradeToBuy.id] = true; - SaveSystem.Utilities.LoadedSave.codepoints -= upgradeToBuy.Cost / API.CurrentSave.PriceDivider; - SaveSystem.Utilities.saveGame(); - API.UpdateWindows(); - API.Log("[Shiftorium] Upgrade \"" + upgradeToBuy.id + "\" bought successfully, game saved."); - return true; - } - else - { - return false; - } - } - - /// <summary> - /// This method is for a virus. - /// </summary> - /// <param name="id"></param> - public static void Unbuy(string id) - { - if(API.Upgrades.ContainsKey(id)) - { - foreach(Shiftorium.Upgrade upg in SaveSystem.ShiftoriumRegistry.DefaultUpgrades) - { - if(upg.Dependencies.Contains(id)) - { - Unbuy(upg.id); - } - } - API.Upgrades[id] = false; - SaveSystem.Utilities.saveGame(); - } - } - - /// <summary> - /// Gets all upgrades that have not been bought and returns them to the caller. - /// </summary> - /// <returns></returns> - public static List<Upgrade> GetAvailable() - { - List<Upgrade> available = new List<Upgrade>(); - foreach(Upgrade upgrade in SaveSystem.ShiftoriumRegistry.DefaultUpgrades) - { - if (SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades[upgrade.id] == false) - { - try - { - if (BoughtAllDependencies(upgrade)) - { - available.Add(upgrade); - - } - - - } - catch - { - if (upgrade.id.Contains("dummy")) - { - available.Add(upgrade); - - } - } - } - - - } - return available; - } - - /// <summary> - /// Checks if you've bought all the dependencies of this upgrade. - /// </summary> - /// <param name="upgradeToCheck">Upgrade to search</param> - /// <returns>Whether you bought 'em all.</returns> - public static bool BoughtAllDependencies(Upgrade upgradeToCheck) - { - bool yes = true; - foreach(string id in upgradeToCheck.Dependencies) - { - if(API.Upgrades[id] == false) - { - yes = false; - } - } - return yes; - } - } - - public class Upgrade - { - /// <summary> - /// Initializes a new Shiftorium Upgrade. - /// </summary> - /// <param name="name">Name of the upgrade shown to the user.</param> - ///<param name="preview">An image that is shown below the upgrade description.</param> - /// <param name="desc">A small description of the upgrade.</param> - public Upgrade(string name, Image preview, string desc, string dependencies, string cat) { - string[] splitname = name.Split('-'); - - string[] splitcp = splitname[1].Remove(0, 1).Split(' '); - int cp = Convert.ToInt16(splitcp[0]); - - if(dependencies != null) - { - foreach(string id in dependencies.Split(';')) - { - Dependencies.Add(id); - } - } - - Preview = preview; - id = splitname[0].ToLower().Replace(" ", ""); - Name = name; - Description = desc; - Cost = cp; - Category = cat; - } - public List<string> Dependencies = new List<string>(); - public string id = "sampleupgrade"; - public string Name = "Sample Upgrade"; - public int Cost = 0; - public Image Preview = ShiftOS.Properties.Resources.upgradegray; - public string Description = "Sample Shiftorium Upgrade."; - public string Category = "fundamental"; - } -} diff --git a/source/WindowsFormsApplication1/ShiftOS.csproj b/source/WindowsFormsApplication1/ShiftOS.csproj index 7572db9..3380ad8 100644 --- a/source/WindowsFormsApplication1/ShiftOS.csproj +++ b/source/WindowsFormsApplication1/ShiftOS.csproj @@ -626,8 +626,6 @@ <None Include="Resources\MusicData.txt" /> <None Include="bin\Debug\Newtonsoft.Json.dll" /> <None Include="bin\Debug\NetSockets.dll" /> - <Content Include="Labyrinth.designer.vb" /> - <Content Include="Labyrinth.vb" /> <Compile Include="Paths.cs" /> <None Include="Resources\3beepvirus.wav" /> <None Include="Resources\anycolourshade.png" /> diff --git a/source/WindowsFormsApplication1/ShiftOSColorTable.cs b/source/WindowsFormsApplication1/ShiftOSColorTable.cs deleted file mode 100644 index f74b7c2..0000000 --- a/source/WindowsFormsApplication1/ShiftOSColorTable.cs +++ /dev/null @@ -1,238 +0,0 @@ -// <auto-generated> -// This code was generated by the .NET ToolStrip Customizer. -// http://toolstripcustomizer.codeplex.com/ -// </auto-generated> - -using System.Drawing; -using System.Windows.Forms; - -namespace ShiftOS -{ - class ShiftOSColorTable : ProfessionalColorTable - { - public override Color ButtonSelectedHighlight - { - get { return API.CurrentSkin.Menu_ButtonSelectedHighlight; } - } - public override Color ButtonSelectedHighlightBorder - { - get { return API.CurrentSkin.Menu_ButtonSelectedHighlight; } - } - public override Color ButtonPressedHighlight - { - get { return API.CurrentSkin.Menu_ButtonPressedHighlight; } - } - public override Color ButtonPressedHighlightBorder - { - get { return API.CurrentSkin.Menu_ButtonPressedHighlight; } - } - public override Color ButtonCheckedHighlight - { - get { return API.CurrentSkin.Menu_ButtonCheckedHighlight; } - } - public override Color ButtonCheckedHighlightBorder - { - get { return API.CurrentSkin.Menu_ButtonCheckedHighlightBorder; } - } - public override Color ButtonPressedBorder - { - get { return API.CurrentSkin.Menu_ButtonPressedBorder; } - } - public override Color ButtonSelectedBorder - { - get { return API.CurrentSkin.Menu_ButtonSelectedBorder; } - } - public override Color ButtonCheckedGradientBegin - { - get { return API.CurrentSkin.Menu_ButtonCheckedGradientBegin; } - } - public override Color ButtonCheckedGradientMiddle - { - get { return API.CurrentSkin.Menu_ButtonCheckedGradientMiddle; } - } - public override Color ButtonCheckedGradientEnd - { - get { return API.CurrentSkin.Menu_ButtonCheckedGradientEnd; } - } - public override Color ButtonSelectedGradientBegin - { - get { return API.CurrentSkin.Menu_ButtonSelectedGradientBegin; } - } - public override Color ButtonSelectedGradientMiddle - { - get { return API.CurrentSkin.Menu_ButtonSelectedGradientMiddle; } - } - public override Color ButtonSelectedGradientEnd - { - get { return API.CurrentSkin.Menu_ButtonSelectedGradientEnd; } - } - public override Color ButtonPressedGradientBegin - { - get { return API.CurrentSkin.Menu_ButtonPressedGradientBegin; } - } - public override Color ButtonPressedGradientMiddle - { - get { return API.CurrentSkin.Menu_ButtonPressedGradientMiddle; } - } - public override Color ButtonPressedGradientEnd - { - get { return API.CurrentSkin.Menu_ButtonPressedGradientEnd; } - } - public override Color CheckBackground - { - get { return API.CurrentSkin.Menu_CheckBackground; } - } - public override Color CheckSelectedBackground - { - get { return API.CurrentSkin.Menu_CheckSelectedBackground; } - } - public override Color CheckPressedBackground - { - get { return API.CurrentSkin.Menu_CheckPressedBackground; } - } - public override Color GripDark - { - get { return Color.Transparent; } - } - public override Color GripLight - { - get { return Color.Transparent; } - } - public override Color ImageMarginGradientBegin - { - get { return API.CurrentSkin.Menu_ImageMarginGradientBegin; } - } - public override Color ImageMarginGradientMiddle - { - get { return API.CurrentSkin.Menu_ImageMarginGradientMiddle; } - } - public override Color ImageMarginGradientEnd - { - get { return API.CurrentSkin.Menu_ImageMarginGradientEnd; } - } - public override Color ImageMarginRevealedGradientBegin - { - get { return API.CurrentSkin.Menu_ImageMarginGradientBegin; } - } - public override Color ImageMarginRevealedGradientMiddle - { - get { return API.CurrentSkin.Menu_ImageMarginGradientMiddle; } - } - public override Color ImageMarginRevealedGradientEnd - { - get { return API.CurrentSkin.Menu_ImageMarginGradientEnd; } - } - public override Color MenuStripGradientBegin - { - get { return API.CurrentSkin.Menu_MenuStripGradientBegin; } - } - public override Color MenuStripGradientEnd - { - get { return API.CurrentSkin.Menu_MenuStripGradientEnd; } - } - public override Color MenuItemSelected - { - get { return API.CurrentSkin.Menu_MenuItemSelected; } - } - public override Color MenuItemBorder - { - get { return API.CurrentSkin.Menu_MenuItemSelected; } - } - public override Color MenuBorder - { - get { return API.CurrentSkin.Menu_MenuBorder; } - } - public override Color MenuItemSelectedGradientBegin - { - get { return API.CurrentSkin.Menu_MenuItemSelectedGradientBegin; } - } - public override Color MenuItemSelectedGradientEnd - { - get { return API.CurrentSkin.Menu_MenuItemSelectedGradientEnd; } - } - public override Color MenuItemPressedGradientBegin - { - get { return API.CurrentSkin.Menu_MenuItemPressedGradientBegin; } - } - public override Color MenuItemPressedGradientMiddle - { - get { return API.CurrentSkin.Menu_MenuItemPressedGradientMiddle; } - } - public override Color MenuItemPressedGradientEnd - { - get { return API.CurrentSkin.Menu_MenuItemPressedGradientEnd; } - } - public override Color RaftingContainerGradientBegin - { - get { return API.CurrentSkin.Menu_RaftingContainerGradientBegin; } - } - public override Color RaftingContainerGradientEnd - { - get { return API.CurrentSkin.Menu_RaftingContainerGradientEnd; } - } - public override Color SeparatorDark - { - get { return API.CurrentSkin.Menu_SeparatorDark; } - } - public override Color SeparatorLight - { - get { return API.CurrentSkin.Menu_SeparatorLight; } - } - public override Color StatusStripGradientBegin - { - get { return API.CurrentSkin.Menu_StatusStripGradientBegin; } - } - public override Color StatusStripGradientEnd - { - get { return API.CurrentSkin.Menu_StatusStripGradientEnd; } - } - public override Color ToolStripBorder - { - get { return API.CurrentSkin.Menu_ToolStripBorder; } - } - public override Color ToolStripDropDownBackground - { - get { return API.CurrentSkin.Menu_ToolStripDropDownBackground; } - } - public override Color ToolStripGradientBegin - { - get { return API.CurrentSkin.Menu_ToolStripGradientBegin; } - } - public override Color ToolStripGradientMiddle - { - get { return API.CurrentSkin.Menu_ToolStripGradientMiddle; } - } - public override Color ToolStripGradientEnd - { - get { return API.CurrentSkin.Menu_ToolStripGradientEnd; } - } - public override Color ToolStripContentPanelGradientBegin - { - get { return API.CurrentSkin.Menu_ToolStripContentPanelGradientBegin; } - } - public override Color ToolStripContentPanelGradientEnd - { - get { return API.CurrentSkin.Menu_ToolStripContentPanelGradientEnd; } - } - public override Color ToolStripPanelGradientBegin - { - get { return API.CurrentSkin.Menu_ToolStripPanelGradientBegin; } - } - public override Color ToolStripPanelGradientEnd - { - get { return API.CurrentSkin.Menu_ToolStripPanelGradientEnd; } - } - public override Color OverflowButtonGradientBegin - { - get { return Color.Transparent; } - } - public override Color OverflowButtonGradientMiddle - { - get { return Color.Transparent; } - } - public override Color OverflowButtonGradientEnd - { - get { return Color.Transparent; } - } - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShiftOSDesktop.Designer.cs b/source/WindowsFormsApplication1/ShiftOSDesktop.Designer.cs deleted file mode 100644 index fad1f66..0000000 --- a/source/WindowsFormsApplication1/ShiftOSDesktop.Designer.cs +++ /dev/null @@ -1,1583 +0,0 @@ -namespace ShiftOS -{ - partial class ShiftOSDesktop - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.desktoppanel = new System.Windows.Forms.Panel(); - this.pnlnotifications = new System.Windows.Forms.FlowLayoutPanel(); - this.pnlpanelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); - this.applaunchermenuholder = new System.Windows.Forms.Panel(); - this.desktopappmenu = new System.Windows.Forms.MenuStrip(); - this.ApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ArtpadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.AudioplayerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.BitnoteDiggerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.BitnoteWalletToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.CalculatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.CatalystToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.ClockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.DodgeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.downloadmanagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.FileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.FloodGateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.IconManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.InstallerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.KnowledgeInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.MazeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.NameChangerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.orcwriteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.PongToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShiftnetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShiftoriumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.SkinLoaderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.SkinShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.SnakeyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.sysinfoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.TerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.TextPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.WebBrowserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.VideoplayerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.VirusScannerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.unitySeperator = new System.Windows.Forms.ToolStripSeparator(); - this.UnityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.timepanel = new System.Windows.Forms.Panel(); - this.paneltimetext = new System.Windows.Forms.Label(); - this.tbclockicon = new System.Windows.Forms.PictureBox(); - this.tbclocktext = new System.Windows.Forms.Label(); - this.tbsysinfoicon = new System.Windows.Forms.PictureBox(); - this.tbsysinfotext = new System.Windows.Forms.Label(); - this.tbskinloadericon = new System.Windows.Forms.PictureBox(); - this.tbskinloadertext = new System.Windows.Forms.Label(); - this.tbfileskimmericon = new System.Windows.Forms.PictureBox(); - this.tbfileskimmertext = new System.Windows.Forms.Label(); - this.tbfileopenericon = new System.Windows.Forms.PictureBox(); - this.tbfileopenertext = new System.Windows.Forms.Label(); - this.tbinfoboxicon = new System.Windows.Forms.PictureBox(); - this.tbinfoboxtext = new System.Windows.Forms.Label(); - this.tbknowledgeinputicon = new System.Windows.Forms.PictureBox(); - this.tbknowledgeinputtext = new System.Windows.Forms.Label(); - this.tbcolourpickericon = new System.Windows.Forms.PictureBox(); - this.tbcolourpickertext = new System.Windows.Forms.Label(); - this.tbshiftoriumicon = new System.Windows.Forms.PictureBox(); - this.tbshiftoriumtext = new System.Windows.Forms.Label(); - this.tbpongicon = new System.Windows.Forms.PictureBox(); - this.tbpongtext = new System.Windows.Forms.Label(); - this.tbterminalicon = new System.Windows.Forms.PictureBox(); - this.tbterminaltext = new System.Windows.Forms.Label(); - this.tbtextpadicon = new System.Windows.Forms.PictureBox(); - this.tbtextpadtext = new System.Windows.Forms.Label(); - this.tbgraphicpickericon = new System.Windows.Forms.PictureBox(); - this.tbgraphicpickertext = new System.Windows.Forms.Label(); - this.tbartpadicon = new System.Windows.Forms.PictureBox(); - this.tbartpadtext = new System.Windows.Forms.Label(); - this.tbcalculatoricon = new System.Windows.Forms.PictureBox(); - this.tbcalculatortext = new System.Windows.Forms.Label(); - this.tbaudioplayericon = new System.Windows.Forms.PictureBox(); - this.tbaudioplayertext = new System.Windows.Forms.Label(); - this.tbvideoplayericon = new System.Windows.Forms.PictureBox(); - this.tbvideoplayertext = new System.Windows.Forms.Label(); - this.tbwebbrowsericon = new System.Windows.Forms.PictureBox(); - this.tbwebbrowsertext = new System.Windows.Forms.Label(); - this.tbnamechangericon = new System.Windows.Forms.PictureBox(); - this.tbnamechangertext = new System.Windows.Forms.Label(); - this.tbiconmanagericon = new System.Windows.Forms.PictureBox(); - this.tbiconmanagertext = new System.Windows.Forms.Label(); - this.tbbitnotewalleticon = new System.Windows.Forms.PictureBox(); - this.tbbitnotewallettext = new System.Windows.Forms.Label(); - this.tbbitnotediggericon = new System.Windows.Forms.PictureBox(); - this.tbbitnotediggertext = new System.Windows.Forms.Label(); - this.tbskinshiftericon = new System.Windows.Forms.PictureBox(); - this.tbskinshiftertext = new System.Windows.Forms.Label(); - this.tbdownloadericon = new System.Windows.Forms.PictureBox(); - this.tbdownloadertext = new System.Windows.Forms.Label(); - this.tbshiftneticon = new System.Windows.Forms.PictureBox(); - this.tbshiftnettext = new System.Windows.Forms.Label(); - this.tbdodgeicon = new System.Windows.Forms.PictureBox(); - this.tbdodgetext = new System.Windows.Forms.Label(); - this.tbdownloadmanagericon = new System.Windows.Forms.PictureBox(); - this.tbdownloadmanagertext = new System.Windows.Forms.Label(); - this.tbcatalysticon = new System.Windows.Forms.PictureBox(); - this.lbcatalystname = new System.Windows.Forms.Label(); - this.tbinstallericon = new System.Windows.Forms.PictureBox(); - this.tbinstallertext = new System.Windows.Forms.Label(); - this.tbsnakeyicon = new System.Windows.Forms.PictureBox(); - this.tbsnakeytext = new System.Windows.Forms.Label(); - this.tborcwriteicon = new System.Windows.Forms.PictureBox(); - this.tborcwritetext = new System.Windows.Forms.Label(); - this.tbfloodgateicon = new System.Windows.Forms.PictureBox(); - this.tbfloodgatetext = new System.Windows.Forms.Label(); - this.tbmazeicon = new System.Windows.Forms.PictureBox(); - this.tbmazetext = new System.Windows.Forms.Label(); - this.tbvirusscannericon = new System.Windows.Forms.PictureBox(); - this.tbvirusscannertext = new System.Windows.Forms.Label(); - this.tbfilesavericon = new System.Windows.Forms.PictureBox(); - this.tbfilesavertext = new System.Windows.Forms.Label(); - this.tbshiftericon = new System.Windows.Forms.PictureBox(); - this.tbshiftertext = new System.Windows.Forms.Label(); - this.pnlpanelbuttonfloatybird = new System.Windows.Forms.Panel(); - this.tbfloatybirdicon = new System.Windows.Forms.PictureBox(); - this.tbfloatybirdtext = new System.Windows.Forms.Label(); - this.floatybirdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.clocktick = new System.Windows.Forms.Timer(this.components); - this.autosave = new System.Windows.Forms.Timer(this.components); - this.nocheat = new System.Windows.Forms.Timer(this.components); - this.tmrwindowedtest = new System.Windows.Forms.Timer(this.components); - this.cmbdesktopoptions = new System.Windows.Forms.ContextMenuStrip(this.components); - this.NewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.FolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); - this.ArtpadPictureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.TextDocumentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.NewSkin = new System.Windows.Forms.ToolStripMenuItem(); - this.WebpageToolStripMenuItem = new System.Windows.Forms.ToolStripSeparator(); - this.ShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.scriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addDesktopPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.widgetManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.imgshiftnetapps = new System.Windows.Forms.ImageList(this.components); - this.lbldebug = new System.Windows.Forms.Label(); - this.lblog = new System.Windows.Forms.Label(); - this.flicons = new System.Windows.Forms.FlowLayoutPanel(); - this.cmbfactions = new System.Windows.Forms.ContextMenuStrip(this.components); - this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.cbwidget = new System.Windows.Forms.ContextMenuStrip(this.components); - this.wlocmenu = new System.Windows.Forms.ToolStripMenuItem(); - this.cbdpanel = new System.Windows.Forms.ContextMenuStrip(this.components); - this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); - this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.placeHereToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.appLauncherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.panelButtonsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.clockToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.desktoppanel.SuspendLayout(); - this.applaunchermenuholder.SuspendLayout(); - this.desktopappmenu.SuspendLayout(); - this.timepanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tbclockicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbsysinfoicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbskinloadericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbfileskimmericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbfileopenericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbinfoboxicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbknowledgeinputicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbcolourpickericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbshiftoriumicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbpongicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbterminalicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbtextpadicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbgraphicpickericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbartpadicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbcalculatoricon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbaudioplayericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbvideoplayericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbwebbrowsericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbnamechangericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbiconmanagericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbbitnotewalleticon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbbitnotediggericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbskinshiftericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbdownloadericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbshiftneticon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbdodgeicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbdownloadmanagericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbcatalysticon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbinstallericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbsnakeyicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tborcwriteicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbfloodgateicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbmazeicon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbvirusscannericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbfilesavericon)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbshiftericon)).BeginInit(); - this.pnlpanelbuttonfloatybird.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tbfloatybirdicon)).BeginInit(); - this.cmbdesktopoptions.SuspendLayout(); - this.cmbfactions.SuspendLayout(); - this.cbwidget.SuspendLayout(); - this.cbdpanel.SuspendLayout(); - this.SuspendLayout(); - // - // desktoppanel - // - this.desktoppanel.BackColor = System.Drawing.Color.Gray; - this.desktoppanel.Controls.Add(this.pnlnotifications); - this.desktoppanel.Controls.Add(this.pnlpanelbuttonholder); - this.desktoppanel.Controls.Add(this.applaunchermenuholder); - this.desktoppanel.Controls.Add(this.timepanel); - this.desktoppanel.Dock = System.Windows.Forms.DockStyle.Top; - this.desktoppanel.Location = new System.Drawing.Point(0, 0); - this.desktoppanel.Name = "desktoppanel"; - this.desktoppanel.Size = new System.Drawing.Size(1268, 24); - this.desktoppanel.TabIndex = 0; - this.desktoppanel.Visible = false; - // - // pnlnotifications - // - this.pnlnotifications.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlnotifications.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.pnlnotifications.Location = new System.Drawing.Point(132, 0); - this.pnlnotifications.Name = "pnlnotifications"; - this.pnlnotifications.Size = new System.Drawing.Size(1039, 24); - this.pnlnotifications.TabIndex = 2; - // - // pnlpanelbuttonholder - // - this.pnlpanelbuttonholder.AutoSize = true; - this.pnlpanelbuttonholder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.pnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; - this.pnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Left; - this.pnlpanelbuttonholder.Location = new System.Drawing.Point(130, 0); - this.pnlpanelbuttonholder.Name = "pnlpanelbuttonholder"; - this.pnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); - this.pnlpanelbuttonholder.Size = new System.Drawing.Size(2, 24); - this.pnlpanelbuttonholder.TabIndex = 1; - // - // applaunchermenuholder - // - this.applaunchermenuholder.Controls.Add(this.desktopappmenu); - this.applaunchermenuholder.Dock = System.Windows.Forms.DockStyle.Left; - this.applaunchermenuholder.Location = new System.Drawing.Point(0, 0); - this.applaunchermenuholder.Name = "applaunchermenuholder"; - this.applaunchermenuholder.Size = new System.Drawing.Size(130, 24); - this.applaunchermenuholder.TabIndex = 3; - // - // desktopappmenu - // - this.desktopappmenu.AutoSize = false; - this.desktopappmenu.BackColor = System.Drawing.Color.Transparent; - this.desktopappmenu.GripMargin = new System.Windows.Forms.Padding(0); - this.desktopappmenu.ImageScalingSize = new System.Drawing.Size(32, 32); - this.desktopappmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ApplicationsToolStripMenuItem}); - this.desktopappmenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; - this.desktopappmenu.Location = new System.Drawing.Point(0, 0); - this.desktopappmenu.Name = "desktopappmenu"; - this.desktopappmenu.Padding = new System.Windows.Forms.Padding(0); - this.desktopappmenu.Size = new System.Drawing.Size(130, 24); - this.desktopappmenu.TabIndex = 0; - this.desktopappmenu.TabStop = true; - this.desktopappmenu.Text = "MenuStrip1"; - // - // ApplicationsToolStripMenuItem - // - this.ApplicationsToolStripMenuItem.AutoSize = false; - this.ApplicationsToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ApplicationsToolStripMenuItem.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.ApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ArtpadToolStripMenuItem, - this.AudioplayerToolStripMenuItem, - this.BitnoteDiggerToolStripMenuItem, - this.BitnoteWalletToolStripMenuItem, - this.CalculatorToolStripMenuItem, - this.CatalystToolStripMenuItem1, - this.ClockToolStripMenuItem, - this.DodgeToolStripMenuItem, - this.downloadmanagerToolStripMenuItem, - this.FileSkimmerToolStripMenuItem, - this.FloodGateToolStripMenuItem, - this.IconManagerToolStripMenuItem, - this.InstallerToolStripMenuItem, - this.KnowledgeInputToolStripMenuItem, - this.MazeToolStripMenuItem, - this.NameChangerToolStripMenuItem, - this.orcwriteToolStripMenuItem, - this.PongToolStripMenuItem, - this.ShifterToolStripMenuItem, - this.ShiftnetToolStripMenuItem, - this.ShiftoriumToolStripMenuItem, - this.SkinLoaderToolStripMenuItem, - this.SkinShifterToolStripMenuItem, - this.SnakeyToolStripMenuItem, - this.sysinfoToolStripMenuItem, - this.TerminalToolStripMenuItem, - this.TextPadToolStripMenuItem, - this.WebBrowserToolStripMenuItem, - this.VideoplayerToolStripMenuItem, - this.VirusScannerToolStripMenuItem, - this.unitySeperator, - this.UnityToolStripMenuItem, - this.ShutdownToolStripMenuItem}); - this.ApplicationsToolStripMenuItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"; - this.ApplicationsToolStripMenuItem.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.ApplicationsToolStripMenuItem.ShowShortcutKeys = false; - this.ApplicationsToolStripMenuItem.Size = new System.Drawing.Size(94, 24); - this.ApplicationsToolStripMenuItem.Text = "Applications"; - this.ApplicationsToolStripMenuItem.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; - this.ApplicationsToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; - this.ApplicationsToolStripMenuItem.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ALClick); - this.ApplicationsToolStripMenuItem.MouseEnter += new System.EventHandler(this.ALHover); - this.ApplicationsToolStripMenuItem.MouseLeave += new System.EventHandler(this.ALReset); - // - // ArtpadToolStripMenuItem - // - this.ArtpadToolStripMenuItem.Name = "ArtpadToolStripMenuItem"; - this.ArtpadToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.ArtpadToolStripMenuItem.Text = "ArtPad"; - // - // AudioplayerToolStripMenuItem - // - this.AudioplayerToolStripMenuItem.Name = "AudioplayerToolStripMenuItem"; - this.AudioplayerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.AudioplayerToolStripMenuItem.Text = "Audio Player"; - // - // BitnoteDiggerToolStripMenuItem - // - this.BitnoteDiggerToolStripMenuItem.Name = "BitnoteDiggerToolStripMenuItem"; - this.BitnoteDiggerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.BitnoteDiggerToolStripMenuItem.Text = "Bitnote Digger"; - // - // BitnoteWalletToolStripMenuItem - // - this.BitnoteWalletToolStripMenuItem.Name = "BitnoteWalletToolStripMenuItem"; - this.BitnoteWalletToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.BitnoteWalletToolStripMenuItem.Text = "Bitnote Wallet"; - // - // CalculatorToolStripMenuItem - // - this.CalculatorToolStripMenuItem.Name = "CalculatorToolStripMenuItem"; - this.CalculatorToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.CalculatorToolStripMenuItem.Text = "Calculator"; - // - // CatalystToolStripMenuItem1 - // - this.CatalystToolStripMenuItem1.Name = "CatalystToolStripMenuItem1"; - this.CatalystToolStripMenuItem1.Size = new System.Drawing.Size(214, 22); - this.CatalystToolStripMenuItem1.Text = "Catalyst"; - // - // ClockToolStripMenuItem - // - this.ClockToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ClockToolStripMenuItem.Name = "ClockToolStripMenuItem"; - this.ClockToolStripMenuItem.ShowShortcutKeys = false; - this.ClockToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.ClockToolStripMenuItem.Text = "Clock"; - // - // DodgeToolStripMenuItem - // - this.DodgeToolStripMenuItem.Name = "DodgeToolStripMenuItem"; - this.DodgeToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.DodgeToolStripMenuItem.Text = "Dodge"; - // - // downloadmanagerToolStripMenuItem - // - this.downloadmanagerToolStripMenuItem.Name = "downloadmanagerToolStripMenuItem"; - this.downloadmanagerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.downloadmanagerToolStripMenuItem.Text = "Download Manager"; - // - // FileSkimmerToolStripMenuItem - // - this.FileSkimmerToolStripMenuItem.Name = "FileSkimmerToolStripMenuItem"; - this.FileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.FileSkimmerToolStripMenuItem.Text = "File Skimmer"; - // - // FloodGateToolStripMenuItem - // - this.FloodGateToolStripMenuItem.Name = "FloodGateToolStripMenuItem"; - this.FloodGateToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.FloodGateToolStripMenuItem.Text = "FloodGate Manager"; - // - // IconManagerToolStripMenuItem - // - this.IconManagerToolStripMenuItem.Name = "IconManagerToolStripMenuItem"; - this.IconManagerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.IconManagerToolStripMenuItem.Text = "Icon Manager"; - // - // InstallerToolStripMenuItem - // - this.InstallerToolStripMenuItem.Name = "InstallerToolStripMenuItem"; - this.InstallerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.InstallerToolStripMenuItem.Text = "Installer"; - // - // KnowledgeInputToolStripMenuItem - // - this.KnowledgeInputToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.KnowledgeInputToolStripMenuItem.Name = "KnowledgeInputToolStripMenuItem"; - this.KnowledgeInputToolStripMenuItem.ShowShortcutKeys = false; - this.KnowledgeInputToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.KnowledgeInputToolStripMenuItem.Text = "Knowledge Input"; - // - // MazeToolStripMenuItem - // - this.MazeToolStripMenuItem.Name = "MazeToolStripMenuItem"; - this.MazeToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.MazeToolStripMenuItem.Text = "Labyrinth"; - // - // NameChangerToolStripMenuItem - // - this.NameChangerToolStripMenuItem.Name = "NameChangerToolStripMenuItem"; - this.NameChangerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.NameChangerToolStripMenuItem.Text = "Name Changer"; - // - // orcwriteToolStripMenuItem - // - this.orcwriteToolStripMenuItem.Name = "orcwriteToolStripMenuItem"; - this.orcwriteToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.orcwriteToolStripMenuItem.Text = "OrcWrite"; - // - // PongToolStripMenuItem - // - this.PongToolStripMenuItem.Name = "PongToolStripMenuItem"; - this.PongToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.PongToolStripMenuItem.Text = "Pong"; - // - // ShifterToolStripMenuItem - // - this.ShifterToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShifterToolStripMenuItem.Name = "ShifterToolStripMenuItem"; - this.ShifterToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.ShifterToolStripMenuItem.Text = "Shifter"; - // - // ShiftnetToolStripMenuItem - // - this.ShiftnetToolStripMenuItem.Name = "ShiftnetToolStripMenuItem"; - this.ShiftnetToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.ShiftnetToolStripMenuItem.Text = "Shiftnet"; - // - // ShiftoriumToolStripMenuItem - // - this.ShiftoriumToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShiftoriumToolStripMenuItem.Name = "ShiftoriumToolStripMenuItem"; - this.ShiftoriumToolStripMenuItem.ShowShortcutKeys = false; - this.ShiftoriumToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.ShiftoriumToolStripMenuItem.Text = "Shiftorium"; - // - // SkinLoaderToolStripMenuItem - // - this.SkinLoaderToolStripMenuItem.Name = "SkinLoaderToolStripMenuItem"; - this.SkinLoaderToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.SkinLoaderToolStripMenuItem.Text = "Skin Loader"; - // - // SkinShifterToolStripMenuItem - // - this.SkinShifterToolStripMenuItem.Name = "SkinShifterToolStripMenuItem"; - this.SkinShifterToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.SkinShifterToolStripMenuItem.Text = "Skin Shifter"; - // - // SnakeyToolStripMenuItem - // - this.SnakeyToolStripMenuItem.Name = "SnakeyToolStripMenuItem"; - this.SnakeyToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.SnakeyToolStripMenuItem.Text = "Snakey"; - // - // sysinfoToolStripMenuItem - // - this.sysinfoToolStripMenuItem.Name = "sysinfoToolStripMenuItem"; - this.sysinfoToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.sysinfoToolStripMenuItem.Text = "System Information"; - // - // TerminalToolStripMenuItem - // - this.TerminalToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.TerminalToolStripMenuItem.Name = "TerminalToolStripMenuItem"; - this.TerminalToolStripMenuItem.ShowShortcutKeys = false; - this.TerminalToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.TerminalToolStripMenuItem.Text = "Terminal"; - // - // TextPadToolStripMenuItem - // - this.TextPadToolStripMenuItem.Name = "TextPadToolStripMenuItem"; - this.TextPadToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.TextPadToolStripMenuItem.Text = "TextPad"; - // - // WebBrowserToolStripMenuItem - // - this.WebBrowserToolStripMenuItem.Name = "WebBrowserToolStripMenuItem"; - this.WebBrowserToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.WebBrowserToolStripMenuItem.Text = "Web Browser"; - // - // VideoplayerToolStripMenuItem - // - this.VideoplayerToolStripMenuItem.Name = "VideoplayerToolStripMenuItem"; - this.VideoplayerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.VideoplayerToolStripMenuItem.Text = "Video Player"; - // - // VirusScannerToolStripMenuItem - // - this.VirusScannerToolStripMenuItem.Name = "VirusScannerToolStripMenuItem"; - this.VirusScannerToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.VirusScannerToolStripMenuItem.Text = "Virus Scanner"; - // - // unitySeperator - // - this.unitySeperator.BackColor = System.Drawing.Color.Transparent; - this.unitySeperator.ForeColor = System.Drawing.Color.White; - this.unitySeperator.Name = "unitySeperator"; - this.unitySeperator.Size = new System.Drawing.Size(211, 6); - // - // UnityToolStripMenuItem - // - this.UnityToolStripMenuItem.Name = "UnityToolStripMenuItem"; - this.UnityToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.UnityToolStripMenuItem.Text = "Toggle Unity Mode"; - // - // ShutdownToolStripMenuItem - // - this.ShutdownToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"; - this.ShutdownToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.ShutdownToolStripMenuItem.Text = "Shut Down"; - // - // timepanel - // - this.timepanel.Controls.Add(this.paneltimetext); - this.timepanel.Dock = System.Windows.Forms.DockStyle.Right; - this.timepanel.Location = new System.Drawing.Point(1171, 0); - this.timepanel.Name = "timepanel"; - this.timepanel.Size = new System.Drawing.Size(97, 24); - this.timepanel.TabIndex = 2; - // - // paneltimetext - // - this.paneltimetext.AutoSize = true; - this.paneltimetext.BackColor = System.Drawing.Color.Transparent; - this.paneltimetext.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.paneltimetext.Location = new System.Drawing.Point(5, 0); - this.paneltimetext.Name = "paneltimetext"; - this.paneltimetext.Size = new System.Drawing.Size(80, 24); - this.paneltimetext.TabIndex = 1; - this.paneltimetext.Text = "5000023"; - this.paneltimetext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // tbclockicon - // - this.tbclockicon.Location = new System.Drawing.Point(0, 0); - this.tbclockicon.Name = "tbclockicon"; - this.tbclockicon.Size = new System.Drawing.Size(100, 50); - this.tbclockicon.TabIndex = 0; - this.tbclockicon.TabStop = false; - // - // tbclocktext - // - this.tbclocktext.Location = new System.Drawing.Point(0, 0); - this.tbclocktext.Name = "tbclocktext"; - this.tbclocktext.Size = new System.Drawing.Size(100, 23); - this.tbclocktext.TabIndex = 0; - // - // tbsysinfoicon - // - this.tbsysinfoicon.Location = new System.Drawing.Point(0, 0); - this.tbsysinfoicon.Name = "tbsysinfoicon"; - this.tbsysinfoicon.Size = new System.Drawing.Size(100, 50); - this.tbsysinfoicon.TabIndex = 0; - this.tbsysinfoicon.TabStop = false; - // - // tbsysinfotext - // - this.tbsysinfotext.Location = new System.Drawing.Point(0, 0); - this.tbsysinfotext.Name = "tbsysinfotext"; - this.tbsysinfotext.Size = new System.Drawing.Size(100, 23); - this.tbsysinfotext.TabIndex = 0; - // - // tbskinloadericon - // - this.tbskinloadericon.Location = new System.Drawing.Point(0, 0); - this.tbskinloadericon.Name = "tbskinloadericon"; - this.tbskinloadericon.Size = new System.Drawing.Size(100, 50); - this.tbskinloadericon.TabIndex = 0; - this.tbskinloadericon.TabStop = false; - // - // tbskinloadertext - // - this.tbskinloadertext.Location = new System.Drawing.Point(0, 0); - this.tbskinloadertext.Name = "tbskinloadertext"; - this.tbskinloadertext.Size = new System.Drawing.Size(100, 23); - this.tbskinloadertext.TabIndex = 0; - // - // tbfileskimmericon - // - this.tbfileskimmericon.Location = new System.Drawing.Point(0, 0); - this.tbfileskimmericon.Name = "tbfileskimmericon"; - this.tbfileskimmericon.Size = new System.Drawing.Size(100, 50); - this.tbfileskimmericon.TabIndex = 0; - this.tbfileskimmericon.TabStop = false; - // - // tbfileskimmertext - // - this.tbfileskimmertext.Location = new System.Drawing.Point(0, 0); - this.tbfileskimmertext.Name = "tbfileskimmertext"; - this.tbfileskimmertext.Size = new System.Drawing.Size(100, 23); - this.tbfileskimmertext.TabIndex = 0; - // - // tbfileopenericon - // - this.tbfileopenericon.Location = new System.Drawing.Point(0, 0); - this.tbfileopenericon.Name = "tbfileopenericon"; - this.tbfileopenericon.Size = new System.Drawing.Size(100, 50); - this.tbfileopenericon.TabIndex = 0; - this.tbfileopenericon.TabStop = false; - // - // tbfileopenertext - // - this.tbfileopenertext.Location = new System.Drawing.Point(0, 0); - this.tbfileopenertext.Name = "tbfileopenertext"; - this.tbfileopenertext.Size = new System.Drawing.Size(100, 23); - this.tbfileopenertext.TabIndex = 0; - // - // tbinfoboxicon - // - this.tbinfoboxicon.Location = new System.Drawing.Point(0, 0); - this.tbinfoboxicon.Name = "tbinfoboxicon"; - this.tbinfoboxicon.Size = new System.Drawing.Size(100, 50); - this.tbinfoboxicon.TabIndex = 0; - this.tbinfoboxicon.TabStop = false; - // - // tbinfoboxtext - // - this.tbinfoboxtext.Location = new System.Drawing.Point(0, 0); - this.tbinfoboxtext.Name = "tbinfoboxtext"; - this.tbinfoboxtext.Size = new System.Drawing.Size(100, 23); - this.tbinfoboxtext.TabIndex = 0; - // - // tbknowledgeinputicon - // - this.tbknowledgeinputicon.Location = new System.Drawing.Point(0, 0); - this.tbknowledgeinputicon.Name = "tbknowledgeinputicon"; - this.tbknowledgeinputicon.Size = new System.Drawing.Size(100, 50); - this.tbknowledgeinputicon.TabIndex = 0; - this.tbknowledgeinputicon.TabStop = false; - // - // tbknowledgeinputtext - // - this.tbknowledgeinputtext.Location = new System.Drawing.Point(0, 0); - this.tbknowledgeinputtext.Name = "tbknowledgeinputtext"; - this.tbknowledgeinputtext.Size = new System.Drawing.Size(100, 23); - this.tbknowledgeinputtext.TabIndex = 0; - // - // tbcolourpickericon - // - this.tbcolourpickericon.Location = new System.Drawing.Point(0, 0); - this.tbcolourpickericon.Name = "tbcolourpickericon"; - this.tbcolourpickericon.Size = new System.Drawing.Size(100, 50); - this.tbcolourpickericon.TabIndex = 0; - this.tbcolourpickericon.TabStop = false; - // - // tbcolourpickertext - // - this.tbcolourpickertext.Location = new System.Drawing.Point(0, 0); - this.tbcolourpickertext.Name = "tbcolourpickertext"; - this.tbcolourpickertext.Size = new System.Drawing.Size(100, 23); - this.tbcolourpickertext.TabIndex = 0; - // - // tbshiftoriumicon - // - this.tbshiftoriumicon.Location = new System.Drawing.Point(0, 0); - this.tbshiftoriumicon.Name = "tbshiftoriumicon"; - this.tbshiftoriumicon.Size = new System.Drawing.Size(100, 50); - this.tbshiftoriumicon.TabIndex = 0; - this.tbshiftoriumicon.TabStop = false; - // - // tbshiftoriumtext - // - this.tbshiftoriumtext.Location = new System.Drawing.Point(0, 0); - this.tbshiftoriumtext.Name = "tbshiftoriumtext"; - this.tbshiftoriumtext.Size = new System.Drawing.Size(100, 23); - this.tbshiftoriumtext.TabIndex = 0; - // - // tbpongicon - // - this.tbpongicon.Location = new System.Drawing.Point(0, 0); - this.tbpongicon.Name = "tbpongicon"; - this.tbpongicon.Size = new System.Drawing.Size(100, 50); - this.tbpongicon.TabIndex = 0; - this.tbpongicon.TabStop = false; - // - // tbpongtext - // - this.tbpongtext.Location = new System.Drawing.Point(0, 0); - this.tbpongtext.Name = "tbpongtext"; - this.tbpongtext.Size = new System.Drawing.Size(100, 23); - this.tbpongtext.TabIndex = 0; - // - // tbterminalicon - // - this.tbterminalicon.Location = new System.Drawing.Point(0, 0); - this.tbterminalicon.Name = "tbterminalicon"; - this.tbterminalicon.Size = new System.Drawing.Size(100, 50); - this.tbterminalicon.TabIndex = 0; - this.tbterminalicon.TabStop = false; - // - // tbterminaltext - // - this.tbterminaltext.Location = new System.Drawing.Point(0, 0); - this.tbterminaltext.Name = "tbterminaltext"; - this.tbterminaltext.Size = new System.Drawing.Size(100, 23); - this.tbterminaltext.TabIndex = 0; - // - // tbtextpadicon - // - this.tbtextpadicon.Location = new System.Drawing.Point(0, 0); - this.tbtextpadicon.Name = "tbtextpadicon"; - this.tbtextpadicon.Size = new System.Drawing.Size(100, 50); - this.tbtextpadicon.TabIndex = 0; - this.tbtextpadicon.TabStop = false; - // - // tbtextpadtext - // - this.tbtextpadtext.Location = new System.Drawing.Point(0, 0); - this.tbtextpadtext.Name = "tbtextpadtext"; - this.tbtextpadtext.Size = new System.Drawing.Size(100, 23); - this.tbtextpadtext.TabIndex = 0; - // - // tbgraphicpickericon - // - this.tbgraphicpickericon.Location = new System.Drawing.Point(0, 0); - this.tbgraphicpickericon.Name = "tbgraphicpickericon"; - this.tbgraphicpickericon.Size = new System.Drawing.Size(100, 50); - this.tbgraphicpickericon.TabIndex = 0; - this.tbgraphicpickericon.TabStop = false; - // - // tbgraphicpickertext - // - this.tbgraphicpickertext.Location = new System.Drawing.Point(0, 0); - this.tbgraphicpickertext.Name = "tbgraphicpickertext"; - this.tbgraphicpickertext.Size = new System.Drawing.Size(100, 23); - this.tbgraphicpickertext.TabIndex = 0; - // - // tbartpadicon - // - this.tbartpadicon.Location = new System.Drawing.Point(0, 0); - this.tbartpadicon.Name = "tbartpadicon"; - this.tbartpadicon.Size = new System.Drawing.Size(100, 50); - this.tbartpadicon.TabIndex = 0; - this.tbartpadicon.TabStop = false; - // - // tbartpadtext - // - this.tbartpadtext.Location = new System.Drawing.Point(0, 0); - this.tbartpadtext.Name = "tbartpadtext"; - this.tbartpadtext.Size = new System.Drawing.Size(100, 23); - this.tbartpadtext.TabIndex = 0; - // - // tbcalculatoricon - // - this.tbcalculatoricon.Location = new System.Drawing.Point(0, 0); - this.tbcalculatoricon.Name = "tbcalculatoricon"; - this.tbcalculatoricon.Size = new System.Drawing.Size(100, 50); - this.tbcalculatoricon.TabIndex = 0; - this.tbcalculatoricon.TabStop = false; - // - // tbcalculatortext - // - this.tbcalculatortext.Location = new System.Drawing.Point(0, 0); - this.tbcalculatortext.Name = "tbcalculatortext"; - this.tbcalculatortext.Size = new System.Drawing.Size(100, 23); - this.tbcalculatortext.TabIndex = 0; - // - // tbaudioplayericon - // - this.tbaudioplayericon.Location = new System.Drawing.Point(0, 0); - this.tbaudioplayericon.Name = "tbaudioplayericon"; - this.tbaudioplayericon.Size = new System.Drawing.Size(100, 50); - this.tbaudioplayericon.TabIndex = 0; - this.tbaudioplayericon.TabStop = false; - // - // tbaudioplayertext - // - this.tbaudioplayertext.Location = new System.Drawing.Point(0, 0); - this.tbaudioplayertext.Name = "tbaudioplayertext"; - this.tbaudioplayertext.Size = new System.Drawing.Size(100, 23); - this.tbaudioplayertext.TabIndex = 0; - // - // tbvideoplayericon - // - this.tbvideoplayericon.Location = new System.Drawing.Point(0, 0); - this.tbvideoplayericon.Name = "tbvideoplayericon"; - this.tbvideoplayericon.Size = new System.Drawing.Size(100, 50); - this.tbvideoplayericon.TabIndex = 0; - this.tbvideoplayericon.TabStop = false; - // - // tbvideoplayertext - // - this.tbvideoplayertext.Location = new System.Drawing.Point(0, 0); - this.tbvideoplayertext.Name = "tbvideoplayertext"; - this.tbvideoplayertext.Size = new System.Drawing.Size(100, 23); - this.tbvideoplayertext.TabIndex = 0; - // - // tbwebbrowsericon - // - this.tbwebbrowsericon.Location = new System.Drawing.Point(0, 0); - this.tbwebbrowsericon.Name = "tbwebbrowsericon"; - this.tbwebbrowsericon.Size = new System.Drawing.Size(100, 50); - this.tbwebbrowsericon.TabIndex = 0; - this.tbwebbrowsericon.TabStop = false; - // - // tbwebbrowsertext - // - this.tbwebbrowsertext.Location = new System.Drawing.Point(0, 0); - this.tbwebbrowsertext.Name = "tbwebbrowsertext"; - this.tbwebbrowsertext.Size = new System.Drawing.Size(100, 23); - this.tbwebbrowsertext.TabIndex = 0; - // - // tbnamechangericon - // - this.tbnamechangericon.Location = new System.Drawing.Point(0, 0); - this.tbnamechangericon.Name = "tbnamechangericon"; - this.tbnamechangericon.Size = new System.Drawing.Size(100, 50); - this.tbnamechangericon.TabIndex = 0; - this.tbnamechangericon.TabStop = false; - // - // tbnamechangertext - // - this.tbnamechangertext.Location = new System.Drawing.Point(0, 0); - this.tbnamechangertext.Name = "tbnamechangertext"; - this.tbnamechangertext.Size = new System.Drawing.Size(100, 23); - this.tbnamechangertext.TabIndex = 0; - // - // tbiconmanagericon - // - this.tbiconmanagericon.Location = new System.Drawing.Point(0, 0); - this.tbiconmanagericon.Name = "tbiconmanagericon"; - this.tbiconmanagericon.Size = new System.Drawing.Size(100, 50); - this.tbiconmanagericon.TabIndex = 0; - this.tbiconmanagericon.TabStop = false; - // - // tbiconmanagertext - // - this.tbiconmanagertext.Location = new System.Drawing.Point(0, 0); - this.tbiconmanagertext.Name = "tbiconmanagertext"; - this.tbiconmanagertext.Size = new System.Drawing.Size(100, 23); - this.tbiconmanagertext.TabIndex = 0; - // - // tbbitnotewalleticon - // - this.tbbitnotewalleticon.Location = new System.Drawing.Point(0, 0); - this.tbbitnotewalleticon.Name = "tbbitnotewalleticon"; - this.tbbitnotewalleticon.Size = new System.Drawing.Size(100, 50); - this.tbbitnotewalleticon.TabIndex = 0; - this.tbbitnotewalleticon.TabStop = false; - // - // tbbitnotewallettext - // - this.tbbitnotewallettext.Location = new System.Drawing.Point(0, 0); - this.tbbitnotewallettext.Name = "tbbitnotewallettext"; - this.tbbitnotewallettext.Size = new System.Drawing.Size(100, 23); - this.tbbitnotewallettext.TabIndex = 0; - // - // tbbitnotediggericon - // - this.tbbitnotediggericon.Location = new System.Drawing.Point(0, 0); - this.tbbitnotediggericon.Name = "tbbitnotediggericon"; - this.tbbitnotediggericon.Size = new System.Drawing.Size(100, 50); - this.tbbitnotediggericon.TabIndex = 0; - this.tbbitnotediggericon.TabStop = false; - // - // tbbitnotediggertext - // - this.tbbitnotediggertext.Location = new System.Drawing.Point(0, 0); - this.tbbitnotediggertext.Name = "tbbitnotediggertext"; - this.tbbitnotediggertext.Size = new System.Drawing.Size(100, 23); - this.tbbitnotediggertext.TabIndex = 0; - // - // tbskinshiftericon - // - this.tbskinshiftericon.Location = new System.Drawing.Point(0, 0); - this.tbskinshiftericon.Name = "tbskinshiftericon"; - this.tbskinshiftericon.Size = new System.Drawing.Size(100, 50); - this.tbskinshiftericon.TabIndex = 0; - this.tbskinshiftericon.TabStop = false; - // - // tbskinshiftertext - // - this.tbskinshiftertext.Location = new System.Drawing.Point(0, 0); - this.tbskinshiftertext.Name = "tbskinshiftertext"; - this.tbskinshiftertext.Size = new System.Drawing.Size(100, 23); - this.tbskinshiftertext.TabIndex = 0; - // - // tbdownloadericon - // - this.tbdownloadericon.Location = new System.Drawing.Point(0, 0); - this.tbdownloadericon.Name = "tbdownloadericon"; - this.tbdownloadericon.Size = new System.Drawing.Size(100, 50); - this.tbdownloadericon.TabIndex = 0; - this.tbdownloadericon.TabStop = false; - // - // tbdownloadertext - // - this.tbdownloadertext.Location = new System.Drawing.Point(0, 0); - this.tbdownloadertext.Name = "tbdownloadertext"; - this.tbdownloadertext.Size = new System.Drawing.Size(100, 23); - this.tbdownloadertext.TabIndex = 0; - // - // tbshiftneticon - // - this.tbshiftneticon.Location = new System.Drawing.Point(0, 0); - this.tbshiftneticon.Name = "tbshiftneticon"; - this.tbshiftneticon.Size = new System.Drawing.Size(100, 50); - this.tbshiftneticon.TabIndex = 0; - this.tbshiftneticon.TabStop = false; - // - // tbshiftnettext - // - this.tbshiftnettext.Location = new System.Drawing.Point(0, 0); - this.tbshiftnettext.Name = "tbshiftnettext"; - this.tbshiftnettext.Size = new System.Drawing.Size(100, 23); - this.tbshiftnettext.TabIndex = 0; - // - // tbdodgeicon - // - this.tbdodgeicon.Location = new System.Drawing.Point(0, 0); - this.tbdodgeicon.Name = "tbdodgeicon"; - this.tbdodgeicon.Size = new System.Drawing.Size(100, 50); - this.tbdodgeicon.TabIndex = 0; - this.tbdodgeicon.TabStop = false; - // - // tbdodgetext - // - this.tbdodgetext.Location = new System.Drawing.Point(0, 0); - this.tbdodgetext.Name = "tbdodgetext"; - this.tbdodgetext.Size = new System.Drawing.Size(100, 23); - this.tbdodgetext.TabIndex = 0; - // - // tbdownloadmanagericon - // - this.tbdownloadmanagericon.Location = new System.Drawing.Point(0, 0); - this.tbdownloadmanagericon.Name = "tbdownloadmanagericon"; - this.tbdownloadmanagericon.Size = new System.Drawing.Size(100, 50); - this.tbdownloadmanagericon.TabIndex = 0; - this.tbdownloadmanagericon.TabStop = false; - // - // tbdownloadmanagertext - // - this.tbdownloadmanagertext.Location = new System.Drawing.Point(0, 0); - this.tbdownloadmanagertext.Name = "tbdownloadmanagertext"; - this.tbdownloadmanagertext.Size = new System.Drawing.Size(100, 23); - this.tbdownloadmanagertext.TabIndex = 0; - // - // tbcatalysticon - // - this.tbcatalysticon.Location = new System.Drawing.Point(0, 0); - this.tbcatalysticon.Name = "tbcatalysticon"; - this.tbcatalysticon.Size = new System.Drawing.Size(100, 50); - this.tbcatalysticon.TabIndex = 0; - this.tbcatalysticon.TabStop = false; - // - // lbcatalystname - // - this.lbcatalystname.Location = new System.Drawing.Point(0, 0); - this.lbcatalystname.Name = "lbcatalystname"; - this.lbcatalystname.Size = new System.Drawing.Size(100, 23); - this.lbcatalystname.TabIndex = 0; - // - // tbinstallericon - // - this.tbinstallericon.Location = new System.Drawing.Point(0, 0); - this.tbinstallericon.Name = "tbinstallericon"; - this.tbinstallericon.Size = new System.Drawing.Size(100, 50); - this.tbinstallericon.TabIndex = 0; - this.tbinstallericon.TabStop = false; - // - // tbinstallertext - // - this.tbinstallertext.Location = new System.Drawing.Point(0, 0); - this.tbinstallertext.Name = "tbinstallertext"; - this.tbinstallertext.Size = new System.Drawing.Size(100, 23); - this.tbinstallertext.TabIndex = 0; - // - // tbsnakeyicon - // - this.tbsnakeyicon.Location = new System.Drawing.Point(0, 0); - this.tbsnakeyicon.Name = "tbsnakeyicon"; - this.tbsnakeyicon.Size = new System.Drawing.Size(100, 50); - this.tbsnakeyicon.TabIndex = 0; - this.tbsnakeyicon.TabStop = false; - // - // tbsnakeytext - // - this.tbsnakeytext.Location = new System.Drawing.Point(0, 0); - this.tbsnakeytext.Name = "tbsnakeytext"; - this.tbsnakeytext.Size = new System.Drawing.Size(100, 23); - this.tbsnakeytext.TabIndex = 0; - // - // tborcwriteicon - // - this.tborcwriteicon.Location = new System.Drawing.Point(0, 0); - this.tborcwriteicon.Name = "tborcwriteicon"; - this.tborcwriteicon.Size = new System.Drawing.Size(100, 50); - this.tborcwriteicon.TabIndex = 0; - this.tborcwriteicon.TabStop = false; - // - // tborcwritetext - // - this.tborcwritetext.Location = new System.Drawing.Point(0, 0); - this.tborcwritetext.Name = "tborcwritetext"; - this.tborcwritetext.Size = new System.Drawing.Size(100, 23); - this.tborcwritetext.TabIndex = 0; - // - // tbfloodgateicon - // - this.tbfloodgateicon.Location = new System.Drawing.Point(0, 0); - this.tbfloodgateicon.Name = "tbfloodgateicon"; - this.tbfloodgateicon.Size = new System.Drawing.Size(100, 50); - this.tbfloodgateicon.TabIndex = 0; - this.tbfloodgateicon.TabStop = false; - // - // tbfloodgatetext - // - this.tbfloodgatetext.Location = new System.Drawing.Point(0, 0); - this.tbfloodgatetext.Name = "tbfloodgatetext"; - this.tbfloodgatetext.Size = new System.Drawing.Size(100, 23); - this.tbfloodgatetext.TabIndex = 0; - // - // tbmazeicon - // - this.tbmazeicon.Location = new System.Drawing.Point(0, 0); - this.tbmazeicon.Name = "tbmazeicon"; - this.tbmazeicon.Size = new System.Drawing.Size(100, 50); - this.tbmazeicon.TabIndex = 0; - this.tbmazeicon.TabStop = false; - // - // tbmazetext - // - this.tbmazetext.Location = new System.Drawing.Point(0, 0); - this.tbmazetext.Name = "tbmazetext"; - this.tbmazetext.Size = new System.Drawing.Size(100, 23); - this.tbmazetext.TabIndex = 0; - // - // tbvirusscannericon - // - this.tbvirusscannericon.Location = new System.Drawing.Point(0, 0); - this.tbvirusscannericon.Name = "tbvirusscannericon"; - this.tbvirusscannericon.Size = new System.Drawing.Size(100, 50); - this.tbvirusscannericon.TabIndex = 0; - this.tbvirusscannericon.TabStop = false; - // - // tbvirusscannertext - // - this.tbvirusscannertext.Location = new System.Drawing.Point(0, 0); - this.tbvirusscannertext.Name = "tbvirusscannertext"; - this.tbvirusscannertext.Size = new System.Drawing.Size(100, 23); - this.tbvirusscannertext.TabIndex = 0; - // - // tbfilesavericon - // - this.tbfilesavericon.Location = new System.Drawing.Point(0, 0); - this.tbfilesavericon.Name = "tbfilesavericon"; - this.tbfilesavericon.Size = new System.Drawing.Size(100, 50); - this.tbfilesavericon.TabIndex = 0; - this.tbfilesavericon.TabStop = false; - // - // tbfilesavertext - // - this.tbfilesavertext.Location = new System.Drawing.Point(0, 0); - this.tbfilesavertext.Name = "tbfilesavertext"; - this.tbfilesavertext.Size = new System.Drawing.Size(100, 23); - this.tbfilesavertext.TabIndex = 0; - // - // tbshiftericon - // - this.tbshiftericon.Location = new System.Drawing.Point(0, 0); - this.tbshiftericon.Name = "tbshiftericon"; - this.tbshiftericon.Size = new System.Drawing.Size(100, 50); - this.tbshiftericon.TabIndex = 0; - this.tbshiftericon.TabStop = false; - // - // tbshiftertext - // - this.tbshiftertext.Location = new System.Drawing.Point(0, 0); - this.tbshiftertext.Name = "tbshiftertext"; - this.tbshiftertext.Size = new System.Drawing.Size(100, 23); - this.tbshiftertext.TabIndex = 0; - // - // pnlpanelbuttonfloatybird - // - this.pnlpanelbuttonfloatybird.BackColor = System.Drawing.Color.Black; - this.pnlpanelbuttonfloatybird.Controls.Add(this.tbfloatybirdicon); - this.pnlpanelbuttonfloatybird.Controls.Add(this.tbfloatybirdtext); - this.pnlpanelbuttonfloatybird.Location = new System.Drawing.Point(5, 29); - this.pnlpanelbuttonfloatybird.Name = "pnlpanelbuttonfloatybird"; - this.pnlpanelbuttonfloatybird.Size = new System.Drawing.Size(52, 20); - this.pnlpanelbuttonfloatybird.TabIndex = 31; - this.pnlpanelbuttonfloatybird.Visible = false; - // - // tbfloatybirdicon - // - this.tbfloatybirdicon.BackColor = System.Drawing.Color.Transparent; - this.tbfloatybirdicon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.tbfloatybirdicon.Location = new System.Drawing.Point(4, 2); - this.tbfloatybirdicon.Name = "tbfloatybirdicon"; - this.tbfloatybirdicon.Size = new System.Drawing.Size(16, 16); - this.tbfloatybirdicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.tbfloatybirdicon.TabIndex = 1; - this.tbfloatybirdicon.TabStop = false; - // - // tbfloatybirdtext - // - this.tbfloatybirdtext.AutoSize = true; - this.tbfloatybirdtext.BackColor = System.Drawing.Color.Transparent; - this.tbfloatybirdtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tbfloatybirdtext.ForeColor = System.Drawing.Color.White; - this.tbfloatybirdtext.Location = new System.Drawing.Point(24, 2); - this.tbfloatybirdtext.Name = "tbfloatybirdtext"; - this.tbfloatybirdtext.Size = new System.Drawing.Size(45, 16); - this.tbfloatybirdtext.TabIndex = 0; - this.tbfloatybirdtext.Text = "Shifter"; - // - // floatybirdToolStripMenuItem - // - this.floatybirdToolStripMenuItem.Name = "floatybirdToolStripMenuItem"; - this.floatybirdToolStripMenuItem.Size = new System.Drawing.Size(214, 22); - this.floatybirdToolStripMenuItem.Text = "Floaty Bird"; - // - // clocktick - // - this.clocktick.Enabled = true; - this.clocktick.Interval = 1000; - this.clocktick.Tick += new System.EventHandler(this.clocktick_Tick); - // - // autosave - // - this.autosave.Enabled = true; - this.autosave.Interval = 60000; - // - // cmbdesktopoptions - // - this.cmbdesktopoptions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.NewToolStripMenuItem, - this.addDesktopPanelToolStripMenuItem, - this.widgetManagerToolStripMenuItem}); - this.cmbdesktopoptions.Name = "ContextMenuStrip1"; - this.cmbdesktopoptions.Size = new System.Drawing.Size(175, 70); - // - // NewToolStripMenuItem - // - this.NewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FolderToolStripMenuItem, - this.ToolStripMenuItem2, - this.ArtpadPictureToolStripMenuItem, - this.TextDocumentToolStripMenuItem, - this.NewSkin, - this.WebpageToolStripMenuItem, - this.ShortcutToolStripMenuItem, - this.scriptToolStripMenuItem}); - this.NewToolStripMenuItem.Name = "NewToolStripMenuItem"; - this.NewToolStripMenuItem.Size = new System.Drawing.Size(174, 22); - this.NewToolStripMenuItem.Text = "New"; - // - // FolderToolStripMenuItem - // - this.FolderToolStripMenuItem.Name = "FolderToolStripMenuItem"; - this.FolderToolStripMenuItem.Size = new System.Drawing.Size(155, 22); - this.FolderToolStripMenuItem.Text = "Folder"; - this.FolderToolStripMenuItem.Click += new System.EventHandler(this.FolderToolStripMenuItem_Click); - // - // ToolStripMenuItem2 - // - this.ToolStripMenuItem2.Name = "ToolStripMenuItem2"; - this.ToolStripMenuItem2.Size = new System.Drawing.Size(152, 6); - // - // ArtpadPictureToolStripMenuItem - // - this.ArtpadPictureToolStripMenuItem.Name = "ArtpadPictureToolStripMenuItem"; - this.ArtpadPictureToolStripMenuItem.Size = new System.Drawing.Size(155, 22); - this.ArtpadPictureToolStripMenuItem.Text = "Artpad Picture"; - // - // TextDocumentToolStripMenuItem - // - this.TextDocumentToolStripMenuItem.Name = "TextDocumentToolStripMenuItem"; - this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(155, 22); - this.TextDocumentToolStripMenuItem.Text = "Text Document"; - this.TextDocumentToolStripMenuItem.Click += new System.EventHandler(this.TextDocumentToolStripMenuItem_Click); - // - // NewSkin - // - this.NewSkin.Name = "NewSkin"; - this.NewSkin.Size = new System.Drawing.Size(155, 22); - this.NewSkin.Text = "Skin"; - this.NewSkin.Click += new System.EventHandler(this.NewSkin_Click); - // - // WebpageToolStripMenuItem - // - this.WebpageToolStripMenuItem.Name = "WebpageToolStripMenuItem"; - this.WebpageToolStripMenuItem.Size = new System.Drawing.Size(152, 6); - this.WebpageToolStripMenuItem.Visible = false; - // - // ShortcutToolStripMenuItem - // - this.ShortcutToolStripMenuItem.Name = "ShortcutToolStripMenuItem"; - this.ShortcutToolStripMenuItem.Size = new System.Drawing.Size(155, 22); - this.ShortcutToolStripMenuItem.Text = "Shortcut"; - this.ShortcutToolStripMenuItem.Visible = false; - // - // scriptToolStripMenuItem - // - this.scriptToolStripMenuItem.Name = "scriptToolStripMenuItem"; - this.scriptToolStripMenuItem.ShowShortcutKeys = false; - this.scriptToolStripMenuItem.Size = new System.Drawing.Size(155, 22); - this.scriptToolStripMenuItem.Text = "Script"; - this.scriptToolStripMenuItem.Click += new System.EventHandler(this.scriptToolStripMenuItem_Click); - // - // addDesktopPanelToolStripMenuItem - // - this.addDesktopPanelToolStripMenuItem.Name = "addDesktopPanelToolStripMenuItem"; - this.addDesktopPanelToolStripMenuItem.Size = new System.Drawing.Size(174, 22); - this.addDesktopPanelToolStripMenuItem.Text = "Add Desktop Panel"; - this.addDesktopPanelToolStripMenuItem.Click += new System.EventHandler(this.addDesktopPanelToolStripMenuItem_Click); - // - // widgetManagerToolStripMenuItem - // - this.widgetManagerToolStripMenuItem.Name = "widgetManagerToolStripMenuItem"; - this.widgetManagerToolStripMenuItem.Size = new System.Drawing.Size(174, 22); - this.widgetManagerToolStripMenuItem.Text = "Widget Manager"; - this.widgetManagerToolStripMenuItem.Click += new System.EventHandler(this.widgetManagerToolStripMenuItem_Click); - // - // imgshiftnetapps - // - this.imgshiftnetapps.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; - this.imgshiftnetapps.ImageSize = new System.Drawing.Size(16, 16); - this.imgshiftnetapps.TransparentColor = System.Drawing.Color.Transparent; - // - // lbldebug - // - this.lbldebug.BackColor = System.Drawing.Color.Gray; - this.lbldebug.ForeColor = System.Drawing.Color.White; - this.lbldebug.Location = new System.Drawing.Point(12, 583); - this.lbldebug.Name = "lbldebug"; - this.lbldebug.Size = new System.Drawing.Size(178, 93); - this.lbldebug.TabIndex = 1; - this.lbldebug.Text = " == DEBUG INFO ===\r\nShiftOS version: 0.1.0\r\nExecution Folder: /bib/Debug\r\nSave Di" + - "rectory On Disk: C:\\ShiftOS\r\nDevMode: TRUE\r\nRunning Mods: 0\r\nCodepoints: 0"; - // - // lblog - // - this.lblog.BackColor = System.Drawing.Color.Gray; - this.lblog.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.lblog.ForeColor = System.Drawing.Color.White; - this.lblog.Location = new System.Drawing.Point(797, 432); - this.lblog.Name = "lblog"; - this.lblog.Size = new System.Drawing.Size(459, 244); - this.lblog.TabIndex = 2; - this.lblog.Text = " == DEBUG INFO ===\r\nShiftOS version: 0.1.0\r\nExecution Folder: /bib/Debug\r\nSave Di" + - "rectory On Disk: C:\\ShiftOS\r\nDevMode: TRUE\r\nRunning Mods: 0\r\nCodepoints: 0"; - // - // flicons - // - this.flicons.BackColor = System.Drawing.Color.Transparent; - this.flicons.Dock = System.Windows.Forms.DockStyle.Fill; - this.flicons.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flicons.Location = new System.Drawing.Point(0, 24); - this.flicons.Name = "flicons"; - this.flicons.Size = new System.Drawing.Size(1268, 661); - this.flicons.TabIndex = 3; - // - // cmbfactions - // - this.cmbfactions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.deleteToolStripMenuItem}); - this.cmbfactions.Name = "cmbfactions"; - this.cmbfactions.Size = new System.Drawing.Size(108, 26); - // - // deleteToolStripMenuItem - // - this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; - this.deleteToolStripMenuItem.Size = new System.Drawing.Size(107, 22); - this.deleteToolStripMenuItem.Text = "Delete"; - this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); - // - // cbwidget - // - this.cbwidget.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.wlocmenu}); - this.cbwidget.Name = "cbwidget"; - this.cbwidget.Size = new System.Drawing.Size(121, 26); - // - // wlocmenu - // - this.wlocmenu.Name = "wlocmenu"; - this.wlocmenu.Size = new System.Drawing.Size(120, 22); - this.wlocmenu.Text = "Location"; - // - // cbdpanel - // - this.cbdpanel.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripMenuItem3, - this.optionsToolStripMenuItem, - this.placeHereToolStripMenuItem}); - this.cbdpanel.Name = "cbwidget"; - this.cbdpanel.Size = new System.Drawing.Size(175, 70); - // - // toolStripMenuItem3 - // - this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(174, 22); - this.toolStripMenuItem3.Text = "Remove This Panel"; - this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); - // - // optionsToolStripMenuItem - // - this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; - this.optionsToolStripMenuItem.Size = new System.Drawing.Size(174, 22); - this.optionsToolStripMenuItem.Text = "Options"; - this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); - // - // placeHereToolStripMenuItem - // - this.placeHereToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.appLauncherToolStripMenuItem, - this.panelButtonsToolStripMenuItem, - this.clockToolStripMenuItem1}); - this.placeHereToolStripMenuItem.Name = "placeHereToolStripMenuItem"; - this.placeHereToolStripMenuItem.Size = new System.Drawing.Size(174, 22); - this.placeHereToolStripMenuItem.Text = "Place here..."; - // - // appLauncherToolStripMenuItem - // - this.appLauncherToolStripMenuItem.Name = "appLauncherToolStripMenuItem"; - this.appLauncherToolStripMenuItem.Size = new System.Drawing.Size(148, 22); - this.appLauncherToolStripMenuItem.Text = "App Launcher"; - this.appLauncherToolStripMenuItem.Click += new System.EventHandler(this.appLauncherToolStripMenuItem_Click); - // - // panelButtonsToolStripMenuItem - // - this.panelButtonsToolStripMenuItem.Name = "panelButtonsToolStripMenuItem"; - this.panelButtonsToolStripMenuItem.Size = new System.Drawing.Size(148, 22); - this.panelButtonsToolStripMenuItem.Text = "Panel Buttons"; - this.panelButtonsToolStripMenuItem.Click += new System.EventHandler(this.panelButtonsToolStripMenuItem_Click); - // - // clockToolStripMenuItem1 - // - this.clockToolStripMenuItem1.Name = "clockToolStripMenuItem1"; - this.clockToolStripMenuItem1.Size = new System.Drawing.Size(148, 22); - this.clockToolStripMenuItem1.Text = "Clock"; - this.clockToolStripMenuItem1.Click += new System.EventHandler(this.clockToolStripMenuItem1_Click); - // - // ShiftOSDesktop - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Black; - this.ClientSize = new System.Drawing.Size(1268, 685); - this.Controls.Add(this.flicons); - this.Controls.Add(this.lblog); - this.Controls.Add(this.lbldebug); - this.Controls.Add(this.desktoppanel); - this.KeyPreview = true; - this.MainMenuStrip = this.desktopappmenu; - this.Name = "ShiftOSDesktop"; - this.Text = "ShiftOSDesktop"; - this.Load += new System.EventHandler(this.ShiftOSDesktop_Load); - this.desktoppanel.ResumeLayout(false); - this.desktoppanel.PerformLayout(); - this.applaunchermenuholder.ResumeLayout(false); - this.desktopappmenu.ResumeLayout(false); - this.desktopappmenu.PerformLayout(); - this.timepanel.ResumeLayout(false); - this.timepanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tbclockicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbsysinfoicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbskinloadericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbfileskimmericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbfileopenericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbinfoboxicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbknowledgeinputicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbcolourpickericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbshiftoriumicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbpongicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbterminalicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbtextpadicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbgraphicpickericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbartpadicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbcalculatoricon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbaudioplayericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbvideoplayericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbwebbrowsericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbnamechangericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbiconmanagericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbbitnotewalleticon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbbitnotediggericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbskinshiftericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbdownloadericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbshiftneticon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbdodgeicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbdownloadmanagericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbcatalysticon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbinstallericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbsnakeyicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tborcwriteicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbfloodgateicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbmazeicon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbvirusscannericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbfilesavericon)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbshiftericon)).EndInit(); - this.pnlpanelbuttonfloatybird.ResumeLayout(false); - this.pnlpanelbuttonfloatybird.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tbfloatybirdicon)).EndInit(); - this.cmbdesktopoptions.ResumeLayout(false); - this.cmbfactions.ResumeLayout(false); - this.cbwidget.ResumeLayout(false); - this.cbdpanel.ResumeLayout(false); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.MenuStrip desktopappmenu; - internal System.Windows.Forms.ToolStripMenuItem KnowledgeInputToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ShiftoriumToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ClockToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem TerminalToolStripMenuItem; - internal System.Windows.Forms.ToolStripSeparator unitySeperator; - internal System.Windows.Forms.ToolStripMenuItem ShutdownToolStripMenuItem; - internal System.Windows.Forms.Label paneltimetext; - internal System.Windows.Forms.Timer clocktick; - internal System.Windows.Forms.Panel timepanel; - internal System.Windows.Forms.ToolStripMenuItem ShifterToolStripMenuItem; - internal System.Windows.Forms.Panel applaunchermenuholder; - internal System.Windows.Forms.ToolStripMenuItem PongToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem FileSkimmerToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem TextPadToolStripMenuItem; - internal System.Windows.Forms.Timer autosave; - internal System.Windows.Forms.ToolStripMenuItem SkinLoaderToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbtextpadicon; - internal System.Windows.Forms.Label tbtextpadtext; - internal System.Windows.Forms.PictureBox tbclockicon; - internal System.Windows.Forms.Label tbclocktext; - internal System.Windows.Forms.PictureBox tbcolourpickericon; - internal System.Windows.Forms.Label tbcolourpickertext; - internal System.Windows.Forms.PictureBox tbgraphicpickericon; - internal System.Windows.Forms.Label tbgraphicpickertext; - internal System.Windows.Forms.PictureBox tbfileopenericon; - internal System.Windows.Forms.Label tbfileopenertext; - internal System.Windows.Forms.PictureBox tbfileskimmericon; - internal System.Windows.Forms.Label tbfileskimmertext; - internal System.Windows.Forms.PictureBox tbknowledgeinputicon; - internal System.Windows.Forms.Label tbknowledgeinputtext; - internal System.Windows.Forms.PictureBox tbinfoboxicon; - internal System.Windows.Forms.Label tbinfoboxtext; - internal System.Windows.Forms.PictureBox tbpongicon; - internal System.Windows.Forms.Label tbpongtext; - internal System.Windows.Forms.PictureBox tbshiftoriumicon; - internal System.Windows.Forms.Label tbshiftoriumtext; - internal System.Windows.Forms.PictureBox tbskinloadericon; - internal System.Windows.Forms.Label tbskinloadertext; - internal System.Windows.Forms.PictureBox tbterminalicon; - internal System.Windows.Forms.Label tbterminaltext; - internal System.Windows.Forms.FlowLayoutPanel pnlpanelbuttonholder; - internal System.Windows.Forms.PictureBox tbartpadicon; - internal System.Windows.Forms.Label tbartpadtext; - internal System.Windows.Forms.ToolStripMenuItem ArtpadToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem CalculatorToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbcalculatoricon; - internal System.Windows.Forms.Label tbcalculatortext; - internal System.Windows.Forms.PictureBox tbaudioplayericon; - internal System.Windows.Forms.Label tbaudioplayertext; - internal System.Windows.Forms.ToolStripMenuItem AudioplayerToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbwebbrowsericon; - internal System.Windows.Forms.Label tbwebbrowsertext; - internal System.Windows.Forms.ToolStripMenuItem WebBrowserToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbvideoplayericon; - internal System.Windows.Forms.Label tbvideoplayertext; - internal System.Windows.Forms.ToolStripMenuItem VideoplayerToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbnamechangericon; - internal System.Windows.Forms.Label tbnamechangertext; - internal System.Windows.Forms.ToolStripMenuItem NameChangerToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbiconmanagericon; - internal System.Windows.Forms.Label tbiconmanagertext; - internal System.Windows.Forms.ToolStripMenuItem IconManagerToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbbitnotewalleticon; - internal System.Windows.Forms.Label tbbitnotewallettext; - internal System.Windows.Forms.PictureBox tbbitnotediggericon; - internal System.Windows.Forms.Label tbbitnotediggertext; - internal System.Windows.Forms.ToolStripMenuItem BitnoteWalletToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem BitnoteDiggerToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbskinshiftericon; - internal System.Windows.Forms.Label tbskinshiftertext; - internal System.Windows.Forms.ToolStripMenuItem SkinShifterToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbshiftneticon; - internal System.Windows.Forms.Label tbshiftnettext; - internal System.Windows.Forms.PictureBox tbdownloadericon; - internal System.Windows.Forms.Label tbdownloadertext; - internal System.Windows.Forms.ToolStripMenuItem ShiftnetToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbdodgeicon; - internal System.Windows.Forms.Label tbdodgetext; - internal System.Windows.Forms.ToolStripMenuItem DodgeToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem sysinfoToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbdownloadmanagericon; - internal System.Windows.Forms.Label tbdownloadmanagertext; - internal System.Windows.Forms.PictureBox tbinstallericon; - internal System.Windows.Forms.Label tbinstallertext; - internal System.Windows.Forms.ToolStripMenuItem InstallerToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem downloadmanagerToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbsnakeyicon; - internal System.Windows.Forms.Label tbsnakeytext; - internal System.Windows.Forms.PictureBox tborcwriteicon; - internal System.Windows.Forms.Label tborcwritetext; - internal System.Windows.Forms.ToolStripMenuItem orcwriteToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbfloodgateicon; - internal System.Windows.Forms.Label tbfloodgatetext; - internal System.Windows.Forms.ToolStripMenuItem FloodGateToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem UnityToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbsysinfoicon; - internal System.Windows.Forms.Label tbsysinfotext; - internal System.Windows.Forms.ToolStripMenuItem SnakeyToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbmazeicon; - internal System.Windows.Forms.Label tbmazetext; - internal System.Windows.Forms.ToolStripMenuItem MazeToolStripMenuItem; - internal System.Windows.Forms.PictureBox tbvirusscannericon; - internal System.Windows.Forms.Label tbvirusscannertext; - internal System.Windows.Forms.ToolStripMenuItem VirusScannerToolStripMenuItem; - internal System.Windows.Forms.Timer nocheat; - internal System.Windows.Forms.PictureBox tbfilesavericon; - internal System.Windows.Forms.Label tbfilesavertext; - internal System.Windows.Forms.PictureBox tbshiftericon; - internal System.Windows.Forms.Label tbshiftertext; - internal System.Windows.Forms.Panel pnlpanelbuttonfloatybird; - internal System.Windows.Forms.PictureBox tbfloatybirdicon; - internal System.Windows.Forms.Label tbfloatybirdtext; - internal System.Windows.Forms.ToolStripMenuItem floatybirdToolStripMenuItem; - internal System.Windows.Forms.Timer tmrwindowedtest; - internal System.Windows.Forms.ContextMenuStrip cmbdesktopoptions; - internal System.Windows.Forms.ToolStripMenuItem NewToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem FolderToolStripMenuItem; - internal System.Windows.Forms.ToolStripSeparator ToolStripMenuItem2; - internal System.Windows.Forms.ToolStripMenuItem ArtpadPictureToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem TextDocumentToolStripMenuItem; - internal System.Windows.Forms.ToolStripSeparator WebpageToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ShortcutToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem NewSkin; - internal System.Windows.Forms.PictureBox tbcatalysticon; - internal System.Windows.Forms.Label lbcatalystname; - internal System.Windows.Forms.ToolStripMenuItem CatalystToolStripMenuItem1; - public System.Windows.Forms.ImageList imgshiftnetapps; - private System.Windows.Forms.Label lbldebug; - private System.Windows.Forms.Label lblog; - private System.Windows.Forms.FlowLayoutPanel flicons; - private System.Windows.Forms.ToolStripMenuItem scriptToolStripMenuItem; - private System.Windows.Forms.ContextMenuStrip cmbfactions; - private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; - private System.Windows.Forms.FlowLayoutPanel pnlnotifications; - public System.Windows.Forms.Panel desktoppanel; - public System.Windows.Forms.ToolStripMenuItem ApplicationsToolStripMenuItem; - private System.Windows.Forms.ContextMenuStrip cbwidget; - private System.Windows.Forms.ToolStripMenuItem wlocmenu; - private System.Windows.Forms.ContextMenuStrip cbdpanel; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; - private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem addDesktopPanelToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem placeHereToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem appLauncherToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem panelButtonsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem clockToolStripMenuItem1; - private System.Windows.Forms.ToolStripMenuItem widgetManagerToolStripMenuItem; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShiftOSDesktop.cs b/source/WindowsFormsApplication1/ShiftOSDesktop.cs deleted file mode 100644 index 9a6818e..0000000 --- a/source/WindowsFormsApplication1/ShiftOSDesktop.cs +++ /dev/null @@ -1,1647 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using SaveSystem; -using System.Threading; -using Newtonsoft.Json; -using System.IO; -using System.Diagnostics; -using ShiftOS.FinalMission; - -namespace ShiftOS -{ - public partial class ShiftOSDesktop : Form - { - public ShiftOSDesktop() - { - InitializeComponent(); - } - - public bool UnityEnabled = false; - - public ToolStripMenuItem AppLauncher { get { return this.ApplicationsToolStripMenuItem; } } - - public List<Control> CurrentWidgets = null; - - public void SetUnityMode() - { - if (UnityEnabled == true) - { - UnityEnabled = false; - } - else - { - UnityEnabled = true; - } - SetupDesktop(); - } - - public void SetUnityMode(bool value) - { - UnityEnabled = value; - SetupDesktop(); - } - - public void EndGame_AttachEvents() - { - FinalMission.EndGameHandler.ObjectiveCompleted += (object s, EventArgs a) => - { - }; - FinalMission.EndGameHandler.MissionComplete += (object s, EventArgs a) => - { - API.LimitedMode = false; - SetupDesktop(); - API.CloseEverything(); - switch (FinalMission.EndGameHandler.CurrentChoice) - { - case Choice.SideWithDevX: - var t = new System.Windows.Forms.Timer(); - t.Interval = 10000; - t.Tick += (object se, EventArgs ea) => - { - var tp = new TextPad(); - API.CreateForm(tp, API.LoadedNames.TextpadName, API.GetIcon("TextPad")); - tp.txtuserinput.Text = Properties.Resources.You_Passed; - tp.FormClosing += (sen, args) => - { - API.Upgrades["storycomplete"] = true; - }; - t.Stop(); - }; - t.Start(); - break; - } - }; - } - - private void ShiftOSDesktop_Load(object sender, EventArgs e) - { - Viruses.CheckForInfected(); - this.ShowInTaskbar = false; - this.FormBorderStyle = FormBorderStyle.None; - this.WindowState = FormWindowState.Maximized; - this.KeyDown += (object s, KeyEventArgs ea) => - { - if (ea.KeyCode == Keys.T && ea.Control) - { - //Show terminal on CTRL+T - - API.CreateForm(new Terminal(), API.CurrentSave.TerminalName, Properties.Resources.iconTerminal); - } - else if (ea.KeyCode == Keys.D && ea.Control) - { - if (API.DeveloperMode == true) - { - if (ShowDebug == true) - { - ShowDebug = false; - } - else - { - ShowDebug = true; - } - } - } - }; - CheckIfNew(); - - API.CurrentSession = this; - - - System.Windows.Forms.Timer clocktick = new System.Windows.Forms.Timer(); - clocktick.Interval = 2; - clocktick.Tick += (object s, EventArgs a) => - { - if (API.Upgrades["hacking"]) - { - if (API.Upgrades["hackerbattles"] == false) - { - var rnd = new Random(); - int c = rnd.Next(1, 1000); - if (c == 500) - { - var t = new Terminal(); - API.CreateForm(t, API.LoadedNames.TerminalName, Properties.Resources.iconTerminal); - t.StartHackerBattleIntro(); - } - } - } - paneltimetext.Text = API.GetTime(); - if (ShowDebug == true) - { - lbldebug.Show(); - lblog.Show(); - switch (API.CurrentSkin.desktoppanelposition) - { - case "Top": - lbldebug.Location = new Point(5, this.Height - lbldebug.Height - 3); - lblog.Location = new Point(this.Width - lblog.Width - 5, this.Height - lblog.Height - 3); - break; - case "Bottom": - lbldebug.Location = new Point(5, 4); - lblog.Location = new Point(this.Width - lblog.Width - 5, 4); - break; - } - if (File.Exists(Paths.SystemDir + "_Log.txt")) - { - lblog.Text = File.ReadAllText(Paths.SystemDir + "_Log.txt"); - } - else - { - lblog.Hide(); - } - lbldebug.Text = " === DEBUG INFO === \n"; - lbldebug.Text += "ShiftOS Version: " + API.CurrentSave.actualshiftversion + "\n"; - lbldebug.Text += "Save Dir On Disk: " + Paths.SaveRoot + "\n"; - lbldebug.Text += "Codepoints: " + API.CurrentSave.codepoints.ToString() + "\n"; - lbldebug.Text += "DevMode: " + API.DeveloperMode.ToString() + "\n"; - lbldebug.Text += "PlatformIdent: " + OSInfo.GetPlatformID() + "\n"; - lbldebug.Text += "Running Mods: " + API.RunningModProcesses.Count.ToString() + "\n"; - } - else - { - lbldebug.Hide(); - lblog.Hide(); - } - if (Viruses.InfectedWith("seized")) - { - Random rnd = new Random(); - int r = rnd.Next(0, 255); - int g = rnd.Next(0, 255); - int b = rnd.Next(0, 255); - this.BackColor = Color.FromArgb(r, g, b); - this.BackgroundImage = null; - } - if (Viruses.InfectedWith("ow")) - { - Random rand = new Random(); - switch (rand.Next(0, 3)) { - case 0: - API.PlaySound(Properties.Resources.writesound); - break; - case 1: - API.PlaySound(Properties.Resources.typesound); - break; - case 2: - API.PlaySound(Properties.Resources.infobox); - break; - } - } - }; - clocktick.Start(); - - if (API.Upgrades["trmfiles"] == true) - { - if (File.Exists(Paths.SystemDir + "AutoStart.trm")) - { - var t = new Terminal(); - t.runterminalfile(Paths.SystemDir + "AutoStart.trm"); - } - } - API.LoadAliases(); - } - - public void CheckIfNew() - { - if (Utilities.LoadedSave.newgame == true) - { - HijackScreen hijack = new HijackScreen(); - this.Opacity = 0; - hijack.Show(); - } - else - { - SetupDesktop(); - } - } - - public List<Panel> DesktopPanels = null; - public FlowLayoutPanel PanelButtonHolder { get { return pnlpanelbuttonholder; } } - public Panel AppLauncherPanel { get { return applaunchermenuholder; } } - public Panel Clock { get { return timepanel; } } - public Control SelectedObject = null; - - private string SelectedIconName = null; - - public void SetupDesktop() - { - SetupRenderers(); - SetupDesktopPanel(); - SetupAppLauncher(); - SetupDesktopIcons(); - SetupGNOME2Elements(); - SetupPanelClock(); - SetupPanelButtons(); - CheckUnity(); - SetupWidgets(); - CheckForChristmas(); - //Set up the context menus. - addDesktopPanelToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"]; - widgetManagerToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"]; - if (API.Upgrades["advanceddesktop"]) - { - AppLauncherPanel.ContextMenuStrip = cbwidget; - Clock.ContextMenuStrip = cbwidget; - PanelButtonHolder.ContextMenuStrip = cbwidget; - } - else - { - AppLauncherPanel.ContextMenuStrip = null; - Clock.ContextMenuStrip = null; - PanelButtonHolder.ContextMenuStrip = null; - } - if (DesktopPanels != null) { - foreach (var dp in DesktopPanels) - { - if (API.Upgrades["advanceddesktop"]) - { - dp.ContextMenuStrip = cbdpanel; - } - else - { - dp.ContextMenuStrip = cbdpanel; - } - } - } - } - - public void SetupWidgets() - { - foreach (var w in API.CurrentSkin.Widgets) - { - foreach (var dp in DesktopPanels) - { - var t = (Skinning.DesktopPanel)dp.Tag; - if (t.Position == w.Panel) - { - SetupWidget(dp, w); - } - } - } - } - - public void SetupWidget(Panel p, Skinning.DesktopWidget w) - { - if(WidgetsToMaintain != null) - { - foreach(var wid in WidgetsToMaintain) - { - wid.Dispose(); - } - } - WidgetsToMaintain = new List<Control>(); - Control ctrl = null; - switch(w.Type) - { - case WidgetType.FreePanel: - ctrl = new Panel(); - break; - case WidgetType.Icon: - ctrl = new PictureBox(); - break; - case WidgetType.DisplayText: - ctrl = new Label(); - var l = (Label)ctrl; - l.ForeColor = API.CurrentSkin.clocktextcolour; - l.TextAlign = ContentAlignment.MiddleCenter; - break; - } - if(ctrl != null) - { - p.Controls.Add(ctrl); - ctrl.Show(); - ctrl.BringToFront(); - ctrl.Left = w.XLocation; - if(w.Type != WidgetType.Icon) - { - ctrl.Top = 0; - ctrl.Width = w.Width; - ctrl.Height = p.Height; - } - else - { - ctrl.Size = new Size(16, 16); - ctrl.Top = (p.Height - ctrl.Height) / 2; - } - try - { - GC.Collect(); - var l = new LuaInterpreter(); - l.ThisDirectory = Paths.WidgetFiles; - l.mod(w.Lua); - if (w.Type == WidgetType.Icon) - { - try - { - ctrl.BackgroundImage = API.GetIcon(w.Icon); - } - catch - { - ctrl.BackgroundImage = API.GetIcon(w.Name); - } - } - var cb_thiswidget = new ContextMenuStrip(); - var remove = cb_thiswidget.Items.Add($"Remove this {w.Name}"); - remove.Click += (object s, EventArgs a) => - { - API.CurrentSkin.Widgets.Remove(w); - ctrl.Dispose(); - Skinning.Utilities.saveskin(); - }; - var move = cb_thiswidget.Items.Add("Move Widget"); - move.Click += (object s, EventArgs e) => - { - ctrl.Tag = w; - MovingControl = ctrl; - }; - ToolStripMenuItem move_to = (ToolStripMenuItem)cb_thiswidget.Items.Add("Move to..."); - foreach(var dp in DesktopPanels) - { - var tag = (Skinning.DesktopPanel)dp.Tag; - var pnlloc = move_to.DropDownItems.Add(tag.Position); - pnlloc.Click += (object s, EventArgs a) => - { - w.Panel = pnlloc.Text; - ChangePosition(ctrl, dp); - Skinning.Utilities.saveskin(); - }; - } - var setwidth = cb_thiswidget.Items.Add("Set Width"); - setwidth.Click += (object s, EventArgs a) => - { - API.CreateInfoboxSession($"Set {w.Name} Width", $"Please enter a new width value for this {w.Name}.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (object f, FormClosingEventArgs fc) => - { - var text = API.GetInfoboxResult(); - try - { - w.Width = Convert.ToInt32(text); - ctrl.Width = w.Width; - Skinning.Utilities.saveskin(); - } - catch - { - AddNotification("Invalid width", "You have entered an invalid width."); - } - }; - }; - ctrl.ContextMenuStrip = cb_thiswidget; - GC.Collect(); - WidgetsToMaintain.Add(ctrl); - l.mod.widget(ctrl); - - } - catch - { - API.CreateInfoboxSession("Widget Error", $"An error has occurred creating this \"{w.Name}\". It'll stay, but it may not function as intended.", infobox.InfoboxMode.Info); - } - - } - - } - - public List<Control> WidgetsToMaintain = null; - - public Control MovingControl = null; - - public bool WidgetContains(string Name) - { - Skinning.DesktopWidget widget = null; - - foreach(var w in API.CurrentSkin.Widgets) - { - if(w.Name == Name) - { - widget = w; - } - } - - if(widget == null) - { - return false; - } - else - { - return true; - } - } - - public void SetupDesktopIcons() - { - if (UnityEnabled == true) - { - flicons.Hide(); - } - else - { - flicons.Show(); - } - if (API.Upgrades["desktopicons"] == true) - { - flicons.ContextMenuStrip = cmbdesktopoptions; - DesktopIconManager.GetIcons(); - flicons.Controls.Clear(); - foreach (DesktopIcon dl in DesktopIconManager.Icons) - { - dl.ContextMenuStrip = cmbfactions; - dl.MouseDown += (object s, MouseEventArgs a) => - { - if (a.Button == MouseButtons.Right) - { - SelectedIconName = dl.IconName; - } - }; - flicons.Controls.Add(dl); - } - - } - - } - - public void SetupRenderers() - { - //Set global ToolStrip Renderer to the ShiftOS Skinning Engine renderer with it's default color table - ToolStripManager.Renderer = new Skinning.MyToolStripRenderer(); - //Set the App Launcher's renderer to the ShiftOS Skinning Engine renderer, with the App Launcher-specific color table. - desktopappmenu.Renderer = new Skinning.MyToolStripRenderer(new AppLauncherColorTable()); - - } - - - public void SetupDesktopPanel() - { - if (DesktopPanels != null) - { - foreach (var pnl in DesktopPanels) - { - if (this.Controls.Contains(pnl)) - { - pnl.Hide(); - this.Controls.Remove(pnl); - } - } - } - var old_list = new List<Skinning.DesktopPanel>(); - var dp = new Skinning.DesktopPanel(); - dp.Position = API.CurrentSkin.desktoppanelposition; - dp.Height = API.CurrentSkin.desktoppanelheight; - dp.BackgroundColor = API.CurrentSkin.desktoppanelcolour; - dp.BackgroundImage = API.CurrentSkinImages.desktoppanel; - old_list.Add(dp); - - if (API.CurrentSkin.DesktopPanels.Count == 0) - { - API.CurrentSkin.DesktopPanels = old_list; - } - if(API.Upgrades["advanceddesktop"]) - { - SetupPanels(API.CurrentSkin.DesktopPanels); - } - else - { - if(API.Upgrades["desktoppanel"]) - { - SetupPanels(old_list); - } - } - desktopappmenu.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.applauncherlayout; - } - - public void SetupPanels(List<Skinning.DesktopPanel> lst) - { - DesktopPanels = new List<Panel>(); - - foreach (var dp in lst) - { - Panel pnl = new Panel(); - pnl.BackColor = dp.BackgroundColor; - switch (dp.Position) - { - case "Top": - pnl.Dock = DockStyle.Top; - break; - case "Bottom": - pnl.Dock = DockStyle.Bottom; - break; - } - pnl.Tag = dp; - pnl.Height = dp.Height; - pnl.MouseMove += (object s, MouseEventArgs a) => - { - if (MovingControl != null) - { - var newloc = new Point(a.X + 15, 0); - var proper = pnl.PointToClient(newloc); - MovingControl.Location = proper; - } - }; - pnl.MouseDown += (object s, MouseEventArgs a) => - { - if (MovingControl != null) - { - if (a.Button == MouseButtons.Left) - { - var w = (Skinning.DesktopWidget)MovingControl.Tag; - w.XLocation = MovingControl.Left; - Skinning.Utilities.saveskin(); - } - else if (a.Button == MouseButtons.Left) - { - var w = (Skinning.DesktopWidget)MovingControl.Tag; - MovingControl.Left = w.XLocation; - Skinning.Utilities.saveskin(); - - } - MovingControl = null; - } - }; - DesktopPanels.Add(pnl); - if (API.Upgrades["desktoppanel"] == true) - { - if (dp.BackgroundImage == null) - { - pnl.BackgroundImage = null; - } - else - { - pnl.BackgroundImage = dp.BackgroundImage; - pnl.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.desktoppanellayout; - pnl.BackColor = Color.Transparent; - } - if (lst.Count > 1) - { - if (API.CurrentSkin.ALPosition == dp.Position) - { - ChangePosition(AppLauncherPanel, pnl); - } - if (API.CurrentSkin.PanelButtonPosition == dp.Position) - { - ChangePosition(PanelButtonHolder, pnl); - } - if (API.CurrentSkin.ClockPosition == dp.Position) - { - ChangePosition(Clock, pnl); - } - } - else - { - ChangePosition(AppLauncherPanel, pnl); - ChangePosition(PanelButtonHolder, pnl); - ChangePosition(Clock, pnl); - } - pnl.MouseDown += (object s, MouseEventArgs a) => - { - if (a.Button == MouseButtons.Right) - { - SelectedObject = pnl; - } - }; - if (API.Upgrades["advanceddesktop"]) - { - pnl.ContextMenuStrip = cbdpanel; - } - else - { - pnl.ContextMenuStrip = null; - } - pnl.Size = new Size(desktoppanel.Size.Width, dp.Height); - this.Controls.Add(pnl); - pnl.Show(); - } - else - { - pnl.Hide(); - this.Controls.Remove(pnl); - } - } - - } - - public void SetupAppLauncher() - { - NewToolStripMenuItem.Visible = API.Upgrades["fsnewfolder"]; - ArtpadPictureToolStripMenuItem.Visible = /*API.Upgrades["artpadsave"]*/false; // not yet implemented - TextDocumentToolStripMenuItem.Visible = API.Upgrades["textpadsave"]; - NewSkin.Visible = API.Upgrades["skinning"]; - scriptToolStripMenuItem.Visible = /*API.Upgrades["shiftnet"]*/false; //not yet implemented - API.GetAppLauncherItems(); - if (API.Upgrades["applaunchermenu"] == true) - { - ApplicationsToolStripMenuItem.Font = new Font(API.CurrentSkin.applicationbuttontextfont, API.CurrentSkin.applicationbuttontextsize, API.CurrentSkin.applicationbuttontextstyle); - ApplicationsToolStripMenuItem.Text = API.CurrentSkin.applicationlaunchername; - ApplicationsToolStripMenuItem.DropDownItems.Clear(); - if (API.Upgrades["alshiftnetapps"] == true) - { - imgshiftnetapps.Images.Clear(); - ApplicationsToolStripMenuItem.DropDown.ImageList = imgshiftnetapps; - //Mods - if (!Directory.Exists(Paths.Mod_AppLauncherEntries)) - { - Directory.CreateDirectory(Paths.Mod_AppLauncherEntries); - } - foreach (string file in Directory.GetFiles(Paths.Mod_AppLauncherEntries)) - { - string json = File.ReadAllText(file); - var TEMP_AL = JsonConvert.DeserializeObject<ModApplauncherItem>(json); - string lua; - if (TEMP_AL.Lua != null) - { - lua = TEMP_AL.Lua; - } - else - { - string path = TEMP_AL.ShiftCode.Replace("runSAA:", ""); - lua = "launch_mod('/Shiftum42/Apps/" + TEMP_AL.AppDirectory.Replace("\"", "\\\"").Replace("'", "\\'") + "/" + path + "')"; - } - - ApplauncherItem NewAL = null; - try - { - NewAL = new ApplauncherItem(TEMP_AL.Name, Image.FromFile(Paths.Applications + TEMP_AL.AppDirectory + "\\" + TEMP_AL.Icon), lua, true); - imgshiftnetapps.Images.Add(file, NewAL.Icon); - } - catch - { - NewAL = new ApplauncherItem(TEMP_AL.Name, null, lua, true); - } - var mitem = new ToolStripMenuItem(); - mitem.ImageKey = file; - mitem.Text = NewAL.Name; - mitem.Tag = TEMP_AL; - mitem.ImageScaling = ToolStripItemImageScaling.None; - mitem.Visible = NewAL.Display; - - mitem.Click += (object s, EventArgs a) => - { - API.LaunchMod(NewAL.Lua.Replace("launch_mod('", "").Replace("/Shiftum42/Apps/", Paths.Applications).Replace("/", OSInfo.DirectorySeparator).Replace("')", "")); - }; - ApplicationsToolStripMenuItem.DropDownItems.Add(mitem); - } - ApplicationsToolStripMenuItem.DropDownItems.Add(new ToolStripSeparator()); - } - - - - foreach (ApplauncherItem aitem in API.AppLauncherItems) - { - ToolStripMenuItem item = new ToolStripMenuItem(); - item.Text = aitem.Name; - item.Tag = aitem; - imgshiftnetapps.Images.Add(item.Text, aitem.Icon); - item.ImageKey = item.Text; - item.Visible = aitem.Display; - item.ImageScaling = ToolStripItemImageScaling.None; - ApplicationsToolStripMenuItem.DropDownItems.Add(item); - item.Click += new EventHandler(this.RunAppFromLauncher); - } - - ApplicationsToolStripMenuItem.Height = API.CurrentSkin.applicationbuttonheight; - if (API.CurrentSkinImages.applauncher != null) - { - ApplicationsToolStripMenuItem.Text = ""; - ApplicationsToolStripMenuItem.BackColor = Color.Transparent; - } - else { - ApplicationsToolStripMenuItem.Text = API.CurrentSkin.applicationlaunchername; - ApplicationsToolStripMenuItem.BackColor = API.CurrentSkin.applauncherbackgroundcolour; - ApplicationsToolStripMenuItem.BackgroundImage = null; - } - - applaunchermenuholder.Width = API.CurrentSkin.applaunchermenuholderwidth; - desktopappmenu.Width = API.CurrentSkin.applaunchermenuholderwidth; - ApplicationsToolStripMenuItem.Width = API.CurrentSkin.applaunchermenuholderwidth; - ApplicationsToolStripMenuItem.ForeColor = API.CurrentSkin.applicationsbuttontextcolour; - applaunchermenuholder.Height = API.CurrentSkin.applicationbuttonheight; - desktopappmenu.Height = API.CurrentSkin.applicationbuttonheight; - ApplicationsToolStripMenuItem.Height = API.CurrentSkin.applicationbuttonheight; - - if (API.CurrentSkinImages.applauncher != null) - { - ApplicationsToolStripMenuItem.BackgroundImage = API.CurrentSkinImages.applauncher; - } - else { - ApplicationsToolStripMenuItem.BackColor = API.CurrentSkin.applauncherbackgroundcolour; - ApplicationsToolStripMenuItem.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.applauncherlayout; - } - ApplicationsToolStripMenuItem.BackColor = API.CurrentSkin.applauncherbuttoncolour; - } - else { - ApplicationsToolStripMenuItem.Visible = false; - } - } - - public void SetupGNOME2Elements() - { - if (API.Upgrades["gray"] == true) - { - this.ContextMenuStrip = cmbdesktopoptions; - NewToolStripMenuItem.Visible = API.Upgrades["desktopicons"]; - addDesktopPanelToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"]; - widgetManagerToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"]; //Uncomment when mid game bridge sequence finished. - - - } - - appLauncherToolStripMenuItem.Visible = API.Upgrades["applaunchermenu"]; - clockToolStripMenuItem1.Visible = API.Upgrades["desktoppanelclock"]; - panelButtonsToolStripMenuItem.Visible = API.Upgrades["panelbuttons"]; - - PanelButtonHolder.ContextMenuStrip = cbwidget; - AppLauncherPanel.ContextMenuStrip = cbwidget; - Clock.ContextMenuStrip = cbwidget; - paneltimetext.MouseDown += (object s, MouseEventArgs a) => - { - if (a.Button == MouseButtons.Right) - { - SelectedObject = Clock; - } - }; - ApplicationsToolStripMenuItem.MouseDown += (object s, MouseEventArgs a) => - { - if (a.Button == MouseButtons.Right) - { - SelectedObject = AppLauncherPanel; - } - }; - PanelButtonHolder.MouseDown += (object s, MouseEventArgs a) => - { - if (a.Button == MouseButtons.Right) - { - SelectedObject = PanelButtonHolder; - } - }; - wlocmenu.DropDownItems.Clear(); - if (API.Upgrades["advanceddesktop"]) - { - foreach (var p in DesktopPanels) - { - var dp = (Skinning.DesktopPanel)p.Tag; - p.ContextMenuStrip = cbdpanel; - var itm = new ToolStripMenuItem(); - itm.Text = dp.Position; - wlocmenu.DropDownItems.Add(itm); - itm.Click += (object s, EventArgs a) => - { - if (SelectedObject != null) - { - if (SelectedObject == AppLauncherPanel) - { - API.CurrentSkin.ALPosition = itm.Text; - } - else if (SelectedObject == Clock) - { - API.CurrentSkin.ClockPosition = itm.Text; - } - else if (SelectedObject == PanelButtonHolder) - { - API.CurrentSkin.PanelButtonPosition = itm.Text; - } - SelectedObject.Parent.Controls.Remove(SelectedObject); - SetupDesktopPanel(); - Skinning.Utilities.saveskin(); - } - }; - } - } - } - - public void SetupPanelClock() - { - if (API.Upgrades["desktoppanelclock"] == true) - { - - paneltimetext.ForeColor = API.CurrentSkin.clocktextcolour; - - if (API.CurrentSkinImages.panelclock == null) - { - timepanel.BackColor = API.CurrentSkin.clockbackgroundcolor; - timepanel.BackgroundImage = null; - } - else { - timepanel.BackColor = Color.Transparent; - timepanel.BackgroundImage = API.CurrentSkinImages.panelclock; - timepanel.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.panelclocklayout; - } - paneltimetext.Font = new Font(API.CurrentSkin.panelclocktextfont, API.CurrentSkin.panelclocktextsize, API.CurrentSkin.panelclocktextstyle); - timepanel.Size = new Size(paneltimetext.Width + 3, timepanel.Height); - paneltimetext.Location = new Point(0, API.CurrentSkin.panelclocktexttop); - timepanel.Show(); - } - else { - timepanel.Hide(); - } - - } - - public void CheckUnity() - { - if (UnityEnabled == true) - { - this.TransparencyKey = Color.FromArgb(1, 0, 1); - this.BackColor = Color.FromArgb(1, 0, 1); - this.BackgroundImage = null; - } - else - { - this.TransparencyKey = Color.BurlyWood; - this.BackColor = API.CurrentSkin.desktopbackgroundcolour; - - this.BackgroundImage = API.CurrentSkinImages.desktopbackground; - var d = DateTime.Now; - if (d.Day == 25 && d.Month == 12) - { - if (API.CurrentSave.ChristmasRewardPast == false) - { - this.BackgroundImage = Properties.Resources.christmas_skin; - } - } - this.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.desktopbackgroundlayout; - - } - } - - public void CheckForChristmas() - { - //Christmas - Codepoints gift - //Christmas Skin - var date = DateTime.Now; - if (date.Day == 25 && date.Month == 12) - { - if (API.CurrentSave.newgame == false && API.CurrentSave.ChristmasRewardPast == false) - { - API.CurrentSave.ChristmasRewardPast = true; - API.CreateInfoboxSession("Merry Christmas!", "Merry Christmas from all of the developers of ShiftOS. To celebrate Christmas, you have been given 1000 Codepoints for you to spend on Shiftorium Upgrades. We have also set your desktop background for the occasion.", infobox.InfoboxMode.Info); - API.AddCodepoints(1000); - } - SaveSystem.Utilities.saveGame(); - } - else - { - API.CurrentSave.ChristmasRewardPast = false; //Christmas is a yearly event, so just in case, every day that isn't Christmas, the 'Christmas' variable is set to false so that we can celebrate every year. - SaveSystem.Utilities.saveGame(); - } - } - - public void ChangePosition(Control ctrl, Panel newPanel) - { - try { - ctrl.Parent.Controls.Remove(ctrl); - newPanel.Controls.Add(ctrl); - } - catch - { - newPanel.Controls.Add(ctrl); - } - ctrl.BringToFront(); - } - - public void SetupPanelButtons() - { - pnlpanelbuttonholder.Controls.Clear(); - if (API.Upgrades["panelbuttons"] == true) - { - foreach (PanelButton pbtn in API.PanelButtons) - { - Panel pnl = new Panel(); - Label lbl = new Label(); - PictureBox pb = new PictureBox(); - - pnl.Visible = true; - - pb.Image = pbtn.Icon; - lbl.Text = pbtn.Name; - - pnl.Margin = new Padding(0, API.CurrentSkin.panelbuttonfromtop, API.CurrentSkin.panelbuttongap, 0); - - setpanelbuttonappearnce(ref pnl, ref pb, ref lbl); - - setuppanelbuttonicons(ref pb, pbtn.Icon); - - pnlpanelbuttonholder.Controls.Add(pnl); - pnl.ContextMenuStrip = null; - pnl.Show(); - pnl.Click += new EventHandler(this.PanelButton_Click); - pb.Click += new EventHandler(this.PanelButton_Click); - lbl.Click += new EventHandler(this.PanelButton_Click); - pnl.Tag = pbtn; - pb.Tag = pbtn; - lbl.Tag = pbtn; - } - pnlpanelbuttonholder.Padding = new Padding(API.CurrentSkin.panelbuttoninitialgap, 0, 0, 0); - } - } - - public void setuppanelbuttonicons(ref PictureBox tbicon, Image image) - { - tbicon.Image = image; - tbicon.SizeMode = PictureBoxSizeMode.StretchImage; - tbicon.Size = new Size(API.CurrentSkin.panelbuttoniconsize, API.CurrentSkin.panelbuttoniconsize); - } - - public void setpanelbuttonappearnce(ref Panel panelbutton, ref PictureBox icon, ref Label text) - { - panelbutton.Controls.Add(text); - panelbutton.Controls.Add(icon); - text.Show(); - if (API.Upgrades["appicons"] == true) - { - icon.Show(); - } - icon.Location = new Point(API.CurrentSkin.panelbuttoniconside, API.CurrentSkin.panelbuttonicontop); - icon.Size = new Size(API.CurrentSkin.panelbuttoniconsize, API.CurrentSkin.panelbuttoniconsize); - panelbutton.Size = new Size(API.CurrentSkin.panelbuttonwidth, API.CurrentSkin.panelbuttonheight); - panelbutton.BackColor = API.CurrentSkin.panelbuttoncolour; - panelbutton.BackgroundImage = API.CurrentSkinImages.panelbutton; - panelbutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.panelbuttonlayout; - text.BackColor = Color.Transparent; - text.AutoSize = false; - text.Width = panelbutton.Width - API.CurrentSkin.panelbuttontextside - API.CurrentSkin.panelbuttoniconsize - API.CurrentSkin.panelbuttoniconside; - icon.BackColor = Color.Transparent; - text.ForeColor = API.CurrentSkin.panelbuttontextcolour; - text.Font = new Font(API.CurrentSkin.panelbuttontextfont, API.CurrentSkin.panelbuttontextsize, API.CurrentSkin.panelbuttontextstyle); - text.Location = new Point(API.CurrentSkin.panelbuttontextside, API.CurrentSkin.panelbuttontexttop); - } - - public void RunAppFromLauncher(object sender, EventArgs e) - { - ToolStripMenuItem item = (ToolStripMenuItem)sender; - ApplauncherItem aitem = (ApplauncherItem)item.Tag; - var li = new LuaInterpreter(); - li.mod(aitem.Lua); - - li = null; - } - - public void PanelButton_Click(object sender, EventArgs e) - { - if (API.Upgrades["usefulpanelbuttons"]) - { - Control ctrl = (Control)sender; - try - { - PanelButton pbtn = (PanelButton)ctrl.Tag; - var frm = pbtn.FormToManage; - if(frm.Left < Screen.PrimaryScreen.Bounds.Width) - { - API.MinimizeForm(frm); - } - else - { - API.ToggleMinimized(frm); - } - } - catch - { - - } - } - } - - private void ALHover(object sender, EventArgs e) - { - if (API.CurrentSkinImages.applaunchermouseover != null) - { - desktopappmenu.BackgroundImage = API.CurrentSkinImages.applaunchermouseover; - } - } - - private void ALReset(object sender, EventArgs e) - { - if (API.CurrentSkinImages.applauncher != null) - { - desktopappmenu.BackgroundImage = API.CurrentSkinImages.applauncher; - } - } - - private void ALClick(object sender, MouseEventArgs e) - { - if (API.CurrentSkinImages.applauncherclick != null) - { - desktopappmenu.BackgroundImage = API.CurrentSkinImages.applauncherclick; - } - } - - private bool ShowDebug = false; - - private void clocktick_Tick(object sender, EventArgs e) - { - } - - public void AddNotification(string title, string message) - { - var n = new Notification(title, message); - switch(API.CurrentSkin.desktoppanelposition) - { - case "Top": - n.Location = new Point(this.Width - n.Width, desktoppanel.Height); - break; - case "Bottom": - n.Location = new Point(this.Width - n.Width, this.Height - n.Height - desktoppanel.Height); - break; - } - this.Controls.Add(n); - n.Show(); - n.BringToFront(); - } - - private void FolderToolStripMenuItem_Click(object sender, EventArgs e) - { - API.CreateInfoboxSession("New Folder", "Please enter the name of your new folder.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetInfoboxResult(); - if(!Directory.Exists(Paths.Desktop + res)) - { - Directory.CreateDirectory(Paths.Desktop + res); - SetupDesktop(); - } - else - { - API.CreateInfoboxSession("Can't create folder", "That folder already exists. Please use a different name.", infobox.InfoboxMode.Info); - } - }; - } - - private void deleteToolStripMenuItem_Click(object sender, EventArgs e) - { - if(File.Exists(Paths.Desktop + SelectedIconName)) - { - API.CreateInfoboxSession("Delete File", "Would you really like to delete this file?", infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetInfoboxResult(); - if(res == "Yes") - { - File.Delete(Paths.Desktop + SelectedIconName); - } - }; - } - else if(Directory.Exists(Paths.Desktop + SelectedIconName)) - { - API.CreateInfoboxSession("Delete Folder", "Would you really like to delete this folder and all of it's contents?", infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetInfoboxResult(); - if (res == "Yes") - { - Directory.Delete(Paths.Desktop + SelectedIconName, true); - } - }; - } - else - { - API.CreateInfoboxSession("Error", "You cannot delete this icon.", infobox.InfoboxMode.Info); - } - SetupDesktop(); - } - - private void scriptToolStripMenuItem_Click(object sender, EventArgs e) - { - - } - - private void NewSkin_Click(object sender, EventArgs e) - { - API.CreateInfoboxSession("Export Skin", "Please enter a name for your skin.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetInfoboxResult(); - if (res != "Cancelled") - { - if (!File.Exists(Paths.Desktop + res + ".skn")) - { - Skinning.Utilities.saveskintofile(Paths.Desktop + res + ".skn"); - SetupDesktopIcons(); - } - } - }; - } - - private void addDesktopPanelToolStripMenuItem_Click(object sender, EventArgs e) - { - if(API.CurrentSkin.DesktopPanels.Count < 2) - { - string no = "Top"; - string yes = "Bottom"; - if (API.CurrentSkin.DesktopPanels.Count == 0) - { - no = API.CurrentSkin.desktoppanelposition; - } - else { - foreach (var pnl in API.CurrentSkin.DesktopPanels) - { - no = pnl.Position; - } - } - switch(no) - { - case "Top": - yes = "Bottom"; - break; - case "Bottom": - yes = "Top"; - break; - } - var dp = new Skinning.DesktopPanel(); - dp.Height = 24; - dp.Position = yes; - dp.BackgroundColor = Color.White; - API.CurrentSkin.DesktopPanels.Add(dp); - SetupDesktop(); - } - } - - private void toolStripMenuItem3_Click(object sender, EventArgs e) - { - API.CurrentSkin.DesktopPanels.Remove((Skinning.DesktopPanel)SelectedObject.Tag); - Skinning.Utilities.saveskin(); - SetupDesktopPanel(); - } - - private void clockToolStripMenuItem1_Click(object sender, EventArgs e) - { - var dp = (Skinning.DesktopPanel)SelectedObject.Tag; - API.CurrentSkin.ClockPosition = dp.Position; - Skinning.Utilities.saveskin(); - SetupDesktop(); - } - - private void panelButtonsToolStripMenuItem_Click(object sender, EventArgs e) - { - var dp = (Skinning.DesktopPanel)SelectedObject.Tag; - API.CurrentSkin.PanelButtonPosition = dp.Position; - Skinning.Utilities.saveskin(); - SetupDesktop(); - } - - private void appLauncherToolStripMenuItem_Click(object sender, EventArgs e) - { - var dp = (Skinning.DesktopPanel)SelectedObject.Tag; - API.CurrentSkin.ALPosition = dp.Position; - Skinning.Utilities.saveskin(); - SetupDesktop(); - } - - private void widgetManagerToolStripMenuItem_Click(object sender, EventArgs e) - { - API.CreateForm(new WidgetManager(), "Widget Manager", API.GetIcon("WidgetManager")); - } - - private void optionsToolStripMenuItem_Click(object sender, EventArgs e) - { - var dp = (Skinning.DesktopPanel)SelectedObject.Tag; - API.CreateForm(new PanelManager(dp), "Panel Options", API.GetIcon("PanelOptions")); - } - - private void TextDocumentToolStripMenuItem_Click(object sender, EventArgs e) - { - API.CreateInfoboxSession("New Text Document", "Please type a name for your document.", infobox.InfoboxMode.TextEntry); - API.InfoboxSession.FormClosing += (o, a) => - { - var res = API.GetInfoboxResult(); - if(res != "Cancelled") - { - if(!File.Exists(Paths.Desktop + res + ".txt")) - { - File.WriteAllText(Paths.Desktop + res + ".txt", ""); - SetupDesktopIcons(); - } - else - { - API.CreateInfoboxSession("File exists!", "The file name you entered already exists.", infobox.InfoboxMode.Info); - } - } - }; - } - } - - public class DesktopIconManager - { - public static List<DesktopIcon> Icons = null; - public static List<IconModel> Models = null; - - public static void GetIcons() - { - Icons = new List<DesktopIcon>(); - Models = new List<IconModel>(); - API.GetAppLauncherItems(); - if (!Directory.Exists(Paths.Desktop)) - { - Directory.CreateDirectory(Paths.Desktop); - } - else - { - foreach (string dir in Directory.GetDirectories(Paths.Desktop)) - { - //Get dir info - var dinf = new DirectoryInfo(dir); - //Create new IconModel - var m = new IconModel(); - //Set name to dir name - m.Name = dinf.Name; - //Set type to Directory - m.Type = IconType.Directory; - //Set lua to open directory in File Skimmer - m.Lua = $"fileskimmer('/Home/Desktop/{dinf.Name}')"; - Models.Add(m); - } - foreach (string file in Directory.GetFiles(Paths.Desktop)) - { - //Get file info - var finf = new FileInfo(file); - //Create new IconModel - var icm = new IconModel(); - //Set IconModel name to filename - icm.Name = finf.Name; - //Set IconModel's type based on file extension - switch (finf.Extension.ToLower()) //Make the string lower-case for ease of use. - { - case ".desktop": - //Desktop script. - icm.Type = IconType.Script; - icm.Lua = File.ReadAllText(finf.FullName); //The Lua that is to be ran by this script is in the file. - break; - case ".sct": - //Desktop Shortcut - NYI - break; - default: - //File. - icm.Type = IconType.File; - icm.Lua = $"fopen('/Home/Desktop/{finf.Name}')"; - break; - } - Models.Add(icm); - } - } - - foreach(IconModel m in Models) - { - var d = new DesktopIcon(); - d.IconName = m.Name; - d.LuaAction = m.Lua; - switch(m.Type) - { - case IconType.Directory: - d.Icon = API.GetIcon("Folder"); - break; - default: - var finf = new FileInfo(Paths.Desktop + d.IconName); - switch(finf.Extension) - { - case ".txt": - case ".doc": - case ".owd": - case ".docx": - d.Icon = API.GetIcon("TextFile"); - break; - case ".skn": - case ".spk": - d.Icon = API.GetIcon("SkinFile"); - break; - case ".saa": - d.Icon = API.GetIcon("SAAFile"); - break; - case ".pkg": - case ".stp": - d.Icon = API.GetIcon("SetupPackage"); - break; - default: - d.Icon = API.GetIcon("UnrecognizedFile"); - break; - } - break; - } - Icons.Add(d); - } - foreach (ApplauncherItem al in API.AppLauncherItems) - { - if (al.Display == true) - { - var dl = new DesktopIcon(); - dl.Icon = al.Icon; - dl.IconName = al.Name; - dl.LuaAction = al.Lua; - Icons.Add(dl); - } - } - - } - - public class IconModel - { - public string Name { get; set; } - public IconType Type { get; set; } - public string Lua { get; set; } - } - - public enum IconType - { - Directory, - Script, - File, - Shortcut - } - } - - class AppLauncherColorTable : ProfessionalColorTable - { - public override Color ButtonSelectedHighlight - { - get { return API.CurrentSkin.Menu_ButtonSelectedHighlight; } - } - public override Color ButtonSelectedHighlightBorder - { - get { return API.CurrentSkin.Menu_ButtonSelectedHighlight; } - } - public override Color ButtonPressedHighlight - { - get { return API.CurrentSkin.Menu_ButtonPressedHighlight; } - } - public override Color ButtonPressedHighlightBorder - { - get { return API.CurrentSkin.Menu_ButtonPressedHighlight; } - } - public override Color ButtonCheckedHighlight - { - get { return API.CurrentSkin.Menu_ButtonCheckedHighlight; } - } - public override Color ButtonCheckedHighlightBorder - { - get { return API.CurrentSkin.Menu_ButtonCheckedHighlightBorder; } - } - public override Color ButtonPressedBorder - { - get { - if (API.CurrentSkinImages.applauncherclick == null) - { - return API.CurrentSkin.Menu_ButtonPressedBorder; - } - else - { - return Color.Transparent; - } - } - } - public override Color ButtonSelectedBorder - { - get { - if (API.CurrentSkinImages.applauncherclick == null) - { - return API.CurrentSkin.Menu_ButtonSelectedBorder; - } - else - { - return Color.Transparent; - } - } - } - public override Color ButtonCheckedGradientBegin - { - get { return API.CurrentSkin.Menu_ButtonCheckedGradientBegin; } - } - public override Color ButtonCheckedGradientMiddle - { - get { return API.CurrentSkin.Menu_ButtonCheckedGradientMiddle; } - } - public override Color ButtonCheckedGradientEnd - { - get { return API.CurrentSkin.Menu_ButtonCheckedGradientEnd; } - } - public override Color ButtonSelectedGradientBegin - { - get { return API.CurrentSkin.Menu_ButtonSelectedGradientBegin; } - } - public override Color ButtonSelectedGradientMiddle - { - get { return API.CurrentSkin.Menu_ButtonSelectedGradientMiddle; } - } - public override Color ButtonSelectedGradientEnd - { - get { return API.CurrentSkin.Menu_ButtonSelectedGradientEnd; } - } - public override Color ButtonPressedGradientBegin - { - get { return API.CurrentSkin.Menu_ButtonPressedGradientBegin; } - } - public override Color ButtonPressedGradientMiddle - { - get { return API.CurrentSkin.Menu_ButtonPressedGradientMiddle; } - } - public override Color ButtonPressedGradientEnd - { - get { return API.CurrentSkin.Menu_ButtonPressedGradientEnd; } - } - public override Color CheckBackground - { - get { return API.CurrentSkin.Menu_CheckBackground; } - } - public override Color CheckSelectedBackground - { - get { return API.CurrentSkin.Menu_CheckSelectedBackground; } - } - public override Color CheckPressedBackground - { - get { return API.CurrentSkin.Menu_CheckPressedBackground; } - } - public override Color GripDark - { - get { return Color.Transparent; } - } - public override Color GripLight - { - get { return Color.Transparent; } - } - public override Color ImageMarginGradientBegin - { - get { return API.CurrentSkin.Menu_ImageMarginGradientBegin; } - } - public override Color ImageMarginGradientMiddle - { - get { return API.CurrentSkin.Menu_ImageMarginGradientMiddle; } - } - public override Color ImageMarginGradientEnd - { - get { return API.CurrentSkin.Menu_ImageMarginGradientEnd; } - } - public override Color ImageMarginRevealedGradientBegin - { - get { return API.CurrentSkin.Menu_ImageMarginGradientBegin; } - } - public override Color ImageMarginRevealedGradientMiddle - { - get { return API.CurrentSkin.Menu_ImageMarginGradientMiddle; } - } - public override Color ImageMarginRevealedGradientEnd - { - get { return API.CurrentSkin.Menu_ImageMarginGradientEnd; } - } - public override Color MenuStripGradientBegin - { - get { return API.CurrentSkin.Menu_MenuStripGradientBegin; } - } - public override Color MenuStripGradientEnd - { - get { return API.CurrentSkin.Menu_MenuStripGradientEnd; } - } - public override Color MenuItemSelected - { - get { return API.CurrentSkin.Menu_MenuItemSelected; } - } - public override Color MenuItemBorder - { - get { return Color.Transparent; } - } - public override Color MenuBorder - { - get { return API.CurrentSkin.Menu_MenuBorder; } - } - public override Color MenuItemSelectedGradientBegin - { - get { - if (API.CurrentSkinImages.applaunchermouseover == null) - { - return API.CurrentSkin.applaunchermouseovercolour; - } - else - { - return Color.Transparent; - } - } - } - public override Color MenuItemSelectedGradientEnd - { - get - { - if (API.CurrentSkinImages.applaunchermouseover == null) - { - return API.CurrentSkin.applaunchermouseovercolour; - } - else - { - return Color.Transparent; - } - } - } - public override Color MenuItemPressedGradientBegin - { - get - { - if (API.CurrentSkinImages.applauncherclick == null) - { - return API.CurrentSkin.Menu_MenuItemPressedGradientBegin; - } - else - { - return Color.Transparent; - } - } - } - public override Color MenuItemPressedGradientMiddle - { - get - { - if (API.CurrentSkinImages.applauncherclick == null) - { - return API.CurrentSkin.Menu_MenuItemPressedGradientMiddle; - } - else - { - return Color.Transparent; - } - } - } - public override Color MenuItemPressedGradientEnd - { - get - { - if (API.CurrentSkinImages.applauncherclick == null) - { - return API.CurrentSkin.Menu_MenuItemPressedGradientEnd; - } - else - { - return Color.Transparent; - } - } - } - - public override Color RaftingContainerGradientBegin - { - get { return API.CurrentSkin.Menu_RaftingContainerGradientBegin; } - } - public override Color RaftingContainerGradientEnd - { - get { return API.CurrentSkin.Menu_RaftingContainerGradientEnd; } - } - public override Color SeparatorDark - { - get { return API.CurrentSkin.Menu_SeparatorDark; } - } - public override Color SeparatorLight - { - get { return API.CurrentSkin.Menu_SeparatorLight; } - } - public override Color StatusStripGradientBegin - { - get { return API.CurrentSkin.Menu_StatusStripGradientBegin; } - } - public override Color StatusStripGradientEnd - { - get { return API.CurrentSkin.Menu_StatusStripGradientEnd; } - } - public override Color ToolStripBorder - { - get { return API.CurrentSkin.Menu_ToolStripBorder; } - } - public override Color ToolStripDropDownBackground - { - get { return API.CurrentSkin.Menu_ToolStripDropDownBackground; } - } - public override Color ToolStripGradientBegin - { - get { return API.CurrentSkin.Menu_ToolStripGradientBegin; } - } - public override Color ToolStripGradientMiddle - { - get { return API.CurrentSkin.Menu_ToolStripGradientMiddle; } - } - public override Color ToolStripGradientEnd - { - get { return API.CurrentSkin.Menu_ToolStripGradientEnd; } - } - public override Color ToolStripContentPanelGradientBegin - { - get { return API.CurrentSkin.Menu_ToolStripContentPanelGradientBegin; } - } - public override Color ToolStripContentPanelGradientEnd - { - get { return API.CurrentSkin.Menu_ToolStripContentPanelGradientEnd; } - } - public override Color ToolStripPanelGradientBegin - { - get { return API.CurrentSkin.Menu_ToolStripPanelGradientBegin; } - } - public override Color ToolStripPanelGradientEnd - { - get { return API.CurrentSkin.Menu_ToolStripPanelGradientEnd; } - } - public override Color OverflowButtonGradientBegin - { - get { return Color.Transparent; } - } - public override Color OverflowButtonGradientMiddle - { - get { return Color.Transparent; } - } - public override Color OverflowButtonGradientEnd - { - get { return Color.Transparent; } - } - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShiftOSDesktop.resx b/source/WindowsFormsApplication1/ShiftOSDesktop.resx deleted file mode 100644 index 1ee550a..0000000 --- a/source/WindowsFormsApplication1/ShiftOSDesktop.resx +++ /dev/null @@ -1,153 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="desktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="desktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="clocktick.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>164, 17</value> - </metadata> - <metadata name="autosave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>262, 17</value> - </metadata> - <metadata name="nocheat.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>362, 17</value> - </metadata> - <metadata name="tmrwindowedtest.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>457, 17</value> - </metadata> - <metadata name="cmbdesktopoptions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>604, 17</value> - </metadata> - <metadata name="imgshiftnetapps.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>761, 17</value> - </metadata> - <metadata name="cmbfactions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>900, 17</value> - </metadata> - <metadata name="cbwidget.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 56</value> - </metadata> - <metadata name="cbdpanel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>172, 56</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Shifter.Designer.cs b/source/WindowsFormsApplication1/Shifter.Designer.cs deleted file mode 100644 index d49294e..0000000 --- a/source/WindowsFormsApplication1/Shifter.Designer.cs +++ /dev/null @@ -1,5620 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace ShiftOS -{ - partial class Shifter - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Shifter)); - this.ColorDialog1 = new System.Windows.Forms.ColorDialog(); - this.clocktick = new System.Windows.Forms.Timer(this.components); - this.customizationtime = new System.Windows.Forms.Timer(this.components); - this.timerearned = new System.Windows.Forms.Timer(this.components); - this.Label1 = new System.Windows.Forms.Label(); - this.btnapply = new System.Windows.Forms.Button(); - this.catholder = new System.Windows.Forms.Panel(); - this.btnmore = new System.Windows.Forms.Button(); - this.btnreset = new System.Windows.Forms.Button(); - this.btnwindowcomposition = new System.Windows.Forms.Button(); - this.btndesktopicons = new System.Windows.Forms.Button(); - this.btnmenus = new System.Windows.Forms.Button(); - this.btnwindows = new System.Windows.Forms.Button(); - this.btndesktop = new System.Windows.Forms.Button(); - this.pnlshifterintro = new System.Windows.Forms.Panel(); - this.Label66 = new System.Windows.Forms.Label(); - this.Label65 = new System.Windows.Forms.Label(); - this.Label64 = new System.Windows.Forms.Label(); - this.Label63 = new System.Windows.Forms.Label(); - this.pnldesktopoptions = new System.Windows.Forms.Panel(); - this.pnldesktoppaneloptions = new System.Windows.Forms.Panel(); - this.btnpanelbuttons = new System.Windows.Forms.Button(); - this.lbwarning = new System.Windows.Forms.Label(); - this.combodesktoppanelposition = new System.Windows.Forms.ComboBox(); - this.lbposition = new System.Windows.Forms.Label(); - this.Label47 = new System.Windows.Forms.Label(); - this.txtdesktoppanelheight = new System.Windows.Forms.NumericUpDown(); - this.lbheight = new System.Windows.Forms.Label(); - this.pnldesktoppanelcolour = new System.Windows.Forms.Panel(); - this.lbpanelcolor = new System.Windows.Forms.Label(); - this.pnlapplauncheroptions = new System.Windows.Forms.Panel(); - this.pnlalhover = new System.Windows.Forms.Panel(); - this.label119 = new System.Windows.Forms.Label(); - this.Label71 = new System.Windows.Forms.Label(); - this.txtapplauncherwidth = new System.Windows.Forms.TextBox(); - this.Label72 = new System.Windows.Forms.Label(); - this.txtappbuttonlabel = new System.Windows.Forms.TextBox(); - this.Label51 = new System.Windows.Forms.Label(); - this.Label50 = new System.Windows.Forms.Label(); - this.pnlmaintextcolour = new System.Windows.Forms.Panel(); - this.comboappbuttontextstyle = new System.Windows.Forms.ComboBox(); - this.comboappbuttontextfont = new System.Windows.Forms.ComboBox(); - this.Label37 = new System.Windows.Forms.Label(); - this.Label38 = new System.Windows.Forms.Label(); - this.txtappbuttontextsize = new System.Windows.Forms.TextBox(); - this.Label39 = new System.Windows.Forms.Label(); - this.Label40 = new System.Windows.Forms.Label(); - this.pnlmainbuttonactivated = new System.Windows.Forms.Panel(); - this.Label28 = new System.Windows.Forms.Label(); - this.Label35 = new System.Windows.Forms.Label(); - this.txtapplicationsbuttonheight = new System.Windows.Forms.TextBox(); - this.Label36 = new System.Windows.Forms.Label(); - this.pnlmainbuttoncolour = new System.Windows.Forms.Panel(); - this.Label43 = new System.Windows.Forms.Label(); - this.pnldesktopintro = new System.Windows.Forms.Panel(); - this.Label69 = new System.Windows.Forms.Label(); - this.Label70 = new System.Windows.Forms.Label(); - this.pnlpanelbuttonsoptions = new System.Windows.Forms.Panel(); - this.pnlpanelbuttontextcolour = new System.Windows.Forms.Panel(); - this.Label101 = new System.Windows.Forms.Label(); - this.txtpanelbuttontexttop = new System.Windows.Forms.TextBox(); - this.Label104 = new System.Windows.Forms.Label(); - this.txtpanelbuttontextside = new System.Windows.Forms.TextBox(); - this.Label106 = new System.Windows.Forms.Label(); - this.Label93 = new System.Windows.Forms.Label(); - this.txtpanelbuttontop = new System.Windows.Forms.TextBox(); - this.Label94 = new System.Windows.Forms.Label(); - this.txtpanelbuttoninitalgap = new System.Windows.Forms.TextBox(); - this.Label108 = new System.Windows.Forms.Label(); - this.txtpanelbuttonicontop = new System.Windows.Forms.TextBox(); - this.Label110 = new System.Windows.Forms.Label(); - this.txtpanelbuttoniconside = new System.Windows.Forms.TextBox(); - this.Label112 = new System.Windows.Forms.Label(); - this.txtpanelbuttoniconsize = new System.Windows.Forms.TextBox(); - this.Label105 = new System.Windows.Forms.Label(); - this.cbpanelbuttontextstyle = new System.Windows.Forms.ComboBox(); - this.cbpanelbuttonfont = new System.Windows.Forms.ComboBox(); - this.Label100 = new System.Windows.Forms.Label(); - this.txtpaneltextbuttonsize = new System.Windows.Forms.TextBox(); - this.Label102 = new System.Windows.Forms.Label(); - this.Label103 = new System.Windows.Forms.Label(); - this.Label98 = new System.Windows.Forms.Label(); - this.txtpanelbuttongap = new System.Windows.Forms.TextBox(); - this.Label99 = new System.Windows.Forms.Label(); - this.Label96 = new System.Windows.Forms.Label(); - this.txtpanelbuttonheight = new System.Windows.Forms.TextBox(); - this.Label97 = new System.Windows.Forms.Label(); - this.Label92 = new System.Windows.Forms.Label(); - this.txtpanelbuttonwidth = new System.Windows.Forms.TextBox(); - this.Label91 = new System.Windows.Forms.Label(); - this.pnlpanelbuttoncolour = new System.Windows.Forms.Panel(); - this.Label95 = new System.Windows.Forms.Label(); - this.pnldesktopbackgroundoptions = new System.Windows.Forms.Panel(); - this.pnldesktopcolour = new System.Windows.Forms.Panel(); - this.Label45 = new System.Windows.Forms.Label(); - this.pnlpanelclockoptions = new System.Windows.Forms.Panel(); - this.pnlclockbackgroundcolour = new System.Windows.Forms.Panel(); - this.Label44 = new System.Windows.Forms.Label(); - this.comboclocktextstyle = new System.Windows.Forms.ComboBox(); - this.comboclocktextfont = new System.Windows.Forms.ComboBox(); - this.Label26 = new System.Windows.Forms.Label(); - this.Label29 = new System.Windows.Forms.Label(); - this.txtclocktextfromtop = new System.Windows.Forms.TextBox(); - this.Label30 = new System.Windows.Forms.Label(); - this.Label31 = new System.Windows.Forms.Label(); - this.txtclocktextsize = new System.Windows.Forms.TextBox(); - this.Label32 = new System.Windows.Forms.Label(); - this.Label33 = new System.Windows.Forms.Label(); - this.pnlpanelclocktextcolour = new System.Windows.Forms.Panel(); - this.Label34 = new System.Windows.Forms.Label(); - this.pnldesktoppreview = new System.Windows.Forms.Panel(); - this.predesktoppanel = new System.Windows.Forms.Panel(); - this.prepnlpanelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); - this.prepnlpanelbutton = new System.Windows.Forms.Panel(); - this.pretbicon = new System.Windows.Forms.PictureBox(); - this.pretbctext = new System.Windows.Forms.Label(); - this.pretimepanel = new System.Windows.Forms.Panel(); - this.prepaneltimetext = new System.Windows.Forms.Label(); - this.preapplaunchermenuholder = new System.Windows.Forms.Panel(); - this.predesktopappmenu = new System.Windows.Forms.MenuStrip(); - this.ApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.KnowledgeInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShiftoriumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ClockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.TerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.ShutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.Panel10 = new System.Windows.Forms.Panel(); - this.btndesktopitself = new System.Windows.Forms.Button(); - this.btnpanelclock = new System.Windows.Forms.Button(); - this.btnapplauncher = new System.Windows.Forms.Button(); - this.btndesktoppanel = new System.Windows.Forms.Button(); - this.txtpanelbuttoniconheight = new System.Windows.Forms.TextBox(); - this.pnlwindowsoptions = new System.Windows.Forms.Panel(); - this.pnlwindowsintro = new System.Windows.Forms.Panel(); - this.Label68 = new System.Windows.Forms.Label(); - this.Label67 = new System.Windows.Forms.Label(); - this.pnlbuttonoptions = new System.Windows.Forms.Panel(); - this.pnlclosebuttonoptions = new System.Windows.Forms.Panel(); - this.Label8 = new System.Windows.Forms.Label(); - this.Label11 = new System.Windows.Forms.Label(); - this.pnlclosebuttoncolour = new System.Windows.Forms.Panel(); - this.txtclosebuttonfromside = new System.Windows.Forms.TextBox(); - this.Label7 = new System.Windows.Forms.Label(); - this.Label12 = new System.Windows.Forms.Label(); - this.txtclosebuttonheight = new System.Windows.Forms.TextBox(); - this.Label13 = new System.Windows.Forms.Label(); - this.Label6 = new System.Windows.Forms.Label(); - this.txtclosebuttonfromtop = new System.Windows.Forms.TextBox(); - this.Label10 = new System.Windows.Forms.Label(); - this.Label14 = new System.Windows.Forms.Label(); - this.txtclosebuttonwidth = new System.Windows.Forms.TextBox(); - this.Label9 = new System.Windows.Forms.Label(); - this.pnlrollupbuttonoptions = new System.Windows.Forms.Panel(); - this.Label54 = new System.Windows.Forms.Label(); - this.Label55 = new System.Windows.Forms.Label(); - this.pnlrollupbuttoncolour = new System.Windows.Forms.Panel(); - this.txtrollupbuttonside = new System.Windows.Forms.TextBox(); - this.Label56 = new System.Windows.Forms.Label(); - this.Label57 = new System.Windows.Forms.Label(); - this.txtrollupbuttonheight = new System.Windows.Forms.TextBox(); - this.Label58 = new System.Windows.Forms.Label(); - this.Label59 = new System.Windows.Forms.Label(); - this.txtrollupbuttontop = new System.Windows.Forms.TextBox(); - this.Label60 = new System.Windows.Forms.Label(); - this.Label61 = new System.Windows.Forms.Label(); - this.txtrollupbuttonwidth = new System.Windows.Forms.TextBox(); - this.Label62 = new System.Windows.Forms.Label(); - this.pnlminimizebuttonoptions = new System.Windows.Forms.Panel(); - this.Label82 = new System.Windows.Forms.Label(); - this.Label83 = new System.Windows.Forms.Label(); - this.pnlminimizebuttoncolour = new System.Windows.Forms.Panel(); - this.txtminimizebuttonside = new System.Windows.Forms.TextBox(); - this.Label84 = new System.Windows.Forms.Label(); - this.Label85 = new System.Windows.Forms.Label(); - this.txtminimizebuttonheight = new System.Windows.Forms.TextBox(); - this.Label86 = new System.Windows.Forms.Label(); - this.Label87 = new System.Windows.Forms.Label(); - this.txtminimizebuttontop = new System.Windows.Forms.TextBox(); - this.Label88 = new System.Windows.Forms.Label(); - this.Label89 = new System.Windows.Forms.Label(); - this.txtminimizebuttonwidth = new System.Windows.Forms.TextBox(); - this.Label90 = new System.Windows.Forms.Label(); - this.combobuttonoption = new System.Windows.Forms.ComboBox(); - this.Label52 = new System.Windows.Forms.Label(); - this.pnltitlebaroptions = new System.Windows.Forms.Panel(); - this.Label80 = new System.Windows.Forms.Label(); - this.txticonfromtop = new System.Windows.Forms.TextBox(); - this.Label81 = new System.Windows.Forms.Label(); - this.Label78 = new System.Windows.Forms.Label(); - this.txticonfromside = new System.Windows.Forms.TextBox(); - this.Label79 = new System.Windows.Forms.Label(); - this.lbcornerwidthpx = new System.Windows.Forms.Label(); - this.txttitlebarcornerwidth = new System.Windows.Forms.TextBox(); - this.lbcornerwidth = new System.Windows.Forms.Label(); - this.pnltitlebarrightcornercolour = new System.Windows.Forms.Panel(); - this.pnltitlebarleftcornercolour = new System.Windows.Forms.Panel(); - this.lbrightcornercolor = new System.Windows.Forms.Label(); - this.lbleftcornercolor = new System.Windows.Forms.Label(); - this.cboxtitlebarcorners = new System.Windows.Forms.CheckBox(); - this.Label5 = new System.Windows.Forms.Label(); - this.txttitlebarheight = new System.Windows.Forms.TextBox(); - this.Label4 = new System.Windows.Forms.Label(); - this.pnltitlebarcolour = new System.Windows.Forms.Panel(); - this.Label2 = new System.Windows.Forms.Label(); - this.pnlborderoptions = new System.Windows.Forms.Panel(); - this.cbindividualbordercolours = new System.Windows.Forms.CheckBox(); - this.pnlborderbottomrightcolour = new System.Windows.Forms.Panel(); - this.lbbright = new System.Windows.Forms.Label(); - this.pnlborderbottomcolour = new System.Windows.Forms.Panel(); - this.lbbottom = new System.Windows.Forms.Label(); - this.pnlborderbottomleftcolour = new System.Windows.Forms.Panel(); - this.lbbleft = new System.Windows.Forms.Label(); - this.pnlborderrightcolour = new System.Windows.Forms.Panel(); - this.lbright = new System.Windows.Forms.Label(); - this.pnlborderleftcolour = new System.Windows.Forms.Panel(); - this.lbleft = new System.Windows.Forms.Label(); - this.Label15 = new System.Windows.Forms.Label(); - this.pnlbordercolour = new System.Windows.Forms.Panel(); - this.txtbordersize = new System.Windows.Forms.TextBox(); - this.Label3 = new System.Windows.Forms.Label(); - this.Label16 = new System.Windows.Forms.Label(); - this.pnltitletextoptions = new System.Windows.Forms.Panel(); - this.combotitletextposition = new System.Windows.Forms.ComboBox(); - this.Label53 = new System.Windows.Forms.Label(); - this.combotitletextstyle = new System.Windows.Forms.ComboBox(); - this.combotitletextfont = new System.Windows.Forms.ComboBox(); - this.Label23 = new System.Windows.Forms.Label(); - this.Label17 = new System.Windows.Forms.Label(); - this.txttitletextside = new System.Windows.Forms.TextBox(); - this.Label18 = new System.Windows.Forms.Label(); - this.Label19 = new System.Windows.Forms.Label(); - this.txttitletexttop = new System.Windows.Forms.TextBox(); - this.Label20 = new System.Windows.Forms.Label(); - this.Label21 = new System.Windows.Forms.Label(); - this.txttitletextsize = new System.Windows.Forms.TextBox(); - this.Label22 = new System.Windows.Forms.Label(); - this.Label24 = new System.Windows.Forms.Label(); - this.pnltitletextcolour = new System.Windows.Forms.Panel(); - this.Label25 = new System.Windows.Forms.Label(); - this.pnlwindowsobjects = new System.Windows.Forms.Panel(); - this.btnborders = new System.Windows.Forms.Button(); - this.btnbuttons = new System.Windows.Forms.Button(); - this.btntitletext = new System.Windows.Forms.Button(); - this.btntitlebar = new System.Windows.Forms.Button(); - this.pnlwindowpreview = new System.Windows.Forms.Panel(); - this.prepgcontent = new System.Windows.Forms.Panel(); - this.prepgbottom = new System.Windows.Forms.Panel(); - this.prepgleft = new System.Windows.Forms.Panel(); - this.prepgbottomlcorner = new System.Windows.Forms.Panel(); - this.prepgright = new System.Windows.Forms.Panel(); - this.prepgbottomrcorner = new System.Windows.Forms.Panel(); - this.pretitlebar = new System.Windows.Forms.Panel(); - this.preminimizebutton = new System.Windows.Forms.Panel(); - this.prepnlicon = new System.Windows.Forms.PictureBox(); - this.prerollupbutton = new System.Windows.Forms.Panel(); - this.preclosebutton = new System.Windows.Forms.Panel(); - this.pretitletext = new System.Windows.Forms.Label(); - this.prepgtoplcorner = new System.Windows.Forms.Panel(); - this.prepgtoprcorner = new System.Windows.Forms.Panel(); - this.pnlreset = new System.Windows.Forms.Panel(); - this.Label113 = new System.Windows.Forms.Label(); - this.btnresetallsettings = new System.Windows.Forms.Button(); - this.Label109 = new System.Windows.Forms.Label(); - this.Label111 = new System.Windows.Forms.Label(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.pnldesktopcomposition = new System.Windows.Forms.Panel(); - this.pnlfancywindows = new System.Windows.Forms.Panel(); - this.txtwinfadedec = new System.Windows.Forms.TextBox(); - this.label150 = new System.Windows.Forms.Label(); - this.txtwinfadespeed = new System.Windows.Forms.TextBox(); - this.label151 = new System.Windows.Forms.Label(); - this.cbdrageffect = new System.Windows.Forms.ComboBox(); - this.label141 = new System.Windows.Forms.Label(); - this.cbcloseanim = new System.Windows.Forms.ComboBox(); - this.label128 = new System.Windows.Forms.Label(); - this.cbopenanim = new System.Windows.Forms.ComboBox(); - this.label127 = new System.Windows.Forms.Label(); - this.label149 = new System.Windows.Forms.Label(); - this.pnlfancydragging = new System.Windows.Forms.Panel(); - this.txtshakeminoffset = new System.Windows.Forms.TextBox(); - this.label148 = new System.Windows.Forms.Label(); - this.txtshakemax = new System.Windows.Forms.TextBox(); - this.label146 = new System.Windows.Forms.Label(); - this.txtdragopacitydec = new System.Windows.Forms.TextBox(); - this.label144 = new System.Windows.Forms.Label(); - this.txtdragfadedec = new System.Windows.Forms.TextBox(); - this.label143 = new System.Windows.Forms.Label(); - this.txtfadespeed = new System.Windows.Forms.TextBox(); - this.label155 = new System.Windows.Forms.Label(); - this.label156 = new System.Windows.Forms.Label(); - this.pnlfancyintro = new System.Windows.Forms.Panel(); - this.label174 = new System.Windows.Forms.Label(); - this.label175 = new System.Windows.Forms.Label(); - this.panel18 = new System.Windows.Forms.Panel(); - this.panel19 = new System.Windows.Forms.Panel(); - this.label157 = new System.Windows.Forms.Label(); - this.panel20 = new System.Windows.Forms.Panel(); - this.label158 = new System.Windows.Forms.Label(); - this.panel21 = new System.Windows.Forms.Panel(); - this.label159 = new System.Windows.Forms.Label(); - this.panel22 = new System.Windows.Forms.Panel(); - this.label160 = new System.Windows.Forms.Label(); - this.panel23 = new System.Windows.Forms.Panel(); - this.label161 = new System.Windows.Forms.Label(); - this.panel24 = new System.Windows.Forms.Panel(); - this.label162 = new System.Windows.Forms.Label(); - this.label163 = new System.Windows.Forms.Label(); - this.panel25 = new System.Windows.Forms.Panel(); - this.panel26 = new System.Windows.Forms.Panel(); - this.label164 = new System.Windows.Forms.Label(); - this.panel27 = new System.Windows.Forms.Panel(); - this.label165 = new System.Windows.Forms.Label(); - this.panel28 = new System.Windows.Forms.Panel(); - this.label166 = new System.Windows.Forms.Label(); - this.panel29 = new System.Windows.Forms.Panel(); - this.label167 = new System.Windows.Forms.Label(); - this.panel30 = new System.Windows.Forms.Panel(); - this.label168 = new System.Windows.Forms.Label(); - this.panel31 = new System.Windows.Forms.Panel(); - this.label169 = new System.Windows.Forms.Label(); - this.panel32 = new System.Windows.Forms.Panel(); - this.label170 = new System.Windows.Forms.Label(); - this.panel33 = new System.Windows.Forms.Panel(); - this.label171 = new System.Windows.Forms.Label(); - this.panel34 = new System.Windows.Forms.Panel(); - this.label172 = new System.Windows.Forms.Label(); - this.label173 = new System.Windows.Forms.Label(); - this.panel36 = new System.Windows.Forms.Panel(); - this.btnfancydragging = new System.Windows.Forms.Button(); - this.btnfancywindows = new System.Windows.Forms.Button(); - this.label176 = new System.Windows.Forms.Label(); - this.pnlmenus = new System.Windows.Forms.Panel(); - this.pnladvanced = new System.Windows.Forms.Panel(); - this.btnmorebuttons = new System.Windows.Forms.Button(); - this.pnlbuttonchecked = new System.Windows.Forms.Panel(); - this.label136 = new System.Windows.Forms.Label(); - this.pnlitemselectedend = new System.Windows.Forms.Panel(); - this.label129 = new System.Windows.Forms.Label(); - this.pnlbuttonpressed = new System.Windows.Forms.Panel(); - this.label130 = new System.Windows.Forms.Label(); - this.pnlitemselectedbegin = new System.Windows.Forms.Panel(); - this.label131 = new System.Windows.Forms.Label(); - this.pnlitemselected = new System.Windows.Forms.Panel(); - this.label132 = new System.Windows.Forms.Label(); - this.pnlbuttonselected = new System.Windows.Forms.Panel(); - this.label133 = new System.Windows.Forms.Label(); - this.pnlcheckbg = new System.Windows.Forms.Panel(); - this.label134 = new System.Windows.Forms.Label(); - this.label135 = new System.Windows.Forms.Label(); - this.pnlmore = new System.Windows.Forms.Panel(); - this.pnlpressedbegin = new System.Windows.Forms.Panel(); - this.btnback = new System.Windows.Forms.Button(); - this.label138 = new System.Windows.Forms.Label(); - this.pnlselectedbegin = new System.Windows.Forms.Panel(); - this.pnlpressedend = new System.Windows.Forms.Panel(); - this.label137 = new System.Windows.Forms.Label(); - this.label139 = new System.Windows.Forms.Label(); - this.pnlselectedend = new System.Windows.Forms.Panel(); - this.pnlpressedmiddle = new System.Windows.Forms.Panel(); - this.label140 = new System.Windows.Forms.Label(); - this.label142 = new System.Windows.Forms.Label(); - this.pnlselectedmiddle = new System.Windows.Forms.Panel(); - this.label145 = new System.Windows.Forms.Label(); - this.label147 = new System.Windows.Forms.Label(); - this.pnldropdown = new System.Windows.Forms.Panel(); - this.pnlddborder = new System.Windows.Forms.Panel(); - this.label117 = new System.Windows.Forms.Label(); - this.pnlmarginend = new System.Windows.Forms.Panel(); - this.label120 = new System.Windows.Forms.Label(); - this.pnlmarginmiddle = new System.Windows.Forms.Panel(); - this.label121 = new System.Windows.Forms.Label(); - this.pnlmarginbegin = new System.Windows.Forms.Panel(); - this.label122 = new System.Windows.Forms.Label(); - this.pnlhcolor = new System.Windows.Forms.Panel(); - this.label123 = new System.Windows.Forms.Label(); - this.pnlhborder = new System.Windows.Forms.Panel(); - this.label125 = new System.Windows.Forms.Label(); - this.label126 = new System.Windows.Forms.Label(); - this.pnlbasic = new System.Windows.Forms.Panel(); - this.pnlmenutextcolor = new System.Windows.Forms.Panel(); - this.label118 = new System.Windows.Forms.Label(); - this.pnldropdownbg = new System.Windows.Forms.Panel(); - this.label115 = new System.Windows.Forms.Label(); - this.pnlstatusend = new System.Windows.Forms.Panel(); - this.label114 = new System.Windows.Forms.Label(); - this.pnlstatusbegin = new System.Windows.Forms.Panel(); - this.label107 = new System.Windows.Forms.Label(); - this.pnltoolbarend = new System.Windows.Forms.Panel(); - this.label77 = new System.Windows.Forms.Label(); - this.pnltoolbarmiddle = new System.Windows.Forms.Panel(); - this.label76 = new System.Windows.Forms.Label(); - this.pnltoolbarbegin = new System.Windows.Forms.Panel(); - this.label75 = new System.Windows.Forms.Label(); - this.pnlmenubarend = new System.Windows.Forms.Panel(); - this.label73 = new System.Windows.Forms.Label(); - this.pnlmenubarbegin = new System.Windows.Forms.Panel(); - this.label42 = new System.Windows.Forms.Label(); - this.label41 = new System.Windows.Forms.Label(); - this.pnlmenusintro = new System.Windows.Forms.Panel(); - this.label116 = new System.Windows.Forms.Label(); - this.label124 = new System.Windows.Forms.Label(); - this.pnlmenucategories = new System.Windows.Forms.Panel(); - this.btnmisc = new System.Windows.Forms.Button(); - this.btnadvanced = new System.Windows.Forms.Button(); - this.btndropdown = new System.Windows.Forms.Button(); - this.btnbasic = new System.Windows.Forms.Button(); - this.label74 = new System.Windows.Forms.Label(); - this.tmrfix = new System.Windows.Forms.Timer(this.components); - this.tmrdelay = new System.Windows.Forms.Timer(this.components); - this.pnlluaoptions = new System.Windows.Forms.Panel(); - this.flmorebuttons = new System.Windows.Forms.FlowLayoutPanel(); - this.pnlluafield = new System.Windows.Forms.Panel(); - this.catholder.SuspendLayout(); - this.pnlshifterintro.SuspendLayout(); - this.pnldesktopoptions.SuspendLayout(); - this.pnldesktoppaneloptions.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.txtdesktoppanelheight)).BeginInit(); - this.pnlapplauncheroptions.SuspendLayout(); - this.pnldesktopintro.SuspendLayout(); - this.pnlpanelbuttonsoptions.SuspendLayout(); - this.pnldesktopbackgroundoptions.SuspendLayout(); - this.pnlpanelclockoptions.SuspendLayout(); - this.pnldesktoppreview.SuspendLayout(); - this.predesktoppanel.SuspendLayout(); - this.prepnlpanelbuttonholder.SuspendLayout(); - this.prepnlpanelbutton.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).BeginInit(); - this.pretimepanel.SuspendLayout(); - this.preapplaunchermenuholder.SuspendLayout(); - this.predesktopappmenu.SuspendLayout(); - this.Panel10.SuspendLayout(); - this.pnlwindowsoptions.SuspendLayout(); - this.pnlwindowsintro.SuspendLayout(); - this.pnlbuttonoptions.SuspendLayout(); - this.pnlclosebuttonoptions.SuspendLayout(); - this.pnlrollupbuttonoptions.SuspendLayout(); - this.pnlminimizebuttonoptions.SuspendLayout(); - this.pnltitlebaroptions.SuspendLayout(); - this.pnlborderoptions.SuspendLayout(); - this.pnltitletextoptions.SuspendLayout(); - this.pnlwindowsobjects.SuspendLayout(); - this.pnlwindowpreview.SuspendLayout(); - this.prepgleft.SuspendLayout(); - this.prepgright.SuspendLayout(); - this.pretitlebar.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).BeginInit(); - this.pnlreset.SuspendLayout(); - this.pgcontents.SuspendLayout(); - this.pnldesktopcomposition.SuspendLayout(); - this.pnlfancywindows.SuspendLayout(); - this.pnlfancydragging.SuspendLayout(); - this.pnlfancyintro.SuspendLayout(); - this.panel18.SuspendLayout(); - this.panel25.SuspendLayout(); - this.panel36.SuspendLayout(); - this.pnlmenus.SuspendLayout(); - this.pnladvanced.SuspendLayout(); - this.pnlmore.SuspendLayout(); - this.pnldropdown.SuspendLayout(); - this.pnlbasic.SuspendLayout(); - this.pnlmenusintro.SuspendLayout(); - this.pnlmenucategories.SuspendLayout(); - this.pnlluaoptions.SuspendLayout(); - this.SuspendLayout(); - // - // clocktick - // - this.clocktick.Enabled = true; - this.clocktick.Interval = 1000; - // - // customizationtime - // - this.customizationtime.Enabled = true; - this.customizationtime.Interval = 10000; - // - // timerearned - // - this.timerearned.Interval = 3000; - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.ForeColor = System.Drawing.Color.White; - this.Label1.Location = new System.Drawing.Point(597, 3); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(39, 13); - this.Label1.TabIndex = 1; - this.Label1.Text = "Label1"; - // - // btnapply - // - this.btnapply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnapply.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnapply.Location = new System.Drawing.Point(7, 286); - this.btnapply.Name = "btnapply"; - this.btnapply.Size = new System.Drawing.Size(119, 29); - this.btnapply.TabIndex = 3; - this.btnapply.TabStop = false; - this.btnapply.Text = "Apply Changes"; - this.btnapply.UseVisualStyleBackColor = true; - this.btnapply.Click += new System.EventHandler(this.btnapply_Click); - // - // catholder - // - this.catholder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.catholder.BackColor = System.Drawing.Color.White; - this.catholder.Controls.Add(this.btnmore); - this.catholder.Controls.Add(this.btnreset); - this.catholder.Controls.Add(this.btnwindowcomposition); - this.catholder.Controls.Add(this.btndesktopicons); - this.catholder.Controls.Add(this.btnmenus); - this.catholder.Controls.Add(this.btnwindows); - this.catholder.Controls.Add(this.btndesktop); - this.catholder.Location = new System.Drawing.Point(7, 9); - this.catholder.Name = "catholder"; - this.catholder.Size = new System.Drawing.Size(119, 271); - this.catholder.TabIndex = 5; - // - // btnmore - // - this.btnmore.BackColor = System.Drawing.Color.White; - this.btnmore.Dock = System.Windows.Forms.DockStyle.Top; - this.btnmore.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnmore.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnmore.Location = new System.Drawing.Point(0, 174); - this.btnmore.Name = "btnmore"; - this.btnmore.Size = new System.Drawing.Size(119, 29); - this.btnmore.TabIndex = 11; - this.btnmore.TabStop = false; - this.btnmore.Text = "More"; - this.btnmore.UseVisualStyleBackColor = false; - this.btnmore.Click += new System.EventHandler(this.btnmore_Click); - // - // btnreset - // - this.btnreset.BackColor = System.Drawing.Color.White; - this.btnreset.Dock = System.Windows.Forms.DockStyle.Top; - this.btnreset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnreset.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnreset.Location = new System.Drawing.Point(0, 145); - this.btnreset.Name = "btnreset"; - this.btnreset.Size = new System.Drawing.Size(119, 29); - this.btnreset.TabIndex = 8; - this.btnreset.TabStop = false; - this.btnreset.Text = "Reset"; - this.btnreset.UseVisualStyleBackColor = false; - this.btnreset.Click += new System.EventHandler(this.btnreset_Click); - // - // btnwindowcomposition - // - this.btnwindowcomposition.BackColor = System.Drawing.Color.White; - this.btnwindowcomposition.Dock = System.Windows.Forms.DockStyle.Top; - this.btnwindowcomposition.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnwindowcomposition.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnwindowcomposition.Location = new System.Drawing.Point(0, 116); - this.btnwindowcomposition.Name = "btnwindowcomposition"; - this.btnwindowcomposition.Size = new System.Drawing.Size(119, 29); - this.btnwindowcomposition.TabIndex = 10; - this.btnwindowcomposition.TabStop = false; - this.btnwindowcomposition.Text = "Fancy Effects"; - this.btnwindowcomposition.UseVisualStyleBackColor = false; - this.btnwindowcomposition.Visible = false; - this.btnwindowcomposition.Click += new System.EventHandler(this.btnwindowcomposition_Click); - // - // btndesktopicons - // - this.btndesktopicons.BackColor = System.Drawing.Color.White; - this.btndesktopicons.Dock = System.Windows.Forms.DockStyle.Top; - this.btndesktopicons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndesktopicons.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btndesktopicons.Location = new System.Drawing.Point(0, 87); - this.btndesktopicons.Name = "btndesktopicons"; - this.btndesktopicons.Size = new System.Drawing.Size(119, 29); - this.btndesktopicons.TabIndex = 9; - this.btndesktopicons.TabStop = false; - this.btndesktopicons.Text = "Desktop Icons"; - this.btndesktopicons.UseVisualStyleBackColor = false; - this.btndesktopicons.Visible = false; - // - // btnmenus - // - this.btnmenus.BackColor = System.Drawing.Color.White; - this.btnmenus.Dock = System.Windows.Forms.DockStyle.Top; - this.btnmenus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnmenus.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnmenus.Location = new System.Drawing.Point(0, 58); - this.btnmenus.Name = "btnmenus"; - this.btnmenus.Size = new System.Drawing.Size(119, 29); - this.btnmenus.TabIndex = 6; - this.btnmenus.TabStop = false; - this.btnmenus.Text = "Menus"; - this.btnmenus.UseVisualStyleBackColor = false; - this.btnmenus.Visible = false; - this.btnmenus.Click += new System.EventHandler(this.btnmenus_Click_1); - // - // btnwindows - // - this.btnwindows.BackColor = System.Drawing.Color.White; - this.btnwindows.Dock = System.Windows.Forms.DockStyle.Top; - this.btnwindows.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnwindows.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnwindows.Location = new System.Drawing.Point(0, 29); - this.btnwindows.Name = "btnwindows"; - this.btnwindows.Size = new System.Drawing.Size(119, 29); - this.btnwindows.TabIndex = 5; - this.btnwindows.TabStop = false; - this.btnwindows.Text = "Windows"; - this.btnwindows.UseVisualStyleBackColor = false; - this.btnwindows.Click += new System.EventHandler(this.btnwindows_Click); - // - // btndesktop - // - this.btndesktop.BackColor = System.Drawing.Color.White; - this.btndesktop.Dock = System.Windows.Forms.DockStyle.Top; - this.btndesktop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndesktop.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btndesktop.Location = new System.Drawing.Point(0, 0); - this.btndesktop.Name = "btndesktop"; - this.btndesktop.Size = new System.Drawing.Size(119, 29); - this.btndesktop.TabIndex = 4; - this.btndesktop.TabStop = false; - this.btndesktop.Text = "Desktop"; - this.btndesktop.UseVisualStyleBackColor = false; - this.btndesktop.Click += new System.EventHandler(this.btndesktop_Click); - // - // pnlshifterintro - // - this.pnlshifterintro.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlshifterintro.BackColor = System.Drawing.Color.White; - this.pnlshifterintro.Controls.Add(this.Label66); - this.pnlshifterintro.Controls.Add(this.Label65); - this.pnlshifterintro.Controls.Add(this.Label64); - this.pnlshifterintro.Controls.Add(this.Label63); - this.pnlshifterintro.Location = new System.Drawing.Point(134, 9); - this.pnlshifterintro.Name = "pnlshifterintro"; - this.pnlshifterintro.Size = new System.Drawing.Size(457, 306); - this.pnlshifterintro.TabIndex = 17; - // - // Label66 - // - this.Label66.BackColor = System.Drawing.Color.Transparent; - this.Label66.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label66.Location = new System.Drawing.Point(3, 227); - this.Label66.Name = "Label66"; - this.Label66.Size = new System.Drawing.Size(451, 65); - this.Label66.TabIndex = 3; - this.Label66.Text = "That\'s right! As you make customizations to ShiftOS, you can earn Codepoints. The" + - " more you shift it, the more CP you earn. Just hit the \'Apply Changes\' button, a" + - "nd you\'ll recieve your codepoints."; - this.Label66.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // Label65 - // - this.Label65.AutoSize = true; - this.Label65.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label65.Location = new System.Drawing.Point(53, 204); - this.Label65.Name = "Label65"; - this.Label65.Size = new System.Drawing.Size(352, 20); - this.Label65.TabIndex = 2; - this.Label65.Text = "You can earn codepoints using the Shifter!"; - // - // Label64 - // - this.Label64.BackColor = System.Drawing.Color.Transparent; - this.Label64.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label64.Location = new System.Drawing.Point(4, 32); - this.Label64.Name = "Label64"; - this.Label64.Size = new System.Drawing.Size(451, 167); - this.Label64.TabIndex = 1; - this.Label64.Text = resources.GetString("Label64.Text"); - this.Label64.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // Label63 - // - this.Label63.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label63.Location = new System.Drawing.Point(72, 0); - this.Label63.Name = "Label63"; - this.Label63.Size = new System.Drawing.Size(332, 29); - this.Label63.TabIndex = 0; - this.Label63.Text = "Welcome to the Shifter!"; - // - // pnldesktopoptions - // - this.pnldesktopoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnldesktopoptions.BackColor = System.Drawing.Color.White; - this.pnldesktopoptions.Controls.Add(this.pnlapplauncheroptions); - this.pnldesktopoptions.Controls.Add(this.pnldesktoppaneloptions); - this.pnldesktopoptions.Controls.Add(this.pnldesktopintro); - this.pnldesktopoptions.Controls.Add(this.pnlpanelbuttonsoptions); - this.pnldesktopoptions.Controls.Add(this.pnldesktopbackgroundoptions); - this.pnldesktopoptions.Controls.Add(this.pnlpanelclockoptions); - this.pnldesktopoptions.Controls.Add(this.pnldesktoppreview); - this.pnldesktopoptions.Controls.Add(this.Panel10); - this.pnldesktopoptions.Location = new System.Drawing.Point(134, 9); - this.pnldesktopoptions.Name = "pnldesktopoptions"; - this.pnldesktopoptions.Size = new System.Drawing.Size(457, 306); - this.pnldesktopoptions.TabIndex = 16; - this.pnldesktopoptions.Visible = false; - // - // pnldesktoppaneloptions - // - this.pnldesktoppaneloptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnldesktoppaneloptions.Controls.Add(this.btnpanelbuttons); - this.pnldesktoppaneloptions.Controls.Add(this.lbwarning); - this.pnldesktoppaneloptions.Controls.Add(this.combodesktoppanelposition); - this.pnldesktoppaneloptions.Controls.Add(this.lbposition); - this.pnldesktoppaneloptions.Controls.Add(this.Label47); - this.pnldesktoppaneloptions.Controls.Add(this.txtdesktoppanelheight); - this.pnldesktoppaneloptions.Controls.Add(this.lbheight); - this.pnldesktoppaneloptions.Controls.Add(this.pnldesktoppanelcolour); - this.pnldesktoppaneloptions.Controls.Add(this.lbpanelcolor); - this.pnldesktoppaneloptions.Location = new System.Drawing.Point(135, 159); - this.pnldesktoppaneloptions.Name = "pnldesktoppaneloptions"; - this.pnldesktoppaneloptions.Size = new System.Drawing.Size(317, 140); - this.pnldesktoppaneloptions.TabIndex = 9; - this.pnldesktoppaneloptions.Visible = false; - // - // btnpanelbuttons - // - this.btnpanelbuttons.BackColor = System.Drawing.Color.White; - this.btnpanelbuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpanelbuttons.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpanelbuttons.Location = new System.Drawing.Point(193, 101); - this.btnpanelbuttons.Name = "btnpanelbuttons"; - this.btnpanelbuttons.Size = new System.Drawing.Size(119, 29); - this.btnpanelbuttons.TabIndex = 8; - this.btnpanelbuttons.Text = "Panel Buttons >"; - this.btnpanelbuttons.UseVisualStyleBackColor = false; - this.btnpanelbuttons.Click += new System.EventHandler(this.btnpanelbuttons_Click); - // - // lbwarning - // - this.lbwarning.Location = new System.Drawing.Point(3, 52); - this.lbwarning.Name = "lbwarning"; - this.lbwarning.Size = new System.Drawing.Size(290, 42); - this.lbwarning.TabIndex = 8; - this.lbwarning.Text = "Warning: If you set the panel position to the bottom you must hide your windows t" + - "askbar and restart ShiftOS on your host operating system to prevent a visual bug" + - "."; - // - // combodesktoppanelposition - // - this.combodesktoppanelposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.combodesktoppanelposition.FormattingEnabled = true; - this.combodesktoppanelposition.Items.AddRange(new object[] { - "Top", - "Bottom"}); - this.combodesktoppanelposition.Location = new System.Drawing.Point(103, 28); - this.combodesktoppanelposition.Name = "combodesktoppanelposition"; - this.combodesktoppanelposition.Size = new System.Drawing.Size(59, 24); - this.combodesktoppanelposition.TabIndex = 7; - this.combodesktoppanelposition.SelectedIndexChanged += new System.EventHandler(this.combodesktoppanelposition_SelectedIndexChanged); - // - // lbposition - // - this.lbposition.AutoSize = true; - this.lbposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbposition.Location = new System.Drawing.Point(3, 31); - this.lbposition.Name = "lbposition"; - this.lbposition.Size = new System.Drawing.Size(97, 16); - this.lbposition.TabIndex = 6; - this.lbposition.Text = "Panel Position:"; - // - // Label47 - // - this.Label47.AutoSize = true; - this.Label47.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label47.Location = new System.Drawing.Point(226, 8); - this.Label47.Name = "Label47"; - this.Label47.Size = new System.Drawing.Size(22, 16); - this.Label47.TabIndex = 5; - this.Label47.Text = "px"; - // - // txtdesktoppanelheight - // - this.txtdesktoppanelheight.BackColor = System.Drawing.Color.White; - this.txtdesktoppanelheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtdesktoppanelheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtdesktoppanelheight.ForeColor = System.Drawing.Color.Black; - this.txtdesktoppanelheight.Location = new System.Drawing.Point(189, 5); - this.txtdesktoppanelheight.Name = "txtdesktoppanelheight"; - this.txtdesktoppanelheight.Size = new System.Drawing.Size(37, 22); - this.txtdesktoppanelheight.TabIndex = 4; - this.txtdesktoppanelheight.ValueChanged += new System.EventHandler(this.txtdesktoppanelheight_ValueChanged); - // - // lbheight - // - this.lbheight.AutoSize = true; - this.lbheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbheight.Location = new System.Drawing.Point(138, 7); - this.lbheight.Name = "lbheight"; - this.lbheight.Size = new System.Drawing.Size(50, 16); - this.lbheight.TabIndex = 2; - this.lbheight.Text = "Height:"; - // - // pnldesktoppanelcolour - // - this.pnldesktoppanelcolour.Location = new System.Drawing.Point(92, 5); - this.pnldesktoppanelcolour.Name = "pnldesktoppanelcolour"; - this.pnldesktoppanelcolour.Size = new System.Drawing.Size(41, 20); - this.pnldesktoppanelcolour.TabIndex = 1; - this.pnldesktoppanelcolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ChangeDesktopPanelColor); - // - // lbpanelcolor - // - this.lbpanelcolor.AutoSize = true; - this.lbpanelcolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbpanelcolor.Location = new System.Drawing.Point(3, 7); - this.lbpanelcolor.Name = "lbpanelcolor"; - this.lbpanelcolor.Size = new System.Drawing.Size(88, 16); - this.lbpanelcolor.TabIndex = 0; - this.lbpanelcolor.Text = "Panel Colour:"; - // - // pnlapplauncheroptions - // - this.pnlapplauncheroptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlapplauncheroptions.Controls.Add(this.pnlalhover); - this.pnlapplauncheroptions.Controls.Add(this.label119); - this.pnlapplauncheroptions.Controls.Add(this.Label71); - this.pnlapplauncheroptions.Controls.Add(this.txtapplauncherwidth); - this.pnlapplauncheroptions.Controls.Add(this.Label72); - this.pnlapplauncheroptions.Controls.Add(this.txtappbuttonlabel); - this.pnlapplauncheroptions.Controls.Add(this.Label51); - this.pnlapplauncheroptions.Controls.Add(this.Label50); - this.pnlapplauncheroptions.Controls.Add(this.pnlmaintextcolour); - this.pnlapplauncheroptions.Controls.Add(this.comboappbuttontextstyle); - this.pnlapplauncheroptions.Controls.Add(this.comboappbuttontextfont); - this.pnlapplauncheroptions.Controls.Add(this.Label37); - this.pnlapplauncheroptions.Controls.Add(this.Label38); - this.pnlapplauncheroptions.Controls.Add(this.txtappbuttontextsize); - this.pnlapplauncheroptions.Controls.Add(this.Label39); - this.pnlapplauncheroptions.Controls.Add(this.Label40); - this.pnlapplauncheroptions.Controls.Add(this.pnlmainbuttonactivated); - this.pnlapplauncheroptions.Controls.Add(this.Label28); - this.pnlapplauncheroptions.Controls.Add(this.Label35); - this.pnlapplauncheroptions.Controls.Add(this.txtapplicationsbuttonheight); - this.pnlapplauncheroptions.Controls.Add(this.Label36); - this.pnlapplauncheroptions.Controls.Add(this.pnlmainbuttoncolour); - this.pnlapplauncheroptions.Controls.Add(this.Label43); - this.pnlapplauncheroptions.Location = new System.Drawing.Point(135, 159); - this.pnlapplauncheroptions.Name = "pnlapplauncheroptions"; - this.pnlapplauncheroptions.Size = new System.Drawing.Size(317, 140); - this.pnlapplauncheroptions.TabIndex = 10; - this.pnlapplauncheroptions.Visible = false; - // - // pnlalhover - // - this.pnlalhover.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlalhover.Location = new System.Drawing.Point(90, 29); - this.pnlalhover.Name = "pnlalhover"; - this.pnlalhover.Size = new System.Drawing.Size(41, 20); - this.pnlalhover.TabIndex = 3; - this.pnlalhover.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetALHoverColor); - // - // label119 - // - this.label119.AutoSize = true; - this.label119.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label119.Location = new System.Drawing.Point(3, 31); - this.label119.Name = "label119"; - this.label119.Size = new System.Drawing.Size(84, 16); - this.label119.TabIndex = 2; - this.label119.Text = "Mouse Over:"; - // - // Label71 - // - this.Label71.AutoSize = true; - this.Label71.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label71.Location = new System.Drawing.Point(203, 103); - this.Label71.Name = "Label71"; - this.Label71.Size = new System.Drawing.Size(22, 16); - this.Label71.TabIndex = 33; - this.Label71.Text = "px"; - // - // txtapplauncherwidth - // - this.txtapplauncherwidth.BackColor = System.Drawing.Color.White; - this.txtapplauncherwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtapplauncherwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtapplauncherwidth.ForeColor = System.Drawing.Color.Black; - this.txtapplauncherwidth.Location = new System.Drawing.Point(148, 101); - this.txtapplauncherwidth.Name = "txtapplauncherwidth"; - this.txtapplauncherwidth.Size = new System.Drawing.Size(54, 22); - this.txtapplauncherwidth.TabIndex = 32; - this.txtapplauncherwidth.TextChanged += new System.EventHandler(this.txtapplauncherwidth_TextChanged); - // - // Label72 - // - this.Label72.AutoSize = true; - this.Label72.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label72.Location = new System.Drawing.Point(103, 103); - this.Label72.Name = "Label72"; - this.Label72.Size = new System.Drawing.Size(45, 16); - this.Label72.TabIndex = 31; - this.Label72.Text = "Width:"; - // - // txtappbuttonlabel - // - this.txtappbuttonlabel.BackColor = System.Drawing.Color.White; - this.txtappbuttonlabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtappbuttonlabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtappbuttonlabel.ForeColor = System.Drawing.Color.Black; - this.txtappbuttonlabel.Location = new System.Drawing.Point(53, 76); - this.txtappbuttonlabel.Name = "txtappbuttonlabel"; - this.txtappbuttonlabel.Size = new System.Drawing.Size(81, 22); - this.txtappbuttonlabel.TabIndex = 30; - this.txtappbuttonlabel.TextChanged += new System.EventHandler(this.txtappbuttonlabel_KeyDown); - // - // Label51 - // - this.Label51.AutoSize = true; - this.Label51.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label51.Location = new System.Drawing.Point(2, 79); - this.Label51.Name = "Label51"; - this.Label51.Size = new System.Drawing.Size(45, 16); - this.Label51.TabIndex = 29; - this.Label51.Text = "Label:"; - // - // Label50 - // - this.Label50.AutoSize = true; - this.Label50.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label50.Location = new System.Drawing.Point(140, 79); - this.Label50.Name = "Label50"; - this.Label50.Size = new System.Drawing.Size(37, 16); - this.Label50.TabIndex = 28; - this.Label50.Text = "Font:"; - // - // pnlmaintextcolour - // - this.pnlmaintextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmaintextcolour.Location = new System.Drawing.Point(155, 51); - this.pnlmaintextcolour.Name = "pnlmaintextcolour"; - this.pnlmaintextcolour.Size = new System.Drawing.Size(41, 20); - this.pnlmaintextcolour.TabIndex = 19; - this.pnlmaintextcolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetAppLauncherTextColor); - // - // comboappbuttontextstyle - // - this.comboappbuttontextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboappbuttontextstyle.FormattingEnabled = true; - this.comboappbuttontextstyle.Items.AddRange(new object[] { - "Bold", - "Italic", - "Regular", - "Strikeout", - "Underline"}); - this.comboappbuttontextstyle.Location = new System.Drawing.Point(243, 49); - this.comboappbuttontextstyle.Name = "comboappbuttontextstyle"; - this.comboappbuttontextstyle.Size = new System.Drawing.Size(64, 24); - this.comboappbuttontextstyle.TabIndex = 27; - this.comboappbuttontextstyle.SelectedIndexChanged += new System.EventHandler(this.comboappbuttontextstyle_SelectedIndexChanged); - // - // comboappbuttontextfont - // - this.comboappbuttontextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboappbuttontextfont.FormattingEnabled = true; - this.comboappbuttontextfont.Location = new System.Drawing.Point(181, 75); - this.comboappbuttontextfont.Name = "comboappbuttontextfont"; - this.comboappbuttontextfont.Size = new System.Drawing.Size(125, 24); - this.comboappbuttontextfont.TabIndex = 26; - this.comboappbuttontextfont.SelectedIndexChanged += new System.EventHandler(this.comboappbuttontextfont_SelectedIndexChanged); - // - // Label37 - // - this.Label37.AutoSize = true; - this.Label37.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label37.Location = new System.Drawing.Point(200, 52); - this.Label37.Name = "Label37"; - this.Label37.Size = new System.Drawing.Size(41, 16); - this.Label37.TabIndex = 25; - this.Label37.Text = "Style:"; - // - // Label38 - // - this.Label38.AutoSize = true; - this.Label38.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label38.Location = new System.Drawing.Point(75, 52); - this.Label38.Name = "Label38"; - this.Label38.Size = new System.Drawing.Size(22, 16); - this.Label38.TabIndex = 24; - this.Label38.Text = "px"; - // - // txtappbuttontextsize - // - this.txtappbuttontextsize.BackColor = System.Drawing.Color.White; - this.txtappbuttontextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtappbuttontextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtappbuttontextsize.ForeColor = System.Drawing.Color.Black; - this.txtappbuttontextsize.Location = new System.Drawing.Point(51, 50); - this.txtappbuttontextsize.Name = "txtappbuttontextsize"; - this.txtappbuttontextsize.Size = new System.Drawing.Size(23, 22); - this.txtappbuttontextsize.TabIndex = 23; - this.txtappbuttontextsize.TextChanged += new System.EventHandler(this.txtappbuttontextsize_TextChanged); - // - // Label39 - // - this.Label39.AutoSize = true; - this.Label39.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label39.Location = new System.Drawing.Point(1, 52); - this.Label39.Name = "Label39"; - this.Label39.Size = new System.Drawing.Size(49, 16); - this.Label39.TabIndex = 22; - this.Label39.Text = "T Size:"; - // - // Label40 - // - this.Label40.AutoSize = true; - this.Label40.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label40.Location = new System.Drawing.Point(101, 53); - this.Label40.Name = "Label40"; - this.Label40.Size = new System.Drawing.Size(50, 16); - this.Label40.TabIndex = 21; - this.Label40.Text = "Colour:"; - // - // pnlmainbuttonactivated - // - this.pnlmainbuttonactivated.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmainbuttonactivated.Location = new System.Drawing.Point(267, 6); - this.pnlmainbuttonactivated.Name = "pnlmainbuttonactivated"; - this.pnlmainbuttonactivated.Size = new System.Drawing.Size(41, 20); - this.pnlmainbuttonactivated.TabIndex = 16; - this.pnlmainbuttonactivated.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetALButtonClickedColor); - // - // Label28 - // - this.Label28.AutoSize = true; - this.Label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label28.Location = new System.Drawing.Point(177, 7); - this.Label28.Name = "Label28"; - this.Label28.Size = new System.Drawing.Size(67, 16); - this.Label28.TabIndex = 15; - this.Label28.Text = "Activated:"; - // - // Label35 - // - this.Label35.AutoSize = true; - this.Label35.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label35.Location = new System.Drawing.Point(77, 103); - this.Label35.Name = "Label35"; - this.Label35.Size = new System.Drawing.Size(22, 16); - this.Label35.TabIndex = 14; - this.Label35.Text = "px"; - // - // txtapplicationsbuttonheight - // - this.txtapplicationsbuttonheight.BackColor = System.Drawing.Color.White; - this.txtapplicationsbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtapplicationsbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtapplicationsbuttonheight.ForeColor = System.Drawing.Color.Black; - this.txtapplicationsbuttonheight.Location = new System.Drawing.Point(53, 101); - this.txtapplicationsbuttonheight.Name = "txtapplicationsbuttonheight"; - this.txtapplicationsbuttonheight.Size = new System.Drawing.Size(23, 22); - this.txtapplicationsbuttonheight.TabIndex = 13; - this.txtapplicationsbuttonheight.TextChanged += new System.EventHandler(this.txtapplicationsbuttonheight_TextChanged); - // - // Label36 - // - this.Label36.AutoSize = true; - this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label36.Location = new System.Drawing.Point(2, 103); - this.Label36.Name = "Label36"; - this.Label36.Size = new System.Drawing.Size(50, 16); - this.Label36.TabIndex = 12; - this.Label36.Text = "Height:"; - // - // pnlmainbuttoncolour - // - this.pnlmainbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmainbuttoncolour.Location = new System.Drawing.Point(128, 4); - this.pnlmainbuttoncolour.Name = "pnlmainbuttoncolour"; - this.pnlmainbuttoncolour.Size = new System.Drawing.Size(41, 20); - this.pnlmainbuttoncolour.TabIndex = 1; - this.pnlmainbuttoncolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetALButtonColor); - // - // Label43 - // - this.Label43.AutoSize = true; - this.Label43.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label43.Location = new System.Drawing.Point(3, 7); - this.Label43.Name = "Label43"; - this.Label43.Size = new System.Drawing.Size(122, 16); - this.Label43.TabIndex = 0; - this.Label43.Text = "Main Button Colour:"; - // - // pnldesktopintro - // - this.pnldesktopintro.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnldesktopintro.Controls.Add(this.Label69); - this.pnldesktopintro.Controls.Add(this.Label70); - this.pnldesktopintro.Location = new System.Drawing.Point(135, 159); - this.pnldesktopintro.Name = "pnldesktopintro"; - this.pnldesktopintro.Size = new System.Drawing.Size(317, 140); - this.pnldesktopintro.TabIndex = 17; - // - // Label69 - // - this.Label69.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label69.Location = new System.Drawing.Point(3, 20); - this.Label69.Name = "Label69"; - this.Label69.Size = new System.Drawing.Size(312, 113); - this.Label69.TabIndex = 1; - this.Label69.Text = "The Desktop Settings allow you to customize various desktop-related settings such" + - " as the desktop background. Go ahead and explore!"; - this.Label69.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // Label70 - // - this.Label70.AutoSize = true; - this.Label70.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label70.Location = new System.Drawing.Point(86, -2); - this.Label70.Name = "Label70"; - this.Label70.Size = new System.Drawing.Size(148, 20); - this.Label70.TabIndex = 0; - this.Label70.Text = "Desktop Settings"; - // - // pnlpanelbuttonsoptions - // - this.pnlpanelbuttonsoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlpanelbuttonsoptions.Controls.Add(this.pnlpanelbuttontextcolour); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label101); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontexttop); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label104); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontextside); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label106); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label93); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontop); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label94); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoninitalgap); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label108); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonicontop); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label110); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoniconside); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label112); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoniconsize); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label105); - this.pnlpanelbuttonsoptions.Controls.Add(this.cbpanelbuttontextstyle); - this.pnlpanelbuttonsoptions.Controls.Add(this.cbpanelbuttonfont); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label100); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpaneltextbuttonsize); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label102); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label103); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label98); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttongap); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label99); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label96); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonheight); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label97); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label92); - this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonwidth); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label91); - this.pnlpanelbuttonsoptions.Controls.Add(this.pnlpanelbuttoncolour); - this.pnlpanelbuttonsoptions.Controls.Add(this.Label95); - this.pnlpanelbuttonsoptions.Location = new System.Drawing.Point(135, 159); - this.pnlpanelbuttonsoptions.Name = "pnlpanelbuttonsoptions"; - this.pnlpanelbuttonsoptions.Size = new System.Drawing.Size(317, 140); - this.pnlpanelbuttonsoptions.TabIndex = 10; - this.pnlpanelbuttonsoptions.Visible = false; - // - // pnlpanelbuttontextcolour - // - this.pnlpanelbuttontextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpanelbuttontextcolour.Location = new System.Drawing.Point(270, 57); - this.pnlpanelbuttontextcolour.Name = "pnlpanelbuttontextcolour"; - this.pnlpanelbuttontextcolour.Size = new System.Drawing.Size(41, 20); - this.pnlpanelbuttontextcolour.TabIndex = 50; - this.pnlpanelbuttontextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetPanelButtonTextColor); - // - // Label101 - // - this.Label101.AutoSize = true; - this.Label101.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label101.Location = new System.Drawing.Point(219, 59); - this.Label101.Name = "Label101"; - this.Label101.Size = new System.Drawing.Size(50, 16); - this.Label101.TabIndex = 49; - this.Label101.Text = "Colour:"; - // - // txtpanelbuttontexttop - // - this.txtpanelbuttontexttop.BackColor = System.Drawing.Color.White; - this.txtpanelbuttontexttop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttontexttop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttontexttop.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttontexttop.Location = new System.Drawing.Point(225, 82); - this.txtpanelbuttontexttop.Name = "txtpanelbuttontexttop"; - this.txtpanelbuttontexttop.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttontexttop.TabIndex = 48; - this.txtpanelbuttontexttop.TextChanged += new System.EventHandler(this.txtpanelbuttontexttop_TextChanged); - // - // Label104 - // - this.Label104.AutoSize = true; - this.Label104.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label104.Location = new System.Drawing.Point(191, 84); - this.Label104.Name = "Label104"; - this.Label104.Size = new System.Drawing.Size(36, 16); - this.Label104.TabIndex = 47; - this.Label104.Text = "Top:"; - // - // txtpanelbuttontextside - // - this.txtpanelbuttontextside.BackColor = System.Drawing.Color.White; - this.txtpanelbuttontextside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttontextside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttontextside.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttontextside.Location = new System.Drawing.Point(165, 82); - this.txtpanelbuttontextside.Name = "txtpanelbuttontextside"; - this.txtpanelbuttontextside.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttontextside.TabIndex = 46; - this.txtpanelbuttontextside.TextChanged += new System.EventHandler(this.txtpanelbuttontextside_TextChanged); - // - // Label106 - // - this.Label106.AutoSize = true; - this.Label106.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label106.Location = new System.Drawing.Point(128, 84); - this.Label106.Name = "Label106"; - this.Label106.Size = new System.Drawing.Size(39, 16); - this.Label106.TabIndex = 45; - this.Label106.Text = "Side:"; - // - // Label93 - // - this.Label93.AutoSize = true; - this.Label93.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label93.Location = new System.Drawing.Point(292, 7); - this.Label93.Name = "Label93"; - this.Label93.Size = new System.Drawing.Size(22, 16); - this.Label93.TabIndex = 43; - this.Label93.Text = "px"; - // - // txtpanelbuttontop - // - this.txtpanelbuttontop.BackColor = System.Drawing.Color.White; - this.txtpanelbuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttontop.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttontop.Location = new System.Drawing.Point(268, 5); - this.txtpanelbuttontop.Name = "txtpanelbuttontop"; - this.txtpanelbuttontop.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttontop.TabIndex = 42; - this.txtpanelbuttontop.TextChanged += new System.EventHandler(this.txtpanelbuttontop_TextChanged); - // - // Label94 - // - this.Label94.AutoSize = true; - this.Label94.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label94.Location = new System.Drawing.Point(233, 7); - this.Label94.Name = "Label94"; - this.Label94.Size = new System.Drawing.Size(36, 16); - this.Label94.TabIndex = 41; - this.Label94.Text = "Top:"; - // - // txtpanelbuttoninitalgap - // - this.txtpanelbuttoninitalgap.BackColor = System.Drawing.Color.White; - this.txtpanelbuttoninitalgap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttoninitalgap.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttoninitalgap.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttoninitalgap.Location = new System.Drawing.Point(207, 5); - this.txtpanelbuttoninitalgap.Name = "txtpanelbuttoninitalgap"; - this.txtpanelbuttoninitalgap.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttoninitalgap.TabIndex = 40; - this.txtpanelbuttoninitalgap.TextChanged += new System.EventHandler(this.txtpanelbuttoninitalgap_TextChanged); - // - // Label108 - // - this.Label108.AutoSize = true; - this.Label108.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label108.Location = new System.Drawing.Point(137, 7); - this.Label108.Name = "Label108"; - this.Label108.Size = new System.Drawing.Size(70, 16); - this.Label108.TabIndex = 39; - this.Label108.Text = "Initial Gap:"; - // - // txtpanelbuttonicontop - // - this.txtpanelbuttonicontop.BackColor = System.Drawing.Color.White; - this.txtpanelbuttonicontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttonicontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttonicontop.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttonicontop.Location = new System.Drawing.Point(287, 108); - this.txtpanelbuttonicontop.Name = "txtpanelbuttonicontop"; - this.txtpanelbuttonicontop.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttonicontop.TabIndex = 37; - this.txtpanelbuttonicontop.TextChanged += new System.EventHandler(this.txtpanelbuttonicontop_TextChanged); - // - // Label110 - // - this.Label110.AutoSize = true; - this.Label110.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label110.Location = new System.Drawing.Point(221, 110); - this.Label110.Name = "Label110"; - this.Label110.Size = new System.Drawing.Size(64, 16); - this.Label110.TabIndex = 36; - this.Label110.Text = "Icon Top:"; - // - // txtpanelbuttoniconside - // - this.txtpanelbuttoniconside.BackColor = System.Drawing.Color.White; - this.txtpanelbuttoniconside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttoniconside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttoniconside.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttoniconside.Location = new System.Drawing.Point(180, 108); - this.txtpanelbuttoniconside.Name = "txtpanelbuttoniconside"; - this.txtpanelbuttoniconside.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttoniconside.TabIndex = 34; - this.txtpanelbuttoniconside.TextChanged += new System.EventHandler(this.txtpanelbuttoniconside_TextChanged); - // - // Label112 - // - this.Label112.AutoSize = true; - this.Label112.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label112.Location = new System.Drawing.Point(113, 110); - this.Label112.Name = "Label112"; - this.Label112.Size = new System.Drawing.Size(67, 16); - this.Label112.TabIndex = 33; - this.Label112.Text = "Icon Side:"; - // - // txtpanelbuttoniconsize - // - this.txtpanelbuttoniconsize.BackColor = System.Drawing.Color.White; - this.txtpanelbuttoniconsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttoniconsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttoniconsize.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttoniconsize.Location = new System.Drawing.Point(70, 108); - this.txtpanelbuttoniconsize.Name = "txtpanelbuttoniconsize"; - this.txtpanelbuttoniconsize.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttoniconsize.TabIndex = 27; - this.txtpanelbuttoniconsize.TextChanged += new System.EventHandler(this.txtpanelbuttoniconsize_TextChanged); - // - // Label105 - // - this.Label105.AutoSize = true; - this.Label105.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label105.Location = new System.Drawing.Point(3, 110); - this.Label105.Name = "Label105"; - this.Label105.Size = new System.Drawing.Size(65, 16); - this.Label105.TabIndex = 26; - this.Label105.Text = "Icon Size:"; - // - // cbpanelbuttontextstyle - // - this.cbpanelbuttontextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbpanelbuttontextstyle.FormattingEnabled = true; - this.cbpanelbuttontextstyle.Items.AddRange(new object[] { - "Bold", - "Italic", - "Regular", - "Strikeout", - "Underline"}); - this.cbpanelbuttontextstyle.Location = new System.Drawing.Point(46, 83); - this.cbpanelbuttontextstyle.Name = "cbpanelbuttontextstyle"; - this.cbpanelbuttontextstyle.Size = new System.Drawing.Size(80, 24); - this.cbpanelbuttontextstyle.TabIndex = 25; - this.cbpanelbuttontextstyle.SelectedIndexChanged += new System.EventHandler(this.cbpanelbuttontextstyle_SelectedIndexChanged); - // - // cbpanelbuttonfont - // - this.cbpanelbuttonfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbpanelbuttonfont.FormattingEnabled = true; - this.cbpanelbuttonfont.Location = new System.Drawing.Point(70, 56); - this.cbpanelbuttonfont.Name = "cbpanelbuttonfont"; - this.cbpanelbuttonfont.Size = new System.Drawing.Size(147, 24); - this.cbpanelbuttonfont.TabIndex = 24; - this.cbpanelbuttonfont.SelectedIndexChanged += new System.EventHandler(this.cbpanelbuttonfont_SelectedIndexChanged); - // - // Label100 - // - this.Label100.AutoSize = true; - this.Label100.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label100.Location = new System.Drawing.Point(3, 86); - this.Label100.Name = "Label100"; - this.Label100.Size = new System.Drawing.Size(41, 16); - this.Label100.TabIndex = 23; - this.Label100.Text = "Style:"; - // - // txtpaneltextbuttonsize - // - this.txtpaneltextbuttonsize.BackColor = System.Drawing.Color.White; - this.txtpaneltextbuttonsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpaneltextbuttonsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpaneltextbuttonsize.ForeColor = System.Drawing.Color.Black; - this.txtpaneltextbuttonsize.Location = new System.Drawing.Point(287, 82); - this.txtpaneltextbuttonsize.Name = "txtpaneltextbuttonsize"; - this.txtpaneltextbuttonsize.Size = new System.Drawing.Size(23, 22); - this.txtpaneltextbuttonsize.TabIndex = 21; - this.txtpaneltextbuttonsize.TextChanged += new System.EventHandler(this.txtpaneltextbuttonsize_TextChanged); - // - // Label102 - // - this.Label102.AutoSize = true; - this.Label102.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label102.Location = new System.Drawing.Point(252, 84); - this.Label102.Name = "Label102"; - this.Label102.Size = new System.Drawing.Size(37, 16); - this.Label102.TabIndex = 20; - this.Label102.Text = "Size:"; - // - // Label103 - // - this.Label103.AutoSize = true; - this.Label103.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label103.Location = new System.Drawing.Point(3, 60); - this.Label103.Name = "Label103"; - this.Label103.Size = new System.Drawing.Size(66, 16); - this.Label103.TabIndex = 19; - this.Label103.Text = "Text Font:"; - // - // Label98 - // - this.Label98.AutoSize = true; - this.Label98.BackColor = System.Drawing.Color.Transparent; - this.Label98.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label98.Location = new System.Drawing.Point(292, 33); - this.Label98.Name = "Label98"; - this.Label98.Size = new System.Drawing.Size(22, 16); - this.Label98.TabIndex = 14; - this.Label98.Text = "px"; - // - // txtpanelbuttongap - // - this.txtpanelbuttongap.BackColor = System.Drawing.Color.White; - this.txtpanelbuttongap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttongap.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttongap.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttongap.Location = new System.Drawing.Point(268, 31); - this.txtpanelbuttongap.Name = "txtpanelbuttongap"; - this.txtpanelbuttongap.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttongap.TabIndex = 13; - this.txtpanelbuttongap.TextChanged += new System.EventHandler(this.txtpanelbuttongap_TextChanged); - // - // Label99 - // - this.Label99.AutoSize = true; - this.Label99.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label99.Location = new System.Drawing.Point(232, 33); - this.Label99.Name = "Label99"; - this.Label99.Size = new System.Drawing.Size(37, 16); - this.Label99.TabIndex = 12; - this.Label99.Text = "Gap:"; - // - // Label96 - // - this.Label96.AutoSize = true; - this.Label96.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label96.Location = new System.Drawing.Point(209, 34); - this.Label96.Name = "Label96"; - this.Label96.Size = new System.Drawing.Size(22, 16); - this.Label96.TabIndex = 11; - this.Label96.Text = "px"; - // - // txtpanelbuttonheight - // - this.txtpanelbuttonheight.BackColor = System.Drawing.Color.White; - this.txtpanelbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttonheight.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttonheight.Location = new System.Drawing.Point(185, 32); - this.txtpanelbuttonheight.Name = "txtpanelbuttonheight"; - this.txtpanelbuttonheight.Size = new System.Drawing.Size(23, 22); - this.txtpanelbuttonheight.TabIndex = 10; - this.txtpanelbuttonheight.TextChanged += new System.EventHandler(this.txtpanelbuttonheight_TextChanged); - // - // Label97 - // - this.Label97.AutoSize = true; - this.Label97.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label97.Location = new System.Drawing.Point(135, 34); - this.Label97.Name = "Label97"; - this.Label97.Size = new System.Drawing.Size(50, 16); - this.Label97.TabIndex = 9; - this.Label97.Text = "Height:"; - // - // Label92 - // - this.Label92.AutoSize = true; - this.Label92.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label92.Location = new System.Drawing.Point(114, 33); - this.Label92.Name = "Label92"; - this.Label92.Size = new System.Drawing.Size(22, 16); - this.Label92.TabIndex = 8; - this.Label92.Text = "px"; - // - // txtpanelbuttonwidth - // - this.txtpanelbuttonwidth.BackColor = System.Drawing.Color.White; - this.txtpanelbuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpanelbuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtpanelbuttonwidth.ForeColor = System.Drawing.Color.Black; - this.txtpanelbuttonwidth.Location = new System.Drawing.Point(88, 31); - this.txtpanelbuttonwidth.Name = "txtpanelbuttonwidth"; - this.txtpanelbuttonwidth.Size = new System.Drawing.Size(26, 22); - this.txtpanelbuttonwidth.TabIndex = 7; - this.txtpanelbuttonwidth.TextChanged += new System.EventHandler(this.txtpanelbuttonwidth_TextChanged); - // - // Label91 - // - this.Label91.AutoSize = true; - this.Label91.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label91.Location = new System.Drawing.Point(3, 33); - this.Label91.Name = "Label91"; - this.Label91.Size = new System.Drawing.Size(85, 16); - this.Label91.TabIndex = 6; - this.Label91.Text = "Button Width:"; - // - // pnlpanelbuttoncolour - // - this.pnlpanelbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpanelbuttoncolour.Location = new System.Drawing.Point(94, 5); - this.pnlpanelbuttoncolour.Name = "pnlpanelbuttoncolour"; - this.pnlpanelbuttoncolour.Size = new System.Drawing.Size(41, 20); - this.pnlpanelbuttoncolour.TabIndex = 1; - this.pnlpanelbuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetPanelButtonColor); - // - // Label95 - // - this.Label95.AutoSize = true; - this.Label95.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label95.Location = new System.Drawing.Point(3, 7); - this.Label95.Name = "Label95"; - this.Label95.Size = new System.Drawing.Size(90, 16); - this.Label95.TabIndex = 0; - this.Label95.Text = "Button Colour:"; - // - // pnldesktopbackgroundoptions - // - this.pnldesktopbackgroundoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnldesktopbackgroundoptions.Controls.Add(this.pnldesktopcolour); - this.pnldesktopbackgroundoptions.Controls.Add(this.Label45); - this.pnldesktopbackgroundoptions.Location = new System.Drawing.Point(135, 159); - this.pnldesktopbackgroundoptions.Name = "pnldesktopbackgroundoptions"; - this.pnldesktopbackgroundoptions.Size = new System.Drawing.Size(317, 140); - this.pnldesktopbackgroundoptions.TabIndex = 10; - this.pnldesktopbackgroundoptions.Visible = false; - // - // pnldesktopcolour - // - this.pnldesktopcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnldesktopcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnldesktopcolour.Location = new System.Drawing.Point(112, 5); - this.pnldesktopcolour.Name = "pnldesktopcolour"; - this.pnldesktopcolour.Size = new System.Drawing.Size(41, 20); - this.pnldesktopcolour.TabIndex = 3; - this.pnldesktopcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ChangeDesktopBackground); - // - // Label45 - // - this.Label45.AutoSize = true; - this.Label45.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label45.Location = new System.Drawing.Point(3, 7); - this.Label45.Name = "Label45"; - this.Label45.Size = new System.Drawing.Size(104, 16); - this.Label45.TabIndex = 2; - this.Label45.Text = "Desktop Colour:"; - // - // pnlpanelclockoptions - // - this.pnlpanelclockoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlpanelclockoptions.Controls.Add(this.pnlclockbackgroundcolour); - this.pnlpanelclockoptions.Controls.Add(this.Label44); - this.pnlpanelclockoptions.Controls.Add(this.comboclocktextstyle); - this.pnlpanelclockoptions.Controls.Add(this.comboclocktextfont); - this.pnlpanelclockoptions.Controls.Add(this.Label26); - this.pnlpanelclockoptions.Controls.Add(this.Label29); - this.pnlpanelclockoptions.Controls.Add(this.txtclocktextfromtop); - this.pnlpanelclockoptions.Controls.Add(this.Label30); - this.pnlpanelclockoptions.Controls.Add(this.Label31); - this.pnlpanelclockoptions.Controls.Add(this.txtclocktextsize); - this.pnlpanelclockoptions.Controls.Add(this.Label32); - this.pnlpanelclockoptions.Controls.Add(this.Label33); - this.pnlpanelclockoptions.Controls.Add(this.pnlpanelclocktextcolour); - this.pnlpanelclockoptions.Controls.Add(this.Label34); - this.pnlpanelclockoptions.Location = new System.Drawing.Point(135, 159); - this.pnlpanelclockoptions.Name = "pnlpanelclockoptions"; - this.pnlpanelclockoptions.Size = new System.Drawing.Size(317, 140); - this.pnlpanelclockoptions.TabIndex = 15; - this.pnlpanelclockoptions.Visible = false; - // - // pnlclockbackgroundcolour - // - this.pnlclockbackgroundcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlclockbackgroundcolour.Location = new System.Drawing.Point(261, 5); - this.pnlclockbackgroundcolour.Name = "pnlclockbackgroundcolour"; - this.pnlclockbackgroundcolour.Size = new System.Drawing.Size(41, 20); - this.pnlclockbackgroundcolour.TabIndex = 20; - this.pnlclockbackgroundcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetClockBG); - // - // Label44 - // - this.Label44.AutoSize = true; - this.Label44.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label44.Location = new System.Drawing.Point(173, 7); - this.Label44.Name = "Label44"; - this.Label44.Size = new System.Drawing.Size(84, 16); - this.Label44.TabIndex = 19; - this.Label44.Text = "Background:"; - // - // comboclocktextstyle - // - this.comboclocktextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboclocktextstyle.FormattingEnabled = true; - this.comboclocktextstyle.Items.AddRange(new object[] { - "Bold", - "Italic", - "Regular", - "Strikeout", - "Underline"}); - this.comboclocktextstyle.Location = new System.Drawing.Point(209, 54); - this.comboclocktextstyle.Name = "comboclocktextstyle"; - this.comboclocktextstyle.Size = new System.Drawing.Size(99, 24); - this.comboclocktextstyle.TabIndex = 18; - this.comboclocktextstyle.SelectedIndexChanged += new System.EventHandler(this.comboclocktextstyle_SelectedIndexChanged); - // - // comboclocktextfont - // - this.comboclocktextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.comboclocktextfont.FormattingEnabled = true; - this.comboclocktextfont.Location = new System.Drawing.Point(114, 28); - this.comboclocktextfont.Name = "comboclocktextfont"; - this.comboclocktextfont.Size = new System.Drawing.Size(192, 24); - this.comboclocktextfont.TabIndex = 17; - this.comboclocktextfont.SelectedIndexChanged += new System.EventHandler(this.comboclocktextfont_SelectedIndexChanged); - // - // Label26 - // - this.Label26.AutoSize = true; - this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label26.Location = new System.Drawing.Point(166, 57); - this.Label26.Name = "Label26"; - this.Label26.Size = new System.Drawing.Size(41, 16); - this.Label26.TabIndex = 15; - this.Label26.Text = "Style:"; - // - // Label29 - // - this.Label29.AutoSize = true; - this.Label29.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label29.Location = new System.Drawing.Point(163, 82); - this.Label29.Name = "Label29"; - this.Label29.Size = new System.Drawing.Size(22, 16); - this.Label29.TabIndex = 11; - this.Label29.Text = "px"; - // - // txtclocktextfromtop - // - this.txtclocktextfromtop.BackColor = System.Drawing.Color.White; - this.txtclocktextfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtclocktextfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtclocktextfromtop.ForeColor = System.Drawing.Color.Black; - this.txtclocktextfromtop.Location = new System.Drawing.Point(139, 80); - this.txtclocktextfromtop.Name = "txtclocktextfromtop"; - this.txtclocktextfromtop.Size = new System.Drawing.Size(23, 22); - this.txtclocktextfromtop.TabIndex = 10; - this.txtclocktextfromtop.TextChanged += new System.EventHandler(this.txtclocktextfromtop_TextChanged); - // - // Label30 - // - this.Label30.AutoSize = true; - this.Label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label30.Location = new System.Drawing.Point(3, 82); - this.Label30.Name = "Label30"; - this.Label30.Size = new System.Drawing.Size(136, 16); - this.Label30.TabIndex = 9; - this.Label30.Text = "Clock Text From Top:"; - // - // Label31 - // - this.Label31.AutoSize = true; - this.Label31.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label31.Location = new System.Drawing.Point(138, 57); - this.Label31.Name = "Label31"; - this.Label31.Size = new System.Drawing.Size(22, 16); - this.Label31.TabIndex = 8; - this.Label31.Text = "px"; - // - // txtclocktextsize - // - this.txtclocktextsize.BackColor = System.Drawing.Color.White; - this.txtclocktextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtclocktextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtclocktextsize.ForeColor = System.Drawing.Color.Black; - this.txtclocktextsize.Location = new System.Drawing.Point(114, 55); - this.txtclocktextsize.Name = "txtclocktextsize"; - this.txtclocktextsize.Size = new System.Drawing.Size(23, 22); - this.txtclocktextsize.TabIndex = 7; - this.txtclocktextsize.Validated += new System.EventHandler(this.txtclocktextsize_TextChanged); - // - // Label32 - // - this.Label32.AutoSize = true; - this.Label32.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label32.Location = new System.Drawing.Point(3, 57); - this.Label32.Name = "Label32"; - this.Label32.Size = new System.Drawing.Size(103, 16); - this.Label32.TabIndex = 6; - this.Label32.Text = "Clock Text Size:"; - // - // Label33 - // - this.Label33.AutoSize = true; - this.Label33.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label33.Location = new System.Drawing.Point(3, 32); - this.Label33.Name = "Label33"; - this.Label33.Size = new System.Drawing.Size(103, 16); - this.Label33.TabIndex = 2; - this.Label33.Text = "Clock Text Font:"; - // - // pnlpanelclocktextcolour - // - this.pnlpanelclocktextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpanelclocktextcolour.Location = new System.Drawing.Point(121, 5); - this.pnlpanelclocktextcolour.Name = "pnlpanelclocktextcolour"; - this.pnlpanelclocktextcolour.Size = new System.Drawing.Size(41, 20); - this.pnlpanelclocktextcolour.TabIndex = 1; - this.pnlpanelclocktextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetClockTextColor); - // - // Label34 - // - this.Label34.AutoSize = true; - this.Label34.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label34.Location = new System.Drawing.Point(3, 7); - this.Label34.Name = "Label34"; - this.Label34.Size = new System.Drawing.Size(116, 16); - this.Label34.TabIndex = 0; - this.Label34.Text = "Clock Text Colour:"; - // - // pnldesktoppreview - // - this.pnldesktoppreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnldesktoppreview.Controls.Add(this.predesktoppanel); - this.pnldesktoppreview.Location = new System.Drawing.Point(5, 3); - this.pnldesktoppreview.Name = "pnldesktoppreview"; - this.pnldesktoppreview.Size = new System.Drawing.Size(448, 148); - this.pnldesktoppreview.TabIndex = 0; - // - // predesktoppanel - // - this.predesktoppanel.BackColor = System.Drawing.Color.Gray; - this.predesktoppanel.Controls.Add(this.prepnlpanelbuttonholder); - this.predesktoppanel.Controls.Add(this.pretimepanel); - this.predesktoppanel.Controls.Add(this.preapplaunchermenuholder); - this.predesktoppanel.Dock = System.Windows.Forms.DockStyle.Top; - this.predesktoppanel.Location = new System.Drawing.Point(0, 0); - this.predesktoppanel.Name = "predesktoppanel"; - this.predesktoppanel.Size = new System.Drawing.Size(448, 25); - this.predesktoppanel.TabIndex = 1; - // - // prepnlpanelbuttonholder - // - this.prepnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; - this.prepnlpanelbuttonholder.Controls.Add(this.prepnlpanelbutton); - this.prepnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Fill; - this.prepnlpanelbuttonholder.Location = new System.Drawing.Point(116, 0); - this.prepnlpanelbuttonholder.Name = "prepnlpanelbuttonholder"; - this.prepnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); - this.prepnlpanelbuttonholder.Size = new System.Drawing.Size(235, 25); - this.prepnlpanelbuttonholder.TabIndex = 6; - // - // prepnlpanelbutton - // - this.prepnlpanelbutton.BackColor = System.Drawing.Color.Black; - this.prepnlpanelbutton.Controls.Add(this.pretbicon); - this.prepnlpanelbutton.Controls.Add(this.pretbctext); - this.prepnlpanelbutton.Location = new System.Drawing.Point(5, 3); - this.prepnlpanelbutton.Name = "prepnlpanelbutton"; - this.prepnlpanelbutton.Size = new System.Drawing.Size(126, 20); - this.prepnlpanelbutton.TabIndex = 18; - this.prepnlpanelbutton.Visible = false; - // - // pretbicon - // - this.pretbicon.BackColor = System.Drawing.Color.Transparent; - this.pretbicon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pretbicon.Location = new System.Drawing.Point(4, 2); - this.pretbicon.Name = "pretbicon"; - this.pretbicon.Size = new System.Drawing.Size(16, 16); - this.pretbicon.TabIndex = 1; - this.pretbicon.TabStop = false; - // - // pretbctext - // - this.pretbctext.AutoSize = true; - this.pretbctext.BackColor = System.Drawing.Color.Transparent; - this.pretbctext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.pretbctext.ForeColor = System.Drawing.Color.White; - this.pretbctext.Location = new System.Drawing.Point(24, 2); - this.pretbctext.Name = "pretbctext"; - this.pretbctext.Size = new System.Drawing.Size(45, 16); - this.pretbctext.TabIndex = 0; - this.pretbctext.Text = "Shifter"; - // - // pretimepanel - // - this.pretimepanel.Controls.Add(this.prepaneltimetext); - this.pretimepanel.Dock = System.Windows.Forms.DockStyle.Right; - this.pretimepanel.Location = new System.Drawing.Point(351, 0); - this.pretimepanel.Name = "pretimepanel"; - this.pretimepanel.Size = new System.Drawing.Size(97, 25); - this.pretimepanel.TabIndex = 5; - // - // prepaneltimetext - // - this.prepaneltimetext.AutoSize = true; - this.prepaneltimetext.BackColor = System.Drawing.Color.Transparent; - this.prepaneltimetext.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.prepaneltimetext.Location = new System.Drawing.Point(5, 0); - this.prepaneltimetext.Name = "prepaneltimetext"; - this.prepaneltimetext.Size = new System.Drawing.Size(80, 24); - this.prepaneltimetext.TabIndex = 1; - this.prepaneltimetext.Text = "5000023"; - this.prepaneltimetext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // preapplaunchermenuholder - // - this.preapplaunchermenuholder.Controls.Add(this.predesktopappmenu); - this.preapplaunchermenuholder.Dock = System.Windows.Forms.DockStyle.Left; - this.preapplaunchermenuholder.Location = new System.Drawing.Point(0, 0); - this.preapplaunchermenuholder.Name = "preapplaunchermenuholder"; - this.preapplaunchermenuholder.Size = new System.Drawing.Size(116, 25); - this.preapplaunchermenuholder.TabIndex = 4; - // - // predesktopappmenu - // - this.predesktopappmenu.AutoSize = false; - this.predesktopappmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ApplicationsToolStripMenuItem}); - this.predesktopappmenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; - this.predesktopappmenu.Location = new System.Drawing.Point(0, 0); - this.predesktopappmenu.Name = "predesktopappmenu"; - this.predesktopappmenu.Padding = new System.Windows.Forms.Padding(0); - this.predesktopappmenu.Size = new System.Drawing.Size(116, 24); - this.predesktopappmenu.TabIndex = 0; - this.predesktopappmenu.Text = "MenuStrip1"; - // - // ApplicationsToolStripMenuItem - // - this.ApplicationsToolStripMenuItem.AutoSize = false; - this.ApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.KnowledgeInputToolStripMenuItem, - this.ShiftoriumToolStripMenuItem, - this.ClockToolStripMenuItem, - this.TerminalToolStripMenuItem, - this.ShifterToolStripMenuItem, - this.ToolStripSeparator1, - this.ShutdownToolStripMenuItem}); - this.ApplicationsToolStripMenuItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"; - this.ApplicationsToolStripMenuItem.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.ApplicationsToolStripMenuItem.ShowShortcutKeys = false; - this.ApplicationsToolStripMenuItem.Size = new System.Drawing.Size(102, 24); - this.ApplicationsToolStripMenuItem.Text = "Applications"; - this.ApplicationsToolStripMenuItem.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; - this.ApplicationsToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; - // - // KnowledgeInputToolStripMenuItem - // - this.KnowledgeInputToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.KnowledgeInputToolStripMenuItem.Name = "KnowledgeInputToolStripMenuItem"; - this.KnowledgeInputToolStripMenuItem.ShowShortcutKeys = false; - this.KnowledgeInputToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.KnowledgeInputToolStripMenuItem.Text = "Knowledge Input"; - // - // ShiftoriumToolStripMenuItem - // - this.ShiftoriumToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShiftoriumToolStripMenuItem.Name = "ShiftoriumToolStripMenuItem"; - this.ShiftoriumToolStripMenuItem.ShowShortcutKeys = false; - this.ShiftoriumToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.ShiftoriumToolStripMenuItem.Text = "Shiftorium"; - // - // ClockToolStripMenuItem - // - this.ClockToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ClockToolStripMenuItem.Name = "ClockToolStripMenuItem"; - this.ClockToolStripMenuItem.ShowShortcutKeys = false; - this.ClockToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.ClockToolStripMenuItem.Text = "Clock"; - // - // TerminalToolStripMenuItem - // - this.TerminalToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.TerminalToolStripMenuItem.Name = "TerminalToolStripMenuItem"; - this.TerminalToolStripMenuItem.ShowShortcutKeys = false; - this.TerminalToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.TerminalToolStripMenuItem.Text = "Terminal"; - // - // ShifterToolStripMenuItem - // - this.ShifterToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShifterToolStripMenuItem.Name = "ShifterToolStripMenuItem"; - this.ShifterToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.ShifterToolStripMenuItem.Text = "Shifter"; - // - // ToolStripSeparator1 - // - this.ToolStripSeparator1.BackColor = System.Drawing.Color.Transparent; - this.ToolStripSeparator1.ForeColor = System.Drawing.Color.White; - this.ToolStripSeparator1.Name = "ToolStripSeparator1"; - this.ToolStripSeparator1.Size = new System.Drawing.Size(178, 6); - // - // ShutdownToolStripMenuItem - // - this.ShutdownToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"; - this.ShutdownToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.ShutdownToolStripMenuItem.Text = "Shut Down"; - // - // Panel10 - // - this.Panel10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.Panel10.Controls.Add(this.btndesktopitself); - this.Panel10.Controls.Add(this.btnpanelclock); - this.Panel10.Controls.Add(this.btnapplauncher); - this.Panel10.Controls.Add(this.btndesktoppanel); - this.Panel10.Location = new System.Drawing.Point(1, 168); - this.Panel10.Name = "Panel10"; - this.Panel10.Size = new System.Drawing.Size(128, 135); - this.Panel10.TabIndex = 8; - // - // btndesktopitself - // - this.btndesktopitself.BackColor = System.Drawing.Color.White; - this.btndesktopitself.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndesktopitself.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btndesktopitself.Location = new System.Drawing.Point(4, 105); - this.btndesktopitself.Name = "btndesktopitself"; - this.btndesktopitself.Size = new System.Drawing.Size(119, 29); - this.btndesktopitself.TabIndex = 7; - this.btndesktopitself.Text = "Desktop"; - this.btndesktopitself.UseVisualStyleBackColor = false; - this.btndesktopitself.Click += new System.EventHandler(this.btndesktopitself_Click); - // - // btnpanelclock - // - this.btnpanelclock.BackColor = System.Drawing.Color.White; - this.btnpanelclock.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnpanelclock.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnpanelclock.Location = new System.Drawing.Point(4, 70); - this.btnpanelclock.Name = "btnpanelclock"; - this.btnpanelclock.Size = new System.Drawing.Size(119, 29); - this.btnpanelclock.TabIndex = 6; - this.btnpanelclock.Text = "Panel Clock"; - this.btnpanelclock.UseVisualStyleBackColor = false; - this.btnpanelclock.Click += new System.EventHandler(this.btnpanelclock_Click); - // - // btnapplauncher - // - this.btnapplauncher.BackColor = System.Drawing.Color.White; - this.btnapplauncher.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnapplauncher.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnapplauncher.Location = new System.Drawing.Point(4, 35); - this.btnapplauncher.Name = "btnapplauncher"; - this.btnapplauncher.Size = new System.Drawing.Size(119, 29); - this.btnapplauncher.TabIndex = 5; - this.btnapplauncher.Text = "App Launcher"; - this.btnapplauncher.UseVisualStyleBackColor = false; - this.btnapplauncher.Click += new System.EventHandler(this.btnapplauncher_Click); - // - // btndesktoppanel - // - this.btndesktoppanel.BackColor = System.Drawing.Color.White; - this.btndesktoppanel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndesktoppanel.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btndesktoppanel.Location = new System.Drawing.Point(4, 0); - this.btndesktoppanel.Name = "btndesktoppanel"; - this.btndesktoppanel.Size = new System.Drawing.Size(119, 29); - this.btndesktoppanel.TabIndex = 4; - this.btndesktoppanel.Text = "Desktop Panel"; - this.btndesktoppanel.UseVisualStyleBackColor = false; - this.btndesktoppanel.Click += new System.EventHandler(this.btndesktoppanel_Click); - // - // txtpanelbuttoniconheight - // - this.txtpanelbuttoniconheight.Location = new System.Drawing.Point(0, 0); - this.txtpanelbuttoniconheight.Name = "txtpanelbuttoniconheight"; - this.txtpanelbuttoniconheight.Size = new System.Drawing.Size(100, 20); - this.txtpanelbuttoniconheight.TabIndex = 0; - // - // pnlwindowsoptions - // - this.pnlwindowsoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlwindowsoptions.BackColor = System.Drawing.Color.White; - this.pnlwindowsoptions.Controls.Add(this.pnlwindowsintro); - this.pnlwindowsoptions.Controls.Add(this.pnlbuttonoptions); - this.pnlwindowsoptions.Controls.Add(this.pnltitlebaroptions); - this.pnlwindowsoptions.Controls.Add(this.pnlborderoptions); - this.pnlwindowsoptions.Controls.Add(this.pnltitletextoptions); - this.pnlwindowsoptions.Controls.Add(this.pnlwindowsobjects); - this.pnlwindowsoptions.Controls.Add(this.pnlwindowpreview); - this.pnlwindowsoptions.Location = new System.Drawing.Point(134, 9); - this.pnlwindowsoptions.Name = "pnlwindowsoptions"; - this.pnlwindowsoptions.Size = new System.Drawing.Size(457, 306); - this.pnlwindowsoptions.TabIndex = 4; - // - // pnlwindowsintro - // - this.pnlwindowsintro.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlwindowsintro.Controls.Add(this.Label68); - this.pnlwindowsintro.Controls.Add(this.Label67); - this.pnlwindowsintro.Location = new System.Drawing.Point(135, 159); - this.pnlwindowsintro.Name = "pnlwindowsintro"; - this.pnlwindowsintro.Size = new System.Drawing.Size(325, 139); - this.pnlwindowsintro.TabIndex = 16; - // - // Label68 - // - this.Label68.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label68.Location = new System.Drawing.Point(3, 20); - this.Label68.Name = "Label68"; - this.Label68.Size = new System.Drawing.Size(312, 113); - this.Label68.TabIndex = 1; - this.Label68.Text = "Welcome to the Windows category. Here, you may skin various aspects of windows in" + - " ShiftOS."; - this.Label68.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.Label68.Click += new System.EventHandler(this.Label68_Click); - // - // Label67 - // - this.Label67.AutoSize = true; - this.Label67.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label67.Location = new System.Drawing.Point(89, -2); - this.Label67.Name = "Label67"; - this.Label67.Size = new System.Drawing.Size(143, 20); - this.Label67.TabIndex = 0; - this.Label67.Text = "Window Settings"; - // - // pnlbuttonoptions - // - this.pnlbuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlbuttonoptions.Controls.Add(this.pnlclosebuttonoptions); - this.pnlbuttonoptions.Controls.Add(this.pnlrollupbuttonoptions); - this.pnlbuttonoptions.Controls.Add(this.pnlminimizebuttonoptions); - this.pnlbuttonoptions.Controls.Add(this.combobuttonoption); - this.pnlbuttonoptions.Controls.Add(this.Label52); - this.pnlbuttonoptions.Location = new System.Drawing.Point(135, 159); - this.pnlbuttonoptions.Name = "pnlbuttonoptions"; - this.pnlbuttonoptions.Size = new System.Drawing.Size(325, 139); - this.pnlbuttonoptions.TabIndex = 10; - this.pnlbuttonoptions.Visible = false; - // - // pnlclosebuttonoptions - // - this.pnlclosebuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlclosebuttonoptions.Controls.Add(this.Label8); - this.pnlclosebuttonoptions.Controls.Add(this.Label11); - this.pnlclosebuttonoptions.Controls.Add(this.pnlclosebuttoncolour); - this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonfromside); - this.pnlclosebuttonoptions.Controls.Add(this.Label7); - this.pnlclosebuttonoptions.Controls.Add(this.Label12); - this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonheight); - this.pnlclosebuttonoptions.Controls.Add(this.Label13); - this.pnlclosebuttonoptions.Controls.Add(this.Label6); - this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonfromtop); - this.pnlclosebuttonoptions.Controls.Add(this.Label10); - this.pnlclosebuttonoptions.Controls.Add(this.Label14); - this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonwidth); - this.pnlclosebuttonoptions.Controls.Add(this.Label9); - this.pnlclosebuttonoptions.Location = new System.Drawing.Point(4, 29); - this.pnlclosebuttonoptions.Name = "pnlclosebuttonoptions"; - this.pnlclosebuttonoptions.Size = new System.Drawing.Size(311, 105); - this.pnlclosebuttonoptions.TabIndex = 15; - this.pnlclosebuttonoptions.Visible = false; - // - // Label8 - // - this.Label8.AutoSize = true; - this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label8.Location = new System.Drawing.Point(3, 6); - this.Label8.Name = "Label8"; - this.Label8.Size = new System.Drawing.Size(128, 16); - this.Label8.TabIndex = 0; - this.Label8.Text = "Close Button Colour:"; - // - // Label11 - // - this.Label11.AutoSize = true; - this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label11.Location = new System.Drawing.Point(177, 82); - this.Label11.Name = "Label11"; - this.Label11.Size = new System.Drawing.Size(22, 16); - this.Label11.TabIndex = 14; - this.Label11.Text = "px"; - // - // pnlclosebuttoncolour - // - this.pnlclosebuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnlclosebuttoncolour.Location = new System.Drawing.Point(132, 4); - this.pnlclosebuttoncolour.Name = "pnlclosebuttoncolour"; - this.pnlclosebuttoncolour.Size = new System.Drawing.Size(41, 20); - this.pnlclosebuttoncolour.TabIndex = 1; - this.pnlclosebuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetcloseColor); - // - // txtclosebuttonfromside - // - this.txtclosebuttonfromside.BackColor = System.Drawing.Color.White; - this.txtclosebuttonfromside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtclosebuttonfromside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtclosebuttonfromside.ForeColor = System.Drawing.Color.Black; - this.txtclosebuttonfromside.Location = new System.Drawing.Point(153, 80); - this.txtclosebuttonfromside.Name = "txtclosebuttonfromside"; - this.txtclosebuttonfromside.Size = new System.Drawing.Size(23, 22); - this.txtclosebuttonfromside.TabIndex = 13; - this.txtclosebuttonfromside.TextChanged += new System.EventHandler(this.txtclosebuttonfromside_TextChanged); - // - // Label7 - // - this.Label7.AutoSize = true; - this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label7.Location = new System.Drawing.Point(3, 32); - this.Label7.Name = "Label7"; - this.Label7.Size = new System.Drawing.Size(128, 16); - this.Label7.TabIndex = 2; - this.Label7.Text = "Close Button Height:"; - // - // Label12 - // - this.Label12.AutoSize = true; - this.Label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label12.Location = new System.Drawing.Point(3, 82); - this.Label12.Name = "Label12"; - this.Label12.Size = new System.Drawing.Size(151, 16); - this.Label12.TabIndex = 12; - this.Label12.Text = "Close Button From Side:"; - // - // txtclosebuttonheight - // - this.txtclosebuttonheight.BackColor = System.Drawing.Color.White; - this.txtclosebuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtclosebuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtclosebuttonheight.ForeColor = System.Drawing.Color.Black; - this.txtclosebuttonheight.Location = new System.Drawing.Point(132, 30); - this.txtclosebuttonheight.Name = "txtclosebuttonheight"; - this.txtclosebuttonheight.Size = new System.Drawing.Size(23, 22); - this.txtclosebuttonheight.TabIndex = 4; - this.txtclosebuttonheight.TextChanged += new System.EventHandler(this.txtclosebuttonheight_TextChanged); - // - // Label13 - // - this.Label13.AutoSize = true; - this.Label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label13.Location = new System.Drawing.Point(177, 57); - this.Label13.Name = "Label13"; - this.Label13.Size = new System.Drawing.Size(22, 16); - this.Label13.TabIndex = 11; - this.Label13.Text = "px"; - // - // Label6 - // - this.Label6.AutoSize = true; - this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label6.Location = new System.Drawing.Point(156, 32); - this.Label6.Name = "Label6"; - this.Label6.Size = new System.Drawing.Size(22, 16); - this.Label6.TabIndex = 5; - this.Label6.Text = "px"; - // - // txtclosebuttonfromtop - // - this.txtclosebuttonfromtop.BackColor = System.Drawing.Color.White; - this.txtclosebuttonfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtclosebuttonfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtclosebuttonfromtop.ForeColor = System.Drawing.Color.Black; - this.txtclosebuttonfromtop.Location = new System.Drawing.Point(153, 55); - this.txtclosebuttonfromtop.Name = "txtclosebuttonfromtop"; - this.txtclosebuttonfromtop.Size = new System.Drawing.Size(23, 22); - this.txtclosebuttonfromtop.TabIndex = 10; - this.txtclosebuttonfromtop.TextChanged += new System.EventHandler(this.txtclosebuttonfromtop_TextChanged); - // - // Label10 - // - this.Label10.AutoSize = true; - this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label10.Location = new System.Drawing.Point(184, 32); - this.Label10.Name = "Label10"; - this.Label10.Size = new System.Drawing.Size(45, 16); - this.Label10.TabIndex = 6; - this.Label10.Text = "Width:"; - // - // Label14 - // - this.Label14.AutoSize = true; - this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label14.Location = new System.Drawing.Point(3, 57); - this.Label14.Name = "Label14"; - this.Label14.Size = new System.Drawing.Size(148, 16); - this.Label14.TabIndex = 9; - this.Label14.Text = "Close Button From Top:"; - // - // txtclosebuttonwidth - // - this.txtclosebuttonwidth.BackColor = System.Drawing.Color.White; - this.txtclosebuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtclosebuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtclosebuttonwidth.ForeColor = System.Drawing.Color.Black; - this.txtclosebuttonwidth.Location = new System.Drawing.Point(234, 30); - this.txtclosebuttonwidth.Name = "txtclosebuttonwidth"; - this.txtclosebuttonwidth.Size = new System.Drawing.Size(23, 22); - this.txtclosebuttonwidth.TabIndex = 7; - this.txtclosebuttonwidth.TextChanged += new System.EventHandler(this.txtclosebuttonwidth_TextChanged); - // - // Label9 - // - this.Label9.AutoSize = true; - this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label9.Location = new System.Drawing.Point(258, 32); - this.Label9.Name = "Label9"; - this.Label9.Size = new System.Drawing.Size(22, 16); - this.Label9.TabIndex = 8; - this.Label9.Text = "px"; - // - // pnlrollupbuttonoptions - // - this.pnlrollupbuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlrollupbuttonoptions.Controls.Add(this.Label54); - this.pnlrollupbuttonoptions.Controls.Add(this.Label55); - this.pnlrollupbuttonoptions.Controls.Add(this.pnlrollupbuttoncolour); - this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonside); - this.pnlrollupbuttonoptions.Controls.Add(this.Label56); - this.pnlrollupbuttonoptions.Controls.Add(this.Label57); - this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonheight); - this.pnlrollupbuttonoptions.Controls.Add(this.Label58); - this.pnlrollupbuttonoptions.Controls.Add(this.Label59); - this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttontop); - this.pnlrollupbuttonoptions.Controls.Add(this.Label60); - this.pnlrollupbuttonoptions.Controls.Add(this.Label61); - this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonwidth); - this.pnlrollupbuttonoptions.Controls.Add(this.Label62); - this.pnlrollupbuttonoptions.Location = new System.Drawing.Point(4, 29); - this.pnlrollupbuttonoptions.Name = "pnlrollupbuttonoptions"; - this.pnlrollupbuttonoptions.Size = new System.Drawing.Size(311, 105); - this.pnlrollupbuttonoptions.TabIndex = 16; - this.pnlrollupbuttonoptions.Visible = false; - // - // Label54 - // - this.Label54.AutoSize = true; - this.Label54.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label54.Location = new System.Drawing.Point(3, 6); - this.Label54.Name = "Label54"; - this.Label54.Size = new System.Drawing.Size(138, 16); - this.Label54.TabIndex = 0; - this.Label54.Text = "Roll Up Button Colour:"; - // - // Label55 - // - this.Label55.AutoSize = true; - this.Label55.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label55.Location = new System.Drawing.Point(188, 82); - this.Label55.Name = "Label55"; - this.Label55.Size = new System.Drawing.Size(22, 16); - this.Label55.TabIndex = 14; - this.Label55.Text = "px"; - // - // pnlrollupbuttoncolour - // - this.pnlrollupbuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnlrollupbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlrollupbuttoncolour.Location = new System.Drawing.Point(143, 4); - this.pnlrollupbuttoncolour.Name = "pnlrollupbuttoncolour"; - this.pnlrollupbuttoncolour.Size = new System.Drawing.Size(41, 20); - this.pnlrollupbuttoncolour.TabIndex = 1; - this.pnlrollupbuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetrollupColor); - // - // txtrollupbuttonside - // - this.txtrollupbuttonside.BackColor = System.Drawing.Color.White; - this.txtrollupbuttonside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtrollupbuttonside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtrollupbuttonside.ForeColor = System.Drawing.Color.Black; - this.txtrollupbuttonside.Location = new System.Drawing.Point(164, 80); - this.txtrollupbuttonside.Name = "txtrollupbuttonside"; - this.txtrollupbuttonside.Size = new System.Drawing.Size(23, 22); - this.txtrollupbuttonside.TabIndex = 13; - this.txtrollupbuttonside.TextChanged += new System.EventHandler(this.txtrollupbuttonside_TextChanged); - // - // Label56 - // - this.Label56.AutoSize = true; - this.Label56.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label56.Location = new System.Drawing.Point(3, 32); - this.Label56.Name = "Label56"; - this.Label56.Size = new System.Drawing.Size(138, 16); - this.Label56.TabIndex = 2; - this.Label56.Text = "Roll Up Button Height:"; - // - // Label57 - // - this.Label57.AutoSize = true; - this.Label57.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label57.Location = new System.Drawing.Point(3, 82); - this.Label57.Name = "Label57"; - this.Label57.Size = new System.Drawing.Size(161, 16); - this.Label57.TabIndex = 12; - this.Label57.Text = "Roll Up Button From Side:"; - // - // txtrollupbuttonheight - // - this.txtrollupbuttonheight.BackColor = System.Drawing.Color.White; - this.txtrollupbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtrollupbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtrollupbuttonheight.ForeColor = System.Drawing.Color.Black; - this.txtrollupbuttonheight.Location = new System.Drawing.Point(143, 30); - this.txtrollupbuttonheight.Name = "txtrollupbuttonheight"; - this.txtrollupbuttonheight.Size = new System.Drawing.Size(23, 22); - this.txtrollupbuttonheight.TabIndex = 4; - this.txtrollupbuttonheight.TextChanged += new System.EventHandler(this.txtrollupbuttonheight_TextChanged); - // - // Label58 - // - this.Label58.AutoSize = true; - this.Label58.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label58.Location = new System.Drawing.Point(188, 57); - this.Label58.Name = "Label58"; - this.Label58.Size = new System.Drawing.Size(22, 16); - this.Label58.TabIndex = 11; - this.Label58.Text = "px"; - // - // Label59 - // - this.Label59.AutoSize = true; - this.Label59.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label59.Location = new System.Drawing.Point(167, 32); - this.Label59.Name = "Label59"; - this.Label59.Size = new System.Drawing.Size(22, 16); - this.Label59.TabIndex = 5; - this.Label59.Text = "px"; - // - // txtrollupbuttontop - // - this.txtrollupbuttontop.BackColor = System.Drawing.Color.White; - this.txtrollupbuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtrollupbuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtrollupbuttontop.ForeColor = System.Drawing.Color.Black; - this.txtrollupbuttontop.Location = new System.Drawing.Point(164, 55); - this.txtrollupbuttontop.Name = "txtrollupbuttontop"; - this.txtrollupbuttontop.Size = new System.Drawing.Size(23, 22); - this.txtrollupbuttontop.TabIndex = 10; - this.txtrollupbuttontop.TextChanged += new System.EventHandler(this.txtrollupbuttontop_TextChanged); - // - // Label60 - // - this.Label60.AutoSize = true; - this.Label60.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label60.Location = new System.Drawing.Point(195, 32); - this.Label60.Name = "Label60"; - this.Label60.Size = new System.Drawing.Size(45, 16); - this.Label60.TabIndex = 6; - this.Label60.Text = "Width:"; - // - // Label61 - // - this.Label61.AutoSize = true; - this.Label61.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label61.Location = new System.Drawing.Point(3, 57); - this.Label61.Name = "Label61"; - this.Label61.Size = new System.Drawing.Size(158, 16); - this.Label61.TabIndex = 9; - this.Label61.Text = "Roll Up Button From Top:"; - // - // txtrollupbuttonwidth - // - this.txtrollupbuttonwidth.BackColor = System.Drawing.Color.White; - this.txtrollupbuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtrollupbuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtrollupbuttonwidth.ForeColor = System.Drawing.Color.Black; - this.txtrollupbuttonwidth.Location = new System.Drawing.Point(245, 30); - this.txtrollupbuttonwidth.Name = "txtrollupbuttonwidth"; - this.txtrollupbuttonwidth.Size = new System.Drawing.Size(23, 22); - this.txtrollupbuttonwidth.TabIndex = 7; - this.txtrollupbuttonwidth.TextChanged += new System.EventHandler(this.txtrollupbuttonwidth_TextChanged); - // - // Label62 - // - this.Label62.AutoSize = true; - this.Label62.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label62.Location = new System.Drawing.Point(269, 32); - this.Label62.Name = "Label62"; - this.Label62.Size = new System.Drawing.Size(22, 16); - this.Label62.TabIndex = 8; - this.Label62.Text = "px"; - // - // pnlminimizebuttonoptions - // - this.pnlminimizebuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlminimizebuttonoptions.Controls.Add(this.Label82); - this.pnlminimizebuttonoptions.Controls.Add(this.Label83); - this.pnlminimizebuttonoptions.Controls.Add(this.pnlminimizebuttoncolour); - this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonside); - this.pnlminimizebuttonoptions.Controls.Add(this.Label84); - this.pnlminimizebuttonoptions.Controls.Add(this.Label85); - this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonheight); - this.pnlminimizebuttonoptions.Controls.Add(this.Label86); - this.pnlminimizebuttonoptions.Controls.Add(this.Label87); - this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttontop); - this.pnlminimizebuttonoptions.Controls.Add(this.Label88); - this.pnlminimizebuttonoptions.Controls.Add(this.Label89); - this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonwidth); - this.pnlminimizebuttonoptions.Controls.Add(this.Label90); - this.pnlminimizebuttonoptions.Location = new System.Drawing.Point(4, 29); - this.pnlminimizebuttonoptions.Name = "pnlminimizebuttonoptions"; - this.pnlminimizebuttonoptions.Size = new System.Drawing.Size(311, 105); - this.pnlminimizebuttonoptions.TabIndex = 18; - this.pnlminimizebuttonoptions.Visible = false; - // - // Label82 - // - this.Label82.AutoSize = true; - this.Label82.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label82.Location = new System.Drawing.Point(3, 6); - this.Label82.Name = "Label82"; - this.Label82.Size = new System.Drawing.Size(145, 16); - this.Label82.TabIndex = 0; - this.Label82.Text = "Minimize Button Colour:"; - // - // Label83 - // - this.Label83.AutoSize = true; - this.Label83.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label83.Location = new System.Drawing.Point(196, 82); - this.Label83.Name = "Label83"; - this.Label83.Size = new System.Drawing.Size(22, 16); - this.Label83.TabIndex = 14; - this.Label83.Text = "px"; - // - // pnlminimizebuttoncolour - // - this.pnlminimizebuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnlminimizebuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlminimizebuttoncolour.Location = new System.Drawing.Point(149, 4); - this.pnlminimizebuttoncolour.Name = "pnlminimizebuttoncolour"; - this.pnlminimizebuttoncolour.Size = new System.Drawing.Size(41, 20); - this.pnlminimizebuttoncolour.TabIndex = 1; - this.pnlminimizebuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetMinimizeColor); - // - // txtminimizebuttonside - // - this.txtminimizebuttonside.BackColor = System.Drawing.Color.White; - this.txtminimizebuttonside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtminimizebuttonside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtminimizebuttonside.ForeColor = System.Drawing.Color.Black; - this.txtminimizebuttonside.Location = new System.Drawing.Point(172, 80); - this.txtminimizebuttonside.Name = "txtminimizebuttonside"; - this.txtminimizebuttonside.Size = new System.Drawing.Size(23, 22); - this.txtminimizebuttonside.TabIndex = 13; - this.txtminimizebuttonside.TextChanged += new System.EventHandler(this.txtminimizebuttonside_TextChanged); - // - // Label84 - // - this.Label84.AutoSize = true; - this.Label84.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label84.Location = new System.Drawing.Point(3, 32); - this.Label84.Name = "Label84"; - this.Label84.Size = new System.Drawing.Size(145, 16); - this.Label84.TabIndex = 2; - this.Label84.Text = "Minimize Button Height:"; - // - // Label85 - // - this.Label85.AutoSize = true; - this.Label85.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label85.Location = new System.Drawing.Point(3, 82); - this.Label85.Name = "Label85"; - this.Label85.Size = new System.Drawing.Size(168, 16); - this.Label85.TabIndex = 12; - this.Label85.Text = "Minimize Button From Side:"; - // - // txtminimizebuttonheight - // - this.txtminimizebuttonheight.BackColor = System.Drawing.Color.White; - this.txtminimizebuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtminimizebuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtminimizebuttonheight.ForeColor = System.Drawing.Color.Black; - this.txtminimizebuttonheight.Location = new System.Drawing.Point(150, 30); - this.txtminimizebuttonheight.Name = "txtminimizebuttonheight"; - this.txtminimizebuttonheight.Size = new System.Drawing.Size(23, 22); - this.txtminimizebuttonheight.TabIndex = 4; - this.txtminimizebuttonheight.TextChanged += new System.EventHandler(this.txtminimizebuttonheight_TextChanged); - // - // Label86 - // - this.Label86.AutoSize = true; - this.Label86.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label86.Location = new System.Drawing.Point(196, 57); - this.Label86.Name = "Label86"; - this.Label86.Size = new System.Drawing.Size(22, 16); - this.Label86.TabIndex = 11; - this.Label86.Text = "px"; - // - // Label87 - // - this.Label87.AutoSize = true; - this.Label87.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label87.Location = new System.Drawing.Point(174, 32); - this.Label87.Name = "Label87"; - this.Label87.Size = new System.Drawing.Size(22, 16); - this.Label87.TabIndex = 5; - this.Label87.Text = "px"; - // - // txtminimizebuttontop - // - this.txtminimizebuttontop.BackColor = System.Drawing.Color.White; - this.txtminimizebuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtminimizebuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtminimizebuttontop.ForeColor = System.Drawing.Color.Black; - this.txtminimizebuttontop.Location = new System.Drawing.Point(172, 55); - this.txtminimizebuttontop.Name = "txtminimizebuttontop"; - this.txtminimizebuttontop.Size = new System.Drawing.Size(23, 22); - this.txtminimizebuttontop.TabIndex = 10; - this.txtminimizebuttontop.TextChanged += new System.EventHandler(this.txtminimizebuttontop_TextChanged); - // - // Label88 - // - this.Label88.AutoSize = true; - this.Label88.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label88.Location = new System.Drawing.Point(198, 32); - this.Label88.Name = "Label88"; - this.Label88.Size = new System.Drawing.Size(45, 16); - this.Label88.TabIndex = 6; - this.Label88.Text = "Width:"; - // - // Label89 - // - this.Label89.AutoSize = true; - this.Label89.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label89.Location = new System.Drawing.Point(3, 57); - this.Label89.Name = "Label89"; - this.Label89.Size = new System.Drawing.Size(165, 16); - this.Label89.TabIndex = 9; - this.Label89.Text = "Minimize Button From Top:"; - // - // txtminimizebuttonwidth - // - this.txtminimizebuttonwidth.BackColor = System.Drawing.Color.White; - this.txtminimizebuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtminimizebuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtminimizebuttonwidth.ForeColor = System.Drawing.Color.Black; - this.txtminimizebuttonwidth.Location = new System.Drawing.Point(247, 30); - this.txtminimizebuttonwidth.Name = "txtminimizebuttonwidth"; - this.txtminimizebuttonwidth.Size = new System.Drawing.Size(23, 22); - this.txtminimizebuttonwidth.TabIndex = 7; - this.txtminimizebuttonwidth.TextChanged += new System.EventHandler(this.txtminimizebuttonwidth_TextChanged); - // - // Label90 - // - this.Label90.AutoSize = true; - this.Label90.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label90.Location = new System.Drawing.Point(269, 32); - this.Label90.Name = "Label90"; - this.Label90.Size = new System.Drawing.Size(22, 16); - this.Label90.TabIndex = 8; - this.Label90.Text = "px"; - // - // combobuttonoption - // - this.combobuttonoption.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.combobuttonoption.FormattingEnabled = true; - this.combobuttonoption.Items.AddRange(new object[] { - "Close Button", - "Roll Up Button"}); - this.combobuttonoption.Location = new System.Drawing.Point(157, 4); - this.combobuttonoption.Name = "combobuttonoption"; - this.combobuttonoption.Size = new System.Drawing.Size(121, 24); - this.combobuttonoption.TabIndex = 17; - this.combobuttonoption.SelectedIndexChanged += new System.EventHandler(this.combobuttonoption_SelectedIndexChanged); - // - // Label52 - // - this.Label52.AutoSize = true; - this.Label52.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label52.Location = new System.Drawing.Point(40, 6); - this.Label52.Name = "Label52"; - this.Label52.Size = new System.Drawing.Size(111, 16); - this.Label52.TabIndex = 15; - this.Label52.Text = "Button To Modify:"; - // - // pnltitlebaroptions - // - this.pnltitlebaroptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnltitlebaroptions.Controls.Add(this.Label80); - this.pnltitlebaroptions.Controls.Add(this.txticonfromtop); - this.pnltitlebaroptions.Controls.Add(this.Label81); - this.pnltitlebaroptions.Controls.Add(this.Label78); - this.pnltitlebaroptions.Controls.Add(this.txticonfromside); - this.pnltitlebaroptions.Controls.Add(this.Label79); - this.pnltitlebaroptions.Controls.Add(this.lbcornerwidthpx); - this.pnltitlebaroptions.Controls.Add(this.txttitlebarcornerwidth); - this.pnltitlebaroptions.Controls.Add(this.lbcornerwidth); - this.pnltitlebaroptions.Controls.Add(this.pnltitlebarrightcornercolour); - this.pnltitlebaroptions.Controls.Add(this.pnltitlebarleftcornercolour); - this.pnltitlebaroptions.Controls.Add(this.lbrightcornercolor); - this.pnltitlebaroptions.Controls.Add(this.lbleftcornercolor); - this.pnltitlebaroptions.Controls.Add(this.cboxtitlebarcorners); - this.pnltitlebaroptions.Controls.Add(this.Label5); - this.pnltitlebaroptions.Controls.Add(this.txttitlebarheight); - this.pnltitlebaroptions.Controls.Add(this.Label4); - this.pnltitlebaroptions.Controls.Add(this.pnltitlebarcolour); - this.pnltitlebaroptions.Controls.Add(this.Label2); - this.pnltitlebaroptions.Location = new System.Drawing.Point(135, 159); - this.pnltitlebaroptions.Name = "pnltitlebaroptions"; - this.pnltitlebaroptions.Size = new System.Drawing.Size(325, 139); - this.pnltitlebaroptions.TabIndex = 9; - this.pnltitlebaroptions.Visible = false; - // - // Label80 - // - this.Label80.AutoSize = true; - this.Label80.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label80.Location = new System.Drawing.Point(277, 105); - this.Label80.Name = "Label80"; - this.Label80.Size = new System.Drawing.Size(22, 16); - this.Label80.TabIndex = 19; - this.Label80.Text = "px"; - // - // txticonfromtop - // - this.txticonfromtop.BackColor = System.Drawing.Color.White; - this.txticonfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txticonfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txticonfromtop.ForeColor = System.Drawing.Color.Black; - this.txticonfromtop.Location = new System.Drawing.Point(253, 103); - this.txticonfromtop.Name = "txticonfromtop"; - this.txticonfromtop.Size = new System.Drawing.Size(23, 22); - this.txticonfromtop.TabIndex = 18; - this.txticonfromtop.TextChanged += new System.EventHandler(this.txticonfromtop_TextChanged); - // - // Label81 - // - this.Label81.AutoSize = true; - this.Label81.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label81.Location = new System.Drawing.Point(157, 105); - this.Label81.Name = "Label81"; - this.Label81.Size = new System.Drawing.Size(98, 16); - this.Label81.TabIndex = 17; - this.Label81.Text = "Icon From Top:"; - // - // Label78 - // - this.Label78.AutoSize = true; - this.Label78.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label78.Location = new System.Drawing.Point(128, 105); - this.Label78.Name = "Label78"; - this.Label78.Size = new System.Drawing.Size(22, 16); - this.Label78.TabIndex = 16; - this.Label78.Text = "px"; - // - // txticonfromside - // - this.txticonfromside.BackColor = System.Drawing.Color.White; - this.txticonfromside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txticonfromside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txticonfromside.ForeColor = System.Drawing.Color.Black; - this.txticonfromside.Location = new System.Drawing.Point(104, 103); - this.txticonfromside.Name = "txticonfromside"; - this.txticonfromside.Size = new System.Drawing.Size(23, 22); - this.txticonfromside.TabIndex = 15; - this.txticonfromside.TextChanged += new System.EventHandler(this.txticonfromside_TextChanged); - // - // Label79 - // - this.Label79.AutoSize = true; - this.Label79.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label79.Location = new System.Drawing.Point(3, 105); - this.Label79.Name = "Label79"; - this.Label79.Size = new System.Drawing.Size(101, 16); - this.Label79.TabIndex = 14; - this.Label79.Text = "Icon From Side:"; - // - // lbcornerwidthpx - // - this.lbcornerwidthpx.AutoSize = true; - this.lbcornerwidthpx.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbcornerwidthpx.Location = new System.Drawing.Point(277, 32); - this.lbcornerwidthpx.Name = "lbcornerwidthpx"; - this.lbcornerwidthpx.Size = new System.Drawing.Size(22, 16); - this.lbcornerwidthpx.TabIndex = 13; - this.lbcornerwidthpx.Text = "px"; - // - // txttitlebarcornerwidth - // - this.txttitlebarcornerwidth.BackColor = System.Drawing.Color.White; - this.txttitlebarcornerwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txttitlebarcornerwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txttitlebarcornerwidth.ForeColor = System.Drawing.Color.Black; - this.txttitlebarcornerwidth.Location = new System.Drawing.Point(253, 30); - this.txttitlebarcornerwidth.Name = "txttitlebarcornerwidth"; - this.txttitlebarcornerwidth.Size = new System.Drawing.Size(23, 22); - this.txttitlebarcornerwidth.TabIndex = 12; - this.txttitlebarcornerwidth.TextChanged += new System.EventHandler(this.txttitlebarcornerwidth_TextChanged); - // - // lbcornerwidth - // - this.lbcornerwidth.AutoSize = true; - this.lbcornerwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbcornerwidth.Location = new System.Drawing.Point(163, 32); - this.lbcornerwidth.Name = "lbcornerwidth"; - this.lbcornerwidth.Size = new System.Drawing.Size(88, 16); - this.lbcornerwidth.TabIndex = 11; - this.lbcornerwidth.Text = "Corner Width:"; - // - // pnltitlebarrightcornercolour - // - this.pnltitlebarrightcornercolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnltitlebarrightcornercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnltitlebarrightcornercolour.Location = new System.Drawing.Point(136, 80); - this.pnltitlebarrightcornercolour.Name = "pnltitlebarrightcornercolour"; - this.pnltitlebarrightcornercolour.Size = new System.Drawing.Size(41, 20); - this.pnltitlebarrightcornercolour.TabIndex = 10; - this.pnltitlebarrightcornercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetRightCornerColor); - // - // pnltitlebarleftcornercolour - // - this.pnltitlebarleftcornercolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnltitlebarleftcornercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnltitlebarleftcornercolour.Location = new System.Drawing.Point(126, 56); - this.pnltitlebarleftcornercolour.Name = "pnltitlebarleftcornercolour"; - this.pnltitlebarleftcornercolour.Size = new System.Drawing.Size(41, 20); - this.pnltitlebarleftcornercolour.TabIndex = 8; - this.pnltitlebarleftcornercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetLeftCornerColor); - // - // lbrightcornercolor - // - this.lbrightcornercolor.AutoSize = true; - this.lbrightcornercolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbrightcornercolor.Location = new System.Drawing.Point(3, 81); - this.lbrightcornercolor.Name = "lbrightcornercolor"; - this.lbrightcornercolor.Size = new System.Drawing.Size(127, 16); - this.lbrightcornercolor.TabIndex = 9; - this.lbrightcornercolor.Text = "Right Corner Colour:"; - // - // lbleftcornercolor - // - this.lbleftcornercolor.AutoSize = true; - this.lbleftcornercolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbleftcornercolor.Location = new System.Drawing.Point(3, 57); - this.lbleftcornercolor.Name = "lbleftcornercolor"; - this.lbleftcornercolor.Size = new System.Drawing.Size(117, 16); - this.lbleftcornercolor.TabIndex = 7; - this.lbleftcornercolor.Text = "Left Corner Colour:"; - // - // cboxtitlebarcorners - // - this.cboxtitlebarcorners.AutoSize = true; - this.cboxtitlebarcorners.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.cboxtitlebarcorners.FlatAppearance.CheckedBackColor = System.Drawing.Color.Black; - this.cboxtitlebarcorners.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cboxtitlebarcorners.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F); - this.cboxtitlebarcorners.Location = new System.Drawing.Point(166, 4); - this.cboxtitlebarcorners.Name = "cboxtitlebarcorners"; - this.cboxtitlebarcorners.Size = new System.Drawing.Size(131, 21); - this.cboxtitlebarcorners.TabIndex = 6; - this.cboxtitlebarcorners.Text = "Title Bar Corners"; - this.cboxtitlebarcorners.UseVisualStyleBackColor = true; - this.cboxtitlebarcorners.CheckedChanged += new System.EventHandler(this.cboxtitlebarcorners_CheckedChanged); - // - // Label5 - // - this.Label5.AutoSize = true; - this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label5.Location = new System.Drawing.Point(136, 32); - this.Label5.Name = "Label5"; - this.Label5.Size = new System.Drawing.Size(22, 16); - this.Label5.TabIndex = 5; - this.Label5.Text = "px"; - // - // txttitlebarheight - // - this.txttitlebarheight.BackColor = System.Drawing.Color.White; - this.txttitlebarheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txttitlebarheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txttitlebarheight.ForeColor = System.Drawing.Color.Black; - this.txttitlebarheight.Location = new System.Drawing.Point(112, 30); - this.txttitlebarheight.Name = "txttitlebarheight"; - this.txttitlebarheight.Size = new System.Drawing.Size(23, 22); - this.txttitlebarheight.TabIndex = 4; - this.txttitlebarheight.TextChanged += new System.EventHandler(this.txttitlebarheight_TextChanged); - // - // Label4 - // - this.Label4.AutoSize = true; - this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label4.Location = new System.Drawing.Point(3, 32); - this.Label4.Name = "Label4"; - this.Label4.Size = new System.Drawing.Size(103, 16); - this.Label4.TabIndex = 2; - this.Label4.Text = "Title Bar Height:"; - // - // pnltitlebarcolour - // - this.pnltitlebarcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnltitlebarcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnltitlebarcolour.Location = new System.Drawing.Point(112, 5); - this.pnltitlebarcolour.Name = "pnltitlebarcolour"; - this.pnltitlebarcolour.Size = new System.Drawing.Size(41, 20); - this.pnltitlebarcolour.TabIndex = 1; - this.pnltitlebarcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetTitlebarColor); - // - // Label2 - // - this.Label2.AutoSize = true; - this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label2.Location = new System.Drawing.Point(3, 7); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(103, 16); - this.Label2.TabIndex = 0; - this.Label2.Text = "Title Bar Colour:"; - // - // pnlborderoptions - // - this.pnlborderoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnlborderoptions.Controls.Add(this.cbindividualbordercolours); - this.pnlborderoptions.Controls.Add(this.pnlborderbottomrightcolour); - this.pnlborderoptions.Controls.Add(this.lbbright); - this.pnlborderoptions.Controls.Add(this.pnlborderbottomcolour); - this.pnlborderoptions.Controls.Add(this.lbbottom); - this.pnlborderoptions.Controls.Add(this.pnlborderbottomleftcolour); - this.pnlborderoptions.Controls.Add(this.lbbleft); - this.pnlborderoptions.Controls.Add(this.pnlborderrightcolour); - this.pnlborderoptions.Controls.Add(this.lbright); - this.pnlborderoptions.Controls.Add(this.pnlborderleftcolour); - this.pnlborderoptions.Controls.Add(this.lbleft); - this.pnlborderoptions.Controls.Add(this.Label15); - this.pnlborderoptions.Controls.Add(this.pnlbordercolour); - this.pnlborderoptions.Controls.Add(this.txtbordersize); - this.pnlborderoptions.Controls.Add(this.Label3); - this.pnlborderoptions.Controls.Add(this.Label16); - this.pnlborderoptions.Location = new System.Drawing.Point(135, 159); - this.pnlborderoptions.Name = "pnlborderoptions"; - this.pnlborderoptions.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.pnlborderoptions.Size = new System.Drawing.Size(325, 139); - this.pnlborderoptions.TabIndex = 10; - this.pnlborderoptions.Visible = false; - // - // cbindividualbordercolours - // - this.cbindividualbordercolours.AutoSize = true; - this.cbindividualbordercolours.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.cbindividualbordercolours.FlatAppearance.CheckedBackColor = System.Drawing.Color.Black; - this.cbindividualbordercolours.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cbindividualbordercolours.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F); - this.cbindividualbordercolours.Location = new System.Drawing.Point(161, 4); - this.cbindividualbordercolours.Name = "cbindividualbordercolours"; - this.cbindividualbordercolours.Size = new System.Drawing.Size(135, 21); - this.cbindividualbordercolours.TabIndex = 28; - this.cbindividualbordercolours.Text = "Individual Colours"; - this.cbindividualbordercolours.UseVisualStyleBackColor = true; - this.cbindividualbordercolours.CheckedChanged += new System.EventHandler(this.cbindividualbordercolours_CheckedChanged); - // - // pnlborderbottomrightcolour - // - this.pnlborderbottomrightcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnlborderbottomrightcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlborderbottomrightcolour.Location = new System.Drawing.Point(132, 101); - this.pnlborderbottomrightcolour.Name = "pnlborderbottomrightcolour"; - this.pnlborderbottomrightcolour.Size = new System.Drawing.Size(41, 20); - this.pnlborderbottomrightcolour.TabIndex = 27; - this.pnlborderbottomrightcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomRBorderColor); - // - // lbbright - // - this.lbbright.AutoSize = true; - this.lbbright.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbbright.Location = new System.Drawing.Point(3, 103); - this.lbbright.Name = "lbbright"; - this.lbbright.Size = new System.Drawing.Size(129, 16); - this.lbbright.TabIndex = 26; - this.lbbright.Text = "Bottom Right Colour:"; - // - // pnlborderbottomcolour - // - this.pnlborderbottomcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnlborderbottomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlborderbottomcolour.Location = new System.Drawing.Point(263, 31); - this.pnlborderbottomcolour.Name = "pnlborderbottomcolour"; - this.pnlborderbottomcolour.Size = new System.Drawing.Size(41, 20); - this.pnlborderbottomcolour.TabIndex = 25; - this.pnlborderbottomcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomBorderColor); - // - // lbbottom - // - this.lbbottom.AutoSize = true; - this.lbbottom.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbbottom.Location = new System.Drawing.Point(158, 32); - this.lbbottom.Name = "lbbottom"; - this.lbbottom.Size = new System.Drawing.Size(95, 16); - this.lbbottom.TabIndex = 24; - this.lbbottom.Text = "Bottom Colour:"; - // - // pnlborderbottomleftcolour - // - this.pnlborderbottomleftcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnlborderbottomleftcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlborderbottomleftcolour.Location = new System.Drawing.Point(124, 78); - this.pnlborderbottomleftcolour.Name = "pnlborderbottomleftcolour"; - this.pnlborderbottomleftcolour.Size = new System.Drawing.Size(41, 20); - this.pnlborderbottomleftcolour.TabIndex = 23; - this.pnlborderbottomleftcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomLColor); - // - // lbbleft - // - this.lbbleft.AutoSize = true; - this.lbbleft.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbbleft.Location = new System.Drawing.Point(3, 80); - this.lbbleft.Name = "lbbleft"; - this.lbbleft.Size = new System.Drawing.Size(119, 16); - this.lbbleft.TabIndex = 22; - this.lbbleft.Text = "Bottom Left Colour:"; - // - // pnlborderrightcolour - // - this.pnlborderrightcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnlborderrightcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlborderrightcolour.Location = new System.Drawing.Point(263, 54); - this.pnlborderrightcolour.Name = "pnlborderrightcolour"; - this.pnlborderrightcolour.Size = new System.Drawing.Size(41, 20); - this.pnlborderrightcolour.TabIndex = 21; - this.pnlborderrightcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetRightBorderColor); - // - // lbright - // - this.lbright.AutoSize = true; - this.lbright.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbright.Location = new System.Drawing.Point(157, 56); - this.lbright.Name = "lbright"; - this.lbright.Size = new System.Drawing.Size(84, 16); - this.lbright.TabIndex = 20; - this.lbright.Text = "Right Colour:"; - // - // pnlborderleftcolour - // - this.pnlborderleftcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pnlborderleftcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlborderleftcolour.Location = new System.Drawing.Point(102, 54); - this.pnlborderleftcolour.Name = "pnlborderleftcolour"; - this.pnlborderleftcolour.Size = new System.Drawing.Size(41, 20); - this.pnlborderleftcolour.TabIndex = 19; - this.pnlborderleftcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetLeftBorderColor); - // - // lbleft - // - this.lbleft.AutoSize = true; - this.lbleft.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbleft.Location = new System.Drawing.Point(3, 56); - this.lbleft.Name = "lbleft"; - this.lbleft.Size = new System.Drawing.Size(74, 16); - this.lbleft.TabIndex = 18; - this.lbleft.Text = "Left Colour:"; - // - // Label15 - // - this.Label15.AutoSize = true; - this.Label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label15.Location = new System.Drawing.Point(126, 31); - this.Label15.Name = "Label15"; - this.Label15.Size = new System.Drawing.Size(22, 16); - this.Label15.TabIndex = 17; - this.Label15.Text = "px"; - // - // pnlbordercolour - // - this.pnlbordercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbordercolour.Location = new System.Drawing.Point(102, 5); - this.pnlbordercolour.Name = "pnlbordercolour"; - this.pnlbordercolour.Size = new System.Drawing.Size(41, 20); - this.pnlbordercolour.TabIndex = 3; - this.pnlbordercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetMainBorderColor); - // - // txtbordersize - // - this.txtbordersize.BackColor = System.Drawing.Color.White; - this.txtbordersize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtbordersize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtbordersize.ForeColor = System.Drawing.Color.Black; - this.txtbordersize.Location = new System.Drawing.Point(102, 29); - this.txtbordersize.Name = "txtbordersize"; - this.txtbordersize.Size = new System.Drawing.Size(23, 22); - this.txtbordersize.TabIndex = 16; - this.txtbordersize.TextChanged += new System.EventHandler(this.txtbordersize_TextChanged); - // - // Label3 - // - this.Label3.AutoSize = true; - this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label3.Location = new System.Drawing.Point(3, 7); - this.Label3.Name = "Label3"; - this.Label3.Size = new System.Drawing.Size(94, 16); - this.Label3.TabIndex = 2; - this.Label3.Text = "Border Colour:"; - // - // Label16 - // - this.Label16.AutoSize = true; - this.Label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label16.Location = new System.Drawing.Point(3, 31); - this.Label16.Name = "Label16"; - this.Label16.Size = new System.Drawing.Size(81, 16); - this.Label16.TabIndex = 15; - this.Label16.Text = "Border Size:"; - // - // pnltitletextoptions - // - this.pnltitletextoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pnltitletextoptions.Controls.Add(this.combotitletextposition); - this.pnltitletextoptions.Controls.Add(this.Label53); - this.pnltitletextoptions.Controls.Add(this.combotitletextstyle); - this.pnltitletextoptions.Controls.Add(this.combotitletextfont); - this.pnltitletextoptions.Controls.Add(this.Label23); - this.pnltitletextoptions.Controls.Add(this.Label17); - this.pnltitletextoptions.Controls.Add(this.txttitletextside); - this.pnltitletextoptions.Controls.Add(this.Label18); - this.pnltitletextoptions.Controls.Add(this.Label19); - this.pnltitletextoptions.Controls.Add(this.txttitletexttop); - this.pnltitletextoptions.Controls.Add(this.Label20); - this.pnltitletextoptions.Controls.Add(this.Label21); - this.pnltitletextoptions.Controls.Add(this.txttitletextsize); - this.pnltitletextoptions.Controls.Add(this.Label22); - this.pnltitletextoptions.Controls.Add(this.Label24); - this.pnltitletextoptions.Controls.Add(this.pnltitletextcolour); - this.pnltitletextoptions.Controls.Add(this.Label25); - this.pnltitletextoptions.Location = new System.Drawing.Point(135, 159); - this.pnltitletextoptions.Name = "pnltitletextoptions"; - this.pnltitletextoptions.Size = new System.Drawing.Size(325, 139); - this.pnltitletextoptions.TabIndex = 15; - this.pnltitletextoptions.Visible = false; - // - // combotitletextposition - // - this.combotitletextposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.combotitletextposition.FormattingEnabled = true; - this.combotitletextposition.Items.AddRange(new object[] { - "Left", - "Centre"}); - this.combotitletextposition.Location = new System.Drawing.Point(211, 54); - this.combotitletextposition.Name = "combotitletextposition"; - this.combotitletextposition.Size = new System.Drawing.Size(95, 24); - this.combotitletextposition.TabIndex = 21; - this.combotitletextposition.SelectedIndexChanged += new System.EventHandler(this.combotitletextposition_SelectedIndexChanged); - // - // Label53 - // - this.Label53.AutoSize = true; - this.Label53.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label53.Location = new System.Drawing.Point(149, 57); - this.Label53.Name = "Label53"; - this.Label53.Size = new System.Drawing.Size(59, 16); - this.Label53.TabIndex = 20; - this.Label53.Text = "Position:"; - // - // combotitletextstyle - // - this.combotitletextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.combotitletextstyle.FormattingEnabled = true; - this.combotitletextstyle.Items.AddRange(new object[] { - "Bold", - "Italic", - "Regular", - "Strikeout", - "Underline"}); - this.combotitletextstyle.Location = new System.Drawing.Point(207, 3); - this.combotitletextstyle.Name = "combotitletextstyle"; - this.combotitletextstyle.Size = new System.Drawing.Size(99, 24); - this.combotitletextstyle.TabIndex = 18; - this.combotitletextstyle.SelectedIndexChanged += new System.EventHandler(this.combotitletextstyle_SelectedIndexChanged); - // - // combotitletextfont - // - this.combotitletextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.combotitletextfont.FormattingEnabled = true; - this.combotitletextfont.Location = new System.Drawing.Point(100, 30); - this.combotitletextfont.Name = "combotitletextfont"; - this.combotitletextfont.Size = new System.Drawing.Size(202, 24); - this.combotitletextfont.TabIndex = 17; - this.combotitletextfont.SelectedIndexChanged += new System.EventHandler(this.combotitletextfont_SelectedIndexChanged); - // - // Label23 - // - this.Label23.AutoSize = true; - this.Label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label23.Location = new System.Drawing.Point(164, 7); - this.Label23.Name = "Label23"; - this.Label23.Size = new System.Drawing.Size(41, 16); - this.Label23.TabIndex = 15; - this.Label23.Text = "Style:"; - // - // Label17 - // - this.Label17.AutoSize = true; - this.Label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label17.Location = new System.Drawing.Point(159, 107); - this.Label17.Name = "Label17"; - this.Label17.Size = new System.Drawing.Size(22, 16); - this.Label17.TabIndex = 14; - this.Label17.Text = "px"; - // - // txttitletextside - // - this.txttitletextside.BackColor = System.Drawing.Color.White; - this.txttitletextside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txttitletextside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txttitletextside.ForeColor = System.Drawing.Color.Black; - this.txttitletextside.Location = new System.Drawing.Point(135, 105); - this.txttitletextside.Name = "txttitletextside"; - this.txttitletextside.Size = new System.Drawing.Size(23, 22); - this.txttitletextside.TabIndex = 13; - this.txttitletextside.TextChanged += new System.EventHandler(this.txttitletextside_TextChanged); - // - // Label18 - // - this.Label18.AutoSize = true; - this.Label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label18.Location = new System.Drawing.Point(3, 107); - this.Label18.Name = "Label18"; - this.Label18.Size = new System.Drawing.Size(131, 16); - this.Label18.TabIndex = 12; - this.Label18.Text = "Title Text From Side:"; - // - // Label19 - // - this.Label19.AutoSize = true; - this.Label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label19.Location = new System.Drawing.Point(159, 82); - this.Label19.Name = "Label19"; - this.Label19.Size = new System.Drawing.Size(22, 16); - this.Label19.TabIndex = 11; - this.Label19.Text = "px"; - // - // txttitletexttop - // - this.txttitletexttop.BackColor = System.Drawing.Color.White; - this.txttitletexttop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txttitletexttop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txttitletexttop.ForeColor = System.Drawing.Color.Black; - this.txttitletexttop.Location = new System.Drawing.Point(135, 80); - this.txttitletexttop.Name = "txttitletexttop"; - this.txttitletexttop.Size = new System.Drawing.Size(23, 22); - this.txttitletexttop.TabIndex = 10; - this.txttitletexttop.TextChanged += new System.EventHandler(this.txttitletexttop_TextChanged); - // - // Label20 - // - this.Label20.AutoSize = true; - this.Label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label20.Location = new System.Drawing.Point(3, 82); - this.Label20.Name = "Label20"; - this.Label20.Size = new System.Drawing.Size(128, 16); - this.Label20.TabIndex = 9; - this.Label20.Text = "Title Text From Top:"; - // - // Label21 - // - this.Label21.AutoSize = true; - this.Label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label21.Location = new System.Drawing.Point(124, 57); - this.Label21.Name = "Label21"; - this.Label21.Size = new System.Drawing.Size(22, 16); - this.Label21.TabIndex = 8; - this.Label21.Text = "px"; - // - // txttitletextsize - // - this.txttitletextsize.BackColor = System.Drawing.Color.White; - this.txttitletextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txttitletextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txttitletextsize.ForeColor = System.Drawing.Color.Black; - this.txttitletextsize.Location = new System.Drawing.Point(100, 55); - this.txttitletextsize.Name = "txttitletextsize"; - this.txttitletextsize.Size = new System.Drawing.Size(23, 22); - this.txttitletextsize.TabIndex = 7; - this.txttitletextsize.TextChanged += new System.EventHandler(this.txttitletextsize_TextChanged); - // - // Label22 - // - this.Label22.AutoSize = true; - this.Label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label22.Location = new System.Drawing.Point(3, 57); - this.Label22.Name = "Label22"; - this.Label22.Size = new System.Drawing.Size(95, 16); - this.Label22.TabIndex = 6; - this.Label22.Text = "Title Text Size:"; - // - // Label24 - // - this.Label24.AutoSize = true; - this.Label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label24.Location = new System.Drawing.Point(3, 33); - this.Label24.Name = "Label24"; - this.Label24.Size = new System.Drawing.Size(95, 16); - this.Label24.TabIndex = 2; - this.Label24.Text = "Title Text Font:"; - // - // pnltitletextcolour - // - this.pnltitletextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnltitletextcolour.Location = new System.Drawing.Point(114, 5); - this.pnltitletextcolour.Name = "pnltitletextcolour"; - this.pnltitletextcolour.Size = new System.Drawing.Size(41, 20); - this.pnltitletextcolour.TabIndex = 1; - this.pnltitletextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetTitleTextColor); - // - // Label25 - // - this.Label25.AutoSize = true; - this.Label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label25.Location = new System.Drawing.Point(3, 7); - this.Label25.Name = "Label25"; - this.Label25.Size = new System.Drawing.Size(108, 16); - this.Label25.TabIndex = 0; - this.Label25.Text = "Title Text Colour:"; - // - // pnlwindowsobjects - // - this.pnlwindowsobjects.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.pnlwindowsobjects.Controls.Add(this.btnborders); - this.pnlwindowsobjects.Controls.Add(this.btnbuttons); - this.pnlwindowsobjects.Controls.Add(this.btntitletext); - this.pnlwindowsobjects.Controls.Add(this.btntitlebar); - this.pnlwindowsobjects.Location = new System.Drawing.Point(1, 159); - this.pnlwindowsobjects.Name = "pnlwindowsobjects"; - this.pnlwindowsobjects.Size = new System.Drawing.Size(128, 135); - this.pnlwindowsobjects.TabIndex = 8; - // - // btnborders - // - this.btnborders.BackColor = System.Drawing.Color.White; - this.btnborders.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnborders.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnborders.Location = new System.Drawing.Point(4, 105); - this.btnborders.Name = "btnborders"; - this.btnborders.Size = new System.Drawing.Size(119, 29); - this.btnborders.TabIndex = 7; - this.btnborders.TabStop = false; - this.btnborders.Text = "Borders"; - this.btnborders.UseVisualStyleBackColor = false; - this.btnborders.Click += new System.EventHandler(this.btnborders_Click); - // - // btnbuttons - // - this.btnbuttons.BackColor = System.Drawing.Color.White; - this.btnbuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnbuttons.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnbuttons.Location = new System.Drawing.Point(4, 70); - this.btnbuttons.Name = "btnbuttons"; - this.btnbuttons.Size = new System.Drawing.Size(119, 29); - this.btnbuttons.TabIndex = 6; - this.btnbuttons.TabStop = false; - this.btnbuttons.Text = "Buttons"; - this.btnbuttons.UseVisualStyleBackColor = false; - this.btnbuttons.Click += new System.EventHandler(this.btnbuttons_Click); - // - // btntitletext - // - this.btntitletext.BackColor = System.Drawing.Color.White; - this.btntitletext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btntitletext.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btntitletext.Location = new System.Drawing.Point(4, 35); - this.btntitletext.Name = "btntitletext"; - this.btntitletext.Size = new System.Drawing.Size(119, 29); - this.btntitletext.TabIndex = 5; - this.btntitletext.TabStop = false; - this.btntitletext.Text = "Title Text"; - this.btntitletext.UseVisualStyleBackColor = false; - this.btntitletext.Click += new System.EventHandler(this.btntitletext_Click_1); - // - // btntitlebar - // - this.btntitlebar.BackColor = System.Drawing.Color.White; - this.btntitlebar.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btntitlebar.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btntitlebar.Location = new System.Drawing.Point(4, 0); - this.btntitlebar.Name = "btntitlebar"; - this.btntitlebar.Size = new System.Drawing.Size(119, 29); - this.btntitlebar.TabIndex = 4; - this.btntitlebar.TabStop = false; - this.btntitlebar.Text = "Title Bar"; - this.btntitlebar.UseVisualStyleBackColor = false; - this.btntitlebar.Click += new System.EventHandler(this.btntitlebar_Click); - // - // pnlwindowpreview - // - this.pnlwindowpreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlwindowpreview.Controls.Add(this.prepgcontent); - this.pnlwindowpreview.Controls.Add(this.prepgbottom); - this.pnlwindowpreview.Controls.Add(this.prepgleft); - this.pnlwindowpreview.Controls.Add(this.prepgright); - this.pnlwindowpreview.Controls.Add(this.pretitlebar); - this.pnlwindowpreview.Location = new System.Drawing.Point(5, 3); - this.pnlwindowpreview.Name = "pnlwindowpreview"; - this.pnlwindowpreview.Size = new System.Drawing.Size(448, 148); - this.pnlwindowpreview.TabIndex = 0; - // - // prepgcontent - // - this.prepgcontent.Dock = System.Windows.Forms.DockStyle.Fill; - this.prepgcontent.Location = new System.Drawing.Point(2, 30); - this.prepgcontent.Name = "prepgcontent"; - this.prepgcontent.Size = new System.Drawing.Size(444, 116); - this.prepgcontent.TabIndex = 20; - // - // prepgbottom - // - this.prepgbottom.BackColor = System.Drawing.Color.Gray; - this.prepgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.prepgbottom.Location = new System.Drawing.Point(2, 146); - this.prepgbottom.Name = "prepgbottom"; - this.prepgbottom.Size = new System.Drawing.Size(444, 2); - this.prepgbottom.TabIndex = 23; - // - // prepgleft - // - this.prepgleft.BackColor = System.Drawing.Color.Gray; - this.prepgleft.Controls.Add(this.prepgbottomlcorner); - this.prepgleft.Dock = System.Windows.Forms.DockStyle.Left; - this.prepgleft.Location = new System.Drawing.Point(0, 30); - this.prepgleft.Name = "prepgleft"; - this.prepgleft.Size = new System.Drawing.Size(2, 118); - this.prepgleft.TabIndex = 21; - // - // prepgbottomlcorner - // - this.prepgbottomlcorner.BackColor = System.Drawing.Color.Red; - this.prepgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; - this.prepgbottomlcorner.Location = new System.Drawing.Point(0, 116); - this.prepgbottomlcorner.Name = "prepgbottomlcorner"; - this.prepgbottomlcorner.Size = new System.Drawing.Size(2, 2); - this.prepgbottomlcorner.TabIndex = 14; - // - // prepgright - // - this.prepgright.BackColor = System.Drawing.Color.Gray; - this.prepgright.Controls.Add(this.prepgbottomrcorner); - this.prepgright.Dock = System.Windows.Forms.DockStyle.Right; - this.prepgright.Location = new System.Drawing.Point(446, 30); - this.prepgright.Name = "prepgright"; - this.prepgright.Size = new System.Drawing.Size(2, 118); - this.prepgright.TabIndex = 22; - // - // prepgbottomrcorner - // - this.prepgbottomrcorner.BackColor = System.Drawing.Color.Red; - this.prepgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; - this.prepgbottomrcorner.Location = new System.Drawing.Point(0, 116); - this.prepgbottomrcorner.Name = "prepgbottomrcorner"; - this.prepgbottomrcorner.Size = new System.Drawing.Size(2, 2); - this.prepgbottomrcorner.TabIndex = 15; - // - // pretitlebar - // - this.pretitlebar.BackColor = System.Drawing.Color.Gray; - this.pretitlebar.Controls.Add(this.preminimizebutton); - this.pretitlebar.Controls.Add(this.prepnlicon); - this.pretitlebar.Controls.Add(this.prerollupbutton); - this.pretitlebar.Controls.Add(this.preclosebutton); - this.pretitlebar.Controls.Add(this.pretitletext); - this.pretitlebar.Controls.Add(this.prepgtoplcorner); - this.pretitlebar.Controls.Add(this.prepgtoprcorner); - this.pretitlebar.Dock = System.Windows.Forms.DockStyle.Top; - this.pretitlebar.ForeColor = System.Drawing.Color.White; - this.pretitlebar.Location = new System.Drawing.Point(0, 0); - this.pretitlebar.Name = "pretitlebar"; - this.pretitlebar.Size = new System.Drawing.Size(448, 30); - this.pretitlebar.TabIndex = 19; - // - // preminimizebutton - // - this.preminimizebutton.BackColor = System.Drawing.Color.Black; - this.preminimizebutton.Location = new System.Drawing.Point(185, 5); - this.preminimizebutton.Name = "preminimizebutton"; - this.preminimizebutton.Size = new System.Drawing.Size(22, 22); - this.preminimizebutton.TabIndex = 31; - // - // prepnlicon - // - this.prepnlicon.BackColor = System.Drawing.Color.Transparent; - this.prepnlicon.Location = new System.Drawing.Point(8, 8); - this.prepnlicon.Name = "prepnlicon"; - this.prepnlicon.Size = new System.Drawing.Size(16, 16); - this.prepnlicon.TabIndex = 32; - this.prepnlicon.TabStop = false; - this.prepnlicon.Visible = false; - // - // prerollupbutton - // - this.prerollupbutton.BackColor = System.Drawing.Color.Black; - this.prerollupbutton.Location = new System.Drawing.Point(213, 5); - this.prerollupbutton.Name = "prerollupbutton"; - this.prerollupbutton.Size = new System.Drawing.Size(22, 22); - this.prerollupbutton.TabIndex = 31; - // - // preclosebutton - // - this.preclosebutton.BackColor = System.Drawing.Color.Black; - this.preclosebutton.Location = new System.Drawing.Point(251, 5); - this.preclosebutton.Name = "preclosebutton"; - this.preclosebutton.Size = new System.Drawing.Size(22, 22); - this.preclosebutton.TabIndex = 20; - // - // pretitletext - // - this.pretitletext.AutoSize = true; - this.pretitletext.BackColor = System.Drawing.Color.Transparent; - this.pretitletext.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.pretitletext.Location = new System.Drawing.Point(29, 7); - this.pretitletext.Name = "pretitletext"; - this.pretitletext.Size = new System.Drawing.Size(77, 18); - this.pretitletext.TabIndex = 19; - this.pretitletext.Text = "Template"; - // - // prepgtoplcorner - // - this.prepgtoplcorner.BackColor = System.Drawing.Color.Red; - this.prepgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; - this.prepgtoplcorner.Location = new System.Drawing.Point(0, 0); - this.prepgtoplcorner.Name = "prepgtoplcorner"; - this.prepgtoplcorner.Size = new System.Drawing.Size(2, 30); - this.prepgtoplcorner.TabIndex = 17; - // - // prepgtoprcorner - // - this.prepgtoprcorner.BackColor = System.Drawing.Color.Red; - this.prepgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; - this.prepgtoprcorner.Location = new System.Drawing.Point(446, 0); - this.prepgtoprcorner.Name = "prepgtoprcorner"; - this.prepgtoprcorner.Size = new System.Drawing.Size(2, 30); - this.prepgtoprcorner.TabIndex = 16; - // - // pnlreset - // - this.pnlreset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlreset.Controls.Add(this.Label113); - this.pnlreset.Controls.Add(this.btnresetallsettings); - this.pnlreset.Controls.Add(this.Label109); - this.pnlreset.Controls.Add(this.Label111); - this.pnlreset.Location = new System.Drawing.Point(134, 9); - this.pnlreset.Name = "pnlreset"; - this.pnlreset.Size = new System.Drawing.Size(457, 306); - this.pnlreset.TabIndex = 18; - // - // Label113 - // - this.Label113.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label113.Location = new System.Drawing.Point(57, 231); - this.Label113.Name = "Label113"; - this.Label113.Size = new System.Drawing.Size(332, 33); - this.Label113.TabIndex = 5; - this.Label113.Text = "Warning! A Global Reset Is Irreversible!"; - this.Label113.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnresetallsettings - // - this.btnresetallsettings.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnresetallsettings.Font = new System.Drawing.Font("Cambria", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnresetallsettings.Location = new System.Drawing.Point(101, 145); - this.btnresetallsettings.Name = "btnresetallsettings"; - this.btnresetallsettings.Size = new System.Drawing.Size(255, 83); - this.btnresetallsettings.TabIndex = 4; - this.btnresetallsettings.TabStop = false; - this.btnresetallsettings.Text = "Reset All Settings"; - this.btnresetallsettings.UseVisualStyleBackColor = true; - this.btnresetallsettings.Click += new System.EventHandler(this.btnresetallsettings_Click); - // - // Label109 - // - this.Label109.BackColor = System.Drawing.Color.Transparent; - this.Label109.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label109.Location = new System.Drawing.Point(4, 40); - this.Label109.Name = "Label109"; - this.Label109.Size = new System.Drawing.Size(451, 66); - this.Label109.TabIndex = 3; - this.Label109.Text = resources.GetString("Label109.Text"); - this.Label109.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // Label111 - // - this.Label111.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label111.Location = new System.Drawing.Point(68, 4); - this.Label111.Name = "Label111"; - this.Label111.Size = new System.Drawing.Size(332, 33); - this.Label111.TabIndex = 2; - this.Label111.Text = "Global Settings Reset!"; - this.Label111.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.pnldesktopoptions); - this.pgcontents.Controls.Add(this.pnlluaoptions); - this.pgcontents.Controls.Add(this.pnldesktopcomposition); - this.pgcontents.Controls.Add(this.pnlreset); - this.pgcontents.Controls.Add(this.pnlwindowsoptions); - this.pgcontents.Controls.Add(this.pnlmenus); - this.pgcontents.Controls.Add(this.pnlshifterintro); - this.pgcontents.Controls.Add(this.catholder); - this.pgcontents.Controls.Add(this.btnapply); - this.pgcontents.Controls.Add(this.Label1); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(600, 323); - this.pgcontents.TabIndex = 0; - // - // pnldesktopcomposition - // - this.pnldesktopcomposition.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnldesktopcomposition.BackColor = System.Drawing.Color.White; - this.pnldesktopcomposition.Controls.Add(this.pnlfancywindows); - this.pnldesktopcomposition.Controls.Add(this.pnlfancydragging); - this.pnldesktopcomposition.Controls.Add(this.pnlfancyintro); - this.pnldesktopcomposition.Controls.Add(this.panel18); - this.pnldesktopcomposition.Controls.Add(this.panel25); - this.pnldesktopcomposition.Controls.Add(this.panel36); - this.pnldesktopcomposition.Controls.Add(this.label176); - this.pnldesktopcomposition.Location = new System.Drawing.Point(134, 9); - this.pnldesktopcomposition.Name = "pnldesktopcomposition"; - this.pnldesktopcomposition.Size = new System.Drawing.Size(457, 306); - this.pnldesktopcomposition.TabIndex = 20; - // - // pnlfancywindows - // - this.pnlfancywindows.Controls.Add(this.txtwinfadedec); - this.pnlfancywindows.Controls.Add(this.label150); - this.pnlfancywindows.Controls.Add(this.txtwinfadespeed); - this.pnlfancywindows.Controls.Add(this.label151); - this.pnlfancywindows.Controls.Add(this.cbdrageffect); - this.pnlfancywindows.Controls.Add(this.label141); - this.pnlfancywindows.Controls.Add(this.cbcloseanim); - this.pnlfancywindows.Controls.Add(this.label128); - this.pnlfancywindows.Controls.Add(this.cbopenanim); - this.pnlfancywindows.Controls.Add(this.label127); - this.pnlfancywindows.Controls.Add(this.label149); - this.pnlfancywindows.Location = new System.Drawing.Point(139, 43); - this.pnlfancywindows.Name = "pnlfancywindows"; - this.pnlfancywindows.Size = new System.Drawing.Size(311, 256); - this.pnlfancywindows.TabIndex = 13; - // - // txtwinfadedec - // - this.txtwinfadedec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtwinfadedec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.txtwinfadedec.Location = new System.Drawing.Point(225, 189); - this.txtwinfadedec.Name = "txtwinfadedec"; - this.txtwinfadedec.Size = new System.Drawing.Size(35, 23); - this.txtwinfadedec.TabIndex = 26; - this.txtwinfadedec.TextChanged += new System.EventHandler(this.txtwinfadedec_TextChanged); - // - // label150 - // - this.label150.AutoSize = true; - this.label150.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label150.Location = new System.Drawing.Point(153, 191); - this.label150.Name = "label150"; - this.label150.Size = new System.Drawing.Size(71, 16); - this.label150.TabIndex = 25; - this.label150.Text = "Fade Dec."; - // - // txtwinfadespeed - // - this.txtwinfadespeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtwinfadespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.txtwinfadespeed.Location = new System.Drawing.Point(109, 185); - this.txtwinfadespeed.Name = "txtwinfadespeed"; - this.txtwinfadespeed.Size = new System.Drawing.Size(35, 23); - this.txtwinfadespeed.TabIndex = 24; - this.txtwinfadespeed.TextChanged += new System.EventHandler(this.txtwinfadespeed_TextChanged); - // - // label151 - // - this.label151.AutoSize = true; - this.label151.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label151.Location = new System.Drawing.Point(13, 189); - this.label151.Name = "label151"; - this.label151.Size = new System.Drawing.Size(84, 16); - this.label151.TabIndex = 23; - this.label151.Text = "Fade Speed"; - // - // cbdrageffect - // - this.cbdrageffect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.cbdrageffect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbdrageffect.FormattingEnabled = true; - this.cbdrageffect.Location = new System.Drawing.Point(6, 153); - this.cbdrageffect.Name = "cbdrageffect"; - this.cbdrageffect.Size = new System.Drawing.Size(294, 21); - this.cbdrageffect.TabIndex = 22; - this.cbdrageffect.SelectedIndexChanged += new System.EventHandler(this.cbdrageffect_SelectedIndexChanged); - // - // label141 - // - this.label141.AutoSize = true; - this.label141.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label141.Location = new System.Drawing.Point(7, 132); - this.label141.Name = "label141"; - this.label141.Size = new System.Drawing.Size(125, 16); - this.label141.TabIndex = 21; - this.label141.Text = "Window Drag Effect"; - // - // cbcloseanim - // - this.cbcloseanim.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.cbcloseanim.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbcloseanim.FormattingEnabled = true; - this.cbcloseanim.Location = new System.Drawing.Point(8, 102); - this.cbcloseanim.Name = "cbcloseanim"; - this.cbcloseanim.Size = new System.Drawing.Size(294, 21); - this.cbcloseanim.TabIndex = 20; - this.cbcloseanim.SelectedIndexChanged += new System.EventHandler(this.cbcloseanim_SelectedIndexChanged); - // - // label128 - // - this.label128.AutoSize = true; - this.label128.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label128.Location = new System.Drawing.Point(9, 81); - this.label128.Name = "label128"; - this.label128.Size = new System.Drawing.Size(156, 16); - this.label128.TabIndex = 19; - this.label128.Text = "Window Close Animation"; - // - // cbopenanim - // - this.cbopenanim.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.cbopenanim.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbopenanim.FormattingEnabled = true; - this.cbopenanim.Location = new System.Drawing.Point(9, 50); - this.cbopenanim.Name = "cbopenanim"; - this.cbopenanim.Size = new System.Drawing.Size(294, 21); - this.cbopenanim.TabIndex = 18; - this.cbopenanim.SelectedIndexChanged += new System.EventHandler(this.cbopenanim_SelectedIndexChanged); - // - // label127 - // - this.label127.AutoSize = true; - this.label127.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label127.Location = new System.Drawing.Point(10, 29); - this.label127.Name = "label127"; - this.label127.Size = new System.Drawing.Size(154, 16); - this.label127.TabIndex = 17; - this.label127.Text = "Window Open Animation"; - // - // label149 - // - this.label149.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label149.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label149.Location = new System.Drawing.Point(6, 0); - this.label149.Name = "label149"; - this.label149.Size = new System.Drawing.Size(301, 29); - this.label149.TabIndex = 1; - this.label149.Text = "Animations"; - this.label149.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pnlfancydragging - // - this.pnlfancydragging.Controls.Add(this.txtshakeminoffset); - this.pnlfancydragging.Controls.Add(this.label148); - this.pnlfancydragging.Controls.Add(this.txtshakemax); - this.pnlfancydragging.Controls.Add(this.label146); - this.pnlfancydragging.Controls.Add(this.txtdragopacitydec); - this.pnlfancydragging.Controls.Add(this.label144); - this.pnlfancydragging.Controls.Add(this.txtdragfadedec); - this.pnlfancydragging.Controls.Add(this.label143); - this.pnlfancydragging.Controls.Add(this.txtfadespeed); - this.pnlfancydragging.Controls.Add(this.label155); - this.pnlfancydragging.Controls.Add(this.label156); - this.pnlfancydragging.Location = new System.Drawing.Point(139, 43); - this.pnlfancydragging.Name = "pnlfancydragging"; - this.pnlfancydragging.Size = new System.Drawing.Size(311, 256); - this.pnlfancydragging.TabIndex = 14; - // - // txtshakeminoffset - // - this.txtshakeminoffset.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtshakeminoffset.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.txtshakeminoffset.Location = new System.Drawing.Point(167, 189); - this.txtshakeminoffset.Name = "txtshakeminoffset"; - this.txtshakeminoffset.Size = new System.Drawing.Size(35, 23); - this.txtshakeminoffset.TabIndex = 13; - this.txtshakeminoffset.TextChanged += new System.EventHandler(this.txtshakeminoffset_TextChanged); - // - // label148 - // - this.label148.AutoSize = true; - this.label148.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label148.Location = new System.Drawing.Point(17, 192); - this.label148.Name = "label148"; - this.label148.Size = new System.Drawing.Size(140, 16); - this.label148.TabIndex = 12; - this.label148.Text = "Shake Minimum Offset"; - // - // txtshakemax - // - this.txtshakemax.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtshakemax.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.txtshakemax.Location = new System.Drawing.Point(167, 159); - this.txtshakemax.Name = "txtshakemax"; - this.txtshakemax.Size = new System.Drawing.Size(35, 23); - this.txtshakemax.TabIndex = 11; - this.txtshakemax.TextChanged += new System.EventHandler(this.txtshakemax_TextChanged); - // - // label146 - // - this.label146.AutoSize = true; - this.label146.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label146.Location = new System.Drawing.Point(17, 162); - this.label146.Name = "label146"; - this.label146.Size = new System.Drawing.Size(144, 16); - this.label146.TabIndex = 10; - this.label146.Text = "Shake Maximum Offset"; - // - // txtdragopacitydec - // - this.txtdragopacitydec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtdragopacitydec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.txtdragopacitydec.Location = new System.Drawing.Point(104, 116); - this.txtdragopacitydec.Name = "txtdragopacitydec"; - this.txtdragopacitydec.Size = new System.Drawing.Size(35, 23); - this.txtdragopacitydec.TabIndex = 9; - this.txtdragopacitydec.TextChanged += new System.EventHandler(this.txtdragopacitydec_TextChanged); - // - // label144 - // - this.label144.AutoSize = true; - this.label144.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label144.Location = new System.Drawing.Point(18, 119); - this.label144.Name = "label144"; - this.label144.Size = new System.Drawing.Size(85, 16); - this.label144.TabIndex = 8; - this.label144.Text = "Opacity Dec."; - // - // txtdragfadedec - // - this.txtdragfadedec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtdragfadedec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.txtdragfadedec.Location = new System.Drawing.Point(89, 88); - this.txtdragfadedec.Name = "txtdragfadedec"; - this.txtdragfadedec.Size = new System.Drawing.Size(35, 23); - this.txtdragfadedec.TabIndex = 7; - this.txtdragfadedec.TextChanged += new System.EventHandler(this.txtdragfadedec_TextChanged); - // - // label143 - // - this.label143.AutoSize = true; - this.label143.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label143.Location = new System.Drawing.Point(17, 90); - this.label143.Name = "label143"; - this.label143.Size = new System.Drawing.Size(71, 16); - this.label143.TabIndex = 6; - this.label143.Text = "Fade Dec."; - // - // txtfadespeed - // - this.txtfadespeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtfadespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.txtfadespeed.Location = new System.Drawing.Point(114, 54); - this.txtfadespeed.Name = "txtfadespeed"; - this.txtfadespeed.Size = new System.Drawing.Size(35, 23); - this.txtfadespeed.TabIndex = 5; - this.txtfadespeed.TextChanged += new System.EventHandler(this.txtfadespeed_TextChanged); - // - // label155 - // - this.label155.AutoSize = true; - this.label155.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label155.Location = new System.Drawing.Point(18, 58); - this.label155.Name = "label155"; - this.label155.Size = new System.Drawing.Size(84, 16); - this.label155.TabIndex = 4; - this.label155.Text = "Fade Speed"; - // - // label156 - // - this.label156.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label156.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label156.Location = new System.Drawing.Point(6, 0); - this.label156.Name = "label156"; - this.label156.Size = new System.Drawing.Size(301, 29); - this.label156.TabIndex = 1; - this.label156.Text = "Fancy Dragging"; - this.label156.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pnlfancyintro - // - this.pnlfancyintro.Controls.Add(this.label174); - this.pnlfancyintro.Controls.Add(this.label175); - this.pnlfancyintro.Location = new System.Drawing.Point(139, 43); - this.pnlfancyintro.Name = "pnlfancyintro"; - this.pnlfancyintro.Size = new System.Drawing.Size(311, 256); - this.pnlfancyintro.TabIndex = 11; - // - // label174 - // - this.label174.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label174.BackColor = System.Drawing.Color.Transparent; - this.label174.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label174.Location = new System.Drawing.Point(6, 29); - this.label174.Name = "label174"; - this.label174.Size = new System.Drawing.Size(300, 221); - this.label174.TabIndex = 4; - this.label174.Text = "This section allows you to customize various Fancy Effects throughout ShiftOS suc" + - "h as animations, speeds, etc.\r\n\r\nGo ahead and explore!"; - this.label174.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label175 - // - this.label175.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label175.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label175.Location = new System.Drawing.Point(6, 0); - this.label175.Name = "label175"; - this.label175.Size = new System.Drawing.Size(301, 29); - this.label175.TabIndex = 1; - this.label175.Text = "Fancy Effects - Intro"; - this.label175.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // panel18 - // - this.panel18.Controls.Add(this.panel19); - this.panel18.Controls.Add(this.label157); - this.panel18.Controls.Add(this.panel20); - this.panel18.Controls.Add(this.label158); - this.panel18.Controls.Add(this.panel21); - this.panel18.Controls.Add(this.label159); - this.panel18.Controls.Add(this.panel22); - this.panel18.Controls.Add(this.label160); - this.panel18.Controls.Add(this.panel23); - this.panel18.Controls.Add(this.label161); - this.panel18.Controls.Add(this.panel24); - this.panel18.Controls.Add(this.label162); - this.panel18.Controls.Add(this.label163); - this.panel18.Location = new System.Drawing.Point(139, 43); - this.panel18.Name = "panel18"; - this.panel18.Size = new System.Drawing.Size(311, 256); - this.panel18.TabIndex = 12; - // - // panel19 - // - this.panel19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel19.Location = new System.Drawing.Point(216, 80); - this.panel19.Name = "panel19"; - this.panel19.Size = new System.Drawing.Size(41, 20); - this.panel19.TabIndex = 11; - // - // label157 - // - this.label157.AutoSize = true; - this.label157.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label157.Location = new System.Drawing.Point(167, 81); - this.label157.Name = "label157"; - this.label157.Size = new System.Drawing.Size(49, 16); - this.label157.TabIndex = 10; - this.label157.Text = "Border"; - // - // panel20 - // - this.panel20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel20.Location = new System.Drawing.Point(224, 55); - this.panel20.Name = "panel20"; - this.panel20.Size = new System.Drawing.Size(41, 20); - this.panel20.TabIndex = 9; - // - // label158 - // - this.label158.AutoSize = true; - this.label158.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label158.Location = new System.Drawing.Point(148, 56); - this.label158.Name = "label158"; - this.label158.Size = new System.Drawing.Size(76, 16); - this.label158.TabIndex = 8; - this.label158.Text = "Margin End"; - // - // panel21 - // - this.panel21.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel21.Location = new System.Drawing.Point(117, 80); - this.panel21.Name = "panel21"; - this.panel21.Size = new System.Drawing.Size(41, 20); - this.panel21.TabIndex = 7; - // - // label159 - // - this.label159.AutoSize = true; - this.label159.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label159.Location = new System.Drawing.Point(12, 80); - this.label159.Name = "label159"; - this.label159.Size = new System.Drawing.Size(93, 16); - this.label159.TabIndex = 6; - this.label159.Text = "Margin Middle"; - // - // panel22 - // - this.panel22.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel22.Location = new System.Drawing.Point(101, 55); - this.panel22.Name = "panel22"; - this.panel22.Size = new System.Drawing.Size(41, 20); - this.panel22.TabIndex = 5; - // - // label160 - // - this.label160.AutoSize = true; - this.label160.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label160.Location = new System.Drawing.Point(12, 55); - this.label160.Name = "label160"; - this.label160.Size = new System.Drawing.Size(87, 16); - this.label160.TabIndex = 4; - this.label160.Text = "Margin Begin"; - // - // panel23 - // - this.panel23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel23.Location = new System.Drawing.Point(249, 29); - this.panel23.Name = "panel23"; - this.panel23.Size = new System.Drawing.Size(41, 20); - this.panel23.TabIndex = 5; - // - // label161 - // - this.label161.AutoSize = true; - this.label161.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label161.Location = new System.Drawing.Point(156, 29); - this.label161.Name = "label161"; - this.label161.Size = new System.Drawing.Size(95, 16); - this.label161.TabIndex = 4; - this.label161.Text = "Highlight Color"; - // - // panel24 - // - this.panel24.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel24.Location = new System.Drawing.Point(115, 29); - this.panel24.Name = "panel24"; - this.panel24.Size = new System.Drawing.Size(41, 20); - this.panel24.TabIndex = 3; - // - // label162 - // - this.label162.AutoSize = true; - this.label162.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label162.Location = new System.Drawing.Point(10, 29); - this.label162.Name = "label162"; - this.label162.Size = new System.Drawing.Size(104, 16); - this.label162.TabIndex = 2; - this.label162.Text = "Highlight Border"; - // - // label163 - // - this.label163.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label163.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label163.Location = new System.Drawing.Point(6, 0); - this.label163.Name = "label163"; - this.label163.Size = new System.Drawing.Size(301, 29); - this.label163.TabIndex = 1; - this.label163.Text = "Drop-Down Menus"; - this.label163.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // panel25 - // - this.panel25.Controls.Add(this.panel26); - this.panel25.Controls.Add(this.label164); - this.panel25.Controls.Add(this.panel27); - this.panel25.Controls.Add(this.label165); - this.panel25.Controls.Add(this.panel28); - this.panel25.Controls.Add(this.label166); - this.panel25.Controls.Add(this.panel29); - this.panel25.Controls.Add(this.label167); - this.panel25.Controls.Add(this.panel30); - this.panel25.Controls.Add(this.label168); - this.panel25.Controls.Add(this.panel31); - this.panel25.Controls.Add(this.label169); - this.panel25.Controls.Add(this.panel32); - this.panel25.Controls.Add(this.label170); - this.panel25.Controls.Add(this.panel33); - this.panel25.Controls.Add(this.label171); - this.panel25.Controls.Add(this.panel34); - this.panel25.Controls.Add(this.label172); - this.panel25.Controls.Add(this.label173); - this.panel25.Location = new System.Drawing.Point(139, 43); - this.panel25.Name = "panel25"; - this.panel25.Size = new System.Drawing.Size(311, 256); - this.panel25.TabIndex = 10; - // - // panel26 - // - this.panel26.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel26.Location = new System.Drawing.Point(85, 129); - this.panel26.Name = "panel26"; - this.panel26.Size = new System.Drawing.Size(41, 20); - this.panel26.TabIndex = 17; - // - // label164 - // - this.label164.AutoSize = true; - this.label164.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label164.Location = new System.Drawing.Point(11, 131); - this.label164.Name = "label164"; - this.label164.Size = new System.Drawing.Size(69, 16); - this.label164.TabIndex = 16; - this.label164.Text = "Text Color"; - // - // panel27 - // - this.panel27.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel27.Location = new System.Drawing.Point(228, 104); - this.panel27.Name = "panel27"; - this.panel27.Size = new System.Drawing.Size(41, 20); - this.panel27.TabIndex = 15; - // - // label165 - // - this.label165.AutoSize = true; - this.label165.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label165.Location = new System.Drawing.Point(132, 106); - this.label165.Name = "label165"; - this.label165.Size = new System.Drawing.Size(92, 16); - this.label165.TabIndex = 14; - this.label165.Text = "Dropdown BG"; - // - // panel28 - // - this.panel28.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel28.Location = new System.Drawing.Point(84, 104); - this.panel28.Name = "panel28"; - this.panel28.Size = new System.Drawing.Size(41, 20); - this.panel28.TabIndex = 13; - // - // label166 - // - this.label166.AutoSize = true; - this.label166.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label166.Location = new System.Drawing.Point(10, 106); - this.label166.Name = "label166"; - this.label166.Size = new System.Drawing.Size(72, 16); - this.label166.TabIndex = 12; - this.label166.Text = "Status End"; - // - // panel29 - // - this.panel29.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel29.Location = new System.Drawing.Point(254, 81); - this.panel29.Name = "panel29"; - this.panel29.Size = new System.Drawing.Size(41, 20); - this.panel29.TabIndex = 11; - // - // label167 - // - this.label167.AutoSize = true; - this.label167.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label167.Location = new System.Drawing.Point(169, 81); - this.label167.Name = "label167"; - this.label167.Size = new System.Drawing.Size(83, 16); - this.label167.TabIndex = 10; - this.label167.Text = "Status Begin"; - // - // panel30 - // - this.panel30.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel30.Location = new System.Drawing.Point(254, 55); - this.panel30.Name = "panel30"; - this.panel30.Size = new System.Drawing.Size(41, 20); - this.panel30.TabIndex = 9; - // - // label168 - // - this.label168.AutoSize = true; - this.label168.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label168.Location = new System.Drawing.Point(161, 55); - this.label168.Name = "label168"; - this.label168.Size = new System.Drawing.Size(87, 16); - this.label168.TabIndex = 8; - this.label168.Text = "Tool Bar End"; - // - // panel31 - // - this.panel31.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel31.Location = new System.Drawing.Point(117, 80); - this.panel31.Name = "panel31"; - this.panel31.Size = new System.Drawing.Size(41, 20); - this.panel31.TabIndex = 7; - // - // label169 - // - this.label169.AutoSize = true; - this.label169.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label169.Location = new System.Drawing.Point(12, 80); - this.label169.Name = "label169"; - this.label169.Size = new System.Drawing.Size(104, 16); - this.label169.TabIndex = 6; - this.label169.Text = "Tool Bar Middle"; - // - // panel32 - // - this.panel32.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel32.Location = new System.Drawing.Point(117, 55); - this.panel32.Name = "panel32"; - this.panel32.Size = new System.Drawing.Size(41, 20); - this.panel32.TabIndex = 5; - // - // label170 - // - this.label170.AutoSize = true; - this.label170.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label170.Location = new System.Drawing.Point(12, 55); - this.label170.Name = "label170"; - this.label170.Size = new System.Drawing.Size(98, 16); - this.label170.TabIndex = 4; - this.label170.Text = "Tool Bar Begin"; - // - // panel33 - // - this.panel33.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel33.Location = new System.Drawing.Point(249, 29); - this.panel33.Name = "panel33"; - this.panel33.Size = new System.Drawing.Size(41, 20); - this.panel33.TabIndex = 5; - // - // label171 - // - this.label171.AutoSize = true; - this.label171.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label171.Location = new System.Drawing.Point(156, 29); - this.label171.Name = "label171"; - this.label171.Size = new System.Drawing.Size(92, 16); - this.label171.TabIndex = 4; - this.label171.Text = "Menu Bar End"; - // - // panel34 - // - this.panel34.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel34.Location = new System.Drawing.Point(115, 29); - this.panel34.Name = "panel34"; - this.panel34.Size = new System.Drawing.Size(41, 20); - this.panel34.TabIndex = 3; - // - // label172 - // - this.label172.AutoSize = true; - this.label172.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label172.Location = new System.Drawing.Point(10, 29); - this.label172.Name = "label172"; - this.label172.Size = new System.Drawing.Size(103, 16); - this.label172.TabIndex = 2; - this.label172.Text = "Menu Bar Begin"; - // - // label173 - // - this.label173.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label173.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label173.Location = new System.Drawing.Point(6, 0); - this.label173.Name = "label173"; - this.label173.Size = new System.Drawing.Size(301, 29); - this.label173.TabIndex = 1; - this.label173.Text = "The Basics"; - this.label173.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // panel36 - // - this.panel36.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.panel36.Controls.Add(this.btnfancydragging); - this.panel36.Controls.Add(this.btnfancywindows); - this.panel36.Location = new System.Drawing.Point(6, 42); - this.panel36.Name = "panel36"; - this.panel36.Size = new System.Drawing.Size(128, 257); - this.panel36.TabIndex = 9; - // - // btnfancydragging - // - this.btnfancydragging.BackColor = System.Drawing.Color.White; - this.btnfancydragging.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnfancydragging.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnfancydragging.Location = new System.Drawing.Point(4, 35); - this.btnfancydragging.Name = "btnfancydragging"; - this.btnfancydragging.Size = new System.Drawing.Size(119, 29); - this.btnfancydragging.TabIndex = 5; - this.btnfancydragging.Text = "Fancy Dragging"; - this.btnfancydragging.UseVisualStyleBackColor = false; - this.btnfancydragging.Click += new System.EventHandler(this.btnfancydragging_Click); - // - // btnfancywindows - // - this.btnfancywindows.BackColor = System.Drawing.Color.White; - this.btnfancywindows.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnfancywindows.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnfancywindows.Location = new System.Drawing.Point(4, 0); - this.btnfancywindows.Name = "btnfancywindows"; - this.btnfancywindows.Size = new System.Drawing.Size(119, 29); - this.btnfancywindows.TabIndex = 4; - this.btnfancywindows.Text = "Animations"; - this.btnfancywindows.UseVisualStyleBackColor = false; - this.btnfancywindows.Click += new System.EventHandler(this.btnfancywindows_Click); - // - // label176 - // - this.label176.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label176.Location = new System.Drawing.Point(72, 0); - this.label176.Name = "label176"; - this.label176.Size = new System.Drawing.Size(332, 29); - this.label176.TabIndex = 0; - this.label176.Text = "Fancy Effects"; - // - // pnlmenus - // - this.pnlmenus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlmenus.BackColor = System.Drawing.Color.White; - this.pnlmenus.Controls.Add(this.pnladvanced); - this.pnlmenus.Controls.Add(this.pnlmore); - this.pnlmenus.Controls.Add(this.pnldropdown); - this.pnlmenus.Controls.Add(this.pnlbasic); - this.pnlmenus.Controls.Add(this.pnlmenusintro); - this.pnlmenus.Controls.Add(this.pnlmenucategories); - this.pnlmenus.Controls.Add(this.label74); - this.pnlmenus.Location = new System.Drawing.Point(134, 9); - this.pnlmenus.Name = "pnlmenus"; - this.pnlmenus.Size = new System.Drawing.Size(457, 306); - this.pnlmenus.TabIndex = 19; - // - // pnladvanced - // - this.pnladvanced.Controls.Add(this.btnmorebuttons); - this.pnladvanced.Controls.Add(this.pnlbuttonchecked); - this.pnladvanced.Controls.Add(this.label136); - this.pnladvanced.Controls.Add(this.pnlitemselectedend); - this.pnladvanced.Controls.Add(this.label129); - this.pnladvanced.Controls.Add(this.pnlbuttonpressed); - this.pnladvanced.Controls.Add(this.label130); - this.pnladvanced.Controls.Add(this.pnlitemselectedbegin); - this.pnladvanced.Controls.Add(this.label131); - this.pnladvanced.Controls.Add(this.pnlitemselected); - this.pnladvanced.Controls.Add(this.label132); - this.pnladvanced.Controls.Add(this.pnlbuttonselected); - this.pnladvanced.Controls.Add(this.label133); - this.pnladvanced.Controls.Add(this.pnlcheckbg); - this.pnladvanced.Controls.Add(this.label134); - this.pnladvanced.Controls.Add(this.label135); - this.pnladvanced.Location = new System.Drawing.Point(139, 43); - this.pnladvanced.Name = "pnladvanced"; - this.pnladvanced.Size = new System.Drawing.Size(311, 256); - this.pnladvanced.TabIndex = 13; - // - // btnmorebuttons - // - this.btnmorebuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnmorebuttons.Font = new System.Drawing.Font("Cambria", 11.25F); - this.btnmorebuttons.Location = new System.Drawing.Point(216, 195); - this.btnmorebuttons.Name = "btnmorebuttons"; - this.btnmorebuttons.Size = new System.Drawing.Size(90, 32); - this.btnmorebuttons.TabIndex = 18; - this.btnmorebuttons.Text = "More >>"; - this.btnmorebuttons.UseVisualStyleBackColor = true; - this.btnmorebuttons.Click += new System.EventHandler(this.btnmorebuttons_Click); - // - // pnlbuttonchecked - // - this.pnlbuttonchecked.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbuttonchecked.Location = new System.Drawing.Point(115, 153); - this.pnlbuttonchecked.Name = "pnlbuttonchecked"; - this.pnlbuttonchecked.Size = new System.Drawing.Size(41, 20); - this.pnlbuttonchecked.TabIndex = 11; - this.pnlbuttonchecked.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonCheckBG); - // - // label136 - // - this.label136.AutoSize = true; - this.label136.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label136.Location = new System.Drawing.Point(10, 153); - this.label136.Name = "label136"; - this.label136.Size = new System.Drawing.Size(102, 16); - this.label136.TabIndex = 10; - this.label136.Text = "Button Checked"; - // - // pnlitemselectedend - // - this.pnlitemselectedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlitemselectedend.Location = new System.Drawing.Point(134, 83); - this.pnlitemselectedend.Name = "pnlitemselectedend"; - this.pnlitemselectedend.Size = new System.Drawing.Size(41, 20); - this.pnlitemselectedend.TabIndex = 11; - this.pnlitemselectedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelectedEnd); - // - // label129 - // - this.label129.AutoSize = true; - this.label129.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label129.Location = new System.Drawing.Point(12, 85); - this.label129.Name = "label129"; - this.label129.Size = new System.Drawing.Size(117, 16); - this.label129.TabIndex = 10; - this.label129.Text = "Item Selected End"; - // - // pnlbuttonpressed - // - this.pnlbuttonpressed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbuttonpressed.Location = new System.Drawing.Point(117, 207); - this.pnlbuttonpressed.Name = "pnlbuttonpressed"; - this.pnlbuttonpressed.Size = new System.Drawing.Size(41, 20); - this.pnlbuttonpressed.TabIndex = 9; - this.pnlbuttonpressed.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonPressedBG); - // - // label130 - // - this.label130.AutoSize = true; - this.label130.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label130.Location = new System.Drawing.Point(12, 207); - this.label130.Name = "label130"; - this.label130.Size = new System.Drawing.Size(99, 16); - this.label130.TabIndex = 8; - this.label130.Text = "Button Pressed"; - // - // pnlitemselectedbegin - // - this.pnlitemselectedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlitemselectedbegin.Location = new System.Drawing.Point(143, 56); - this.pnlitemselectedbegin.Name = "pnlitemselectedbegin"; - this.pnlitemselectedbegin.Size = new System.Drawing.Size(41, 20); - this.pnlitemselectedbegin.TabIndex = 7; - this.pnlitemselectedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelectedBegin); - // - // label131 - // - this.label131.AutoSize = true; - this.label131.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label131.Location = new System.Drawing.Point(10, 58); - this.label131.Name = "label131"; - this.label131.Size = new System.Drawing.Size(128, 16); - this.label131.TabIndex = 6; - this.label131.Text = "Item Selected Begin"; - // - // pnlitemselected - // - this.pnlitemselected.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlitemselected.Location = new System.Drawing.Point(240, 29); - this.pnlitemselected.Name = "pnlitemselected"; - this.pnlitemselected.Size = new System.Drawing.Size(41, 20); - this.pnlitemselected.TabIndex = 5; - this.pnlitemselected.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelected); - // - // label132 - // - this.label132.AutoSize = true; - this.label132.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label132.Location = new System.Drawing.Point(147, 32); - this.label132.Name = "label132"; - this.label132.Size = new System.Drawing.Size(90, 16); - this.label132.TabIndex = 4; - this.label132.Text = "Item Selected"; - // - // pnlbuttonselected - // - this.pnlbuttonselected.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlbuttonselected.Location = new System.Drawing.Point(110, 181); - this.pnlbuttonselected.Name = "pnlbuttonselected"; - this.pnlbuttonselected.Size = new System.Drawing.Size(41, 20); - this.pnlbuttonselected.TabIndex = 5; - this.pnlbuttonselected.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonSelectedBG); - // - // label133 - // - this.label133.AutoSize = true; - this.label133.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label133.Location = new System.Drawing.Point(7, 181); - this.label133.Name = "label133"; - this.label133.Size = new System.Drawing.Size(102, 16); - this.label133.TabIndex = 4; - this.label133.Text = "Button Selected"; - // - // pnlcheckbg - // - this.pnlcheckbg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlcheckbg.Location = new System.Drawing.Point(79, 29); - this.pnlcheckbg.Name = "pnlcheckbg"; - this.pnlcheckbg.Size = new System.Drawing.Size(41, 20); - this.pnlcheckbg.TabIndex = 3; - this.pnlcheckbg.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetCheckBG); - // - // label134 - // - this.label134.AutoSize = true; - this.label134.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label134.Location = new System.Drawing.Point(10, 29); - this.label134.Name = "label134"; - this.label134.Size = new System.Drawing.Size(68, 16); - this.label134.TabIndex = 2; - this.label134.Text = "Check BG"; - // - // label135 - // - this.label135.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label135.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label135.Location = new System.Drawing.Point(6, 0); - this.label135.Name = "label135"; - this.label135.Size = new System.Drawing.Size(301, 29); - this.label135.TabIndex = 1; - this.label135.Text = "Advanced"; - this.label135.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pnlmore - // - this.pnlmore.Controls.Add(this.pnlpressedbegin); - this.pnlmore.Controls.Add(this.btnback); - this.pnlmore.Controls.Add(this.label138); - this.pnlmore.Controls.Add(this.pnlselectedbegin); - this.pnlmore.Controls.Add(this.pnlpressedend); - this.pnlmore.Controls.Add(this.label137); - this.pnlmore.Controls.Add(this.label139); - this.pnlmore.Controls.Add(this.pnlselectedend); - this.pnlmore.Controls.Add(this.pnlpressedmiddle); - this.pnlmore.Controls.Add(this.label140); - this.pnlmore.Controls.Add(this.label142); - this.pnlmore.Controls.Add(this.pnlselectedmiddle); - this.pnlmore.Controls.Add(this.label145); - this.pnlmore.Controls.Add(this.label147); - this.pnlmore.Location = new System.Drawing.Point(139, 43); - this.pnlmore.Name = "pnlmore"; - this.pnlmore.Size = new System.Drawing.Size(311, 256); - this.pnlmore.TabIndex = 14; - // - // pnlpressedbegin - // - this.pnlpressedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpressedbegin.Location = new System.Drawing.Point(170, 107); - this.pnlpressedbegin.Name = "pnlpressedbegin"; - this.pnlpressedbegin.Size = new System.Drawing.Size(41, 20); - this.pnlpressedbegin.TabIndex = 17; - this.pnlpressedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedBegin); - // - // btnback - // - this.btnback.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnback.Font = new System.Drawing.Font("Cambria", 11.25F); - this.btnback.Location = new System.Drawing.Point(6, 184); - this.btnback.Name = "btnback"; - this.btnback.Size = new System.Drawing.Size(90, 32); - this.btnback.TabIndex = 18; - this.btnback.Text = "<< Back"; - this.btnback.UseVisualStyleBackColor = true; - this.btnback.Click += new System.EventHandler(this.btnadvanced_Click); - // - // label138 - // - this.label138.AutoSize = true; - this.label138.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label138.Location = new System.Drawing.Point(13, 108); - this.label138.Name = "label138"; - this.label138.Size = new System.Drawing.Size(151, 16); - this.label138.TabIndex = 16; - this.label138.Text = "Pressed Gradient Begin"; - // - // pnlselectedbegin - // - this.pnlselectedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlselectedbegin.Location = new System.Drawing.Point(169, 29); - this.pnlselectedbegin.Name = "pnlselectedbegin"; - this.pnlselectedbegin.Size = new System.Drawing.Size(41, 20); - this.pnlselectedbegin.TabIndex = 11; - this.pnlselectedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedBegin); - // - // pnlpressedend - // - this.pnlpressedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpressedend.Location = new System.Drawing.Point(162, 159); - this.pnlpressedend.Name = "pnlpressedend"; - this.pnlpressedend.Size = new System.Drawing.Size(41, 20); - this.pnlpressedend.TabIndex = 15; - this.pnlpressedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedEnd); - // - // label137 - // - this.label137.AutoSize = true; - this.label137.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label137.Location = new System.Drawing.Point(12, 30); - this.label137.Name = "label137"; - this.label137.Size = new System.Drawing.Size(154, 16); - this.label137.TabIndex = 10; - this.label137.Text = "Selected Gradient Begin"; - // - // label139 - // - this.label139.AutoSize = true; - this.label139.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label139.Location = new System.Drawing.Point(15, 162); - this.label139.Name = "label139"; - this.label139.Size = new System.Drawing.Size(140, 16); - this.label139.TabIndex = 14; - this.label139.Text = "Pressed Gradient End"; - // - // pnlselectedend - // - this.pnlselectedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlselectedend.Location = new System.Drawing.Point(161, 81); - this.pnlselectedend.Name = "pnlselectedend"; - this.pnlselectedend.Size = new System.Drawing.Size(41, 20); - this.pnlselectedend.TabIndex = 9; - this.pnlselectedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedEnd); - // - // pnlpressedmiddle - // - this.pnlpressedmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlpressedmiddle.Location = new System.Drawing.Point(179, 134); - this.pnlpressedmiddle.Name = "pnlpressedmiddle"; - this.pnlpressedmiddle.Size = new System.Drawing.Size(41, 20); - this.pnlpressedmiddle.TabIndex = 13; - this.pnlpressedmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedMiddle); - // - // label140 - // - this.label140.AutoSize = true; - this.label140.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label140.Location = new System.Drawing.Point(16, 138); - this.label140.Name = "label140"; - this.label140.Size = new System.Drawing.Size(157, 16); - this.label140.TabIndex = 12; - this.label140.Text = "Pressed Gradient Middle"; - // - // label142 - // - this.label142.AutoSize = true; - this.label142.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label142.Location = new System.Drawing.Point(14, 84); - this.label142.Name = "label142"; - this.label142.Size = new System.Drawing.Size(143, 16); - this.label142.TabIndex = 8; - this.label142.Text = "Selected Gradient End"; - // - // pnlselectedmiddle - // - this.pnlselectedmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlselectedmiddle.Location = new System.Drawing.Point(182, 56); - this.pnlselectedmiddle.Name = "pnlselectedmiddle"; - this.pnlselectedmiddle.Size = new System.Drawing.Size(41, 20); - this.pnlselectedmiddle.TabIndex = 5; - this.pnlselectedmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedMiddle); - // - // label145 - // - this.label145.AutoSize = true; - this.label145.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label145.Location = new System.Drawing.Point(18, 58); - this.label145.Name = "label145"; - this.label145.Size = new System.Drawing.Size(160, 16); - this.label145.TabIndex = 4; - this.label145.Text = "Selected Gradient Middle"; - // - // label147 - // - this.label147.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label147.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label147.Location = new System.Drawing.Point(6, 0); - this.label147.Name = "label147"; - this.label147.Size = new System.Drawing.Size(301, 29); - this.label147.TabIndex = 1; - this.label147.Text = "Advanced"; - this.label147.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pnldropdown - // - this.pnldropdown.Controls.Add(this.pnlddborder); - this.pnldropdown.Controls.Add(this.label117); - this.pnldropdown.Controls.Add(this.pnlmarginend); - this.pnldropdown.Controls.Add(this.label120); - this.pnldropdown.Controls.Add(this.pnlmarginmiddle); - this.pnldropdown.Controls.Add(this.label121); - this.pnldropdown.Controls.Add(this.pnlmarginbegin); - this.pnldropdown.Controls.Add(this.label122); - this.pnldropdown.Controls.Add(this.pnlhcolor); - this.pnldropdown.Controls.Add(this.label123); - this.pnldropdown.Controls.Add(this.pnlhborder); - this.pnldropdown.Controls.Add(this.label125); - this.pnldropdown.Controls.Add(this.label126); - this.pnldropdown.Location = new System.Drawing.Point(139, 43); - this.pnldropdown.Name = "pnldropdown"; - this.pnldropdown.Size = new System.Drawing.Size(311, 256); - this.pnldropdown.TabIndex = 12; - // - // pnlddborder - // - this.pnlddborder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlddborder.Location = new System.Drawing.Point(216, 80); - this.pnlddborder.Name = "pnlddborder"; - this.pnlddborder.Size = new System.Drawing.Size(41, 20); - this.pnlddborder.TabIndex = 11; - this.pnlddborder.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuBorder); - // - // label117 - // - this.label117.AutoSize = true; - this.label117.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label117.Location = new System.Drawing.Point(167, 81); - this.label117.Name = "label117"; - this.label117.Size = new System.Drawing.Size(49, 16); - this.label117.TabIndex = 10; - this.label117.Text = "Border"; - // - // pnlmarginend - // - this.pnlmarginend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmarginend.Location = new System.Drawing.Point(224, 55); - this.pnlmarginend.Name = "pnlmarginend"; - this.pnlmarginend.Size = new System.Drawing.Size(41, 20); - this.pnlmarginend.TabIndex = 9; - this.pnlmarginend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginEnd); - // - // label120 - // - this.label120.AutoSize = true; - this.label120.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label120.Location = new System.Drawing.Point(148, 56); - this.label120.Name = "label120"; - this.label120.Size = new System.Drawing.Size(76, 16); - this.label120.TabIndex = 8; - this.label120.Text = "Margin End"; - // - // pnlmarginmiddle - // - this.pnlmarginmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmarginmiddle.Location = new System.Drawing.Point(117, 80); - this.pnlmarginmiddle.Name = "pnlmarginmiddle"; - this.pnlmarginmiddle.Size = new System.Drawing.Size(41, 20); - this.pnlmarginmiddle.TabIndex = 7; - this.pnlmarginmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginMiddle); - // - // label121 - // - this.label121.AutoSize = true; - this.label121.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label121.Location = new System.Drawing.Point(12, 80); - this.label121.Name = "label121"; - this.label121.Size = new System.Drawing.Size(93, 16); - this.label121.TabIndex = 6; - this.label121.Text = "Margin Middle"; - // - // pnlmarginbegin - // - this.pnlmarginbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmarginbegin.Location = new System.Drawing.Point(101, 55); - this.pnlmarginbegin.Name = "pnlmarginbegin"; - this.pnlmarginbegin.Size = new System.Drawing.Size(41, 20); - this.pnlmarginbegin.TabIndex = 5; - this.pnlmarginbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginBegin); - // - // label122 - // - this.label122.AutoSize = true; - this.label122.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label122.Location = new System.Drawing.Point(12, 55); - this.label122.Name = "label122"; - this.label122.Size = new System.Drawing.Size(87, 16); - this.label122.TabIndex = 4; - this.label122.Text = "Margin Begin"; - // - // pnlhcolor - // - this.pnlhcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlhcolor.Location = new System.Drawing.Point(249, 29); - this.pnlhcolor.Name = "pnlhcolor"; - this.pnlhcolor.Size = new System.Drawing.Size(41, 20); - this.pnlhcolor.TabIndex = 5; - this.pnlhcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.HighlightColor); - // - // label123 - // - this.label123.AutoSize = true; - this.label123.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label123.Location = new System.Drawing.Point(156, 29); - this.label123.Name = "label123"; - this.label123.Size = new System.Drawing.Size(95, 16); - this.label123.TabIndex = 4; - this.label123.Text = "Highlight Color"; - // - // pnlhborder - // - this.pnlhborder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlhborder.Location = new System.Drawing.Point(115, 29); - this.pnlhborder.Name = "pnlhborder"; - this.pnlhborder.Size = new System.Drawing.Size(41, 20); - this.pnlhborder.TabIndex = 3; - this.pnlhborder.MouseDown += new System.Windows.Forms.MouseEventHandler(this.HighlightBorder); - // - // label125 - // - this.label125.AutoSize = true; - this.label125.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label125.Location = new System.Drawing.Point(10, 29); - this.label125.Name = "label125"; - this.label125.Size = new System.Drawing.Size(104, 16); - this.label125.TabIndex = 2; - this.label125.Text = "Highlight Border"; - // - // label126 - // - this.label126.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label126.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label126.Location = new System.Drawing.Point(6, 0); - this.label126.Name = "label126"; - this.label126.Size = new System.Drawing.Size(301, 29); - this.label126.TabIndex = 1; - this.label126.Text = "Drop-Down Menus"; - this.label126.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pnlbasic - // - this.pnlbasic.Controls.Add(this.pnlmenutextcolor); - this.pnlbasic.Controls.Add(this.label118); - this.pnlbasic.Controls.Add(this.pnldropdownbg); - this.pnlbasic.Controls.Add(this.label115); - this.pnlbasic.Controls.Add(this.pnlstatusend); - this.pnlbasic.Controls.Add(this.label114); - this.pnlbasic.Controls.Add(this.pnlstatusbegin); - this.pnlbasic.Controls.Add(this.label107); - this.pnlbasic.Controls.Add(this.pnltoolbarend); - this.pnlbasic.Controls.Add(this.label77); - this.pnlbasic.Controls.Add(this.pnltoolbarmiddle); - this.pnlbasic.Controls.Add(this.label76); - this.pnlbasic.Controls.Add(this.pnltoolbarbegin); - this.pnlbasic.Controls.Add(this.label75); - this.pnlbasic.Controls.Add(this.pnlmenubarend); - this.pnlbasic.Controls.Add(this.label73); - this.pnlbasic.Controls.Add(this.pnlmenubarbegin); - this.pnlbasic.Controls.Add(this.label42); - this.pnlbasic.Controls.Add(this.label41); - this.pnlbasic.Location = new System.Drawing.Point(139, 43); - this.pnlbasic.Name = "pnlbasic"; - this.pnlbasic.Size = new System.Drawing.Size(311, 256); - this.pnlbasic.TabIndex = 10; - // - // pnlmenutextcolor - // - this.pnlmenutextcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmenutextcolor.Location = new System.Drawing.Point(85, 129); - this.pnlmenutextcolor.Name = "pnlmenutextcolor"; - this.pnlmenutextcolor.Size = new System.Drawing.Size(41, 20); - this.pnlmenutextcolor.TabIndex = 17; - this.pnlmenutextcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetMenuTextColor); - // - // label118 - // - this.label118.AutoSize = true; - this.label118.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label118.Location = new System.Drawing.Point(11, 131); - this.label118.Name = "label118"; - this.label118.Size = new System.Drawing.Size(69, 16); - this.label118.TabIndex = 16; - this.label118.Text = "Text Color"; - // - // pnldropdownbg - // - this.pnldropdownbg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnldropdownbg.Location = new System.Drawing.Point(228, 104); - this.pnldropdownbg.Name = "pnldropdownbg"; - this.pnldropdownbg.Size = new System.Drawing.Size(41, 20); - this.pnldropdownbg.TabIndex = 15; - this.pnldropdownbg.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DropDownBG); - // - // label115 - // - this.label115.AutoSize = true; - this.label115.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label115.Location = new System.Drawing.Point(132, 106); - this.label115.Name = "label115"; - this.label115.Size = new System.Drawing.Size(92, 16); - this.label115.TabIndex = 14; - this.label115.Text = "Dropdown BG"; - // - // pnlstatusend - // - this.pnlstatusend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlstatusend.Location = new System.Drawing.Point(84, 104); - this.pnlstatusend.Name = "pnlstatusend"; - this.pnlstatusend.Size = new System.Drawing.Size(41, 20); - this.pnlstatusend.TabIndex = 13; - this.pnlstatusend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.StatusEnd); - // - // label114 - // - this.label114.AutoSize = true; - this.label114.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label114.Location = new System.Drawing.Point(10, 106); - this.label114.Name = "label114"; - this.label114.Size = new System.Drawing.Size(72, 16); - this.label114.TabIndex = 12; - this.label114.Text = "Status End"; - // - // pnlstatusbegin - // - this.pnlstatusbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlstatusbegin.Location = new System.Drawing.Point(254, 81); - this.pnlstatusbegin.Name = "pnlstatusbegin"; - this.pnlstatusbegin.Size = new System.Drawing.Size(41, 20); - this.pnlstatusbegin.TabIndex = 11; - this.pnlstatusbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.StatusBegin); - // - // label107 - // - this.label107.AutoSize = true; - this.label107.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label107.Location = new System.Drawing.Point(169, 81); - this.label107.Name = "label107"; - this.label107.Size = new System.Drawing.Size(83, 16); - this.label107.TabIndex = 10; - this.label107.Text = "Status Begin"; - // - // pnltoolbarend - // - this.pnltoolbarend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnltoolbarend.Location = new System.Drawing.Point(254, 55); - this.pnltoolbarend.Name = "pnltoolbarend"; - this.pnltoolbarend.Size = new System.Drawing.Size(41, 20); - this.pnltoolbarend.TabIndex = 9; - this.pnltoolbarend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarEnd); - // - // label77 - // - this.label77.AutoSize = true; - this.label77.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label77.Location = new System.Drawing.Point(161, 55); - this.label77.Name = "label77"; - this.label77.Size = new System.Drawing.Size(87, 16); - this.label77.TabIndex = 8; - this.label77.Text = "Tool Bar End"; - // - // pnltoolbarmiddle - // - this.pnltoolbarmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnltoolbarmiddle.Location = new System.Drawing.Point(117, 80); - this.pnltoolbarmiddle.Name = "pnltoolbarmiddle"; - this.pnltoolbarmiddle.Size = new System.Drawing.Size(41, 20); - this.pnltoolbarmiddle.TabIndex = 7; - this.pnltoolbarmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarMiddle); - // - // label76 - // - this.label76.AutoSize = true; - this.label76.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label76.Location = new System.Drawing.Point(12, 80); - this.label76.Name = "label76"; - this.label76.Size = new System.Drawing.Size(104, 16); - this.label76.TabIndex = 6; - this.label76.Text = "Tool Bar Middle"; - // - // pnltoolbarbegin - // - this.pnltoolbarbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnltoolbarbegin.Location = new System.Drawing.Point(117, 55); - this.pnltoolbarbegin.Name = "pnltoolbarbegin"; - this.pnltoolbarbegin.Size = new System.Drawing.Size(41, 20); - this.pnltoolbarbegin.TabIndex = 5; - this.pnltoolbarbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarBegin); - // - // label75 - // - this.label75.AutoSize = true; - this.label75.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label75.Location = new System.Drawing.Point(12, 55); - this.label75.Name = "label75"; - this.label75.Size = new System.Drawing.Size(98, 16); - this.label75.TabIndex = 4; - this.label75.Text = "Tool Bar Begin"; - // - // pnlmenubarend - // - this.pnlmenubarend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmenubarend.Location = new System.Drawing.Point(249, 29); - this.pnlmenubarend.Name = "pnlmenubarend"; - this.pnlmenubarend.Size = new System.Drawing.Size(41, 20); - this.pnlmenubarend.TabIndex = 5; - this.pnlmenubarend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuEnd); - // - // label73 - // - this.label73.AutoSize = true; - this.label73.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label73.Location = new System.Drawing.Point(156, 29); - this.label73.Name = "label73"; - this.label73.Size = new System.Drawing.Size(92, 16); - this.label73.TabIndex = 4; - this.label73.Text = "Menu Bar End"; - // - // pnlmenubarbegin - // - this.pnlmenubarbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmenubarbegin.Location = new System.Drawing.Point(115, 29); - this.pnlmenubarbegin.Name = "pnlmenubarbegin"; - this.pnlmenubarbegin.Size = new System.Drawing.Size(41, 20); - this.pnlmenubarbegin.TabIndex = 3; - this.pnlmenubarbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuBegin); - // - // label42 - // - this.label42.AutoSize = true; - this.label42.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label42.Location = new System.Drawing.Point(10, 29); - this.label42.Name = "label42"; - this.label42.Size = new System.Drawing.Size(103, 16); - this.label42.TabIndex = 2; - this.label42.Text = "Menu Bar Begin"; - // - // label41 - // - this.label41.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label41.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label41.Location = new System.Drawing.Point(6, 0); - this.label41.Name = "label41"; - this.label41.Size = new System.Drawing.Size(301, 29); - this.label41.TabIndex = 1; - this.label41.Text = "The Basics"; - this.label41.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pnlmenusintro - // - this.pnlmenusintro.Controls.Add(this.label116); - this.pnlmenusintro.Controls.Add(this.label124); - this.pnlmenusintro.Location = new System.Drawing.Point(139, 43); - this.pnlmenusintro.Name = "pnlmenusintro"; - this.pnlmenusintro.Size = new System.Drawing.Size(311, 256); - this.pnlmenusintro.TabIndex = 11; - // - // label116 - // - this.label116.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label116.BackColor = System.Drawing.Color.Transparent; - this.label116.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label116.Location = new System.Drawing.Point(6, 29); - this.label116.Name = "label116"; - this.label116.Size = new System.Drawing.Size(300, 221); - this.label116.TabIndex = 4; - this.label116.Text = resources.GetString("label116.Text"); - this.label116.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label124 - // - this.label124.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label124.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.label124.Location = new System.Drawing.Point(6, 0); - this.label124.Name = "label124"; - this.label124.Size = new System.Drawing.Size(301, 29); - this.label124.TabIndex = 1; - this.label124.Text = "Menus - Intro"; - this.label124.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // pnlmenucategories - // - this.pnlmenucategories.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.pnlmenucategories.Controls.Add(this.btnmisc); - this.pnlmenucategories.Controls.Add(this.btnadvanced); - this.pnlmenucategories.Controls.Add(this.btndropdown); - this.pnlmenucategories.Controls.Add(this.btnbasic); - this.pnlmenucategories.Location = new System.Drawing.Point(6, 42); - this.pnlmenucategories.Name = "pnlmenucategories"; - this.pnlmenucategories.Size = new System.Drawing.Size(128, 257); - this.pnlmenucategories.TabIndex = 9; - // - // btnmisc - // - this.btnmisc.BackColor = System.Drawing.Color.White; - this.btnmisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnmisc.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnmisc.Location = new System.Drawing.Point(4, 105); - this.btnmisc.Name = "btnmisc"; - this.btnmisc.Size = new System.Drawing.Size(119, 29); - this.btnmisc.TabIndex = 7; - this.btnmisc.Text = "Misc."; - this.btnmisc.UseVisualStyleBackColor = false; - // - // btnadvanced - // - this.btnadvanced.BackColor = System.Drawing.Color.White; - this.btnadvanced.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnadvanced.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnadvanced.Location = new System.Drawing.Point(4, 70); - this.btnadvanced.Name = "btnadvanced"; - this.btnadvanced.Size = new System.Drawing.Size(119, 29); - this.btnadvanced.TabIndex = 6; - this.btnadvanced.Text = "Advanced"; - this.btnadvanced.UseVisualStyleBackColor = false; - this.btnadvanced.Click += new System.EventHandler(this.btnadvanced_Click); - // - // btndropdown - // - this.btndropdown.BackColor = System.Drawing.Color.White; - this.btndropdown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndropdown.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btndropdown.Location = new System.Drawing.Point(4, 35); - this.btndropdown.Name = "btndropdown"; - this.btndropdown.Size = new System.Drawing.Size(119, 29); - this.btndropdown.TabIndex = 5; - this.btndropdown.Text = "Drop-Downs"; - this.btndropdown.UseVisualStyleBackColor = false; - this.btndropdown.Click += new System.EventHandler(this.btndropdown_Click); - // - // btnbasic - // - this.btnbasic.BackColor = System.Drawing.Color.White; - this.btnbasic.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnbasic.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnbasic.Location = new System.Drawing.Point(4, 0); - this.btnbasic.Name = "btnbasic"; - this.btnbasic.Size = new System.Drawing.Size(119, 29); - this.btnbasic.TabIndex = 4; - this.btnbasic.Text = "Basic Customization"; - this.btnbasic.UseVisualStyleBackColor = false; - this.btnbasic.Click += new System.EventHandler(this.btnbasic_Click); - // - // label74 - // - this.label74.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label74.Location = new System.Drawing.Point(72, 0); - this.label74.Name = "label74"; - this.label74.Size = new System.Drawing.Size(332, 29); - this.label74.TabIndex = 0; - this.label74.Text = "Menu Customization"; - // - // tmrfix - // - this.tmrfix.Interval = 5000; - // - // pnlluaoptions - // - this.pnlluaoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlluaoptions.BackColor = System.Drawing.Color.White; - this.pnlluaoptions.Controls.Add(this.pnlluafield); - this.pnlluaoptions.Controls.Add(this.flmorebuttons); - this.pnlluaoptions.Location = new System.Drawing.Point(139, 9); - this.pnlluaoptions.Name = "pnlluaoptions"; - this.pnlluaoptions.Size = new System.Drawing.Size(457, 306); - this.pnlluaoptions.TabIndex = 21; - this.pnlluaoptions.Visible = false; - // - // flmorebuttons - // - this.flmorebuttons.AutoSize = true; - this.flmorebuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flmorebuttons.Dock = System.Windows.Forms.DockStyle.Top; - this.flmorebuttons.Location = new System.Drawing.Point(0, 0); - this.flmorebuttons.Name = "flmorebuttons"; - this.flmorebuttons.Size = new System.Drawing.Size(457, 0); - this.flmorebuttons.TabIndex = 0; - // - // pnlluafield - // - this.pnlluafield.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlluafield.Location = new System.Drawing.Point(0, 0); - this.pnlluafield.Name = "pnlluafield"; - this.pnlluafield.Size = new System.Drawing.Size(457, 306); - this.pnlluafield.TabIndex = 1; - // - // Shifter - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(600, 323); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "Shifter"; - this.Text = "Shifter"; - this.TopMost = true; - this.Load += new System.EventHandler(this.Shifter_Load); - this.catholder.ResumeLayout(false); - this.pnlshifterintro.ResumeLayout(false); - this.pnlshifterintro.PerformLayout(); - this.pnldesktopoptions.ResumeLayout(false); - this.pnldesktoppaneloptions.ResumeLayout(false); - this.pnldesktoppaneloptions.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.txtdesktoppanelheight)).EndInit(); - this.pnlapplauncheroptions.ResumeLayout(false); - this.pnlapplauncheroptions.PerformLayout(); - this.pnldesktopintro.ResumeLayout(false); - this.pnldesktopintro.PerformLayout(); - this.pnlpanelbuttonsoptions.ResumeLayout(false); - this.pnlpanelbuttonsoptions.PerformLayout(); - this.pnldesktopbackgroundoptions.ResumeLayout(false); - this.pnldesktopbackgroundoptions.PerformLayout(); - this.pnlpanelclockoptions.ResumeLayout(false); - this.pnlpanelclockoptions.PerformLayout(); - this.pnldesktoppreview.ResumeLayout(false); - this.predesktoppanel.ResumeLayout(false); - this.prepnlpanelbuttonholder.ResumeLayout(false); - this.prepnlpanelbutton.ResumeLayout(false); - this.prepnlpanelbutton.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).EndInit(); - this.pretimepanel.ResumeLayout(false); - this.pretimepanel.PerformLayout(); - this.preapplaunchermenuholder.ResumeLayout(false); - this.predesktopappmenu.ResumeLayout(false); - this.predesktopappmenu.PerformLayout(); - this.Panel10.ResumeLayout(false); - this.pnlwindowsoptions.ResumeLayout(false); - this.pnlwindowsintro.ResumeLayout(false); - this.pnlwindowsintro.PerformLayout(); - this.pnlbuttonoptions.ResumeLayout(false); - this.pnlbuttonoptions.PerformLayout(); - this.pnlclosebuttonoptions.ResumeLayout(false); - this.pnlclosebuttonoptions.PerformLayout(); - this.pnlrollupbuttonoptions.ResumeLayout(false); - this.pnlrollupbuttonoptions.PerformLayout(); - this.pnlminimizebuttonoptions.ResumeLayout(false); - this.pnlminimizebuttonoptions.PerformLayout(); - this.pnltitlebaroptions.ResumeLayout(false); - this.pnltitlebaroptions.PerformLayout(); - this.pnlborderoptions.ResumeLayout(false); - this.pnlborderoptions.PerformLayout(); - this.pnltitletextoptions.ResumeLayout(false); - this.pnltitletextoptions.PerformLayout(); - this.pnlwindowsobjects.ResumeLayout(false); - this.pnlwindowpreview.ResumeLayout(false); - this.prepgleft.ResumeLayout(false); - this.prepgright.ResumeLayout(false); - this.pretitlebar.ResumeLayout(false); - this.pretitlebar.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).EndInit(); - this.pnlreset.ResumeLayout(false); - this.pgcontents.ResumeLayout(false); - this.pgcontents.PerformLayout(); - this.pnldesktopcomposition.ResumeLayout(false); - this.pnlfancywindows.ResumeLayout(false); - this.pnlfancywindows.PerformLayout(); - this.pnlfancydragging.ResumeLayout(false); - this.pnlfancydragging.PerformLayout(); - this.pnlfancyintro.ResumeLayout(false); - this.panel18.ResumeLayout(false); - this.panel18.PerformLayout(); - this.panel25.ResumeLayout(false); - this.panel25.PerformLayout(); - this.panel36.ResumeLayout(false); - this.pnlmenus.ResumeLayout(false); - this.pnladvanced.ResumeLayout(false); - this.pnladvanced.PerformLayout(); - this.pnlmore.ResumeLayout(false); - this.pnlmore.PerformLayout(); - this.pnldropdown.ResumeLayout(false); - this.pnldropdown.PerformLayout(); - this.pnlbasic.ResumeLayout(false); - this.pnlbasic.PerformLayout(); - this.pnlmenusintro.ResumeLayout(false); - this.pnlmenucategories.ResumeLayout(false); - this.pnlluaoptions.ResumeLayout(false); - this.pnlluaoptions.PerformLayout(); - this.ResumeLayout(false); - - } - private System.Windows.Forms.ColorDialog ColorDialog1; - private System.Windows.Forms.Timer clocktick; - private System.Windows.Forms.Timer customizationtime; - private System.Windows.Forms.Timer timerearned; - private System.Windows.Forms.Label Label1; - private System.Windows.Forms.Button btnapply; - private System.Windows.Forms.Panel catholder; - private System.Windows.Forms.Button btnreset; - private System.Windows.Forms.Button btnmenus; - private System.Windows.Forms.Button btnwindows; - private System.Windows.Forms.Button btndesktop; - private System.Windows.Forms.Panel pnlshifterintro; - private System.Windows.Forms.Label Label66; - private System.Windows.Forms.Label Label65; - private System.Windows.Forms.Label Label64; - private System.Windows.Forms.Label Label63; - private System.Windows.Forms.Panel pnldesktopoptions; - private System.Windows.Forms.Panel pnlpanelbuttonsoptions; - private System.Windows.Forms.Panel pnlpanelbuttontextcolour; - private System.Windows.Forms.Label Label101; - private System.Windows.Forms.TextBox txtpanelbuttontexttop; - private System.Windows.Forms.Label Label104; - private System.Windows.Forms.TextBox txtpanelbuttontextside; - private System.Windows.Forms.Label Label106; - private System.Windows.Forms.Label Label93; - private System.Windows.Forms.TextBox txtpanelbuttontop; - private System.Windows.Forms.Label Label94; - private System.Windows.Forms.TextBox txtpanelbuttoninitalgap; - private System.Windows.Forms.Label Label108; - private System.Windows.Forms.TextBox txtpanelbuttonicontop; - private System.Windows.Forms.Label Label110; - private System.Windows.Forms.TextBox txtpanelbuttoniconside; - private System.Windows.Forms.Label Label112; - private System.Windows.Forms.TextBox txtpanelbuttoniconsize; - private System.Windows.Forms.TextBox txtpanelbuttoniconheight; - private System.Windows.Forms.Label Label105; - private System.Windows.Forms.ComboBox cbpanelbuttontextstyle; - private System.Windows.Forms.ComboBox cbpanelbuttonfont; - private System.Windows.Forms.Label Label100; - private System.Windows.Forms.TextBox txtpaneltextbuttonsize; - private System.Windows.Forms.Label Label102; - private System.Windows.Forms.Label Label103; - private System.Windows.Forms.Label Label98; - private System.Windows.Forms.TextBox txtpanelbuttongap; - private System.Windows.Forms.Label Label99; - private System.Windows.Forms.Label Label96; - private System.Windows.Forms.TextBox txtpanelbuttonheight; - private System.Windows.Forms.Label Label97; - private System.Windows.Forms.Label Label92; - private System.Windows.Forms.TextBox txtpanelbuttonwidth; - private System.Windows.Forms.Label Label91; - private System.Windows.Forms.Panel pnlpanelbuttoncolour; - private System.Windows.Forms.Label Label95; - private System.Windows.Forms.Panel pnldesktoppaneloptions; - private System.Windows.Forms.Button btnpanelbuttons; - private System.Windows.Forms.Label lbwarning; - private System.Windows.Forms.ComboBox combodesktoppanelposition; - private System.Windows.Forms.Label lbposition; - private System.Windows.Forms.Label Label47; - private System.Windows.Forms.NumericUpDown txtdesktoppanelheight; - private System.Windows.Forms.Label lbheight; - private System.Windows.Forms.Panel pnldesktoppanelcolour; - private System.Windows.Forms.Label lbpanelcolor; - private System.Windows.Forms.Panel pnlapplauncheroptions; - private System.Windows.Forms.Label Label71; - private System.Windows.Forms.TextBox txtapplauncherwidth; - private System.Windows.Forms.Label Label72; - private System.Windows.Forms.TextBox txtappbuttonlabel; - private System.Windows.Forms.Label Label51; - private System.Windows.Forms.Label Label50; - private System.Windows.Forms.Panel pnlmaintextcolour; - private System.Windows.Forms.ComboBox comboappbuttontextstyle; - private System.Windows.Forms.ComboBox comboappbuttontextfont; - private System.Windows.Forms.Label Label37; - private System.Windows.Forms.Label Label38; - private System.Windows.Forms.TextBox txtappbuttontextsize; - private System.Windows.Forms.Label Label39; - private System.Windows.Forms.Label Label40; - private System.Windows.Forms.Panel pnlmainbuttonactivated; - private System.Windows.Forms.Label Label28; - private System.Windows.Forms.Label Label35; - private System.Windows.Forms.TextBox txtapplicationsbuttonheight; - private System.Windows.Forms.Label Label36; - private System.Windows.Forms.Panel pnlmainbuttoncolour; - private System.Windows.Forms.Label Label43; - private System.Windows.Forms.Panel pnldesktopintro; - private System.Windows.Forms.Label Label69; - private System.Windows.Forms.Label Label70; - private System.Windows.Forms.Panel pnlpanelclockoptions; - private System.Windows.Forms.Panel pnlclockbackgroundcolour; - private System.Windows.Forms.Label Label44; - private System.Windows.Forms.ComboBox comboclocktextstyle; - private System.Windows.Forms.ComboBox comboclocktextfont; - private System.Windows.Forms.Label Label26; - private System.Windows.Forms.Label Label29; - private System.Windows.Forms.TextBox txtclocktextfromtop; - private System.Windows.Forms.Label Label30; - private System.Windows.Forms.Label Label31; - private System.Windows.Forms.TextBox txtclocktextsize; - private System.Windows.Forms.Label Label32; - private System.Windows.Forms.Label Label33; - private System.Windows.Forms.Panel pnlpanelclocktextcolour; - private System.Windows.Forms.Label Label34; - private System.Windows.Forms.Panel pnldesktopbackgroundoptions; - private System.Windows.Forms.Panel pnldesktopcolour; - private System.Windows.Forms.Label Label45; - private System.Windows.Forms.Panel Panel10; - private System.Windows.Forms.Button btndesktopitself; - private System.Windows.Forms.Button btnpanelclock; - private System.Windows.Forms.Button btnapplauncher; - private System.Windows.Forms.Button btndesktoppanel; - private System.Windows.Forms.Panel pnldesktoppreview; - private System.Windows.Forms.Panel predesktoppanel; - private System.Windows.Forms.FlowLayoutPanel prepnlpanelbuttonholder; - private System.Windows.Forms.Panel prepnlpanelbutton; - private System.Windows.Forms.PictureBox pretbicon; - private System.Windows.Forms.Label pretbctext; - private System.Windows.Forms.Panel pretimepanel; - private System.Windows.Forms.Label prepaneltimetext; - private System.Windows.Forms.Panel preapplaunchermenuholder; - private System.Windows.Forms.MenuStrip predesktopappmenu; - private System.Windows.Forms.ToolStripMenuItem ApplicationsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem KnowledgeInputToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem ShiftoriumToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem ClockToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem TerminalToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem ShifterToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator ToolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem ShutdownToolStripMenuItem; - private System.Windows.Forms.Panel pnlwindowsoptions; - private System.Windows.Forms.Panel pnlbuttonoptions; - private System.Windows.Forms.Panel pnlminimizebuttonoptions; - private System.Windows.Forms.Label Label82; - private System.Windows.Forms.Label Label83; - private System.Windows.Forms.Panel pnlminimizebuttoncolour; - private System.Windows.Forms.TextBox txtminimizebuttonside; - private System.Windows.Forms.Label Label84; - private System.Windows.Forms.Label Label85; - private System.Windows.Forms.TextBox txtminimizebuttonheight; - private System.Windows.Forms.Label Label86; - private System.Windows.Forms.Label Label87; - private System.Windows.Forms.TextBox txtminimizebuttontop; - private System.Windows.Forms.Label Label88; - private System.Windows.Forms.Label Label89; - private System.Windows.Forms.TextBox txtminimizebuttonwidth; - private System.Windows.Forms.Label Label90; - private System.Windows.Forms.Panel pnlrollupbuttonoptions; - private System.Windows.Forms.Label Label54; - private System.Windows.Forms.Label Label55; - private System.Windows.Forms.Panel pnlrollupbuttoncolour; - private System.Windows.Forms.TextBox txtrollupbuttonside; - private System.Windows.Forms.Label Label56; - private System.Windows.Forms.Label Label57; - private System.Windows.Forms.TextBox txtrollupbuttonheight; - private System.Windows.Forms.Label Label58; - private System.Windows.Forms.Label Label59; - private System.Windows.Forms.TextBox txtrollupbuttontop; - private System.Windows.Forms.Label Label60; - private System.Windows.Forms.Label Label61; - private System.Windows.Forms.TextBox txtrollupbuttonwidth; - private System.Windows.Forms.Label Label62; - private System.Windows.Forms.ComboBox combobuttonoption; - private System.Windows.Forms.Label Label52; - private System.Windows.Forms.Panel pnlclosebuttonoptions; - private System.Windows.Forms.Label Label8; - private System.Windows.Forms.Label Label11; - private System.Windows.Forms.Panel pnlclosebuttoncolour; - private System.Windows.Forms.TextBox txtclosebuttonfromside; - private System.Windows.Forms.Label Label7; - private System.Windows.Forms.Label Label12; - private System.Windows.Forms.TextBox txtclosebuttonheight; - private System.Windows.Forms.Label Label13; - private System.Windows.Forms.Label Label6; - private System.Windows.Forms.TextBox txtclosebuttonfromtop; - private System.Windows.Forms.Label Label10; - private System.Windows.Forms.Label Label14; - private System.Windows.Forms.TextBox txtclosebuttonwidth; - private System.Windows.Forms.Label Label9; - private System.Windows.Forms.Panel pnltitlebaroptions; - private System.Windows.Forms.Label Label80; - private System.Windows.Forms.TextBox txticonfromtop; - private System.Windows.Forms.Label Label81; - private System.Windows.Forms.Label Label78; - private System.Windows.Forms.TextBox txticonfromside; - private System.Windows.Forms.Label Label79; - private System.Windows.Forms.Label lbcornerwidthpx; - private System.Windows.Forms.TextBox txttitlebarcornerwidth; - private System.Windows.Forms.Label lbcornerwidth; - private System.Windows.Forms.Panel pnltitlebarrightcornercolour; - private System.Windows.Forms.Panel pnltitlebarleftcornercolour; - private System.Windows.Forms.Label lbrightcornercolor; - private System.Windows.Forms.Label lbleftcornercolor; - private System.Windows.Forms.CheckBox cboxtitlebarcorners; - private System.Windows.Forms.Label Label5; - private System.Windows.Forms.TextBox txttitlebarheight; - private System.Windows.Forms.Label Label4; - private System.Windows.Forms.Panel pnltitlebarcolour; - private System.Windows.Forms.Label Label2; - private System.Windows.Forms.Panel pnlborderoptions; - private System.Windows.Forms.CheckBox cbindividualbordercolours; - private System.Windows.Forms.Panel pnlborderbottomrightcolour; - private System.Windows.Forms.Label lbbright; - private System.Windows.Forms.Panel pnlborderbottomcolour; - private System.Windows.Forms.Label lbbottom; - private System.Windows.Forms.Panel pnlborderbottomleftcolour; - private System.Windows.Forms.Label lbbleft; - private System.Windows.Forms.Panel pnlborderrightcolour; - private System.Windows.Forms.Label lbright; - private System.Windows.Forms.Panel pnlborderleftcolour; - private System.Windows.Forms.Label lbleft; - private System.Windows.Forms.Label Label15; - private System.Windows.Forms.Panel pnlbordercolour; - private System.Windows.Forms.TextBox txtbordersize; - private System.Windows.Forms.Label Label3; - private System.Windows.Forms.Label Label16; - private System.Windows.Forms.Panel pnltitletextoptions; - private System.Windows.Forms.ComboBox combotitletextposition; - private System.Windows.Forms.Label Label53; - private System.Windows.Forms.ComboBox combotitletextstyle; - private System.Windows.Forms.ComboBox combotitletextfont; - private System.Windows.Forms.Label Label23; - private System.Windows.Forms.Label Label17; - private System.Windows.Forms.TextBox txttitletextside; - private System.Windows.Forms.Label Label18; - private System.Windows.Forms.Label Label19; - private System.Windows.Forms.TextBox txttitletexttop; - private System.Windows.Forms.Label Label20; - private System.Windows.Forms.Label Label21; - private System.Windows.Forms.TextBox txttitletextsize; - private System.Windows.Forms.Label Label22; - private System.Windows.Forms.Label Label24; - private System.Windows.Forms.Panel pnltitletextcolour; - private System.Windows.Forms.Label Label25; - private System.Windows.Forms.Panel pnlwindowsintro; - private System.Windows.Forms.Label Label68; - private System.Windows.Forms.Label Label67; - private System.Windows.Forms.Panel pnlwindowsobjects; - private System.Windows.Forms.Button btnborders; - private System.Windows.Forms.Button btnbuttons; - private System.Windows.Forms.Button btntitletext; - private System.Windows.Forms.Button btntitlebar; - private System.Windows.Forms.Panel pnlwindowpreview; - private System.Windows.Forms.Panel prepgcontent; - private System.Windows.Forms.Panel prepgbottom; - private System.Windows.Forms.Panel prepgleft; - private System.Windows.Forms.Panel prepgbottomlcorner; - private System.Windows.Forms.Panel prepgright; - private System.Windows.Forms.Panel prepgbottomrcorner; - private System.Windows.Forms.Panel pretitlebar; - private System.Windows.Forms.Panel preminimizebutton; - private System.Windows.Forms.PictureBox prepnlicon; - private System.Windows.Forms.Panel prerollupbutton; - private System.Windows.Forms.Panel preclosebutton; - private System.Windows.Forms.Label pretitletext; - private System.Windows.Forms.Panel prepgtoplcorner; - private System.Windows.Forms.Panel prepgtoprcorner; - private System.Windows.Forms.Panel pnlreset; - private System.Windows.Forms.Label Label113; - private System.Windows.Forms.Button btnresetallsettings; - private System.Windows.Forms.Label Label109; - private System.Windows.Forms.Label Label111; - private System.Windows.Forms.Panel pgcontents; - private System.Windows.Forms.Timer tmrfix; - private System.Windows.Forms.Timer tmrdelay; - private Panel pnlmenus; - private Label label74; - private Panel pnlmenucategories; - private Button btnmisc; - private Button btnadvanced; - private Button btndropdown; - private Button btnbasic; - private Panel pnlbasic; - private Panel pnlmenubarend; - private Label label73; - private Panel pnlmenubarbegin; - private Label label42; - private Label label41; - private Panel pnltoolbarend; - private Label label77; - private Panel pnltoolbarmiddle; - private Label label76; - private Panel pnltoolbarbegin; - private Label label75; - private Panel pnlstatusend; - private Label label114; - private Panel pnlstatusbegin; - private Label label107; - private Panel pnldropdownbg; - private Label label115; - private Panel pnlmenusintro; - private Label label116; - private Label label124; - private Panel pnldropdown; - private Panel pnlmarginend; - private Label label120; - private Panel pnlmarginmiddle; - private Label label121; - private Panel pnlmarginbegin; - private Label label122; - private Panel pnlhcolor; - private Label label123; - private Panel pnlhborder; - private Label label125; - private Label label126; - private Panel pnlddborder; - private Label label117; - private Panel pnlmenutextcolor; - private Label label118; - private Panel pnladvanced; - private Panel pnlitemselectedend; - private Label label129; - private Panel pnlbuttonpressed; - private Label label130; - private Panel pnlitemselectedbegin; - private Label label131; - private Panel pnlitemselected; - private Label label132; - private Panel pnlbuttonselected; - private Label label133; - private Panel pnlcheckbg; - private Label label134; - private Label label135; - private Panel pnlbuttonchecked; - private Label label136; - private Button btnmorebuttons; - private Panel pnlmore; - private Panel pnlpressedbegin; - private Button btnback; - private Label label138; - private Panel pnlselectedbegin; - private Panel pnlpressedend; - private Label label137; - private Label label139; - private Panel pnlselectedend; - private Panel pnlpressedmiddle; - private Label label140; - private Label label142; - private Panel pnlselectedmiddle; - private Label label145; - private Label label147; - private Panel pnlalhover; - private Label label119; - private Button btndesktopicons; - private Button btnwindowcomposition; - private Panel pnldesktopcomposition; - private Panel pnlfancywindows; - private Label label149; - private Panel pnlfancydragging; - private Label label156; - private Panel panel18; - private Panel panel19; - private Label label157; - private Panel panel20; - private Label label158; - private Panel panel21; - private Label label159; - private Panel panel22; - private Label label160; - private Panel panel23; - private Label label161; - private Panel panel24; - private Label label162; - private Label label163; - private Panel panel25; - private Panel panel26; - private Label label164; - private Panel panel27; - private Label label165; - private Panel panel28; - private Label label166; - private Panel panel29; - private Label label167; - private Panel panel30; - private Label label168; - private Panel panel31; - private Label label169; - private Panel panel32; - private Label label170; - private Panel panel33; - private Label label171; - private Panel panel34; - private Label label172; - private Label label173; - private Panel pnlfancyintro; - private Label label174; - private Label label175; - private Panel panel36; - private Button btnfancydragging; - private Button btnfancywindows; - private Label label176; - private ComboBox cbcloseanim; - private Label label128; - private ComboBox cbopenanim; - private Label label127; - private ComboBox cbdrageffect; - private Label label141; - private TextBox txtfadespeed; - private Label label155; - private TextBox txtdragfadedec; - private Label label143; - private TextBox txtdragopacitydec; - private Label label144; - private TextBox txtshakeminoffset; - private Label label148; - private TextBox txtshakemax; - private Label label146; - private TextBox txtwinfadedec; - private Label label150; - private TextBox txtwinfadespeed; - private Label label151; - private Button btnmore; - private Panel pnlluaoptions; - private FlowLayoutPanel flmorebuttons; - private Panel pnlluafield; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Shifter.cs b/source/WindowsFormsApplication1/Shifter.cs deleted file mode 100644 index 3aad889..0000000 --- a/source/WindowsFormsApplication1/Shifter.cs +++ /dev/null @@ -1,3093 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Shifter : Form - { - public Shifter() - { - InitializeComponent(); - } - - public Skinning.Skin CustomizingSkin = null; - public Skinning.Images CustomizingImages = null; - private bool EarnCP = false; - - public void AddCP(int amount) - { - if (EarnCP == true) - { - codepointstogive += amount; - } - } - - private void btndesktop_Click(object sender, EventArgs e) - { - HideAll(); - pnldesktopoptions.Show(); - pnldesktopoptions.BringToFront(); - SetPreviewSkin(true); - } - - private void SetPreviewSkin(bool updateValues) - { - EarnCP = false; - predesktopappmenu.Renderer = new Skinning.MyToolStripRenderer(new AppLauncherColorTable()); - //fix apply button - btnapply.BackColor = Color.White; - btnapply.ForeColor = Color.Black; - btnapply.Text = "Apply Changes"; - - //Set Available Title Buttons - combobuttonoption.Items.Clear(); - if(API.Upgrades["closebutton"]) - { - combobuttonoption.Items.Add("Close"); - } - if (API.Upgrades["rollupbutton"]) - { - combobuttonoption.Items.Add("Roll Up"); - } - if (API.Upgrades["minimizebutton"]) - { - combobuttonoption.Items.Add("Minimize"); - } - //set available options - SetAvailableOptions(); - - //windows - setuptitlebar(); - setskin(); - - //desktop - SetupDesktop(); - - //Setting Values - if (updateValues == true) - { - EarnCP = false; - SetupDesktopPanelValues(); - SetupAppLauncherValues(); - SetupPanelButtonValues(); - SetClockValues(); - SetupTitleTextValues(); - SetupBorderValues(); - SetupTitleBarValues(); - SetupButtonValues(); - SetupBasicMenuValues(); - SetupDropdownValues(); - SetupAdvancedMenuValues(); - SetupAnimationStyleValues(); - } - EarnCP = true; - } - - #region Preview Skinning - - public void SetupDesktop() - { - - if (API.Upgrades["desktoppanel"] == true) - { - if (CustomizingImages.desktoppanel == null) - { - predesktoppanel.BackColor = CustomizingSkin.desktoppanelcolour; - predesktoppanel.BackgroundImage = null; - } - else { - predesktoppanel.BackgroundImage = CustomizingImages.desktoppanel; - predesktoppanel.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktoppanellayout; - predesktoppanel.BackColor = Color.Transparent; - } - - predesktoppanel.Size = new Size(predesktoppanel.Size.Width, CustomizingSkin.desktoppanelheight); - switch (CustomizingSkin.desktoppanelposition) - { - case "Top": - predesktoppanel.Dock = DockStyle.Top; - predesktopappmenu.Dock = DockStyle.Top; - break; - case "Bottom": - predesktoppanel.Dock = DockStyle.Bottom; - predesktopappmenu.Dock = DockStyle.Bottom; - break; - } - predesktoppanel.Show(); - } - else { - predesktoppanel.Hide(); - } - - - if (API.Upgrades["applaunchermenu"] == true) - { - ApplicationsToolStripMenuItem.Font = new Font(CustomizingSkin.applicationbuttontextfont, CustomizingSkin.applicationbuttontextsize, CustomizingSkin.applicationbuttontextstyle); - ApplicationsToolStripMenuItem.Text = CustomizingSkin.applicationlaunchername; - - - - ApplicationsToolStripMenuItem.Height = CustomizingSkin.applicationbuttonheight; - if (CustomizingImages.applauncher != null) - { - ApplicationsToolStripMenuItem.Text = ""; - ApplicationsToolStripMenuItem.BackColor = Color.Transparent; - } - else { - ApplicationsToolStripMenuItem.Text = CustomizingSkin.applicationlaunchername; - ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbackgroundcolour; - ApplicationsToolStripMenuItem.BackgroundImage = null; - } - - preapplaunchermenuholder.Width = CustomizingSkin.applaunchermenuholderwidth; - predesktopappmenu.Width = CustomizingSkin.applaunchermenuholderwidth; - ApplicationsToolStripMenuItem.Width = CustomizingSkin.applaunchermenuholderwidth; - preapplaunchermenuholder.Height = CustomizingSkin.applicationbuttonheight; - predesktopappmenu.Height = CustomizingSkin.applicationbuttonheight; - ApplicationsToolStripMenuItem.Height = CustomizingSkin.applicationbuttonheight; - - if (CustomizingImages.applauncher != null) - { - ApplicationsToolStripMenuItem.BackgroundImage = CustomizingImages.applauncher; - } - else { - ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbackgroundcolour; - ApplicationsToolStripMenuItem.BackgroundImageLayout = (ImageLayout)CustomizingSkin.applauncherlayout; - } - } - else { - ApplicationsToolStripMenuItem.Visible = false; - } - - if (API.Upgrades["desktoppanelclock"] == true) - { - - prepaneltimetext.ForeColor = CustomizingSkin.clocktextcolour; - - if (CustomizingImages.panelclock == null) - { - pretimepanel.BackColor = CustomizingSkin.clockbackgroundcolor; - pretimepanel.BackgroundImage = null; - } - else { - pretimepanel.BackColor = Color.Transparent; - pretimepanel.BackgroundImage = CustomizingImages.panelclock; - pretimepanel.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelclocklayout; - } - prepaneltimetext.Font = new Font(CustomizingSkin.panelclocktextfont, CustomizingSkin.panelclocktextsize, CustomizingSkin.panelclocktextstyle); - pretimepanel.Size = new Size(prepaneltimetext.Width + 3, pretimepanel.Height); - prepaneltimetext.Location = new Point(0, CustomizingSkin.panelclocktexttop); - pretimepanel.Show(); - } - else { - pretimepanel.Hide(); - } - - - ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbuttoncolour; - - pnldesktoppreview.BackColor = CustomizingSkin.desktopbackgroundcolour; - pnldesktoppreview.BackgroundImage = CustomizingImages.desktopbackground; - pnldesktoppreview.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktopbackgroundlayout; - - if (API.Upgrades["panelbuttons"] == true) - { - prepnlpanelbutton.Visible = API.Upgrades["panelbuttons"]; - - pretbicon.Image = Properties.Resources.iconTerminal; - pretbctext.Text = "Terminal"; - - prepnlpanelbutton.Margin = new Padding(0, CustomizingSkin.panelbuttonfromtop, CustomizingSkin.panelbuttongap, 0); - - if (API.Upgrades["appicons"] == true) - { - pretbicon.Show(); - } - else - { - pretbicon.Hide(); - } - pretbicon.Location = new Point(CustomizingSkin.panelbuttoniconside, CustomizingSkin.panelbuttonicontop); - pretbicon.Size = new Size(CustomizingSkin.panelbuttoniconsize, CustomizingSkin.panelbuttoniconsize); - prepnlpanelbutton.Size = new Size(CustomizingSkin.panelbuttonwidth, CustomizingSkin.panelbuttonheight); - prepnlpanelbutton.BackColor = CustomizingSkin.panelbuttoncolour; - prepnlpanelbutton.BackgroundImage = CustomizingImages.panelbutton; - prepnlpanelbutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelbuttonlayout; - pretbctext.ForeColor = CustomizingSkin.panelbuttontextcolour; - pretbctext.Font = new Font(CustomizingSkin.panelbuttontextfont, CustomizingSkin.panelbuttontextsize, CustomizingSkin.panelbuttontextstyle); - pretbctext.Location = new Point(CustomizingSkin.panelbuttontextside, CustomizingSkin.panelbuttontexttop); - - - pretbicon.Size = new Size(CustomizingSkin.panelbuttoniconsize, CustomizingSkin.panelbuttoniconsize); - - } - prepnlpanelbuttonholder.Padding = new Padding(CustomizingSkin.panelbuttoninitialgap, 0, 0, 0); - - - } - - - - public void setskin() - { - - //disposals - preclosebutton.BackgroundImage = null; - pretitlebar.BackgroundImage = null; - prerollupbutton.BackgroundImage = null; - prepgtoplcorner.BackgroundImage = null; - prepgtoprcorner.BackgroundImage = null; - preminimizebutton.BackgroundImage = null; - //apply new skin - if (CustomizingImages.closebtn == null) - preclosebutton.BackColor = CustomizingSkin.closebtncolour; - else - preclosebutton.BackgroundImage = CustomizingImages.closebtn; - preclosebutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.closebtnlayout; - if (CustomizingImages.titlebar == null) - pretitlebar.BackColor = CustomizingSkin.titlebarcolour; - else - pretitlebar.BackgroundImage = CustomizingImages.titlebar; - pretitlebar.BackgroundImageLayout = (ImageLayout)CustomizingSkin.titlebarlayout; - if (CustomizingImages.rollbtn == null) - prerollupbutton.BackColor = CustomizingSkin.rollbtncolour; - else - prerollupbutton.BackgroundImage = CustomizingImages.rollbtn; - prerollupbutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rollbtnlayout; - if (CustomizingImages.leftcorner == null) - prepgtoplcorner.BackColor = CustomizingSkin.leftcornercolour; - else - prepgtoplcorner.BackgroundImage = CustomizingImages.leftcorner; - prepgtoplcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.leftcornerlayout; - if (CustomizingImages.rightcorner == null) - prepgtoprcorner.BackColor = CustomizingSkin.rightcornercolour; - else - prepgtoprcorner.BackgroundImage = CustomizingImages.rightcorner; - prepgtoprcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rightcornerlayout; - if (CustomizingImages.minbtn == null) - preminimizebutton.BackColor = CustomizingSkin.minbtncolour; - else - preminimizebutton.BackgroundImage = CustomizingImages.minbtn; - preminimizebutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.minbtnlayout; - if (CustomizingImages.borderleft == null) - prepgleft.BackColor = CustomizingSkin.borderleftcolour; - else - prepgleft.BackgroundImage = CustomizingImages.borderleft; - prepgleft.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; - if (CustomizingImages.borderright == null) - prepgright.BackColor = CustomizingSkin.borderrightcolour; - else - prepgright.BackgroundImage = CustomizingImages.borderright; - prepgleft.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; - if (CustomizingImages.borderbottom == null) - prepgbottom.BackColor = CustomizingSkin.borderbottomcolour; - else - prepgbottom.BackgroundImage = CustomizingImages.borderbottom; - prepgbottom.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderbottomlayout; - if (CustomizingSkin.enablebordercorners == true) - { - if (CustomizingImages.bottomleftcorner == null) - prepgbottomlcorner.BackColor = CustomizingSkin.bottomleftcornercolour; - else - prepgbottomlcorner.BackgroundImage = CustomizingImages.bottomleftcorner; - prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; - if (CustomizingImages.bottomrightcorner == null) - prepgbottomrcorner.BackColor = CustomizingSkin.bottomrightcornercolour; - else - prepgbottomrcorner.BackgroundImage = CustomizingImages.bottomrightcorner; - prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; - } - else { - prepgbottomlcorner.BackColor = CustomizingSkin.borderrightcolour; - prepgbottomrcorner.BackColor = CustomizingSkin.borderrightcolour; - prepgbottomlcorner.BackgroundImage = null; - prepgbottomrcorner.BackgroundImage = null; - } - - //set bottom border corner size - prepgbottomlcorner.Size = new Size(CustomizingSkin.borderwidth, CustomizingSkin.borderwidth); - prepgbottomrcorner.Size = new Size(CustomizingSkin.borderwidth, CustomizingSkin.borderwidth); - prepgbottomlcorner.Location = new Point(0, pnlwindowpreview.Height - CustomizingSkin.borderwidth); - prepgbottomrcorner.Location = new Point(pnlwindowpreview.Width, pnlwindowpreview.Height - CustomizingSkin.borderwidth); - - prepgright.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; - prepgbottomrcorner.BackgroundImage = CustomizingImages.bottomrightcorner; - prepgbottomlcorner.BackgroundImage = CustomizingImages.bottomleftcorner; - prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; - prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; - - } - - private void setupborders() - { - if (API.Upgrades["windowborders"] == false) - { - prepgleft.Hide(); - prepgbottom.Hide(); - prepgright.Hide(); - } - } - - private void setuptitlebar() - { - setupborders(); - - prepgleft.Width = CustomizingSkin.borderwidth; - prepgright.Width = CustomizingSkin.borderwidth; - prepgbottom.Height = CustomizingSkin.borderwidth; - pretitlebar.Height = CustomizingSkin.titlebarheight; - - if (CustomizingSkin.enablecorners == true) - { - prepgtoplcorner.Show(); - prepgtoprcorner.Show(); - prepgtoprcorner.Width = CustomizingSkin.titlebarcornerwidth; - prepgtoplcorner.Width = CustomizingSkin.titlebarcornerwidth; - } - else { - prepgtoplcorner.Hide(); - prepgtoprcorner.Hide(); - } - - if (API.Upgrades["titlebar"] == false) - { - pretitlebar.Hide(); - } - - if (API.Upgrades["titletext"] == false) - { - pretitletext.Hide(); - } - else { - pretitletext.Font = new Font(CustomizingSkin.titletextfontfamily, CustomizingSkin.titletextfontsize, CustomizingSkin.titletextfontstyle, GraphicsUnit.Point); - pretitletext.Text = "Preview"; - pretitletext.Show(); - } - - if (API.Upgrades["closebutton"] == false) - { - preclosebutton.Hide(); - } - else { - preclosebutton.BackColor = CustomizingSkin.closebtncolour; - preclosebutton.Size = CustomizingSkin.closebtnsize; - preclosebutton.Show(); - } - - if (API.Upgrades["rollupbutton"] == false) - { - prerollupbutton.Hide(); - } - else { - prerollupbutton.BackColor = CustomizingSkin.rollbtncolour; - prerollupbutton.Size = CustomizingSkin.rollbtnsize; - prerollupbutton.Show(); - } - - if (API.Upgrades["minimizebutton"] == false) - { - preminimizebutton.Hide(); - } - else { - preminimizebutton.BackColor = CustomizingSkin.minbtncolour; - preminimizebutton.Size = CustomizingSkin.minbtnsize; - preminimizebutton.Show(); - } - - if (API.Upgrades["windowborders"] == true) - { - preclosebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.closebtnfromside - preclosebutton.Size.Width, CustomizingSkin.closebtnfromtop); - prerollupbutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.rollbtnfromside - prerollupbutton.Size.Width, CustomizingSkin.rollbtnfromtop); - preminimizebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.minbtnfromside - preminimizebutton.Size.Width, CustomizingSkin.minbtnfromtop); - switch (CustomizingSkin.titletextpos) - { - case "Left": - pretitletext.Location = new Point(CustomizingSkin.titletextfromside, CustomizingSkin.titletextfromtop); - break; - case "Centre": - pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, CustomizingSkin.titletextfromtop); - break; - } - pretitletext.ForeColor = CustomizingSkin.titletextcolour; - } - else { - preclosebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.closebtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preclosebutton.Size.Width, CustomizingSkin.closebtnfromtop); - prerollupbutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.rollbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - prerollupbutton.Size.Width, CustomizingSkin.rollbtnfromtop); - preminimizebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.minbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preminimizebutton.Size.Width, CustomizingSkin.minbtnfromtop); - switch (CustomizingSkin.titletextpos) - { - case "Left": - pretitletext.Location = new Point(CustomizingSkin.titletextfromside + prepgtoplcorner.Width, CustomizingSkin.titletextfromtop); - break; - case "Centre": - pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, CustomizingSkin.titletextfromtop); - break; - } - pretitletext.ForeColor = CustomizingSkin.titletextcolour; - } - - //Change when Icon skinning complete - // Change to program's icon - if (API.Upgrades["appicons"] == true) - { - prepnlicon.Visible = true; - prepnlicon.Location = new Point(CustomizingSkin.titleiconfromside, CustomizingSkin.titleiconfromtop); - prepnlicon.Size = new Size(CustomizingSkin.titlebariconsize, CustomizingSkin.titlebariconsize); - prepnlicon.Image = Properties.Resources.iconShifter; - - } - - } - - #endregion - - #region Other things... - - private void HideAll() - { - pnlshifterintro.Hide(); - pnldesktopoptions.Hide(); - pnlwindowsoptions.Hide(); - pnlreset.Hide(); - //pnlmenuoptions.Hide(); - } - - private void btnreset_Click(object sender, EventArgs e) - { - HideAll(); - pnlreset.Show(); - pnlreset.BringToFront(); - SetPreviewSkin(true); - } - - private void btnwindows_Click(object sender, EventArgs e) - { - HideAll(); - pnlwindowsoptions.Show(); - pnlwindowsoptions.BringToFront(); - SetPreviewSkin(true); - pnlwindowpreview.Show(); - pnlwindowpreview.BringToFront(); - pnlwindowsintro.Show(); - pnlwindowsintro.BringToFront(); - } - - public void GrabSkinData() - { - Skinning.Utilities.SavePanels(); - string json = JsonConvert.SerializeObject(API.CurrentSkin); - CustomizingSkin = JsonConvert.DeserializeObject<Skinning.Skin>(json); - GetAllImages(); - } - - public void GetAllImages() - { - CustomizingImages = new Skinning.Images(); - CustomizingImages.applauncherclick = Skinning.Utilities.GetImage(CustomizingSkin.applauncherclickpath); - CustomizingImages.panelbutton = Skinning.Utilities.GetImage(CustomizingSkin.panelbuttonpath); - CustomizingImages.applaunchermouseover = Skinning.Utilities.GetImage(CustomizingSkin.applaunchermouseoverpath); - CustomizingImages.applauncher = Skinning.Utilities.GetImage(CustomizingSkin.applauncherpath); - CustomizingImages.panelclock = Skinning.Utilities.GetImage(CustomizingSkin.panelclockpath); - CustomizingImages.desktopbackground = Skinning.Utilities.GetImage(CustomizingSkin.desktopbackgroundpath); - CustomizingImages.desktoppanel = Skinning.Utilities.GetImage(CustomizingSkin.desktoppanelpath); - CustomizingImages.minbtnhover = Skinning.Utilities.GetImage(CustomizingSkin.minbtnhoverpath); - CustomizingImages.minbtnclick = Skinning.Utilities.GetImage(CustomizingSkin.minbtnclickpath); - CustomizingImages.rightcorner = Skinning.Utilities.GetImage(CustomizingSkin.rightcornerpath); - CustomizingImages.titlebar = Skinning.Utilities.GetImage(CustomizingSkin.titlebarpath); - CustomizingImages.borderright = Skinning.Utilities.GetImage(CustomizingSkin.borderrightpath); - CustomizingImages.borderleft = Skinning.Utilities.GetImage(CustomizingSkin.borderleftpath); - CustomizingImages.borderbottom = Skinning.Utilities.GetImage(CustomizingSkin.borderbottompath); - CustomizingImages.closebtn = Skinning.Utilities.GetImage(CustomizingSkin.closebtnpath); - CustomizingImages.closebtnhover = Skinning.Utilities.GetImage(CustomizingSkin.closebtnhoverpath); - CustomizingImages.closebtnclick = Skinning.Utilities.GetImage(CustomizingSkin.closebtnclickpath); - CustomizingImages.rollbtn = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnpath); - CustomizingImages.rollbtnhover = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnhoverpath); - CustomizingImages.rollbtnclick = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnclickpath); - CustomizingImages.minbtn = Skinning.Utilities.GetImage(CustomizingSkin.minbtnpath); - CustomizingImages.leftcorner = Skinning.Utilities.GetImage(CustomizingSkin.leftcornerpath); - CustomizingImages.bottomleftcorner = Skinning.Utilities.GetImage(CustomizingSkin.bottomleftcornerpath); - CustomizingImages.bottomrightcorner = Skinning.Utilities.GetImage(CustomizingSkin.bottomrightcornerpath); - - } - - private void Shifter_Load(object sender, EventArgs e) - { - GrabSkinData(); - HideAll(); - pnlshifterintro.Show(); - pnlshifterintro.BringToFront(); - SetPreviewSkin(true); - codepointstogive = 0; - } - - #endregion - - - private void SetAvailableOptions () - { - btntitlebar.Visible = API.Upgrades["shifttitlebar"]; - btntitletext.Visible = API.Upgrades["shifttitletext"]; - btnbuttons.Visible = API.Upgrades["shifttitlebuttons"]; - btnpanelbuttons.Visible = API.Upgrades["shiftpanelbuttons"]; - btnpanelclock.Visible = API.Upgrades["shiftpanelclock"]; - btndesktoppanel.Visible = API.Upgrades["shiftdesktoppanel"]; - btnapplauncher.Visible = API.Upgrades["shiftapplauncher"]; - btndesktopitself.Visible = API.Upgrades["shiftdesktop"]; - btnmenus.Visible = API.Upgrades["shiftsystemmenus"]; - btndesktopicons.Visible = API.Upgrades["shiftdesktopicons"]; - btnwindowcomposition.Visible = API.Upgrades["shiftfancyeffects"]; - } - #region Desktop, Reset, Intro, Apply - private Random rand = new Random(); - - private int codepointstogive = 0; - - private void btnresetallsettings_Click(object sender, EventArgs e) - { - API.CreateInfoboxSession("Reset all settings - Are you SURE?", "Are you absolutely sure you want to reset your ShiftOS to the default settings? You will lose the currently loaded settings and the action is NOT reversable.", infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetInfoboxResult(); - if(result == "Yes") - { - Skinning.Utilities.loadedSkin = new Skinning.Skin(); - Skinning.Utilities.loadedskin_images = new Skinning.Images(); - Skinning.Utilities.saveskin(); - Skinning.Utilities.GenDefaultIconPack(); - API.UpdateWindows(); - API.CurrentSession.SetupDesktop(); - API.CreateInfoboxSession("Settings reset.", "ShiftOS has tried to reset all settings and as far is it's aware, it succeeded. You may have to re-open some apps before the reset takes effect on them", infobox.InfoboxMode.Info); - codepointstogive = 0; - } - }; - } - - - - private void txtdesktoppanelheight_ValueChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.desktoppanelheight = Convert.ToInt16(txtdesktoppanelheight.Text); - SetPreviewSkin(false); - AddCP(1); - } - catch - { - txtdesktoppanelheight.Text = CustomizingSkin.desktoppanelheight.ToString(); - } - } - - private void SetupDesktopPanelValues() - { - txtdesktoppanelheight.Text = CustomizingSkin.desktoppanelheight.ToString(); - combodesktoppanelposition.Items.Clear(); - combodesktoppanelposition.Items.Add("Top"); - combodesktoppanelposition.Items.Add("Bottom"); - combodesktoppanelposition.Text = CustomizingSkin.desktoppanelposition; - pnldesktoppanelcolour.BackColor = CustomizingSkin.desktoppanelcolour; - pnldesktoppanelcolour.BackgroundImage = CustomizingImages.desktoppanel; - pnldesktoppanelcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktoppanellayout; - pnldesktopcolour.BackColor = CustomizingSkin.desktopbackgroundcolour; - pnldesktopcolour.BackgroundImage = CustomizingImages.desktopbackground; - pnldesktopcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktopbackgroundlayout; - } - - private void btndesktoppanel_Click(object sender, EventArgs e) - { - pnldesktoppaneloptions.Show(); - pnldesktoppaneloptions.BringToFront(); - SetupDesktopPanelValues(); - if(API.Upgrades["advanceddesktop"]) - { - lbpanelcolor.Hide(); - pnldesktoppanelcolour.Hide(); - lbheight.Hide(); - txtdesktoppanelheight.Hide(); - lbposition.Hide(); - combodesktoppanelposition.Hide(); - lbwarning.Text = "Desktop Panel customization has been moved from the Shifter! You can right-click panels to change their settings and add/remove widgets."; - } - } - - private void btnapply_Click(object sender, EventArgs e) - { - btnapply.BackColor = Color.Black; - btnapply.ForeColor = Color.White; - btnapply.Text = "Codepoints: " + codepointstogive.ToString(); - - Skinning.Utilities.loadedSkin = CustomizingSkin; - Skinning.Utilities.loadedskin_images = CustomizingImages; - API.CurrentSkin.DesktopPanels = JsonConvert.DeserializeObject<List<Skinning.DesktopPanel>>(File.ReadAllText(Paths.LoadedSkin + "panels.json")); - Skinning.Utilities.LoadPanels(); - Skinning.Utilities.saveimages(); - Skinning.Utilities.saveskin(); - API.AddCodepoints(codepointstogive); - API.UpdateWindows(); - API.CurrentSession.SetupDesktop(); - codepointstogive = 0; - } - - private void combodesktoppanelposition_SelectedIndexChanged(object sender, EventArgs e) - { - CustomizingSkin.desktoppanelposition = combodesktoppanelposition.Text; - AddCP(1); - SetPreviewSkin(false); - } - - private Color ColorToChange - { - get - { - return ctc; - } - } - - private Color ctc = Color.Black; - - private void ChangeDesktopPanelColor(object sender, MouseEventArgs e) - { - if(e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Desktop Panel Color", CustomizingSkin.desktoppanelcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.desktoppanelcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if(API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Desktop Panel", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if(result == "OK") - { - CustomizingImages.desktoppanel = API.GraphicPickerSession.IdleImage; - CustomizingSkin.desktoppanellayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void SetupAppLauncherValues() - { - txtappbuttonlabel.Text = CustomizingSkin.applicationlaunchername; - txtappbuttontextsize.Text = CustomizingSkin.applicationbuttontextsize.ToString(); - AddFonts(ref comboappbuttontextfont); - comboappbuttontextfont.Text = CustomizingSkin.applicationbuttontextfont; - ListFontStyles(ref comboappbuttontextstyle, CustomizingSkin.applicationbuttontextstyle); - txtapplauncherwidth.Text = CustomizingSkin.applaunchermenuholderwidth.ToString(); - txtapplicationsbuttonheight.Text = CustomizingSkin.applicationbuttonheight.ToString(); - pnlmaintextcolour.BackColor = CustomizingSkin.applicationsbuttontextcolour; - pnlmainbuttoncolour.BackColor = CustomizingSkin.applauncherbuttoncolour; - pnlmainbuttoncolour.BackgroundImage = CustomizingImages.applauncher; - pnlmainbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.applauncherlayout; - pnlmainbuttonactivated.BackColor = CustomizingSkin.Menu_MenuItemPressedGradientBegin; - pnlalhover.BackColor = CustomizingSkin.applaunchermouseovercolour; - } - - private void SetAppLauncherTextColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("App Launcher Button Text Color", CustomizingSkin.applicationsbuttontextcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.applicationsbuttontextcolour = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetFontStyle(string newStyle, ref FontStyle oldStyle) - { - switch (newStyle) - { - case "Regular": - oldStyle = FontStyle.Regular; - break; - case "Bold": - oldStyle = FontStyle.Bold; - break; - case "Italic": - oldStyle = FontStyle.Italic; - break; - case "Underline": - oldStyle = FontStyle.Underline; - break; - } - } - - private void ListFontStyles(ref ComboBox list, FontStyle currentFontStyle) - { - list.Items.Clear(); - list.Items.Add("Regular"); - list.Items.Add("Bold"); - list.Items.Add("Italic"); - list.Items.Add("Underline"); - switch(currentFontStyle) - { - case FontStyle.Regular: - list.Text = "Regular"; - break; - case FontStyle.Bold: - list.Text = "Bold"; - break; - case FontStyle.Italic: - list.Text = "Italic"; - break; - case FontStyle.Underline: - list.Text = "Underline"; - break; - - } - } - - - private void txtappbuttonlabel_KeyDown(object sender, EventArgs e) - { - CustomizingSkin.applicationlaunchername = txtappbuttonlabel.Text; - AddCP(1); - SetPreviewSkin(false); - } - - private void AddFonts(ref ComboBox fontList) - { - // Get the installed fonts collection. - System.Drawing.Text.InstalledFontCollection allFonts = new System.Drawing.Text.InstalledFontCollection(); - - // Get an array of the system's font families. - FontFamily[] fontFamilies = allFonts.Families; - - // Display the font families. - foreach (FontFamily myFont in fontFamilies) - { - fontList.Items.Add(myFont.Name); - } - //font_family - } - - private void btnapplauncher_Click(object sender, EventArgs e) - { - pnlapplauncheroptions.Show(); - pnlapplauncheroptions.BringToFront(); - SetPreviewSkin(true); - } - - private void txtappbuttontextsize_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.applicationbuttontextsize = Convert.ToInt16(txtappbuttontextsize.Text); - SetPreviewSkin(false); - AddCP(1); - } - catch - { - txtappbuttontextsize.Text = CustomizingSkin.applicationbuttontextsize.ToString(); - } - } - - private void comboappbuttontextfont_SelectedIndexChanged(object sender, EventArgs e) - { - CustomizingSkin.applicationbuttontextfont = comboappbuttontextfont.Text; - SetPreviewSkin(false); - AddCP(1); - } - - private void comboappbuttontextstyle_SelectedIndexChanged(object sender, EventArgs e) - { - SetFontStyle(comboappbuttontextstyle.Text, ref CustomizingSkin.applicationbuttontextstyle); - AddCP(1); - SetPreviewSkin(false); - } - - private void txtapplicationsbuttonheight_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.applicationbuttonheight = Convert.ToInt16(txtapplicationsbuttonheight.Text); - SetPreviewSkin(false); - AddCP(1); - } - catch - { - txtapplicationsbuttonheight.Text = CustomizingSkin.applicationbuttonheight.ToString(); - } - } - - private void txtapplauncherwidth_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.applaunchermenuholderwidth = Convert.ToInt16(txtapplauncherwidth.Text); - SetPreviewSkin(false); - AddCP(1); - } - catch - { - txtapplauncherwidth.Text = CustomizingSkin.applaunchermenuholderwidth.ToString(); - } - } - - private void ChangeMenuItemColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Item Color", CustomizingSkin.Menu_ToolStripDropDownBackground); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ToolStripDropDownBackground = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void ChangeMenuHighlight(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Item Mouse Over Color", CustomizingSkin.Menu_MenuItemSelected); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetALButtonColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Desktop Panel Color", CustomizingSkin.applauncherbuttoncolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.applauncherbuttoncolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("App Launcher Button", true); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.applauncher = API.GraphicPickerSession.IdleImage; - CustomizingSkin.applauncherlayout = (int)API.GraphicPickerSession.ImageLayout; - CustomizingImages.applauncherclick = API.GraphicPickerSession.MouseDownImage; - CustomizingImages.applaunchermouseover = API.GraphicPickerSession.MouseOverImage; - SetPreviewSkin(true); - } - }; - } - } - } - - private void SetALButtonClickedColor(object sender, MouseEventArgs e) - { - if(CustomizingImages.applauncherclick != null) - { - API.CreateInfoboxSession("Shifter - Error", "It appears you've set an image as the 'Activated' property of the App Launcher button, thus this setting is overidden by it. Please un-set the image to change this setting.", infobox.InfoboxMode.Info); - - } - else - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Button Activated", CustomizingSkin.Menu_MenuItemPressedGradientBegin); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuItemPressedGradientBegin = API.GetLastColorFromSession(); - CustomizingSkin.Menu_MenuItemPressedGradientMiddle = CustomizingSkin.Menu_MenuItemPressedGradientBegin; - CustomizingSkin.Menu_MenuItemPressedGradientEnd = CustomizingSkin.Menu_MenuItemPressedGradientBegin; - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - } - - private void ChangeDesktopBackground(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Desktop Background", CustomizingSkin.desktopbackgroundcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.desktopbackgroundcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Desktop Background", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.desktopbackground = API.GraphicPickerSession.IdleImage; - CustomizingSkin.desktopbackgroundlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void btndesktopitself_Click(object sender, EventArgs e) - { - pnldesktopbackgroundoptions.Show(); - pnldesktopbackgroundoptions.BringToFront(); - SetPreviewSkin(true); - } - - private void btnpanelbuttons_Click(object sender, EventArgs e) - { - pnlpanelbuttonsoptions.Show(); - pnlpanelbuttonsoptions.BringToFront(); - } - - public void SetupPanelButtonValues() - { - txtpanelbuttonwidth.Text = CustomizingSkin.panelbuttonwidth.ToString(); - pnlpanelbuttoncolour.BackColor = CustomizingSkin.panelbuttoncolour; - pnlpanelbuttoncolour.BackgroundImage = CustomizingImages.panelbutton; - pnlpanelbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelbuttonlayout; - txtpanelbuttoninitalgap.Text = CustomizingSkin.panelbuttoninitialgap.ToString(); - txtpanelbuttonheight.Text = CustomizingSkin.panelbuttonheight.ToString(); - txtpanelbuttongap.Text = CustomizingSkin.panelbuttongap.ToString(); - AddFonts(ref cbpanelbuttonfont); - cbpanelbuttonfont.Text = CustomizingSkin.panelbuttontextfont; - ListFontStyles(ref cbpanelbuttontextstyle, CustomizingSkin.panelbuttontextstyle); - pnlpanelbuttontextcolour.BackColor = CustomizingSkin.panelbuttontextcolour; - txtpanelbuttoniconsize.Text = CustomizingSkin.panelbuttoniconsize.ToString(); - txtpanelbuttoniconside.Text = CustomizingSkin.panelbuttoniconside.ToString(); - txtpanelbuttonicontop.Text = CustomizingSkin.panelbuttonicontop.ToString(); - txtpaneltextbuttonsize.Text = CustomizingSkin.panelbuttontextsize.ToString(); - txtpanelbuttontextside.Text = CustomizingSkin.panelbuttontextside.ToString(); - txtpanelbuttontexttop.Text = CustomizingSkin.panelbuttontexttop.ToString(); - txtpanelbuttontop.Text = CustomizingSkin.panelbuttonfromtop.ToString(); - } - - private void txtpanelbuttonwidth_TextChanged(object sender, EventArgs e) - { - try { - CustomizingSkin.panelbuttonwidth = Convert.ToInt16(txtpanelbuttonwidth.Text); - AddCP(1); - } - catch{ - txtpanelbuttonwidth.Text = CustomizingSkin.panelbuttonwidth.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpanelbuttoninitalgap_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttoninitialgap = Convert.ToInt16(txtpanelbuttoninitalgap.Text); - AddCP(1); - } - catch - { - txtpanelbuttoninitalgap.Text = CustomizingSkin.panelbuttoninitialgap.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpanelbuttonheight_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttonheight = Convert.ToInt16(txtpanelbuttonheight.Text); - AddCP(1); - } - catch - { - txtpanelbuttonheight.Text = CustomizingSkin.panelbuttonheight.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpanelbuttongap_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttongap = Convert.ToInt16(txtpanelbuttongap.Text); - AddCP(1); - } - catch - { - txtpanelbuttongap.Text = CustomizingSkin.panelbuttongap.ToString(); - } - SetPreviewSkin(false); - } - - private void cbpanelbuttonfont_SelectedIndexChanged(object sender, EventArgs e) - { - CustomizingSkin.panelbuttontextfont = (string)cbpanelbuttonfont.SelectedItem; - AddCP(1); - SetPreviewSkin(false); - } - - private void cbpanelbuttontextstyle_SelectedIndexChanged(object sender, EventArgs e) - { - SetFontStyle(cbpanelbuttontextstyle.SelectedItem.ToString(), ref CustomizingSkin.panelbuttontextstyle); - SetPreviewSkin(false); - - } - - private void SetPanelButtonTextColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Panel Button Text", CustomizingSkin.panelbuttontextcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.panelbuttontextcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - - } - - private void SetPanelButtonColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Panel Button", CustomizingSkin.panelbuttoncolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.panelbuttoncolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Panel Button", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.panelbutton = API.GraphicPickerSession.IdleImage; - CustomizingSkin.panelbuttonlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void txtpanelbuttoniconsize_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttoniconsize = Convert.ToInt16(txtpanelbuttoniconsize.Text); - AddCP(1); - } - catch - { - txtpanelbuttoniconsize.Text = CustomizingSkin.panelbuttoniconsize.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpanelbuttoniconside_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttoniconside = Convert.ToInt16(txtpanelbuttoniconside.Text); - AddCP(1); - } - catch - { - txtpanelbuttoniconside.Text = CustomizingSkin.panelbuttoniconside.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpanelbuttonicontop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttonicontop = Convert.ToInt16(txtpanelbuttonicontop.Text); - AddCP(1); - } - catch - { - txtpanelbuttonicontop.Text = CustomizingSkin.panelbuttonicontop.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpanelbuttontextside_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttontextside = Convert.ToInt16(txtpanelbuttontextside.Text); - AddCP(1); - } - catch - { - txtpanelbuttontextside.Text = CustomizingSkin.panelbuttontextside.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpanelbuttontexttop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttontexttop = Convert.ToInt16(txtpanelbuttontexttop.Text); - AddCP(1); - } - catch - { - txtpanelbuttontexttop.Text = CustomizingSkin.panelbuttontexttop.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpaneltextbuttonsize_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttontextsize = Convert.ToInt16(txtpaneltextbuttonsize.Text); - AddCP(1); - } - catch - { - txtpaneltextbuttonsize.Text = CustomizingSkin.panelbuttontextsize.ToString(); - } - SetPreviewSkin(false); - } - - private void txtpanelbuttontop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelbuttonfromtop = Convert.ToInt16(txtpanelbuttontop.Text); - AddCP(1); - } - catch - { - txtpanelbuttontop.Text = CustomizingSkin.panelbuttonfromtop.ToString(); - } - SetPreviewSkin(false); - } - - public void SetClockValues() - { - pnlpanelclocktextcolour.BackColor = CustomizingSkin.clocktextcolour; - pnlclockbackgroundcolour.BackColor = CustomizingSkin.clockbackgroundcolor; - pnlclockbackgroundcolour.BackgroundImage = CustomizingImages.panelclock; - pnlclockbackgroundcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelclocklayout; - AddFonts(ref comboclocktextfont); - comboclocktextfont.Text = CustomizingSkin.panelclocktextfont; - ListFontStyles(ref comboclocktextstyle, CustomizingSkin.panelclocktextstyle); - txtclocktextfromtop.Text = CustomizingSkin.panelclocktexttop.ToString(); - txtclocktextsize.Text = CustomizingSkin.panelclocktextsize.ToString(); - } - - private void SetClockTextColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Panel Clock Text", CustomizingSkin.clocktextcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.clocktextcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetClockBG(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Panel Clock", CustomizingSkin.clockbackgroundcolor); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.clockbackgroundcolor = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Panel Clock", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.panelclock = API.GraphicPickerSession.IdleImage; - CustomizingSkin.panelclocklayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void btnpanelclock_Click(object sender, EventArgs e) - { - pnlpanelclockoptions.Show(); - pnlpanelclockoptions.BringToFront(); - } - - private void comboclocktextfont_SelectedIndexChanged(object sender, EventArgs e) - { - CustomizingSkin.panelclocktextfont = comboclocktextfont.Text; - AddCP(1); - SetPreviewSkin(false); - } - - private void comboclocktextstyle_SelectedIndexChanged(object sender, EventArgs e) - { - SetFontStyle(comboclocktextstyle.Text, ref CustomizingSkin.panelclocktextstyle); - AddCP(1); - SetPreviewSkin(false); - } - - private void txtclocktextsize_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelclocktextsize = Convert.ToInt16(txtclocktextsize.Text); - AddCP(1); - } - catch - { - txtclocktextsize.Text = CustomizingSkin.panelclocktextsize.ToString(); - } - SetPreviewSkin(false); - } - - private void txtclocktextfromtop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.panelclocktexttop = Convert.ToInt16(txtclocktextfromtop.Text); - AddCP(1); - } - catch - { - txtclocktextfromtop.Text = CustomizingSkin.panelclocktexttop.ToString(); //Funny story: I accidentally assigned 'panelcocktexttop' to that property. xD - Michael VanOverbeek - } - SetPreviewSkin(false); - } - - private void SetALHoverColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("App Launcher Mouse Over", CustomizingSkin.applaunchermouseovercolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.applaunchermouseovercolour = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - #endregion - - #region Title Text - public void SetupTitleTextValues() - { - txttitletexttop.Text = CustomizingSkin.titletextfromtop.ToString(); - txttitletextside.Text = CustomizingSkin.titletextfromside.ToString(); - combotitletextposition.Items.Clear(); - combotitletextposition.Items.Add("Left"); - combotitletextposition.Items.Add("Centre"); - combotitletextposition.Text = CustomizingSkin.titletextpos; - AddFonts(ref combotitletextfont); - combotitletextfont.Text = CustomizingSkin.titletextfontfamily; - ListFontStyles(ref combotitletextstyle, CustomizingSkin.titletextfontstyle); - pnltitletextcolour.BackColor = CustomizingSkin.titletextcolour; - txttitletextsize.Text = CustomizingSkin.titletextfontsize.ToString(); - } - - private void txttitletexttop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.titletextfromtop = Convert.ToInt16(txttitletexttop.Text); - AddCP(1); - } - catch - { - txttitletexttop.Text = CustomizingSkin.titletextfromtop.ToString(); - } - SetPreviewSkin(false); - } - - private void txttitletextside_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.titletextfromside = Convert.ToInt16(txttitletextside.Text); - AddCP(1); - } - catch - { - txttitletextside.Text = CustomizingSkin.titletextfromside.ToString(); - } - SetPreviewSkin(false); - } - - private void combotitletextposition_SelectedIndexChanged(object sender, EventArgs e) - { - CustomizingSkin.titletextpos = combotitletextposition.Text; - CustomizingSkin.titletextposition = combotitletextposition.Text; - AddCP(1); - SetPreviewSkin(false); - } - - private void combotitletextfont_SelectedIndexChanged(object sender, EventArgs e) - { - CustomizingSkin.titletextfontfamily = combotitletextfont.Text; - AddCP(1); - SetPreviewSkin(false); - } - - private void combotitletextstyle_SelectedIndexChanged(object sender, EventArgs e) - { - SetFontStyle(combotitletextstyle.Text, ref CustomizingSkin.titletextfontstyle); - SetPreviewSkin(false); - } - - private void txttitletextsize_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.titletextfontsize = Convert.ToInt16(txttitletextsize.Text); - AddCP(1); - } - catch - { - txttitletextsize.Text = CustomizingSkin.titletextfontsize.ToString(); - } - SetPreviewSkin(false); - } - - private void SetTitleTextColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Title Text", CustomizingSkin.titletextcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.titletextcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void btntitletext_Click(object sender, EventArgs e) - { - pnltitletextoptions.Show(); - pnltitletextoptions.BringToFront(); - } - #endregion - - #region Main Buttons - - private void btnmenus_Click(object sender, EventArgs e) - { - /*API.CreateInfoboxSession("Test", "Test", infobox.InfoboxMode.Info); - HideAll(); - pnlmenuoptions.Show(); - pnlmenuoptions.BringToFront(); - SetPreviewSkin(true);*/ - } - - private void Button2_Click(object sender, EventArgs e) - { - } - - private void Label68_Click(object sender, EventArgs e) - { - - } - - private void btntitlebar_Click(object sender, EventArgs e) - { - pnltitlebaroptions.Show(); - pnltitlebaroptions.BringToFront(); - SetPreviewSkin(true); - } - - private void btntitletext_Click_1(object sender, EventArgs e) - { - pnltitletextoptions.Show(); - pnltitletextoptions.BringToFront(); - SetPreviewSkin(true); - } - - private void btnbuttons_Click(object sender, EventArgs e) - { - pnlbuttonoptions.Show(); - pnlbuttonoptions.BringToFront(); - SetPreviewSkin(true); - } - - private void btnborders_Click(object sender, EventArgs e) - { - pnlborderoptions.Show(); - pnlborderoptions.BringToFront(); - SetPreviewSkin(true); - } - - #endregion - - #region Window Borders - - public void SetupBorderValues() - { - cbindividualbordercolours.Checked = IndividualBorders; - //hide/show labels - lbleft.Visible = IndividualBorders; - lbright.Visible = IndividualBorders; - lbbottom.Visible = IndividualBorders; - lbbright.Visible = IndividualBorders; - lbbleft.Visible = IndividualBorders; - //hide/show individual colors - pnlborderleftcolour.Visible = IndividualBorders; - pnlborderrightcolour.Visible = IndividualBorders; - pnlborderbottomcolour.Visible = IndividualBorders; - pnlborderbottomleftcolour.Visible = IndividualBorders; - pnlborderbottomrightcolour.Visible = IndividualBorders; - //main color - pnlbordercolour.BackColor = CustomizingSkin.borderleftcolour; - pnlbordercolour.BackgroundImage = CustomizingImages.borderleft; - pnlbordercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; - //individual color - //left - pnlborderleftcolour.BackColor = CustomizingSkin.borderleftcolour; - pnlborderleftcolour.BackgroundImage = CustomizingImages.borderleft; - pnlborderleftcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; - //right - pnlborderrightcolour.BackColor = CustomizingSkin.borderrightcolour; - pnlborderrightcolour.BackgroundImage = CustomizingImages.borderright; - pnlborderrightcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; - //bottom - pnlborderbottomcolour.BackColor = CustomizingSkin.borderbottomcolour; - pnlborderbottomcolour.BackgroundImage = CustomizingImages.borderbottom; - pnlborderbottomcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderbottomlayout; - //bottom corners - pnlborderbottomleftcolour.BackColor = CustomizingSkin.bottomleftcornercolour; - pnlborderbottomleftcolour.BackgroundImage = CustomizingImages.bottomleftcorner; - pnlborderbottomleftcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; - - pnlborderbottomrightcolour.BackColor = CustomizingSkin.bottomrightcornercolour; - pnlborderbottomrightcolour.BackgroundImage = CustomizingImages.bottomrightcorner; - pnlborderbottomrightcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; - - - //border width - txtbordersize.Text = CustomizingSkin.borderwidth.ToString(); - } - - private bool IndividualBorders = false; - - private void cbindividualbordercolours_CheckedChanged(object sender, EventArgs e) - { - IndividualBorders = cbindividualbordercolours.Checked; - SetPreviewSkin(true); - } - - private void SetMainBorderColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Border Color", CustomizingSkin.borderleftcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.borderleftcolour = API.GetLastColorFromSession(); - CustomizingSkin.borderrightcolour = API.GetLastColorFromSession(); - CustomizingSkin.borderbottomcolour = API.GetLastColorFromSession(); - CustomizingSkin.bottomleftcornercolour = API.GetLastColorFromSession(); - CustomizingSkin.bottomrightcornercolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Window Borders", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.borderleft = API.GraphicPickerSession.IdleImage; - CustomizingSkin.borderleftlayout = (int)API.GraphicPickerSession.ImageLayout; - CustomizingImages.borderright = API.GraphicPickerSession.IdleImage; - CustomizingSkin.borderrightlayout = (int)API.GraphicPickerSession.ImageLayout; - CustomizingImages.borderbottom = API.GraphicPickerSession.IdleImage; - CustomizingSkin.borderbottomlayout = (int)API.GraphicPickerSession.ImageLayout; - CustomizingImages.bottomleftcorner = API.GraphicPickerSession.IdleImage; - CustomizingSkin.bottomleftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; - CustomizingImages.bottomrightcorner = API.GraphicPickerSession.IdleImage; - CustomizingSkin.bottomrightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void SetLeftBorderColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Border Color", CustomizingSkin.borderleftcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.borderleftcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Window Borders", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.borderleft = API.GraphicPickerSession.IdleImage; - CustomizingSkin.borderleftlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void SetBottomBorderColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Border Color", CustomizingSkin.borderbottomcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.borderbottomcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Window Borders", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.borderbottom = API.GraphicPickerSession.IdleImage; - CustomizingSkin.borderbottomlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void SetRightBorderColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Border Color", CustomizingSkin.borderrightcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.borderrightcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Window Borders", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.borderright = API.GraphicPickerSession.IdleImage; - CustomizingSkin.borderrightlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void SetBottomLColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Border Color", CustomizingSkin.bottomleftcornercolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.bottomleftcornercolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Window Borders", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.bottomleftcorner = API.GraphicPickerSession.IdleImage; - CustomizingSkin.bottomleftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void SetBottomRBorderColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Border Color", CustomizingSkin.bottomrightcornercolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.bottomrightcornercolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Window Borders", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.bottomrightcorner = API.GraphicPickerSession.IdleImage; - CustomizingSkin.bottomrightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void txtbordersize_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.borderwidth = Convert.ToInt16(txtbordersize.Text); - AddCP(1); - } - catch - { - txtbordersize.Text = CustomizingSkin.borderwidth.ToString(); - } - SetPreviewSkin(false); - } - #endregion - - #region Title Bar - - public void SetupTitleBarValues() - { - //Main color - pnltitlebarcolour.BackColor = CustomizingSkin.titlebarcolour; - pnltitlebarcolour.BackgroundImage = CustomizingImages.titlebar; - pnltitlebarcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.titlebarlayout; - //Corners - cboxtitlebarcorners.Checked = CustomizingSkin.enablecorners; - //Hide some options if corners are disabled. - lbcornerwidth.Visible = CustomizingSkin.enablecorners; - lbcornerwidthpx.Visible = CustomizingSkin.enablecorners; - lbleftcornercolor.Visible = CustomizingSkin.enablecorners; - lbrightcornercolor.Visible = CustomizingSkin.enablecorners; - pnltitlebarleftcornercolour.Visible = CustomizingSkin.enablecorners; - pnltitlebarrightcornercolour.Visible = CustomizingSkin.enablecorners; - txttitlebarcornerwidth.Visible = CustomizingSkin.enablecorners; - //Corner Width - txttitlebarcornerwidth.Text = CustomizingSkin.titlebarcornerwidth.ToString(); - //Left/Right colors - pnltitlebarleftcornercolour.BackColor = CustomizingSkin.leftcornercolour; - pnltitlebarleftcornercolour.BackgroundImage = CustomizingImages.leftcorner; - pnltitlebarleftcornercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.leftcornerlayout; - - pnltitlebarrightcornercolour.BackColor = CustomizingSkin.rightcornercolour; - pnltitlebarrightcornercolour.BackgroundImage = CustomizingImages.rightcorner; - pnltitlebarrightcornercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rightcornerlayout; - - //Height - txttitlebarheight.Text = CustomizingSkin.titlebarheight.ToString(); - - //Icon - txticonfromside.Text = CustomizingSkin.titleiconfromside.ToString(); - txticonfromtop.Text = CustomizingSkin.titleiconfromtop.ToString(); - - } - - private void SetTitlebarColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Titlebar Color", CustomizingSkin.titlebarcolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.titlebarcolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Titlebar", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.titlebar = API.GraphicPickerSession.IdleImage; - CustomizingSkin.titlebarlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void cboxtitlebarcorners_CheckedChanged(object sender, EventArgs e) - { - CustomizingSkin.enablecorners = cboxtitlebarcorners.Checked; - SetPreviewSkin(true); - } - - private void txttitlebarheight_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.titlebarheight = Convert.ToInt16(txttitlebarheight.Text); - AddCP(1); - } - catch - { - txttitlebarheight.Text = CustomizingSkin.titlebarheight.ToString(); - } - SetPreviewSkin(false); - } - - private void txttitlebarcornerwidth_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.titlebarcornerwidth = Convert.ToInt16(txttitlebarcornerwidth.Text); - AddCP(1); - } - catch - { - txttitlebarcornerwidth.Text = CustomizingSkin.titlebarcornerwidth.ToString(); - } - SetPreviewSkin(false); - } - - private void SetLeftCornerColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Left Corner", CustomizingSkin.leftcornercolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.leftcornercolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Left Corner", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.leftcorner = API.GraphicPickerSession.IdleImage; - CustomizingSkin.leftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void SetRightCornerColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Right Corner", CustomizingSkin.rightcornercolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.rightcornercolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Right Corner", false); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.rightcorner = API.GraphicPickerSession.IdleImage; - CustomizingSkin.rightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void txticonfromside_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.titleiconfromside = Convert.ToInt16(txticonfromside.Text); - AddCP(1); - } - catch - { - txticonfromside.Text = CustomizingSkin.titleiconfromside.ToString(); - } - SetPreviewSkin(false); - } - - private void txticonfromtop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.titleiconfromtop = Convert.ToInt16(txticonfromtop.Text); - AddCP(1); - } - catch - { - txticonfromtop.Text = CustomizingSkin.titleiconfromtop.ToString(); - } - SetPreviewSkin(false); - } - - #endregion - - #region Title Button Prep - private void combobuttonoption_SelectedIndexChanged(object sender, EventArgs e) - { - SetupButtonUI(combobuttonoption.Text); - } - - public void SetupButtonUI(string button) - { - pnlminimizebuttonoptions.Hide(); - pnlclosebuttonoptions.Hide(); - pnlrollupbuttonoptions.Hide(); - switch(button) - { - case "Close": - pnlclosebuttonoptions.Show(); - pnlclosebuttonoptions.BringToFront(); - break; - case "Roll Up": - pnlrollupbuttonoptions.Show(); - pnlrollupbuttonoptions.BringToFront(); - break; - case "Minimize": - pnlminimizebuttonoptions.Show(); - pnlminimizebuttonoptions.BringToFront(); - break; - } - SetPreviewSkin(true); - } - - public void SetupButtonValues() - { - ///Minimize - //Color - pnlminimizebuttoncolour.BackColor = CustomizingSkin.minbtncolour; - pnlminimizebuttoncolour.BackgroundImage = CustomizingImages.minbtn; - pnlminimizebuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.minbtnlayout; - //Width, Height - txtminimizebuttonheight.Text = CustomizingSkin.minbtnsize.Height.ToString(); - txtminimizebuttonwidth.Text = CustomizingSkin.minbtnsize.Width.ToString(); - //Side, Top - txtminimizebuttonside.Text = CustomizingSkin.minbtnfromside.ToString(); - txtminimizebuttontop.Text = CustomizingSkin.minbtnfromtop.ToString(); - - ///Rollup - //Color - pnlrollupbuttoncolour.BackColor = CustomizingSkin.rollbtncolour; - pnlrollupbuttoncolour.BackgroundImage = CustomizingImages.rollbtn; - pnlrollupbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rollbtnlayout; - //Width, Height - txtrollupbuttonheight.Text = CustomizingSkin.rollbtnsize.Height.ToString(); - txtrollupbuttonwidth.Text = CustomizingSkin.rollbtnsize.Width.ToString(); - //Side, Top - txtrollupbuttonside.Text = CustomizingSkin.rollbtnfromside.ToString(); - txtrollupbuttontop.Text = CustomizingSkin.rollbtnfromtop.ToString(); - - - ///Close - //Color - pnlclosebuttoncolour.BackColor = CustomizingSkin.closebtncolour; - pnlclosebuttoncolour.BackgroundImage = CustomizingImages.closebtn; - pnlclosebuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.closebtnlayout; - //Width, Height - txtclosebuttonheight.Text = CustomizingSkin.closebtnsize.Height.ToString(); - txtclosebuttonwidth.Text = CustomizingSkin.closebtnsize.Width.ToString(); - //Side, Top - txtclosebuttonfromside.Text = CustomizingSkin.closebtnfromside.ToString(); - txtclosebuttonfromtop.Text = CustomizingSkin.closebtnfromtop.ToString(); - - } - - - #endregion - - - #region Minimize - private void SetMinimizeColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Minimize Color", CustomizingSkin.minbtncolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.minbtncolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("Minimize Button", true); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.minbtn = API.GraphicPickerSession.IdleImage; - CustomizingImages.minbtnclick = API.GraphicPickerSession.MouseDownImage; - CustomizingImages.minbtnhover = API.GraphicPickerSession.MouseOverImage; - CustomizingSkin.minbtnlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void txtminimizebuttonheight_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.minbtnsize.Height = Convert.ToInt16(txtminimizebuttonheight.Text); - AddCP(1); - } - catch - { - txtminimizebuttonheight.Text = CustomizingSkin.minbtnsize.Height.ToString(); - } - SetPreviewSkin(true); - } - - private void txtminimizebuttonwidth_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.minbtnsize.Width = Convert.ToInt16(txtminimizebuttonwidth.Text); - AddCP(1); - } - catch - { - txtminimizebuttonwidth.Text = CustomizingSkin.minbtnsize.Width.ToString(); - } - SetPreviewSkin(true); - } - - private void txtminimizebuttontop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.minbtnfromtop = Convert.ToInt16(txtminimizebuttontop.Text); - AddCP(1); - } - catch - { - txtminimizebuttontop.Text = CustomizingSkin.minbtnfromtop.ToString(); - } - SetPreviewSkin(true); - } - - private void txtminimizebuttonside_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.minbtnfromside = Convert.ToInt16(txtminimizebuttonside.Text); - AddCP(1); - } - catch - { - txtminimizebuttonside.Text = CustomizingSkin.minbtnfromside.ToString(); - } - SetPreviewSkin(true); - } - #endregion - - #region Rollup - private void SetrollupColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("rollup Color", CustomizingSkin.rollbtncolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.rollbtncolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("rollup Button", true); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.rollbtn = API.GraphicPickerSession.IdleImage; - CustomizingImages.rollbtnclick = API.GraphicPickerSession.MouseDownImage; - CustomizingImages.rollbtnhover = API.GraphicPickerSession.MouseOverImage; - CustomizingSkin.rollbtnlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void txtrollupbuttonheight_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.rollbtnsize.Height = Convert.ToInt16(txtrollupbuttonheight.Text); - AddCP(1); - } - catch - { - txtrollupbuttonheight.Text = CustomizingSkin.rollbtnsize.Height.ToString(); - } - SetPreviewSkin(true); - } - - private void txtrollupbuttonwidth_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.rollbtnsize.Width = Convert.ToInt16(txtrollupbuttonwidth.Text); - AddCP(1); - } - catch - { - txtrollupbuttonwidth.Text = CustomizingSkin.rollbtnsize.Width.ToString(); - } - SetPreviewSkin(true); - } - - private void txtrollupbuttontop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.rollbtnfromtop = Convert.ToInt16(txtrollupbuttontop.Text); - AddCP(1); - } - catch - { - txtrollupbuttontop.Text = CustomizingSkin.rollbtnfromtop.ToString(); - } - SetPreviewSkin(true); - } - - private void txtrollupbuttonside_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.rollbtnfromside = Convert.ToInt16(txtrollupbuttonside.Text); - AddCP(1); - } - catch - { - txtrollupbuttonside.Text = CustomizingSkin.rollbtnfromside.ToString(); - } - SetPreviewSkin(true); - } - #endregion - - #region Close - private void SetcloseColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("close Color", CustomizingSkin.closebtncolour); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.closebtncolour = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - else - { - if (API.Upgrades["skinning"] == true) - { - API.CreateGraphicPickerSession("close Button", true); - API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetGraphicPickerResult(); - if (result == "OK") - { - CustomizingImages.closebtn = API.GraphicPickerSession.IdleImage; - CustomizingImages.closebtnclick = API.GraphicPickerSession.MouseDownImage; - CustomizingImages.closebtnhover = API.GraphicPickerSession.MouseOverImage; - CustomizingSkin.closebtnlayout = (int)API.GraphicPickerSession.ImageLayout; - SetPreviewSkin(true); - } - }; - } - } - } - - private void txtclosebuttonheight_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.closebtnsize.Height = Convert.ToInt16(txtclosebuttonheight.Text); - AddCP(1); - } - catch - { - txtclosebuttonheight.Text = CustomizingSkin.closebtnsize.Height.ToString(); - } - SetPreviewSkin(true); - } - - private void txtclosebuttonwidth_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.closebtnsize.Width = Convert.ToInt16(txtclosebuttonwidth.Text); - AddCP(1); - } - catch - { - txtclosebuttonwidth.Text = CustomizingSkin.closebtnsize.Width.ToString(); - } - SetPreviewSkin(true); - } - - private void txtclosebuttonfromtop_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.closebtnfromtop = Convert.ToInt16(txtclosebuttonfromtop.Text); - AddCP(1); - } - catch - { - txtclosebuttonfromtop.Text = CustomizingSkin.closebtnfromtop.ToString(); - } - SetPreviewSkin(true); - } - - private void txtclosebuttonfromside_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.closebtnfromside = Convert.ToInt16(txtclosebuttonfromside.Text); - AddCP(1); - } - catch - { - txtclosebuttonfromside.Text = CustomizingSkin.closebtnfromside.ToString(); - } - SetPreviewSkin(true); - } - #endregion - - #region Menus - Basic Tier - private void btnmenus_Click_1(object sender, EventArgs e) - { - HideAll(); - pnlmenus.Show(); - pnlmenus.BringToFront(); - SetPreviewSkin(true); - pnlmenusintro.BringToFront(); - } - - public void SetupBasicMenuValues() - { - //Menu strip - pnlmenubarbegin.BackColor = CustomizingSkin.Menu_MenuStripGradientBegin; - pnlmenubarend.BackColor = CustomizingSkin.Menu_MenuStripGradientEnd; - - //Toolstrip - pnltoolbarbegin.BackColor = CustomizingSkin.Menu_ToolStripGradientBegin; - pnltoolbarmiddle.BackColor = CustomizingSkin.Menu_ToolStripGradientMiddle; - pnltoolbarend.BackColor = CustomizingSkin.Menu_ToolStripGradientEnd; - - //Status - pnlstatusbegin.BackColor = CustomizingSkin.Menu_StatusStripGradientBegin; - pnlstatusend.BackColor = CustomizingSkin.Menu_StatusStripGradientEnd; - - //Dropdown BG - pnldropdownbg.BackColor = CustomizingSkin.Menu_ToolStripDropDownBackground; - - //Text Color - pnlmenutextcolor.BackColor = CustomizingSkin.Menu_TextColor; - } - - private void MenuBegin(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Bar Begin", CustomizingSkin.Menu_MenuStripGradientBegin); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuStripGradientBegin = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void MenuEnd(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Bar End", CustomizingSkin.Menu_MenuStripGradientEnd); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuStripGradientEnd = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void ToolBarBegin(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Tool Bar Begin", CustomizingSkin.Menu_ToolStripGradientBegin); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ToolStripGradientBegin = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void ToolBarEnd(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Tool Bar End", CustomizingSkin.Menu_ToolStripGradientEnd); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ToolStripGradientEnd = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void ToolBarMiddle(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Tool Bar Middle", CustomizingSkin.Menu_ToolStripGradientMiddle); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ToolStripGradientMiddle = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void StatusBegin(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Status Bar Begin", CustomizingSkin.Menu_StatusStripGradientBegin); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_StatusStripGradientBegin = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void StatusEnd(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Status Bar End", CustomizingSkin.Menu_StatusStripGradientEnd); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_StatusStripGradientEnd = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void DropDownBG(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Dropdown BG", CustomizingSkin.Menu_ToolStripDropDownBackground); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ToolStripDropDownBackground = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void btnbasic_Click(object sender, EventArgs e) - { - pnlbasic.Show(); - pnlbasic.BringToFront(); - } - - private void SetMenuTextColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Text Color", CustomizingSkin.Menu_TextColor); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_TextColor = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - #endregion - - #region Menus - Dropdowns - private void btndropdown_Click(object sender, EventArgs e) - { - pnldropdown.Show(); - pnldropdown.BringToFront(); - SetPreviewSkin(true); - } - - public void SetupDropdownValues() - { - //Highlight Color - Basic - pnlhborder.BackColor = CustomizingSkin.Menu_MenuItemBorder; - pnlhcolor.BackColor = CustomizingSkin.Menu_MenuItemSelected; - - //Image Margin - pnlmarginbegin.BackColor = CustomizingSkin.Menu_ImageMarginGradientBegin; - pnlmarginmiddle.BackColor = CustomizingSkin.Menu_ImageMarginGradientMiddle; - pnlmarginend.BackColor = CustomizingSkin.Menu_ImageMarginGradientEnd; - - //Drop-Down Border - pnlddborder.BackColor = CustomizingSkin.Menu_MenuBorder; - } - - private void HighlightBorder(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Highlight Border", CustomizingSkin.Menu_MenuItemBorder); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuItemBorder = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void HighlightColor(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Highlight Color", CustomizingSkin.Menu_MenuItemSelected); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void MarginBegin(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Margin Begin", CustomizingSkin.Menu_ImageMarginGradientBegin); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ImageMarginGradientBegin = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void MarginEnd(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Margin End", CustomizingSkin.Menu_ImageMarginGradientEnd); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ImageMarginGradientEnd = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void MarginMiddle(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Margin Middle", CustomizingSkin.Menu_ImageMarginGradientMiddle); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ImageMarginGradientMiddle = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void MenuBorder(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Border", CustomizingSkin.Menu_MenuBorder); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuBorder = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - #endregion - - public void SetupAdvancedMenuValues() - { - //Checkboxes - pnlcheckbg.BackColor = CustomizingSkin.Menu_CheckBackground; - - //Buttons - Highlight - pnlbuttonselected.BackColor = CustomizingSkin.Menu_ButtonSelectedHighlight; - pnlbuttonpressed.BackColor = CustomizingSkin.Menu_ButtonPressedHighlight; - pnlbuttonchecked.BackColor = CustomizingSkin.Menu_ButtonCheckedHighlight; - - //Advanced Buttons - pnlselectedbegin.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientBegin; - pnlselectedmiddle.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientMiddle; - pnlselectedend.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientEnd; - - pnlpressedbegin.BackColor = CustomizingSkin.Menu_ButtonPressedGradientBegin; - pnlpressedmiddle.BackColor = CustomizingSkin.Menu_ButtonPressedGradientMiddle; - pnlpressedend.BackColor = CustomizingSkin.Menu_ButtonPressedGradientEnd; - - //Menu Items - pnlitemselected.BackColor = CustomizingSkin.Menu_MenuItemSelected; - pnlitemselectedbegin.BackColor = CustomizingSkin.Menu_MenuItemSelectedGradientBegin; - pnlitemselectedend.BackColor = CustomizingSkin.Menu_MenuItemSelectedGradientEnd; - - } - - private void btnadvanced_Click(object sender, EventArgs e) - { - pnladvanced.Show(); - pnladvanced.BringToFront(); - SetPreviewSkin(true); - } - - private void SetSelectedBegin(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Selected Begin", CustomizingSkin.Menu_ButtonSelectedGradientBegin); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonSelectedGradientBegin = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetSelectedMiddle(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Selected Middle", CustomizingSkin.Menu_ButtonSelectedGradientMiddle); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonSelectedGradientMiddle = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetSelectedEnd(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Selected End", CustomizingSkin.Menu_ButtonSelectedGradientEnd); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonSelectedGradientEnd = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetPressedBegin(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Pressed Begin", CustomizingSkin.Menu_ButtonPressedGradientBegin); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonPressedGradientBegin = API.GetLastColorFromSession(); - CustomizingSkin.Menu_ButtonCheckedGradientBegin = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetPressedMiddle(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Pressed Middle", CustomizingSkin.Menu_ButtonPressedGradientMiddle); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonPressedGradientMiddle = API.GetLastColorFromSession(); - CustomizingSkin.Menu_ButtonCheckedGradientMiddle = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetPressedEnd(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Pressed End", CustomizingSkin.Menu_ButtonPressedGradientEnd); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonPressedGradientEnd = API.GetLastColorFromSession(); - CustomizingSkin.Menu_ButtonCheckedGradientEnd = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void btnmorebuttons_Click(object sender, EventArgs e) - { - pnlmore.Show(); - pnlmore.BringToFront(); - SetPreviewSkin(true); - } - - private void SetCheckBG(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Checkbox Background", CustomizingSkin.Menu_CheckBackground); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_CheckBackground = API.GetLastColorFromSession(); - CustomizingSkin.Menu_CheckPressedBackground = API.GetLastColorFromSession(); - CustomizingSkin.Menu_CheckSelectedBackground = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetButtonCheckBG(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Checked Background", CustomizingSkin.Menu_ButtonCheckedHighlight); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonCheckedHighlight = API.GetLastColorFromSession(); - CustomizingSkin.Menu_ButtonCheckedHighlightBorder = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetButtonSelectedBG(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Selected Background", CustomizingSkin.Menu_ButtonSelectedHighlight); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonSelectedHighlight = API.GetLastColorFromSession(); - CustomizingSkin.Menu_ButtonSelectedHighlightBorder = API.GetLastColorFromSession(); - CustomizingSkin.Menu_ButtonSelectedBorder = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetButtonPressedBG(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Button Pressed Background", CustomizingSkin.Menu_ButtonPressedHighlight); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_ButtonPressedHighlight = API.GetLastColorFromSession(); - CustomizingSkin.Menu_ButtonPressedHighlightBorder = API.GetLastColorFromSession(); - CustomizingSkin.Menu_ButtonPressedBorder = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetItemSelected(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Item Selected", CustomizingSkin.Menu_MenuItemSelected); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetItemSelectedBegin(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Item Selected Begin", CustomizingSkin.Menu_MenuItemSelectedGradientBegin); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuItemSelectedGradientBegin = API.GetLastColorFromSession(); - CustomizingSkin.Menu_MenuItemPressedGradientMiddle = API.GetLastColorFromSession(); - CustomizingSkin.Menu_MenuItemPressedGradientBegin = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void SetItemSelectedEnd(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - API.CreateColorPickerSession("Menu Item Selected End", CustomizingSkin.Menu_MenuItemSelectedGradientEnd); - API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - CustomizingSkin.Menu_MenuItemSelectedGradientEnd = API.GetLastColorFromSession(); - CustomizingSkin.Menu_MenuItemPressedGradientEnd = API.GetLastColorFromSession(); - - SetPreviewSkin(true); - AddCP(rand.Next(0, 5)); - }; - } - } - - private void btnwindowcomposition_Click(object sender, EventArgs e) - { - HideAll(); - pnldesktopcomposition.Show(); - pnldesktopcomposition.BringToFront(); - pnlfancyintro.BringToFront(); - SetPreviewSkin(true); - } - - public void SetupWindowEffect<T>(ComboBox cb, T style) - { - cb.Items.Clear(); - var vals = Enum.GetValues(typeof(T)).Cast<T>(); - foreach(var item in vals) - { - cb.Items.Add(item.ToString()); - } - cb.SelectedItem = style.ToString(); - } - - public void SetAnimation<T>(ComboBox cb, ref T objToSet) - { - string text = cb.SelectedItem.ToString(); - var vals = Enum.GetValues(typeof(T)).Cast<T>(); - foreach (var item in vals) - { - if(item.ToString() == text) - { - objToSet = item; - codepointstogive += 1; - } - } - - } - - public void SetupAnimationStyleValues() - { - SetupWindowEffect<WindowAnimationStyle>(cbopenanim, CustomizingSkin.WindowOpenAnimation); - SetupWindowEffect<WindowAnimationStyle>(cbcloseanim, CustomizingSkin.WindowCloseAnimation); - SetupWindowEffect<WindowDragEffect>(cbdrageffect, CustomizingSkin.DragAnimation); - - //Drag fade. - txtfadespeed.Text = CustomizingSkin.DragFadeInterval.ToString(); - txtdragfadedec.Text = ((decimal)CustomizingSkin.DragFadeSpeed).ToString(); - txtdragopacitydec.Text = ((decimal)CustomizingSkin.DragFadeLevel).ToString(); - - //Drag Shake - txtshakeminoffset.Text = CustomizingSkin.ShakeMinOffset.ToString(); - txtshakemax.Text = CustomizingSkin.ShakeMaxOffset.ToString(); - - //Window Fade - txtwinfadespeed.Text = CustomizingSkin.WindowFadeTime.ToString(); - txtwinfadedec.Text = CustomizingSkin.WindowFadeSpeed.ToString(); - - } - - - private void btnfancywindows_Click(object sender, EventArgs e) - { - pnlfancywindows.BringToFront(); - SetPreviewSkin(true); - } - - private void cbopenanim_SelectedIndexChanged(object sender, EventArgs e) - { - SetAnimation<WindowAnimationStyle>(cbopenanim, ref CustomizingSkin.WindowOpenAnimation); - } - - private void cbcloseanim_SelectedIndexChanged(object sender, EventArgs e) - { - SetAnimation<WindowAnimationStyle>(cbcloseanim, ref CustomizingSkin.WindowCloseAnimation); - } - - private void cbdrageffect_SelectedIndexChanged(object sender, EventArgs e) - { - SetAnimation<WindowDragEffect>(cbdrageffect, ref CustomizingSkin.DragAnimation); - } - - private void txtfadespeed_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.DragFadeInterval = Convert.ToInt32(txtfadespeed.Text); - AddCP(1); - } - catch - { - txtfadespeed.Text = CustomizingSkin.DragFadeInterval.ToString(); - } - } - - private void txtdragfadedec_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.DragFadeSpeed = Convert.ToDouble(txtdragfadedec.Text); - AddCP(1); - } - catch - { - txtdragfadedec.Text = CustomizingSkin.DragFadeSpeed.ToString(); - } - } - - private void btnfancydragging_Click(object sender, EventArgs e) - { - pnlfancydragging.Show(); - pnlfancydragging.BringToFront(); - SetPreviewSkin(true); - } - - private void txtdragopacitydec_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.DragFadeLevel = Convert.ToDouble(txtdragopacitydec.Text); - AddCP(1); - } - catch - { - txtdragopacitydec.Text = CustomizingSkin.DragFadeLevel.ToString(); - } - } - - private void txtshakemax_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.ShakeMaxOffset = Convert.ToInt32(txtshakemax.Text); - AddCP(1); - } - catch - { - txtshakemax.Text = CustomizingSkin.ShakeMaxOffset.ToString(); - } - } - - private void txtshakeminoffset_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.ShakeMinOffset = Convert.ToInt32(txtshakeminoffset.Text); - AddCP(1); - } - catch - { - txtshakeminoffset.Text = CustomizingSkin.ShakeMinOffset.ToString(); - } - } - - private void txtwinfadespeed_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.WindowFadeTime = Convert.ToInt32(txtwinfadespeed.Text); - AddCP(1); - } - catch - { - txtwinfadespeed.Text = CustomizingSkin.WindowFadeTime.ToString(); - } - } - - private void txtwinfadedec_TextChanged(object sender, EventArgs e) - { - try - { - CustomizingSkin.WindowFadeSpeed = Convert.ToDecimal(txtwinfadedec.Text); - AddCP(1); - } - catch - { - txtwinfadedec.Text = CustomizingSkin.WindowFadeSpeed.ToString(); - } - } - - private void btnmore_Click(object sender, EventArgs e) - { - pnlluaoptions.Show(); - pnlluaoptions.BringToFront(); - SetupLuaUI(); - - } - - public void SetupLuaUI() - { - pnlluafield.Controls.Clear(); - flmorebuttons.Controls.Clear(); - if (API.LuaShifterRegistry == null) - { - var l = new Label(); - l.Dock = DockStyle.Fill; - l.TextAlign = ContentAlignment.MiddleCenter; - l.Font = new Font("Microsoft Sans Serif", 12); - l.Text = @"Nothing to show here. - -There are no options to show here yet. - -You can add options in the Lua interpreter using the shifter_add_category(string name), shifter_add_value(string category, string name, value), and shifter_remove_category(string name) methods. Applications may also add their own values."; - pnlluafield.Controls.Add(l); - l.Show(); - } - else - { - foreach (var kv in API.LuaShifterRegistry) - { - var b = new Button(); - b.Text = kv.Key; - b.FlatStyle = FlatStyle.Flat; - b.AutoSize = true; - b.AutoSizeMode = AutoSizeMode.GrowAndShrink; - flmorebuttons.Controls.Add(b); - b.Show(); - b.Click += (object s, EventArgs a) => - { - SetupLuaForm(kv.Value); - }; - } - } - } - - public void SetupLuaForm(Dictionary<string, object> d) - { - pnlluafield.Controls.Clear(); - foreach(var kv in d) - { - IShifterSetting l = new ShifterTextInput(); - if (kv.Value is string) - l = new ShifterTextInput(); - if (kv.Value is Image) - l = new ShifterGraphicInput(); - if (kv.Value is Color) - l = new ShifterColorInput(); - if (kv.Value is int || kv.Value is float || kv.Value is double || kv.Value is decimal) - l = new ShifterIntInput(); - if(l is ShifterIntInput) - { - var i = l as ShifterIntInput; - if (kv.Value is int) - i.NoDecimal = true; - else - i.NoDecimal = false; - } - if (pnlluafield.Controls.Count > 0) - { - var ctrl = pnlluafield.Controls[pnlluafield.Controls.Count - 1]; - l.Location = new Point(ctrl.Left + ctrl.Width + 5, ctrl.Top); - if(l.Left + l.Width > pnlluafield.Width) - { - l.Left = 2; - l.Top = ctrl.Top + ctrl.Height + 2; - } - } - else - { - l.Location = new Point(2, 2); - } - - pnlluafield.Controls.Add(l); - l.Show(); - l.Font = new Font("Microsoft Sans Serif", 9); - l.Text = kv.Key; - l.Value = kv.Value; - l.OnValueChange += (hello, its_me) => - { - foreach(var dict in API.LuaShifterRegistry) - { - if(API.LuaShifterRegistry[dict.Key] == d) - { - API.LuaShifterRegistry[dict.Key][kv.Key] = l.Value; - } - } - }; - - } - } - } -} diff --git a/source/WindowsFormsApplication1/Shifter.resx b/source/WindowsFormsApplication1/Shifter.resx deleted file mode 100644 index 2b9e8c1..0000000 --- a/source/WindowsFormsApplication1/Shifter.resx +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="ColorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="clocktick.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>140, 17</value> - </metadata> - <metadata name="customizationtime.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>238, 17</value> - </metadata> - <metadata name="timerearned.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>390, 17</value> - </metadata> - <data name="Label64.Text" xml:space="preserve"> - <value>The Shifter is your one-stop shop for customizing every aspect of ShiftOS. From colors to fonts, from images to sizes and locations, we have it all! - -Simply click the buttons on the right to choose a category, and then from there, choose a sub-category, and have fun customizing! In ShiftOS, the sky and your hard drive space is the limit!</value> - </data> - <metadata name="predesktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>508, 17</value> - </metadata> - <metadata name="predesktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>508, 17</value> - </metadata> - <data name="Label109.Text" xml:space="preserve"> - <value>Have you made a nice skin and want a clean slate to make another? Do you want to reverse back to regular ShiftOS? Well, fear not, the 'Reset' button is here. Just click it, and ShiftOS will wok it's magic.</value> - </data> - <data name="label116.Text" xml:space="preserve"> - <value>The Advanced Shifter allows you to customize even more of ShiftOS by letting you customize virtually every aspect of the various menus in ShiftOS. - -These menus include the App Launcher menu, any context menus, and any toolbars within applications. - -There's a lot to customize, so we've grouped everything into categories on the left. - -Customize to your heart's content!</value> - </data> - <metadata name="tmrfix.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>673, 17</value> - </metadata> - <metadata name="tmrdelay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>756, 17</value> - </metadata> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShifterColorInput.Designer.cs b/source/WindowsFormsApplication1/ShifterColorInput.Designer.cs deleted file mode 100644 index 47cf0a1..0000000 --- a/source/WindowsFormsApplication1/ShifterColorInput.Designer.cs +++ /dev/null @@ -1,77 +0,0 @@ -namespace ShiftOS -{ - partial class ShifterColorInput - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.pnlmainbuttoncolour = new System.Windows.Forms.Panel(); - this.lblabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // pnlmainbuttoncolour - // - this.pnlmainbuttoncolour.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlmainbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmainbuttoncolour.Location = new System.Drawing.Point(128, 3); - this.pnlmainbuttoncolour.MaximumSize = new System.Drawing.Size(41, 20); - this.pnlmainbuttoncolour.Name = "pnlmainbuttoncolour"; - this.pnlmainbuttoncolour.Size = new System.Drawing.Size(41, 20); - this.pnlmainbuttoncolour.TabIndex = 3; - // - // lblabel - // - this.lblabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblabel.Location = new System.Drawing.Point(3, 6); - this.lblabel.Name = "lblabel"; - this.lblabel.Size = new System.Drawing.Size(122, 19); - this.lblabel.TabIndex = 2; - this.lblabel.Text = "Main Button Colour:"; - this.lblabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // ShifterColorInput - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.pnlmainbuttoncolour); - this.Controls.Add(this.lblabel); - this.Name = "ShifterColorInput"; - this.Size = new System.Drawing.Size(173, 28); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel pnlmainbuttoncolour; - private System.Windows.Forms.Label lblabel; - - } -} diff --git a/source/WindowsFormsApplication1/ShifterColorInput.cs b/source/WindowsFormsApplication1/ShifterColorInput.cs deleted file mode 100644 index 11bedf0..0000000 --- a/source/WindowsFormsApplication1/ShifterColorInput.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class ShifterColorInput : IShifterSetting - { - public ShifterColorInput() - { - InitializeComponent(); - pnlmainbuttoncolour.Click += (o, e) => - { - API.CreateColorPickerSession(Text, pnlmainbuttoncolour.BackColor); - API.ColorPickerSession.FormClosing += (s, a) => - { - var res = API.GetLastColorFromSession(); - pnlmainbuttoncolour.BackColor = res; - InvokeEvent(o, e); - }; - }; - } - - public override string Text - { - get { return lblabel.Text; } - set { lblabel.Text = value; } - } - - public override object Value - { - get { return pnlmainbuttoncolour.BackColor; } - set - { - pnlmainbuttoncolour.BackColor = (Color)value; - } - } - - - } -} diff --git a/source/WindowsFormsApplication1/ShifterColorInput.resx b/source/WindowsFormsApplication1/ShifterColorInput.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/ShifterColorInput.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShifterGraphicInput.Designer.cs b/source/WindowsFormsApplication1/ShifterGraphicInput.Designer.cs deleted file mode 100644 index b09416f..0000000 --- a/source/WindowsFormsApplication1/ShifterGraphicInput.Designer.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace ShiftOS -{ - partial class ShifterGraphicInput - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.pnlmainbuttoncolour = new System.Windows.Forms.Panel(); - this.lblabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // pnlmainbuttoncolour - // - this.pnlmainbuttoncolour.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlmainbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlmainbuttoncolour.Location = new System.Drawing.Point(129, 3); - this.pnlmainbuttoncolour.MaximumSize = new System.Drawing.Size(41, 20); - this.pnlmainbuttoncolour.Name = "pnlmainbuttoncolour"; - this.pnlmainbuttoncolour.Size = new System.Drawing.Size(41, 20); - this.pnlmainbuttoncolour.TabIndex = 3; - // - // lblabel - // - this.lblabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblabel.Location = new System.Drawing.Point(3, 6); - this.lblabel.Name = "lblabel"; - this.lblabel.Size = new System.Drawing.Size(123, 18); - this.lblabel.TabIndex = 2; - this.lblabel.Text = "Main Button Colour:"; - this.lblabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // ShifterGraphicInput - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.pnlmainbuttoncolour); - this.Controls.Add(this.lblabel); - this.Name = "ShifterGraphicInput"; - this.Size = new System.Drawing.Size(174, 27); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel pnlmainbuttoncolour; - private System.Windows.Forms.Label lblabel; - } -} diff --git a/source/WindowsFormsApplication1/ShifterGraphicInput.cs b/source/WindowsFormsApplication1/ShifterGraphicInput.cs deleted file mode 100644 index 8e15e07..0000000 --- a/source/WindowsFormsApplication1/ShifterGraphicInput.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class ShifterGraphicInput : IShifterSetting - { - public ShifterGraphicInput() - { - InitializeComponent(); - pnlmainbuttoncolour.Click += (o, e) => - { - API.CreateGraphicPickerSession(Text, false); - API.GraphicPickerSession.FormClosing += (s, a) => - { - var res = API.GetGraphicPickerResult(); - if(res != "fail") - { - pnlmainbuttoncolour.BackgroundImage = API.GraphicPickerSession.IdleImage; - InvokeEvent(o, e); - } - }; - }; - } - - public override string Text - { - get { return lblabel.Text; } - set { lblabel.Text = value; } - } - - public override object Value - { - get { return pnlmainbuttoncolour.BackgroundImage; } - set - { - pnlmainbuttoncolour.BackgroundImage = (Image)value; - } - } - - } -} diff --git a/source/WindowsFormsApplication1/ShifterGraphicInput.resx b/source/WindowsFormsApplication1/ShifterGraphicInput.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/ShifterGraphicInput.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShifterIntInput.Designer.cs b/source/WindowsFormsApplication1/ShifterIntInput.Designer.cs deleted file mode 100644 index 130db0c..0000000 --- a/source/WindowsFormsApplication1/ShifterIntInput.Designer.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace ShiftOS -{ - partial class ShifterIntInput - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.txttext = new System.Windows.Forms.TextBox(); - this.Label51 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // txttext - // - this.txttext.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.txttext.BackColor = System.Drawing.Color.White; - this.txttext.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txttext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txttext.ForeColor = System.Drawing.Color.Black; - this.txttext.Location = new System.Drawing.Point(174, 3); - this.txttext.MinimumSize = new System.Drawing.Size(5, 2); - this.txttext.Name = "txttext"; - this.txttext.Size = new System.Drawing.Size(36, 22); - this.txttext.TabIndex = 32; - this.txttext.TextChanged += new System.EventHandler(this.txttext_TextChanged); - // - // Label51 - // - this.Label51.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.Label51.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label51.Location = new System.Drawing.Point(0, 0); - this.Label51.Name = "Label51"; - this.Label51.Size = new System.Drawing.Size(168, 29); - this.Label51.TabIndex = 31; - this.Label51.Text = "Label:"; - this.Label51.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // ShifterIntInput - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.Controls.Add(this.txttext); - this.Controls.Add(this.Label51); - this.Name = "ShifterIntInput"; - this.Size = new System.Drawing.Size(213, 29); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox txttext; - private System.Windows.Forms.Label Label51; - - } -} diff --git a/source/WindowsFormsApplication1/ShifterIntInput.cs b/source/WindowsFormsApplication1/ShifterIntInput.cs deleted file mode 100644 index 782d265..0000000 --- a/source/WindowsFormsApplication1/ShifterIntInput.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class ShifterIntInput : IShifterSetting - { - public ShifterIntInput() - { - InitializeComponent(); - } - - public bool NoDecimal - { - get; - set; - } - - public override string Text - { - get { return Label51.Text; } - set { Label51.Text = value; } - } - - public override object Value - { - get { - if (NoDecimal) - return Convert.ToInt32(txttext.Text); - else - return Convert.ToDecimal(txttext.Text); - } - set - { - txttext.Text = value.ToString(); - } - } - - private void txttext_TextChanged(object sender, EventArgs e) - { - try - { - if (NoDecimal) - Value = Convert.ToInt32(txttext.Text); - else - Value = Convert.ToDecimal(txttext.Text); - InvokeEvent(sender, e); - } - catch - { - txttext.Text = Value.ToString(); - } - } - } -} diff --git a/source/WindowsFormsApplication1/ShifterIntInput.resx b/source/WindowsFormsApplication1/ShifterIntInput.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/ShifterIntInput.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShifterTextInput.Designer.cs b/source/WindowsFormsApplication1/ShifterTextInput.Designer.cs deleted file mode 100644 index 9da62c6..0000000 --- a/source/WindowsFormsApplication1/ShifterTextInput.Designer.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace ShiftOS -{ - partial class ShifterTextInput - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.txttext = new System.Windows.Forms.TextBox(); - this.Label51 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // txttext - // - this.txttext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txttext.BackColor = System.Drawing.Color.White; - this.txttext.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txttext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txttext.ForeColor = System.Drawing.Color.Black; - this.txttext.Location = new System.Drawing.Point(106, 7); - this.txttext.MinimumSize = new System.Drawing.Size(5, 2); - this.txttext.Name = "txttext"; - this.txttext.Size = new System.Drawing.Size(116, 22); - this.txttext.TabIndex = 32; - // - // Label51 - // - this.Label51.Dock = System.Windows.Forms.DockStyle.Left; - this.Label51.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label51.Location = new System.Drawing.Point(0, 0); - this.Label51.Name = "Label51"; - this.Label51.Size = new System.Drawing.Size(100, 29); - this.Label51.TabIndex = 31; - this.Label51.Text = "Label:"; - this.Label51.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // ShifterTextInput - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.Controls.Add(this.txttext); - this.Controls.Add(this.Label51); - this.Name = "ShifterTextInput"; - this.Size = new System.Drawing.Size(222, 29); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox txttext; - private System.Windows.Forms.Label Label51; - } -} diff --git a/source/WindowsFormsApplication1/ShifterTextInput.cs b/source/WindowsFormsApplication1/ShifterTextInput.cs deleted file mode 100644 index 6e59649..0000000 --- a/source/WindowsFormsApplication1/ShifterTextInput.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class ShifterTextInput : IShifterSetting - { - public ShifterTextInput() - { - InitializeComponent(); - txttext.TextChanged += (o, e) => - { - Value = txttext.Text; - InvokeEvent(o, e); - }; - } - - public override string Text - { - get - { - return Label51.Text; - } - set - { - Label51.Text = value; - } - } - - public override object Value - { - get - { - return txttext.Text; - } - set - { - txttext.Text = value as string; - } - } - - - - } - - public class IShifterSetting : UserControl - { - public virtual string Text { get; set; } - public virtual object Value { get; set; } - public event EventHandler OnValueChange; - - public void InvokeEvent(object s, EventArgs a) - { - OnValueChange?.Invoke(s, a); - } - } - -} diff --git a/source/WindowsFormsApplication1/ShifterTextInput.resx b/source/WindowsFormsApplication1/ShifterTextInput.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/ShifterTextInput.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Shiftnet.Designer.cs b/source/WindowsFormsApplication1/Shiftnet.Designer.cs deleted file mode 100644 index 5d20f14..0000000 --- a/source/WindowsFormsApplication1/Shiftnet.Designer.cs +++ /dev/null @@ -1,144 +0,0 @@ -namespace ShiftOS -{ - partial class Shiftnet - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.pnlcontrols = new System.Windows.Forms.Panel(); - this.btngo = new System.Windows.Forms.Button(); - this.btnhome = new System.Windows.Forms.Button(); - this.txtaddress = new System.Windows.Forms.TextBox(); - this.wbshiftnet = new System.Windows.Forms.WebBrowser(); - this.panel1 = new System.Windows.Forms.Panel(); - this.pnlcontrols.SuspendLayout(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // pnlcontrols - // - this.pnlcontrols.BackColor = System.Drawing.Color.Gray; - this.pnlcontrols.Controls.Add(this.btngo); - this.pnlcontrols.Controls.Add(this.btnhome); - this.pnlcontrols.Controls.Add(this.txtaddress); - this.pnlcontrols.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlcontrols.Location = new System.Drawing.Point(0, 0); - this.pnlcontrols.Name = "pnlcontrols"; - this.pnlcontrols.Size = new System.Drawing.Size(792, 42); - this.pnlcontrols.TabIndex = 0; - // - // btngo - // - this.btngo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btngo.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btngo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btngo.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btngo.ForeColor = System.Drawing.Color.White; - this.btngo.Location = new System.Drawing.Point(731, 9); - this.btngo.Name = "btngo"; - this.btngo.Size = new System.Drawing.Size(45, 23); - this.btngo.TabIndex = 2; - this.btngo.Text = "Go"; - this.btngo.UseVisualStyleBackColor = true; - this.btngo.Click += new System.EventHandler(this.btngo_Click); - // - // btnhome - // - this.btnhome.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnhome.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnhome.Font = new System.Drawing.Font("Times New Roman", 8.25F); - this.btnhome.ForeColor = System.Drawing.Color.White; - this.btnhome.Location = new System.Drawing.Point(4, 12); - this.btnhome.Name = "btnhome"; - this.btnhome.Size = new System.Drawing.Size(75, 23); - this.btnhome.TabIndex = 1; - this.btnhome.Text = "Home"; - this.btnhome.UseVisualStyleBackColor = true; - this.btnhome.Click += new System.EventHandler(this.btnhome_Click); - // - // txtaddress - // - this.txtaddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtaddress.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtaddress.Font = new System.Drawing.Font("Times New Roman", 13F); - this.txtaddress.Location = new System.Drawing.Point(85, 12); - this.txtaddress.Name = "txtaddress"; - this.txtaddress.Size = new System.Drawing.Size(640, 20); - this.txtaddress.TabIndex = 0; - this.txtaddress.Text = "shiftnet://main"; - // - // wbshiftnet - // - this.wbshiftnet.AllowWebBrowserDrop = false; - this.wbshiftnet.Dock = System.Windows.Forms.DockStyle.Fill; - this.wbshiftnet.IsWebBrowserContextMenuEnabled = false; - this.wbshiftnet.Location = new System.Drawing.Point(0, 42); - this.wbshiftnet.MinimumSize = new System.Drawing.Size(20, 20); - this.wbshiftnet.Name = "wbshiftnet"; - this.wbshiftnet.Size = new System.Drawing.Size(792, 463); - this.wbshiftnet.TabIndex = 1; - this.wbshiftnet.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.LinkInterceptor); - // - // panel1 - // - this.panel1.Controls.Add(this.wbshiftnet); - this.panel1.Controls.Add(this.pnlcontrols); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(792, 505); - this.panel1.TabIndex = 2; - // - // Shiftnet - // - this.AcceptButton = this.btngo; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnhome; - this.ClientSize = new System.Drawing.Size(792, 505); - this.Controls.Add(this.panel1); - this.Name = "Shiftnet"; - this.Text = "MainForm"; - this.Load += new System.EventHandler(this.MainForm_Load); - this.pnlcontrols.ResumeLayout(false); - this.pnlcontrols.PerformLayout(); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel pnlcontrols; - private System.Windows.Forms.WebBrowser wbshiftnet; - private System.Windows.Forms.Button btngo; - private System.Windows.Forms.Button btnhome; - private System.Windows.Forms.TextBox txtaddress; - private System.Windows.Forms.Panel panel1; - - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Shiftnet.cs b/source/WindowsFormsApplication1/Shiftnet.cs deleted file mode 100644 index cbcab1b..0000000 --- a/source/WindowsFormsApplication1/Shiftnet.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.Net; - -namespace ShiftOS -{ - public partial class Shiftnet : Form - { - public Shiftnet() - { - InitializeComponent(); - } - - private void MainForm_Load(object sender, EventArgs e) - { - InitialSetup(); - } - - public void InitialSetup() - { - pnlcontrols.BackColor = API.CurrentSkin.titlebarcolour; - wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); - txtaddress.Text = WebLayer.LastUrl; - } - - private void LinkInterceptor(object sender, WebBrowserNavigatingEventArgs e) - { - var url = e.Url.OriginalString; - if (url != "about:blank") - { - var surl = url.Replace("http://", "shiftnet://"); - wbshiftnet.DocumentText = WebLayer.VisitSite(surl); - txtaddress.Text = WebLayer.LastUrl; - } - } - - private void btngo_Click(object sender, EventArgs e) - { - if (txtaddress.Text.ToLower().StartsWith("shiftnet://")) - { - wbshiftnet.DocumentText = WebLayer.VisitSite(txtaddress.Text); - txtaddress.Text = WebLayer.LastUrl; - } - else - { - wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://not_found"); - txtaddress.Text = WebLayer.LastUrl; - } - } - - private void btnhome_Click(object sender, EventArgs e) - { - wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); - txtaddress.Text = WebLayer.LastUrl; - } - } - - public class WebLayer - { - private static string HtmlTemplate = "<html><head><title>Shiftnet Page#BODY#"; - public static string LastUrl = null; - - public static string VisitSite(string url) - { - var wc = new WebClient(); - if (url.ToLower().EndsWith(".stml") || url.ToLower().EndsWith(".rnp")) - { - try - { - string content = wc.DownloadString(url.Replace("shiftnet://", "http://www.playshiftos.ml/shiftnet/www/")); - if (content.StartsWith("")) - { - LastUrl = url; - return HtmlTemplate.Replace("#BODY#", content.Replace("", "")); - } - else - { - LastUrl = "shiftnet:not_found"; - - return HtmlTemplate.Replace("#BODY#", "That page was not found."); - } - } - catch - { - LastUrl = "shiftnet://not_found"; - return HtmlTemplate.Replace("#BODY#", "That page was not found."); - } - } - else - { - if (url.EndsWith("/")) - { - return VisitSite(url + "home.rnp"); - } - else - { - return VisitSite(url + "/home.rnp"); - } - - } - } - } - -} diff --git a/source/WindowsFormsApplication1/Shiftnet.resx b/source/WindowsFormsApplication1/Shiftnet.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/Shiftnet.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShiftnetDecryptor.Designer.cs b/source/WindowsFormsApplication1/ShiftnetDecryptor.Designer.cs deleted file mode 100644 index 3f7d4a7..0000000 --- a/source/WindowsFormsApplication1/ShiftnetDecryptor.Designer.cs +++ /dev/null @@ -1,170 +0,0 @@ -namespace ShiftOS -{ - partial class ShiftnetDecryptor - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.label1 = new System.Windows.Forms.Label(); - this.txtstatus = new System.Windows.Forms.RichTextBox(); - this.txtaddress = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.btnstart = new System.Windows.Forms.Button(); - this.panel1 = new System.Windows.Forms.Panel(); - this.tmrdecrypt = new System.Windows.Forms.Timer(this.components); - this.pgstatus = new ShiftOS.ProgressBarEX(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); - this.label1.Location = new System.Drawing.Point(13, 13); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(744, 43); - this.label1.TabIndex = 1; - this.label1.Text = " == Decryption Status =="; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // txtstatus - // - this.txtstatus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtstatus.BackColor = System.Drawing.Color.Black; - this.txtstatus.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtstatus.ForeColor = System.Drawing.Color.White; - this.txtstatus.Location = new System.Drawing.Point(17, 151); - this.txtstatus.Name = "txtstatus"; - this.txtstatus.ReadOnly = true; - this.txtstatus.Size = new System.Drawing.Size(740, 280); - this.txtstatus.TabIndex = 2; - this.txtstatus.Text = ""; - // - // txtaddress - // - this.txtaddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtaddress.BackColor = System.Drawing.Color.Gray; - this.txtaddress.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtaddress.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.txtaddress.Location = new System.Drawing.Point(100, 121); - this.txtaddress.Name = "txtaddress"; - this.txtaddress.Size = new System.Drawing.Size(590, 16); - this.txtaddress.TabIndex = 3; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(18, 124); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(48, 13); - this.label2.TabIndex = 4; - this.label2.Text = "Address:"; - // - // btnstart - // - this.btnstart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnstart.Location = new System.Drawing.Point(697, 119); - this.btnstart.Name = "btnstart"; - this.btnstart.Size = new System.Drawing.Size(60, 23); - this.btnstart.TabIndex = 5; - this.btnstart.Text = "Start"; - this.btnstart.UseVisualStyleBackColor = true; - this.btnstart.Click += new System.EventHandler(this.btnstart_Click); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.White; - this.panel1.Controls.Add(this.btnstart); - this.panel1.Controls.Add(this.label2); - this.panel1.Controls.Add(this.txtaddress); - this.panel1.Controls.Add(this.txtstatus); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.pgstatus); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(769, 443); - this.panel1.TabIndex = 6; - // - // tmrdecrypt - // - this.tmrdecrypt.Tick += new System.EventHandler(this.tmrdecrypt_Tick); - // - // pgstatus - // - this.pgstatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pgstatus.BackColor = System.Drawing.Color.Black; - this.pgstatus.BlockSeparation = 3; - this.pgstatus.BlockWidth = 5; - this.pgstatus.Color = System.Drawing.Color.Gray; - this.pgstatus.ForeColor = System.Drawing.Color.White; - this.pgstatus.Location = new System.Drawing.Point(13, 59); - this.pgstatus.MaxValue = 100; - this.pgstatus.MinValue = 0; - this.pgstatus.Name = "pgstatus"; - this.pgstatus.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal; - this.pgstatus.ShowValue = true; - this.pgstatus.Size = new System.Drawing.Size(744, 32); - this.pgstatus.Step = 10; - this.pgstatus.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Blocks; - this.pgstatus.TabIndex = 0; - this.pgstatus.Value = 0; - // - // ShiftnetDecryptor - // - this.AcceptButton = this.btnstart; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(769, 443); - this.Controls.Add(this.panel1); - this.Name = "ShiftnetDecryptor"; - this.Text = "ShiftnetDecryptor"; - this.Load += new System.EventHandler(this.ShiftnetDecryptor_Load); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private ProgressBarEX pgstatus; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.RichTextBox txtstatus; - private System.Windows.Forms.TextBox txtaddress; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button btnstart; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Timer tmrdecrypt; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/ShiftnetDecryptor.cs b/source/WindowsFormsApplication1/ShiftnetDecryptor.cs deleted file mode 100644 index dbf086e..0000000 --- a/source/WindowsFormsApplication1/ShiftnetDecryptor.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class ShiftnetDecryptor : Form - { - public ShiftnetDecryptor() - { - InitializeComponent(); - } - - int i = 0; - string currentaddress = null; - string encrypted_contents = null; - - public void WriteLine(string line) - { - if(txtstatus.Text == "") - { - txtstatus.Text = line; - } - else - { - txtstatus.Text += Environment.NewLine + line; - } - } - - private void RecursiveControlSetup(Control ctrl) - { - ctrl.Font = new Font(OSInfo.GetMonospaceFont(), ctrl.Font.Size); - try - { - var pnl = (Panel)ctrl; - foreach (Control c in pnl.Controls) - { - RecursiveControlSetup(c); - } - } - catch - { - - } - } - - private void tmrdecrypt_Tick(object sender, EventArgs e) - { - switch (i) - { - case 0: - currentaddress = txtaddress.Text; - WriteLine("Checking URL..."); - if(!currentaddress.StartsWith("shiftnet://")) - { - WriteLine(" *** ERROR: Invalid URL."); - tmrdecrypt.Stop(); - btnstart.Enabled = true; - txtaddress.Enabled = true; - } - break; - case 5: - WriteLine("Making connection to Shiftnet..."); - currentaddress = currentaddress.Replace("shiftnet://", "http://playshiftos.ml/shiftnet/www/"); - break; - case 25: - WriteLine("Checking file..."); - if(!currentaddress.EndsWith(".enc")) - { - WriteLine(" *** ERROR: File not valid, must be of type .enc (encrypted file)"); - tmrdecrypt.Stop(); - btnstart.Enabled = true; - txtaddress.Enabled = true; - } - break; - case 27: - WriteLine("Downloading file contents..."); - try - { - encrypted_contents = new WebClient().DownloadString(currentaddress); - } - catch - { - WriteLine(" *** ERROR: Remote file could not be accessed."); - tmrdecrypt.Stop(); - btnstart.Enabled = true; - txtaddress.Enabled = true; - } - break; - case 30: - WriteLine("Download successful. Determining encryption algorithm. This may take a bit..."); - break; - case 75: - int r = new Random().Next(0, 100); - if(r >= 25 && r <= 75) - { - WriteLine("Encryption algorithm determined, beginning decryption."); - } - else - { - WriteLine("Decryption failed."); - tmrdecrypt.Stop(); - btnstart.Enabled = true; - txtaddress.Enabled = true; - } - break; - case 95: - string decrypted = API.Encryption.Decrypt(encrypted_contents); - int lastslash = currentaddress.LastIndexOf("/"); - int len = currentaddress.Length - lastslash; - string fname = currentaddress.Substring(lastslash, len).Replace(".enc", ".lua"); - WriteLine("Decryption successful. Saving to /Home/Decryptions/" + fname + "..."); - if(!Directory.Exists(Paths.Home + "Decryptions")) - { - Directory.CreateDirectory(Paths.Home + "Decryptions"); - } - File.WriteAllText(Paths.Home + $"Decryptions{OSInfo.DirectorySeparator}{fname}", decrypted); - break; - case 100: - WriteLine("Decryption successful."); - tmrdecrypt.Stop(); - currentaddress = null; - i = 0; - encrypted_contents = null; - btnstart.Enabled = true; - txtaddress.Enabled = true; - - break; - } - - i += 1; - pgstatus.Value = i; - } - - private void btnstart_Click(object sender, EventArgs e) - { - i = 0; - tmrdecrypt.Start(); - btnstart.Enabled = false; - txtaddress.Enabled = false; - } - - private void ShiftnetDecryptor_Load(object sender, EventArgs e) - { - RecursiveControlSetup(panel1); - } - } -} diff --git a/source/WindowsFormsApplication1/ShiftnetDecryptor.resx b/source/WindowsFormsApplication1/ShiftnetDecryptor.resx deleted file mode 100644 index 34bb249..0000000 --- a/source/WindowsFormsApplication1/ShiftnetDecryptor.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Shiftorium.Designer.cs b/source/WindowsFormsApplication1/Shiftorium.Designer.cs deleted file mode 100644 index e5b4498..0000000 --- a/source/WindowsFormsApplication1/Shiftorium.Designer.cs +++ /dev/null @@ -1,322 +0,0 @@ -using System; - -namespace Shiftorium -{ - partial class Frontend - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Frontend)); - this.pgcontents = new System.Windows.Forms.Panel(); - this.lbcodepoints = new System.Windows.Forms.Label(); - this.lbupgrades = new System.Windows.Forms.ListView(); - this.Label1 = new System.Windows.Forms.Label(); - this.pnlinfo = new System.Windows.Forms.Panel(); - this.pnlintro = new System.Windows.Forms.Panel(); - this.Label4 = new System.Windows.Forms.Label(); - this.Label2 = new System.Windows.Forms.Label(); - this.Label5 = new System.Windows.Forms.Label(); - this.btnbuy = new System.Windows.Forms.Button(); - this.lbprice = new System.Windows.Forms.Label(); - this.picpreview = new System.Windows.Forms.PictureBox(); - this.lbudescription = new System.Windows.Forms.Label(); - this.lbupgradename = new System.Windows.Forms.Label(); - this.tmrcodepointsupdate = new System.Windows.Forms.Timer(this.components); - this.btnback = new System.Windows.Forms.Button(); - this.btnforward = new System.Windows.Forms.Button(); - this.lbcategory = new System.Windows.Forms.Label(); - this.btnhack = new System.Windows.Forms.Button(); - this.pgcontents.SuspendLayout(); - this.pnlinfo.SuspendLayout(); - this.pnlintro.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picpreview)).BeginInit(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.btnhack); - this.pgcontents.Controls.Add(this.lbcategory); - this.pgcontents.Controls.Add(this.btnforward); - this.pgcontents.Controls.Add(this.btnback); - this.pgcontents.Controls.Add(this.lbcodepoints); - this.pgcontents.Controls.Add(this.lbupgrades); - this.pgcontents.Controls.Add(this.Label1); - this.pgcontents.Controls.Add(this.pnlinfo); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(701, 462); - this.pgcontents.TabIndex = 0; - this.pgcontents.TabStop = true; - // - // lbcodepoints - // - this.lbcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbcodepoints.ForeColor = System.Drawing.Color.Black; - this.lbcodepoints.Location = new System.Drawing.Point(16, 372); - this.lbcodepoints.Name = "lbcodepoints"; - this.lbcodepoints.Size = new System.Drawing.Size(309, 43); - this.lbcodepoints.TabIndex = 8; - this.lbcodepoints.Text = "Codepoints: 25"; - this.lbcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lbupgrades - // - this.lbupgrades.BackColor = System.Drawing.Color.White; - this.lbupgrades.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.lbupgrades.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbupgrades.ForeColor = System.Drawing.Color.Black; - this.lbupgrades.Location = new System.Drawing.Point(21, 101); - this.lbupgrades.MultiSelect = false; - this.lbupgrades.Name = "lbupgrades"; - this.lbupgrades.Size = new System.Drawing.Size(304, 254); - this.lbupgrades.TabIndex = 0; - this.lbupgrades.UseCompatibleStateImageBehavior = false; - this.lbupgrades.View = System.Windows.Forms.View.Details; - this.lbupgrades.SelectedIndexChanged += new System.EventHandler(this.lbupgrades_SelectedIndexChanged); - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.ForeColor = System.Drawing.Color.Black; - this.Label1.Location = new System.Drawing.Point(85, 17); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(175, 39); - this.Label1.TabIndex = 1; - this.Label1.Text = "Upgrades"; - // - // pnlinfo - // - this.pnlinfo.Controls.Add(this.pnlintro); - this.pnlinfo.Controls.Add(this.btnbuy); - this.pnlinfo.Controls.Add(this.lbprice); - this.pnlinfo.Controls.Add(this.picpreview); - this.pnlinfo.Controls.Add(this.lbudescription); - this.pnlinfo.Controls.Add(this.lbupgradename); - this.pnlinfo.Dock = System.Windows.Forms.DockStyle.Right; - this.pnlinfo.Location = new System.Drawing.Point(332, 0); - this.pnlinfo.Name = "pnlinfo"; - this.pnlinfo.Size = new System.Drawing.Size(369, 462); - this.pnlinfo.TabIndex = 0; - // - // pnlintro - // - this.pnlintro.Controls.Add(this.Label4); - this.pnlintro.Controls.Add(this.Label2); - this.pnlintro.Controls.Add(this.Label5); - this.pnlintro.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlintro.Location = new System.Drawing.Point(0, 0); - this.pnlintro.Name = "pnlintro"; - this.pnlintro.Size = new System.Drawing.Size(369, 462); - this.pnlintro.TabIndex = 8; - this.pnlintro.TabStop = true; - // - // Label4 - // - this.Label4.AutoSize = true; - this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label4.Location = new System.Drawing.Point(-3, 397); - this.Label4.Name = "Label4"; - this.Label4.Size = new System.Drawing.Size(358, 18); - this.Label4.TabIndex = 7; - this.Label4.Text = "Select an upgrade on the left to view its details"; - // - // Label2 - // - this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label2.Location = new System.Drawing.Point(3, 53); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(340, 341); - this.Label2.TabIndex = 5; - this.Label2.Text = resources.GetString("Label2.Text"); - this.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // Label5 - // - this.Label5.AutoSize = true; - this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label5.ForeColor = System.Drawing.Color.Black; - this.Label5.Location = new System.Drawing.Point(-4, 14); - this.Label5.Name = "Label5"; - this.Label5.Size = new System.Drawing.Size(355, 31); - this.Label5.TabIndex = 4; - this.Label5.Text = "Welcome to the Shiftorium"; - // - // btnbuy - // - this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnbuy.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnbuy.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnbuy.ForeColor = System.Drawing.Color.Black; - this.btnbuy.Location = new System.Drawing.Point(160, 362); - this.btnbuy.Name = "btnbuy"; - this.btnbuy.Size = new System.Drawing.Size(185, 56); - this.btnbuy.TabIndex = 7; - this.btnbuy.Text = "Buy"; - this.btnbuy.UseVisualStyleBackColor = true; - this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click); - // - // lbprice - // - this.lbprice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lbprice.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold); - this.lbprice.ForeColor = System.Drawing.Color.Black; - this.lbprice.Location = new System.Drawing.Point(15, 362); - this.lbprice.Name = "lbprice"; - this.lbprice.Size = new System.Drawing.Size(127, 59); - this.lbprice.TabIndex = 6; - this.lbprice.Text = "50 CP"; - this.lbprice.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // picpreview - // - this.picpreview.Image = global::ShiftOS.Properties.Resources.upgradegray; - this.picpreview.Location = new System.Drawing.Point(25, 218); - this.picpreview.Name = "picpreview"; - this.picpreview.Size = new System.Drawing.Size(320, 130); - this.picpreview.TabIndex = 5; - this.picpreview.TabStop = false; - // - // lbudescription - // - this.lbudescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbudescription.ForeColor = System.Drawing.Color.Black; - this.lbudescription.Location = new System.Drawing.Point(24, 63); - this.lbudescription.Name = "lbudescription"; - this.lbudescription.Size = new System.Drawing.Size(321, 144); - this.lbudescription.TabIndex = 4; - this.lbudescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lbupgradename - // - this.lbupgradename.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbupgradename.ForeColor = System.Drawing.Color.Black; - this.lbupgradename.Location = new System.Drawing.Point(5, 17); - this.lbupgradename.Name = "lbupgradename"; - this.lbupgradename.Size = new System.Drawing.Size(361, 43); - this.lbupgradename.TabIndex = 3; - this.lbupgradename.Text = "Upgradename"; - this.lbupgradename.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // tmrcodepointsupdate - // - this.tmrcodepointsupdate.Enabled = true; - this.tmrcodepointsupdate.Interval = 1000; - this.tmrcodepointsupdate.Tick += new System.EventHandler(this.tmrcodepointsupdate_Tick); - // - // btnback - // - this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnback.Location = new System.Drawing.Point(22, 72); - this.btnback.Name = "btnback"; - this.btnback.Size = new System.Drawing.Size(36, 23); - this.btnback.TabIndex = 9; - this.btnback.Text = "<<"; - this.btnback.UseVisualStyleBackColor = true; - this.btnback.Click += new System.EventHandler(this.btnback_Click); - // - // btnforward - // - this.btnforward.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnforward.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnforward.Location = new System.Drawing.Point(289, 72); - this.btnforward.Name = "btnforward"; - this.btnforward.Size = new System.Drawing.Size(36, 23); - this.btnforward.TabIndex = 10; - this.btnforward.Text = ">>"; - this.btnforward.UseVisualStyleBackColor = true; - this.btnforward.Click += new System.EventHandler(this.btnforward_Click); - // - // lbcategory - // - this.lbcategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbcategory.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); - this.lbcategory.ForeColor = System.Drawing.Color.Black; - this.lbcategory.Location = new System.Drawing.Point(64, 72); - this.lbcategory.Name = "lbcategory"; - this.lbcategory.Size = new System.Drawing.Size(219, 26); - this.lbcategory.TabIndex = 11; - this.lbcategory.Text = "Upgrades"; - this.lbcategory.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // btnhack - // - this.btnhack.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnhack.AutoSize = true; - this.btnhack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnhack.Location = new System.Drawing.Point(143, 218); - this.btnhack.Name = "btnhack"; - this.btnhack.Size = new System.Drawing.Size(68, 25); - this.btnhack.TabIndex = 12; - this.btnhack.Text = "Hack it."; - this.btnhack.UseVisualStyleBackColor = true; - this.btnhack.Visible = false; - this.btnhack.Click += new System.EventHandler(this.btnhack_Click); - // - // Frontend - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(701, 462); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.KeyPreview = true; - this.Name = "Frontend"; - this.Text = "Shiftorium"; - this.TopMost = true; - this.Load += new System.EventHandler(this.Frontend_Load); - this.pgcontents.ResumeLayout(false); - this.pgcontents.PerformLayout(); - this.pnlinfo.ResumeLayout(false); - this.pnlintro.ResumeLayout(false); - this.pnlintro.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picpreview)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.ListView lbupgrades; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.Panel pnlinfo; - internal System.Windows.Forms.Label lbcodepoints; - internal System.Windows.Forms.Button btnbuy; - internal System.Windows.Forms.Label lbprice; - internal System.Windows.Forms.PictureBox picpreview; - internal System.Windows.Forms.Label lbudescription; - internal System.Windows.Forms.Label lbupgradename; - internal System.Windows.Forms.Panel pnlintro; - internal System.Windows.Forms.Label Label4; - internal System.Windows.Forms.Label Label2; - internal System.Windows.Forms.Label Label5; - internal System.Windows.Forms.Timer tmrcodepointsupdate; - internal System.Windows.Forms.Label lbcategory; - private System.Windows.Forms.Button btnforward; - private System.Windows.Forms.Button btnback; - private System.Windows.Forms.Button btnhack; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Shiftorium.cs b/source/WindowsFormsApplication1/Shiftorium.cs deleted file mode 100644 index ce9dbfc..0000000 --- a/source/WindowsFormsApplication1/Shiftorium.cs +++ /dev/null @@ -1,215 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using ShiftOS; -using SaveSystem; - -namespace Shiftorium -{ - public partial class Frontend : Form - { - public Frontend() - { - InitializeComponent(); - } - - List AvailableUpgrades = new List(); - Upgrade selectedUpgrade = null; - - private void tmrcodepointsupdate_Tick(object sender, EventArgs e) - { - lbcodepoints.Text = "Codepoints: " + API.Codepoints.ToString(); - } - - private void Frontend_Load(object sender, EventArgs e) - { - ColumnHeader name = new ColumnHeader(); - name.Text = "Upgrade Name"; - name.Width = lbupgrades.Width; - - lbupgrades.Columns.Add(name); - GetUpgrades(); - } - - public void GetUpgrades() - { - bool ShowUpgrades = true; - lbupgrades.Items.Clear(); - AvailableUpgrades.Clear(); - Categories.Clear(); - foreach (Upgrade upgrade in Utilities.GetAvailable()) - { - AvailableUpgrades.Add(upgrade); - } - GetCategories(); - try { - lbcategory.Text = Categories[SelectedCategory].ToUpper(); - if(lbcategory.Text != "FUNDAMENTAL") { - if(API.Upgrades["hacking"] == false) - { - Hacking.StartTutorial(); - PreviousCategory(); - } - else - { - if(API.Upgrades.ContainsKey(lbcategory.Text.ToLower())) - { - if(API.Upgrades[lbcategory.Text.ToLower()] == false) - { - btnhack.Show(); - ShowUpgrades = false; - } - else - { - btnhack.Hide(); - } - } - } - } - else - { - btnhack.Hide(); - } - } - catch - { - lbcategory.Text = "No upgrades!"; - } - foreach(Upgrade upg in AvailableUpgrades) - { - if (ShowUpgrades == true) - { - AddItem(upg); - } - } - } - - public void AddItem(Upgrade upgrade) - { - ListViewItem lv = new ListViewItem(); - var c = upgrade.Cost / API.CurrentSave.PriceDivider; - lv.Text = upgrade.Name.Replace(upgrade.Cost.ToString(), c.ToString()); - lv.Tag = upgrade.id; - if (upgrade.Category.ToUpper() == lbcategory.Text.ToUpper()) - { - if (!upgrade.id.Contains("dummy")) - { - lbupgrades.Items.Add(lv); - } - } - } - - public void GetCategories() - { - foreach(var upg in AvailableUpgrades) - { - if(Categories.Contains(upg.Category)) - { - } - else - { - Categories.Add(upg.Category); - } - } - } - - private void lbupgrades_SelectedIndexChanged(object sender, EventArgs e) - { - try { - ListViewItem item = lbupgrades.SelectedItems[0]; - string upg = (string)item.Tag; - foreach (Upgrade upgrade in AvailableUpgrades) - { - if (upgrade.id == upg) - { - pnlintro.Hide(); - lbupgradename.Text = upgrade.Name.Replace($" - {upgrade.Cost} CP", ""); - lbudescription.Text = upgrade.Description; - btnbuy.Show(); - lbprice.Text = (upgrade.Cost / API.CurrentSave.PriceDivider).ToString() + " CP"; - picpreview.Image = upgrade.Preview; - selectedUpgrade = upgrade; - } - } - } catch - { - //do nothing. - } - - } - - private void btnbuy_Click(object sender, EventArgs e) - { - if(Utilities.Buy(selectedUpgrade) == true) - { - btnbuy.Hide(); - lbprice.Text = "Upgrade installed."; - } - else - { - lbprice.Text = "Can't afford!"; - } - GetUpgrades(); - lbupgrades.Focus(); - } - - public List Categories = new List(); - public int SelectedCategory = 0; - - public void PreviousCategory() - { - if(SelectedCategory > 0) - { - SelectedCategory -= 1; - GetUpgrades(); - } - else - { - API.PlaySound(ShiftOS.Properties.Resources._3beepvirus); - } - } - - public void NextCategory() - { - if (SelectedCategory < Categories.Count - 1) - { - SelectedCategory += 1; - GetUpgrades(); - } - else - { - API.PlaySound(ShiftOS.Properties.Resources._3beepvirus); - } - } - - private void btnback_Click(object sender, EventArgs e) - { - PreviousCategory(); - } - - private void btnforward_Click(object sender, EventArgs e) - { - NextCategory(); - } - - private void btnhack_Click(object sender, EventArgs e) - { - if(API.Upgrades["multitasking"] == true) - { - var t = new Terminal(); - API.CreateForm(t, API.LoadedNames.TerminalName, ShiftOS.Properties.Resources.iconTerminal); - t.StartHackingSession(lbcategory.Text.ToLower()); - } - else - { - API.CreateInfoboxSession("Dependencies not met.", "You need the following upgrades: Multitasking to embark on this activity.", infobox.InfoboxMode.Info); - } - } - } -} diff --git a/source/WindowsFormsApplication1/Shiftorium.resx b/source/WindowsFormsApplication1/Shiftorium.resx deleted file mode 100644 index c732bd4..0000000 --- a/source/WindowsFormsApplication1/Shiftorium.resx +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Welcome to the Shiftorium. The Shiftorium is a place where you can spend Codepoints to upgrade the operating system and buy new applications. - -Codepoints can be earned by performing various tasks and using apps in ShiftOS, like playing Knowledge Input. - -It is generally recommended to invest in new applications instead of GUI upgrades, because more apps equal more ways to earn Codepoints. Investing in GUI upgrades first may make the OS more user-friendly, but it may become harder to get Codepoints. - -Some GUI upgrades may require you to close applications to take effect. Just close and re-open applications and the upgrades will be applied. - - - 17, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs b/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs new file mode 100644 index 0000000..f74b7c2 --- /dev/null +++ b/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs @@ -0,0 +1,238 @@ +// +// This code was generated by the .NET ToolStrip Customizer. +// http://toolstripcustomizer.codeplex.com/ +// + +using System.Drawing; +using System.Windows.Forms; + +namespace ShiftOS +{ + class ShiftOSColorTable : ProfessionalColorTable + { + public override Color ButtonSelectedHighlight + { + get { return API.CurrentSkin.Menu_ButtonSelectedHighlight; } + } + public override Color ButtonSelectedHighlightBorder + { + get { return API.CurrentSkin.Menu_ButtonSelectedHighlight; } + } + public override Color ButtonPressedHighlight + { + get { return API.CurrentSkin.Menu_ButtonPressedHighlight; } + } + public override Color ButtonPressedHighlightBorder + { + get { return API.CurrentSkin.Menu_ButtonPressedHighlight; } + } + public override Color ButtonCheckedHighlight + { + get { return API.CurrentSkin.Menu_ButtonCheckedHighlight; } + } + public override Color ButtonCheckedHighlightBorder + { + get { return API.CurrentSkin.Menu_ButtonCheckedHighlightBorder; } + } + public override Color ButtonPressedBorder + { + get { return API.CurrentSkin.Menu_ButtonPressedBorder; } + } + public override Color ButtonSelectedBorder + { + get { return API.CurrentSkin.Menu_ButtonSelectedBorder; } + } + public override Color ButtonCheckedGradientBegin + { + get { return API.CurrentSkin.Menu_ButtonCheckedGradientBegin; } + } + public override Color ButtonCheckedGradientMiddle + { + get { return API.CurrentSkin.Menu_ButtonCheckedGradientMiddle; } + } + public override Color ButtonCheckedGradientEnd + { + get { return API.CurrentSkin.Menu_ButtonCheckedGradientEnd; } + } + public override Color ButtonSelectedGradientBegin + { + get { return API.CurrentSkin.Menu_ButtonSelectedGradientBegin; } + } + public override Color ButtonSelectedGradientMiddle + { + get { return API.CurrentSkin.Menu_ButtonSelectedGradientMiddle; } + } + public override Color ButtonSelectedGradientEnd + { + get { return API.CurrentSkin.Menu_ButtonSelectedGradientEnd; } + } + public override Color ButtonPressedGradientBegin + { + get { return API.CurrentSkin.Menu_ButtonPressedGradientBegin; } + } + public override Color ButtonPressedGradientMiddle + { + get { return API.CurrentSkin.Menu_ButtonPressedGradientMiddle; } + } + public override Color ButtonPressedGradientEnd + { + get { return API.CurrentSkin.Menu_ButtonPressedGradientEnd; } + } + public override Color CheckBackground + { + get { return API.CurrentSkin.Menu_CheckBackground; } + } + public override Color CheckSelectedBackground + { + get { return API.CurrentSkin.Menu_CheckSelectedBackground; } + } + public override Color CheckPressedBackground + { + get { return API.CurrentSkin.Menu_CheckPressedBackground; } + } + public override Color GripDark + { + get { return Color.Transparent; } + } + public override Color GripLight + { + get { return Color.Transparent; } + } + public override Color ImageMarginGradientBegin + { + get { return API.CurrentSkin.Menu_ImageMarginGradientBegin; } + } + public override Color ImageMarginGradientMiddle + { + get { return API.CurrentSkin.Menu_ImageMarginGradientMiddle; } + } + public override Color ImageMarginGradientEnd + { + get { return API.CurrentSkin.Menu_ImageMarginGradientEnd; } + } + public override Color ImageMarginRevealedGradientBegin + { + get { return API.CurrentSkin.Menu_ImageMarginGradientBegin; } + } + public override Color ImageMarginRevealedGradientMiddle + { + get { return API.CurrentSkin.Menu_ImageMarginGradientMiddle; } + } + public override Color ImageMarginRevealedGradientEnd + { + get { return API.CurrentSkin.Menu_ImageMarginGradientEnd; } + } + public override Color MenuStripGradientBegin + { + get { return API.CurrentSkin.Menu_MenuStripGradientBegin; } + } + public override Color MenuStripGradientEnd + { + get { return API.CurrentSkin.Menu_MenuStripGradientEnd; } + } + public override Color MenuItemSelected + { + get { return API.CurrentSkin.Menu_MenuItemSelected; } + } + public override Color MenuItemBorder + { + get { return API.CurrentSkin.Menu_MenuItemSelected; } + } + public override Color MenuBorder + { + get { return API.CurrentSkin.Menu_MenuBorder; } + } + public override Color MenuItemSelectedGradientBegin + { + get { return API.CurrentSkin.Menu_MenuItemSelectedGradientBegin; } + } + public override Color MenuItemSelectedGradientEnd + { + get { return API.CurrentSkin.Menu_MenuItemSelectedGradientEnd; } + } + public override Color MenuItemPressedGradientBegin + { + get { return API.CurrentSkin.Menu_MenuItemPressedGradientBegin; } + } + public override Color MenuItemPressedGradientMiddle + { + get { return API.CurrentSkin.Menu_MenuItemPressedGradientMiddle; } + } + public override Color MenuItemPressedGradientEnd + { + get { return API.CurrentSkin.Menu_MenuItemPressedGradientEnd; } + } + public override Color RaftingContainerGradientBegin + { + get { return API.CurrentSkin.Menu_RaftingContainerGradientBegin; } + } + public override Color RaftingContainerGradientEnd + { + get { return API.CurrentSkin.Menu_RaftingContainerGradientEnd; } + } + public override Color SeparatorDark + { + get { return API.CurrentSkin.Menu_SeparatorDark; } + } + public override Color SeparatorLight + { + get { return API.CurrentSkin.Menu_SeparatorLight; } + } + public override Color StatusStripGradientBegin + { + get { return API.CurrentSkin.Menu_StatusStripGradientBegin; } + } + public override Color StatusStripGradientEnd + { + get { return API.CurrentSkin.Menu_StatusStripGradientEnd; } + } + public override Color ToolStripBorder + { + get { return API.CurrentSkin.Menu_ToolStripBorder; } + } + public override Color ToolStripDropDownBackground + { + get { return API.CurrentSkin.Menu_ToolStripDropDownBackground; } + } + public override Color ToolStripGradientBegin + { + get { return API.CurrentSkin.Menu_ToolStripGradientBegin; } + } + public override Color ToolStripGradientMiddle + { + get { return API.CurrentSkin.Menu_ToolStripGradientMiddle; } + } + public override Color ToolStripGradientEnd + { + get { return API.CurrentSkin.Menu_ToolStripGradientEnd; } + } + public override Color ToolStripContentPanelGradientBegin + { + get { return API.CurrentSkin.Menu_ToolStripContentPanelGradientBegin; } + } + public override Color ToolStripContentPanelGradientEnd + { + get { return API.CurrentSkin.Menu_ToolStripContentPanelGradientEnd; } + } + public override Color ToolStripPanelGradientBegin + { + get { return API.CurrentSkin.Menu_ToolStripPanelGradientBegin; } + } + public override Color ToolStripPanelGradientEnd + { + get { return API.CurrentSkin.Menu_ToolStripPanelGradientEnd; } + } + public override Color OverflowButtonGradientBegin + { + get { return Color.Transparent; } + } + public override Color OverflowButtonGradientMiddle + { + get { return Color.Transparent; } + } + public override Color OverflowButtonGradientEnd + { + get { return Color.Transparent; } + } + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs b/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs new file mode 100644 index 0000000..18fe2d1 --- /dev/null +++ b/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs @@ -0,0 +1,390 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public class WindowComposition + { + private static bool _CanClose = true; + public static bool ShuttingDown = false; + public static bool SafeToAddControls = true; + + public static bool CanClose + { + get + { + return _CanClose; + } + } + + public static void WindowsEverywhere(Form formToInfect) + { + var t = new Timer(); + t.Interval = 100; + int yvel = 1; + int xvel = 1; + t.Tick += (object s, EventArgs a) => + { + if (Viruses.InfectedWith("windowseverywhere")) + { + formToInfect.Left += xvel * 10; + formToInfect.Top += yvel * 10; + + if (formToInfect.Top >= API.CurrentSession.Height - formToInfect.Height) + { + yvel = -1; + } + if (formToInfect.Top <= 0) + { + yvel = 1; + } + if (formToInfect.Left >= API.CurrentSession.Width - formToInfect.Width) + { + xvel = -1; + } + if (formToInfect.Left <= 0) + { + xvel = 1; + } + } + }; + t.Start(); + } + + public static void ScaleWidget(Control ctrl, int width, int height) + { + ctrl.Size = new Size(0, 0); + var t = new Timer(); + t.Interval = 25; + t.Tick += (object s, EventArgs a) => + { + if(ctrl.Width <= width) + { + + } + }; + } + + public static void ShowForm(Form formToShow, WindowAnimationStyle style) + { + var t = new Timer(); + switch(style) + { + case WindowAnimationStyle.Fade: + var bw = new BackgroundWorker(); + bw.DoWork += (object se, DoWorkEventArgs ea) => + { + //The form's handle has not been created so we just invoke + //the action on the desktop thread. + API.CurrentSession.Invoke(new Action(() => + { + try { + formToShow.Opacity = 0; + formToShow.Show(); + formToShow.Left = (Screen.PrimaryScreen.Bounds.Width - formToShow.Width) / 2; + formToShow.Top = (Screen.PrimaryScreen.Bounds.Height - formToShow.Height) / 2; + } + catch + { + + } + })); + t.Interval = API.CurrentSkin.WindowFadeTime; + t.Tick += (object s, EventArgs a) => + { + if (API.Upgrades["fancyeffects"] == true) + { + API.CurrentSession.Invoke(new Action(() => + { + + if (formToShow.Opacity < 1) + { + formToShow.Opacity += Convert.ToDouble(API.CurrentSkin.WindowFadeSpeed); + formToShow.Refresh(); + + } + else + { + t.Stop(); + } + })); + } + else + { + API.CurrentSession.Invoke(new Action(() => + { + formToShow.Opacity = 1; + })); + } + }; + API.CurrentSession.Invoke(new Action(() => + { + t.Start(); + })); + }; + bw.RunWorkerAsync(); + break; + default: + var bwork = new BackgroundWorker(); + bwork.DoWork += (object s, DoWorkEventArgs a) => + { + API.CurrentSession.Invoke(new Action(() => + { + formToShow.Show(); + formToShow.Left = (Screen.PrimaryScreen.Bounds.Width - formToShow.Width) / 2; + formToShow.Top = (Screen.PrimaryScreen.Bounds.Height - formToShow.Height) / 2; + + formToShow.Show(); + })); + + }; + bwork.RunWorkerAsync(); + break; + + } + } + + public static void CloseForm(Form formToClose, PanelButton pbtn, WindowAnimationStyle style) + { + var t = new Timer(); + switch(style) + { + case WindowAnimationStyle.Fade: + _CanClose = false; + t.Interval = API.CurrentSkin.WindowFadeTime; + t.Tick += (object s, EventArgs a) => + { + if (API.Upgrades["fancyeffects"] == true) + { + try + { + + if (formToClose.Opacity > 0) + { + formToClose.Invoke(new Action(() => + { + formToClose.Opacity -= Convert.ToDouble(API.CurrentSkin.WindowFadeSpeed); + formToClose.Refresh(); + })); + } + else + { + API.PanelButtons.Remove(pbtn); + API.CurrentSession.SetupPanelButtons(); + API.UpdateWindows(); + formToClose.Dispose(); + t.Stop(); + } + } + catch + { + formToClose = null; + } + } + else + { + API.PanelButtons.Remove(pbtn); + API.CurrentSession.SetupPanelButtons(); + API.UpdateWindows(); + formToClose.Dispose(); + t.Stop(); + + } + }; + t.Start(); + break; + case WindowAnimationStyle.Zoom: + _CanClose = false; + t.Interval = 1; + int w = formToClose.Width; + int h = formToClose.Height; + int maxw = w / 2; + int maxh = h / 2; + t.Tick += (object s, EventArgs a) => + { + if (API.Upgrades["fancyeffects"] == true) + { + formToClose.MinimumSize = new Size(maxw, maxh); + formToClose.Opacity -= 0.1; + formToClose.Left += 50; + formToClose.Top += 50; + + formToClose.Width -= 50; + formToClose.Height -= 50; + if (formToClose.Size == formToClose.MinimumSize) + { + API.PanelButtons.Remove(pbtn); + API.CurrentSession.SetupPanelButtons(); + API.UpdateWindows(); + formToClose.Dispose(); + t.Stop(); + } + } + else + { + API.PanelButtons.Remove(pbtn); + API.CurrentSession.SetupPanelButtons(); + API.UpdateWindows(); + formToClose.Dispose(); + t.Stop(); + + } + }; + t.Start(); + break; + case WindowAnimationStyle.ToAppLauncher: + _CanClose = false; + t.Interval = 1; + int w2 = formToClose.Width; + int h2 = formToClose.Height; + int maxw2 = w2 / 2; + int maxh2 = h2 / 2; + t.Tick += (object s, EventArgs a) => + { + formToClose.MinimumSize = new Size(maxw2, maxh2); + formToClose.Opacity -= 0.1; + if (API.Upgrades["fancyeffects"] == true) + { + switch (API.CurrentSkin.desktoppanelposition) + { + case "Bottom": + formToClose.Left += 50; + formToClose.Top += 50; + break; + case "Top": + formToClose.Left -= 50; + formToClose.Top -= 50; + break; + + } + + formToClose.Width -= 50; + formToClose.Height -= 50; + if (formToClose.Size == formToClose.MinimumSize) + { + API.PanelButtons.Remove(pbtn); + API.CurrentSession.SetupPanelButtons(); + API.UpdateWindows(); + formToClose.Dispose(); + t.Stop(); + } + } + else + { + API.PanelButtons.Remove(pbtn); + API.CurrentSession.SetupPanelButtons(); + API.UpdateWindows(); + formToClose.Dispose(); + t.Stop(); + + } + }; + t.Start(); + break; + default: + API.PanelButtons.Remove(pbtn); + API.CurrentSession.SetupPanelButtons(); + API.UpdateWindows(); + formToClose.Dispose(); + //Room for more animations, but just close the form if none is selected. + break; + } + } + + public static void AnimateDragWindow(Form form, WindowDragEffect effect, bool Dragging) + { + var t = new Timer(); + switch(effect) + { + case WindowDragEffect.Fade: + t.Interval = API.CurrentSkin.DragFadeInterval; + t.Tick += (object s, EventArgs a) => + { + if (API.Upgrades["fancyeffects"] == true) + { + if (Dragging == true) + { + if (form.Opacity >= API.CurrentSkin.DragFadeLevel) + { + form.Opacity -= API.CurrentSkin.DragFadeSpeed; + } + else + { + t.Stop(); + } + } + else + { + if (form.Opacity < 1) + { + form.Opacity += API.CurrentSkin.DragFadeSpeed; + } + else + { + t.Stop(); + } + } + } + }; + t.Start(); + break; + + } + } + + public static void AnimateDragWindow(Form form, WindowDragEffect effect, bool Dragging, int MouseX, int MouseY) + { + var t = new Timer(); + switch(effect) + { + + case WindowDragEffect.Shake: + Shake(form, MouseX, MouseY); + break; + } + } + + //Copyright - Adonis S. Deliannis + public static void Shake(Form form, int mouseX, int mouseY) + { + Point mouse = form.PointToScreen(new Point(mouseX, mouseY)); + int xDist = mouse.X - form.Location.X; + int yDist = mouse.Y - form. Location.Y; + int X = xDist; + int Y = yDist; + Random r = new Random(); + int JiggleCount = 0; + int Z = 15; + + while (JiggleCount < 1000) + { + form.Location = new Point(r.Next(X - Z, X + Z), r.Next(Y - Z, Y + Z)); + JiggleCount++; + } + + JiggleCount = 0; + form.Location = new Point(X, Y); + } + } + + public enum WindowAnimationStyle + { + Fade, + Default, + Zoom, + ToAppLauncher + } + + public enum WindowDragEffect + { + Fade, + Default, + Shake + } +} diff --git a/source/WindowsFormsApplication1/SkinEngine/skins.cs b/source/WindowsFormsApplication1/SkinEngine/skins.cs new file mode 100644 index 0000000..206646f --- /dev/null +++ b/source/WindowsFormsApplication1/SkinEngine/skins.cs @@ -0,0 +1,840 @@ +using System.IO; +using System.Drawing; +using Newtonsoft.Json; +using System; +using ShiftOS; +using System.IO.Compression; +using System.Windows.Forms; +using System.Collections.Generic; +using System.Drawing.Imaging; + +namespace Skinning +{ + public class Skin { + //Widget Positions + public string ALPosition = "Top"; + public string PanelButtonPosition = "Top"; + public string ClockPosition = "Top"; + + //WINDOW SETTINGS/IMAGES + //images + public int titlebarlayout = 3; + public int borderleftlayout = 3; + public int borderrightlayout = 3; + public int borderbottomlayout = 3; + public int closebtnlayout = 3; + public int rollbtnlayout = 3; + public int minbtnlayout = 3; + public int rightcornerlayout = 3; + public int leftcornerlayout = 3; + // Late entry: need to fix window code to include this + public int bottomleftcornerlayout = 3; + public int bottomrightcornerlayout = 3; + public Color bottomleftcornercolour = Color.Gray; + + public Color bottomrightcornercolour = Color.Gray; + + public bool enablebordercorners = false; + // settings + public Size closebtnsize = new Size(22, 22); + public Size rollbtnsize = new Size(22, 22); + public Size minbtnsize = new Size(22, 22); + public int titlebarheight = 30; + public int titlebariconsize = 16; + public int closebtnfromtop = 5; + public int closebtnfromside = 2; + public int rollbtnfromtop = 5; + public int rollbtnfromside = 26; + public int minbtnfromtop = 5; + public int minbtnfromside = 52; + public int borderwidth = 2; + public bool enablecorners = false; + public int titlebarcornerwidth = 5; + public int titleiconfromside = 4; + public int titleiconfromtop = 4; + //colours + public Color titlebarcolour = Color.Gray; + public Color borderleftcolour = Color.Gray; + public Color borderrightcolour = Color.Gray; + public Color borderbottomcolour = Color.Gray; + public Color closebtncolour = Color.Black; + public Color closebtnhovercolour = Color.Black; + public Color closebtnclickcolour = Color.Black; + public Color rollbtncolour = Color.Black; + public Color rollbtnhovercolour = Color.Black; + public Color rollbtnclickcolour = Color.Black; + public Color minbtncolour = Color.Black; + public Color minbtnhovercolour = Color.Black; + public Color minbtnclickcolour = Color.Black; + public Color rightcornercolour = Color.Gray; + public Color leftcornercolour = Color.Gray; + // Text + public string titletextfontfamily = "Microsoft Sans Serif"; + public int titletextfontsize = 10; + public FontStyle titletextfontstyle = FontStyle.Bold; + public string titletextpos = "Left"; + public int titletextfromtop = 3; + public int titletextfromside = 24; + + public Color titletextcolour = Color.White; + //DESKTOP + public Color desktoppanelcolour = Color.Gray; + public Color desktopbackgroundcolour = Color.Black; + public int desktoppanelheight = 24; + public string desktoppanelposition = "Top"; + public Color clocktextcolour = Color.Black; + public Color clockbackgroundcolor = Color.Gray; + public int panelclocktexttop = 3; + public int panelclocktextsize = 10; + public string panelclocktextfont = "Byington"; + public FontStyle panelclocktextstyle = FontStyle.Bold; + public Color applauncherbuttoncolour = Color.Gray; + public Color applauncherbuttonclickedcolour = Color.Gray; + public Color applauncherbackgroundcolour = Color.Gray; + public Color applaunchermouseovercolour = Color.Gray; + public Color applicationsbuttontextcolour = Color.Black; + public int applicationbuttonheight = 24; + public int applicationbuttontextsize = 10; + public string applicationbuttontextfont = "Byington"; + public FontStyle applicationbuttontextstyle = FontStyle.Bold; + public string applicationlaunchername = "Applications"; + public string titletextposition = "Left"; + public int applaunchermenuholderwidth = 100; + public int panelbuttonicontop = 3; + public int panelbuttoniconside = 4; + public int panelbuttoniconsize = 16; + public int panelbuttonheight = 20; + public int panelbuttonwidth = 185; + public Color panelbuttoncolour = Color.Black; + public Color panelbuttontextcolour = Color.White; + public int panelbuttontextsize = 10; + public string panelbuttontextfont = "Byington"; + public FontStyle panelbuttontextstyle = FontStyle.Regular; + public int panelbuttontextside = 16; + public int panelbuttontexttop = 2; + public int panelbuttongap = 4; + public int panelbuttonfromtop = 2; + + public int panelbuttoninitialgap = 8; + public int launcheritemsize = 10; + public string launcheritemfont = "Byington"; + public FontStyle launcheritemstyle = FontStyle.Regular; + + public Color launcheritemcolour = Color.Black; + // Images + public int desktoppanellayout = 3; + public int desktopbackgroundlayout = 3; + public int panelclocklayout = 3; + public int applauncherlayout = 3; + + public int panelbuttonlayout = 3; + + //Locations... + + public int userTextboxX = 171; + public int userTextBoxY = 202; + public int passTextBoxX = 171; + public int passTextBoxY = 243; + public int loginbtnX = 268; + public int loginbtnY = 286; + public int shutdownbtnX = 1755; + + public int shutdownbtnY = 979; + + /* IMAGE PATHS + These tell ShiftOS where skin images are. + */ + + public string applauncherclickpath = null; + public string panelbuttonpath = null; + public string applaunchermouseoverpath = null; + public string applauncherpath = null; + public string panelclockpath = null; + public string desktopbackgroundpath = null; + public string desktoppanelpath = null; + public string minbtnhoverpath = null; + public string minbtnclickpath = null; + public string rightcornerpath = null; + public string titlebarpath = null; + public string borderrightpath = null; + public string borderleftpath = null; + public string borderbottompath = null; + public string closebtnpath = null; + public string closebtnhoverpath = null; + public string closebtnclickpath = null; + public string rollbtnpath = null; + public string rollbtnhoverpath = null; + public string rollbtnclickpath = null; + public string minbtnpath = null; + public string leftcornerpath = null; + public string bottomleftcornerpath = null; + public string bottomrightcornerpath = null; + + //Menu Renderer Colors + public Color Menu_ButtonSelectedHighlight = Color.Black; + public Color Menu_ButtonSelectedHighlightBorder = Color.Black; + public Color Menu_ButtonPressedHighlight = Color.Black; + public Color Menu_ButtonPressedHighlightBorder = Color.Black; + public Color Menu_ButtonCheckedHighlight = Color.White; + public Color Menu_ButtonCheckedHighlightBorder = Color.White; + public Color Menu_ButtonPressedBorder = Color.Black; + public Color Menu_ButtonSelectedBorder = Color.Black; + public Color Menu_ButtonCheckedGradientBegin = Color.White; + public Color Menu_ButtonCheckedGradientMiddle = Color.White; + public Color Menu_ButtonCheckedGradientEnd = Color.White; + public Color Menu_ButtonSelectedGradientBegin = Color.Black; + public Color Menu_ButtonSelectedGradientMiddle = Color.Black; + public Color Menu_ButtonSelectedGradientEnd = Color.Black; + public Color Menu_ButtonPressedGradientBegin = Color.Black; + public Color Menu_ButtonPressedGradientMiddle = Color.Black; + public Color Menu_ButtonPressedGradientEnd = Color.Black; + public Color Menu_CheckBackground = Color.White; + public Color Menu_CheckSelectedBackground = Color.Gray; + public Color Menu_CheckPressedBackground = Color.White; + public Color Menu_ImageMarginGradientBegin = Color.Gray; + public Color Menu_ImageMarginGradientMiddle = Color.Gray; + public Color Menu_ImageMarginGradientEnd = Color.Gray; + public Color Menu_MenuStripGradientBegin = Color.Gray; + public Color Menu_MenuStripGradientEnd = Color.Gray; + public Color Menu_MenuItemSelected = Color.Black; + public Color Menu_MenuItemBorder = Color.Gray; + public Color Menu_MenuBorder = Color.Gray; + public Color Menu_MenuItemSelectedGradientBegin = Color.Black; + public Color Menu_MenuItemSelectedGradientEnd = Color.Black; + public Color Menu_MenuItemPressedGradientBegin = Color.Black; + public Color Menu_MenuItemPressedGradientMiddle = Color.Black; + public Color Menu_MenuItemPressedGradientEnd = Color.Black; + public Color Menu_RaftingContainerGradientBegin = Color.Black; + public Color Menu_RaftingContainerGradientEnd = Color.Gray; + public Color Menu_SeparatorDark = Color.Black; + public Color Menu_SeparatorLight = Color.Black; + public Color Menu_StatusStripGradientBegin = Color.Gray; + public Color Menu_StatusStripGradientEnd = Color.Gray; + public Color Menu_ToolStripBorder = Color.Gray; + public Color Menu_ToolStripDropDownBackground = Color.Gray; + public Color Menu_ToolStripGradientBegin = Color.Gray; + public Color Menu_ToolStripGradientMiddle = Color.Gray; + public Color Menu_ToolStripGradientEnd = Color.Gray; + public Color Menu_ToolStripContentPanelGradientBegin = Color.Gray; + public Color Menu_ToolStripContentPanelGradientEnd = Color.Gray; + public Color Menu_ToolStripPanelGradientBegin = Color.Gray; + public Color Menu_ToolStripPanelGradientEnd = Color.Gray; + public Color Menu_TextColor = Color.White; + + //New + public Color TerminalTextColor = Color.White; + public Color TerminalBackColor = Color.Black; + public string TerminalFontStyle = OSInfo.GetMonospaceFont(); + + //Name Packs + public string EmbeddedNamePackPath = "names.npk"; + + //Desktop Icons + public Color IconTextColor = Color.White; + + //Window Animation + public int WindowFadeTime = 1; //Interval between each decrease in opacity + public decimal WindowFadeSpeed = Convert.ToDecimal(0.1); //Speed of opacity decrease + public WindowAnimationStyle WindowCloseAnimation = WindowAnimationStyle.Fade; //Animation style for close + public WindowAnimationStyle WindowOpenAnimation = WindowAnimationStyle.Fade; //Animation style for open + public WindowDragEffect DragAnimation = WindowDragEffect.Fade; + public double DragFadeLevel = 0.5; + public double DragFadeSpeed = 0.1; + public int DragFadeInterval = 1; + + //Shake + public int ShakeSpeed = 10; + public int ShakeMaxOffset = 250; + public int ShakeMinOffset = 0; + + //Desktop Panel + public List Widgets = new List(); + public List DesktopPanels = new List(); + } + + public class DesktopWidget + { + public string Name { get; set; } + public string Panel { get; set; } //either top or bottom + public string Icon { get; set; } + public int Width { get; set; } + public int XLocation { get; set; } + public WidgetType Type { get; set; } + public string Lua { get; set; } + } + + public class ShiftOSIcon + { + /// + /// Creates a new icon + /// + /// New ID + public ShiftOSIcon(string id) + { + SmallPath = id + "_small"; + LargePath = id + "_large"; + } + + public string SmallPath { get; set; } + public string LargePath { get; set; } + } + + public class DesktopPanel + { + public string Position = "Top"; + public int Height = 24; + public Color BackgroundColor = Color.Gray; + public Image BackgroundImage = null; + public string ImagePath = null; + } + + public class PanelWidget + { + public string type = "applauncher"; + } + + public class NamePack + { + public string TerminalName = "Terminal"; + public string ArtpadName = "Artpad"; + public string TextpadName = "TextPad"; + public string ShiftoriumName = "Shiftorium"; + public string KnowledgeInputName = "Knowledge Input"; + public string PongName = "Pong"; + public string ShifterName = "Shifter"; + public string FileSkimmerName = "File Skimmer"; + public string SkinLoaderName = "Skin Loader"; + public string ShutdownName = "Shut Down"; + public string UnityName = "Unity Mode"; + public string NameChangerName = "Name Changer"; + } + + public class IconSet + { + public Image Terminal = ShiftOS.Properties.Resources.iconTerminal; + public Image Artpad = ShiftOS.Properties.Resources.iconArtpad; + public Image Textpad = ShiftOS.Properties.Resources.iconTextPad; + public Image Shiftorium = ShiftOS.Properties.Resources.iconShiftorium; + public Image KnowledgeInput = ShiftOS.Properties.Resources.iconKnowledgeInput; + public Image Pong = ShiftOS.Properties.Resources.iconPong; + public Image Shifter = ShiftOS.Properties.Resources.iconShifter; + public Image FileSkimmer = ShiftOS.Properties.Resources.iconFileSkimmer; + public Image SkinLoader = ShiftOS.Properties.Resources.iconSkinLoader; + public Image Shutdown = ShiftOS.Properties.Resources.iconshutdown; + public Image Unity = ShiftOS.Properties.Resources.iconunitytoggle; + public Image NameChanger = ShiftOS.Properties.Resources.iconNameChanger; + + } + + public class IconPack + { + public string Terminal = "Terminal"; + public string Artpad = "Artpad"; + public string Textpad = "TextPad"; + public string Shiftorium = "Shiftorium"; + public string KnowledgeInput = "Knowledge Input"; + public string Pong = "Pong"; + public string Shifter = "Shifter"; + public string FileSkimmer = "File Skimmer"; + public string SkinLoader = "Skin Loader"; + public string Shutdown = "Shut Down"; + public string Unity = "Unity Mode"; + public string NameChanger = "Name Changer"; + + } + + public class Images + { + public Image applauncherclick = null; + public Image panelbutton = null; + public Image applaunchermouseover = null; + public Image applauncher = null; + public Image panelclock = null; + public Image desktopbackground = null; + public Image desktoppanel = null; + public Image minbtnhover = null; + public Image minbtnclick = null; + public Image rightcorner = null; + public Image titlebar = null; + public Image borderright = null; + public Image borderleft = null; + public Image borderbottom = null; + public Image closebtn = null; + public Image closebtnhover = null; + public Image closebtnclick = null; + public Image rollbtn = null; + public Image rollbtnhover = null; + public Image rollbtnclick = null; + public Image minbtn = null; + public Image leftcorner = null; + public Image bottomleftcorner = null; + public Image bottomrightcorner = null; + } + /// + /// ShiftOS 'Sharp' Skin Engine - Completely reworked ShiftOS skin system written in C# by Michael VanOverbeek + /// + public class Utilities { + public static Dictionary IconRegistry = new Dictionary(); + public static Color globaltransparencycolour = Color.FromArgb(1, 0, 1); + public static NamePack LoadedNames = null; + public static Skin loadedSkin = null; + public static Images loadedskin_images = null; + + /// + /// Load a bitmap from the skin. + /// + /// Bitmap name. + /// The bitmap + public static Bitmap GetImage(string fileName) + { + Bitmap ret; + if (File.Exists(Paths.LoadedSkin + fileName)) + { + using (Image img = Image.FromFile(Paths.LoadedSkin + fileName)) + { + ret = new Bitmap(img); + } + } else + { + ret = null; + } + return ret; + } + + /// + /// Load the name pack embedded in the skin. + /// + public static void LoadEmbeddedNamePack() + { + if(loadedSkin != null) + { + if(loadedSkin.EmbeddedNamePackPath != null) + { + if(File.Exists(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath)) + { + string json = File.ReadAllText(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath); + LoadedNames = JsonConvert.DeserializeObject(json); + try { + //bug-check + if (LoadedNames.NameChangerName == null) + { + LoadedNames.NameChangerName = "Name Changer"; + } + } + catch + { + LoadedNames = new NamePack(); + } + } + else + { + LoadedNames = new NamePack(); + } + } + else + { + LoadedNames = new NamePack(); + } + } + else + { + LoadedNames = new NamePack(); + } + } + + /// + /// Loads background images for all desktop panels + /// + public static void LoadPanels() + { + foreach(var pnl in loadedSkin.DesktopPanels) + { + string dpath = Paths.LoadedSkin + "panels" + OSInfo.DirectorySeparator + pnl.ImagePath; + if (File.Exists(dpath)) + { + pnl.BackgroundImage = Image.FromFile(dpath); + } + } + } + + /// + /// Saves background images of panels + /// + public static void SavePanels() + { + string dir = Paths.LoadedSkin + "panels"; + if (!Directory.Exists(dir)) + { + Directory.CreateDirectory(dir); + } + foreach (var pnl in loadedSkin.DesktopPanels) + { + if (pnl.BackgroundImage != null) + { + try + { + pnl.ImagePath = pnl.Position + loadedSkin.DesktopPanels.IndexOf(pnl).ToString(); + string dpath = Paths.LoadedSkin + "panels" + OSInfo.DirectorySeparator + pnl.ImagePath; + pnl.BackgroundImage.Save(dpath); + pnl.BackgroundImage = null; + } + catch + { + pnl.ImagePath = null; + pnl.BackgroundImage = null; + } + } + } + } + /// + /// Randomize some skin variables. Used for a virus. + /// + public static void Randomize() + { + Random rnd = new Random(); + if (rnd.Next(0, 5000) == 25) + { + loadedSkin.desktoppanelheight = rnd.Next(2, 200); + switch (rnd.Next(0, 10)) + { + case 1: + case 3: + case 5: + case 7: + case 9: + loadedSkin.desktoppanelposition = "Top"; + break; + default: + loadedSkin.desktoppanelposition = "Bottom"; + break; + } + API.CurrentSession.SetupDesktop(); + API.UpdateWindows(); + } + } + + /// + /// Save the loaded name pack to the skin. + /// + public static void SaveEmbeddedNamePack() + { + if (loadedSkin != null) + { + if (loadedSkin.EmbeddedNamePackPath != null) + { + if (File.Exists(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath)) + { + string json = JsonConvert.SerializeObject(LoadedNames); + File.WriteAllText(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath, json); + } + else + { + loadedSkin.EmbeddedNamePackPath = "names.npk"; + string json = JsonConvert.SerializeObject(LoadedNames); + File.WriteAllText(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath, json); + } + } + + } + } + + /// + /// Save a bitmap to the skin. + /// + /// Bitmap to save + /// New filename + private static void saveimage(Image img, string Name) + { + string fullPath = Paths.LoadedSkin + Name; + if(File.Exists(fullPath)) + { + File.Delete(fullPath); + } + if (img != null) + { + img.Save(fullPath, System.Drawing.Imaging.ImageFormat.Bmp); + } + } + + /// + /// Load the skin. + /// + public static void loadskin() + { + if(Directory.Exists(Paths.LoadedSkin)) + { + try { + string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json"); + loadedSkin = JsonConvert.DeserializeObject(rawData); + if (File.Exists(Paths.LoadedSkin + "panels.json")) + { + string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json"); + loadedSkin.DesktopPanels = JsonConvert.DeserializeObject>(panels); + LoadPanels(); + } + loadimages(); + LoadEmbeddedNamePack(); + } + catch + { + //No skin to load. + loadedSkin = new Skin(); + loadedskin_images = new Images(); + saveskin(); + + } + } else + { + loadedSkin = new Skin(); + loadedskin_images = new Images(); + saveskin(); + } + } + + /// + /// Load skin from .skn file + /// + /// File to load. + public static void loadsknfile(string filepath) + { + try + { + //Extract the .SKN + loadedSkin = new Skin(); + loadedskin_images = new Images(); + API.ExtractFile(filepath, Paths.LoadedSkin, true); + //OK, so the skin's been extracted. + //Now, let's load in the skin data. + string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json"); + loadedSkin = JsonConvert.DeserializeObject(rawData); + //Now, images. + loadimages(); + } catch + { + API.CreateInfoboxSession("Error loading skin", "An error has occurred while loading the skin file. This could be because the skin file is no longer supported by this version of ShiftOS.", infobox.InfoboxMode.Info); + } + } + + /// + /// Load images from the skin. + /// + public static void loadimages() + { + loadedskin_images = new Images(); + loadedskin_images.applauncherclick = GetImage(loadedSkin.applauncherclickpath); + loadedskin_images.panelbutton = GetImage(loadedSkin.panelbuttonpath); + loadedskin_images.applaunchermouseover = GetImage(loadedSkin.applaunchermouseoverpath); + loadedskin_images.applauncher = GetImage(loadedSkin.applauncherpath); + loadedskin_images.panelclock = GetImage(loadedSkin.panelclockpath); + loadedskin_images.desktopbackground = GetImage(loadedSkin.desktopbackgroundpath); + loadedskin_images.desktoppanel = GetImage(loadedSkin.desktoppanelpath); + loadedskin_images.minbtnhover = GetImage(loadedSkin.minbtnhoverpath); + loadedskin_images.minbtnclick = GetImage(loadedSkin.minbtnclickpath); + loadedskin_images.rightcorner = GetImage(loadedSkin.rightcornerpath); + loadedskin_images.titlebar = GetImage(loadedSkin.titlebarpath); + loadedskin_images.borderright = GetImage(loadedSkin.borderrightpath); + loadedskin_images.borderleft = GetImage(loadedSkin.borderleftpath); + loadedskin_images.borderbottom = GetImage(loadedSkin.borderbottompath); + loadedskin_images.closebtn = GetImage(loadedSkin.closebtnpath); + loadedskin_images.closebtnhover = GetImage(loadedSkin.closebtnhoverpath); + loadedskin_images.closebtnclick = GetImage(loadedSkin.closebtnclickpath); + loadedskin_images.rollbtn = GetImage(loadedSkin.rollbtnpath); + loadedskin_images.rollbtnhover = GetImage(loadedSkin.rollbtnhoverpath); + loadedskin_images.rollbtnclick = GetImage(loadedSkin.rollbtnclickpath); + loadedskin_images.minbtn = GetImage(loadedSkin.minbtnpath); + loadedskin_images.leftcorner = GetImage(loadedSkin.leftcornerpath); + loadedskin_images.bottomleftcorner = GetImage(loadedSkin.bottomleftcornerpath); + loadedskin_images.bottomrightcorner = GetImage(loadedSkin.bottomrightcornerpath); + try + { + IconRegistry = new Dictionary(); + foreach (var f in Directory.GetFiles(Paths.Icons)) + { + var finf = new FileInfo(f); + byte[] fBytes = File.ReadAllBytes(finf.FullName); + MemoryStream fStream = new MemoryStream(fBytes); + IconRegistry.Add(finf.Name, Image.FromStream(fStream)); + fStream.Close(); + } + } + catch + { + GenDefaultIconPack(); + } + } + + /// + /// Generates the default icon pack if none exists. + /// + public static void GenDefaultIconPack() + { + IconRegistry = new Dictionary(); + if(Directory.Exists(Paths.Icons)) + { + Directory.Delete(Paths.Icons, true); + } + Directory.CreateDirectory(Paths.Icons); + SaveIcon(ShiftOS.Properties.Resources.iconTerminal, "Terminal"); + SaveIcon(ShiftOS.Properties.Resources.iconShiftorium, "Shiftorium"); + SaveIcon(ShiftOS.Properties.Resources.iconShifter, "Shifter"); + SaveIcon(ShiftOS.Properties.Resources.iconNameChanger, "NameChanger"); + SaveIcon(ShiftOS.Properties.Resources.iconTextPad, "TextPad"); + SaveIcon(ShiftOS.Properties.Resources.iconFileSkimmer, "FileSkimmer"); + SaveIcon(ShiftOS.Properties.Resources.iconArtpad, "Artpad"); + SaveIcon(ShiftOS.Properties.Resources.iconunitytoggle, "Unity"); + SaveIcon(ShiftOS.Properties.Resources.iconshutdown, "Shutdown"); + SaveIcon(ShiftOS.Properties.Resources.iconInfoBox_fw, "Infobox"); + SaveIcon(ShiftOS.Properties.Resources.iconKnowledgeInput, "KI"); + SaveIcon(ShiftOS.Properties.Resources.iconPong, "Pong"); + SaveIcon(ShiftOS.Properties.Resources.iconSkinLoader, "SkinLoader"); + SaveIcon(ShiftOS.Properties.Resources.iconIconManager, "IconManager"); + SaveIcon(ShiftOS.Properties.Resources.fileicondirectory, "Folder"); + SaveIcon(ShiftOS.Properties.Resources.fileicondoc, "TextFile"); + SaveIcon(ShiftOS.Properties.Resources.fileiconnone, "UnrecognizedFile"); + SaveIcon(ShiftOS.Properties.Resources.fileiconsaa, "SAAFile"); + SaveIcon(ShiftOS.Properties.Resources.fileiconsetup, "SetupPackage"); + SaveIcon(ShiftOS.Properties.Resources.skinfile, "SkinFile"); + IconRegistry = new Dictionary(); + foreach (var f in Directory.GetFiles(Paths.Icons)) + { + var finf = new FileInfo(f); + byte[] fBytes = File.ReadAllBytes(finf.FullName); + MemoryStream fStream = new MemoryStream(fBytes); + IconRegistry.Add(finf.Name, Image.FromStream(fStream)); + fStream.Close(); + } + } + + /// + /// Saves the icon to the registry. + /// + /// Icon to save + /// Icon title + public static void SaveIcon(Image img, string title) + { + img.Save(Paths.Icons + title, ImageFormat.Png); + + } + + /// + /// Saves all skin images + /// + public static void saveimages() + { + //Set image paths. + loadedSkin.applauncherclickpath = "applauncherclick"; + loadedSkin.panelbuttonpath = "panelbutton"; + loadedSkin.applaunchermouseoverpath = "applaunchermouseover"; + loadedSkin.applauncherpath = "applauncher"; + loadedSkin.panelclockpath = "panelclock"; + loadedSkin.desktopbackgroundpath = "desktopbackground"; + loadedSkin.desktoppanelpath = "desktoppanel"; + loadedSkin.minbtnhoverpath = "minbtnhover"; + loadedSkin.minbtnclickpath = "minbtnclick"; + loadedSkin.rightcornerpath = "rightcorner"; + loadedSkin.titlebarpath = "titlebar"; + loadedSkin.borderrightpath = "borderright"; + loadedSkin.borderleftpath = "borderleft"; + loadedSkin.borderbottompath = "borderbottom"; + loadedSkin.closebtnpath = "closebtn"; + loadedSkin.closebtnhoverpath = "closebtnhover"; + loadedSkin.closebtnclickpath = "closebtnclick"; + loadedSkin.rollbtnpath = "rollbtn"; + loadedSkin.rollbtnhoverpath = "rollbtnhover"; + loadedSkin.rollbtnclickpath = "rollbtnclick"; + loadedSkin.minbtnpath = "minbtn"; + loadedSkin.leftcornerpath = "leftcornerpath"; + loadedSkin.bottomleftcornerpath = "bottomleftcorner"; + loadedSkin.bottomrightcornerpath = "bottomrightcorner"; + //Save to new paths. + saveimage(loadedskin_images.applauncherclick, loadedSkin.applauncherclickpath); + saveimage(loadedskin_images.panelbutton, loadedSkin.panelbuttonpath); + saveimage(loadedskin_images.applaunchermouseover, loadedSkin.applaunchermouseoverpath); + saveimage(loadedskin_images.applauncher, loadedSkin.applauncherpath); + saveimage(loadedskin_images.panelclock, loadedSkin.panelclockpath); + saveimage(loadedskin_images.desktopbackground, loadedSkin.desktopbackgroundpath); + saveimage(loadedskin_images.desktoppanel, loadedSkin.desktoppanelpath); + saveimage(loadedskin_images.minbtnhover, loadedSkin.minbtnhoverpath); + saveimage(loadedskin_images.minbtnclick, loadedSkin.minbtnclickpath); + saveimage(loadedskin_images.rightcorner, loadedSkin.rightcornerpath); + saveimage(loadedskin_images.titlebar, loadedSkin.titlebarpath); + saveimage(loadedskin_images.borderright, loadedSkin.borderrightpath); + saveimage(loadedskin_images.borderleft, loadedSkin.borderleftpath); + saveimage(loadedskin_images.borderbottom, loadedSkin.borderbottompath); + saveimage(loadedskin_images.closebtn, loadedSkin.closebtnpath); + saveimage(loadedskin_images.closebtnhover, loadedSkin.closebtnhoverpath); + saveimage(loadedskin_images.closebtnclick, loadedSkin.closebtnclickpath); + saveimage(loadedskin_images.rollbtn, loadedSkin.rollbtnpath); + saveimage(loadedskin_images.rollbtnhover, loadedSkin.rollbtnhoverpath); + saveimage(loadedskin_images.rollbtnclick, loadedSkin.rollbtnclickpath); + saveimage(loadedskin_images.minbtn, loadedSkin.minbtnpath); + saveimage(loadedskin_images.leftcorner, loadedSkin.leftcornerpath); + saveimage(loadedskin_images.bottomleftcorner, loadedSkin.bottomleftcornerpath); + saveimage(loadedskin_images.bottomrightcorner, loadedSkin.bottomrightcornerpath); + foreach(KeyValuePair kv in IconRegistry) + { + if(kv.Value != null) + { + SaveIcon(kv.Value, kv.Key); + } + } + + } + + /// + /// Saves the skin to a new .skn file + /// + /// Target .skn file + public static void saveskintofile(string filePath) + { + saveskin(); + ZipFile.CreateFromDirectory(Paths.LoadedSkin, filePath); + } + + /// + /// Saves the skin. + /// + public static void saveskin() + { + saveimages(); + string rawjson = JsonConvert.SerializeObject(loadedSkin); + File.WriteAllText(Paths.LoadedSkin + "data.json", rawjson); + SavePanels(); + string panels = JsonConvert.SerializeObject(loadedSkin.DesktopPanels); + File.WriteAllText(Paths.LoadedSkin + "panels.json", panels); + SaveEmbeddedNamePack(); + } + } + + public class MyToolStripRenderer : ToolStripProfessionalRenderer + { + public MyToolStripRenderer() : base(new ShiftOSColorTable()) + { + + } + + public MyToolStripRenderer(ProfessionalColorTable table) : base(table) + { + + } + + protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) + { + if (e.Item.Text == API.CurrentSkin.applicationlaunchername) + { + e.TextColor = API.CurrentSkin.applicationsbuttontextcolour; + } + else { + e.TextColor = API.CurrentSkin.Menu_TextColor; + } + base.OnRenderItemText(e); + } + + protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) + { + //base.OnRenderToolStripBorder(e); + } + + + } +} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/SkinLoader.Designer.cs b/source/WindowsFormsApplication1/SkinLoader.Designer.cs deleted file mode 100644 index 72561f6..0000000 --- a/source/WindowsFormsApplication1/SkinLoader.Designer.cs +++ /dev/null @@ -1,739 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class SkinLoader - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SkinLoader)); - this.pgcontents = new System.Windows.Forms.Panel(); - this.label3 = new System.Windows.Forms.Label(); - this.btnapplyskin = new System.Windows.Forms.Button(); - this.btnsaveskin = new System.Windows.Forms.Button(); - this.btnloadskin = new System.Windows.Forms.Button(); - this.Label2 = new System.Windows.Forms.Label(); - this.btnclose = new System.Windows.Forms.Button(); - this.pnldesktoppreview = new System.Windows.Forms.Panel(); - this.predesktoppanel = new System.Windows.Forms.Panel(); - this.prepnlpanelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); - this.prepnlpanelbutton = new System.Windows.Forms.Panel(); - this.pretbicon = new System.Windows.Forms.PictureBox(); - this.pretbctext = new System.Windows.Forms.Label(); - this.pretimepanel = new System.Windows.Forms.Panel(); - this.prepaneltimetext = new System.Windows.Forms.Label(); - this.preapplaunchermenuholder = new System.Windows.Forms.Panel(); - this.predesktopappmenu = new System.Windows.Forms.MenuStrip(); - this.ApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.KnowledgeInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShiftoriumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ClockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.TerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.ShutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.Label1 = new System.Windows.Forms.Label(); - this.pnlwindowpreview = new System.Windows.Forms.Panel(); - this.prepgcontent = new System.Windows.Forms.Panel(); - this.prepgbottom = new System.Windows.Forms.Panel(); - this.prepgleft = new System.Windows.Forms.Panel(); - this.prepgbottomlcorner = new System.Windows.Forms.Panel(); - this.prepgright = new System.Windows.Forms.Panel(); - this.prepgbottomrcorner = new System.Windows.Forms.Panel(); - this.pretitlebar = new System.Windows.Forms.Panel(); - this.preminimizebutton = new System.Windows.Forms.Panel(); - this.prepnlicon = new System.Windows.Forms.PictureBox(); - this.prerollupbutton = new System.Windows.Forms.Panel(); - this.preclosebutton = new System.Windows.Forms.Panel(); - this.pretitletext = new System.Windows.Forms.Label(); - this.prepgtoplcorner = new System.Windows.Forms.Panel(); - this.prepgtoprcorner = new System.Windows.Forms.Panel(); - this.pnlskinpacks = new System.Windows.Forms.Panel(); - this.btnapplypackskin = new System.Windows.Forms.Button(); - this.label6 = new System.Windows.Forms.Label(); - this.cbpackfiles = new System.Windows.Forms.ComboBox(); - this.btnbrowse = new System.Windows.Forms.Button(); - this.txtpackpath = new System.Windows.Forms.TextBox(); - this.btnbacktoskinloader = new System.Windows.Forms.Button(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.panel1 = new System.Windows.Forms.Panel(); - this.pgcontents.SuspendLayout(); - this.pnldesktoppreview.SuspendLayout(); - this.predesktoppanel.SuspendLayout(); - this.prepnlpanelbuttonholder.SuspendLayout(); - this.prepnlpanelbutton.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).BeginInit(); - this.pretimepanel.SuspendLayout(); - this.preapplaunchermenuholder.SuspendLayout(); - this.predesktopappmenu.SuspendLayout(); - this.pnlwindowpreview.SuspendLayout(); - this.prepgleft.SuspendLayout(); - this.prepgright.SuspendLayout(); - this.pretitlebar.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).BeginInit(); - this.pnlskinpacks.SuspendLayout(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.label3); - this.pgcontents.Controls.Add(this.btnapplyskin); - this.pgcontents.Controls.Add(this.btnsaveskin); - this.pgcontents.Controls.Add(this.btnloadskin); - this.pgcontents.Controls.Add(this.Label2); - this.pgcontents.Controls.Add(this.btnclose); - this.pgcontents.Controls.Add(this.pnldesktoppreview); - this.pgcontents.Controls.Add(this.Label1); - this.pgcontents.Controls.Add(this.pnlwindowpreview); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(476, 462); - this.pgcontents.TabIndex = 20; - // - // label3 - // - this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label3.Location = new System.Drawing.Point(10, 384); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(454, 31); - this.label3.TabIndex = 10; - this.label3.Text = "The preview is based on the currently loaded skin, not the one selected by the \"L" + - "oad Skin\" button."; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnapplyskin - // - this.btnapplyskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnapplyskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnapplyskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnapplyskin.Location = new System.Drawing.Point(352, 418); - this.btnapplyskin.Name = "btnapplyskin"; - this.btnapplyskin.Size = new System.Drawing.Size(107, 32); - this.btnapplyskin.TabIndex = 9; - this.btnapplyskin.Text = "Apply Skin"; - this.btnapplyskin.UseVisualStyleBackColor = true; - this.btnapplyskin.Click += new System.EventHandler(this.btnapplyskin_Click); - // - // btnsaveskin - // - this.btnsaveskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnsaveskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsaveskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnsaveskin.Location = new System.Drawing.Point(239, 418); - this.btnsaveskin.Name = "btnsaveskin"; - this.btnsaveskin.Size = new System.Drawing.Size(107, 32); - this.btnsaveskin.TabIndex = 8; - this.btnsaveskin.Text = "Save Skin"; - this.btnsaveskin.UseVisualStyleBackColor = true; - this.btnsaveskin.Click += new System.EventHandler(this.btnsaveskin_Click); - // - // btnloadskin - // - this.btnloadskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnloadskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnloadskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnloadskin.Location = new System.Drawing.Point(126, 418); - this.btnloadskin.Name = "btnloadskin"; - this.btnloadskin.Size = new System.Drawing.Size(107, 32); - this.btnloadskin.TabIndex = 7; - this.btnloadskin.Text = "Load Skin"; - this.btnloadskin.UseVisualStyleBackColor = true; - this.btnloadskin.Click += new System.EventHandler(this.btnloadskin_Click); - // - // Label2 - // - this.Label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label2.Location = new System.Drawing.Point(4, 200); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(464, 30); - this.Label2.TabIndex = 6; - this.Label2.Text = "Desktop Preview"; - this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // btnclose - // - this.btnclose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnclose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnclose.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnclose.Location = new System.Drawing.Point(13, 418); - this.btnclose.Name = "btnclose"; - this.btnclose.Size = new System.Drawing.Size(107, 32); - this.btnclose.TabIndex = 5; - this.btnclose.Text = "Close"; - this.btnclose.UseVisualStyleBackColor = true; - this.btnclose.Click += new System.EventHandler(this.btnclose_Click); - // - // pnldesktoppreview - // - this.pnldesktoppreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnldesktoppreview.Controls.Add(this.predesktoppanel); - this.pnldesktoppreview.Location = new System.Drawing.Point(13, 233); - this.pnldesktoppreview.Name = "pnldesktoppreview"; - this.pnldesktoppreview.Size = new System.Drawing.Size(448, 148); - this.pnldesktoppreview.TabIndex = 4; - // - // predesktoppanel - // - this.predesktoppanel.BackColor = System.Drawing.Color.Gray; - this.predesktoppanel.Controls.Add(this.prepnlpanelbuttonholder); - this.predesktoppanel.Controls.Add(this.pretimepanel); - this.predesktoppanel.Controls.Add(this.preapplaunchermenuholder); - this.predesktoppanel.Dock = System.Windows.Forms.DockStyle.Top; - this.predesktoppanel.Location = new System.Drawing.Point(0, 0); - this.predesktoppanel.Name = "predesktoppanel"; - this.predesktoppanel.Size = new System.Drawing.Size(448, 25); - this.predesktoppanel.TabIndex = 1; - // - // prepnlpanelbuttonholder - // - this.prepnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; - this.prepnlpanelbuttonholder.Controls.Add(this.prepnlpanelbutton); - this.prepnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Fill; - this.prepnlpanelbuttonholder.Location = new System.Drawing.Point(116, 0); - this.prepnlpanelbuttonholder.Name = "prepnlpanelbuttonholder"; - this.prepnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); - this.prepnlpanelbuttonholder.Size = new System.Drawing.Size(235, 25); - this.prepnlpanelbuttonholder.TabIndex = 7; - // - // prepnlpanelbutton - // - this.prepnlpanelbutton.BackColor = System.Drawing.Color.Black; - this.prepnlpanelbutton.Controls.Add(this.pretbicon); - this.prepnlpanelbutton.Controls.Add(this.pretbctext); - this.prepnlpanelbutton.Location = new System.Drawing.Point(5, 3); - this.prepnlpanelbutton.Name = "prepnlpanelbutton"; - this.prepnlpanelbutton.Size = new System.Drawing.Size(126, 20); - this.prepnlpanelbutton.TabIndex = 18; - this.prepnlpanelbutton.Visible = false; - // - // pretbicon - // - this.pretbicon.BackColor = System.Drawing.Color.Transparent; - this.pretbicon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pretbicon.Image = global::ShiftOS.Properties.Resources.iconShifter; - this.pretbicon.Location = new System.Drawing.Point(4, 2); - this.pretbicon.Name = "pretbicon"; - this.pretbicon.Size = new System.Drawing.Size(16, 16); - this.pretbicon.TabIndex = 1; - this.pretbicon.TabStop = false; - // - // pretbctext - // - this.pretbctext.AutoSize = true; - this.pretbctext.BackColor = System.Drawing.Color.Transparent; - this.pretbctext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.pretbctext.ForeColor = System.Drawing.Color.White; - this.pretbctext.Location = new System.Drawing.Point(24, 2); - this.pretbctext.Name = "pretbctext"; - this.pretbctext.Size = new System.Drawing.Size(45, 16); - this.pretbctext.TabIndex = 0; - this.pretbctext.Text = "Shifter"; - // - // pretimepanel - // - this.pretimepanel.Controls.Add(this.prepaneltimetext); - this.pretimepanel.Dock = System.Windows.Forms.DockStyle.Right; - this.pretimepanel.Location = new System.Drawing.Point(351, 0); - this.pretimepanel.Name = "pretimepanel"; - this.pretimepanel.Size = new System.Drawing.Size(97, 25); - this.pretimepanel.TabIndex = 5; - // - // prepaneltimetext - // - this.prepaneltimetext.AutoSize = true; - this.prepaneltimetext.BackColor = System.Drawing.Color.Transparent; - this.prepaneltimetext.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.prepaneltimetext.Location = new System.Drawing.Point(5, 0); - this.prepaneltimetext.Name = "prepaneltimetext"; - this.prepaneltimetext.Size = new System.Drawing.Size(80, 24); - this.prepaneltimetext.TabIndex = 1; - this.prepaneltimetext.Text = "5000023"; - this.prepaneltimetext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // preapplaunchermenuholder - // - this.preapplaunchermenuholder.Controls.Add(this.predesktopappmenu); - this.preapplaunchermenuholder.Dock = System.Windows.Forms.DockStyle.Left; - this.preapplaunchermenuholder.Location = new System.Drawing.Point(0, 0); - this.preapplaunchermenuholder.Name = "preapplaunchermenuholder"; - this.preapplaunchermenuholder.Size = new System.Drawing.Size(116, 25); - this.preapplaunchermenuholder.TabIndex = 4; - // - // predesktopappmenu - // - this.predesktopappmenu.AutoSize = false; - this.predesktopappmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ApplicationsToolStripMenuItem}); - this.predesktopappmenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; - this.predesktopappmenu.Location = new System.Drawing.Point(0, 0); - this.predesktopappmenu.Name = "predesktopappmenu"; - this.predesktopappmenu.Padding = new System.Windows.Forms.Padding(0); - this.predesktopappmenu.Size = new System.Drawing.Size(116, 24); - this.predesktopappmenu.TabIndex = 0; - this.predesktopappmenu.Text = "MenuStrip1"; - // - // ApplicationsToolStripMenuItem - // - this.ApplicationsToolStripMenuItem.AutoSize = false; - this.ApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.KnowledgeInputToolStripMenuItem, - this.ShiftoriumToolStripMenuItem, - this.ClockToolStripMenuItem, - this.TerminalToolStripMenuItem, - this.ShifterToolStripMenuItem, - this.ToolStripSeparator1, - this.ShutdownToolStripMenuItem}); - this.ApplicationsToolStripMenuItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"; - this.ApplicationsToolStripMenuItem.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.ApplicationsToolStripMenuItem.ShowShortcutKeys = false; - this.ApplicationsToolStripMenuItem.Size = new System.Drawing.Size(102, 24); - this.ApplicationsToolStripMenuItem.Text = "Applications"; - this.ApplicationsToolStripMenuItem.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; - this.ApplicationsToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; - // - // KnowledgeInputToolStripMenuItem - // - this.KnowledgeInputToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.KnowledgeInputToolStripMenuItem.Name = "KnowledgeInputToolStripMenuItem"; - this.KnowledgeInputToolStripMenuItem.ShowShortcutKeys = false; - this.KnowledgeInputToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.KnowledgeInputToolStripMenuItem.Text = "Knowledge Input"; - // - // ShiftoriumToolStripMenuItem - // - this.ShiftoriumToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShiftoriumToolStripMenuItem.Name = "ShiftoriumToolStripMenuItem"; - this.ShiftoriumToolStripMenuItem.ShowShortcutKeys = false; - this.ShiftoriumToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.ShiftoriumToolStripMenuItem.Text = "Shiftorium"; - // - // ClockToolStripMenuItem - // - this.ClockToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ClockToolStripMenuItem.Name = "ClockToolStripMenuItem"; - this.ClockToolStripMenuItem.ShowShortcutKeys = false; - this.ClockToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.ClockToolStripMenuItem.Text = "Clock"; - // - // TerminalToolStripMenuItem - // - this.TerminalToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.TerminalToolStripMenuItem.Name = "TerminalToolStripMenuItem"; - this.TerminalToolStripMenuItem.ShowShortcutKeys = false; - this.TerminalToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.TerminalToolStripMenuItem.Text = "Terminal"; - // - // ShifterToolStripMenuItem - // - this.ShifterToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShifterToolStripMenuItem.Name = "ShifterToolStripMenuItem"; - this.ShifterToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.ShifterToolStripMenuItem.Text = "Shifter"; - // - // ToolStripSeparator1 - // - this.ToolStripSeparator1.BackColor = System.Drawing.Color.Transparent; - this.ToolStripSeparator1.ForeColor = System.Drawing.Color.White; - this.ToolStripSeparator1.Name = "ToolStripSeparator1"; - this.ToolStripSeparator1.Size = new System.Drawing.Size(178, 6); - // - // ShutdownToolStripMenuItem - // - this.ShutdownToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; - this.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"; - this.ShutdownToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.ShutdownToolStripMenuItem.Text = "Shut Down"; - // - // Label1 - // - this.Label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.Location = new System.Drawing.Point(4, 6); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(464, 30); - this.Label1.TabIndex = 2; - this.Label1.Text = "Window Preview"; - this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlwindowpreview - // - this.pnlwindowpreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlwindowpreview.Controls.Add(this.prepgcontent); - this.pnlwindowpreview.Controls.Add(this.prepgbottom); - this.pnlwindowpreview.Controls.Add(this.prepgleft); - this.pnlwindowpreview.Controls.Add(this.prepgright); - this.pnlwindowpreview.Controls.Add(this.pretitlebar); - this.pnlwindowpreview.Location = new System.Drawing.Point(13, 39); - this.pnlwindowpreview.Name = "pnlwindowpreview"; - this.pnlwindowpreview.Size = new System.Drawing.Size(448, 148); - this.pnlwindowpreview.TabIndex = 1; - // - // prepgcontent - // - this.prepgcontent.Dock = System.Windows.Forms.DockStyle.Fill; - this.prepgcontent.Location = new System.Drawing.Point(2, 30); - this.prepgcontent.Name = "prepgcontent"; - this.prepgcontent.Size = new System.Drawing.Size(444, 116); - this.prepgcontent.TabIndex = 20; - // - // prepgbottom - // - this.prepgbottom.BackColor = System.Drawing.Color.Gray; - this.prepgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.prepgbottom.Location = new System.Drawing.Point(2, 146); - this.prepgbottom.Name = "prepgbottom"; - this.prepgbottom.Size = new System.Drawing.Size(444, 2); - this.prepgbottom.TabIndex = 23; - // - // prepgleft - // - this.prepgleft.BackColor = System.Drawing.Color.Gray; - this.prepgleft.Controls.Add(this.prepgbottomlcorner); - this.prepgleft.Dock = System.Windows.Forms.DockStyle.Left; - this.prepgleft.Location = new System.Drawing.Point(0, 30); - this.prepgleft.Name = "prepgleft"; - this.prepgleft.Size = new System.Drawing.Size(2, 118); - this.prepgleft.TabIndex = 21; - // - // prepgbottomlcorner - // - this.prepgbottomlcorner.BackColor = System.Drawing.Color.Red; - this.prepgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; - this.prepgbottomlcorner.Location = new System.Drawing.Point(0, 116); - this.prepgbottomlcorner.Name = "prepgbottomlcorner"; - this.prepgbottomlcorner.Size = new System.Drawing.Size(2, 2); - this.prepgbottomlcorner.TabIndex = 14; - // - // prepgright - // - this.prepgright.BackColor = System.Drawing.Color.Gray; - this.prepgright.Controls.Add(this.prepgbottomrcorner); - this.prepgright.Dock = System.Windows.Forms.DockStyle.Right; - this.prepgright.Location = new System.Drawing.Point(446, 30); - this.prepgright.Name = "prepgright"; - this.prepgright.Size = new System.Drawing.Size(2, 118); - this.prepgright.TabIndex = 22; - // - // prepgbottomrcorner - // - this.prepgbottomrcorner.BackColor = System.Drawing.Color.Red; - this.prepgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; - this.prepgbottomrcorner.Location = new System.Drawing.Point(0, 116); - this.prepgbottomrcorner.Name = "prepgbottomrcorner"; - this.prepgbottomrcorner.Size = new System.Drawing.Size(2, 2); - this.prepgbottomrcorner.TabIndex = 15; - // - // pretitlebar - // - this.pretitlebar.BackColor = System.Drawing.Color.Gray; - this.pretitlebar.Controls.Add(this.preminimizebutton); - this.pretitlebar.Controls.Add(this.prepnlicon); - this.pretitlebar.Controls.Add(this.prerollupbutton); - this.pretitlebar.Controls.Add(this.preclosebutton); - this.pretitlebar.Controls.Add(this.pretitletext); - this.pretitlebar.Controls.Add(this.prepgtoplcorner); - this.pretitlebar.Controls.Add(this.prepgtoprcorner); - this.pretitlebar.Dock = System.Windows.Forms.DockStyle.Top; - this.pretitlebar.ForeColor = System.Drawing.Color.White; - this.pretitlebar.Location = new System.Drawing.Point(0, 0); - this.pretitlebar.Name = "pretitlebar"; - this.pretitlebar.Size = new System.Drawing.Size(448, 30); - this.pretitlebar.TabIndex = 19; - // - // preminimizebutton - // - this.preminimizebutton.BackColor = System.Drawing.Color.Black; - this.preminimizebutton.Location = new System.Drawing.Point(362, 5); - this.preminimizebutton.Name = "preminimizebutton"; - this.preminimizebutton.Size = new System.Drawing.Size(22, 22); - this.preminimizebutton.TabIndex = 32; - // - // prepnlicon - // - this.prepnlicon.BackColor = System.Drawing.Color.Transparent; - this.prepnlicon.Image = global::ShiftOS.Properties.Resources.iconSkinLoader; - this.prepnlicon.Location = new System.Drawing.Point(8, 8); - this.prepnlicon.Name = "prepnlicon"; - this.prepnlicon.Size = new System.Drawing.Size(16, 16); - this.prepnlicon.TabIndex = 32; - this.prepnlicon.TabStop = false; - this.prepnlicon.Visible = false; - // - // prerollupbutton - // - this.prerollupbutton.BackColor = System.Drawing.Color.Black; - this.prerollupbutton.Location = new System.Drawing.Point(390, 5); - this.prerollupbutton.Name = "prerollupbutton"; - this.prerollupbutton.Size = new System.Drawing.Size(22, 22); - this.prerollupbutton.TabIndex = 31; - // - // preclosebutton - // - this.preclosebutton.BackColor = System.Drawing.Color.Black; - this.preclosebutton.Location = new System.Drawing.Point(419, 5); - this.preclosebutton.Name = "preclosebutton"; - this.preclosebutton.Size = new System.Drawing.Size(22, 22); - this.preclosebutton.TabIndex = 20; - // - // pretitletext - // - this.pretitletext.AutoSize = true; - this.pretitletext.BackColor = System.Drawing.Color.Transparent; - this.pretitletext.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.pretitletext.Location = new System.Drawing.Point(29, 7); - this.pretitletext.Name = "pretitletext"; - this.pretitletext.Size = new System.Drawing.Size(77, 18); - this.pretitletext.TabIndex = 19; - this.pretitletext.Text = "Template"; - // - // prepgtoplcorner - // - this.prepgtoplcorner.BackColor = System.Drawing.Color.Red; - this.prepgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; - this.prepgtoplcorner.Location = new System.Drawing.Point(0, 0); - this.prepgtoplcorner.Name = "prepgtoplcorner"; - this.prepgtoplcorner.Size = new System.Drawing.Size(2, 30); - this.prepgtoplcorner.TabIndex = 17; - // - // prepgtoprcorner - // - this.prepgtoprcorner.BackColor = System.Drawing.Color.Red; - this.prepgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; - this.prepgtoprcorner.Location = new System.Drawing.Point(446, 0); - this.prepgtoprcorner.Name = "prepgtoprcorner"; - this.prepgtoprcorner.Size = new System.Drawing.Size(2, 30); - this.prepgtoprcorner.TabIndex = 16; - // - // pnlskinpacks - // - this.pnlskinpacks.BackColor = System.Drawing.Color.White; - this.pnlskinpacks.Controls.Add(this.btnapplypackskin); - this.pnlskinpacks.Controls.Add(this.label6); - this.pnlskinpacks.Controls.Add(this.cbpackfiles); - this.pnlskinpacks.Controls.Add(this.btnbrowse); - this.pnlskinpacks.Controls.Add(this.txtpackpath); - this.pnlskinpacks.Controls.Add(this.btnbacktoskinloader); - this.pnlskinpacks.Controls.Add(this.label5); - this.pnlskinpacks.Controls.Add(this.label4); - this.pnlskinpacks.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlskinpacks.Location = new System.Drawing.Point(0, 0); - this.pnlskinpacks.Name = "pnlskinpacks"; - this.pnlskinpacks.Size = new System.Drawing.Size(476, 462); - this.pnlskinpacks.TabIndex = 11; - // - // btnapplypackskin - // - this.btnapplypackskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnapplypackskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnapplypackskin.Location = new System.Drawing.Point(379, 418); - this.btnapplypackskin.Name = "btnapplypackskin"; - this.btnapplypackskin.Size = new System.Drawing.Size(94, 41); - this.btnapplypackskin.TabIndex = 7; - this.btnapplypackskin.Text = "Apply Skin"; - this.btnapplypackskin.UseVisualStyleBackColor = true; - this.btnapplypackskin.Click += new System.EventHandler(this.btnapplyskin_Click); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(15, 192); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(71, 13); - this.label6.TabIndex = 6; - this.label6.Text = "Select a skin:"; - // - // cbpackfiles - // - this.cbpackfiles.FormattingEnabled = true; - this.cbpackfiles.Location = new System.Drawing.Point(126, 188); - this.cbpackfiles.Name = "cbpackfiles"; - this.cbpackfiles.Size = new System.Drawing.Size(328, 21); - this.cbpackfiles.TabIndex = 5; - this.cbpackfiles.SelectedIndexChanged += new System.EventHandler(this.cbpackfiles_SelectedIndexChanged); - // - // btnbrowse - // - this.btnbrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnbrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnbrowse.Location = new System.Drawing.Point(389, 138); - this.btnbrowse.Name = "btnbrowse"; - this.btnbrowse.Size = new System.Drawing.Size(75, 23); - this.btnbrowse.TabIndex = 4; - this.btnbrowse.Text = "Browse..."; - this.btnbrowse.UseVisualStyleBackColor = true; - this.btnbrowse.Click += new System.EventHandler(this.btnbrowse_Click); - // - // txtpackpath - // - this.txtpackpath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtpackpath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtpackpath.Location = new System.Drawing.Point(13, 141); - this.txtpackpath.Name = "txtpackpath"; - this.txtpackpath.Size = new System.Drawing.Size(370, 20); - this.txtpackpath.TabIndex = 3; - // - // btnbacktoskinloader - // - this.btnbacktoskinloader.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnbacktoskinloader.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnbacktoskinloader.Location = new System.Drawing.Point(3, 418); - this.btnbacktoskinloader.Name = "btnbacktoskinloader"; - this.btnbacktoskinloader.Size = new System.Drawing.Size(94, 41); - this.btnbacktoskinloader.TabIndex = 2; - this.btnbacktoskinloader.Text = "Back to Skin Loader"; - this.btnbacktoskinloader.UseVisualStyleBackColor = true; - this.btnbacktoskinloader.Click += new System.EventHandler(this.btnbacktoskinloader_Click); - // - // label5 - // - this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.label5.Location = new System.Drawing.Point(5, 28); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(470, 110); - this.label5.TabIndex = 1; - this.label5.Text = resources.GetString("label5.Text"); - this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label4 - // - this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); - this.label4.Location = new System.Drawing.Point(3, 6); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(470, 22); - this.label4.TabIndex = 0; - this.label4.Text = "Skin Packs"; - this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // panel1 - // - this.panel1.Controls.Add(this.pgcontents); - this.panel1.Controls.Add(this.pnlskinpacks); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(476, 462); - this.panel1.TabIndex = 8; - // - // SkinLoader - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(476, 462); - this.Controls.Add(this.panel1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "SkinLoader"; - this.Text = "Skin_Loader"; - this.TopMost = true; - this.Load += new System.EventHandler(this.SkinLoader_Load); - this.pgcontents.ResumeLayout(false); - this.pnldesktoppreview.ResumeLayout(false); - this.predesktoppanel.ResumeLayout(false); - this.prepnlpanelbuttonholder.ResumeLayout(false); - this.prepnlpanelbutton.ResumeLayout(false); - this.prepnlpanelbutton.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).EndInit(); - this.pretimepanel.ResumeLayout(false); - this.pretimepanel.PerformLayout(); - this.preapplaunchermenuholder.ResumeLayout(false); - this.predesktopappmenu.ResumeLayout(false); - this.predesktopappmenu.PerformLayout(); - this.pnlwindowpreview.ResumeLayout(false); - this.prepgleft.ResumeLayout(false); - this.prepgright.ResumeLayout(false); - this.pretitlebar.ResumeLayout(false); - this.pretitlebar.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).EndInit(); - this.pnlskinpacks.ResumeLayout(false); - this.pnlskinpacks.PerformLayout(); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.Panel pnlwindowpreview; - internal System.Windows.Forms.Panel prepgcontent; - internal System.Windows.Forms.Panel prepgbottom; - internal System.Windows.Forms.Panel prepgleft; - internal System.Windows.Forms.Panel prepgbottomlcorner; - internal System.Windows.Forms.Panel prepgright; - internal System.Windows.Forms.Panel prepgbottomrcorner; - internal System.Windows.Forms.Panel pretitlebar; - internal System.Windows.Forms.PictureBox prepnlicon; - internal System.Windows.Forms.Panel prerollupbutton; - internal System.Windows.Forms.Panel preclosebutton; - internal System.Windows.Forms.Label pretitletext; - internal System.Windows.Forms.Panel prepgtoplcorner; - internal System.Windows.Forms.Panel prepgtoprcorner; - internal System.Windows.Forms.Button btnapplyskin; - internal System.Windows.Forms.Button btnsaveskin; - internal System.Windows.Forms.Button btnloadskin; - internal System.Windows.Forms.Label Label2; - internal System.Windows.Forms.Button btnclose; - internal System.Windows.Forms.Panel pnldesktoppreview; - internal System.Windows.Forms.Panel predesktoppanel; - internal System.Windows.Forms.Panel pretimepanel; - internal System.Windows.Forms.Label prepaneltimetext; - internal System.Windows.Forms.Panel preapplaunchermenuholder; - internal System.Windows.Forms.MenuStrip predesktopappmenu; - internal System.Windows.Forms.ToolStripMenuItem ApplicationsToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem KnowledgeInputToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ShiftoriumToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ClockToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem TerminalToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ShifterToolStripMenuItem; - internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator1; - internal System.Windows.Forms.ToolStripMenuItem ShutdownToolStripMenuItem; - internal System.Windows.Forms.Panel preminimizebutton; - internal System.Windows.Forms.FlowLayoutPanel prepnlpanelbuttonholder; - internal System.Windows.Forms.Panel prepnlpanelbutton; - internal System.Windows.Forms.PictureBox pretbicon; - internal System.Windows.Forms.Label pretbctext; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Panel pnlskinpacks; - private System.Windows.Forms.Button btnbacktoskinloader; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Button btnbrowse; - private System.Windows.Forms.TextBox txtpackpath; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.ComboBox cbpackfiles; - private System.Windows.Forms.Button btnapplypackskin; - private System.Windows.Forms.Panel panel1; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/SkinLoader.cs b/source/WindowsFormsApplication1/SkinLoader.cs deleted file mode 100644 index e6d5328..0000000 --- a/source/WindowsFormsApplication1/SkinLoader.cs +++ /dev/null @@ -1,652 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class SkinLoader : Form - { - public SkinLoader() - { - InitializeComponent(); - } - - public Skinning.Skin PreviewSkin = null; - public Skinning.Images PreviewImages = null; - - private void btnclose_Click(object sender, EventArgs e) - { - this.Close(); - } - - public string LoadedSkinFile = "fail"; - - public void LoadSkin(string res) - { - LoadedSkinFile = res; - ExtractSkin(res); - SetupDesktop(); - setupborders(); - setuptitlebar(); - setskin(); - } - - private void ExtractSkin(string file) - { - if(Directory.Exists(Paths.ToBeLoaded)) - { - Directory.Delete(Paths.ToBeLoaded, true); - } - API.ExtractFile(file, Paths.ToBeLoaded, false); - PreviewSkin = JsonConvert.DeserializeObject(File.ReadAllText(Paths.ToBeLoaded + "data.json")); - LoadImages(); - } - - private void LoadImages() - { - PreviewImages = new Skinning.Images(); - PreviewImages.applauncherclick = GetImage(PreviewSkin.applauncherclickpath); - PreviewImages.panelbutton = GetImage(PreviewSkin.panelbuttonpath); - PreviewImages.applaunchermouseover = GetImage(PreviewSkin.applaunchermouseoverpath); - PreviewImages.applauncher = GetImage(PreviewSkin.applauncherpath); - PreviewImages.panelclock = GetImage(PreviewSkin.panelclockpath); - PreviewImages.desktopbackground = GetImage(PreviewSkin.desktopbackgroundpath); - PreviewImages.desktoppanel = GetImage(PreviewSkin.desktoppanelpath); - PreviewImages.minbtnhover = GetImage(PreviewSkin.minbtnhoverpath); - PreviewImages.minbtnclick = GetImage(PreviewSkin.minbtnclickpath); - PreviewImages.rightcorner = GetImage(PreviewSkin.rightcornerpath); - PreviewImages.titlebar = GetImage(PreviewSkin.titlebarpath); - PreviewImages.borderright = GetImage(PreviewSkin.borderrightpath); - PreviewImages.borderleft = GetImage(PreviewSkin.borderleftpath); - PreviewImages.borderbottom = GetImage(PreviewSkin.borderbottompath); - PreviewImages.closebtn = GetImage(PreviewSkin.closebtnpath); - PreviewImages.closebtnhover = GetImage(PreviewSkin.closebtnhoverpath); - PreviewImages.closebtnclick = GetImage(PreviewSkin.closebtnclickpath); - PreviewImages.rollbtn = GetImage(PreviewSkin.rollbtnpath); - PreviewImages.rollbtnhover = GetImage(PreviewSkin.rollbtnhoverpath); - PreviewImages.rollbtnclick = GetImage(PreviewSkin.rollbtnclickpath); - PreviewImages.minbtn = GetImage(PreviewSkin.minbtnpath); - PreviewImages.leftcorner = GetImage(PreviewSkin.leftcornerpath); - PreviewImages.bottomleftcorner = GetImage(PreviewSkin.bottomleftcornerpath); - PreviewImages.bottomrightcorner = GetImage(PreviewSkin.bottomrightcornerpath); - } - - private Bitmap GetImage(string fileName) - { - Bitmap ret; - if (File.Exists(Paths.ToBeLoaded + fileName)) - { - using (Image img = Image.FromFile(Paths.ToBeLoaded + fileName)) - { - ret = new Bitmap(img); - } - } - else - { - ret = null; - } - return ret; - } - - private void btnloadskin_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".skn;.spk", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string res = API.GetFSResult(); - if(res != "fail") - { - if(res.EndsWith(".skn")) - { - LoadedSkinFile = res; - ExtractSkin(res); - SetupDesktop(); - setupborders(); - setuptitlebar(); - setskin(); - } - else if(res.EndsWith(".spk")) - { - LoadedPack = res; - SetupPackUI(); - } - } - }; - } - - public string LoadedPack = ""; - - public void SetupPackUI() - { - pgcontents.Hide(); - pnlskinpacks.Show(); - - txtpackpath.Text = LoadedPack; - - if(Directory.Exists(Paths.SkinDir + "_packdata")) - { - Directory.Delete(Paths.SkinDir + "_packdata", true); - } - API.ExtractFile(LoadedPack, Paths.SkinDir + "_packdata", false); - cbpackfiles.Items.Clear(); - foreach (string file in Directory.GetFiles(Paths.SkinDir + "_packdata")) - { - var finf = new FileInfo(file); - cbpackfiles.Items.Add(finf.Name); - - } - } - - private void ScanForSkinFiles(string dir, ref List files) - { - foreach(string file in Directory.GetFiles(dir)) - { - var finf = new FileInfo(file); - if(finf.Extension == ".skn") - { - files.Add(finf.FullName); - } - } - foreach(string dirname in Directory.GetDirectories(dir)) - { - ScanForSkinFiles(dirname, ref files); - } - } - - private void btnapplyskin_Click(object sender, EventArgs e) - { - if(LoadedSkinFile != "fail") - { - try - { - if (Viruses.InfectedWith("skininceptor")) - { - var rnd = new Random(); - switch(rnd.Next(0, 10)) - { - case 1: - case 3: - case 5: - case 7: - case 9: - //Load another random skin. - List skinfiles = new List(); - ScanForSkinFiles(Paths.SaveRoot, ref skinfiles); - string fname = skinfiles[rnd.Next(0, skinfiles.Count - 1)]; - Skinning.Utilities.loadsknfile(fname); - Skinning.Utilities.loadskin(); - API.CurrentSession.SetupDesktop(); - API.UpdateWindows(); - break; - default: - File.Delete(LoadedSkinFile); - //Corrupting binary is fun. - API.CreateInfoboxSession("Skin Loader - Error", "It appears that the provided skin file is either corrupted or not supported by this version of ShiftOS.", infobox.InfoboxMode.Info); - Skinning.Utilities.loadedSkin = new Skinning.Skin(); - Skinning.Utilities.loadedskin_images = new Skinning.Images(); - API.UpdateWindows(); - break; - } - } - else { - Skinning.Utilities.loadsknfile(LoadedSkinFile); - Skinning.Utilities.loadskin(); - API.CurrentSession.SetupDesktop(); - API.UpdateWindows(); - PreviewSkin = API.CurrentSkin; - PreviewImages = API.CurrentSkinImages; - SetupDesktop(); - setupborders(); - setuptitlebar(); - setskin(); - } - } - catch (Exception ex) - { - if (API.DeveloperMode == false) - { - API.CreateInfoboxSession("Skin Loader - Error", "It appears that the provided skin file is either corrupted or not supported by this version of ShiftOS.", infobox.InfoboxMode.Info); - } - else - { - API.CreateInfoboxSession("Skin Loader - Error", ex.Message, infobox.InfoboxMode.Info); - } - } - } - else - { - API.CreateInfoboxSession("Skin Loader - Error", "You have not selected a skin file to load! Try pressing \"Load Skin\" and selecting a .skn file.", infobox.InfoboxMode.Info); - } - } - - private void SkinLoader_Load(object sender, EventArgs e) - { - - PreviewSkin = API.CurrentSkin; - PreviewImages = API.CurrentSkinImages; - LoadPreview(); - pnlskinpacks.Hide(); - pgcontents.Show(); - } - - private void LoadPreview() - { - SetupDesktop(); - setupborders(); - setuptitlebar(); - setskin(); - - } - - #region Preview Skinning - - public void SetupDesktop() - { - - if (API.Upgrades["desktoppanel"] == true) - { - if (PreviewImages.desktoppanel == null) - { - predesktoppanel.BackColor = PreviewSkin.desktoppanelcolour; - predesktoppanel.BackgroundImage = null; - } - else { - predesktoppanel.BackgroundImage = PreviewImages.desktoppanel; - predesktoppanel.BackgroundImageLayout = (ImageLayout)PreviewSkin.desktoppanellayout; - predesktoppanel.BackColor = Color.Transparent; - } - - predesktoppanel.Size = new Size(predesktoppanel.Size.Width, PreviewSkin.desktoppanelheight); - switch (PreviewSkin.desktoppanelposition) - { - case "Top": - predesktoppanel.Dock = DockStyle.Top; - predesktopappmenu.Dock = DockStyle.Top; - break; - case "Bottom": - predesktoppanel.Dock = DockStyle.Bottom; - predesktopappmenu.Dock = DockStyle.Bottom; - break; - } - predesktoppanel.Show(); - } - else { - predesktoppanel.Hide(); - } - - - if (API.Upgrades["applaunchermenu"] == true) - { - ApplicationsToolStripMenuItem.Font = new Font(PreviewSkin.applicationbuttontextfont, PreviewSkin.applicationbuttontextsize, PreviewSkin.applicationbuttontextstyle); - ApplicationsToolStripMenuItem.Text = PreviewSkin.applicationlaunchername; - - - - ApplicationsToolStripMenuItem.Height = PreviewSkin.applicationbuttonheight; - if (PreviewImages.applauncher != null) - { - ApplicationsToolStripMenuItem.Text = ""; - ApplicationsToolStripMenuItem.BackColor = Color.Transparent; - } - else { - ApplicationsToolStripMenuItem.Text = PreviewSkin.applicationlaunchername; - ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbackgroundcolour; - ApplicationsToolStripMenuItem.BackgroundImage = null; - } - - preapplaunchermenuholder.Width = PreviewSkin.applaunchermenuholderwidth; - predesktopappmenu.Width = PreviewSkin.applaunchermenuholderwidth; - ApplicationsToolStripMenuItem.Width = PreviewSkin.applaunchermenuholderwidth; - preapplaunchermenuholder.Height = PreviewSkin.applicationbuttonheight; - predesktopappmenu.Height = PreviewSkin.applicationbuttonheight; - ApplicationsToolStripMenuItem.Height = PreviewSkin.applicationbuttonheight; - - if (PreviewImages.applauncher != null) - { - ApplicationsToolStripMenuItem.BackgroundImage = PreviewImages.applauncher; - } - else { - ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbackgroundcolour; - ApplicationsToolStripMenuItem.BackgroundImageLayout = (ImageLayout)PreviewSkin.applauncherlayout; - } - } - else { - ApplicationsToolStripMenuItem.Visible = false; - } - - if (API.Upgrades["desktoppanelclock"] == true) - { - - prepaneltimetext.ForeColor = PreviewSkin.clocktextcolour; - - if (PreviewImages.panelclock == null) - { - pretimepanel.BackColor = PreviewSkin.clockbackgroundcolor; - pretimepanel.BackgroundImage = null; - } - else { - pretimepanel.BackColor = Color.Transparent; - pretimepanel.BackgroundImage = PreviewImages.panelclock; - pretimepanel.BackgroundImageLayout = (ImageLayout)PreviewSkin.panelclocklayout; - } - prepaneltimetext.Font = new Font(PreviewSkin.panelclocktextfont, PreviewSkin.panelclocktextsize, PreviewSkin.panelclocktextstyle); - pretimepanel.Size = new Size(prepaneltimetext.Width + 3, pretimepanel.Height); - prepaneltimetext.Location = new Point(0, PreviewSkin.panelclocktexttop); - pretimepanel.Show(); - } - else { - pretimepanel.Hide(); - } - - - ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbuttoncolour; - - pnldesktoppreview.BackColor = PreviewSkin.desktopbackgroundcolour; - pnldesktoppreview.BackgroundImage = PreviewImages.desktopbackground; - pnldesktoppreview.BackgroundImageLayout = (ImageLayout)PreviewSkin.desktopbackgroundlayout; - - if (API.Upgrades["panelbuttons"] == true) - { - prepnlpanelbutton.Visible = API.Upgrades["panelbuttons"]; - - pretbicon.Image = Properties.Resources.iconTerminal; - pretbctext.Text = "Terminal"; - - prepnlpanelbutton.Margin = new Padding(0, PreviewSkin.panelbuttonfromtop, PreviewSkin.panelbuttongap, 0); - - if (API.Upgrades["appicons"] == true) - { - pretbicon.Show(); - } - else - { - pretbicon.Hide(); - } - pretbicon.Location = new Point(PreviewSkin.panelbuttoniconside, PreviewSkin.panelbuttonicontop); - pretbicon.Size = new Size(PreviewSkin.panelbuttoniconsize, PreviewSkin.panelbuttoniconsize); - prepnlpanelbutton.Size = new Size(PreviewSkin.panelbuttonwidth, PreviewSkin.panelbuttonheight); - prepnlpanelbutton.BackColor = PreviewSkin.panelbuttoncolour; - prepnlpanelbutton.BackgroundImage = PreviewImages.panelbutton; - prepnlpanelbutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.panelbuttonlayout; - pretbctext.ForeColor = PreviewSkin.panelbuttontextcolour; - pretbctext.Font = new Font(PreviewSkin.panelbuttontextfont, PreviewSkin.panelbuttontextsize, PreviewSkin.panelbuttontextstyle); - pretbctext.Location = new Point(PreviewSkin.panelbuttontextside, PreviewSkin.panelbuttontexttop); - - - pretbicon.Size = new Size(PreviewSkin.panelbuttoniconsize, PreviewSkin.panelbuttoniconsize); - - } - prepnlpanelbuttonholder.Padding = new Padding(PreviewSkin.panelbuttoninitialgap, 0, 0, 0); - - - } - - - - public void setskin() - { - - //disposals - preclosebutton.BackgroundImage = null; - pretitlebar.BackgroundImage = null; - prerollupbutton.BackgroundImage = null; - prepgtoplcorner.BackgroundImage = null; - prepgtoprcorner.BackgroundImage = null; - preminimizebutton.BackgroundImage = null; - //apply new skin - if (PreviewImages.closebtn == null) - preclosebutton.BackColor = PreviewSkin.closebtncolour; - else - preclosebutton.BackgroundImage = PreviewImages.closebtn; - preclosebutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.closebtnlayout; - if (PreviewImages.titlebar == null) - pretitlebar.BackColor = PreviewSkin.titlebarcolour; - else - pretitlebar.BackgroundImage = PreviewImages.titlebar; - pretitlebar.BackgroundImageLayout = (ImageLayout)PreviewSkin.titlebarlayout; - if (PreviewImages.rollbtn == null) - prerollupbutton.BackColor = PreviewSkin.rollbtncolour; - else - prerollupbutton.BackgroundImage = PreviewImages.rollbtn; - prerollupbutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.rollbtnlayout; - if (PreviewImages.leftcorner == null) - prepgtoplcorner.BackColor = PreviewSkin.leftcornercolour; - else - prepgtoplcorner.BackgroundImage = PreviewImages.leftcorner; - prepgtoplcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.leftcornerlayout; - if (PreviewImages.rightcorner == null) - prepgtoprcorner.BackColor = PreviewSkin.rightcornercolour; - else - prepgtoprcorner.BackgroundImage = PreviewImages.rightcorner; - prepgtoprcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.rightcornerlayout; - if (PreviewImages.minbtn == null) - preminimizebutton.BackColor = PreviewSkin.minbtncolour; - else - preminimizebutton.BackgroundImage = PreviewImages.minbtn; - preminimizebutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.minbtnlayout; - if (PreviewImages.borderleft == null) - prepgleft.BackColor = PreviewSkin.borderleftcolour; - else - prepgleft.BackgroundImage = PreviewImages.borderleft; - prepgleft.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderleftlayout; - if (PreviewImages.borderright == null) - prepgright.BackColor = PreviewSkin.borderrightcolour; - else - prepgright.BackgroundImage = PreviewImages.borderright; - prepgleft.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderrightlayout; - if (PreviewImages.borderbottom == null) - prepgbottom.BackColor = PreviewSkin.borderbottomcolour; - else - prepgbottom.BackgroundImage = PreviewImages.borderbottom; - prepgbottom.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderbottomlayout; - if (PreviewSkin.enablebordercorners == true) - { - if (PreviewImages.bottomleftcorner == null) - prepgbottomlcorner.BackColor = PreviewSkin.bottomleftcornercolour; - else - prepgbottomlcorner.BackgroundImage = PreviewImages.bottomleftcorner; - prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.bottomleftcornerlayout; - if (PreviewImages.bottomrightcorner == null) - prepgbottomrcorner.BackColor = PreviewSkin.bottomrightcornercolour; - else - prepgbottomrcorner.BackgroundImage = PreviewImages.bottomrightcorner; - prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.bottomrightcornerlayout; - } - else { - prepgbottomlcorner.BackColor = PreviewSkin.borderrightcolour; - prepgbottomrcorner.BackColor = PreviewSkin.borderrightcolour; - prepgbottomlcorner.BackgroundImage = null; - prepgbottomrcorner.BackgroundImage = null; - } - - //set bottom border corner size - prepgbottomlcorner.Size = new Size(PreviewSkin.borderwidth, PreviewSkin.borderwidth); - prepgbottomrcorner.Size = new Size(PreviewSkin.borderwidth, PreviewSkin.borderwidth); - prepgbottomlcorner.Location = new Point(0, pnlwindowpreview.Height - PreviewSkin.borderwidth); - prepgbottomrcorner.Location = new Point(pnlwindowpreview.Width, pnlwindowpreview.Height - PreviewSkin.borderwidth); - } - - private void setupborders() - { - if (API.Upgrades["windowborders"] == false) - { - prepgleft.Hide(); - prepgbottom.Hide(); - prepgright.Hide(); - } - } - - private void setuptitlebar() - { - setupborders(); - - prepgleft.Width = PreviewSkin.borderwidth; - prepgright.Width = PreviewSkin.borderwidth; - prepgbottom.Height = PreviewSkin.borderwidth; - pretitlebar.Height = PreviewSkin.titlebarheight; - - if (PreviewSkin.enablecorners == true) - { - prepgtoplcorner.Show(); - prepgtoprcorner.Show(); - prepgtoprcorner.Width = PreviewSkin.titlebarcornerwidth; - prepgtoplcorner.Width = PreviewSkin.titlebarcornerwidth; - } - else { - prepgtoplcorner.Hide(); - prepgtoprcorner.Hide(); - } - - if (API.Upgrades["titlebar"] == false) - { - pretitlebar.Hide(); - } - - if (API.Upgrades["titletext"] == false) - { - pretitletext.Hide(); - } - else { - pretitletext.Font = new Font(PreviewSkin.titletextfontfamily, PreviewSkin.titletextfontsize, PreviewSkin.titletextfontstyle, GraphicsUnit.Point); - pretitletext.Text = "Your app name here"; - pretitletext.Show(); - } - - if (API.Upgrades["closebutton"] == false) - { - preclosebutton.Hide(); - } - else { - preclosebutton.BackColor = PreviewSkin.closebtncolour; - preclosebutton.Size = PreviewSkin.closebtnsize; - preclosebutton.Show(); - } - - if (API.Upgrades["rollupbutton"] == false) - { - prerollupbutton.Hide(); - } - else { - prerollupbutton.BackColor = PreviewSkin.rollbtncolour; - prerollupbutton.Size = PreviewSkin.rollbtnsize; - prerollupbutton.Show(); - } - - if (API.Upgrades["minimizebutton"] == false) - { - preminimizebutton.Hide(); - } - else { - preminimizebutton.BackColor = PreviewSkin.minbtncolour; - preminimizebutton.Size = PreviewSkin.minbtnsize; - preminimizebutton.Show(); - } - - if (API.Upgrades["windowborders"] == true) - { - preclosebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.closebtnfromside - preclosebutton.Size.Width, PreviewSkin.closebtnfromtop); - prerollupbutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.rollbtnfromside - prerollupbutton.Size.Width, PreviewSkin.rollbtnfromtop); - preminimizebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.minbtnfromside - preminimizebutton.Size.Width, PreviewSkin.minbtnfromtop); - switch (PreviewSkin.titletextpos) - { - case "Left": - pretitletext.Location = new Point(PreviewSkin.titletextfromside, PreviewSkin.titletextfromtop); - break; - case "Centre": - pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, PreviewSkin.titletextfromtop); - break; - } - pretitletext.ForeColor = PreviewSkin.titletextcolour; - } - else { - preclosebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.closebtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preclosebutton.Size.Width, PreviewSkin.closebtnfromtop); - prerollupbutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.rollbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - prerollupbutton.Size.Width, PreviewSkin.rollbtnfromtop); - preminimizebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.minbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preminimizebutton.Size.Width, PreviewSkin.minbtnfromtop); - switch (PreviewSkin.titletextpos) - { - case "Left": - pretitletext.Location = new Point(PreviewSkin.titletextfromside + prepgtoplcorner.Width, PreviewSkin.titletextfromtop); - break; - case "Centre": - pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, PreviewSkin.titletextfromtop); - break; - } - pretitletext.ForeColor = PreviewSkin.titletextcolour; - } - - //Change when Icon skinning complete - // Change to program's icon - if (API.Upgrades["appicons"] == true) - { - prepnlicon.Visible = true; - prepnlicon.Location = new Point(PreviewSkin.titleiconfromside, PreviewSkin.titleiconfromtop); - prepnlicon.Size = new Size(PreviewSkin.titlebariconsize, PreviewSkin.titlebariconsize); - prepnlicon.Image = Properties.Resources.iconShifter; - - } - - } - - #endregion - - private void btnsaveskin_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".skn", File_Skimmer.FileSkimmerMode.Save); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string res = API.GetFSResult(); - if (res != "fail") - { - Skinning.Utilities.saveskintofile(res); - API.CreateInfoboxSession("Skin Loader", "The skin has been saved successfully.", infobox.InfoboxMode.Info); - } - }; - } - - private void btnbacktoskinloader_Click(object sender, EventArgs e) - { - pnlskinpacks.Hide(); - pgcontents.Show(); - } - - private void cbpackfiles_SelectedIndexChanged(object sender, EventArgs e) - { - if(cbpackfiles.Text.EndsWith(".skn")) - { - string dirsepchar = "\\"; - switch(OSInfo.GetPlatformID()) - { - case "microsoft": - dirsepchar = "\\"; - break; - default: - dirsepchar = "/"; - break; - } - LoadedSkinFile = Paths.SkinDir + "_packdata" + dirsepchar + cbpackfiles.Text; - } - } - - private void btnbrowse_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".spk", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string res = API.GetFSResult(); - if(res != "fail") - { - LoadedPack = res; - SetupPackUI(); - } - }; - } - } -} diff --git a/source/WindowsFormsApplication1/SkinLoader.resx b/source/WindowsFormsApplication1/SkinLoader.resx deleted file mode 100644 index a4bf070..0000000 --- a/source/WindowsFormsApplication1/SkinLoader.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - Skin Packs are a handy way of grouping your skins together into one file so that you don't have to load separate .skn files. You can simply select any skin in the loaded pack, hit Apply and be on your way! - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/SpeechListener.cs b/source/WindowsFormsApplication1/SpeechListener.cs deleted file mode 100644 index b871fd4..0000000 --- a/source/WindowsFormsApplication1/SpeechListener.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Speech.Recognition; - -namespace ShiftOS -{ - public class SpeechListener - { - private SpeechRecognitionEngine _recognizer = null; - public SpeechRecognitionEngine Engine - { - get - { - return _recognizer; - } - } - - public SpeechListener() - { - _recognizer = new SpeechRecognitionEngine(); - var g = new DictationGrammar(); - _recognizer.LoadGrammar(g); - _recognizer.SetInputToDefaultAudioDevice(); - _recognizer.SpeechRecognized += (object s, SpeechRecognizedEventArgs a) => - { - try { - var h = OnRecognize; - if (h != null) - { - h(a.Result.Text, new EventArgs()); - } - } - catch - { - - } - }; - _recognizer.AudioStateChanged += (object s, AudioStateChangedEventArgs a) => - { - if(a.AudioState == AudioState.Stopped) - { - _recognizer.RecognizeAsync(); - } - }; - - } - - public event EventHandler OnRecognize; - } -} diff --git a/source/WindowsFormsApplication1/Template.Designer.cs b/source/WindowsFormsApplication1/Template.Designer.cs deleted file mode 100644 index 1cb48cf..0000000 --- a/source/WindowsFormsApplication1/Template.Designer.cs +++ /dev/null @@ -1,243 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class Template - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.Load += new EventHandler(this.Template_Load); - this.pgleft = new System.Windows.Forms.Panel(); - this.pgbottomlcorner = new System.Windows.Forms.Panel(); - this.pgright = new System.Windows.Forms.Panel(); - this.pgbottomrcorner = new System.Windows.Forms.Panel(); - this.titlebar = new System.Windows.Forms.Panel(); - this.minimizebutton = new System.Windows.Forms.Panel(); - this.pnlicon = new System.Windows.Forms.PictureBox(); - this.rollupbutton = new System.Windows.Forms.Panel(); - this.closebutton = new System.Windows.Forms.Panel(); - this.lbtitletext = new System.Windows.Forms.Label(); - this.pgtoplcorner = new System.Windows.Forms.Panel(); - this.pgtoprcorner = new System.Windows.Forms.Panel(); - this.pgbottom = new System.Windows.Forms.Panel(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.pullbs = new System.Windows.Forms.Timer(this.components); - this.pullbottom = new System.Windows.Forms.Timer(this.components); - this.pullside = new System.Windows.Forms.Timer(this.components); - this.pgleft.SuspendLayout(); - this.pgright.SuspendLayout(); - this.titlebar.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pnlicon)).BeginInit(); - this.SuspendLayout(); - // - // pgleft - // - this.pgleft.BackColor = System.Drawing.Color.Gray; - this.pgleft.Controls.Add(this.pgbottomlcorner); - this.pgleft.Dock = System.Windows.Forms.DockStyle.Left; - this.pgleft.Location = new System.Drawing.Point(0, 30); - this.pgleft.Name = "pgleft"; - this.pgleft.Size = new System.Drawing.Size(2, 345); - this.pgleft.TabIndex = 16; - // - // pgbottomlcorner - // - this.pgbottomlcorner.BackColor = System.Drawing.Color.Red; - this.pgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pgbottomlcorner.Location = new System.Drawing.Point(0, 343); - this.pgbottomlcorner.Name = "pgbottomlcorner"; - this.pgbottomlcorner.Size = new System.Drawing.Size(2, 2); - this.pgbottomlcorner.TabIndex = 14; - // - // pgright - // - this.pgright.BackColor = System.Drawing.Color.Gray; - this.pgright.Controls.Add(this.pgbottomrcorner); - this.pgright.Dock = System.Windows.Forms.DockStyle.Right; - this.pgright.Location = new System.Drawing.Point(545, 30); - this.pgright.Name = "pgright"; - this.pgright.Size = new System.Drawing.Size(2, 345); - this.pgright.TabIndex = 17; - // - // pgbottomrcorner - // - this.pgbottomrcorner.BackColor = System.Drawing.Color.Red; - this.pgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pgbottomrcorner.Location = new System.Drawing.Point(0, 343); - this.pgbottomrcorner.Name = "pgbottomrcorner"; - this.pgbottomrcorner.Size = new System.Drawing.Size(2, 2); - this.pgbottomrcorner.TabIndex = 15; - // - // titlebar - // - this.titlebar.BackColor = System.Drawing.Color.Gray; - this.titlebar.Controls.Add(this.minimizebutton); - this.titlebar.Controls.Add(this.pnlicon); - this.titlebar.Controls.Add(this.rollupbutton); - this.titlebar.Controls.Add(this.closebutton); - this.titlebar.Controls.Add(this.lbtitletext); - this.titlebar.Controls.Add(this.pgtoplcorner); - this.titlebar.Controls.Add(this.pgtoprcorner); - this.titlebar.Dock = System.Windows.Forms.DockStyle.Top; - this.titlebar.ForeColor = System.Drawing.Color.White; - this.titlebar.Location = new System.Drawing.Point(0, 0); - this.titlebar.Name = "titlebar"; - this.titlebar.Size = new System.Drawing.Size(547, 30); - this.titlebar.TabIndex = 14; - // - // minimizebutton - // - this.minimizebutton.BackColor = System.Drawing.Color.Black; - this.minimizebutton.Location = new System.Drawing.Point(246, 5); - this.minimizebutton.Name = "minimizebutton"; - this.minimizebutton.Size = new System.Drawing.Size(22, 22); - this.minimizebutton.Click += new EventHandler(this.minimizebutton_Click); - this.minimizebutton.TabIndex = 24; - // - // pnlicon - // - this.pnlicon.BackColor = System.Drawing.Color.Transparent; - this.pnlicon.Location = new System.Drawing.Point(8, 8); - this.pnlicon.Name = "pnlicon"; - this.pnlicon.Size = new System.Drawing.Size(16, 16); - this.pnlicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pnlicon.TabIndex = 24; - this.pnlicon.TabStop = false; - this.pnlicon.Visible = false; - // - // rollupbutton - // - this.rollupbutton.BackColor = System.Drawing.Color.Black; - this.rollupbutton.Location = new System.Drawing.Point(274, 3); - this.rollupbutton.Name = "rollupbutton"; - this.rollupbutton.Click += new EventHandler(this.rollupbutton_Click); - this.rollupbutton.Size = new System.Drawing.Size(22, 22); - this.rollupbutton.TabIndex = 22; - // - // closebutton - // - this.closebutton.BackColor = System.Drawing.Color.Black; - this.closebutton.Location = new System.Drawing.Point(302, 3); - this.closebutton.Name = "closebutton"; - this.closebutton.Click += new EventHandler(this.closebutton_Click); - this.closebutton.Size = new System.Drawing.Size(22, 22); - this.closebutton.TabIndex = 20; - // - // lbtitletext - // - this.lbtitletext.AutoSize = true; - this.lbtitletext.BackColor = System.Drawing.Color.Transparent; - this.lbtitletext.Font = new System.Drawing.Font("Felix Titling", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbtitletext.Location = new System.Drawing.Point(26, 7); - this.lbtitletext.Name = "lbtitletext"; - this.lbtitletext.Size = new System.Drawing.Size(89, 18); - this.lbtitletext.TabIndex = 19; - this.lbtitletext.Text = "Template"; - // - // pgtoplcorner - // - this.pgtoplcorner.BackColor = System.Drawing.Color.Red; - this.pgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; - this.pgtoplcorner.Location = new System.Drawing.Point(0, 0); - this.pgtoplcorner.Name = "pgtoplcorner"; - this.pgtoplcorner.Size = new System.Drawing.Size(2, 30); - this.pgtoplcorner.TabIndex = 17; - // - // pgtoprcorner - // - this.pgtoprcorner.BackColor = System.Drawing.Color.Red; - this.pgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; - this.pgtoprcorner.Location = new System.Drawing.Point(545, 0); - this.pgtoprcorner.Name = "pgtoprcorner"; - this.pgtoprcorner.Size = new System.Drawing.Size(2, 30); - this.pgtoprcorner.TabIndex = 16; - // - // pgbottom - // - this.pgbottom.BackColor = System.Drawing.Color.Gray; - this.pgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pgbottom.Location = new System.Drawing.Point(2, 373); - this.pgbottom.Name = "pgbottom"; - this.pgbottom.Size = new System.Drawing.Size(543, 2); - this.pgbottom.TabIndex = 18; - // - // pgcontents - // - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(2, 30); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(543, 343); - this.pgcontents.TabIndex = 15; - // - // pullbs - // - this.pullbs.Interval = 1; - // - // pullbottom - // - this.pullbottom.Interval = 1; - // - // pullside - // - this.pullside.Interval = 1; - // - // Template - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(547, 375); - this.Controls.Add(this.pgcontents); - this.Controls.Add(this.pgbottom); - this.Controls.Add(this.pgright); - this.Controls.Add(this.pgleft); - this.Controls.Add(this.titlebar); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "Template"; - this.Text = "template"; - this.TopMost = true; - this.pgleft.ResumeLayout(false); - this.pgright.ResumeLayout(false); - this.titlebar.ResumeLayout(false); - this.titlebar.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pnlicon)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgleft; - internal System.Windows.Forms.Panel pgbottomlcorner; - internal System.Windows.Forms.Panel pgright; - internal System.Windows.Forms.Panel pgbottomrcorner; - internal System.Windows.Forms.Panel titlebar; - internal System.Windows.Forms.Panel pgtoplcorner; - internal System.Windows.Forms.Panel pgtoprcorner; - internal System.Windows.Forms.Panel pgbottom; - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Label lbtitletext; - internal System.Windows.Forms.Panel closebutton; - internal System.Windows.Forms.Panel rollupbutton; - internal System.Windows.Forms.PictureBox pnlicon; - internal System.Windows.Forms.Panel minimizebutton; - internal System.Windows.Forms.Timer pullbs; - internal System.Windows.Forms.Timer pullbottom; - internal System.Windows.Forms.Timer pullside; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Template.cs b/source/WindowsFormsApplication1/Template.cs deleted file mode 100644 index 5d0ddd1..0000000 --- a/source/WindowsFormsApplication1/Template.cs +++ /dev/null @@ -1,589 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Template : Form - { - public List NewControls = new List(); - public Form ManagedForm = null; - public Template(string aname, Image aicon, Form frmToTake) - { - AppName = aname; - AppIcon = aicon; - foreach(Control ctrl in frmToTake.Controls) - { - NewControls.Add(ctrl); - ctrl.Show(); - } - ManagedForm = frmToTake; - InitializeComponent(); - } - - public Image AppIcon { get; set; } - public string AppName { get; set; } - - #region "Template Code" - public int rolldownsize; - public int oldbordersize; - public int oldtitlebarheight; - public bool justopened = false; - public bool needtorollback = false; - //replace with minimum size - public int minimumsizewidth = 0; - //replace with minimum size - public int minimumsizeheight = 0; - - // ERROR: Handles clauses are not supported in C# - private void Template_Load(object sender, EventArgs e) - { - justopened = true; - this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; - this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; - setupall(); - foreach(Control ctrl in NewControls) - { - this.pgcontents.Controls.Add(ctrl); - } - - //CHANGE NAME - //modify to proper name - } - - public void setupall() - { - setuptitlebar(); - setupborders(); - setskin(); - } - - // ERROR: Handles clauses are not supported in C# - private void ShiftOSDesktop_keydown(object sender, System.Windows.Forms.KeyEventArgs e) - { - //Make terminal appear - if (e.KeyCode == Keys.T && e.Control) - { - API.CreateForm(new Terminal(), API.CurrentSave.TerminalName, Properties.Resources.iconTerminal); - } - - //Movable Windows - if (API.Upgrades["movablewindows"] == true) - { - if (e.KeyCode == Keys.A && e.Control) - { - e.Handled = true; - this.Location = new Point(this.Location.X - 30, this.Location.Y); - } - if (e.KeyCode == Keys.D && e.Control) - { - e.Handled = true; - this.Location = new Point(this.Location.X + 30, this.Location.Y); - } - if (e.KeyCode == Keys.W && e.Control) - { - e.Handled = true; - this.Location = new Point(this.Location.X, this.Location.Y - 30); - } - if (e.KeyCode == Keys.S && e.Control) - { - e.Handled = true; - this.Location = new Point(this.Location.X, this.Location.Y + 30); - } - } - } - - // ERROR: Handles clauses are not supported in C# - private void titlebar_MouseDown(object sender, MouseEventArgs e) - { - // Handle Draggable Windows - if (API.Upgrades["draggablewindows"] == true) - { - if (e.Button == MouseButtons.Left) - { - titlebar.Capture = false; - lbtitletext.Capture = false; - pnlicon.Capture = false; - pgtoplcorner.Capture = false; - pgtoprcorner.Capture = false; - const int WM_NCLBUTTONDOWN = 0xa1; - const int HTCAPTION = 2; - Message msg = Message.Create(this.Handle, WM_NCLBUTTONDOWN, new IntPtr(HTCAPTION), IntPtr.Zero); - this.DefWndProc(ref msg); - } - //ShiftOSDesktop.log = //ShiftOSDesktop.log + My.Computer.Clock.LocalTime + " User dragged " + this.Name + " to " + this.Location.ToString + Environment.NewLine; - } - } - - public void setupborders() - { - if (API.Upgrades["windowborders"] == false) - { - pgleft.Hide(); - pgbottom.Hide(); - pgright.Hide(); - this.Size = new Size(this.Width - pgleft.Width - pgright.Width, this.Height - pgbottom.Height); - } - } - - // ERROR: Handles clauses are not supported in C# - private void closebutton_Click(object sender, EventArgs e) - { - this.Close(); - } - - // ERROR: Handles clauses are not supported in C# - private void closebutton_MouseEnter(object sender, EventArgs e) - { - closebutton.BackgroundImage = API.CurrentSkinImages.closebtnhover; - } - - // ERROR: Handles clauses are not supported in C# - private void closebutton_MouseLeave(object sender, EventArgs e) - { - closebutton.BackgroundImage = API.CurrentSkinImages.closebtn; - } - - // ERROR: Handles clauses are not supported in C# - private void closebutton_MouseDown(object sender, EventArgs e) - { - closebutton.BackgroundImage = API.CurrentSkinImages.closebtnclick; - } - - public Point OldLoc = new Point(0, 0); - public bool Minimized = false; - - // ERROR: Handles clauses are not supported in C# - private void minimizebutton_Click(object sender, EventArgs e) - { - OldLoc = this.Location; - Minimized = true; - this.Location = new Point(99999, 99999); - } - - // ERROR: Handles clauses are not supported in C# - private void rollupbutton_Click(object sender, EventArgs e) - { - rollupanddown(); - } - - // ERROR: Handles clauses are not supported in C# - private void rollupbutton_MouseEnter(object sender, EventArgs e) - { - rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtnhover; - } - - // ERROR: Handles clauses are not supported in C# - private void rollupbutton_MouseLeave(object sender, EventArgs e) - { - rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtn; - } - - // ERROR: Handles clauses are not supported in C# - private void rollupbutton_MouseDown(object sender, EventArgs e) - { - rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtnclick; - } - - - public void setuptitlebar() - { - setupborders(); - - if (this.Height == this.titlebar.Height) { pgleft.Show(); pgbottom.Show(); pgright.Show(); this.Height = rolldownsize; needtorollback = true; } - pgleft.Width = API.CurrentSkin.borderwidth; - pgright.Width = API.CurrentSkin.borderwidth; - pgbottom.Height = API.CurrentSkin.borderwidth; - titlebar.Height = API.CurrentSkin.titlebarheight; - - if (justopened == true) - { - this.Size = new Size(420, 510); - //put the default size of your window here - this.Size = new Size(this.Width, this.Height + API.CurrentSkin.titlebarheight - 30); - this.Size = new Size(this.Width + API.CurrentSkin.borderwidth + API.CurrentSkin.borderwidth, this.Height + API.CurrentSkin.borderwidth); - oldbordersize = API.CurrentSkin.borderwidth; - oldtitlebarheight = API.CurrentSkin.titlebarheight; - justopened = false; - } - else { - if (this.Visible == true) - { - this.Size = new Size(this.Width - (2 * oldbordersize) + (2 * API.CurrentSkin.borderwidth), (this.Height - oldtitlebarheight - oldbordersize) + API.CurrentSkin.titlebarheight + API.CurrentSkin.borderwidth); - oldbordersize = API.CurrentSkin.borderwidth; - oldtitlebarheight = API.CurrentSkin.titlebarheight; - rolldownsize = this.Height; - if (needtorollback == true) { this.Height = titlebar.Height; pgleft.Hide(); pgbottom.Hide(); pgright.Hide(); } - } - } - - if (API.CurrentSkin.enablecorners == true) - { - pgtoplcorner.Show(); - pgtoprcorner.Show(); - pgtoprcorner.Width = API.CurrentSkin.titlebarcornerwidth; - pgtoplcorner.Width = API.CurrentSkin.titlebarcornerwidth; - } - else { - pgtoplcorner.Hide(); - pgtoprcorner.Hide(); - } - - if (API.Upgrades["titlebar"] == false) - { - titlebar.Hide(); - this.Size = new Size(this.Width, this.Size.Height - titlebar.Height); - } - - if (API.Upgrades["titletext"] == false) - { - lbtitletext.Hide(); - } - else { - lbtitletext.Font = new Font(API.CurrentSkin.titletextfontfamily, API.CurrentSkin.titletextfontsize, API.CurrentSkin.titletextfontstyle, GraphicsUnit.Point); - lbtitletext.Text = this.AppName; - //Remember to change to name of program!!!! - lbtitletext.Show(); - } - - if (API.Upgrades["closebutton"] == false) - { - closebutton.Hide(); - } - else { - closebutton.BackColor = API.CurrentSkin.closebtncolour; - closebutton.Size = API.CurrentSkin.closebtnsize; - closebutton.Show(); - } - - if (API.Upgrades["rollupbutton"] == false) - { - rollupbutton.Hide(); - } - else { - rollupbutton.BackColor = API.CurrentSkin.rollbtncolour; - rollupbutton.Size = API.CurrentSkin.rollbtnsize; - rollupbutton.Show(); - } - - if (API.Upgrades["minimizebutton"] == false) - { - minimizebutton.Hide(); - } - else { - minimizebutton.BackColor = API.CurrentSkin.minbtncolour; - minimizebutton.Size = API.CurrentSkin.minbtnsize; - minimizebutton.Show(); - } - - if (API.Upgrades["windowborders"] == true) - { - closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); - rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); - minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); - switch (API.CurrentSkin.titletextpos) - { - case "Left": - lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside, API.CurrentSkin.titletextfromtop); - break; - case "Centre": - lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); - break; - } - lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; - } - else { - closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); - rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); - minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); - switch (API.CurrentSkin.titletextpos) - { - case "Left": - lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside + pgtoplcorner.Width, API.CurrentSkin.titletextfromtop); - break; - case "Centre": - lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); - break; - } - lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; - } - - //Change when Icon skinning complete - // Change to program's icon - if (API.Upgrades["appicons"] == true) - { - pnlicon.Visible = true; - pnlicon.Location = new Point(API.CurrentSkin.titleiconfromside, API.CurrentSkin.titleiconfromtop); - pnlicon.Size = new Size(API.CurrentSkin.titlebariconsize, API.CurrentSkin.titlebariconsize); - pnlicon.Image = this.AppIcon; - //Replace with the correct icon for the program. - } - - } - - public void rollupanddown() - { - if (this.Height == this.titlebar.Height) - { - pgleft.Show(); - pgbottom.Show(); - pgright.Show(); - this.Height = rolldownsize; - this.MinimumSize = new Size(minimumsizewidth, minimumsizeheight); - } - else { - this.MinimumSize = new Size(0, 0); - pgleft.Hide(); - pgbottom.Hide(); - pgright.Hide(); - rolldownsize = this.Height; - this.Height = this.titlebar.Height; - } - } - - public void resettitlebar() - { - if (API.Upgrades["windowborders"] == true) - { - closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); - rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); - minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); - switch (API.CurrentSkin.titletextpos) - { - case "Left": - lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside, API.CurrentSkin.titletextfromtop); - break; - case "Centre": - lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); - break; - } - lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; - } - else { - closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); - rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); - minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); - switch (API.CurrentSkin.titletextpos) - { - case "Left": - lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside + pgtoplcorner.Width, API.CurrentSkin.titletextfromtop); - break; - case "Centre": - lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); - break; - } - lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; - } - } - - // ERROR: Handles clauses are not supported in C# - private void pullside_Tick(System.Object sender, System.EventArgs e) - { - this.Width = Cursor.Position.X - this.Location.X; - resettitlebar(); - } - - // ERROR: Handles clauses are not supported in C# - private void pullbottom_Tick(System.Object sender, System.EventArgs e) - { - this.Height = Cursor.Position.Y - this.Location.Y; - resettitlebar(); - } - - // ERROR: Handles clauses are not supported in C# - private void pullbs_Tick(object sender, System.EventArgs e) - { - this.Width = Cursor.Position.X - this.Location.X; - this.Height = Cursor.Position.Y - this.Location.Y; - resettitlebar(); - } - - //delete this for non-resizable windows - // ERROR: Handles clauses are not supported in C# - private void Rightpull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullside.Start(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void RightCursorOn_MouseDown(object sender, System.EventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - Cursor = Cursors.SizeWE; - } - } - - // ERROR: Handles clauses are not supported in C# - private void bottomCursorOn_MouseDown(object sender, System.EventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - Cursor = Cursors.SizeNS; - } - } - - // ERROR: Handles clauses are not supported in C# - private void CornerCursorOn_MouseDown(object sender, System.EventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - Cursor = Cursors.SizeNWSE; - } - } - - // ERROR: Handles clauses are not supported in C# - private void SizeCursoroff_MouseDown(object sender, System.EventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - Cursor = Cursors.Default; - } - } - - // ERROR: Handles clauses are not supported in C# - private void rightpull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullside.Stop(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void bottompull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullbottom.Start(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void buttompull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullbottom.Stop(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void bspull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullbs.Start(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void bspull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullbs.Stop(); - } - } - - public void setskin() - { - //disposals - closebutton.BackgroundImage = null; - titlebar.BackgroundImage = null; - rollupbutton.BackgroundImage = null; - pgtoplcorner.BackgroundImage = null; - pgtoprcorner.BackgroundImage = null; - minimizebutton.BackgroundImage = null; - //apply new skin - if (API.CurrentSkinImages.closebtn == null) - closebutton.BackColor = API.CurrentSkin.closebtncolour; - else - closebutton.BackgroundImage = API.CurrentSkinImages.closebtn; - closebutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.closebtnlayout; - if (API.CurrentSkinImages.titlebar == null) - titlebar.BackColor = API.CurrentSkin.titlebarcolour; - else - titlebar.BackgroundImage = API.CurrentSkinImages.titlebar; - titlebar.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.titlebarlayout; - if (API.CurrentSkinImages.rollbtn == null) - rollupbutton.BackColor = API.CurrentSkin.rollbtncolour; - else - rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtn; - rollupbutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.rollbtnlayout; - if (API.CurrentSkinImages.leftcorner == null) - pgtoplcorner.BackColor = API.CurrentSkin.leftcornercolour; - else - pgtoplcorner.BackgroundImage = API.CurrentSkinImages.leftcorner; - pgtoplcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.leftcornerlayout; - if (API.CurrentSkinImages.rightcorner == null) - pgtoprcorner.BackColor = API.CurrentSkin.rightcornercolour; - else - pgtoprcorner.BackgroundImage = API.CurrentSkinImages.rightcorner; - pgtoprcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.rightcornerlayout; - if (API.CurrentSkinImages.minbtn == null) - minimizebutton.BackColor = API.CurrentSkin.minbtncolour; - else - minimizebutton.BackgroundImage = API.CurrentSkinImages.minbtn; - minimizebutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.minbtnlayout; - if (API.CurrentSkinImages.borderleft == null) - pgleft.BackColor = API.CurrentSkin.borderleftcolour; - else - pgleft.BackgroundImage = API.CurrentSkinImages.borderleft; - pgleft.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderleftlayout; - if (API.CurrentSkinImages.borderright == null) - pgright.BackColor = API.CurrentSkin.borderrightcolour; - else - pgright.BackgroundImage = API.CurrentSkinImages.borderright; - pgleft.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderrightlayout; - if (API.CurrentSkinImages.borderbottom == null) - pgbottom.BackColor = API.CurrentSkin.borderbottomcolour; - else - pgbottom.BackgroundImage = API.CurrentSkinImages.borderbottom; - pgbottom.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderbottomlayout; - if (API.CurrentSkin.enablebordercorners == true) - { - if (API.CurrentSkinImages.bottomleftcorner == null) - pgbottomlcorner.BackColor = API.CurrentSkin.bottomleftcornercolour; - else - pgbottomlcorner.BackgroundImage = API.CurrentSkinImages.bottomleftcorner; - pgbottomlcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomleftcornerlayout; - if (API.CurrentSkinImages.bottomrightcorner == null) - pgbottomrcorner.BackColor = API.CurrentSkin.bottomrightcornercolour; - else - pgbottomrcorner.BackgroundImage = API.CurrentSkinImages.bottomrightcorner; - pgbottomrcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomrightcornerlayout; - } - else { - pgbottomlcorner.BackColor = API.CurrentSkin.borderrightcolour; - pgbottomrcorner.BackColor = API.CurrentSkin.borderrightcolour; - pgbottomlcorner.BackgroundImage = null; - pgbottomrcorner.BackgroundImage = null; - } - - //set bottom border corner size - pgbottomlcorner.Size = new Size(API.CurrentSkin.borderwidth, API.CurrentSkin.borderwidth); - pgbottomrcorner.Size = new Size(API.CurrentSkin.borderwidth, API.CurrentSkin.borderwidth); - pgbottomlcorner.Location = new Point(0, this.Height - API.CurrentSkin.borderwidth); - pgbottomrcorner.Location = new Point(this.Width, this.Height - API.CurrentSkin.borderwidth); - - this.TransparencyKey = Skinning.Utilities.globaltransparencycolour; - } - - // ERROR: Handles clauses are not supported in C# - private void Clock_FormClosing(object sender, FormClosingEventArgs e) - { - this.Close(); - } - } - #endregion -} diff --git a/source/WindowsFormsApplication1/Template.resx b/source/WindowsFormsApplication1/Template.resx deleted file mode 100644 index 8bf59aa..0000000 --- a/source/WindowsFormsApplication1/Template.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 101, 17 - - - 214, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Terminal.Designer.cs b/source/WindowsFormsApplication1/Terminal.Designer.cs deleted file mode 100644 index 5f7ba27..0000000 --- a/source/WindowsFormsApplication1/Terminal.Designer.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class Terminal - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.txtterm = new System.Windows.Forms.TextBox(); - this.tmrfirstrun = new System.Windows.Forms.Timer(this.components); - this.tmrshutdown = new System.Windows.Forms.Timer(this.components); - this.pullbs = new System.Windows.Forms.Timer(this.components); - this.pullbottom = new System.Windows.Forms.Timer(this.components); - this.pullside = new System.Windows.Forms.Timer(this.components); - this.tmrstorylineupdate = new System.Windows.Forms.Timer(this.components); - this.panel2 = new System.Windows.Forms.Panel(); - this.tmrsetfont = new System.Windows.Forms.Timer(this.components); - this.panel2.SuspendLayout(); - this.SuspendLayout(); - // - // txtterm - // - this.txtterm.BackColor = System.Drawing.Color.Black; - this.txtterm.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtterm.Cursor = System.Windows.Forms.Cursors.IBeam; - this.txtterm.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtterm.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtterm.ForeColor = System.Drawing.Color.White; - this.txtterm.Location = new System.Drawing.Point(0, 0); - this.txtterm.Multiline = true; - this.txtterm.Name = "txtterm"; - this.txtterm.Size = new System.Drawing.Size(650, 396); - this.txtterm.TabIndex = 0; - this.txtterm.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ScrollDeactivate); - this.txtterm.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ScrollTerm); - // - // tmrfirstrun - // - this.tmrfirstrun.Interval = 1000; - // - // pullbs - // - this.pullbs.Interval = 1; - // - // pullbottom - // - this.pullbottom.Interval = 1; - // - // pullside - // - this.pullside.Interval = 1; - // - // tmrstorylineupdate - // - this.tmrstorylineupdate.Interval = 1000; - // - // panel2 - // - this.panel2.Controls.Add(this.txtterm); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(0, 0); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(650, 396); - this.panel2.TabIndex = 3; - // - // tmrsetfont - // - this.tmrsetfont.Tick += new System.EventHandler(this.tmrsetfont_Tick); - // - // Terminal - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Black; - this.ClientSize = new System.Drawing.Size(650, 396); - this.Controls.Add(this.panel2); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.KeyPreview = true; - this.MinimumSize = new System.Drawing.Size(350, 200); - this.Name = "Terminal"; - this.Text = "Terminal"; - this.TopMost = true; - this.Load += new System.EventHandler(this.Terminal_Load); - this.panel2.ResumeLayout(false); - this.panel2.PerformLayout(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.TextBox txtterm; - internal System.Windows.Forms.Timer tmrfirstrun; - internal System.Windows.Forms.Timer tmrshutdown; - internal System.Windows.Forms.Timer pullbs; - internal System.Windows.Forms.Timer pullbottom; - internal System.Windows.Forms.Timer pullside; - internal System.Windows.Forms.Timer tmrstorylineupdate; - - #endregion - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Timer tmrsetfont; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Terminal.cs b/source/WindowsFormsApplication1/Terminal.cs deleted file mode 100644 index 944b333..0000000 --- a/source/WindowsFormsApplication1/Terminal.cs +++ /dev/null @@ -1,2757 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Drawing; -using System.Drawing.Text; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class Terminal : Form - { - string current_dir = ""; - - public Terminal() - { - InitializeComponent(); - current_dir = Paths.SaveRoot; - } - - public Terminal(bool modlog) - { - ModLogger = modlog; - InitializeComponent(); - API.LoggerTerminal = this; - current_dir = Paths.SaveRoot; - } - - public void StartOtherPlayerStory() - { - var t = new System.Windows.Forms.Timer(); - t.Interval = 4000; - int i = 0; - t.Tick += (object s, EventArgs a) => - { - switch(i) - { - case 0: - WriteLine("IP Address is connecting as '???'..."); - break; - case 1: - WriteLine("Connection established."); - break; - case 2: - WriteLine("???: Hi, ShiftOS user. I have something to tell you."); - break; - case 3: - WriteLine("???: I'm not a hacker. I'm not a programmer. I am just like you."); - break; - case 4: - WriteLine("???: I am... the Other Player."); - break; - case 5: - WriteLine("???: I too have heard DevX's story about ShiftOS being an experimental operating system."); - break; - case 6: - WriteLine("???: I have also met another user. We'll call him... I don't know... Robert."); - break; - case 7: - WriteLine("???: And this Robert guy, well, he knows a lot about ShiftOS, and DevX."); - break; - case 8: - WriteLine("???: Robert is a fake name I'm calling him. You might know him as Hacker101."); - break; - case 9: - WriteLine("???: Anyways, He told me about you, so I figured I would help you get out of this mess."); - break; - case 10: - WriteLine("???: He said he'll help me get my hard drive back, and get ShiftOS off my system. Once he does, I'll tell you."); - break; - case 11: - WriteLine("???: In the meantime, I have one word for you. Survive. Do NOT let DevX get to you. Do not fall for his tricks. Just play along until I contact you."); - break; - case 12: - WriteLine("???: I'll talk to you about this soon."); - break; - case 13: - t.Stop(); - this.Close(); - API.Upgrades["otherplayerstory1"] = true; - break; - } - i += 1; - }; - t.Start(); - } - - public bool ModLogger = false; - - private void Terminal_Load(object sender, EventArgs e) - { - objToWriteTo = this.txtterm; - SaveSystem.Utilities.LoadedSave.newgame = false; - if(API.Upgrades["windowedterminal"] == true) - { - this.WindowState = FormWindowState.Normal; - } else - { - this.WindowState = FormWindowState.Maximized; - } - - txtterm.KeyDown += new KeyEventHandler(txtterm_KeyPress); - txtterm.Click += new EventHandler(txtterm_Click); - tmrfirstrun.Tick += new EventHandler(tmrfirstrun_Tick); - tmrshutdown.Tick += new EventHandler(tmrshutdown_Tick); - if (Hacking == false) - { - WriteLine(prefix); - } - txtterm.Select(txtterm.TextLength, 0); - if (API.Upgrades["terminalscrollbar"] == true) - { - txtterm.ScrollBars = ScrollBars.Vertical; - } - else - { - txtterm.ScrollBars = ScrollBars.None; - - } - txtterm.MouseWheel += (object s, MouseEventArgs a) => - { - if (Zooming == true) - { - txtterm.ScrollBars = ScrollBars.None; - if (ZoomMultiplier > 0) - { - if (a.Delta > 0) - { - ZoomMultiplier += 1; - } else - { - ZoomMultiplier -= 1; - } - ResetTerminalFont(); - } - else - { - ZoomMultiplier = 1; - } - } - }; - ResetTerminalFont(); - StartLogCheck(); - tmrsetfont.Start(); - - - } - - - private void StartLogCheck() - { - if(ModLogger == true) - { - var tmrlog = new System.Windows.Forms.Timer(); - tmrlog.Interval = 500; - tmrlog.Tick += (object s, EventArgs a) => - { - if (File.Exists(Paths.Mod_Temp + "cmdlog")) - { - string log = File.ReadAllText(Paths.Mod_Temp + "cmdlog"); - API.CreateInfoboxSession("test", log, infobox.InfoboxMode.Info); - } - }; - tmrlog.Start(); - } - } - - public string[] cmds; - public int rolldownsize; - public int oldbordersize; - public int oldtitlebarheight; - public bool justopened = false; - public bool needtorollback = false; - public int minimumsizewidth = 350; - - public int minimumsizeheight = 200; - - public string EndOfAlias; - public string command; - int trackpos; - int firstrun; - public bool sendinputtomod = false; - - string prefix = $"{API.Username}@{API.OSName} $> "; - - private void ReadCommand() - { - command = txtterm.Lines[txtterm.Lines.Length - 1]; - command = command.Replace(prefix, ""); - command = command.ToLower(); - } - - internal void StartDanaRossStory() - { - var t = new Thread(new ThreadStart(new Action(() => - { - WriteLine("User <65.48.121.24> connecting as 'Dana'"); - API.PlaySound(Properties.Resources.dial_up_modem_02); - WriteLine("Dana: Hey! That was quite the battle, huh?"); - BeepSleep(1000); - WriteLine("Dana: Well - since you beat me, let me let you in on a little secret."); - BeepSleep(3000); - WriteLine("Dana: ShiftOS's desktop may seem pretty complicated and customizable for you right now, but trust me. It gets better."); - BeepSleep(2500); - WriteLine("Dana: I'm gonna patch your Shiftorium so you can get some neat upgrades!"); - BeepSleep(3000); - WriteLine("Dana: Also, if you feel like doing more hacker battles, why not check out Tier 2 in the Network Browser?"); - BeepSleep(2750); - WriteLine("Dana: I've also added my network modules to your network - you'll just have to wait for them to regenerate."); - BeepSleep(500); - WriteLine("Dana: Well, talk to you some other time!"); - BeepSleep(1000); - this.Invoke(new Action(() => - { - API.Upgrades["midgamebridge"] = true; - this.Close(); - })); - }))); - t.Start(); - } - - // ERROR: Handles clauses are not supported in C# - private void txtterm_Click(object sender, EventArgs e) - { - txtterm.Select(txtterm.TextLength, 0); - txtterm.ScrollToCaret(); - } - - public void SelectBottom() - { - txtterm.Focus(); - txtterm.Select(txtterm.TextLength, 0); - } - - // ERROR: Handles clauses are not supported in C# - private void txtterm_KeyPress(object sender, System.Windows.Forms.KeyEventArgs e) - { - if(e.Control) { - if(API.Upgrades["zoomableterminal"] == true) - { - Zooming = true; - } - } - - if (e.KeyCode == Keys.T && e.Control && blockctrlt == false) - { - this.Close(); - e.SuppressKeyPress = true; - } - - switch (e.KeyCode) - { - case Keys.ShiftKey: - trackpos = trackpos - 1; - break; - case Keys.Alt: - trackpos = trackpos - 1; - break; - case Keys.CapsLock: - trackpos = trackpos - 1; - break; - case Keys.ControlKey: - trackpos = trackpos - 1; - break; - case Keys.LWin: - trackpos = trackpos - 1; - break; - case Keys.RWin: - trackpos = trackpos - 1; - break; - case Keys.Right: - if (Hacking == false) - { - if (txtterm.SelectionStart == txtterm.TextLength) - { - trackpos = trackpos - 1; - } - } - else - { - switch (SelectedMode) - { - case 1: - if (SelectedCharacter < ShiftOS.Hacking.Tools.Count - 1) - { - SelectedCharacter += 1; - ShowTools(); - } - break; - case 2: - if (SelectedCharacter < ShiftOS.Hacking.Characters.Count - 1) - { - SelectedCharacter += 1; - ShowChar(); - } - break; - } - } - break; - case Keys.Left: - if (Hacking == false) - { - if (trackpos < 1) - { - e.SuppressKeyPress = true; - trackpos = trackpos - 1; - } - else { - trackpos = trackpos - 2; - } - } - else - { - switch(SelectedMode) - { - case 1: - if (SelectedCharacter > 0) - { - SelectedCharacter -= 1; - ShowTools(); - } - - break; - case 2: - if (SelectedCharacter > 0) - { - SelectedCharacter -= 1; - ShowChar(); - } - break; - - } - } - break; - case Keys.Up: - e.SuppressKeyPress = true; - ReadCommand(); - if (API.LastRanCommand != "" && command == "") - { - txtterm.Text += API.LastRanCommand; - trackpos += API.LastRanCommand.Length; - txtterm.Select(txtterm.TextLength, 0); - } - else { - trackpos = trackpos - 1; - } - break; - case Keys.Down: - e.SuppressKeyPress = true; - trackpos = trackpos - 1; - break; - case Keys.D1: - if (Hacking == true) - { - SelectedMode = 1; - Hack_ShowCharacters(); - e.SuppressKeyPress = true; - } - else - { - trackpos -= 1; - } - break; - case Keys.D2: - if (Hacking == true && SelectedMode == 0) - { - SelectedMode = 2; - Hack_ShowCharacters(); - e.SuppressKeyPress = true; - } - else - { - trackpos -= 1; - } - break; - } - - if (e.KeyCode == Keys.Enter) - { - e.SuppressKeyPress = true; - if (LuaMode == false) - { - if (Hacking == false) - { - ReadCommand(); - if (command != "") - { - DoCommand(); - } - - if (command == "clear") - { - txtterm.Text = txtterm.Text + prefix; - txtterm.Select(txtterm.Text.Length, 0); - } - else - { - txtterm.Text = txtterm.Text + Environment.NewLine + prefix; - txtterm.Select(txtterm.Text.Length, 0); - } - trackpos = 0; - } - else - { - switch(SelectedMode) - { - case 1: - ShiftOS.Hacking.StartHack(SelectedCharacter, UpgradeToHack); - this.Close(); - break; - case 2: - var c = ShiftOS.Hacking.Characters[SelectedCharacter].Cost; - if(API.Codepoints >= c) - { - API.RemoveCodepoints(c); - ShiftOS.Hacking.StartHackWithCharacter(SelectedCharacter, UpgradeToHack); - this.Close(); - } - else - { - WriteLine("You can't afford to pay this partner. Please choose another."); - } - break; - } - } - } - else - { - trackpos = 0; - var lua = txtterm.Lines[txtterm.Lines.Length - 1]; - try { - Interpreter.mod(lua); - } - catch(Exception ex) - { - WriteLine(ex.Message); - } - if (LuaMode == true) - { - WriteLine(""); - } - txtterm.Select(txtterm.TextLength, 0); - } - } - else { - if (e.KeyCode == Keys.Back) - { - } - else { - if (Viruses.InfectedWith("keyboardfucker")) { - var rnd = new Random(); - if(rnd.Next(0, 20) == 10) - { - e.Handled = true; - txtterm.Text += Viruses.KeyboardInceptor.Intercept(); - trackpos += 1; - } - else - { - trackpos += 1; - } - } - else { - trackpos = trackpos + 1; - } - } - } - - if (e.KeyCode == Keys.Back) - { - if (trackpos < 1) - { - e.SuppressKeyPress = true; - } - else { - if (txtterm.SelectedText.Length < 1) - { - trackpos = trackpos - 1; - } - else { - e.SuppressKeyPress = true; - } - } - } - - if (SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades["autoscrollterminal"] == true) - { - txtterm.Select(txtterm.TextLength, 0); - txtterm.ScrollToCaret(); - } - - } - - internal void StartShellShock() - { - var t = new Thread(new ThreadStart(new Action(() => - { - Thread.Sleep(300); - WriteLine("Sending false packet to shiftnet://devx/tracker..."); - Thread.Sleep(100); - WriteLine("Awaiting reply from server..."); - Thread.Sleep(5000); - WriteLine("Got reply with header \"SOS_TRK_GET\"."); - Thread.Sleep(50); - WriteLine("[kernel] Sending usage log to server..."); - WriteLine("Intercepting outgoing request..."); - Thread.Sleep(200); - WriteLine("Got packet contents..."); - Thread.Sleep(25); - WriteLine("Sifting..."); - Thread.Sleep(500); - WriteLine("Found connection data for shiftnet://devx/tracker."); - Thread.Sleep(100); - WriteLine(@"Username: devx -Password: z7fjsd3"); - Thread.Sleep(100); - WriteLine("Authenticating with SSH server on shiftnet://devx/tracker running Arch Linux x86_64..."); - Thread.Sleep(1000); - WriteLine("[SSH] Access granted."); - Thread.Sleep(100); - WriteLine($"[Message] ???: We're in. In about 75 seconds DevX's server will go down. It'll be quite cool actually, Don't know if you've ever seen a forkbomb in action, but because you're in an SSH session with DevX's server and I'm also controlling the same session you're gonna see one. Oh, yeah, this server's the only one of his that doesn't actually run ShiftOS."); - Thread.Sleep(25000); - this.Invoke(new Action(() => - { - txtterm.Text = ""; - })); - int i = 60; - while(i >= 1) - { - Thread.Sleep(1000); - WriteLine($"Beginning attack on server in {i} seconds."); - i -= 1; - } - WriteLine("[devx@tracker ~]$ "); - string cmd = ":`(`)`{` `:`|`:` `&` `}`;`:"; //yep. I'm pretending to use a forkbomb on DevX's server. This'll be FUN to code. - foreach(string c in cmd.Split('`')) - { - Thread.Sleep(100); - this.Invoke(new Action(() => - { - txtterm.Text += c; - })); - } - WriteLine("[devx@tracker ~]$ "); - WriteLine("[Message] ???: Alright. I entered the command for you. Looks like it did nothing. DevX wouldn't even know what's happening... but keep your terminal open for 30 seconds."); - Thread.Sleep(30000); - this.Invoke(new Action(() => - { - FinalMission.EndGameHandler.GoToNextObjective(); - })); - int progress = 0; - while(progress <= 10000) - { - int r = new Random().Next(0, 1); - switch(r) - { - case 0: - WriteLine("-bash: fork: Resource temporarily unavailable"); - break; - case 1: - WriteLine("-bash: fork: retry: Resource temporarily unavailable"); - break; - } - Thread.Sleep(progress / 10); - progress++; - } - WriteLine("[SSH] Connection to server dropped."); - this.Invoke(new Action(() => - { - FinalMission.EndGameHandler.GoToNextObjective(); - })); - this.Invoke(new Action(() => { this.Close(); })); - }))); - t.Start(); - } - - public void SetPrefix(string _prefix) - { - prefix = _prefix; - } - - internal void StartBridgeToMidGame() - { - var t2 = new System.Windows.Forms.Timer(); - t2.Interval = 4000; - int i2 = 0; - t2.Tick += (object s, EventArgs e) => - { - switch (i2) - { - case 0: - if(API.Upgrades["hacker101"] == true) - { - WriteLine("Hacker101: Hello. We meet again. The Other Player told me about your situation."); - } - else - { - API.Upgrades["hacker101"] = true; - WriteLine("Hacker101: The Other Player told me about your situation."); - } - break; - case 1: - WriteLine("Hacker101: Lemme guess. DevX found out about you having the Shiftnet, didn't he..."); - break; - case 2: - WriteLine("Hacker101: Well I guess we'll have to fight fire with fire. You remember that person who told you about Hacker Battles?"); - break; - case 3: - WriteLine("Hacker101: It's time you know who he is. He is, in fact, me, and to continue on about Hacker Battles..."); - break; - case 4: - WriteLine("Hacker101: I can help you take down DevX, but we'll need to take down his defenses and get into his network."); - break; - case 5: - WriteLine("Hacker101: DevX's network of servers is larger than any datacenter on Earth, and it'll take time to plan the perfect attack."); - break; - case 6: - WriteLine("Hacker101: Think of it this way. DevX has a network of networks, each with their own leader."); - break; - case 7: - WriteLine("Hacker101: I can help you find these networks, but it's up to you to take 'em down."); - break; - case 8: - WriteLine("Hacker101: Of course, it's hard to hack a network if you don't know how to start a battle."); - break; - case 9: - WriteLine("Hacker101: Introducing the Battle Preparation Screen."); - break; - case 10: - WriteLine("Hacker101: It'll show you any network I've found, and it'll tell you some useful info about it."); - break; - case 11: - WriteLine("Hacker101: However the spkg package for this thing is HUGE, and will require lots of tweaks to the ShiftOS desktop. spkg will hopefully administer the tweaks for you, but here's a rundown of what'll happen."); - break; - case 12: - WriteLine("Hacker101: For one, you'll be able to have multiple desktop panels to fit more widgets on them."); - break; - case 13: - WriteLine("Hacker101: And if you have the App Launcher, it will get sorted so it doesn't take up the entire screen when you get so many applications installed."); - break; - case 14: - WriteLine("Hacker101: And the rest is a surprise. I'll initiate the install sequence."); - break; - case 15: - InstallMidGameDesktop(); - break; - } - i2 += 1; - }; - - var t = new System.Windows.Forms.Timer(); - t.Interval = 4000; - int i = 0; - - t.Tick += (object s, EventArgs a) => - { - - - switch (i) - { - case 0: - WriteLine("IP connecting as Hacker101..."); - break; - case 1: - WriteLine("Hacker101: Hello, ShiftOS user. I am a hacker."); - break; - case 2: - if (API.BitnoteAddress != null) - { - WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, your Bitnote Address is {API.BitnoteAddress.Address}, and you have {API.BitnoteAddress.Bitnotes}. That's your private address, by the way."); - } - else - { - WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, and you do not have a Bitnote Address."); - } - break; - case 3: - WriteLine("Hacker101: Enough fun in games. Listen. There are two things you need to know."); - break; - case 4: - WriteLine("Hacker101: Thing #1. DevX isn't real."); - break; - case 5: - WriteLine("Hacker101: I've decompiled parts of ShiftOS. And you know what I found?"); - break; - case 6: - WriteLine("Hacker101: Everything DevX says. Everything he does. Everything he THINKS. It's all hardcoded directly into ShiftOS's core."); - break; - case 7: - WriteLine("Hacker101: Want proof? Here. I'll run a quick Lua script for you."); - string DecompiledCode = Properties.Resources.DecompiledCode; - var l = new LuaInterpreter(); - Form win = l.mod.create_window("Decompiled Code", null, 720, 480); - TextBox txt = new TextBox(); - txt.Multiline = true; - txt.Text = Properties.Resources.DecompiledCode; - txt.BorderStyle = BorderStyle.None; - txt.BackColor = Color.Black; - txt.ForeColor = Color.White; - txt.Font = new Font(OSInfo.GetMonospaceFont(), 9); - l.mod.set_dock(txt, "fill"); - l.mod.add_widget_to_window(win, txt); - break; - case 8: - WriteLine("Hacker101: Not only is that some nice, smokin' fresh C# code directly from ShiftOS, but that's a nice steaming pile of bird poop on DevX's doorstep."); - break; - case 9: - WriteLine("Hacker101: Thing #2. The Shiftnet holds some secrets."); - break; - case 10: - WriteLine("Hacker101: What kind of secrets, I hear you ask through your microphone (jesus, do you seriously talk to us with your voice? Are you that bored?)"); - break; - case 11: - WriteLine("Hacker101: Well. I'm talking, pieces of a Lua script that could help stop DevX dead in his digital tracks."); - break; - case 12: - WriteLine("Hacker101: All you gotta do is use my decryption utilities to find the pieces of this encrypted script, download them, decrypt them, and the utility will automatically piece them together for you."); - break; - case 13: - WriteLine("Hacker101: Shiftnet pages ending with .enc are your best bet."); - break; - case 14: - WriteLine("Hacker101: You can install the utilities using spkg install secret."); - break; - case 15: - WriteLine("Hacker101: Then, when the application installs, run it, and use the password 'binary_hell' to install the REAL utilities."); - break; - case 16: - WriteLine("Hacker101: Anyways, that wraps that up. But hang on. One more thing..."); - t.Stop(); - ShiftOS.Hacking.AddCharacter(new Character("Hacker101", "Let's get the job done.", 75, 45, 5)); - t2.Start(); - break; - } - i += 1; - }; - if(API.Upgrades["hacker101"] == true) - { - t2.Start(); - } - else - { - t.Start(); - } - - - } - - private void InstallMidGameDesktop() - { - //throw new NotImplementedException(); - } - - int SelectedMode = 0; - int SelectedCharacter = 0; - - public void ShowChar() - { - txtterm.Text = ""; - var h = ShiftOS.Hacking.Characters[SelectedCharacter]; - WriteLine(" == Partner Select =="); - WriteLine($"Partner: {SelectedCharacter + 1}/{ShiftOS.Hacking.Characters.Count}"); - WriteLine($"Name: {h.Name}"); - WriteLine($"Skill: {h.Skill}/100"); - WriteLine($"Speed: {h.Speed}/100"); - WriteLine($"Cost: {h.Cost}"); - WriteLine($"Bio: {h.Bio}"); - WriteLine(Environment.NewLine + "LEFT: Previous Partner, RIGHT: Next Partner, ENTER: Confirm"); - } - - public void ShowTools() - { - txtterm.Text = ""; - try - { - var h = ShiftOS.Hacking.Tools[SelectedCharacter]; - WriteLine(" == Attack Select =="); - WriteLine($"Attack: {SelectedCharacter + 1}/{ShiftOS.Hacking.Tools.Count}"); - WriteLine($"Name: {h.Name}"); - WriteLine($"Effectiveness: {h.Effectiveness}"); - WriteLine($"Description: {h.Description}"); - WriteLine(Environment.NewLine + "LEFT: Previous Attack, RIGHT: Next Attack, ENTER: Confirm"); - } - catch - { - WriteLine("There are no entries to display in this list."); - } - } - - private void Hack_ShowCharacters() - { - switch(SelectedMode) - { - case 1: - ShiftOS.Hacking.GetCharacters(); - SelectedCharacter = 0; - ShowTools(); - break; - case 2: - ShiftOS.Hacking.GetCharacters(); - SelectedCharacter = 0; - ShowChar(); - break; - } - } - - internal void StartAidenNirhStory() - { - var t = new System.Windows.Forms.Timer(); - t.Interval = 4000; - int i = 0; - t.Tick += (object s, EventArgs a) => - { - switch(i) - { - case 0: - WriteLine("User 151.43.85.33 connecting as \"Aiden\"..."); - break; - case 2: - WriteLine($"Aiden: Hey there, {API.Username}1 I'm Aiden Nirh."); - break; - case 3: - WriteLine("Aiden: Have you seen Appscape?"); - break; - case 4: - WriteLine("Aiden: It's my package manager for ShiftOS. It's pretty neat."); - break; - case 5: - WriteLine("Aiden: You should check it out, it's on the Shiftnet at shiftnet://main/appscape!"); - break; - case 6: - WriteLine("Aiden: But remember, when browsing the Shiftnet try not to venture from the main server!"); - break; - case 7: - API.Upgrades["aidennirh"] = true; - t.Stop(); - this.Close(); - break; - } - i += 1; - }; - t.Start(); - } - - internal void StartHacker101Story() - { - var t = new System.Windows.Forms.Timer(); - t.Interval = 4000; - int i = 0; - - t.Tick += (object s, EventArgs a) => - { - switch(i) - { - case 0: - WriteLine("IP connecting as Hacker101..."); - break; - case 1: - WriteLine("Hacker101: Hello, ShiftOS user. I am a hacker."); - break; - case 2: - if (API.BitnoteAddress != null) - { - WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, your Bitnote Address is {API.BitnoteAddress.Address}, and you have {API.BitnoteAddress.Bitnotes}. That's your private address, by the way."); - } - else - { - WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, and you do not have a Bitnote Address."); - } - break; - case 3: - WriteLine("Hacker101: Enough fun in games. Listen. There are two things you need to know."); - break; - case 4: - WriteLine("Hacker101: Thing #1. DevX isn't real."); - break; - case 5: - WriteLine("Hacker101: I've decompiled parts of ShiftOS. And you know what I found?"); - break; - case 6: - WriteLine("Hacker101: Everything DevX says. Everything he does. Everything he THINKS. It's all hardcoded directly into ShiftOS's core."); - break; - case 7: - WriteLine("Hacker101: Want proof? Here. I'll run a quick Lua script for you."); - string DecompiledCode = Properties.Resources.DecompiledCode; - var l = new LuaInterpreter(); - Form win = l.mod.create_window("Decompiled Code", null, 720, 480); - TextBox txt = new TextBox(); - txt.Multiline = true; - txt.Text = Properties.Resources.DecompiledCode; - txt.BorderStyle = BorderStyle.None; - txt.BackColor = Color.Black; - txt.ForeColor = Color.White; - txt.Font = new Font(OSInfo.GetMonospaceFont(), 9); - l.mod.set_dock(txt, "fill"); - l.mod.add_widget_to_window(win, txt); - break; - case 8: - WriteLine("Hacker101: Not only is that some nice, smokin' fresh C# code directly from ShiftOS, but that's a nice steaming pile of bird poop on DevX's doorstep."); - break; - case 9: - WriteLine("Hacker101: Thing #2. The Shiftnet holds some secrets."); - break; - case 10: - WriteLine("Hacker101: What kind of secrets, I hear you ask through your microphone (jesus, do you seriously talk to us with your voice? Are you that bored?)"); - break; - case 11: - WriteLine("Hacker101: Well. I'm talking, pieces of a Lua script that could help stop DevX dead in his digital tracks."); - break; - case 12: - WriteLine("Hacker101: All you gotta do is use my decryption utilities to find the pieces of this encrypted script, download them, decrypt them, and the utility will automatically piece them together for you."); - break; - case 13: - WriteLine("Hacker101: Shiftnet pages ending with .enc are your best bet."); - break; - case 14: - WriteLine("Hacker101: You can install the utilities using spkg install secret."); - break; - case 15: - WriteLine("Hacker101: Then, when the application installs, run it, and use the password 'binary_hell' to install the REAL utilities."); - break; - case 16: - WriteLine("Hacker101: Now go. We need that script. I know a friend who will help you get your hard drive back from DevX if you can do this."); - t.Stop(); - ShiftOS.Hacking.AddCharacter(new Character("Hacker101", "Let's get the job done.", 75, 45, 5)); - API.Upgrades["hacker101"] = true; - this.Close(); - break; - } - i += 1; - }; - t.Start(); - } - - internal void StartOtherPlayerSysFix() - { - var t = new System.Windows.Forms.Timer(); - t.Interval = 4000; - int i = 0; - t.Tick += (object s, EventArgs a) => - { - switch(i) - { - case 0: - WriteLine("User connected as ???."); - break; - case 1: - if(API.Upgrades["otherplayerstory"] == true) - { - WriteLine($"???: {API.Username}! Did he find out? Oh God, I hope he can see this..."); - } - else - { - WriteLine("???: Hello? Uhhhh, is this stupid thing working?"); - } - break; - case 2: - if(API.Upgrades["otherplayerstory"] == true) - { - WriteLine("???: Ahh. Good. You can read this. It's me, the other player."); - } - else - { - WriteLine("???: Thank heaven. You can hear me. Don't ask who I am."); - } - break; - case 3: - WriteLine("???: Looks like DevX hit you hard. Guess he found out you had the Shiftnet."); - break; - case 4: - WriteLine("???: Relax. It's not your fault."); - break; - case 5: - WriteLine("???: Actually, the Shiftnet regularly sends data about it's usage, unencrypted, directly to DevX."); - break; - case 6: - WriteLine("???: This code seems to be embedded into all .saa files. It's actually how I found out about you."); - break; - case 7: - WriteLine("???: It seems weird, I know, but everytime you run a .saa file, an uplink is made to DevX's servers"); - break; - case 8: - if (API.Upgrades["otherplayerstory"] == true) - { - WriteLine("???: And, well, I think we could use this. I'll see if Hacker101 can track this uplink. If he can, you will know it the next time you run a .saa."); - } - else - { - WriteLine("???: And, well, I think we could use this. I have a friend who's good with his hacking skills. I'll see if he can help you stop DevX dead. If he can, he will contact you next time you run a .saa."); - } - break; - case 9: - WriteLine("???: Anyways, connected to your system, I can see your desktop. Looks pretty messed up, huh?"); - break; - case 10: - WriteLine("???: You're lucky you don't have the Windows Everywhere virus."); - break; - case 11: - Viruses.InfectFile(Paths.Drivers + "Keyboard.dri", Viruses.VirusID.WindowsEverywhere); - Viruses.CheckForInfected(); - WriteLine("???: Crap! I spoke too soon."); - break; - case 12: - WriteLine("???: Alright. I'll see if I can hijack your Shiftorium Registry, install a virus scanner, and get rid of the viruses."); - break; - case 13: - API.Upgrades["virusscanner"] = true; - var trm = new Terminal(); - API.CreateForm(trm, API.LoadedNames.TerminalName, Properties.Resources.iconTerminal); - trm.command = "vscan"; - trm.DoCommand(); - break; - case 14: - WriteLine("???: All better. I hope. As for those random files on your desktop, well, it seems DevX dropped some sort of secret message onto your system."); - break; - case 15: - WriteLine("???: Go ahead and try to decrypt it. The Shiftnet Lua API is very useful."); - break; - case 16: - if(API.Upgrades["otherplayerstory"] == true) - { - WriteLine("???: Anyways, I'm gonna go work with Hacker101, discuss those .saa uplinks, and see if we can come up with a suitable attack plan."); - } - else - { - WriteLine("???: Well, your system is all better. You don't have to thank me. Just, when you open a .saa file, I'll try to contact you if I'm not busy."); - } - break; - case 17: - WriteLine("???: Talk to you soon. And, remember. ShiftOS is like a forest. DevX is the predator, you are the prey. Watch your back."); - break; - case 18: - t.Stop(); - this.Close(); - API.Upgrades["otherplayerrescue"] = true; - break; - } - i += 1; - }; - t.Start(); - } - - internal void StartHackerBattleIntro() - { - var t = new System.Windows.Forms.Timer(); - t.Interval = 4000; - int i = 0; - t.Tick += (object s, EventArgs a) => - { - switch(i) - { - case 0: - API.Upgrades["hackerbattles"] = true; - API.Upgrades["hackcommand"] = true; - WriteLine("IP address connecting with no identity..."); - break; - case 1: - WriteLine("Hey there. So I see you're into hacking."); - break; - case 2: - WriteLine("Oh, how rude of me. You don't know if I'm DevX or not."); - break; - case 3: - WriteLine("Well now you do. I will not show my identity, but I am not DevX."); - break; - case 4: - WriteLine("Anyways. There are two things you must know about hacking within ShiftOS."); - break; - case 5: - WriteLine("1. You can hack more than just the Shiftorium. Look around the user interface for any 'Hack it' buttons."); - break; - case 6: - WriteLine("Also, running 'hack' in the Terminal will let you do even more damage to DevX's security systems as well as give you some advantages."); - break; - case 7: - WriteLine("Ever wanted to make the Shiftorium have a bit of a sale, or even better, make all applications pay out more Codepoints than DevX intends?"); - break; - case 8: - WriteLine("Well that 'hack' command is useful then. Go ahead. Try it in another Terminal window. But good God do not close this one."); - break; - case 9: - WriteLine("Because there's one more thing you need to know."); - break; - case 10: - WriteLine("You are not the only person DevX has contacted with ShiftOS."); - break; - case 11: - WriteLine("There are others. Some of them, friendly. Some of them, knowledgable enough to help you."); - break; - case 12: - WriteLine("ShiftOS is like a private community. Anyone can contact anyone provided they have the skill to get in."); - break; - case 13: - WriteLine("Meaning, you may meet some very cool people."); - break; - case 14: - WriteLine("But some of us are... how do you say it... hostile."); - break; - case 15: - WriteLine("Enter the era of Hacker Battles."); - break; - case 16: - WriteLine("It's a network-vs-network every-man-for-himself affair. You'll meet criminals, hackers, agencies and much more."); - break; - case 17: - WriteLine("All offering a little surprise if you can take their network down."); - break; - case 18: - WriteLine("And it's best you get trained, for at any time, anyone could challenge you to one."); - break; - case 19: - WriteLine("And the amount of networks devastated due to untrained users picking a fight with the wrong person is alarmingly huge."); - break; - case 20: - WriteLine("I'll launch a practice program which will teach you the Hacker Battle interface and the fundamentals."); - break; - case 21: - WriteLine("And if you can complete the entire training session, you will be able to defend against anyone who dare battle you."); - break; - case 22: - WriteLine("Starting training session #53D8G in 5 seconds...."); - break; - case 23: - WriteLine("Don't worry. It shouldn't be too difficult for you."); - t.Stop(); - ShiftOS.Hacking.StartBattleTutorial(); - break; - } - i += 1; - }; - t.Start(); - } - - internal void StartDevXFuriousStory() - { - var t = new System.Windows.Forms.Timer(); - t.Interval = 4000; - int i = 0; - t.Tick += (object s, EventArgs a) => - { - switch (i) - { - case 0: - WriteLine("IP 199.108.232.1 Connecting..."); - break; - case 1: - WriteLine("DevX: WHAT HAVE YOU DONE?"); - break; - case 2: - WriteLine("DevX: How the HELL did you get the Shiftnet?"); - break; - case 3: - WriteLine("DevX: What sites have you seen? TALK TO ME."); - break; - case 4: - WriteLine("DevX: Alright, got nothing to say? Fine. You will pay for this..."); - break; - case 5: - WriteLine("DevX: I don't know what I'll do... I don't know when I'll do it... but you will wish you never touched a computer in your life..."); - break; - case 6: - t.Stop(); - Viruses.DropDevXPayload(); - this.Close(); - var trm = new Terminal(); - API.CreateForm(trm, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); - trm.StartDevXFuriousStory2(); - break; - } - i += 1; - }; - t.Start(); - } - - private void StartDevXFuriousStory2() - { - var t = new Thread(new ThreadStart(new Action(() => - { - WriteLine("User '???' connecting..."); - API.PlaySound(Properties.Resources.dial_up_modem_02); - WriteLine("???: Hello? Ummm... this is awkward..."); - BeepSleep(3000); - WriteLine("???: Listen - I'm a hacker. Well, not really. I'm friends with one."); - BeepSleep(3000); - WriteLine("???: Seems like DevX completely obliterated your system with one of his viruses."); - BeepSleep(2500); - WriteLine("???: I'll fix that for you."); - API.Upgrades["virusscanner"] = true; - this.Invoke(new Action(() => - { - this.command = "vscan"; - this.DoCommand(); - })); - BeepSleep(1000); - WriteLine("???: Better? Cool. Now, I need your help."); - BeepSleep(1250); - WriteLine("???: I can't reveal my identity yet - but I co-own this chat-room..."); - BeepSleep(1175); - WriteLine("???: It's called the 'Hacker Alliance'."); - BeepSleep(1000); - WriteLine("???: I'm going to install something called 'HoloChat' on your system. It'll be quick."); - BeepSleep(2000); - WriteLine("Installing HoloChat..."); - API.Upgrades["holochat"] = true; - Thread.Sleep(100); - WriteLine("Done. Resetting desktop..."); - this.Invoke(new Action(() => { API.CurrentSession.SetupDesktop(); })); - WriteLine("Done."); - Thread.Sleep(3000); - WriteLine("???: Alright - I'll talk to you soon. Just join that chat room when you're ready."); - BeepSleep(1000); - this.Invoke(new Action(() => - { - this.Close(); - })); - }))); - t.Start(); - } - - private LuaInterpreter Interpreter = null; - private bool blockctrlt = false; - - /// - /// Call after creating a Terminal to let Maureen Fenn talk - /// to the player about the Shiftnet and the Appscape Package Manager. - /// - public void StartShiftnetStory() - { - System.Windows.Forms.Timer tmrstory = new System.Windows.Forms.Timer(); - tmrstory.Interval = 10000; - WriteLine("IP connecting as 'Maureen Fenn'..."); - API.PlaySound(Properties.Resources.dial_up_modem_02); - var t = new Thread(new ThreadStart(new Action(() => - { - WriteLine("Maureen Fenn: Hey there, user! I have something to show you."); - BeepSleep(4000); - WriteLine("Maureen Fenn: So, there's this thing called the 'Shiftnet'"); - BeepSleep(3750); - WriteLine("Maureen Fenn: Turns out, that DevX wants to keep it a secret, as such he only installed it on his and my systems."); - BeepSleep(4250); - WriteLine("Maureen Fenn: But what's the point of listening to DevX when we have people like you who like to experiment?"); - BeepSleep(4000); - WriteLine("Maureen Fenn: Well, to be fair - he can destroy whatever he wants. Just like he did my company, Minimatch."); - BeepSleep(3000); - WriteLine("Maureen Fenn: But who cares! I'm going to install a few things on your system."); - API.Upgrades["shiftnet"] = true; - this.Invoke(new Action(() => - { - this.command = "spkg install shiftnet"; - this.DoCommand(); - })); - WriteLine("Shiftnet installed on system..."); - Thread.Sleep(4000); - WriteLine("Maureen Fenn: All done! Oh - just before I leave... go ahead and explore the Shiftnet!"); - BeepSleep(3000); - WriteLine("Maureen Fenn: But, be careful. Don't venture off the main server. You never know what's elsewhere..."); - BeepSleep(1000); - WriteLine("Maureen Fenn: Well, bye!"); - this.Invoke(new Action(() => - { - API.CurrentSession.SetupDesktop(); - this.Close(); - })); - }))); - t.Start(); - } - - /// - /// *BEEP* ZZZZZZZZzzzzzzzzzzz....... - /// - /// Time to sleep. - private void BeepSleep(int time) - { - API.PlaySound(Properties.Resources.writesound); - Thread.Sleep(time); - } - - private List GetFonts() - { - var lst = new List(); - // Get the installed fonts collection. - InstalledFontCollection allFonts = new InstalledFontCollection(); - - // Get an array of the system's font familiies. - FontFamily[] fontFamilies = allFonts.Families; - - // Display the font families. - foreach (FontFamily myFont in fontFamilies) - { - lst.Add(myFont.Name.ToLower()); - } - //font_family - - return lst; - } - - public List GetColorList() - { - var lst = new List(); - if(API.Upgrades["red"] == true) - lst.Add("red"); - if (API.Upgrades["green"] == true) - lst.Add("green"); - if (API.Upgrades["blue"] == true) - lst.Add("blue"); - if (API.Upgrades["brown"] == true) - lst.Add("brown"); - if (API.Upgrades["purple"] == true) - lst.Add("purple"); - if (API.Upgrades["yellow"] == true) - lst.Add("yellow"); - if (API.Upgrades["orange"] == true) - lst.Add("orange"); - if (API.Upgrades["pink"] == true) - lst.Add("pink"); - if (API.Upgrades["gray"] == true) - lst.Add("gray"); - lst.Add("black"); - lst.Add("white"); - return lst; - } - - public Color SetColor(string name) - { - Color col = Color.White; - switch(name) - { - case "black": - col = Color.Black; - break; - case "white": - col = Color.White; - break; - case "gray": - col = Color.Gray; - break; - case "red": - col = Color.Red; - break; - case "green": - col = Color.Green; - break; - case "blue": - col = Color.Blue; - break; - case "brown": - col = Color.Brown; - break; - case "purple": - col = Color.Purple; - break; - case "yellow": - col = Color.Yellow; - break; - case "orange": - col = Color.Orange; - break; - } - return col; - } - - private bool LuaMode = false; - - public string GetPath(string path) - { - return path.Replace(Paths.SaveRoot, "").Replace(OSInfo.DirectorySeparator, "/"); - } - - public string GetParent(string path) - { - var d = new DirectoryInfo(path); - return d.Parent.FullName; - } - - public void DoCommand() - { - API.LastRanCommand = command; - string[] args = command.ToLower().Split(' '); - switch (args[0]) - { - case "ls": - case "dir": - if(API.Upgrades["fileskimmer"]) - { - foreach(var d in Directory.GetDirectories(current_dir)) - { - WriteLine($"[DIR] {new DirectoryInfo(d).Name}"); - } - foreach (var d in Directory.GetFiles(current_dir)) - { - WriteLine($"{new FileInfo(d).Name}"); - } - } - else - { - wrongcommand(); - } - break; - case "cd": - if (API.Upgrades["fileskimmer"]) - { - if (args[1] == "..") - { - if (GetPath(current_dir) != "/") - { - current_dir = GetParent(current_dir); - SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> "); - } - else - { - WriteLine("cd: Can't go up past the root."); - } - } - else - { - string newdir = current_dir + OSInfo.DirectorySeparator; - foreach (var dir in Directory.GetDirectories(current_dir)) - { - if (new DirectoryInfo(dir).Name.ToLower() == args[1]) - newdir = dir; - } - current_dir = newdir; - SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> "); - } - } - break; - case "upg": - if(API.DeveloperMode) - { - try - { - switch(args[1]) - { - case "get": - WriteLine(API.Upgrades[args[2]].ToString()); - break; - } - } - catch - { - - } - } - else - { - wrongcommand(); - } - break; - case "endgame_test": - if (API.DeveloperMode) - { - try - { - switch (args[1]) - { - case "choice_screen": - var cscreen = new ShiftOS.FinalMission.ChooseYourApproach(); - cscreen.WindowState = FormWindowState.Maximized; - //cscreen.TopMost = true; - cscreen.Show(); - break; - case "limitedmode": - API.LimitedMode = !API.LimitedMode; - WriteLine($"Limited mode set to {API.LimitedMode}."); - break; - } - } - catch - { - WriteLine("Invalid arguments."); - } - } - else - { - wrongcommand(); - } - break; - case "htutorial": - ShiftOS.Hacking.StartBattleTutorial(); - break; - case "fake_buy": - if (API.DeveloperMode) - { - try - { - if (API.Upgrades.ContainsKey(args[1])) - { - API.Upgrades[args[1]] = true; - WriteLine($"Bought upgrade {args[1]}."); - API.CurrentSession.SetupAppLauncher(); - API.UpdateWindows(); - SaveSystem.Utilities.saveGame(); - } - else - { - WriteLine("Upgrade not found."); - } - } - catch - { - WriteLine("fake_buy: Bad arguments."); - } - } - else - { - wrongcommand(); - } - break; - case "connections": - try - { - switch(args[1]) - { - case "list": - foreach(var client in Package_Grabber.clients) - { - WriteLine($"Hostname: {client.Key}, Port: {client.Value.RemotePort}, Online: {client.Value.IsConnected}"); - } - break; - case "gui": - API.CreateForm(new ConnectionManager(), "Connections", API.GetIcon("Connections")); - break; - case "drop": - foreach(var client in Package_Grabber.clients) - { - Package_Grabber.Disconnect(client.Key); - } - break; - case "add": - string host = args[2]; - int port = 0; - int.TryParse(args[3], out port); - if (!Package_Grabber.clients.ContainsKey(host)) - { - Package_Grabber.ConnectToServer(host, port); - WriteLine("Connection to host established successfully."); - } - else - { - var c = Package_Grabber.clients[host]; - if (c.IsConnected == false) - { - c.Connect(host, port); - WriteLine("Re-established connection with host."); - } - else { - WriteLine("This host has been connected to already."); - } - } - break; - } - } - catch - { - WriteLine("connections: Missing arguments."); - } - break; - case "story": - if(API.DeveloperMode == true && API.Upgrades["shiftnet"]) - { - try - { - switch(args[1]) - { - case "aidennirh": - StartAidenNirhStory(); - break; - case "devxfurious": - StartDevXFuriousStory(); - break; - case "battletut": - StartHackerBattleIntro(); - break; - case "otherplayer": - StartDevXFuriousStory(); - break; - case "hacker101": - StartHacker101Story(); - break; - } - } - catch - { - WriteLine("Missing arguments."); - } - } - else { wrongcommand(); } - break; - case "make": - try - { - string path = command.Replace("make ", ""); - string realpath = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; - if (File.Exists(realpath + OSInfo.DirectorySeparator + "main.lua")) - { - WriteLine("Compiling to " + path + ".saa"); - ZipFile.CreateFromDirectory(realpath, realpath + ".saa"); - } - else - { - WriteLine($"make: *** No rule to make target \"{realpath}\". Stop."); - } - } - catch - { - WriteLine("make: Invalid arguments."); - } - break; - case "linux": - if(API.DeveloperMode) - { - WriteLine("Upgrading your system..."); - foreach(var upg in Shiftorium.Utilities.GetAvailable()) - { - API.Upgrades[upg.id] = true; - WriteLine("Installed upgrade \"" + upg.Name + "\"..."); - } - API.UpdateWindows(); - API.CurrentSession.SetupDesktop(); - } - else - { - wrongcommand(); - } - break; - case "netgen": - WriteLine("Starting netgen..."); - API.CreateForm(new NetGen(), "Network Generator", API.GetIcon("Terminal")); - break; - case "lua": - if(API.DeveloperMode == true) - { - try - { - string f = args[1]; - WriteLine(f); - f = command.Remove(0, 4); - WriteLine(f); - string real = $"{Paths.SaveRoot}{f.Replace("/", OSInfo.DirectorySeparator)}"; - WriteLine(real); - if (File.Exists(real)) - { - WriteLine("Running Lua script at " + f + "."); - var l = new LuaInterpreter(real); - } - else - { - WriteLine("Lua script file not found."); - } - } - catch - { - this.LuaMode = true; - this.Interpreter = new LuaInterpreter(); - this.Interpreter.mod.print = new Action((text) => WriteLine(text)); - this.Interpreter.mod.exit = new Action(() => - { - this.LuaMode = false; - this.Interpreter = null; - WriteLine($"{API.CurrentSave.username}@{API.CurrentSave.osname} $> "); - }); - WriteLine("ShiftOS Lua Interpreter - v1.0"); - WriteLine("Created by Michael VanOverbeek"); - WriteLine(Environment.NewLine + "How to use: Simply type some Lua code and watch it come to life. Code can be executed on one line, and unlike most interpreters, you can access code from one line in another."); - WriteLine(Environment.NewLine + "When you're done, simply press the Enter key to execute the code." + Environment.NewLine); - } - } - else - { - wrongcommand(); - } - break; - case "hack": - if(API.Upgrades["hacking"] == true) - { - StartHackingSession("random"); - } - else - { - wrongcommand(); - } - break; - case "virusscanner": - case "vscan": - if(API.Upgrades["virusscanner"] == true) - { - WriteLine("Scanning for infected files..."); - var goodList = new Dictionary(); - foreach (KeyValuePair kv in Viruses.Infections) - { - if(kv.Value.Contains(";")) - { - foreach(string file in kv.Value.Split(';')) - { - if (goodList.ContainsKey(file)) - { - goodList[file] += ", " + kv.Key; - } - else { - goodList.Add(file, kv.Key); - } - } - } - else - { - if (goodList.ContainsKey(kv.Value)) - { - goodList[kv.Value] += ", " + kv.Key; - } - else { - goodList.Add(kv.Value, kv.Key); - } - } - } - WriteLine("Scan complete."); - if (goodList.Count > 0) - { - foreach (KeyValuePair kv in goodList) - { - WriteLine("File " + kv.Key + " is infected with " + kv.Value + ". Disinfecting..."); - Viruses.DisInfect(kv.Key); - } - WriteLine("Disinfection complete."); - } - else - { - WriteLine("No infections found. You are safe."); - } - } - break; - case "infections": - if (API.DeveloperMode == true) - { - foreach (KeyValuePair kv in Viruses.Infections) - { - WriteLine(kv.Key + " @ " + kv.Value); - } - } - else - { - wrongcommand(); - } - break; - case "binarywater": - if (API.DeveloperMode) - { - ShiftOS.Hacking.AddCharacter(new Character("Philip Adams", "Hello, and welcome to another episode of OSFirstTimer.", 100, 100, 0)); - WriteLine("Philip Adams is now in the list of hirable hackers."); - } - else - { - WriteLine("I see you went in the ShiftOS source code... ummm yeah... this isn't a developer mode release so I can't just give you a full-skilled hacker even if you beg."); - } - break; - case "color": - try - { - if(API.Upgrades["setterminalcolors"] == true) - { - - Color bcol = SetColor(args[1]); - Color tcol = SetColor(args[2]); - API.CurrentSkin.TerminalTextColor = tcol; - API.CurrentSkin.TerminalBackColor = bcol; - - } - } - catch(Exception) - { - WriteLine("color: Missing arguments."); - } - break; - case "encrypt": - if (API.DeveloperMode == true) - { - string messageToEncrypt = command.Replace("encrypt ", ""); - string encryptedMessage = API.Encryption.Encrypt(messageToEncrypt); - WriteLine("Encrypted Message: " + encryptedMessage); - } - else - { - wrongcommand(); - } - break; - case "font": - if(API.Upgrades["setterminalfont"] == true) - { - var fname = command.Replace("font ", ""); - if(GetFonts().Contains(fname)) - { - API.CurrentSkin.TerminalFontStyle = fname; - } - else - { - WriteLine("font: Unrecognized font name \"" + fname + "\". Note: Font names are case sensitive."); - } - } - else - { - wrongcommand(); - } - break; - case "colorlist": - if(API.Upgrades["setterminalcolors"] == true) - { - foreach(string itm in GetColorList()) - { - WriteLine(itm); - } - } - else - { - wrongcommand(); - } - break; - case "spkg": - if (!API.LimitedMode) - { - if (API.Upgrades["shiftnet"] == true) - { - try - { - switch (args[1].ToLower()) - { - case "install": - if (args[2] != null && args[2] != "") - { - string pkgname = args[2].ToLower().Replace(".pkg", ""); - if (Package_Grabber.GetPackage(pkgname) == true) - { - WriteLine("Downloaded package '" + pkgname + "' from shiftnet://main/spkg/ successfully. Installing now."); - string r = Package_Grabber.ExtractPackage(); - if (r == "fail") - { - WriteLine("[FATAL] Could not install package."); - WriteLine("spkg: Killed."); - } - else - { - WriteLine("Extracted " + pkgname + " to " + r + "..."); - var res2 = Package_Grabber.InstallPackage(r + "\\"); - if (res2 != "success") - { - WriteLine("[FATAL] Could not install package. " + res2); - WriteLine("spkg: Killed."); - } - else - { - WriteLine("[DONE] Package installed."); - } - } - } - else - { - WriteLine("spkg: Package '" + args[2] + "' not found."); - } - } - break; - default: - WriteLine("spkg: Invalid argument: " + args[1]); - break; - } - } - catch (Exception ex) - { - WriteLine("spkg: " + ex.Message); - } - } - else - { - wrongcommand(); - } - } - else - { - try - { - if(args[2] == "god_utils") - { - if(FinalMission.EndGameHandler.GodModeInstallEnabled == true) - { - var t = new Thread(new ThreadStart(new Action(() => - { - WriteLine("Downloading package 'god_utils'... Please wait."); - Thread.Sleep(10000); - WriteLine("Download complete."); - Thread.Sleep(100); - WriteLine("Beginning installation."); - Thread.Sleep(1000); - WriteLine(@" == GOD MODE == - -God Mode gives you FULL control of ShiftOS. You can add/remove Codepoints, buy or unbuy Shiftorium upgrades, and can do whatever you want. - -Installing core applications..."); - Thread.Sleep(250); - WriteLine("Installing subpackage 'json_edit'..."); - Thread.Sleep(250); - WriteLine("Installing subpackage 'upgrade_mod'..."); - Thread.Sleep(100); - WriteLine("Installing subpackage 'hijacker'..."); - Thread.Sleep(500); - WriteLine(@" == HIJACKER by DevX == - -HIJACKER is a utility that allows you to hijack any system and install ShiftOS on it during a hacker battle."); - Thread.Sleep(100); - WriteLine("[hijacker] Injecting HIJACKER code into hbattleui.sft..."); - Thread.Sleep(150); - WriteLine("[hijacker] Done."); - this.Invoke(new Action(() => - { - StartChoice1EndStory(); - })); - }))); - t.Start(); - } - else - { - WriteLine("spkg: Package '" + args[2] + "' not found."); - } - } - else - { - WriteLine("spkg: Package '" + args[2] + "' not found."); - } - } - catch - { - WriteLine("spkg: Missing arguments."); - } - } - break; - case "alias": - try - { - switch(args[1]) - { - case "-?": - case "--help": - WriteLine("Aliases Help" + Environment.NewLine); - WriteLine("Alias is a command that lets you create aliases for other commands. You could make a command 'upgrade' alias 'shiftorium' if you wanted." + Environment.NewLine); - WriteLine("Arguments:"); - WriteLine(" -h, --help: Displays this screen."); - WriteLine("-a, --add : Adds a new alias."); - WriteLine("-d, --delete : Deletes an alias."); - WriteLine("-l, --list: Shows all available aliases."); - break; - case "--add": - case "-a": - if(API.AddAlias(args[2], command.Replace("alias " + args[1] + " " + args[2] + " ", ""))) - { - WriteLine("Alias added successfully."); - API.SaveAliases(); - } - else - { - WriteLine("That alias already exists."); - } - break; - case "--delete": - case "-d": - if(API.RemoveAlias(args[2]) == true) - { - WriteLine("Alias \"" + args[2] + "\" removed successfully."); - API.SaveAliases(); - } - else - { - WriteLine("That alias doesn't exist."); - } - break; - case "-l": - case "--list": - WriteLine("Aliases:"); - foreach(KeyValuePair kv in API.CommandAliases) - { - WriteLine(kv.Key + " => " + kv.Value); - } - break; - default: - WriteLine("alias: Invalid argument. Try alias --help for help with the Alias command."); - break; - } - } - catch - { - WriteLine("alias: Missing arguments. Try alias --help for help with the Alias command."); - } - break; - case "username": - if(API.Upgrades["customusername"] == true) - { - try - { - API.CurrentSave.username = args[1]; - } - catch - { - WriteLine("username: Missing arguments."); - } - } - else - { - wrongcommand(); - } - break; - case "osname": - if (API.Upgrades["customusername"] == true) - { - try - { - API.CurrentSave.osname = args[1]; - } - catch - { - WriteLine("osname: Missing arguments."); - } - } - else - { - wrongcommand(); - } - break; - - case "unity": - if (API.Upgrades["unitymode"] == true) - { - API.CurrentSession.SetUnityMode(); - API.CurrentSession.SetupDesktop(); - txtterm.Focus(); - } else - { - wrongcommand(); - } - break; - case "time": - if (API.Upgrades["pmandam"] == false) - { - if (API.Upgrades["hourssincemidnight"] == false) - { - if (API.Upgrades["minutessincemidnight"] == false) - { - if (API.Upgrades["secondssincemidnight"] == true) { - WriteLine("Since midnight, " + API.GetTime() + " seconds have passed."); - } else { - wrongcommand(); - } - } else - { - WriteLine("Since midnight, " + API.GetTime() + " minutes have passed."); - } - } - else - { - WriteLine("Since Midnight, " + API.GetTime() + " hours have passed."); - } - } else - { - WriteLine("Current time: " + API.GetTime()); - } - break; - case "saa": - if (API.Upgrades["shiftnet"]) { - var f = command.Replace("saa ", ""); - if (f.StartsWith("/")) - { - var withoutslash = f.Remove(0, 1); - var dirsep = OSInfo.DirectorySeparator; - var rightdir = $"{Paths.SaveRoot}{dirsep}{f.Replace("/", dirsep)}"; - if (File.Exists(rightdir)) - { - var finf = new FileInfo(rightdir); - if (finf.Extension == ".saa") - { - API.LaunchMod(finf.FullName); - } - else - { - WriteLine("saa: Cannot launch the file '" + finf.FullName + " because it isn't a valid stand-alone app."); - } - } - else - { - WriteLine("saa: Cannot launch the file '" + f + "' because it doesn't exist."); - } - } - else - { - WriteLine("saa: Cannot launch the file '" + f + "' because it doesn't exist."); - } - } - else - { - wrongcommand(); - } - break; - case "help": - try - { - showhelp(args[1]); - } - catch - { - showhelp(); - } - break; - case "codepoints": - case "cp": - WriteLine("You have " + API.Codepoints.ToString() + " Codepoints."); - break; - case "shutdown": - API.ShutDownShiftOS(); - break; - case "clear": - txtterm.Text = ""; - break; - case "close": - if (command.Contains("close ")) - { - var pid = command.Replace("close ", ""); - if (API.CloseProgram(pid) == true) - { - WriteLine("Closed all running " + pid + "s."); - } - else - { - WriteLine("No processes with id '" + pid + "' were found!"); - } - } - else - { - WriteLine("Insufficient arguments."); - } - break; - case "05tray": - if (API.DeveloperMode == true) - { - API.AddCodepoints(500); - WriteLine("You've been granted 500 Codepoints."); - } else - { - wrongcommand(); - } - - break; - case "debug": - if (API.DeveloperMode == true) - { - try - { - switch (args[1].ToLower()) - { - case "shiftnet-story": - WriteLine("Debugging Shiftnet Story..."); - StartShiftnetStory(); - break; - case "devmode": - API.DeveloperMode = false; - WriteLine("Turned off developer mode. Use the passcode to turn it back on."); - break; - default: - WriteLine("Invalid argument: " + args[1] + ". Debug can only debug the following: 'shiftnet-story'."); - break; - } - - } - catch (Exception ex) - { - WriteLine("debug: " + ex.Message); - } - } else { - try - { - switch (args[1].ToLower()) - { - case "developers123": - WriteLine("Turned Developer Mode on!"); - API.DeveloperMode = true; - break; - default: - wrongcommand(); - break; - } - } catch - { - wrongcommand(); //Debug command pretends to be an invalid command if an exception is thrown. - } - } - break; - case "echo": - if(command.Contains("echo ")) - { - WriteLine(command.Replace("echo ", "")); - } - else - { - WriteLine("echo: Insufficient Parameters."); - } - break; - case "syncsave": - WriteLine("Command removed."); - break; - - default: - if (API.OpenProgram(args[0]) == false) - { - if (API.Upgrades["trmfiles"] == false) - { - bool done = false; - foreach(KeyValuePair kv in API.CommandAliases) - { - if(kv.Key == command) - { - command = kv.Value; - done = true; - DoCommand(); - } - - } - if(done == false) - { - wrongcommand(); - } - } - else - { - var f = command.Replace("\\", "/"); - if (f.StartsWith("/")) - { - var withoutslash = f.Remove(0, 1); - var dirsep = OSInfo.DirectorySeparator; - var proper = $"{Paths.SaveRoot}{dirsep}{withoutslash.Replace("/", dirsep)}"; - if (File.Exists(proper)) - { - runterminalfile(proper); - } - else - { - wrongcommand(); - } - } - else - { - bool done = false; - foreach (KeyValuePair kv in API.CommandAliases) - { - if (kv.Key == command) - { - command = kv.Value; - done = true; - DoCommand(); - } - - } - if (done == false) - { - wrongcommand(); - } - } - } - } - break; - } - } - - private void StartChoice1EndStory() - { - var t = new System.Windows.Forms.Timer(); - int i = 0; - t.Interval = 4000; - t.Tick += (object s, EventArgs a) => - { - switch(i) - { - case 0: - WriteLine("User '' connected as '???'"); - break; - case 1: - WriteLine($"???: {API.Username}! What are you doing!?"); - break; - case 2: - WriteLine("???: I went onto the Hacker Alliance room earlier and DevX was on there..."); - break; - case 3: - WriteLine("???: And he told me you SIDED WITH HIM."); - break; - case 4: - WriteLine("???: This is a HUGE mistake! Listen!"); - break; - case 5: - WriteLine("???: He's lying to you. Listen. DevX is not what you think he is."); - break; - case 6: - WriteLine("???: He isn't a human! He's an AI! We were all played!"); - break; - case 7: - WriteLine("???: I'm telling the truth, I swear!"); - break; - case 8: - WriteLine("???: You want proof? - holochat_cmd: ERROR: Remote host closed connection."); - break; - case 9: - WriteLine("spkg: Rebooting system in 8 seconds."); - break; - case 11: - API.Upgrades["titlebar"] = false; - API.Upgrades["windowedterminal"] = false; //terminals must be fullscreen - var trm = new Terminal(); - this.Close(); - API.CreateForm(trm, "Terminal", API.GetIcon("Terminal")); - trm.StartReboot(); - break; - } - i += 1; - }; - t.Start(); - } - - public void StartReboot() - { - txtterm.Text = ""; - var t1 = new Thread(new ThreadStart(new Action(() => - { - Thread.Sleep(500); - WriteLine("ShiftOS: Kernel deactivated."); - Thread.Sleep(1000); - this.Invoke(new Action(() => - { - txtterm.Text = ""; - })); - Thread.Sleep(1000); - WriteLine("Welcome to ShiftOS."); - Thread.Sleep(500); - WriteLine("Starting core..."); - API.Upgrades["windowedterminal"] = true; - Thread.Sleep(450); - WriteLine($"Your username is {API.Username}."); - Thread.Sleep(100); - WriteLine($"You have {API.Codepoints} Codepoints."); - WriteLine("Loading modules..."); - Thread.Sleep(750); - foreach(var upg in API.Upgrades) - { - if(upg.Value == true) - { - WriteLine($"Loaded module {upg.Key}..."); - } - Thread.Sleep(100); - } - WriteLine("Starting desktop."); - this.Invoke(new Action(() => - { - var s = new ShiftOSDesktop(); - s.Show(); - s.EndGame_AttachEvents(); - })); - Thread.Sleep(1000); - this.Invoke(new Action(() => - { - FinalMission.EndGameHandler.GoToNextObjective(); - })); - API.Upgrades["titlebar"] = true; - }))); - t1.Start(); - } - - public void Crash() - { - txtterm.Text = ""; - WriteLine(" *** SYSTEM PANIC *** "); - WriteLine(Environment.NewLine); - WriteLine("PANIC_ID: 750_15_4W3S0M3"); - WriteLine("PANIC_DESC: System became too unstable to function properly. In 5 seconds, your session will be resumed."); - var t = new System.Windows.Forms.Timer(); - t.Interval = 1000; - int p = 0; - t.Tick += (object s, EventArgs a) => - { - if(p == 4) - { - t.Stop(); - this.Close(); - } - p += 1; - }; - t.Start(); - } - - private void wrongcommand() - { - txtterm.Text = txtterm.Text + Environment.NewLine + "Command not recognized - Type 'help' for a list of commands!" + Environment.NewLine; - } - - bool Hacking = false; - - private Control objToWriteTo = null; - private string UpgradeToHack = null; - - public void StartHackingSession(string id) - { - UpgradeToHack = id; - objToWriteTo = txtterm; - Hacking = true; - txtterm.ReadOnly = true; - WriteLine("To continue, choose which way you "); - WriteLine("would like to go about this. "); - WriteLine(" "); - WriteLine("1. Go it alone. "); - WriteLine("2. Hire someone. "); - WriteLine(" "); - WriteLine("Press the key that corresponds to "); - WriteLine("the option you want. "); - - } - - public void showhackinghelp() - { - WriteLine(" - Hacking - "); - WriteLine(Environment.NewLine + "Hacking allows you to gain more features and upgrades by unlocking more of the OS's capabilities."); - WriteLine(Environment.NewLine + "There are two ways you can execute a hack:"); - WriteLine(" - On your own: It'll take skill, and time, but if you have the correct tools you can do it on your own."); - WriteLine(" - With a more competent partner: You have the option of employing a partner from a list of various hackers. The speed and success of the hack depends on their skill, and how fast they can pull it off. You will need to pay them a fee of Codepoints however. They can also grant you tools to do it on your own."); - WriteLine(Environment.NewLine + "Some hacks are capable of:"); - WriteLine(" - Decreasing or increasing the price of Shiftorium Upgrades"); - WriteLine(" - Decreasing or increasing the amount of Codepoints earned by doing various tasks."); - WriteLine(" - Unlocking more upgrades."); - WriteLine(Environment.NewLine + "To start a hack, go to a locked or empty Shiftorium category and click the \"Hack It\" button."); - API.Upgrades["hacking"] = true; - } - - public void showhelp(string topic) - { - switch(topic) - { - case "hacking": - showhackinghelp(); - break; - default: - WriteLine("No help available for this topic. Try 'help' for general help."); - break; - } - } - - public void showhelp() - { - listinfo(); - WriteLine(" "); - listcommands(); - listprograms(); - } - - private void listprograms() - { - WriteLine("Programs installed: " + Environment.NewLine); - WriteLine(" - terminal: A command-line application that lets you run programs in ShiftOS"); - WriteLine(" - shiftorium: An application where you can buy upgrades and new apps using codepoints."); - /* TEMP-REMOVED - I just can't get it to work. - WriteLine(" - jumper: A simple 'jump over the obstacle' game."); - */ - WriteLine(" - knowledge_input: Test your knowledge, and gain some Codepoints too."); - if (API.Upgrades["shifter"] == true) - WriteLine(" - shifter: Allows you to customize ShiftOS."); - if (API.Upgrades["skinning"] == true) - WriteLine(" - skinloader: Load and save ShiftOS skins."); - if (API.Upgrades["pong"] == true) - WriteLine(" - pong: A good ole' game of Pong."); - if (API.Upgrades["fileskimmer"] == true) - WriteLine(" - fileskimmer: Browse the files on your computer."); - if (API.Upgrades["textpad"] == true) - WriteLine(" - textpad: \"Write, save, and open a text document.\" - Philip Adams"); - if (API.Upgrades["artpad"] == true) - WriteLine(" - artpad: A simple, but useful drawing application."); - if (API.Upgrades["shiftnet"] == true) - WriteLine("Also, more apps can be run by opening .saa files. Apps can also be installed using spkg or by double clicking .pkg or .stp files."); - } - - public void listcommands() - { - WriteLine(" == Commands == " + Environment.NewLine); - WriteLine(" - clear: Clears the screen."); - WriteLine(" - shutdown: Shuts down your PC."); - WriteLine(" - codepoints: Shows how many codepoints you have."); - WriteLine(" - help: Shows this screen."); - if(API.Upgrades["secondssincemidnight"] == true) - { - WriteLine(" - time: Shows the current time."); - } - if (API.Upgrades["unitymode"] == true) - WriteLine(" - unity: Toggles Unity Mode."); - if (API.Upgrades["customusername"] == true) - { - WriteLine(" - username : Changes your username."); - WriteLine(" - osname : Changes the operating system name."); - } - if(API.Upgrades["shiftnet"] == true) - { - WriteLine(" - saa: Runs a specified .saa file."); - WriteLine(" - spkg: Shiftnet Package Manager (more info at shiftnet://main/spkg"); - } - } - - public void listinfo() - { - WriteLine(SaveSystem.Utilities.LoadedSave.osname + " - Version " + SaveSystem.Utilities.LoadedSave.ingameversion); - WriteLine("==========================" + Environment.NewLine); - WriteLine(" == Info == " + Environment.NewLine); - if(API.Upgrades["applaunchermenu"] == true) - { - WriteLine(" - Apps can be run using the App Launcher on the desktop."); - } else - { - WriteLine(" - Apps can be run by typing their name in the Terminal."); - } - if (API.Upgrades["windowedterminal"] == true) - { - WriteLine(" - The Terminal runs in a window."); - } - else - { - WriteLine(" - The Terminal runs fullscreen at all times."); - } - if(API.Upgrades["titlebar"] == true) - { - WriteLine(" - Applications have a titlebar to help distinguish between other apps."); - } - if(API.Upgrades["windowborders"] == true) - { - WriteLine(" - Applications have a window border to help distinguish between other apps."); - } - if(API.Upgrades["multitasking"] == true) - { - WriteLine(" - Multiple apps can be run at the same time, and you can even run more than one of the same app!"); - } - if(API.Upgrades["movablewindows"] == true) - { - WriteLine(" - Applications can be moved using CTRL+W,A,S,D."); - } - if(API.Upgrades["draggablewindows"] == true) - { - WriteLine(" - You can drag apps around the screen by dragging their titlebars."); - } - if(API.Upgrades["resizablewindows"] == true) - { - WriteLine(" - You can resize windows by dragging their borders."); - } - if(API.Upgrades["panelbuttons"] == true) - { - WriteLine($" - A list of open apps is shown at the {API.CurrentSkin.desktoppanelposition.ToLower()} of the screen."); - } - if(API.Upgrades["usefulpanelbuttons"] == true) - { - WriteLine(" - You can minimize and restore apps using the panel buttons."); - } - if(API.Upgrades["titletext"] == true) - { - WriteLine(" - Apps display their names on the titlebar."); - } - if(API.Upgrades["appicons"] == true) - { - WriteLine(" - Apps display their icons, and they are displayed in their titlebars."); - } - if(API.Upgrades["autoscrollterminal"] == true) - { - WriteLine(" - The Terminal will automatically scroll to the bottom."); - } - if(API.Upgrades["terminalscrollbar"] == true) - { - WriteLine(" - You can scroll up and down the Terminal's buffer."); - } - if(API.Upgrades["zoomableterminal"] == true) - { - WriteLine(" - You can zoom the Terminal in and out by holding CTRL and scrolling up or down."); - } - } - - - // ERROR: Handles clauses are not supported in C# - private void tmrfirstrun_Tick(object sender, EventArgs e) - { - switch (firstrun) - { - case 1: - txtterm.Text = txtterm.Text + "Installation Successfull" + Environment.NewLine; - blockctrlt = true; - break; - case 2: - txtterm.Text = txtterm.Text + "IP 199.108.232.1 Connecting..." + Environment.NewLine + "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; - API.PlaySound(Properties.Resources.dial_up_modem_02); - break; - case 12: - txtterm.Text = txtterm.Text + "IP 199.108.232.1 Connected!" + Environment.NewLine + "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 15: - txtterm.Text = txtterm.Text + "DevX: Hi, my name is DevX and you are now using an early version of my operating system \"ShiftOS\"." + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 22: - txtterm.Text = txtterm.Text + "DevX: Currently the terminal is open and I am using it to communicate with you remotely." + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 28: - txtterm.Text = txtterm.Text + "DevX: ShiftOS is going to be the most revolutionary operating system in the world that will run on every electronic device you can think of." + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 36: - txtterm.Text = txtterm.Text + "DevX: I can't tell you much about my future plans right now but if you can help me then I may tell you more in future" + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 44: - txtterm.Text = txtterm.Text + "DevX: ShiftOS is barely usable in it's current state so I need you to help me evolve it using codepoints" + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 50: - txtterm.Text = txtterm.Text + "DevX: Once you acquire codepoints you can use them to upgrade certain components of ShiftOS or add new software" + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 59: - txtterm.Text = txtterm.Text + "DevX: I'll close the terminal now and send you to the blank ShiftOS desktop" + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 65: - txtterm.Text = txtterm.Text + "DevX: You can open and close the terminal at any time by pressing CTRL + T" + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 70: - txtterm.Text = txtterm.Text + "DevX: Once you are on the desktop open the terminal, type \"help\" and then press enter for a guide on using ShiftOS" + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 80: - txtterm.Text = txtterm.Text + "DevX: Gotta run now but I'll contact you soon to see how you are going with evolving ShiftOS for me while I... Work on something else" + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 89: - txtterm.Text = txtterm.Text + "DevX: Remember to always click the black desktop first and then press press CTRL + T to open the terminal otherwise the terminal won't open!" + Environment.NewLine + "User@ShiftOS $> "; - API.PlaySound(Properties.Resources.writesound); - break; - case 94: - API.PlaySound(Properties.Resources.typesound); - txtterm.Text = "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; - tmrfirstrun.Stop(); - this.Close(); - blockctrlt = false; - SaveSystem.Utilities.saveGame(); - break; - } - firstrun = firstrun + 1; - txtterm.SelectionStart = txtterm.TextLength; - } - - public void runterminalfile(string path) - { - if(File.Exists(path)) - { - string[] cmds = File.ReadAllLines(path); - foreach(string cmd in cmds) - { - command = cmd; - DoCommand(); - } - } - } - - // ERROR: Handles clauses are not supported in C# - private void tmrshutdown_Tick(object sender, EventArgs e) - { - Application.Exit(); - } - - public void WriteLine(string text) - { - API.CurrentSession.Invoke(new Action(() => - { - if (txtterm.Text.Length > 0) - { - txtterm.Text += Environment.NewLine + text; - } - else - { - txtterm.Text += text; - } - txtterm.Select(txtterm.TextLength, 0); - txtterm.ScrollToCaret(); - })); - } - private bool Zooming = false; - - private void ScrollDeactivate(object sender, KeyEventArgs e) - { - if(Zooming == true) - { - Zooming = false; - } - } - - private int ZoomMultiplier = 1; - - private void ResetTerminalFont() - { - string fname = "Font"; - if(API.Upgrades["setterminalfont"] == true) - { - fname = API.CurrentSkin.TerminalFontStyle; - } - else - { - fname = OSInfo.GetMonospaceFont(); - } - int fsize = 9 * ZoomMultiplier; - try { - txtterm.Font = new Font(fname, fsize); - } - catch - { - txtterm.Font = new Font(fname, 9); - } - } - - private void Zoom(object sender, ScrollEventArgs e) - { - - } - - private void ScrollTerm(object sender, MouseEventArgs e) - { - if(Zooming == true) - { - - } else - { - if(API.Upgrades["terminalscrollbar"] == true) - { - txtterm.ScrollBars = ScrollBars.Vertical; - } - } - } - - private void tmrsetfont_Tick(object sender, EventArgs e) - { - ResetTerminalFont(); - if(API.Upgrades["setterminalcolors"] == true) - { - txtterm.BackColor = API.CurrentSkin.TerminalBackColor; - txtterm.ForeColor = API.CurrentSkin.TerminalTextColor; - } - } - } - -} diff --git a/source/WindowsFormsApplication1/Terminal.resx b/source/WindowsFormsApplication1/Terminal.resx deleted file mode 100644 index d0442f6..0000000 --- a/source/WindowsFormsApplication1/Terminal.resx +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 127, 17 - - - 250, 102 - - - 254, 22 - - - 449, 17 - - - 543, 17 - - - 334, 3 - - - 78 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/TextPad.Designer.cs b/source/WindowsFormsApplication1/TextPad.Designer.cs deleted file mode 100644 index 3ac11b4..0000000 --- a/source/WindowsFormsApplication1/TextPad.Designer.cs +++ /dev/null @@ -1,181 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace ShiftOS -{ - partial class TextPad - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.txtuserinput = new System.Windows.Forms.TextBox(); - this.pnlbreak = new System.Windows.Forms.Panel(); - this.pnloptions = new System.Windows.Forms.Panel(); - this.btnsave = new System.Windows.Forms.Button(); - this.btnopen = new System.Windows.Forms.Button(); - this.btnnew = new System.Windows.Forms.Button(); - this.tmrcodepointcooldown = new System.Windows.Forms.Timer(this.components); - this.tmrshowearnedcodepoints = new System.Windows.Forms.Timer(this.components); - this.pgcontents.SuspendLayout(); - this.pnloptions.SuspendLayout(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.Controls.Add(this.txtuserinput); - this.pgcontents.Controls.Add(this.pnlbreak); - this.pgcontents.Controls.Add(this.pnloptions); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(530, 330); - this.pgcontents.TabIndex = 20; - // - // txtuserinput - // - this.txtuserinput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtuserinput.BackColor = System.Drawing.Color.White; - this.txtuserinput.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtuserinput.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtuserinput.ForeColor = System.Drawing.Color.Black; - this.txtuserinput.Location = new System.Drawing.Point(4, 2); - this.txtuserinput.Multiline = true; - this.txtuserinput.Name = "txtuserinput"; - this.txtuserinput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtuserinput.Size = new System.Drawing.Size(528, 272); - this.txtuserinput.TabIndex = 0; - // - // pnlbreak - // - this.pnlbreak.BackColor = System.Drawing.Color.White; - this.pnlbreak.BackgroundImage = global::ShiftOS.Properties.Resources.uparrow; - this.pnlbreak.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.pnlbreak.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlbreak.ForeColor = System.Drawing.Color.Black; - this.pnlbreak.Location = new System.Drawing.Point(0, 277); - this.pnlbreak.Name = "pnlbreak"; - this.pnlbreak.Size = new System.Drawing.Size(530, 15); - this.pnlbreak.TabIndex = 2; - // - // pnloptions - // - this.pnloptions.BackColor = System.Drawing.Color.White; - this.pnloptions.Controls.Add(this.btnsave); - this.pnloptions.Controls.Add(this.btnopen); - this.pnloptions.Controls.Add(this.btnnew); - this.pnloptions.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnloptions.Location = new System.Drawing.Point(0, 292); - this.pnloptions.Name = "pnloptions"; - this.pnloptions.Size = new System.Drawing.Size(530, 38); - this.pnloptions.TabIndex = 1; - this.pnloptions.Visible = false; - // - // btnsave - // - this.btnsave.BackColor = System.Drawing.Color.White; - this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnsave.Image = global::ShiftOS.Properties.Resources.saveicon; - this.btnsave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnsave.Location = new System.Drawing.Point(168, 4); - this.btnsave.Name = "btnsave"; - this.btnsave.Size = new System.Drawing.Size(76, 31); - this.btnsave.TabIndex = 2; - this.btnsave.Text = "Save"; - this.btnsave.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnsave.UseVisualStyleBackColor = false; - // - // btnopen - // - this.btnopen.BackColor = System.Drawing.Color.White; - this.btnopen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnopen.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnopen.Image = global::ShiftOS.Properties.Resources.openicon; - this.btnopen.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnopen.Location = new System.Drawing.Point(86, 4); - this.btnopen.Name = "btnopen"; - this.btnopen.Size = new System.Drawing.Size(76, 31); - this.btnopen.TabIndex = 1; - this.btnopen.Text = "Open"; - this.btnopen.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnopen.UseVisualStyleBackColor = false; - // - // btnnew - // - this.btnnew.BackColor = System.Drawing.Color.White; - this.btnnew.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnnew.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnnew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnnew.Location = new System.Drawing.Point(4, 4); - this.btnnew.Name = "btnnew"; - this.btnnew.Size = new System.Drawing.Size(76, 31); - this.btnnew.TabIndex = 0; - this.btnnew.Text = "New"; - this.btnnew.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnnew.UseVisualStyleBackColor = false; - // - // tmrcodepointcooldown - // - this.tmrcodepointcooldown.Interval = 10000; - // - // tmrshowearnedcodepoints - // - this.tmrshowearnedcodepoints.Interval = 3000; - // - // TextPad - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(530, 330); - this.Controls.Add(this.pgcontents); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.MinimumSize = new System.Drawing.Size(230, 230); - this.Name = "TextPad"; - this.Text = "TextPad"; - this.TopMost = true; - this.pgcontents.ResumeLayout(false); - this.pgcontents.PerformLayout(); - this.pnloptions.ResumeLayout(false); - this.ResumeLayout(false); - this.txtuserinput.TextChanged += new EventHandler(this.txtuserinput_TextChanged); - this.btnsave.Click += new EventHandler(this.btnsave_Click); - this.btnnew.Click += new EventHandler(this.btnnew_Click); - this.btnopen.Click += new EventHandler(this.btnopen_Click); - this.Load += new EventHandler(this.TextPad_Load); - this.tmrcodepointcooldown.Tick += new EventHandler(tmrcodepointcooldown_Tick); - this.tmrshowearnedcodepoints.Tick += new EventHandler(tmrshowearnedcodepoints_Tick); - this.pnlbreak.MouseEnter += new EventHandler(this.pnlbreak_MouseEnter); - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.TextBox txtuserinput; - internal System.Windows.Forms.Panel pnloptions; - internal System.Windows.Forms.Button btnnew; - internal System.Windows.Forms.Button btnsave; - internal System.Windows.Forms.Button btnopen; - internal System.Windows.Forms.Panel pnlbreak; - internal System.Windows.Forms.Timer tmrcodepointcooldown; - internal System.Windows.Forms.Timer tmrshowearnedcodepoints; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/TextPad.cs b/source/WindowsFormsApplication1/TextPad.cs deleted file mode 100644 index 1b49129..0000000 --- a/source/WindowsFormsApplication1/TextPad.cs +++ /dev/null @@ -1,239 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class TextPad : Form - { - private bool codepointscooldown = false; - private int codepointsearned = 0; - private bool needtosave = false; - - public TextPad() - { - InitializeComponent(); - } - - private void TextPad_Load(object sender, EventArgs e) - { - txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height + pnloptions.Height); - setupoptions(); - } - - // ERROR: Handles clauses are not supported in C# - private void pnlbreak_MouseEnter(object sender, EventArgs e) - { - if (pnloptions.Visible == false) - { - pnlbreak.BackgroundImage = Properties.Resources.downarrow; - pnloptions.Show(); - txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height - pnloptions.Height); - } - else { - pnlbreak.BackgroundImage = Properties.Resources.uparrow; - pnloptions.Hide(); - txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height + pnloptions.Height); - } - } - - // ERROR: Handles clauses are not supported in C# - private void btnnew_Click(object sender, EventArgs e) - { - if (needtosave == true) - { - API.CreateInfoboxSession("Textpad - Save?", "It appears that your text document currently contains unsaved changes." + Environment.NewLine + Environment.NewLine + "Are you sure you want to start a new document without saving the changes?", infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => - { - string result = API.GetInfoboxResult(); - switch(result) - { - case "Yes": - codepointsearned = 0; - this.txtuserinput.Text = ""; - break; - case "No": - SaveFile(); - break; - } - }; - } - else { - makenewdoc(); - } - } - - private void SaveFile() - { - if (API.Upgrades["trmfiles"] == true) - { - API.CreateFileSkimmerSession(".txt;.trm", File_Skimmer.FileSkimmerMode.Save); - - } - else - { - API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Save); - } - API.FileSkimmerSession.FormClosing += (object se, FormClosingEventArgs ea) => - { - string res = API.GetFSResult(); - if (res != "fail") - { - File.WriteAllText(res, txtuserinput.Text); - } - }; - } - - private void SaveFile(string text) - { - if (API.Upgrades["trmfiles"] == true) - { - API.CreateFileSkimmerSession(".txt;.trm", File_Skimmer.FileSkimmerMode.Save); - - } - else - { - API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Save); - } - API.FileSkimmerSession.FormClosing += (object se, FormClosingEventArgs ea) => - { - string res = API.GetFSResult(); - if (res != "fail") - { - File.WriteAllText(res, text); - } - }; - } - - public void makenewdoc() - { - txtuserinput.Text = ""; - needtosave = false; - codepointsearned = 0; - } - - // ERROR: Handles clauses are not supported in C# - private void btnsave_Click(object sender, EventArgs e) - { - SaveFile(); - } - - // ERROR: Handles clauses are not supported in C# - private void btnopen_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - if (needtosave == true) - { - API.CreateInfoboxSession("Textpad - Save?", "It appears that your text document currently contains unsaved changes." + Environment.NewLine + Environment.NewLine + "Are you sure you want to start a new document without saving the changes?", infobox.InfoboxMode.YesNo); - API.InfoboxSession.FormClosing += (object se, FormClosingEventArgs ea) => - { - string result = API.GetInfoboxResult(); - switch (result) - { - case "Yes": - codepointsearned = 0; - string res = API.GetFSResult(); - if (res != "fail") - { - string fContents = File.ReadAllText(res); - - txtuserinput.Text = fContents; - } - break; - case "No": - string fcontents = txtuserinput.Text; - SaveFile(fcontents); - string res2 = API.GetFSResult(); - if (res2 != "fail") - { - string fContents = File.ReadAllText(res2); - - txtuserinput.Text = fContents; - } - break; - } - }; - } - else { - string res = API.GetFSResult(); - if (res != "fail") - { - try { - string fContents = File.ReadAllText(res); - - txtuserinput.Text = fContents; - } - catch(Exception ex) - { - txtuserinput.Text = ex.Message; - } - } - } - }; - } - - public void setupoptions() - { - if (API.Upgrades["textpadnew"] == true) - btnnew.Show(); - else - btnnew.Hide(); - if (API.Upgrades["textpadopen"] == true) - btnopen.Show(); - else - btnopen.Hide(); - if (API.Upgrades["textpadsave"] == true) - btnsave.Show(); - else - btnsave.Hide(); - if (API.Upgrades["textpadnew"] == false && API.Upgrades["textpadsave"] == false && API.Upgrades["textpadopen"] == false) - pnlbreak.Hide(); - } - - // ERROR: Handles clauses are not supported in C# - private void txtuserinput_TextChanged(object sender, EventArgs e) - { - needtosave = true; - if (codepointscooldown == true) - { - } - else { - codepointsearned = codepointsearned + 1; - codepointscooldown = true; - tmrcodepointcooldown.Start(); - } - if (Viruses.InfectedWith("keyboardfucker")) - { - var rnd = new Random(); - if (rnd.Next(0, 20) == 10) - { - txtuserinput.Text += Viruses.KeyboardInceptor.Intercept(); - } - } - } - - // ERROR: Handles clauses are not supported in C# - private void tmrcodepointcooldown_Tick(object sender, EventArgs e) - { - codepointscooldown = false; - tmrcodepointcooldown.Stop(); - } - - // ERROR: Handles clauses are not supported in C# - private void tmrshowearnedcodepoints_Tick(object sender, EventArgs e) - { - API.CreateInfoboxSession("TextPad", "You have earned " + codepointsearned.ToString() + " Codepoints from typing up and saving that document!", infobox.InfoboxMode.Info); - API.AddCodepoints(codepointsearned); - tmrshowearnedcodepoints.Stop(); - } - } -} diff --git a/source/WindowsFormsApplication1/TextPad.resx b/source/WindowsFormsApplication1/TextPad.resx deleted file mode 100644 index 6994a67..0000000 --- a/source/WindowsFormsApplication1/TextPad.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 197, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/Viruses.cs b/source/WindowsFormsApplication1/Viruses.cs deleted file mode 100644 index 303da83..0000000 --- a/source/WindowsFormsApplication1/Viruses.cs +++ /dev/null @@ -1,620 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - class Viruses - { - public static Dictionary Infections = new Dictionary(); - - public static void CheckForInfected() - { - VirusTimer.Interval = 1000; - Infections.Clear(); - Scan(Paths.SaveRoot); - VirusTimer.Tick += new EventHandler(VirusTimer_Tick); - VirusTimer.Start(); - } - - public static void VirusTimer_Tick(object sender, EventArgs e) - { - ShiftoriumKiller.KillRandomUpgrade(); - if(InfectedWith("beepseverysecond")) - { - API.PlaySound(Properties.Resources._3beepvirus); - } - if(InfectedWith("imtheshifternow")) - { - Skinning.Utilities.Randomize(); - } - } - - public static void Scan(string directory) - { - foreach(string file in Directory.GetFiles(directory)) - { - CheckInfected(file); - } - foreach(string dir in Directory.GetDirectories(directory)) - { - if(dir != Paths.Mod_Temp) { - Scan(dir); - } - } - } - - public static void ScanForInfectable(string directory, ref List file_list) - { - foreach (string file in Directory.GetFiles(directory)) - { - var finf = new FileInfo(file); - switch (finf.Extension) { - case ".skn": - case ".spk": - case ".dri": - case ".stp": - case ".pkg": - if (finf.Name != "HDD.dri") - { - file_list.Add(file); - } - break; - } - } - foreach (string dir in Directory.GetDirectories(directory)) - { - if (dir != Paths.Mod_Temp) - { - ScanForInfectable(dir, ref file_list); - } - } - } - const string virusfilename = "00110"; - - - public static void CheckInfected(string filepath) { - var finf = new FileInfo(filepath); - switch(finf.Extension) - { - case ".stp": - case ".spk": - case ".pkg": - case ".skn": - if (File.Exists(finf.FullName)) - { - try { - string pth = Paths.SystemDir + "_virusregister"; - API.ExtractFile(finf.FullName, pth, false); - string dirsep = "\\"; - switch (OSInfo.GetPlatformID()) - { - case "microsoft": - dirsep = "\\"; - break; - default: - dirsep = "/"; - break; - } - if (File.Exists(pth + dirsep + virusfilename)) - { - string encrypted = File.ReadAllText(pth + dirsep + virusfilename); - if (encrypted != "" && encrypted != null) - { - foreach (string line in API.Encryption.Decrypt(encrypted).Split(';')) - { - if (Infections.ContainsKey(line)) - { - Infections[line] += ";" + finf.FullName; - } - else { - Infections.Add(line, finf.FullName); - } - } - } - } - Directory.Delete(pth, true); - } - catch - { - API.LogException("Corrupted package file detected while checking for infections... skipping.", false); - } - } - break; - case ".dri": - if (finf.Name != "HDD.dri" && !finf.Name.Contains("BN") && finf.Name != "Network.dri") - { - if (File.ReadAllText(finf.FullName) != "") - { - string encrypted = File.ReadAllText(finf.FullName); - try - { - foreach (string line in API.Encryption.Decrypt(encrypted).Split(';')) - { - if (Infections.ContainsKey(line)) - { - Infections[line] += ";" + finf.FullName; - } - else { - Infections.Add(line, finf.FullName); - } - } - } - catch - { - if (encrypted != "") - { - string decrypted = API.Encryption.Decrypt(encrypted); - if (Infections.ContainsKey(decrypted)) - { - Infections[decrypted] += ";" + finf.FullName; - } - else { - Infections.Add(decrypted, finf.FullName); - } - } - } - } - } - break; - - } - } - - public enum VirusID - { - ShiftoriumKiller, - WindowsEverywhere, - WindowMicrofier, - Bye, - WindowSpazzer, - KeyboardFucker, - ImTheShifterNow, - ThanksfortheInfo, - SkinInterceptor, - HolyFuckMyEars, - BeepsEverySecond, - MouseTrap, - Seized, - FileFucker, - } - - public class FileFucker - { - public static void GetSomeFiles(string directory, ref List file_list) - { - foreach (string file in Directory.GetFiles(directory)) - { - var finf = new FileInfo(file); - switch (finf.Extension) - { - case ".npk": - case ".docx": - case ".doc": - case ".owd": - case ".txt": - if (finf.Name != "names.npk" && finf.Name != "_Log.txt") - { - file_list.Add(file); - } - break; - } - } - foreach (string dir in Directory.GetDirectories(directory)) - { - if (dir != Paths.Mod_Temp) - { - GetSomeFiles(dir, ref file_list); - } - } - } - - public static void Infect() - { - List files = new List(); - GetSomeFiles(Paths.SaveRoot, ref files); - var rnd = new Random(); - string fname = files[rnd.Next(0, files.Count - 1)]; - string fcontents = File.ReadAllText(fname); - string encrypted = API.Encryption.Encrypt(fcontents); - File.WriteAllText(fname, encrypted); - } - } - - public static bool InfectedWith(string id) - { - if(Infections.ContainsKey("virus:" + id)) - { - return true; - } - else - { - return false; - } - } - - public static void InfectFile(string FileName, VirusID id) - { - bool cont = false; - string infectionString = "virus:"; - switch (id) - { - case VirusID.WindowSpazzer: - infectionString = "virus:windowspazzer"; - break; - case VirusID.WindowMicrofier: - infectionString = "virus:windowmicrofier"; - break; - case VirusID.Bye: - infectionString = "virus:bye"; - break; - case VirusID.ShiftoriumKiller: - infectionString = "virus:shiftoriumkiller"; - break; - case VirusID.WindowsEverywhere: - infectionString = "virus:windowseverywhere"; - break; - case VirusID.KeyboardFucker: - infectionString = "virus:keyboardfucker"; - break; - case VirusID.ImTheShifterNow: - infectionString = "virus:imtheshifternow"; - break; - case VirusID.ThanksfortheInfo: - infectionString = "virus:thanksfortheinfo"; - break; - case VirusID.SkinInterceptor: - infectionString = "virus:skininterceptor"; - break; - case VirusID.HolyFuckMyEars: - infectionString = "virus:holyfuckmyears"; - break; - case VirusID.BeepsEverySecond: - infectionString = "virus:beepseverysecond"; - break; - case VirusID.Seized: - infectionString = "virus:seized"; - break; - case VirusID.FileFucker: - infectionString = "virus:filefucker"; - break; - } - FileInfo finf = new FileInfo(FileName); - switch(finf.Extension) - { - case ".skn": - case ".spk": - case ".stp": - case ".pkg": - if(!Directory.Exists(Paths.Mod_Temp)) - { - Directory.CreateDirectory(Paths.Mod_Temp); - } - string pth = Paths.SystemDir + "_virusinfect1"; - API.ExtractFile(finf.FullName, pth, false); - string dirsep = "\\"; - switch (OSInfo.GetPlatformID()) - { - case "microsoft": - dirsep = "\\"; - break; - default: - dirsep = "/"; - break; - } - InfectFile(pth + dirsep + virusfilename, id); - File.Delete(finf.FullName); - ZipFile.CreateFromDirectory(pth, FileName); - Directory.Delete(pth, true); - break; - case ".dri": - if(finf.Name == "HDD.dri" || finf.Name.Contains("BN") || finf.Name == "Network.dri") - { - throw new NotHappeningException("You're not going to attempt to infect that file, are you?"); - } - else - { - try { - string encryptedfile = File.ReadAllText(finf.FullName); - string unencryptedfile = API.Encryption.Decrypt(encryptedfile); - unencryptedfile += ";" + infectionString; - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); - } - catch - { - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(infectionString)); - } - } - break; - default: - cont = true; - break; - - } - if (cont == true) - { - if (finf.Name == virusfilename) - { - try - { - string encryptedfile = File.ReadAllText(finf.FullName); - string unencryptedfile = API.Encryption.Decrypt(encryptedfile); - unencryptedfile += ";" + infectionString; - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); - } - catch - { - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(infectionString)); - } - } - } - CheckForInfected(); - } - - public static void DisInfect(string FileName) - { - FileInfo finf = new FileInfo(FileName); - switch (finf.Extension) - { - case ".skn": - case ".spk": - case ".stp": - case ".pkg": - string pth = Paths.SystemDir + "_viruscheck"; - API.ExtractFile(finf.FullName, pth, false); - string dirsep = "\\"; - switch (OSInfo.GetPlatformID()) - { - case "microsoft": - dirsep = "\\"; - break; - default: - dirsep = "/"; - break; - } - if (File.Exists(pth + dirsep + virusfilename)) - { - File.Delete(pth + dirsep + virusfilename); - } - File.Delete(finf.FullName); - ZipFile.CreateFromDirectory(pth, finf.FullName); - Directory.Delete(pth, true); - break; - case ".dri": - if (finf.Name == "HDD.dri" || finf.Name.Contains("BN") || finf.Name == "Network.dri") - { - throw new NotHappeningException("You're not going to attempt to infect that file, are you?"); - } - else - { - try - { - string encryptedfile = File.ReadAllText(finf.FullName); - string unencryptedfile = API.Encryption.Decrypt(encryptedfile); - unencryptedfile = ""; - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); - } - catch - { - File.WriteAllText(finf.FullName, ""); - } - } - break; - - - } - CheckForInfected(); - } - - public static void InfectFile(string FileName, string id) - { - bool cont = false; - string infectionString = "virus:" + id; - FileInfo finf = new FileInfo(FileName); - switch (finf.Extension) - { - case ".skn": - case ".spk": - case ".stp": - case ".pkg": - string pth = Paths.SystemDir + "_virusinfect2"; - API.ExtractFile(finf.FullName, pth, false); - string dirsep = "\\"; - switch (OSInfo.GetPlatformID()) - { - case "microsoft": - dirsep = "\\"; - break; - default: - dirsep = "/"; - break; - } - InfectFile(pth + dirsep + virusfilename, id); - File.Delete(finf.FullName); - ZipFile.CreateFromDirectory(pth, finf.FullName); - Directory.Delete(pth, true); - break; - case ".dri": - if (finf.Name == "HDD.dri" || finf.Name.Contains("BN") || finf.Name == "Network.dri") - { - throw new NotHappeningException("You're not going to attempt to infect that file, are you?"); - } - else - { - try - { - string encryptedfile = File.ReadAllText(finf.FullName); - string unencryptedfile = API.Encryption.Decrypt(encryptedfile); - unencryptedfile += ";" + infectionString; - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); - } - catch - { - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(infectionString)); - } - } - break; - default: - cont = true; - break; - - } - if (cont == true) - { - if (finf.Name == virusfilename) - { - try - { - string encryptedfile = File.ReadAllText(finf.FullName); - string unencryptedfile = API.Encryption.Decrypt(encryptedfile); - unencryptedfile += ";" + infectionString; - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(unencryptedfile)); - } - catch - { - File.WriteAllText(finf.FullName, API.Encryption.Encrypt(infectionString)); - } - } - } - CheckForInfected(); - } - - - public static void InfectRandom() - { - var rnd = new Random(); - var files = new List(); - ScanForInfectable(Paths.SaveRoot, ref files); - string filetoinfect = files[rnd.Next(0, files.Count - 1)]; - VirusID v = VirusID.ShiftoriumKiller; - int vid = rnd.Next(0, 11); - switch(vid) - { - case 0: - v = VirusID.ShiftoriumKiller; - break; - case 1: - v = VirusID.WindowsEverywhere; - break; - case 2: - v = VirusID.ImTheShifterNow; - break; - case 3: - v = VirusID.BeepsEverySecond; - break; - case 4: - v = VirusID.FileFucker; - break; - case 5: - v = VirusID.MouseTrap; - break; - case 6: - v = VirusID.Seized; - break; - case 7: - v = VirusID.SkinInterceptor; - break; - case 8: - v = VirusID.ThanksfortheInfo; - break; - case 9: - v = VirusID.KeyboardFucker; - break; - case 10: - v = VirusID.WindowMicrofier; - break; - case 11: - v = VirusID.Bye; - break; - case 12: - v = VirusID.WindowSpazzer; - break; - } - InfectFile(filetoinfect, v); - } - - public static void DropDevXPayload() - { - //Viruses... - var files = new List(); - ScanForInfectable(Paths.SaveRoot, ref files); - try { - var rnd = new Random(); - string file = files[rnd.Next(0, files.Count - 1)]; - InfectFile(file, VirusID.ImTheShifterNow); - InfectFile(file, VirusID.MouseTrap); - } - catch - { - DropDevXPayload(); - } - - } - - private static Timer VirusTimer = new Timer(); - - public class ShiftoriumKiller - { - public static void KillRandomUpgrade() - { - if(Viruses.InfectedWith("shiftoriumkiller")) - { - int id = new Random().Next(0, SaveSystem.ShiftoriumRegistry.DefaultUpgrades.Count - 1); - Shiftorium.Upgrade upg = SaveSystem.ShiftoriumRegistry.DefaultUpgrades[id]; - int chance = new Random().Next(0, 100); - if(chance == 50) - { - Shiftorium.Utilities.Unbuy(upg.id); - } - } - } - } - - public class KeyboardInceptor - { - public static string[] Chars = - { - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", - "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "~", "!", "@", "#", "$", "%", "^", "&", "(", ")", "-", "_", "=", "+", - "/", "?", "\\", "|", "[", "]", "{", "}", "'", "\"", ";", ":", ".", ">", ",", "<", - }; - - public static string Intercept() - { - Random rnd = new Random(); - int shouldbeupper = rnd.Next(0, 10); - switch(shouldbeupper) - { - case 1: - case 3: - case 5: - case 7: - case 9: - return Chars[rnd.Next(0, Chars.Length - 1)].ToUpper(); - default: - return Chars[rnd.Next(0, Chars.Length - 1)].ToLower(); - } - } - } - } - - public class NotHappeningException : Exception - { - public NotHappeningException() : base("You tried to do something that ain't gonna happen.") - { - - } - - public NotHappeningException(string message) : base(message) - { - - } - } - -} diff --git a/source/WindowsFormsApplication1/WidgetManager.Designer.cs b/source/WindowsFormsApplication1/WidgetManager.Designer.cs deleted file mode 100644 index 4140581..0000000 --- a/source/WindowsFormsApplication1/WidgetManager.Designer.cs +++ /dev/null @@ -1,252 +0,0 @@ -namespace ShiftOS -{ - partial class WidgetManager - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.panel1 = new System.Windows.Forms.Panel(); - this.pnlbuttons = new System.Windows.Forms.FlowLayoutPanel(); - this.btndone = new System.Windows.Forms.Button(); - this.btnadd = new System.Windows.Forms.Button(); - this.cbpanel = new System.Windows.Forms.ComboBox(); - this.txtwidth = new System.Windows.Forms.TextBox(); - this.lbwidth = new System.Windows.Forms.Label(); - this.txtx = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.lbtitle = new System.Windows.Forms.Label(); - this.lvwidgets = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.listView1 = new System.Windows.Forms.ListView(); - this.tmrcheckvalid = new System.Windows.Forms.Timer(this.components); - this.btninstallwidgets = new System.Windows.Forms.Button(); - this.panel1.SuspendLayout(); - this.pnlbuttons.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.White; - this.panel1.Controls.Add(this.pnlbuttons); - this.panel1.Controls.Add(this.lbtitle); - this.panel1.Controls.Add(this.lvwidgets); - this.panel1.Controls.Add(this.listView1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.ForeColor = System.Drawing.Color.Black; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(697, 459); - this.panel1.TabIndex = 0; - // - // pnlbuttons - // - this.pnlbuttons.BackColor = System.Drawing.Color.Gray; - this.pnlbuttons.Controls.Add(this.btndone); - this.pnlbuttons.Controls.Add(this.btnadd); - this.pnlbuttons.Controls.Add(this.cbpanel); - this.pnlbuttons.Controls.Add(this.txtwidth); - this.pnlbuttons.Controls.Add(this.lbwidth); - this.pnlbuttons.Controls.Add(this.txtx); - this.pnlbuttons.Controls.Add(this.label1); - this.pnlbuttons.Controls.Add(this.btninstallwidgets); - this.pnlbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.pnlbuttons.ForeColor = System.Drawing.Color.White; - this.pnlbuttons.Location = new System.Drawing.Point(0, 429); - this.pnlbuttons.Name = "pnlbuttons"; - this.pnlbuttons.Size = new System.Drawing.Size(697, 30); - this.pnlbuttons.TabIndex = 3; - // - // btndone - // - this.btndone.AutoSize = true; - this.btndone.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btndone.Location = new System.Drawing.Point(649, 3); - this.btndone.Name = "btndone"; - this.btndone.Size = new System.Drawing.Size(45, 25); - this.btndone.TabIndex = 0; - this.btndone.Text = "Done"; - this.btndone.UseVisualStyleBackColor = true; - this.btndone.Click += new System.EventHandler(this.btndone_Click); - // - // btnadd - // - this.btnadd.AutoSize = true; - this.btnadd.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnadd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnadd.Location = new System.Drawing.Point(605, 3); - this.btnadd.Name = "btnadd"; - this.btnadd.Size = new System.Drawing.Size(38, 25); - this.btnadd.TabIndex = 2; - this.btnadd.Text = "Add"; - this.btnadd.UseVisualStyleBackColor = true; - this.btnadd.Click += new System.EventHandler(this.btnadd_Click); - // - // cbpanel - // - this.cbpanel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbpanel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cbpanel.FormattingEnabled = true; - this.cbpanel.Location = new System.Drawing.Point(478, 3); - this.cbpanel.Name = "cbpanel"; - this.cbpanel.Size = new System.Drawing.Size(121, 21); - this.cbpanel.TabIndex = 1; - // - // txtwidth - // - this.txtwidth.Location = new System.Drawing.Point(443, 3); - this.txtwidth.Name = "txtwidth"; - this.txtwidth.Size = new System.Drawing.Size(29, 20); - this.txtwidth.TabIndex = 3; - // - // lbwidth - // - this.lbwidth.Location = new System.Drawing.Point(393, 0); - this.lbwidth.Name = "lbwidth"; - this.lbwidth.Size = new System.Drawing.Size(44, 28); - this.lbwidth.TabIndex = 5; - this.lbwidth.Text = "Width:"; - this.lbwidth.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // txtx - // - this.txtx.Location = new System.Drawing.Point(355, 3); - this.txtx.Name = "txtx"; - this.txtx.Size = new System.Drawing.Size(32, 20); - this.txtx.TabIndex = 4; - // - // label1 - // - this.label1.Location = new System.Drawing.Point(246, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(103, 28); - this.label1.TabIndex = 6; - this.label1.Text = "Horizontal Location:"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // lbtitle - // - this.lbtitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); - this.lbtitle.Location = new System.Drawing.Point(12, 9); - this.lbtitle.Name = "lbtitle"; - this.lbtitle.Size = new System.Drawing.Size(673, 32); - this.lbtitle.TabIndex = 2; - this.lbtitle.Text = "Desktop Panel Widgets"; - this.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lvwidgets - // - this.lvwidgets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lvwidgets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.lvwidgets.FullRowSelect = true; - this.lvwidgets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.lvwidgets.Location = new System.Drawing.Point(12, 44); - this.lvwidgets.Name = "lvwidgets"; - this.lvwidgets.Size = new System.Drawing.Size(673, 381); - this.lvwidgets.TabIndex = 1; - this.lvwidgets.UseCompatibleStateImageBehavior = false; - this.lvwidgets.View = System.Windows.Forms.View.Details; - this.lvwidgets.SelectedIndexChanged += new System.EventHandler(this.lvwidgets_SelectedIndexChanged); - // - // columnHeader1 - // - this.columnHeader1.Text = "Name"; - // - // columnHeader2 - // - this.columnHeader2.Text = "Description"; - // - // listView1 - // - this.listView1.Location = new System.Drawing.Point(212, 76); - this.listView1.Name = "listView1"; - this.listView1.Size = new System.Drawing.Size(121, 97); - this.listView1.TabIndex = 0; - this.listView1.UseCompatibleStateImageBehavior = false; - // - // tmrcheckvalid - // - this.tmrcheckvalid.Enabled = true; - this.tmrcheckvalid.Tick += new System.EventHandler(this.tmrcheckvalid_Tick); - // - // btninstallwidgets - // - this.btninstallwidgets.AutoSize = true; - this.btninstallwidgets.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btninstallwidgets.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btninstallwidgets.Location = new System.Drawing.Point(152, 3); - this.btninstallwidgets.Name = "btninstallwidgets"; - this.btninstallwidgets.Size = new System.Drawing.Size(88, 25); - this.btninstallwidgets.TabIndex = 7; - this.btninstallwidgets.Text = "Install Widgets"; - this.btninstallwidgets.UseVisualStyleBackColor = true; - this.btninstallwidgets.Click += new System.EventHandler(this.btninstallwidgets_Click); - // - // WidgetManager - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(697, 459); - this.Controls.Add(this.panel1); - this.Name = "WidgetManager"; - this.Text = "WidgetManager"; - this.Load += new System.EventHandler(this.WidgetManager_Load); - this.panel1.ResumeLayout(false); - this.pnlbuttons.ResumeLayout(false); - this.pnlbuttons.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.ListView listView1; - private System.Windows.Forms.FlowLayoutPanel pnlbuttons; - private System.Windows.Forms.Button btndone; - private System.Windows.Forms.Button btnadd; - private System.Windows.Forms.ComboBox cbpanel; - private System.Windows.Forms.Label lbtitle; - private System.Windows.Forms.ListView lvwidgets; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; - private System.Windows.Forms.TextBox txtwidth; - private System.Windows.Forms.Label lbwidth; - private System.Windows.Forms.TextBox txtx; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Timer tmrcheckvalid; - private System.Windows.Forms.Button btninstallwidgets; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/WidgetManager.cs b/source/WindowsFormsApplication1/WidgetManager.cs deleted file mode 100644 index 2a3954f..0000000 --- a/source/WindowsFormsApplication1/WidgetManager.cs +++ /dev/null @@ -1,174 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class WidgetManager : Form - { - public WidgetManager() - { - InitializeComponent(); - } - - private void WidgetManager_Load(object sender, EventArgs e) - { - SetupList(); - } - - public void SetupList() - { - lvwidgets.Items.Clear(); - foreach(ColumnHeader c in lvwidgets.Columns) - { - c.Width = lvwidgets.Width / 2; - } - if(!Directory.Exists(Paths.WidgetFiles)) - { - Directory.CreateDirectory(Paths.WidgetFiles); - } - foreach(var f in Directory.GetFiles(Paths.WidgetFiles)) - { - var finf = new FileInfo(f); - if(finf.Extension == ".json") - { - var json = File.ReadAllText(finf.FullName); - var widget = JsonConvert.DeserializeObject(json); - var lv = new ListViewItem(); - lv.Text = widget.Name; - lv.Tag = widget; - lvwidgets.Items.Add(lv); - lv.SubItems.Add(widget.Description); - } - } - } - - private DesktopWidgetModel SelectedFutureWidget = null; - - private void lvwidgets_SelectedIndexChanged(object sender, EventArgs e) - { - SelectedFutureWidget = (DesktopWidgetModel)lvwidgets.SelectedItems[0].Tag; - cbpanel.Items.Clear(); - foreach(var p in API.CurrentSkin.DesktopPanels) - { - cbpanel.Items.Add(p.Position); - } - cbpanel.Text = (string)cbpanel.Items[0]; - } - - private void btndone_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void btnadd_Click(object sender, EventArgs e) - { - try { - if (cbpanel.Text != null) - { - var w = new Skinning.DesktopWidget(); - w.Name = SelectedFutureWidget.Name; - w.Panel = cbpanel.Text; - w.XLocation = Convert.ToInt32(txtx.Text); - w.Width = Convert.ToInt32(txtwidth.Text); - w.Lua = SelectedFutureWidget.Lua; - w.Type = SelectedFutureWidget.Type; - API.CurrentSkin.Widgets.Add(w); - GC.Collect(); - API.CurrentSession.SetupWidgets(); - Skinning.Utilities.saveskin(); - } - else - { - API.CreateInfoboxSession("Please select a location.", "Please select a desktop panel for the new widget!", infobox.InfoboxMode.Info); - } - } - catch - { - API.CreateInfoboxSession("Missing information", "Not enough valid info was given for the new widget. Remember, the width and location must be valid integers and the position must be either \"Top\" or \"Bottom\".", infobox.InfoboxMode.Info); - } - GC.Collect(); - } - - private void tmrcheckvalid_Tick(object sender, EventArgs e) - { - if(SelectedFutureWidget != null) - { - btnadd.Show(); - lbwidth.Show(); - txtwidth.Show(); - cbpanel.Show(); - label1.Show(); - txtx.Show(); - } - else - { - btnadd.Hide(); - lbwidth.Hide(); - txtwidth.Hide(); - cbpanel.Hide(); - label1.Hide(); - txtx.Hide(); - } - } - - private void btninstallwidgets_Click(object sender, EventArgs e) - { - API.CreateFileSkimmerSession(".wgt", File_Skimmer.FileSkimmerMode.Open); - API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => - { - var res = API.GetFSResult(); - if (res != "fail") - { - try - { - if(!Directory.Exists(Paths.WidgetFiles)) - { - Directory.CreateDirectory(Paths.WidgetFiles); - } - if(Directory.Exists(Paths.Mod_Temp + "_newwidget")) - { - Directory.Delete(Paths.Mod_Temp + "_newwidget", true); - } - ZipFile.ExtractToDirectory(res, Paths.Mod_Temp + "_newwidget"); - foreach(var f in Directory.GetFiles(Paths.Mod_Temp + "_newwidget")) - { - var finf = new FileInfo(f); - File.Copy(f, res + OSInfo.DirectorySeparator + finf.Name, true); - } - SetupList(); - } - catch - { - API.CreateInfoboxSession("Invalid widget pack.", "The widget pack you selected is not a valid widget pack.", infobox.InfoboxMode.Info); - } - } - }; - } - } - - public class DesktopWidgetModel - { - public string Name { get; set; } - public string Description { get; set; } - public WidgetType Type { get; set; } - public string Lua { get; set; } - } - - public enum WidgetType - { - Icon, - Menu, - DisplayText, - FreePanel - } -} diff --git a/source/WindowsFormsApplication1/WidgetManager.resx b/source/WindowsFormsApplication1/WidgetManager.resx deleted file mode 100644 index 27fa601..0000000 --- a/source/WindowsFormsApplication1/WidgetManager.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/WindowBorder.Designer.cs b/source/WindowsFormsApplication1/WindowBorder.Designer.cs deleted file mode 100644 index 6e0970e..0000000 --- a/source/WindowsFormsApplication1/WindowBorder.Designer.cs +++ /dev/null @@ -1,270 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class WindowBorder - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.pgleft = new System.Windows.Forms.Panel(); - this.pgbottomlcorner = new System.Windows.Forms.Panel(); - this.pgright = new System.Windows.Forms.Panel(); - this.pgbottomrcorner = new System.Windows.Forms.Panel(); - this.titlebar = new System.Windows.Forms.Panel(); - this.minimizebutton = new System.Windows.Forms.Panel(); - this.pnlicon = new System.Windows.Forms.PictureBox(); - this.rollupbutton = new System.Windows.Forms.Panel(); - this.closebutton = new System.Windows.Forms.Panel(); - this.lbtitletext = new System.Windows.Forms.Label(); - this.pgtoplcorner = new System.Windows.Forms.Panel(); - this.pgtoprcorner = new System.Windows.Forms.Panel(); - this.pgbottom = new System.Windows.Forms.Panel(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.pullbs = new System.Windows.Forms.Timer(this.components); - this.pullbottom = new System.Windows.Forms.Timer(this.components); - this.pullside = new System.Windows.Forms.Timer(this.components); - this.pgleft.SuspendLayout(); - this.pgright.SuspendLayout(); - this.titlebar.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pnlicon)).BeginInit(); - this.SuspendLayout(); - // - // pgleft - // - this.pgleft.BackColor = System.Drawing.Color.Gray; - this.pgleft.Controls.Add(this.pgbottomlcorner); - this.pgleft.Dock = System.Windows.Forms.DockStyle.Left; - this.pgleft.Location = new System.Drawing.Point(0, 30); - this.pgleft.Name = "pgleft"; - this.pgleft.Size = new System.Drawing.Size(2, 345); - this.pgleft.TabIndex = 16; - this.pgleft.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Rightpull_MouseDown); - this.pgleft.MouseEnter += new System.EventHandler(this.RightCursorOn_MouseDown); - this.pgleft.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); - this.pgleft.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rightpull_MouseUp); - // - // pgbottomlcorner - // - this.pgbottomlcorner.BackColor = System.Drawing.Color.Red; - this.pgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pgbottomlcorner.Location = new System.Drawing.Point(0, 343); - this.pgbottomlcorner.Name = "pgbottomlcorner"; - this.pgbottomlcorner.Size = new System.Drawing.Size(2, 2); - this.pgbottomlcorner.TabIndex = 14; - this.pgbottomlcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bspull_MouseDown); - this.pgbottomlcorner.MouseEnter += new System.EventHandler(this.CornerCursorOn_MouseDown); - this.pgbottomlcorner.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); - this.pgbottomlcorner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.bspull_MouseUp); - // - // pgright - // - this.pgright.BackColor = System.Drawing.Color.Gray; - this.pgright.Controls.Add(this.pgbottomrcorner); - this.pgright.Dock = System.Windows.Forms.DockStyle.Right; - this.pgright.Location = new System.Drawing.Point(545, 30); - this.pgright.Name = "pgright"; - this.pgright.Size = new System.Drawing.Size(2, 345); - this.pgright.TabIndex = 17; - this.pgright.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Rightpull_MouseDown); - this.pgright.MouseEnter += new System.EventHandler(this.RightCursorOn_MouseDown); - this.pgright.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); - this.pgright.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rightpull_MouseUp); - // - // pgbottomrcorner - // - this.pgbottomrcorner.BackColor = System.Drawing.Color.Red; - this.pgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pgbottomrcorner.Location = new System.Drawing.Point(0, 343); - this.pgbottomrcorner.Name = "pgbottomrcorner"; - this.pgbottomrcorner.Size = new System.Drawing.Size(2, 2); - this.pgbottomrcorner.TabIndex = 15; - this.pgbottomrcorner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bspull_MouseDown); - this.pgbottomrcorner.MouseEnter += new System.EventHandler(this.CornerCursorOn_MouseDown); - this.pgbottomrcorner.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); - this.pgbottomrcorner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.bspull_MouseUp); - // - // titlebar - // - this.titlebar.BackColor = System.Drawing.Color.Gray; - this.titlebar.Controls.Add(this.minimizebutton); - this.titlebar.Controls.Add(this.pnlicon); - this.titlebar.Controls.Add(this.rollupbutton); - this.titlebar.Controls.Add(this.closebutton); - this.titlebar.Controls.Add(this.lbtitletext); - this.titlebar.Controls.Add(this.pgtoplcorner); - this.titlebar.Controls.Add(this.pgtoprcorner); - this.titlebar.Dock = System.Windows.Forms.DockStyle.Top; - this.titlebar.ForeColor = System.Drawing.Color.White; - this.titlebar.Location = new System.Drawing.Point(0, 0); - this.titlebar.Name = "titlebar"; - this.titlebar.Size = new System.Drawing.Size(547, 30); - this.titlebar.TabIndex = 14; - this.titlebar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseDown); - this.titlebar.MouseMove += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseMove); - this.titlebar.MouseUp += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseUp); - // - // minimizebutton - // - this.minimizebutton.BackColor = System.Drawing.Color.Black; - this.minimizebutton.Location = new System.Drawing.Point(246, 5); - this.minimizebutton.Name = "minimizebutton"; - this.minimizebutton.Size = new System.Drawing.Size(22, 22); - this.minimizebutton.TabIndex = 24; - this.minimizebutton.Click += new System.EventHandler(this.minimizebutton_Click); - // - // pnlicon - // - this.pnlicon.BackColor = System.Drawing.Color.Transparent; - this.pnlicon.Location = new System.Drawing.Point(8, 8); - this.pnlicon.Name = "pnlicon"; - this.pnlicon.Size = new System.Drawing.Size(16, 16); - this.pnlicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pnlicon.TabIndex = 24; - this.pnlicon.TabStop = false; - this.pnlicon.Visible = false; - // - // rollupbutton - // - this.rollupbutton.BackColor = System.Drawing.Color.Black; - this.rollupbutton.Location = new System.Drawing.Point(274, 3); - this.rollupbutton.Name = "rollupbutton"; - this.rollupbutton.Size = new System.Drawing.Size(22, 22); - this.rollupbutton.TabIndex = 22; - this.rollupbutton.Click += new System.EventHandler(this.rollupbutton_Click); - // - // closebutton - // - this.closebutton.BackColor = System.Drawing.Color.Black; - this.closebutton.Location = new System.Drawing.Point(302, 3); - this.closebutton.Name = "closebutton"; - this.closebutton.Size = new System.Drawing.Size(22, 22); - this.closebutton.TabIndex = 20; - this.closebutton.Click += new System.EventHandler(this.closebutton_Click); - // - // lbtitletext - // - this.lbtitletext.AutoSize = true; - this.lbtitletext.BackColor = System.Drawing.Color.Transparent; - this.lbtitletext.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbtitletext.Location = new System.Drawing.Point(26, 7); - this.lbtitletext.Name = "lbtitletext"; - this.lbtitletext.Size = new System.Drawing.Size(77, 18); - this.lbtitletext.TabIndex = 19; - this.lbtitletext.Text = "Template"; - this.lbtitletext.MouseDown += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseDown); - this.lbtitletext.MouseMove += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseMove); - this.lbtitletext.MouseUp += new System.Windows.Forms.MouseEventHandler(this.titlebar_MouseUp); - // - // pgtoplcorner - // - this.pgtoplcorner.BackColor = System.Drawing.Color.Red; - this.pgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; - this.pgtoplcorner.Location = new System.Drawing.Point(0, 0); - this.pgtoplcorner.Name = "pgtoplcorner"; - this.pgtoplcorner.Size = new System.Drawing.Size(2, 30); - this.pgtoplcorner.TabIndex = 17; - // - // pgtoprcorner - // - this.pgtoprcorner.BackColor = System.Drawing.Color.Red; - this.pgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; - this.pgtoprcorner.Location = new System.Drawing.Point(545, 0); - this.pgtoprcorner.Name = "pgtoprcorner"; - this.pgtoprcorner.Size = new System.Drawing.Size(2, 30); - this.pgtoprcorner.TabIndex = 16; - // - // pgbottom - // - this.pgbottom.BackColor = System.Drawing.Color.Gray; - this.pgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pgbottom.Location = new System.Drawing.Point(2, 373); - this.pgbottom.Name = "pgbottom"; - this.pgbottom.Size = new System.Drawing.Size(543, 2); - this.pgbottom.TabIndex = 18; - this.pgbottom.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bottompull_MouseDown); - this.pgbottom.MouseEnter += new System.EventHandler(this.bottomCursorOn_MouseDown); - this.pgbottom.MouseLeave += new System.EventHandler(this.SizeCursoroff_MouseDown); - this.pgbottom.MouseUp += new System.Windows.Forms.MouseEventHandler(this.bottompull_MouseUp); - // - // pgcontents - // - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(2, 30); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(543, 343); - this.pgcontents.TabIndex = 15; - // - // pullbs - // - this.pullbs.Interval = 1; - this.pullbs.Tick += new System.EventHandler(this.pullbs_Tick); - // - // pullbottom - // - this.pullbottom.Interval = 1; - this.pullbottom.Tick += new System.EventHandler(this.pullbottom_Tick); - // - // pullside - // - this.pullside.Interval = 1; - this.pullside.Tick += new System.EventHandler(this.pullside_Tick); - // - // WindowBorder - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.pgcontents); - this.Controls.Add(this.pgbottom); - this.Controls.Add(this.pgright); - this.Controls.Add(this.pgleft); - this.Controls.Add(this.titlebar); - this.Name = "WindowBorder"; - this.Size = new System.Drawing.Size(547, 375); - this.Load += new System.EventHandler(this.Template_Load); - this.pgleft.ResumeLayout(false); - this.pgright.ResumeLayout(false); - this.titlebar.ResumeLayout(false); - this.titlebar.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pnlicon)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgleft; - internal System.Windows.Forms.Panel pgbottomlcorner; - internal System.Windows.Forms.Panel pgright; - internal System.Windows.Forms.Panel pgbottomrcorner; - internal System.Windows.Forms.Panel titlebar; - internal System.Windows.Forms.Panel pgtoplcorner; - internal System.Windows.Forms.Panel pgtoprcorner; - internal System.Windows.Forms.Panel pgbottom; - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Label lbtitletext; - internal System.Windows.Forms.Panel closebutton; - internal System.Windows.Forms.Panel rollupbutton; - internal System.Windows.Forms.PictureBox pnlicon; - internal System.Windows.Forms.Panel minimizebutton; - internal System.Windows.Forms.Timer pullbs; - internal System.Windows.Forms.Timer pullbottom; - internal System.Windows.Forms.Timer pullside; - - } -} diff --git a/source/WindowsFormsApplication1/WindowBorder.cs b/source/WindowsFormsApplication1/WindowBorder.cs deleted file mode 100644 index 751cb43..0000000 --- a/source/WindowsFormsApplication1/WindowBorder.cs +++ /dev/null @@ -1,668 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class WindowBorder : UserControl - { - public Timer updater = new Timer(); - - public WindowBorder(string aname, Image aicon) - { - AppName = aname; - AppIcon = aicon; - InitializeComponent(); - } - - public Image AppIcon = null; - public string AppName = null; - - public void HideAll() - { - titlebar.Hide(); - pgleft.Hide(); - pgright.Hide(); - pgbottom.Hide(); - } - - #region "Template Code" - public int rolldownsize; - public int oldbordersize; - public int oldtitlebarheight; - public bool justopened = false; - public bool needtorollback = false; - //replace with minimum size - public int minimumsizewidth = 0; - //replace with minimum size - public int minimumsizeheight = 0; - - // ERROR: Handles clauses are not supported in C# - private void Template_Load(object sender, EventArgs e) - { - setupall(); - if (ParentForm.Name == "Terminal" && API.Upgrades["windowedterminal"] == false) - { - HideAll(); - } - string x = ParentForm.Width.ToString(); - string y = ParentForm.Height.ToString(); - ParentForm.MinimumSize = new Size(Convert.ToInt16(x), Convert.ToInt16(y)); - string mx = ParentForm.MinimumSize.Width.ToString(); - string my = ParentForm.MinimumSize.Height.ToString(); - Form frm = ParentForm; - pbtn = new PanelButton(AppName, AppIcon, ref frm); - API.PanelButtons.Add(pbtn); - if (API.CurrentSession != null) - { - API.CurrentSession.SetupPanelButtons(); - } - ParentForm.FormClosing += new FormClosingEventHandler(this.Clock_FormClosing); - var vtimer = new Timer(); - vtimer.Interval = 1000; - vtimer.Tick += (object s, EventArgs a) => - { - try { - if (API.Upgrades["titlebar"] == true) - { - titlebar.Show(); - } - else { - titlebar.Hide(); - } - - } - catch(Exception ex) - { - API.LogException(ex.Message, false); - } - if (Viruses.InfectedWith("windowmicrofier")) - { - if (this.Width > 0) - { - this.ParentForm.MinimumSize = new Size(0, 0); - this.ParentForm.Width -= 1; - } - if (this.Height > 0) - { - this.ParentForm.Height -= 1; - } - } - try { - if (this.ParentForm.TopMost == API.CurrentSession.UnityEnabled) - { - this.ParentForm.TopMost = !this.ParentForm.TopMost; - } - } - catch - { - //FAIL. - } - }; - vtimer.Start(); - //try { - ParentForm.Name = AppName.ToLower().Replace(" ", "_"); - /*} - catch(Exception ex) - { - ParentForm.Name = "null"; - }*/ - ParentForm.Tag = ParentForm.Location; - WindowComposition.WindowsEverywhere(this.ParentForm); - } - - private PanelButton pbtn = null; - - public void setupall() - { - setuptitlebar(); - setupborders(); - setskin(); - - } - - - - private void titlebar_MouseDown(object sender, MouseEventArgs e) - { - // Handle Draggable Windows - if (API.Upgrades["draggablewindows"] == true) - { - if (e.Button == MouseButtons.Left) - { - WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true); - LastMouseX = e.X; - LastMouseY = e.Y; - Resizing = true; - } - //ShiftOSDesktop.log = //ShiftOSDesktop.log + My.Computer.Clock.LocalTime + " User dragged " + this.Name + " to " + this.Location.ToString + Environment.NewLine; - } - } - - private bool Resizing = false; - private int LastMouseX = 0; - private int LastMouseY = 0; - - private void titlebar_MouseMove(object sender, MouseEventArgs e) - { - if(Resizing == true) - { - int left = 0; - int top = 0; - if (e.X < LastMouseX) - { - left = -1; - } - else if (e.X > LastMouseX) - { - left = 1; - } - if (e.Y < LastMouseY) - { - top = -1; - } - else if (e.Y > LastMouseY) - { - top = 1; - } - if (API.CurrentSkin.DragAnimation == WindowDragEffect.Shake) - { - WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true, left, top); - } - else { - - ParentForm.Left += left; - ParentForm.Top += top; - ParentForm.Tag = ParentForm.Location; - } - } - if(Viruses.InfectedWith("windowspazzer")) - { - int left = 0; - int top = 0; - if (e.X < LastMouseX) - { - left = -1; - } - else if (e.X > LastMouseX) - { - left = 1; - } - if (e.Y < LastMouseY) - { - top = -1; - } - else if (e.Y > LastMouseY) - { - top = 1; - } - WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, true, left, top); - - } - } - - private void titlebar_MouseUp(object s, MouseEventArgs e) - { - WindowComposition.AnimateDragWindow(this.ParentForm, API.CurrentSkin.DragAnimation, false); - - Resizing = false; - } - - public void setupborders() - { - if (API.Upgrades["windowborders"] == false) - { - pgleft.Hide(); - pgbottom.Hide(); - pgright.Hide(); - this.Size = new Size(this.Width - pgleft.Width - pgright.Width, this.Height - pgbottom.Height); - } - } - - private void closebutton_Click(object sender, EventArgs e) - { - this.ParentForm.Close(); - } - - private void closebutton_MouseEnter(object sender, EventArgs e) - { - closebutton.BackgroundImage = API.CurrentSkinImages.closebtnhover; - } - - private void closebutton_MouseLeave(object sender, EventArgs e) - { - closebutton.BackgroundImage = API.CurrentSkinImages.closebtn; - } - - private void closebutton_MouseDown(object sender, EventArgs e) - { - closebutton.BackgroundImage = API.CurrentSkinImages.closebtnclick; - } - - public Point OldLoc = new Point(0, 0); - public bool Minimized = false; - - private void minimizebutton_Click(object sender, EventArgs e) - { - API.MinimizeForm(ParentForm); - } - - private void rollupbutton_Click(object sender, EventArgs e) - { - rollupanddown(); - } - - private void rollupbutton_MouseEnter(object sender, EventArgs e) - { - rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtnhover; - } - - private void rollupbutton_MouseLeave(object sender, EventArgs e) - { - rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtn; - } - - private void rollupbutton_MouseDown(object sender, EventArgs e) - { - rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtnclick; - } - - public void setuptitlebar() - { - setupborders(); - - if (this.Height == this.titlebar.Height) { pgleft.Show(); pgbottom.Show(); pgright.Show(); this.Height = rolldownsize; needtorollback = true; } - pgleft.Width = API.CurrentSkin.borderwidth; - pgright.Width = API.CurrentSkin.borderwidth; - pgbottom.Height = API.CurrentSkin.borderwidth; - titlebar.Height = API.CurrentSkin.titlebarheight; - - if (justopened == true) - { - this.Size = new Size(420, 510); - //put the default size of your window here - this.Size = new Size(this.Width, this.Height + API.CurrentSkin.titlebarheight - 30); - this.Size = new Size(this.Width + API.CurrentSkin.borderwidth + API.CurrentSkin.borderwidth, this.Height + API.CurrentSkin.borderwidth); - oldbordersize = API.CurrentSkin.borderwidth; - oldtitlebarheight = API.CurrentSkin.titlebarheight; - justopened = false; - } - else { - if (this.Visible == true) - { - this.Size = new Size(this.Width - (2 * oldbordersize) + (2 * API.CurrentSkin.borderwidth), (this.Height - oldtitlebarheight - oldbordersize) + API.CurrentSkin.titlebarheight + API.CurrentSkin.borderwidth); - oldbordersize = API.CurrentSkin.borderwidth; - oldtitlebarheight = API.CurrentSkin.titlebarheight; - rolldownsize = this.Height; - if (needtorollback == true) { this.Height = titlebar.Height; pgleft.Hide(); pgbottom.Hide(); pgright.Hide(); } - } - } - - if (API.CurrentSkin.enablecorners == true) - { - pgtoplcorner.Show(); - pgtoprcorner.Show(); - pgtoprcorner.Width = API.CurrentSkin.titlebarcornerwidth; - pgtoplcorner.Width = API.CurrentSkin.titlebarcornerwidth; - } - else { - pgtoplcorner.Hide(); - pgtoprcorner.Hide(); - } - - if (API.Upgrades["titlebar"] == false) - { - titlebar.Hide(); - this.Size = new Size(this.Width, this.Size.Height - titlebar.Height); - } - - if (API.Upgrades["titletext"] == false) - { - lbtitletext.Hide(); - } - else { - lbtitletext.Font = new Font(API.CurrentSkin.titletextfontfamily, API.CurrentSkin.titletextfontsize, API.CurrentSkin.titletextfontstyle, GraphicsUnit.Point); - lbtitletext.Text = this.AppName; - //Remember to change to name of program!!!! - lbtitletext.Show(); - } - - if (API.Upgrades["closebutton"] == false) - { - closebutton.Hide(); - } - else { - closebutton.BackColor = API.CurrentSkin.closebtncolour; - closebutton.Size = API.CurrentSkin.closebtnsize; - closebutton.Show(); - } - - if (API.Upgrades["rollupbutton"] == false) - { - rollupbutton.Hide(); - } - else { - rollupbutton.BackColor = API.CurrentSkin.rollbtncolour; - rollupbutton.Size = API.CurrentSkin.rollbtnsize; - rollupbutton.Show(); - } - - if (API.Upgrades["minimizebutton"] == false) - { - minimizebutton.Hide(); - } - else { - minimizebutton.BackColor = API.CurrentSkin.minbtncolour; - minimizebutton.Size = API.CurrentSkin.minbtnsize; - minimizebutton.Show(); - } - - if (API.Upgrades["windowborders"] == true) - { - closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); - rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); - minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); - switch (API.CurrentSkin.titletextpos) - { - case "Left": - lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside, API.CurrentSkin.titletextfromtop); - break; - case "Centre": - lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); - break; - } - lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; - } - else { - closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); - rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); - minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); - switch (API.CurrentSkin.titletextpos) - { - case "Left": - lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside + pgtoplcorner.Width, API.CurrentSkin.titletextfromtop); - break; - case "Centre": - lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); - break; - } - lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; - } - - //Change when Icon skinning complete - // Change to program's icon - if (API.Upgrades["appicons"] == true) - { - pnlicon.Visible = true; - pnlicon.Location = new Point(API.CurrentSkin.titleiconfromside, API.CurrentSkin.titleiconfromtop); - pnlicon.Size = new Size(API.CurrentSkin.titlebariconsize, API.CurrentSkin.titlebariconsize); - pnlicon.Image = this.AppIcon; - //Replace with the correct icon for the program. - } - - } - - public void rollupanddown() - { - API.RollForm(this.ParentForm); - } - - public void resettitlebar() - { - if (API.Upgrades["windowborders"] == true) - { - closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); - rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); - minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); - switch (API.CurrentSkin.titletextpos) - { - case "Left": - lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside, API.CurrentSkin.titletextfromtop); - break; - case "Centre": - lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); - break; - } - lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; - } - else { - closebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.closebtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, API.CurrentSkin.closebtnfromtop); - rollupbutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.rollbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, API.CurrentSkin.rollbtnfromtop); - minimizebutton.Location = new Point(titlebar.Size.Width - API.CurrentSkin.minbtnfromside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, API.CurrentSkin.minbtnfromtop); - switch (API.CurrentSkin.titletextpos) - { - case "Left": - lbtitletext.Location = new Point(API.CurrentSkin.titletextfromside + pgtoplcorner.Width, API.CurrentSkin.titletextfromtop); - break; - case "Centre": - lbtitletext.Location = new Point((titlebar.Width / 2) - lbtitletext.Width / 2, API.CurrentSkin.titletextfromtop); - break; - } - lbtitletext.ForeColor = API.CurrentSkin.titletextcolour; - } - } - - // ERROR: Handles clauses are not supported in C# - private void pullside_Tick(System.Object sender, System.EventArgs e) - { - this.ParentForm.Width = Cursor.Position.X - this.ParentForm.Location.X; - resettitlebar(); - } - - // ERROR: Handles clauses are not supported in C# - private void pullbottom_Tick(System.Object sender, System.EventArgs e) - { - this.ParentForm.Height = Cursor.Position.Y - this.ParentForm.Location.Y; - resettitlebar(); - } - - // ERROR: Handles clauses are not supported in C# - private void pullbs_Tick(object sender, System.EventArgs e) - { - this.ParentForm.Width = Cursor.Position.X - this.ParentForm.Location.X; - this.ParentForm.Height = Cursor.Position.Y - this.ParentForm.Location.Y; - resettitlebar(); - } - - //delete this for non-resizable windows - // ERROR: Handles clauses are not supported in C# - private void Rightpull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullside.Start(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void RightCursorOn_MouseDown(object sender, System.EventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - Cursor = Cursors.SizeWE; - } - } - - // ERROR: Handles clauses are not supported in C# - private void bottomCursorOn_MouseDown(object sender, System.EventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - Cursor = Cursors.SizeNS; - } - } - - // ERROR: Handles clauses are not supported in C# - private void CornerCursorOn_MouseDown(object sender, System.EventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - Cursor = Cursors.SizeNWSE; - } - } - - // ERROR: Handles clauses are not supported in C# - private void SizeCursoroff_MouseDown(object sender, System.EventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - Cursor = Cursors.Default; - } - } - - // ERROR: Handles clauses are not supported in C# - private void rightpull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullside.Stop(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void bottompull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullbottom.Start(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void bottompull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullbottom.Stop(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void bspull_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullbs.Start(); - } - } - - // ERROR: Handles clauses are not supported in C# - private void bspull_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) - { - if (API.Upgrades["resizablewindows"] == true) - { - pullbs.Stop(); - } - } - - public void setskin() - { - //disposals - closebutton.BackgroundImage = null; - titlebar.BackgroundImage = null; - rollupbutton.BackgroundImage = null; - pgtoplcorner.BackgroundImage = null; - pgtoprcorner.BackgroundImage = null; - minimizebutton.BackgroundImage = null; - //apply new skin - if (API.CurrentSkinImages.closebtn == null) - closebutton.BackColor = API.CurrentSkin.closebtncolour; - else - closebutton.BackgroundImage = API.CurrentSkinImages.closebtn; - closebutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.closebtnlayout; - if (API.CurrentSkinImages.titlebar == null) - titlebar.BackColor = API.CurrentSkin.titlebarcolour; - else - titlebar.BackgroundImage = API.CurrentSkinImages.titlebar; - titlebar.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.titlebarlayout; - if (API.CurrentSkinImages.rollbtn == null) - rollupbutton.BackColor = API.CurrentSkin.rollbtncolour; - else - rollupbutton.BackgroundImage = API.CurrentSkinImages.rollbtn; - rollupbutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.rollbtnlayout; - if (API.CurrentSkinImages.leftcorner == null) - pgtoplcorner.BackColor = API.CurrentSkin.leftcornercolour; - else - pgtoplcorner.BackgroundImage = API.CurrentSkinImages.leftcorner; - pgtoplcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.leftcornerlayout; - if (API.CurrentSkinImages.rightcorner == null) - pgtoprcorner.BackColor = API.CurrentSkin.rightcornercolour; - else - pgtoprcorner.BackgroundImage = API.CurrentSkinImages.rightcorner; - pgtoprcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.rightcornerlayout; - if (API.CurrentSkinImages.minbtn == null) - minimizebutton.BackColor = API.CurrentSkin.minbtncolour; - else - minimizebutton.BackgroundImage = API.CurrentSkinImages.minbtn; - minimizebutton.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.minbtnlayout; - if (API.CurrentSkinImages.borderleft == null) - pgleft.BackColor = API.CurrentSkin.borderleftcolour; - else - pgleft.BackgroundImage = API.CurrentSkinImages.borderleft; - pgleft.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderleftlayout; - if (API.CurrentSkinImages.borderright == null) - pgright.BackColor = API.CurrentSkin.borderrightcolour; - else - pgright.BackgroundImage = API.CurrentSkinImages.borderright; - pgleft.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderrightlayout; - if (API.CurrentSkinImages.borderbottom == null) - pgbottom.BackColor = API.CurrentSkin.borderbottomcolour; - else - pgbottom.BackgroundImage = API.CurrentSkinImages.borderbottom; - pgbottom.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderbottomlayout; - if (API.CurrentSkin.enablebordercorners == true) - { - if (API.CurrentSkinImages.bottomleftcorner == null) - pgbottomlcorner.BackColor = API.CurrentSkin.bottomleftcornercolour; - else - pgbottomlcorner.BackgroundImage = API.CurrentSkinImages.bottomleftcorner; - pgbottomlcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomleftcornerlayout; - if (API.CurrentSkinImages.bottomrightcorner == null) - pgbottomrcorner.BackColor = API.CurrentSkin.bottomrightcornercolour; - else - pgbottomrcorner.BackgroundImage = API.CurrentSkinImages.bottomrightcorner; - pgbottomrcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomrightcornerlayout; - } - else { - pgbottomlcorner.BackColor = API.CurrentSkin.borderrightcolour; - pgbottomrcorner.BackColor = API.CurrentSkin.borderrightcolour; - pgbottomlcorner.BackgroundImage = null; - pgbottomrcorner.BackgroundImage = null; - } - - //set bottom border corner size - pgbottomlcorner.Size = new Size(API.CurrentSkin.borderwidth, API.CurrentSkin.borderwidth); - pgbottomrcorner.Size = new Size(API.CurrentSkin.borderwidth, API.CurrentSkin.borderwidth); - pgbottomlcorner.Location = new Point(0, this.Height - API.CurrentSkin.borderwidth); - pgbottomrcorner.Location = new Point(this.Width, this.Height - API.CurrentSkin.borderwidth); - - //I don't know if this already happens... - pgright.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.borderrightlayout; - pgbottomrcorner.BackgroundImage = API.CurrentSkinImages.bottomrightcorner; - pgbottomlcorner.BackgroundImage = API.CurrentSkinImages.bottomleftcorner; - pgbottomrcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomrightcornerlayout; - pgbottomlcorner.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.bottomleftcornerlayout; - - - } - - // ERROR: Handles clauses are not supported in C# - private void Clock_FormClosing(object sender, FormClosingEventArgs e) - { - if (WindowComposition.ShuttingDown == false) - { - e.Cancel = true; - WindowComposition.CloseForm(this.ParentForm, pbtn, API.CurrentSkin.WindowCloseAnimation); - } - } - } - #endregion - -} - diff --git a/source/WindowsFormsApplication1/WindowBorder.resx b/source/WindowsFormsApplication1/WindowBorder.resx deleted file mode 100644 index 8bf59aa..0000000 --- a/source/WindowsFormsApplication1/WindowBorder.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 101, 17 - - - 214, 17 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/WindowComposition.cs b/source/WindowsFormsApplication1/WindowComposition.cs deleted file mode 100644 index 18fe2d1..0000000 --- a/source/WindowsFormsApplication1/WindowComposition.cs +++ /dev/null @@ -1,390 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public class WindowComposition - { - private static bool _CanClose = true; - public static bool ShuttingDown = false; - public static bool SafeToAddControls = true; - - public static bool CanClose - { - get - { - return _CanClose; - } - } - - public static void WindowsEverywhere(Form formToInfect) - { - var t = new Timer(); - t.Interval = 100; - int yvel = 1; - int xvel = 1; - t.Tick += (object s, EventArgs a) => - { - if (Viruses.InfectedWith("windowseverywhere")) - { - formToInfect.Left += xvel * 10; - formToInfect.Top += yvel * 10; - - if (formToInfect.Top >= API.CurrentSession.Height - formToInfect.Height) - { - yvel = -1; - } - if (formToInfect.Top <= 0) - { - yvel = 1; - } - if (formToInfect.Left >= API.CurrentSession.Width - formToInfect.Width) - { - xvel = -1; - } - if (formToInfect.Left <= 0) - { - xvel = 1; - } - } - }; - t.Start(); - } - - public static void ScaleWidget(Control ctrl, int width, int height) - { - ctrl.Size = new Size(0, 0); - var t = new Timer(); - t.Interval = 25; - t.Tick += (object s, EventArgs a) => - { - if(ctrl.Width <= width) - { - - } - }; - } - - public static void ShowForm(Form formToShow, WindowAnimationStyle style) - { - var t = new Timer(); - switch(style) - { - case WindowAnimationStyle.Fade: - var bw = new BackgroundWorker(); - bw.DoWork += (object se, DoWorkEventArgs ea) => - { - //The form's handle has not been created so we just invoke - //the action on the desktop thread. - API.CurrentSession.Invoke(new Action(() => - { - try { - formToShow.Opacity = 0; - formToShow.Show(); - formToShow.Left = (Screen.PrimaryScreen.Bounds.Width - formToShow.Width) / 2; - formToShow.Top = (Screen.PrimaryScreen.Bounds.Height - formToShow.Height) / 2; - } - catch - { - - } - })); - t.Interval = API.CurrentSkin.WindowFadeTime; - t.Tick += (object s, EventArgs a) => - { - if (API.Upgrades["fancyeffects"] == true) - { - API.CurrentSession.Invoke(new Action(() => - { - - if (formToShow.Opacity < 1) - { - formToShow.Opacity += Convert.ToDouble(API.CurrentSkin.WindowFadeSpeed); - formToShow.Refresh(); - - } - else - { - t.Stop(); - } - })); - } - else - { - API.CurrentSession.Invoke(new Action(() => - { - formToShow.Opacity = 1; - })); - } - }; - API.CurrentSession.Invoke(new Action(() => - { - t.Start(); - })); - }; - bw.RunWorkerAsync(); - break; - default: - var bwork = new BackgroundWorker(); - bwork.DoWork += (object s, DoWorkEventArgs a) => - { - API.CurrentSession.Invoke(new Action(() => - { - formToShow.Show(); - formToShow.Left = (Screen.PrimaryScreen.Bounds.Width - formToShow.Width) / 2; - formToShow.Top = (Screen.PrimaryScreen.Bounds.Height - formToShow.Height) / 2; - - formToShow.Show(); - })); - - }; - bwork.RunWorkerAsync(); - break; - - } - } - - public static void CloseForm(Form formToClose, PanelButton pbtn, WindowAnimationStyle style) - { - var t = new Timer(); - switch(style) - { - case WindowAnimationStyle.Fade: - _CanClose = false; - t.Interval = API.CurrentSkin.WindowFadeTime; - t.Tick += (object s, EventArgs a) => - { - if (API.Upgrades["fancyeffects"] == true) - { - try - { - - if (formToClose.Opacity > 0) - { - formToClose.Invoke(new Action(() => - { - formToClose.Opacity -= Convert.ToDouble(API.CurrentSkin.WindowFadeSpeed); - formToClose.Refresh(); - })); - } - else - { - API.PanelButtons.Remove(pbtn); - API.CurrentSession.SetupPanelButtons(); - API.UpdateWindows(); - formToClose.Dispose(); - t.Stop(); - } - } - catch - { - formToClose = null; - } - } - else - { - API.PanelButtons.Remove(pbtn); - API.CurrentSession.SetupPanelButtons(); - API.UpdateWindows(); - formToClose.Dispose(); - t.Stop(); - - } - }; - t.Start(); - break; - case WindowAnimationStyle.Zoom: - _CanClose = false; - t.Interval = 1; - int w = formToClose.Width; - int h = formToClose.Height; - int maxw = w / 2; - int maxh = h / 2; - t.Tick += (object s, EventArgs a) => - { - if (API.Upgrades["fancyeffects"] == true) - { - formToClose.MinimumSize = new Size(maxw, maxh); - formToClose.Opacity -= 0.1; - formToClose.Left += 50; - formToClose.Top += 50; - - formToClose.Width -= 50; - formToClose.Height -= 50; - if (formToClose.Size == formToClose.MinimumSize) - { - API.PanelButtons.Remove(pbtn); - API.CurrentSession.SetupPanelButtons(); - API.UpdateWindows(); - formToClose.Dispose(); - t.Stop(); - } - } - else - { - API.PanelButtons.Remove(pbtn); - API.CurrentSession.SetupPanelButtons(); - API.UpdateWindows(); - formToClose.Dispose(); - t.Stop(); - - } - }; - t.Start(); - break; - case WindowAnimationStyle.ToAppLauncher: - _CanClose = false; - t.Interval = 1; - int w2 = formToClose.Width; - int h2 = formToClose.Height; - int maxw2 = w2 / 2; - int maxh2 = h2 / 2; - t.Tick += (object s, EventArgs a) => - { - formToClose.MinimumSize = new Size(maxw2, maxh2); - formToClose.Opacity -= 0.1; - if (API.Upgrades["fancyeffects"] == true) - { - switch (API.CurrentSkin.desktoppanelposition) - { - case "Bottom": - formToClose.Left += 50; - formToClose.Top += 50; - break; - case "Top": - formToClose.Left -= 50; - formToClose.Top -= 50; - break; - - } - - formToClose.Width -= 50; - formToClose.Height -= 50; - if (formToClose.Size == formToClose.MinimumSize) - { - API.PanelButtons.Remove(pbtn); - API.CurrentSession.SetupPanelButtons(); - API.UpdateWindows(); - formToClose.Dispose(); - t.Stop(); - } - } - else - { - API.PanelButtons.Remove(pbtn); - API.CurrentSession.SetupPanelButtons(); - API.UpdateWindows(); - formToClose.Dispose(); - t.Stop(); - - } - }; - t.Start(); - break; - default: - API.PanelButtons.Remove(pbtn); - API.CurrentSession.SetupPanelButtons(); - API.UpdateWindows(); - formToClose.Dispose(); - //Room for more animations, but just close the form if none is selected. - break; - } - } - - public static void AnimateDragWindow(Form form, WindowDragEffect effect, bool Dragging) - { - var t = new Timer(); - switch(effect) - { - case WindowDragEffect.Fade: - t.Interval = API.CurrentSkin.DragFadeInterval; - t.Tick += (object s, EventArgs a) => - { - if (API.Upgrades["fancyeffects"] == true) - { - if (Dragging == true) - { - if (form.Opacity >= API.CurrentSkin.DragFadeLevel) - { - form.Opacity -= API.CurrentSkin.DragFadeSpeed; - } - else - { - t.Stop(); - } - } - else - { - if (form.Opacity < 1) - { - form.Opacity += API.CurrentSkin.DragFadeSpeed; - } - else - { - t.Stop(); - } - } - } - }; - t.Start(); - break; - - } - } - - public static void AnimateDragWindow(Form form, WindowDragEffect effect, bool Dragging, int MouseX, int MouseY) - { - var t = new Timer(); - switch(effect) - { - - case WindowDragEffect.Shake: - Shake(form, MouseX, MouseY); - break; - } - } - - //Copyright - Adonis S. Deliannis - public static void Shake(Form form, int mouseX, int mouseY) - { - Point mouse = form.PointToScreen(new Point(mouseX, mouseY)); - int xDist = mouse.X - form.Location.X; - int yDist = mouse.Y - form. Location.Y; - int X = xDist; - int Y = yDist; - Random r = new Random(); - int JiggleCount = 0; - int Z = 15; - - while (JiggleCount < 1000) - { - form.Location = new Point(r.Next(X - Z, X + Z), r.Next(Y - Z, Y + Z)); - JiggleCount++; - } - - JiggleCount = 0; - form.Location = new Point(X, Y); - } - } - - public enum WindowAnimationStyle - { - Fade, - Default, - Zoom, - ToAppLauncher - } - - public enum WindowDragEffect - { - Fade, - Default, - Shake - } -} diff --git a/source/WindowsFormsApplication1/infobox.Designer.cs b/source/WindowsFormsApplication1/infobox.Designer.cs deleted file mode 100644 index 1472a09..0000000 --- a/source/WindowsFormsApplication1/infobox.Designer.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; - -namespace ShiftOS -{ - partial class infobox - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - private void InitializeComponent() - { - this.pgcontents = new System.Windows.Forms.Panel(); - this.txtuserinput = new System.Windows.Forms.TextBox(); - this.btnok = new System.Windows.Forms.Button(); - this.txtmessage = new System.Windows.Forms.Label(); - this.pboximage = new System.Windows.Forms.PictureBox(); - this.lblintructtext = new System.Windows.Forms.Label(); - this.pnlyesno = new System.Windows.Forms.Panel(); - this.btnno = new System.Windows.Forms.Button(); - this.btnyes = new System.Windows.Forms.Button(); - this.pgcontents.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pboximage)).BeginInit(); - this.pnlyesno.SuspendLayout(); - this.SuspendLayout(); - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.txtuserinput); - this.pgcontents.Controls.Add(this.btnok); - this.pgcontents.Controls.Add(this.txtmessage); - this.pgcontents.Controls.Add(this.pboximage); - this.pgcontents.Controls.Add(this.lblintructtext); - this.pgcontents.Controls.Add(this.pnlyesno); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(371, 154); - this.pgcontents.TabIndex = 20; - // - // txtuserinput - // - this.txtuserinput.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.txtuserinput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtuserinput.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtuserinput.Location = new System.Drawing.Point(103, 86); - this.txtuserinput.Multiline = true; - this.txtuserinput.Name = "txtuserinput"; - this.txtuserinput.Size = new System.Drawing.Size(256, 23); - this.txtuserinput.TabIndex = 8; - this.txtuserinput.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtuserinput.Visible = false; - // - // btnok - // - this.btnok.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnok.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnok.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnok.ForeColor = System.Drawing.Color.Black; - this.btnok.Location = new System.Drawing.Point(134, 118); - this.btnok.Name = "btnok"; - this.btnok.Size = new System.Drawing.Size(109, 30); - this.btnok.TabIndex = 7; - this.btnok.TabStop = false; - this.btnok.Text = "Ok"; - this.btnok.UseVisualStyleBackColor = true; - this.btnok.Click += new System.EventHandler(this.btnok_Click); - // - // txtmessage - // - this.txtmessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtmessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtmessage.Location = new System.Drawing.Point(102, 7); - this.txtmessage.Name = "txtmessage"; - this.txtmessage.Size = new System.Drawing.Size(266, 102); - this.txtmessage.TabIndex = 2; - this.txtmessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // pboximage - // - this.pboximage.Image = global::ShiftOS.Properties.Resources.Symbolinfo1; - this.pboximage.Location = new System.Drawing.Point(12, 7); - this.pboximage.Name = "pboximage"; - this.pboximage.Size = new System.Drawing.Size(80, 70); - this.pboximage.TabIndex = 0; - this.pboximage.TabStop = false; - // - // lblintructtext - // - this.lblintructtext.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblintructtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.lblintructtext.Location = new System.Drawing.Point(105, 7); - this.lblintructtext.Name = "lblintructtext"; - this.lblintructtext.Size = new System.Drawing.Size(256, 76); - this.lblintructtext.TabIndex = 9; - this.lblintructtext.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.lblintructtext.Visible = false; - // - // pnlyesno - // - this.pnlyesno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlyesno.Controls.Add(this.btnno); - this.pnlyesno.Controls.Add(this.btnyes); - this.pnlyesno.Location = new System.Drawing.Point(57, 115); - this.pnlyesno.Name = "pnlyesno"; - this.pnlyesno.Size = new System.Drawing.Size(269, 33); - this.pnlyesno.TabIndex = 10; - this.pnlyesno.Visible = false; - // - // btnno - // - this.btnno.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnno.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnno.ForeColor = System.Drawing.Color.Black; - this.btnno.Location = new System.Drawing.Point(142, 2); - this.btnno.Name = "btnno"; - this.btnno.Size = new System.Drawing.Size(105, 30); - this.btnno.TabIndex = 9; - this.btnno.TabStop = false; - this.btnno.Text = "No"; - this.btnno.UseVisualStyleBackColor = true; - this.btnno.Click += new System.EventHandler(this.btnno_Click); - // - // btnyes - // - this.btnyes.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnyes.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnyes.ForeColor = System.Drawing.Color.Black; - this.btnyes.Location = new System.Drawing.Point(29, 2); - this.btnyes.Name = "btnyes"; - this.btnyes.Size = new System.Drawing.Size(105, 30); - this.btnyes.TabIndex = 8; - this.btnyes.TabStop = false; - this.btnyes.Text = "Yes"; - this.btnyes.UseVisualStyleBackColor = true; - this.btnyes.Click += new System.EventHandler(this.btnyes_Click); - // - // infobox - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(371, 154); - this.Controls.Add(this.pgcontents); - this.DoubleBuffered = true; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.KeyPreview = true; - this.Name = "infobox"; - this.Text = "infobox"; - this.TopMost = true; - this.Load += new System.EventHandler(this.infobox_Load); - this.pgcontents.ResumeLayout(false); - this.pgcontents.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pboximage)).EndInit(); - this.pnlyesno.ResumeLayout(false); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.Panel pgcontents; - internal System.Windows.Forms.Button btnok; - internal System.Windows.Forms.Label txtmessage; - internal System.Windows.Forms.PictureBox pboximage; - internal System.Windows.Forms.Label lblintructtext; - internal System.Windows.Forms.TextBox txtuserinput; - internal System.Windows.Forms.Panel pnlyesno; - internal System.Windows.Forms.Button btnno; - internal System.Windows.Forms.Button btnyes; - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/infobox.cs b/source/WindowsFormsApplication1/infobox.cs deleted file mode 100644 index 2f706d2..0000000 --- a/source/WindowsFormsApplication1/infobox.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS -{ - public partial class infobox : Form - { - /// - /// Creates a new Infobox instance. - /// - /// Message to display. - /// UI mode. - public infobox(string Message, InfoboxMode mode) - { - InitializeComponent(); - - message = Message; - displayMode = mode; - } - - public string Result = "Cancelled"; - public enum InfoboxMode - { - YesNo, - TextEntry, - Info, - } - public InfoboxMode displayMode = InfoboxMode.Info; - private string message = "This is an infobox."; - public string TextEntry - { - get - { - return txtuserinput.Text; - } - } - - - - - - private void btnyes_Click(object sender, EventArgs e) - { - Result = "Yes"; - this.Close(); - } - - private void btnno_Click(object sender, EventArgs e) - { - Result = "No"; - this.Close(); - } - - private void btnok_Click(object sender, EventArgs e) - { - Result = "OK"; - this.Close(); - } - - private void infobox_Load(object sender, EventArgs e) - { - - switch(displayMode) - { - case InfoboxMode.Info: - txtmessage.Show(); - txtmessage.BringToFront(); - txtmessage.Text = message; - this.pnlyesno.Hide(); - this.txtuserinput.Hide(); - break; - case InfoboxMode.YesNo: - txtmessage.Show(); - txtmessage.BringToFront(); - txtmessage.Text = message; - this.pnlyesno.Show(); - this.pnlyesno.BringToFront(); - this.txtuserinput.Hide(); - break; - case InfoboxMode.TextEntry: - txtmessage.Hide(); - lblintructtext.Show(); - lblintructtext.BringToFront(); - lblintructtext.Text = message; - this.pnlyesno.Hide(); - this.txtuserinput.Show(); - this.txtuserinput.BringToFront(); - break; - } - txtuserinput.KeyDown += (object s, KeyEventArgs a) => - { - if (a.KeyCode == Keys.Enter) - { - a.SuppressKeyPress = true; - btnok_Click(s, (EventArgs)a); - } - }; - if (API.InfoboxesPlaySounds) - { - API.PlaySound(Properties.Resources.infobox); - } - } - - - } -} diff --git a/source/WindowsFormsApplication1/infobox.resx b/source/WindowsFormsApplication1/infobox.resx deleted file mode 100644 index 1af7de1..0000000 --- a/source/WindowsFormsApplication1/infobox.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/WindowsFormsApplication1/skins.cs b/source/WindowsFormsApplication1/skins.cs deleted file mode 100644 index 206646f..0000000 --- a/source/WindowsFormsApplication1/skins.cs +++ /dev/null @@ -1,840 +0,0 @@ -using System.IO; -using System.Drawing; -using Newtonsoft.Json; -using System; -using ShiftOS; -using System.IO.Compression; -using System.Windows.Forms; -using System.Collections.Generic; -using System.Drawing.Imaging; - -namespace Skinning -{ - public class Skin { - //Widget Positions - public string ALPosition = "Top"; - public string PanelButtonPosition = "Top"; - public string ClockPosition = "Top"; - - //WINDOW SETTINGS/IMAGES - //images - public int titlebarlayout = 3; - public int borderleftlayout = 3; - public int borderrightlayout = 3; - public int borderbottomlayout = 3; - public int closebtnlayout = 3; - public int rollbtnlayout = 3; - public int minbtnlayout = 3; - public int rightcornerlayout = 3; - public int leftcornerlayout = 3; - // Late entry: need to fix window code to include this - public int bottomleftcornerlayout = 3; - public int bottomrightcornerlayout = 3; - public Color bottomleftcornercolour = Color.Gray; - - public Color bottomrightcornercolour = Color.Gray; - - public bool enablebordercorners = false; - // settings - public Size closebtnsize = new Size(22, 22); - public Size rollbtnsize = new Size(22, 22); - public Size minbtnsize = new Size(22, 22); - public int titlebarheight = 30; - public int titlebariconsize = 16; - public int closebtnfromtop = 5; - public int closebtnfromside = 2; - public int rollbtnfromtop = 5; - public int rollbtnfromside = 26; - public int minbtnfromtop = 5; - public int minbtnfromside = 52; - public int borderwidth = 2; - public bool enablecorners = false; - public int titlebarcornerwidth = 5; - public int titleiconfromside = 4; - public int titleiconfromtop = 4; - //colours - public Color titlebarcolour = Color.Gray; - public Color borderleftcolour = Color.Gray; - public Color borderrightcolour = Color.Gray; - public Color borderbottomcolour = Color.Gray; - public Color closebtncolour = Color.Black; - public Color closebtnhovercolour = Color.Black; - public Color closebtnclickcolour = Color.Black; - public Color rollbtncolour = Color.Black; - public Color rollbtnhovercolour = Color.Black; - public Color rollbtnclickcolour = Color.Black; - public Color minbtncolour = Color.Black; - public Color minbtnhovercolour = Color.Black; - public Color minbtnclickcolour = Color.Black; - public Color rightcornercolour = Color.Gray; - public Color leftcornercolour = Color.Gray; - // Text - public string titletextfontfamily = "Microsoft Sans Serif"; - public int titletextfontsize = 10; - public FontStyle titletextfontstyle = FontStyle.Bold; - public string titletextpos = "Left"; - public int titletextfromtop = 3; - public int titletextfromside = 24; - - public Color titletextcolour = Color.White; - //DESKTOP - public Color desktoppanelcolour = Color.Gray; - public Color desktopbackgroundcolour = Color.Black; - public int desktoppanelheight = 24; - public string desktoppanelposition = "Top"; - public Color clocktextcolour = Color.Black; - public Color clockbackgroundcolor = Color.Gray; - public int panelclocktexttop = 3; - public int panelclocktextsize = 10; - public string panelclocktextfont = "Byington"; - public FontStyle panelclocktextstyle = FontStyle.Bold; - public Color applauncherbuttoncolour = Color.Gray; - public Color applauncherbuttonclickedcolour = Color.Gray; - public Color applauncherbackgroundcolour = Color.Gray; - public Color applaunchermouseovercolour = Color.Gray; - public Color applicationsbuttontextcolour = Color.Black; - public int applicationbuttonheight = 24; - public int applicationbuttontextsize = 10; - public string applicationbuttontextfont = "Byington"; - public FontStyle applicationbuttontextstyle = FontStyle.Bold; - public string applicationlaunchername = "Applications"; - public string titletextposition = "Left"; - public int applaunchermenuholderwidth = 100; - public int panelbuttonicontop = 3; - public int panelbuttoniconside = 4; - public int panelbuttoniconsize = 16; - public int panelbuttonheight = 20; - public int panelbuttonwidth = 185; - public Color panelbuttoncolour = Color.Black; - public Color panelbuttontextcolour = Color.White; - public int panelbuttontextsize = 10; - public string panelbuttontextfont = "Byington"; - public FontStyle panelbuttontextstyle = FontStyle.Regular; - public int panelbuttontextside = 16; - public int panelbuttontexttop = 2; - public int panelbuttongap = 4; - public int panelbuttonfromtop = 2; - - public int panelbuttoninitialgap = 8; - public int launcheritemsize = 10; - public string launcheritemfont = "Byington"; - public FontStyle launcheritemstyle = FontStyle.Regular; - - public Color launcheritemcolour = Color.Black; - // Images - public int desktoppanellayout = 3; - public int desktopbackgroundlayout = 3; - public int panelclocklayout = 3; - public int applauncherlayout = 3; - - public int panelbuttonlayout = 3; - - //Locations... - - public int userTextboxX = 171; - public int userTextBoxY = 202; - public int passTextBoxX = 171; - public int passTextBoxY = 243; - public int loginbtnX = 268; - public int loginbtnY = 286; - public int shutdownbtnX = 1755; - - public int shutdownbtnY = 979; - - /* IMAGE PATHS - These tell ShiftOS where skin images are. - */ - - public string applauncherclickpath = null; - public string panelbuttonpath = null; - public string applaunchermouseoverpath = null; - public string applauncherpath = null; - public string panelclockpath = null; - public string desktopbackgroundpath = null; - public string desktoppanelpath = null; - public string minbtnhoverpath = null; - public string minbtnclickpath = null; - public string rightcornerpath = null; - public string titlebarpath = null; - public string borderrightpath = null; - public string borderleftpath = null; - public string borderbottompath = null; - public string closebtnpath = null; - public string closebtnhoverpath = null; - public string closebtnclickpath = null; - public string rollbtnpath = null; - public string rollbtnhoverpath = null; - public string rollbtnclickpath = null; - public string minbtnpath = null; - public string leftcornerpath = null; - public string bottomleftcornerpath = null; - public string bottomrightcornerpath = null; - - //Menu Renderer Colors - public Color Menu_ButtonSelectedHighlight = Color.Black; - public Color Menu_ButtonSelectedHighlightBorder = Color.Black; - public Color Menu_ButtonPressedHighlight = Color.Black; - public Color Menu_ButtonPressedHighlightBorder = Color.Black; - public Color Menu_ButtonCheckedHighlight = Color.White; - public Color Menu_ButtonCheckedHighlightBorder = Color.White; - public Color Menu_ButtonPressedBorder = Color.Black; - public Color Menu_ButtonSelectedBorder = Color.Black; - public Color Menu_ButtonCheckedGradientBegin = Color.White; - public Color Menu_ButtonCheckedGradientMiddle = Color.White; - public Color Menu_ButtonCheckedGradientEnd = Color.White; - public Color Menu_ButtonSelectedGradientBegin = Color.Black; - public Color Menu_ButtonSelectedGradientMiddle = Color.Black; - public Color Menu_ButtonSelectedGradientEnd = Color.Black; - public Color Menu_ButtonPressedGradientBegin = Color.Black; - public Color Menu_ButtonPressedGradientMiddle = Color.Black; - public Color Menu_ButtonPressedGradientEnd = Color.Black; - public Color Menu_CheckBackground = Color.White; - public Color Menu_CheckSelectedBackground = Color.Gray; - public Color Menu_CheckPressedBackground = Color.White; - public Color Menu_ImageMarginGradientBegin = Color.Gray; - public Color Menu_ImageMarginGradientMiddle = Color.Gray; - public Color Menu_ImageMarginGradientEnd = Color.Gray; - public Color Menu_MenuStripGradientBegin = Color.Gray; - public Color Menu_MenuStripGradientEnd = Color.Gray; - public Color Menu_MenuItemSelected = Color.Black; - public Color Menu_MenuItemBorder = Color.Gray; - public Color Menu_MenuBorder = Color.Gray; - public Color Menu_MenuItemSelectedGradientBegin = Color.Black; - public Color Menu_MenuItemSelectedGradientEnd = Color.Black; - public Color Menu_MenuItemPressedGradientBegin = Color.Black; - public Color Menu_MenuItemPressedGradientMiddle = Color.Black; - public Color Menu_MenuItemPressedGradientEnd = Color.Black; - public Color Menu_RaftingContainerGradientBegin = Color.Black; - public Color Menu_RaftingContainerGradientEnd = Color.Gray; - public Color Menu_SeparatorDark = Color.Black; - public Color Menu_SeparatorLight = Color.Black; - public Color Menu_StatusStripGradientBegin = Color.Gray; - public Color Menu_StatusStripGradientEnd = Color.Gray; - public Color Menu_ToolStripBorder = Color.Gray; - public Color Menu_ToolStripDropDownBackground = Color.Gray; - public Color Menu_ToolStripGradientBegin = Color.Gray; - public Color Menu_ToolStripGradientMiddle = Color.Gray; - public Color Menu_ToolStripGradientEnd = Color.Gray; - public Color Menu_ToolStripContentPanelGradientBegin = Color.Gray; - public Color Menu_ToolStripContentPanelGradientEnd = Color.Gray; - public Color Menu_ToolStripPanelGradientBegin = Color.Gray; - public Color Menu_ToolStripPanelGradientEnd = Color.Gray; - public Color Menu_TextColor = Color.White; - - //New - public Color TerminalTextColor = Color.White; - public Color TerminalBackColor = Color.Black; - public string TerminalFontStyle = OSInfo.GetMonospaceFont(); - - //Name Packs - public string EmbeddedNamePackPath = "names.npk"; - - //Desktop Icons - public Color IconTextColor = Color.White; - - //Window Animation - public int WindowFadeTime = 1; //Interval between each decrease in opacity - public decimal WindowFadeSpeed = Convert.ToDecimal(0.1); //Speed of opacity decrease - public WindowAnimationStyle WindowCloseAnimation = WindowAnimationStyle.Fade; //Animation style for close - public WindowAnimationStyle WindowOpenAnimation = WindowAnimationStyle.Fade; //Animation style for open - public WindowDragEffect DragAnimation = WindowDragEffect.Fade; - public double DragFadeLevel = 0.5; - public double DragFadeSpeed = 0.1; - public int DragFadeInterval = 1; - - //Shake - public int ShakeSpeed = 10; - public int ShakeMaxOffset = 250; - public int ShakeMinOffset = 0; - - //Desktop Panel - public List Widgets = new List(); - public List DesktopPanels = new List(); - } - - public class DesktopWidget - { - public string Name { get; set; } - public string Panel { get; set; } //either top or bottom - public string Icon { get; set; } - public int Width { get; set; } - public int XLocation { get; set; } - public WidgetType Type { get; set; } - public string Lua { get; set; } - } - - public class ShiftOSIcon - { - /// - /// Creates a new icon - /// - /// New ID - public ShiftOSIcon(string id) - { - SmallPath = id + "_small"; - LargePath = id + "_large"; - } - - public string SmallPath { get; set; } - public string LargePath { get; set; } - } - - public class DesktopPanel - { - public string Position = "Top"; - public int Height = 24; - public Color BackgroundColor = Color.Gray; - public Image BackgroundImage = null; - public string ImagePath = null; - } - - public class PanelWidget - { - public string type = "applauncher"; - } - - public class NamePack - { - public string TerminalName = "Terminal"; - public string ArtpadName = "Artpad"; - public string TextpadName = "TextPad"; - public string ShiftoriumName = "Shiftorium"; - public string KnowledgeInputName = "Knowledge Input"; - public string PongName = "Pong"; - public string ShifterName = "Shifter"; - public string FileSkimmerName = "File Skimmer"; - public string SkinLoaderName = "Skin Loader"; - public string ShutdownName = "Shut Down"; - public string UnityName = "Unity Mode"; - public string NameChangerName = "Name Changer"; - } - - public class IconSet - { - public Image Terminal = ShiftOS.Properties.Resources.iconTerminal; - public Image Artpad = ShiftOS.Properties.Resources.iconArtpad; - public Image Textpad = ShiftOS.Properties.Resources.iconTextPad; - public Image Shiftorium = ShiftOS.Properties.Resources.iconShiftorium; - public Image KnowledgeInput = ShiftOS.Properties.Resources.iconKnowledgeInput; - public Image Pong = ShiftOS.Properties.Resources.iconPong; - public Image Shifter = ShiftOS.Properties.Resources.iconShifter; - public Image FileSkimmer = ShiftOS.Properties.Resources.iconFileSkimmer; - public Image SkinLoader = ShiftOS.Properties.Resources.iconSkinLoader; - public Image Shutdown = ShiftOS.Properties.Resources.iconshutdown; - public Image Unity = ShiftOS.Properties.Resources.iconunitytoggle; - public Image NameChanger = ShiftOS.Properties.Resources.iconNameChanger; - - } - - public class IconPack - { - public string Terminal = "Terminal"; - public string Artpad = "Artpad"; - public string Textpad = "TextPad"; - public string Shiftorium = "Shiftorium"; - public string KnowledgeInput = "Knowledge Input"; - public string Pong = "Pong"; - public string Shifter = "Shifter"; - public string FileSkimmer = "File Skimmer"; - public string SkinLoader = "Skin Loader"; - public string Shutdown = "Shut Down"; - public string Unity = "Unity Mode"; - public string NameChanger = "Name Changer"; - - } - - public class Images - { - public Image applauncherclick = null; - public Image panelbutton = null; - public Image applaunchermouseover = null; - public Image applauncher = null; - public Image panelclock = null; - public Image desktopbackground = null; - public Image desktoppanel = null; - public Image minbtnhover = null; - public Image minbtnclick = null; - public Image rightcorner = null; - public Image titlebar = null; - public Image borderright = null; - public Image borderleft = null; - public Image borderbottom = null; - public Image closebtn = null; - public Image closebtnhover = null; - public Image closebtnclick = null; - public Image rollbtn = null; - public Image rollbtnhover = null; - public Image rollbtnclick = null; - public Image minbtn = null; - public Image leftcorner = null; - public Image bottomleftcorner = null; - public Image bottomrightcorner = null; - } - /// - /// ShiftOS 'Sharp' Skin Engine - Completely reworked ShiftOS skin system written in C# by Michael VanOverbeek - /// - public class Utilities { - public static Dictionary IconRegistry = new Dictionary(); - public static Color globaltransparencycolour = Color.FromArgb(1, 0, 1); - public static NamePack LoadedNames = null; - public static Skin loadedSkin = null; - public static Images loadedskin_images = null; - - /// - /// Load a bitmap from the skin. - /// - /// Bitmap name. - /// The bitmap - public static Bitmap GetImage(string fileName) - { - Bitmap ret; - if (File.Exists(Paths.LoadedSkin + fileName)) - { - using (Image img = Image.FromFile(Paths.LoadedSkin + fileName)) - { - ret = new Bitmap(img); - } - } else - { - ret = null; - } - return ret; - } - - /// - /// Load the name pack embedded in the skin. - /// - public static void LoadEmbeddedNamePack() - { - if(loadedSkin != null) - { - if(loadedSkin.EmbeddedNamePackPath != null) - { - if(File.Exists(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath)) - { - string json = File.ReadAllText(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath); - LoadedNames = JsonConvert.DeserializeObject(json); - try { - //bug-check - if (LoadedNames.NameChangerName == null) - { - LoadedNames.NameChangerName = "Name Changer"; - } - } - catch - { - LoadedNames = new NamePack(); - } - } - else - { - LoadedNames = new NamePack(); - } - } - else - { - LoadedNames = new NamePack(); - } - } - else - { - LoadedNames = new NamePack(); - } - } - - /// - /// Loads background images for all desktop panels - /// - public static void LoadPanels() - { - foreach(var pnl in loadedSkin.DesktopPanels) - { - string dpath = Paths.LoadedSkin + "panels" + OSInfo.DirectorySeparator + pnl.ImagePath; - if (File.Exists(dpath)) - { - pnl.BackgroundImage = Image.FromFile(dpath); - } - } - } - - /// - /// Saves background images of panels - /// - public static void SavePanels() - { - string dir = Paths.LoadedSkin + "panels"; - if (!Directory.Exists(dir)) - { - Directory.CreateDirectory(dir); - } - foreach (var pnl in loadedSkin.DesktopPanels) - { - if (pnl.BackgroundImage != null) - { - try - { - pnl.ImagePath = pnl.Position + loadedSkin.DesktopPanels.IndexOf(pnl).ToString(); - string dpath = Paths.LoadedSkin + "panels" + OSInfo.DirectorySeparator + pnl.ImagePath; - pnl.BackgroundImage.Save(dpath); - pnl.BackgroundImage = null; - } - catch - { - pnl.ImagePath = null; - pnl.BackgroundImage = null; - } - } - } - } - /// - /// Randomize some skin variables. Used for a virus. - /// - public static void Randomize() - { - Random rnd = new Random(); - if (rnd.Next(0, 5000) == 25) - { - loadedSkin.desktoppanelheight = rnd.Next(2, 200); - switch (rnd.Next(0, 10)) - { - case 1: - case 3: - case 5: - case 7: - case 9: - loadedSkin.desktoppanelposition = "Top"; - break; - default: - loadedSkin.desktoppanelposition = "Bottom"; - break; - } - API.CurrentSession.SetupDesktop(); - API.UpdateWindows(); - } - } - - /// - /// Save the loaded name pack to the skin. - /// - public static void SaveEmbeddedNamePack() - { - if (loadedSkin != null) - { - if (loadedSkin.EmbeddedNamePackPath != null) - { - if (File.Exists(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath)) - { - string json = JsonConvert.SerializeObject(LoadedNames); - File.WriteAllText(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath, json); - } - else - { - loadedSkin.EmbeddedNamePackPath = "names.npk"; - string json = JsonConvert.SerializeObject(LoadedNames); - File.WriteAllText(Paths.LoadedSkin + loadedSkin.EmbeddedNamePackPath, json); - } - } - - } - } - - /// - /// Save a bitmap to the skin. - /// - /// Bitmap to save - /// New filename - private static void saveimage(Image img, string Name) - { - string fullPath = Paths.LoadedSkin + Name; - if(File.Exists(fullPath)) - { - File.Delete(fullPath); - } - if (img != null) - { - img.Save(fullPath, System.Drawing.Imaging.ImageFormat.Bmp); - } - } - - /// - /// Load the skin. - /// - public static void loadskin() - { - if(Directory.Exists(Paths.LoadedSkin)) - { - try { - string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json"); - loadedSkin = JsonConvert.DeserializeObject(rawData); - if (File.Exists(Paths.LoadedSkin + "panels.json")) - { - string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json"); - loadedSkin.DesktopPanels = JsonConvert.DeserializeObject>(panels); - LoadPanels(); - } - loadimages(); - LoadEmbeddedNamePack(); - } - catch - { - //No skin to load. - loadedSkin = new Skin(); - loadedskin_images = new Images(); - saveskin(); - - } - } else - { - loadedSkin = new Skin(); - loadedskin_images = new Images(); - saveskin(); - } - } - - /// - /// Load skin from .skn file - /// - /// File to load. - public static void loadsknfile(string filepath) - { - try - { - //Extract the .SKN - loadedSkin = new Skin(); - loadedskin_images = new Images(); - API.ExtractFile(filepath, Paths.LoadedSkin, true); - //OK, so the skin's been extracted. - //Now, let's load in the skin data. - string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json"); - loadedSkin = JsonConvert.DeserializeObject(rawData); - //Now, images. - loadimages(); - } catch - { - API.CreateInfoboxSession("Error loading skin", "An error has occurred while loading the skin file. This could be because the skin file is no longer supported by this version of ShiftOS.", infobox.InfoboxMode.Info); - } - } - - /// - /// Load images from the skin. - /// - public static void loadimages() - { - loadedskin_images = new Images(); - loadedskin_images.applauncherclick = GetImage(loadedSkin.applauncherclickpath); - loadedskin_images.panelbutton = GetImage(loadedSkin.panelbuttonpath); - loadedskin_images.applaunchermouseover = GetImage(loadedSkin.applaunchermouseoverpath); - loadedskin_images.applauncher = GetImage(loadedSkin.applauncherpath); - loadedskin_images.panelclock = GetImage(loadedSkin.panelclockpath); - loadedskin_images.desktopbackground = GetImage(loadedSkin.desktopbackgroundpath); - loadedskin_images.desktoppanel = GetImage(loadedSkin.desktoppanelpath); - loadedskin_images.minbtnhover = GetImage(loadedSkin.minbtnhoverpath); - loadedskin_images.minbtnclick = GetImage(loadedSkin.minbtnclickpath); - loadedskin_images.rightcorner = GetImage(loadedSkin.rightcornerpath); - loadedskin_images.titlebar = GetImage(loadedSkin.titlebarpath); - loadedskin_images.borderright = GetImage(loadedSkin.borderrightpath); - loadedskin_images.borderleft = GetImage(loadedSkin.borderleftpath); - loadedskin_images.borderbottom = GetImage(loadedSkin.borderbottompath); - loadedskin_images.closebtn = GetImage(loadedSkin.closebtnpath); - loadedskin_images.closebtnhover = GetImage(loadedSkin.closebtnhoverpath); - loadedskin_images.closebtnclick = GetImage(loadedSkin.closebtnclickpath); - loadedskin_images.rollbtn = GetImage(loadedSkin.rollbtnpath); - loadedskin_images.rollbtnhover = GetImage(loadedSkin.rollbtnhoverpath); - loadedskin_images.rollbtnclick = GetImage(loadedSkin.rollbtnclickpath); - loadedskin_images.minbtn = GetImage(loadedSkin.minbtnpath); - loadedskin_images.leftcorner = GetImage(loadedSkin.leftcornerpath); - loadedskin_images.bottomleftcorner = GetImage(loadedSkin.bottomleftcornerpath); - loadedskin_images.bottomrightcorner = GetImage(loadedSkin.bottomrightcornerpath); - try - { - IconRegistry = new Dictionary(); - foreach (var f in Directory.GetFiles(Paths.Icons)) - { - var finf = new FileInfo(f); - byte[] fBytes = File.ReadAllBytes(finf.FullName); - MemoryStream fStream = new MemoryStream(fBytes); - IconRegistry.Add(finf.Name, Image.FromStream(fStream)); - fStream.Close(); - } - } - catch - { - GenDefaultIconPack(); - } - } - - /// - /// Generates the default icon pack if none exists. - /// - public static void GenDefaultIconPack() - { - IconRegistry = new Dictionary(); - if(Directory.Exists(Paths.Icons)) - { - Directory.Delete(Paths.Icons, true); - } - Directory.CreateDirectory(Paths.Icons); - SaveIcon(ShiftOS.Properties.Resources.iconTerminal, "Terminal"); - SaveIcon(ShiftOS.Properties.Resources.iconShiftorium, "Shiftorium"); - SaveIcon(ShiftOS.Properties.Resources.iconShifter, "Shifter"); - SaveIcon(ShiftOS.Properties.Resources.iconNameChanger, "NameChanger"); - SaveIcon(ShiftOS.Properties.Resources.iconTextPad, "TextPad"); - SaveIcon(ShiftOS.Properties.Resources.iconFileSkimmer, "FileSkimmer"); - SaveIcon(ShiftOS.Properties.Resources.iconArtpad, "Artpad"); - SaveIcon(ShiftOS.Properties.Resources.iconunitytoggle, "Unity"); - SaveIcon(ShiftOS.Properties.Resources.iconshutdown, "Shutdown"); - SaveIcon(ShiftOS.Properties.Resources.iconInfoBox_fw, "Infobox"); - SaveIcon(ShiftOS.Properties.Resources.iconKnowledgeInput, "KI"); - SaveIcon(ShiftOS.Properties.Resources.iconPong, "Pong"); - SaveIcon(ShiftOS.Properties.Resources.iconSkinLoader, "SkinLoader"); - SaveIcon(ShiftOS.Properties.Resources.iconIconManager, "IconManager"); - SaveIcon(ShiftOS.Properties.Resources.fileicondirectory, "Folder"); - SaveIcon(ShiftOS.Properties.Resources.fileicondoc, "TextFile"); - SaveIcon(ShiftOS.Properties.Resources.fileiconnone, "UnrecognizedFile"); - SaveIcon(ShiftOS.Properties.Resources.fileiconsaa, "SAAFile"); - SaveIcon(ShiftOS.Properties.Resources.fileiconsetup, "SetupPackage"); - SaveIcon(ShiftOS.Properties.Resources.skinfile, "SkinFile"); - IconRegistry = new Dictionary(); - foreach (var f in Directory.GetFiles(Paths.Icons)) - { - var finf = new FileInfo(f); - byte[] fBytes = File.ReadAllBytes(finf.FullName); - MemoryStream fStream = new MemoryStream(fBytes); - IconRegistry.Add(finf.Name, Image.FromStream(fStream)); - fStream.Close(); - } - } - - /// - /// Saves the icon to the registry. - /// - /// Icon to save - /// Icon title - public static void SaveIcon(Image img, string title) - { - img.Save(Paths.Icons + title, ImageFormat.Png); - - } - - /// - /// Saves all skin images - /// - public static void saveimages() - { - //Set image paths. - loadedSkin.applauncherclickpath = "applauncherclick"; - loadedSkin.panelbuttonpath = "panelbutton"; - loadedSkin.applaunchermouseoverpath = "applaunchermouseover"; - loadedSkin.applauncherpath = "applauncher"; - loadedSkin.panelclockpath = "panelclock"; - loadedSkin.desktopbackgroundpath = "desktopbackground"; - loadedSkin.desktoppanelpath = "desktoppanel"; - loadedSkin.minbtnhoverpath = "minbtnhover"; - loadedSkin.minbtnclickpath = "minbtnclick"; - loadedSkin.rightcornerpath = "rightcorner"; - loadedSkin.titlebarpath = "titlebar"; - loadedSkin.borderrightpath = "borderright"; - loadedSkin.borderleftpath = "borderleft"; - loadedSkin.borderbottompath = "borderbottom"; - loadedSkin.closebtnpath = "closebtn"; - loadedSkin.closebtnhoverpath = "closebtnhover"; - loadedSkin.closebtnclickpath = "closebtnclick"; - loadedSkin.rollbtnpath = "rollbtn"; - loadedSkin.rollbtnhoverpath = "rollbtnhover"; - loadedSkin.rollbtnclickpath = "rollbtnclick"; - loadedSkin.minbtnpath = "minbtn"; - loadedSkin.leftcornerpath = "leftcornerpath"; - loadedSkin.bottomleftcornerpath = "bottomleftcorner"; - loadedSkin.bottomrightcornerpath = "bottomrightcorner"; - //Save to new paths. - saveimage(loadedskin_images.applauncherclick, loadedSkin.applauncherclickpath); - saveimage(loadedskin_images.panelbutton, loadedSkin.panelbuttonpath); - saveimage(loadedskin_images.applaunchermouseover, loadedSkin.applaunchermouseoverpath); - saveimage(loadedskin_images.applauncher, loadedSkin.applauncherpath); - saveimage(loadedskin_images.panelclock, loadedSkin.panelclockpath); - saveimage(loadedskin_images.desktopbackground, loadedSkin.desktopbackgroundpath); - saveimage(loadedskin_images.desktoppanel, loadedSkin.desktoppanelpath); - saveimage(loadedskin_images.minbtnhover, loadedSkin.minbtnhoverpath); - saveimage(loadedskin_images.minbtnclick, loadedSkin.minbtnclickpath); - saveimage(loadedskin_images.rightcorner, loadedSkin.rightcornerpath); - saveimage(loadedskin_images.titlebar, loadedSkin.titlebarpath); - saveimage(loadedskin_images.borderright, loadedSkin.borderrightpath); - saveimage(loadedskin_images.borderleft, loadedSkin.borderleftpath); - saveimage(loadedskin_images.borderbottom, loadedSkin.borderbottompath); - saveimage(loadedskin_images.closebtn, loadedSkin.closebtnpath); - saveimage(loadedskin_images.closebtnhover, loadedSkin.closebtnhoverpath); - saveimage(loadedskin_images.closebtnclick, loadedSkin.closebtnclickpath); - saveimage(loadedskin_images.rollbtn, loadedSkin.rollbtnpath); - saveimage(loadedskin_images.rollbtnhover, loadedSkin.rollbtnhoverpath); - saveimage(loadedskin_images.rollbtnclick, loadedSkin.rollbtnclickpath); - saveimage(loadedskin_images.minbtn, loadedSkin.minbtnpath); - saveimage(loadedskin_images.leftcorner, loadedSkin.leftcornerpath); - saveimage(loadedskin_images.bottomleftcorner, loadedSkin.bottomleftcornerpath); - saveimage(loadedskin_images.bottomrightcorner, loadedSkin.bottomrightcornerpath); - foreach(KeyValuePair kv in IconRegistry) - { - if(kv.Value != null) - { - SaveIcon(kv.Value, kv.Key); - } - } - - } - - /// - /// Saves the skin to a new .skn file - /// - /// Target .skn file - public static void saveskintofile(string filePath) - { - saveskin(); - ZipFile.CreateFromDirectory(Paths.LoadedSkin, filePath); - } - - /// - /// Saves the skin. - /// - public static void saveskin() - { - saveimages(); - string rawjson = JsonConvert.SerializeObject(loadedSkin); - File.WriteAllText(Paths.LoadedSkin + "data.json", rawjson); - SavePanels(); - string panels = JsonConvert.SerializeObject(loadedSkin.DesktopPanels); - File.WriteAllText(Paths.LoadedSkin + "panels.json", panels); - SaveEmbeddedNamePack(); - } - } - - public class MyToolStripRenderer : ToolStripProfessionalRenderer - { - public MyToolStripRenderer() : base(new ShiftOSColorTable()) - { - - } - - public MyToolStripRenderer(ProfessionalColorTable table) : base(table) - { - - } - - protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) - { - if (e.Item.Text == API.CurrentSkin.applicationlaunchername) - { - e.TextColor = API.CurrentSkin.applicationsbuttontextcolour; - } - else { - e.TextColor = API.CurrentSkin.Menu_TextColor; - } - base.OnRenderItemText(e); - } - - protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) - { - //base.OnRenderToolStripBorder(e); - } - - - } -} \ No newline at end of file diff --git a/source/WindowsFormsApplication1/undo.cs b/source/WindowsFormsApplication1/undo.cs deleted file mode 100644 index 98fb920..0000000 --- a/source/WindowsFormsApplication1/undo.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Collections.Generic; -using System.Drawing; - -public class undo -{ - public Stack undoStack = new Stack(); - public Stack redoStack = new Stack(); -} \ No newline at end of file -- cgit v1.2.3