From fed3801060be44b4a2ebad7c9d12605fb6954a13 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 25 Feb 2017 20:54:43 -0500 Subject: Add about box and fix desktop panel transparency bug --- ShiftOS.WinForms/Applications/About.cs | 94 ++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 ShiftOS.WinForms/Applications/About.cs (limited to 'ShiftOS.WinForms/Applications/About.cs') diff --git a/ShiftOS.WinForms/Applications/About.cs b/ShiftOS.WinForms/Applications/About.cs new file mode 100644 index 0000000..54eddab --- /dev/null +++ b/ShiftOS.WinForms/Applications/About.cs @@ -0,0 +1,94 @@ +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 ShiftOS.Engine; +using System.Reflection; + +namespace ShiftOS.WinForms.Applications +{ + [WinOpen("about")] + [Launcher("About", false, null, "Accessories")] + [DefaultTitle("About ShiftOS")] + public partial class About : UserControl, IShiftOSWindow + { + public About() + { + InitializeComponent(); + } + + public void SetupUI() + { + lbshiftit.Top = label1.Top + label1.Height; + + lbaboutdesc.Text = $@"ShiftOS +Copyright (c) 2017-{DateTime.Now.Year} Michael VanOverbeek and ShiftOS devs + +Engine version: Milestone 3, 1.0 Beta Series (Developer mode ON) +Frontend version: 1.0 Beta 1.2 +Multi-user domain version: 1.0 Rolling-Release + +Music courtesy of Selulance. Listen to the Fractal Forest album here: +https://www.youtube.com/watch?v=LB5jAYDL3VU&t=913s + +Special thanks to Philip Adams, the original creator of ShiftOS for helping us grow our community of amazing Shifters by featuring us on the YouTube Millionaire series and advertising us throughout various other series ran by him. + +Also, thanks to Rylan Arbour, Victor Tran and the other community moderators and administrators for helping us keep the community peaceful. + +Lastly, a huge special thanks to the community themselves - for testing, debugging, fixing, reporting bugs for, and enjoying our game even through its many failures, successes, revamps, etc. You guys are the reason we develop the game!"; + } + + public string GetEngineVersion() + { + foreach(var attr in typeof(IShiftOSWindow).Assembly.GetCustomAttributes(true)) + { + if(attr is AssemblyVersionAttribute) + { + var ver = attr as AssemblyVersionAttribute; + return ver.Version; + } + } + return "Unknown"; + } + + public string GetFrontendVersion() + { + foreach (var attr in this.GetType().Assembly.GetCustomAttributes(true)) + { + if (attr is AssemblyVersionAttribute) + { + var ver = attr as AssemblyVersionAttribute; + return ver.Version; + } + } + return "Unknown"; + } + + + + public void OnLoad() + { + SetupUI(); + } + + public void OnSkinLoad() + { + SetupUI(); + } + + public bool OnUnload() + { + return false; + } + + public void OnUpgrade() + { + + } + } +} -- cgit v1.2.3