diff --git a/ShiftOS.WinForms/Applications/AddressBook.cs b/ShiftOS.WinForms/Applications/AddressBook.cs index bc6a4cd..4d46aab 100644 --- a/ShiftOS.WinForms/Applications/AddressBook.cs +++ b/ShiftOS.WinForms/Applications/AddressBook.cs @@ -14,7 +14,7 @@ using Newtonsoft.Json; namespace ShiftOS.WinForms.Applications { [WinOpen("{WO_ADDRESSBOOK}")] - [AppscapeEntry("{TITLE_ADDRESSBOOK}", "{DESC_ADDRESSBOOK}", 1024, 750, null, "{AL_OFFICE}")] + [AppscapeEntry("address_book", "{TITLE_ADDRESSBOOK}", "{DESC_ADDRESSBOOK}", 1024, 750, null, "{AL_OFFICE}")] [DefaultTitle("{TITLE_ADDRESSBOOK}")] [Launcher("{TITLE_ADDRESSBOOK}", false, null, "{AL_OFFICE}")] public partial class AddressBook : UserControl, IShiftOSWindow diff --git a/ShiftOS.WinForms/Applications/AudioPlayer.cs b/ShiftOS.WinForms/Applications/AudioPlayer.cs index 49cf3a9..23fbf22 100644 --- a/ShiftOS.WinForms/Applications/AudioPlayer.cs +++ b/ShiftOS.WinForms/Applications/AudioPlayer.cs @@ -37,7 +37,7 @@ using System.Threading; namespace ShiftOS.WinForms.Applications { - [AppscapeEntry("{TITLE_AUDIOPLAYER}", "{DESC_AUDIOPLAYER}", 3047, 1000, "file_skimmer", "{AL_ENTERTAINMENT}")] + [AppscapeEntry("audio_player", "{TITLE_AUDIOPLAYER}", "{DESC_AUDIOPLAYER}", 3047, 1000, "file_skimmer", "{AL_ENTERTAINMENT}")] [Launcher("{TITLE_AUDIOPLAYER}", false, null, "{AL_ENTERTAINMENT}")] [WinOpen("{WO_AUDIOPLAYER}")] [DefaultTitle("{TITLE_AUDIOPLAYER}")] diff --git a/ShiftOS.WinForms/Applications/Chat.cs b/ShiftOS.WinForms/Applications/Chat.cs index 14a8a80..2abf5eb 100644 --- a/ShiftOS.WinForms/Applications/Chat.cs +++ b/ShiftOS.WinForms/Applications/Chat.cs @@ -41,7 +41,7 @@ namespace ShiftOS.WinForms.Applications [WinOpen("{WO_SIMPLESRC}")] [Launcher("{TITLE_SIMPLESRC}", false, null, "{AL_NETWORKING}")] [DefaultTitle("{TITLE_SIMPLESRC}")] - [AppscapeEntry("{TITLE_SIMPLESRC}", "{DESC_SIMPLESRC}", 300, 145, "file_skimmer", "{AL_NETWORKING}")] + [AppscapeEntry("simplesrc_client", "{TITLE_SIMPLESRC}", "{DESC_SIMPLESRC}", 300, 145, "file_skimmer", "{AL_NETWORKING}")] public partial class Chat : UserControl, IShiftOSWindow { public Chat() diff --git a/ShiftOS.WinForms/Applications/Clock.Designer.cs b/ShiftOS.WinForms/Applications/Clock.Designer.cs new file mode 100644 index 0000000..0590c88 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Clock.Designer.cs @@ -0,0 +1,73 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class Clock + { + /// + /// 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.lbheader = new System.Windows.Forms.Label(); + this.lbcurrenttime = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // lbheader + // + this.lbheader.AutoSize = true; + this.lbheader.Location = new System.Drawing.Point(234, 183); + this.lbheader.Name = "lbheader"; + this.lbheader.Size = new System.Drawing.Size(66, 13); + this.lbheader.TabIndex = 0; + this.lbheader.Tag = "header2"; + this.lbheader.Text = "Current time:"; + // + // lbcurrenttime + // + this.lbcurrenttime.AutoSize = true; + this.lbcurrenttime.Location = new System.Drawing.Point(294, 140); + this.lbcurrenttime.Name = "lbcurrenttime"; + this.lbcurrenttime.Size = new System.Drawing.Size(135, 13); + this.lbcurrenttime.TabIndex = 1; + this.lbcurrenttime.Tag = "header1"; + this.lbcurrenttime.Text = "000001 seconds since helll"; + // + // Clock + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lbcurrenttime); + this.Controls.Add(this.lbheader); + this.Name = "Clock"; + this.Size = new System.Drawing.Size(527, 260); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lbheader; + private System.Windows.Forms.Label lbcurrenttime; + } +} diff --git a/ShiftOS.WinForms/Applications/Clock.cs b/ShiftOS.WinForms/Applications/Clock.cs new file mode 100644 index 0000000..b4f6793 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Clock.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 ShiftOS.Engine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms.Applications +{ + [RequiresUpgrade("clock")] + [WinOpen("clock")] + [Launcher("Clock", false, null, "Accessories")] + [DefaultTitle("Clock")] + public partial class Clock : UserControl, IShiftOSWindow + { + public Clock() + { + InitializeComponent(); + clocktimer = new Timer(); + clocktimer.Interval = 100; + clocktimer.Tick += (o, a) => + { + lbheader.CenterParent(); + lbheader.Top = 15; + lbcurrenttime.Text = Terminal.GetTime(); + lbcurrenttime.CenterParent(); + }; + } + + private Timer clocktimer = null; + + public void OnLoad() + { + clocktimer.Start(); + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/Clock.resx b/ShiftOS.WinForms/Applications/Clock.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Clock.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/ShiftOS.WinForms/Applications/NameChanger.cs b/ShiftOS.WinForms/Applications/NameChanger.cs index 25e1475..4695c8a 100644 --- a/ShiftOS.WinForms/Applications/NameChanger.cs +++ b/ShiftOS.WinForms/Applications/NameChanger.cs @@ -40,7 +40,7 @@ namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] [Launcher("{TITLE_NAMECHANGER}", false, null, "{AL_CUSTOMIZATION}")] - [AppscapeEntry("{TITLE_NAMECHANGER}", "{DESC_NAMECHANGER}", 342, 500, "skinning;file_skimmer;wm_titlebar", "{AL_CUSTOMIZATION}")] + [AppscapeEntry("name_changer", "{TITLE_NAMECHANGER}", "{DESC_NAMECHANGER}", 342, 500, "skinning;file_skimmer;wm_titlebar", "{AL_CUSTOMIZATION}")] [WinOpen("{WO_NAMECHANGER}")] [DefaultTitle("{TITLE_NAMECHANGER}")] [DefaultIcon("iconNameChanger")] diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs index 6205745..efa4b91 100644 --- a/ShiftOS.WinForms/Applications/ShiftLetters.cs +++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs @@ -33,12 +33,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] [Launcher("{TITLE_SHIFTLETTERS}", false, null, "{AL_GAMES}")] - [AppscapeEntry("{TITLE_SHIFTLETTERS}", "{DESC_SHIFTLETTERS}", 300, 150, null, "{AL_GAMES}")] + [AppscapeEntry("shiftletters", "{TITLE_SHIFTLETTERS}", "{DESC_SHIFTLETTERS}", 300, 150, null, "{AL_GAMES}")] [WinOpen("{WO_SHIFTLETTERS}")] [DefaultIcon("iconShiftLetters")] public partial class ShiftLetters : UserControl, IShiftOSWindow @@ -181,6 +182,7 @@ namespace ShiftOS.WinForms.Applications btnrestart.Visible = true; lblword.Left = (this.Width - lblword.Width) / 2; comboBox1.SelectedIndex = 0; + this.tbguess.CenterParent(); } public void OnUpgrade() diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index 9884c60..8d9bd31 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -35,7 +35,7 @@ using ShiftOS.Engine; namespace ShiftOS.WinForms.Applications { [Launcher("{TITLE_SHIFTSWEEPER}", true, "al_shiftsweeper", "{AL_GAMES}")] - [AppscapeEntry("{TITLE_SHIFTSWEEPER}", "{DESC_SHIFTSWEEPER}", 1600, 800, "shiftletters", "{AL_GAMES}")] + [AppscapeEntry("shiftsweeper", "{TITLE_SHIFTSWEEPER}", "{DESC_SHIFTSWEEPER}", 1600, 800, "shiftletters", "{AL_GAMES}")] [MultiplayerOnly] [WinOpen("{WO_SHIFTSWEEPER}")] [DefaultIcon("iconShiftSweeper")] diff --git a/ShiftOS.WinForms/Applications/TriSheet.cs b/ShiftOS.WinForms/Applications/TriSheet.cs index 2cf381d..2eaf6df 100644 --- a/ShiftOS.WinForms/Applications/TriSheet.cs +++ b/ShiftOS.WinForms/Applications/TriSheet.cs @@ -15,7 +15,7 @@ using ShiftOS.Objects.ShiftFS; namespace ShiftOS.WinForms.Applications { [WinOpen("trisheet")] - [AppscapeEntry("TriSheet", "Part of the trilogy of office applications for enhancement of your system. TriSheet is easliy the best spreadsheet program out there for ShiftOS.", 1024, 750, "file_skimmer;textpad", "Office")] + [AppscapeEntry("trisheet", "TriSheet", "Part of the trilogy of office applications for enhancement of your system. TriSheet is easliy the best spreadsheet program out there for ShiftOS.", 1024, 750, "file_skimmer;textpad", "Office")] [DefaultTitle("TriSheet")] [Launcher("TriSheet", false, null, "Office")] public partial class TriSheet : UserControl, IShiftOSWindow diff --git a/ShiftOS.WinForms/Applications/TriWrite.cs b/ShiftOS.WinForms/Applications/TriWrite.cs index 7712891..f565328 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.cs +++ b/ShiftOS.WinForms/Applications/TriWrite.cs @@ -13,7 +13,7 @@ using ShiftOS.Engine; namespace ShiftOS.WinForms.Applications { [WinOpen("triwrite")] - [AppscapeEntry("TriWrite", "Part of the trilogy of office applications for enhancement of your system. TriWrite is easliy the best text editor out there for ShiftOS.", 1024, 750, "file_skimmer;textpad", "Office")] + [AppscapeEntry("triwrite", "TriWrite", "Part of the trilogy of office applications for enhancement of your system. TriWrite is easliy the best text editor out there for ShiftOS.", 1024, 750, "file_skimmer;textpad", "Office")] [DefaultTitle("TriWrite")] [Launcher("TriWrite", false, null, "Office")] public partial class TriWrite : UserControl, IShiftOSWindow diff --git a/ShiftOS.WinForms/Applications/VideoPlayer.cs b/ShiftOS.WinForms/Applications/VideoPlayer.cs index 29c318f..341df7e 100644 --- a/ShiftOS.WinForms/Applications/VideoPlayer.cs +++ b/ShiftOS.WinForms/Applications/VideoPlayer.cs @@ -12,7 +12,7 @@ using System.IO; namespace ShiftOS.WinForms.Applications { - [AppscapeEntry("Video Player", "Play .mp4 files or .wmv files as videos inside ShiftOS! Perfect for a shifted movie night.", 1524, 1000, "file_skimmer", "Entertainment")] + [AppscapeEntry("video_player", "Video Player", "Play .mp4 files or .wmv files as videos inside ShiftOS! Perfect for a shifted movie night.", 1524, 1000, "file_skimmer", "Entertainment")] [DefaultTitle("Video Player")] [Launcher("Video Player", false, null, "Entertainment")] [WinOpen("video_player")] diff --git a/ShiftOS.WinForms/Applications/WebBrowser.cs b/ShiftOS.WinForms/Applications/WebBrowser.cs index 751e7e2..4d04aab 100644 --- a/ShiftOS.WinForms/Applications/WebBrowser.cs +++ b/ShiftOS.WinForms/Applications/WebBrowser.cs @@ -12,7 +12,7 @@ using ShiftOS.Engine; namespace ShiftOS.WinForms.Applications { [WinOpen("web_browser")] - [AppscapeEntry("Web Browser", "We're going surfing on the Internet! This application allows you to break the bounds of the Digital Society and connect to the outer Internet inside ShiftOS.", + [AppscapeEntry("web_browser", "Web Browser", "We're going surfing on the Internet! This application allows you to break the bounds of the Digital Society and connect to the outer Internet inside ShiftOS.", 4096, 10000, "color_depth_24_bits", "Networking")] [Launcher("Web Browser", false, null, "Networking")] [DefaultTitle("Web Browser")] diff --git a/ShiftOS.WinForms/Commands.cs b/ShiftOS.WinForms/Commands.cs index 23b8f19..c7d8f5b 100644 --- a/ShiftOS.WinForms/Commands.cs +++ b/ShiftOS.WinForms/Commands.cs @@ -157,7 +157,7 @@ namespace ShiftOS.Engine //print all unique namespaces. foreach (var n in TerminalBackend.Commands.Where(x => !(x is TerminalBackend.WinOpenCommand) && Shiftorium.UpgradeInstalled(x.Dependencies) && x.CommandInfo.hide == false).OrderBy(x => x.CommandInfo.name)) { - sb.Append(n.CommandInfo.name); + sb.Append(" - " + n.CommandInfo.name); if (!string.IsNullOrWhiteSpace(n.CommandInfo.description)) if (Shiftorium.UpgradeInstalled("help_description")) sb.Append(" - " + n.CommandInfo.description); diff --git a/ShiftOS.WinForms/Program.cs b/ShiftOS.WinForms/Program.cs index d3530a0..9ec0ede 100644 --- a/ShiftOS.WinForms/Program.cs +++ b/ShiftOS.WinForms/Program.cs @@ -122,7 +122,7 @@ namespace ShiftOS.WinForms { var upgrade = new ShiftoriumUpgrade { - Id = attrib.Name.ToLower().Replace(" ", "_"), + Id = attrib.Upgrade, Name = attrib.Name, Description = attrib.Description, Cost = attrib.Cost, diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj index b089e88..4e8b98e 100644 --- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -71,6 +71,12 @@ About.cs + + UserControl + + + Clock.cs + UserControl @@ -469,6 +475,9 @@ About.cs + + Clock.cs + IconManager.cs diff --git a/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs b/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs index c9b6f64..d14f1fa 100644 --- a/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs +++ b/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs @@ -48,8 +48,8 @@ namespace ShiftOS.WinForms.ShiftnetSites if (upgrades.Count() > 0) foreach (var upg in upgrades) { - if (!cats.Contains(upg.Category)) - cats.Add(upg.Category); + if (!cats.Contains(Localization.Parse(upg.Category))) + cats.Add(Localization.Parse(upg.Category)); } } catch { } @@ -63,9 +63,9 @@ namespace ShiftOS.WinForms.ShiftnetSites pnlappslist.Controls.Clear(); pnlappslist.Show(); pnlappslist.BringToFront(); - Category = cat; + Category = Localization.Parse(cat); var upgrades = GetAllInCategory(); - lbtitle.Text = cat; + lbtitle.Text = Localization.Parse(cat); if(upgrades.Length == 0) { var err = new Label(); @@ -282,7 +282,7 @@ namespace ShiftOS.WinForms.ShiftnetSites if (Category == "All") return upgrades.ToArray(); else - return upgrades.Where(x => x.Category == Category).ToArray(); + return upgrades.Where(x => Localization.Parse(x.Category) == Localization.Parse(Category)).ToArray(); } public void Setup() @@ -360,7 +360,7 @@ namespace ShiftOS.WinForms /// public class AppscapeEntryAttribute : RequiresUpgradeAttribute { - public AppscapeEntryAttribute(string name, string description, int downloadSize, ulong cost, string dependencies = "", string category = "Misc") : base(name.ToLower().Replace(' ', '_')) + public AppscapeEntryAttribute(string id, string name, string description, int downloadSize, ulong cost, string dependencies = "", string category = "Misc") : base(id) { Name = name; Description = description;