From 0c2f2329119d8bfe2218912890d55def22965b87 Mon Sep 17 00:00:00 2001 From: Rylan/wowmom98 Date: Mon, 1 May 2017 17:12:16 -0400 Subject: TriWrite is so far now a TextPad clone --- ShiftOS.WinForms/Applications/TriWrite.Designer.cs | 86 +++++++++++++++++++++- ShiftOS.WinForms/Applications/TriWrite.cs | 38 ++++++++-- ShiftOS.WinForms/Applications/TriWrite.resx | 27 +++++++ 3 files changed, 142 insertions(+), 9 deletions(-) (limited to 'ShiftOS.WinForms') diff --git a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs index 61d48c3..7776c32 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs +++ b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs @@ -28,7 +28,7 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddressBook)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TriWrite)); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.addContactToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -36,8 +36,14 @@ this.panel1 = new System.Windows.Forms.Panel(); this.txtbody = new System.Windows.Forms.Label(); this.lbtitle = new System.Windows.Forms.Label(); + this.txtcontents = new System.Windows.Forms.TextBox(); + this.menuStrip2 = new System.Windows.Forms.MenuStrip(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.panel1.SuspendLayout(); + this.menuStrip2.SuspendLayout(); this.SuspendLayout(); // // menuStrip1 @@ -51,9 +57,20 @@ this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; // + // addContactToolStripMenuItem + // + this.addContactToolStripMenuItem.Name = "addContactToolStripMenuItem"; + this.addContactToolStripMenuItem.Size = new System.Drawing.Size(32, 19); + // + // removeToolStripMenuItem + // + this.removeToolStripMenuItem.Name = "removeToolStripMenuItem"; + this.removeToolStripMenuItem.Size = new System.Drawing.Size(32, 19); + // // tvcontacts // this.tvcontacts.Dock = System.Windows.Forms.DockStyle.Left; + this.tvcontacts.LineColor = System.Drawing.Color.Empty; this.tvcontacts.Location = new System.Drawing.Point(0, 24); this.tvcontacts.Name = "tvcontacts"; this.tvcontacts.Size = new System.Drawing.Size(224, 551); @@ -71,8 +88,8 @@ // // txtbody // - this.txtbody.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.txtbody.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.txtbody.Location = new System.Drawing.Point(7, 54); this.txtbody.Name = "txtbody"; @@ -85,10 +102,66 @@ this.lbtitle.AutoSize = true; this.lbtitle.Location = new System.Drawing.Point(7, 4); this.lbtitle.Name = "lbtitle"; - this.lbtitle.Size = new System.Drawing.Size(73, 13); + this.lbtitle.Size = new System.Drawing.Size(44, 13); this.lbtitle.TabIndex = 0; this.lbtitle.Tag = "header1"; this.lbtitle.Text = "TriWrite"; + // + // txtcontents + // + this.txtcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtcontents.Location = new System.Drawing.Point(-61, 53); + this.txtcontents.Multiline = true; + this.txtcontents.Name = "txtcontents"; + this.txtcontents.Size = new System.Drawing.Size(588, 460); + this.txtcontents.TabIndex = 1; + this.txtcontents.TabStop = false; + // + // menuStrip2 + // + this.menuStrip2.Dock = System.Windows.Forms.DockStyle.None; + this.menuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.openToolStripMenuItem, + this.saveToolStripMenuItem}); + this.menuStrip2.Location = new System.Drawing.Point(0, 0); + this.menuStrip2.Name = "menuStrip2"; + this.menuStrip2.Size = new System.Drawing.Size(648, 24); + this.menuStrip2.TabIndex = 2; + this.menuStrip2.Text = "menuStrip2"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.Size = new System.Drawing.Size(43, 20); + this.newToolStripMenuItem.Text = "New"; + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.Size = new System.Drawing.Size(48, 20); + this.openToolStripMenuItem.Text = "Open"; + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.Size = new System.Drawing.Size(43, 20); + this.saveToolStripMenuItem.Text = "Save"; + // + // TriWrite + // + this.Controls.Add(this.menuStrip2); + this.Controls.Add(this.txtcontents); + this.Name = "TriWrite"; + this.Size = new System.Drawing.Size(527, 513); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.menuStrip2.ResumeLayout(false); + this.menuStrip2.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -101,5 +174,10 @@ private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Label txtbody; private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.TextBox txtcontents; + private System.Windows.Forms.MenuStrip menuStrip2; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; } } diff --git a/ShiftOS.WinForms/Applications/TriWrite.cs b/ShiftOS.WinForms/Applications/TriWrite.cs index 90add8d..71c3fb1 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.cs +++ b/ShiftOS.WinForms/Applications/TriWrite.cs @@ -1,15 +1,14 @@ -using System; +using ShiftOS.Objects.ShiftFS; +using System; using System.Collections.Generic; using System.ComponentModel; -using System.Drawing; using System.Data; +using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using ShiftOS.Engine; -using static ShiftOS.Objects.ShiftFS.Utils; -using Newtonsoft.Json; namespace ShiftOS.WinForms.Applications { @@ -20,11 +19,40 @@ namespace ShiftOS.WinForms.Applications public partial class TriWrite : UserControl, IShiftOSWindow { - public void OnLoad() + public TriWrite() + { + InitializeComponent(); + } + + private void newToolStripMenuItem_Click(object sender, EventArgs e) + { + txtcontents.Text = ""; + } + + private void openToolStripMenuItem_Click(object sender, EventArgs e) { } + public void LoadFile(string file) + { + txtcontents.Text = Utils.ReadAllText(file); + } + + public void SaveFile(string file) + { + Utils.WriteAllText(file, txtcontents.Text); + } + + private void saveToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + public void OnLoad() + { + } + public void OnSkinLoad() { } diff --git a/ShiftOS.WinForms/Applications/TriWrite.resx b/ShiftOS.WinForms/Applications/TriWrite.resx index e150f33..a139e43 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.resx +++ b/ShiftOS.WinForms/Applications/TriWrite.resx @@ -120,6 +120,18 @@ 17, 17 + + True + + + True + + + True + + + True + The Address Book helps you keep track of all your contacts within the digital society, whether they be friends, enemies, or whatnot. @@ -127,4 +139,19 @@ On the left, we have made a list of all your contacts. You can click on one to v To add a contact, simply click "Add Contact", and to remove one, click "Remove". Some contacts may not be removed as they are integral to the progression of your adventures within the digital society. + + True + + + True + + + 132, 17 + + + True + + + True + \ No newline at end of file -- cgit v1.2.3 From 99eede4118bc247a9ca2e6f7329bf1b9fea5b52d Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 2 May 2017 17:11:31 -0400 Subject: pong highscores are semi-fixed --- ShiftOS.WinForms/Applications/Pong.cs | 18 ++++++++++++++++++ ShiftOS_TheReturn/UniteClient.cs | 20 ++++++++++++++++++++ ShiftOS_TheReturn/UniteTestCommands.cs | 10 ++++++++++ 3 files changed, 48 insertions(+) (limited to 'ShiftOS.WinForms') diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs index 0ef4da3..6198cad 100644 --- a/ShiftOS.WinForms/Applications/Pong.cs +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -285,6 +285,16 @@ namespace ShiftOS.WinForms.Applications { secondsleft = 60; level = level + 1; + if (SaveSystem.CurrentSave.UniteAuthToken != null) + { + try + { + var unite = new ShiftOS.Unite.UniteClient("http://getshiftos.ml", SaveSystem.CurrentSave.UniteAuthToken); + if (unite.GetPongLevel() < level) + unite.SetPongLevel(level); + } + catch { } + } generatenextlevel(); pnlgamestats.Show(); pnlgamestats.BringToFront(); @@ -544,6 +554,14 @@ namespace ShiftOS.WinForms.Applications lblfinalcomputerreward.Text = beatairewardtotal.ToString(); lblfinalcodepoints.Text = totalreward + Localization.Parse(" {CODEPOINTS_SHORT}"); SaveSystem.TransferCodepointsFrom("pong", totalreward); + if (!string.IsNullOrWhiteSpace(SaveSystem.CurrentSave.UniteAuthToken)) + { + var unite = new ShiftOS.Unite.UniteClient("http://getshiftos.ml", SaveSystem.CurrentSave.UniteAuthToken); + if (unite.GetPongCP() < totalreward) + { + unite.SetPongCP(totalreward); + } + } } private void newgame() diff --git a/ShiftOS_TheReturn/UniteClient.cs b/ShiftOS_TheReturn/UniteClient.cs index 88e44af..cb08382 100644 --- a/ShiftOS_TheReturn/UniteClient.cs +++ b/ShiftOS_TheReturn/UniteClient.cs @@ -34,6 +34,26 @@ namespace ShiftOS.Unite } } + public int GetPongCP() + { + return Convert.ToInt32(MakeCall("/API/GetPongCP")); + } + + public int GetPongLevel() + { + return Convert.ToInt32(MakeCall("/API/GetPongLevel")); + } + + public void SetPongLevel(int value) + { + MakeCall("/API/SetPongLevel/" + value.ToString()); + } + + public void SetPongCP(int value) + { + MakeCall("/API/SetPongCP/" + value.ToString()); + } + public string GetEmail() { return MakeCall("/API/GetEmail"); diff --git a/ShiftOS_TheReturn/UniteTestCommands.cs b/ShiftOS_TheReturn/UniteTestCommands.cs index 37ab1ee..7a83e44 100644 --- a/ShiftOS_TheReturn/UniteTestCommands.cs +++ b/ShiftOS_TheReturn/UniteTestCommands.cs @@ -10,6 +10,16 @@ namespace ShiftOS.Engine [Namespace("unite")] public static class UniteTestCommands { + [Command("setdisplayname")] + [RequiresArgument("name")] + public static bool SetDisplayName(Dictionary args) + { + string dname = args["name"].ToString(); + var unite = new ShiftOS.Unite.UniteClient("http://getshiftos.ml", SaveSystem.CurrentSave.UniteAuthToken); + unite.SetDisplayName(dname); + return true; + } + [Command("login")] [RequiresArgument("username")] [RequiresArgument("password")] -- cgit v1.2.3 From 102885044485b0b2c292efc300ceef019c5b8c6f Mon Sep 17 00:00:00 2001 From: Rylan/wowmom98 Date: Tue, 2 May 2017 20:29:08 -0400 Subject: centered ui of TriWrite --- ShiftOS.WinForms/Applications/TriWrite.Designer.cs | 7 +++---- ShiftOS.WinForms/Applications/TriWrite.resx | 24 ---------------------- 2 files changed, 3 insertions(+), 28 deletions(-) (limited to 'ShiftOS.WinForms') diff --git a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs index 7776c32..e3bc178 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs +++ b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs @@ -70,7 +70,6 @@ // tvcontacts // this.tvcontacts.Dock = System.Windows.Forms.DockStyle.Left; - this.tvcontacts.LineColor = System.Drawing.Color.Empty; this.tvcontacts.Location = new System.Drawing.Point(0, 24); this.tvcontacts.Name = "tvcontacts"; this.tvcontacts.Size = new System.Drawing.Size(224, 551); @@ -110,10 +109,10 @@ // txtcontents // this.txtcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtcontents.Location = new System.Drawing.Point(-61, 53); + this.txtcontents.Location = new System.Drawing.Point(0, 53); this.txtcontents.Multiline = true; this.txtcontents.Name = "txtcontents"; - this.txtcontents.Size = new System.Drawing.Size(588, 460); + this.txtcontents.Size = new System.Drawing.Size(527, 460); this.txtcontents.TabIndex = 1; this.txtcontents.TabStop = false; // @@ -126,7 +125,7 @@ this.saveToolStripMenuItem}); this.menuStrip2.Location = new System.Drawing.Point(0, 0); this.menuStrip2.Name = "menuStrip2"; - this.menuStrip2.Size = new System.Drawing.Size(648, 24); + this.menuStrip2.Size = new System.Drawing.Size(527, 24); this.menuStrip2.TabIndex = 2; this.menuStrip2.Text = "menuStrip2"; // diff --git a/ShiftOS.WinForms/Applications/TriWrite.resx b/ShiftOS.WinForms/Applications/TriWrite.resx index a139e43..88368cf 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.resx +++ b/ShiftOS.WinForms/Applications/TriWrite.resx @@ -120,18 +120,6 @@ 17, 17 - - True - - - True - - - True - - - True - The Address Book helps you keep track of all your contacts within the digital society, whether they be friends, enemies, or whatnot. @@ -139,19 +127,7 @@ On the left, we have made a list of all your contacts. You can click on one to v To add a contact, simply click "Add Contact", and to remove one, click "Remove". Some contacts may not be removed as they are integral to the progression of your adventures within the digital society. - - True - - - True - 132, 17 - - True - - - True - \ No newline at end of file -- cgit v1.2.3 From 27389413f98465820ea9d79ab99b1668cf5fc0f4 Mon Sep 17 00:00:00 2001 From: Rylan/wowmom98 Date: Tue, 2 May 2017 20:36:12 -0400 Subject: unfucked the titlebar --- ShiftOS.WinForms/Applications/TriWrite.Designer.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ShiftOS.WinForms') diff --git a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs index e3bc178..cd711c4 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs +++ b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs @@ -118,7 +118,6 @@ // // menuStrip2 // - this.menuStrip2.Dock = System.Windows.Forms.DockStyle.None; this.menuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.newToolStripMenuItem, this.openToolStripMenuItem, @@ -149,8 +148,8 @@ // // TriWrite // - this.Controls.Add(this.menuStrip2); this.Controls.Add(this.txtcontents); + this.Controls.Add(this.menuStrip2); this.Name = "TriWrite"; this.Size = new System.Drawing.Size(527, 513); this.menuStrip1.ResumeLayout(false); -- cgit v1.2.3 From 596db1d5bc7033c9624390c6c2967c161aaf969a Mon Sep 17 00:00:00 2001 From: Rylan/wowmom98 Date: Tue, 2 May 2017 20:49:13 -0400 Subject: added empty tools bar --- ShiftOS.WinForms/Applications/TriWrite.Designer.cs | 11 +++++++++++ ShiftOS.WinForms/Applications/TriWrite.resx | 3 +++ 2 files changed, 14 insertions(+) (limited to 'ShiftOS.WinForms') diff --git a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs index cd711c4..71598ef 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs +++ b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs @@ -41,6 +41,7 @@ this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.menuStrip3 = new System.Windows.Forms.MenuStrip(); this.menuStrip1.SuspendLayout(); this.panel1.SuspendLayout(); this.menuStrip2.SuspendLayout(); @@ -146,8 +147,17 @@ this.saveToolStripMenuItem.Size = new System.Drawing.Size(43, 20); this.saveToolStripMenuItem.Text = "Save"; // + // menuStrip3 + // + this.menuStrip3.Location = new System.Drawing.Point(0, 30); + this.menuStrip3.Name = "menuStrip3"; + this.menuStrip3.Size = new System.Drawing.Size(527, 24); + this.menuStrip3.TabIndex = 3; + this.menuStrip3.Text = "menuStrip3"; + // // TriWrite // + this.Controls.Add(this.menuStrip3); this.Controls.Add(this.txtcontents); this.Controls.Add(this.menuStrip2); this.Name = "TriWrite"; @@ -177,5 +187,6 @@ private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.MenuStrip menuStrip3; } } diff --git a/ShiftOS.WinForms/Applications/TriWrite.resx b/ShiftOS.WinForms/Applications/TriWrite.resx index 88368cf..525a23c 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.resx +++ b/ShiftOS.WinForms/Applications/TriWrite.resx @@ -130,4 +130,7 @@ To add a contact, simply click "Add Contact", and to remove one, click "Remove". 132, 17 + + 247, 17 + \ No newline at end of file -- cgit v1.2.3 From 14c5ba260fad4a9751630c5f5fc322bf7963602b Mon Sep 17 00:00:00 2001 From: william341 Date: Tue, 2 May 2017 17:52:10 -0700 Subject: fix some nres --- ShiftOS.Objects/ShiftFS.cs | 6 +++++- ShiftOS.WinForms/Tools/ControlManager.cs | 1 + ShiftOS.WinForms/WFLanguageProvider.cs | 7 ------- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'ShiftOS.WinForms') diff --git a/ShiftOS.Objects/ShiftFS.cs b/ShiftOS.Objects/ShiftFS.cs index 713bd17..c2121f0 100644 --- a/ShiftOS.Objects/ShiftFS.cs +++ b/ShiftOS.Objects/ShiftFS.cs @@ -230,7 +230,11 @@ namespace ShiftOS.Objects.ShiftFS if (!FileExists(path)) { - dir.AddFile(new File(pathlist[pathlist.Length - 1], Encoding.UTF8.GetBytes(contents), false, Permissions.All)); + try + { + dir.AddFile(new File(pathlist[pathlist.Length - 1], Encoding.UTF8.GetBytes(contents), false, Permissions.All)); + } + catch { } } else { diff --git a/ShiftOS.WinForms/Tools/ControlManager.cs b/ShiftOS.WinForms/Tools/ControlManager.cs index 6d60f9d..3d66b2b 100644 --- a/ShiftOS.WinForms/Tools/ControlManager.cs +++ b/ShiftOS.WinForms/Tools/ControlManager.cs @@ -154,6 +154,7 @@ namespace ShiftOS.WinForms.Tools try { + if(ctrl.Tag != null) tag = ctrl.Tag.ToString(); } catch { } diff --git a/ShiftOS.WinForms/WFLanguageProvider.cs b/ShiftOS.WinForms/WFLanguageProvider.cs index c11b6dc..2a431f8 100644 --- a/ShiftOS.WinForms/WFLanguageProvider.cs +++ b/ShiftOS.WinForms/WFLanguageProvider.cs @@ -44,14 +44,7 @@ namespace ShiftOS.WinForms { try { - switch (SaveSystem.CurrentSave.Language) - { - case "deutsch": - return Properties.Resources.strings_de; - default: return getDefault(); - - } } catch (NullReferenceException) { -- cgit v1.2.3 From c59dcc824dc3a7d2ad32b76e62db804a81df71a0 Mon Sep 17 00:00:00 2001 From: Rylan/wowmom98 Date: Tue, 2 May 2017 21:06:52 -0400 Subject: WHY THE FUCK ISNT OPEN SAVE AND NEW WORKING --- ShiftOS.WinForms/Applications/TriWrite.Designer.cs | 2 +- ShiftOS.WinForms/Applications/TriWrite.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'ShiftOS.WinForms') diff --git a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs index 71598ef..e420fd5 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.Designer.cs +++ b/ShiftOS.WinForms/Applications/TriWrite.Designer.cs @@ -157,8 +157,8 @@ // // TriWrite // - this.Controls.Add(this.menuStrip3); this.Controls.Add(this.txtcontents); + this.Controls.Add(this.menuStrip3); this.Controls.Add(this.menuStrip2); this.Name = "TriWrite"; this.Size = new System.Drawing.Size(527, 513); diff --git a/ShiftOS.WinForms/Applications/TriWrite.cs b/ShiftOS.WinForms/Applications/TriWrite.cs index 71c3fb1..6fb814f 100644 --- a/ShiftOS.WinForms/Applications/TriWrite.cs +++ b/ShiftOS.WinForms/Applications/TriWrite.cs @@ -31,7 +31,10 @@ namespace ShiftOS.WinForms.Applications private void openToolStripMenuItem_Click(object sender, EventArgs e) { + var txt = new List(); + txt.Add(".txt"); + AppearanceManager.SetupDialog(new FileDialog(txt.ToArray(), FileOpenerStyle.Open, new Action((file) => this.LoadFile(file)))); } public void LoadFile(string file) @@ -46,7 +49,10 @@ namespace ShiftOS.WinForms.Applications private void saveToolStripMenuItem_Click(object sender, EventArgs e) { + var txt = new List(); + txt.Add(".txt"); + AppearanceManager.SetupDialog(new FileDialog(txt.ToArray(), FileOpenerStyle.Save, new Action((file) => this.SaveFile(file)))); } public void OnLoad() -- cgit v1.2.3 From 8381c825b1c6d4d47af23e9461ece4f4a1f88cc5 Mon Sep 17 00:00:00 2001 From: Rylan/wowmom98 Date: Tue, 2 May 2017 21:38:35 -0400 Subject: fixed dividing by zero --- ShiftOS.WinForms/OobeStory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ShiftOS.WinForms') diff --git a/ShiftOS.WinForms/OobeStory.cs b/ShiftOS.WinForms/OobeStory.cs index b0fa444..bab4889 100644 --- a/ShiftOS.WinForms/OobeStory.cs +++ b/ShiftOS.WinForms/OobeStory.cs @@ -111,7 +111,7 @@ namespace ShiftOS.WinForms ConsoleEx.Bold = false; ConsoleEx.BackgroundColor = ConsoleColor.Black; Console.Write("Formatting: ["); - int formatProgress = 0; + int formatProgress = 3; while (formatProgress <= 100) { if (formatProgress % 3 == 0) -- cgit v1.2.3