From 98c2351b4ae2b824e34a7224c6d20064d45bad0b Mon Sep 17 00:00:00 2001 From: william341 Date: Sat, 23 Jul 2016 17:33:26 -0700 Subject: Fix TextPad --- .../Apps/TextPad.Designer.cs | 12 +++++------ source/WindowsFormsApplication1/Apps/TextPad.cs | 25 +++++++++++++--------- 2 files changed, 20 insertions(+), 17 deletions(-) (limited to 'source') diff --git a/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs b/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs index 07590ee..36d1a89 100644 --- a/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs +++ b/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs @@ -52,9 +52,7 @@ namespace ShiftOS // // txtuserinput // - this.txtuserinput.Anchor = ((ShiftUI.AnchorStyles)((((ShiftUI.AnchorStyles.Top | ShiftUI.AnchorStyles.Bottom) - | ShiftUI.AnchorStyles.Left) - | ShiftUI.AnchorStyles.Right))); + this.txtuserinput.Anchor = ((ShiftUI.AnchorStyles)((((ShiftUI.AnchorStyles.Top) | ShiftUI.AnchorStyles.Left) | ShiftUI.AnchorStyles.Right))); this.txtuserinput.BackColor = System.Drawing.Color.White; this.txtuserinput.BorderStyle = ShiftUI.BorderStyle.None; this.txtuserinput.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -63,7 +61,7 @@ namespace ShiftOS this.txtuserinput.Multiline = true; this.txtuserinput.Name = "txtuserinput"; this.txtuserinput.ScrollBars = ShiftUI.ScrollBars.Vertical; - this.txtuserinput.Size = new System.Drawing.Size(528, 272); + this.txtuserinput.Size = new System.Drawing.Size(528, 242); this.txtuserinput.TabIndex = 0; // // pnlbreak @@ -94,7 +92,7 @@ namespace ShiftOS // btnsave // this.btnsave.BackColor = System.Drawing.Color.White; - this.btnsave.FlatStyle = ShiftUI.FlatStyle.Standard; + this.btnsave.FlatStyle = ShiftUI.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; @@ -109,7 +107,7 @@ namespace ShiftOS // btnopen // this.btnopen.BackColor = System.Drawing.Color.White; - this.btnopen.FlatStyle = ShiftUI.FlatStyle.Standard; + this.btnopen.FlatStyle = ShiftUI.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; @@ -124,7 +122,7 @@ namespace ShiftOS // btnnew // this.btnnew.BackColor = System.Drawing.Color.White; - this.btnnew.FlatStyle = ShiftUI.FlatStyle.Standard; + this.btnnew.FlatStyle = ShiftUI.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); diff --git a/source/WindowsFormsApplication1/Apps/TextPad.cs b/source/WindowsFormsApplication1/Apps/TextPad.cs index 3d1d54a..639bcca 100644 --- a/source/WindowsFormsApplication1/Apps/TextPad.cs +++ b/source/WindowsFormsApplication1/Apps/TextPad.cs @@ -16,7 +16,7 @@ namespace ShiftOS private bool codepointscooldown = false; private int codepointsearned = 0; private bool needtosave = false; - + public TextPad() { InitializeComponent(); @@ -37,7 +37,8 @@ namespace ShiftOS pnloptions.Show(); txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height - pnloptions.Height); } - else { + else + { pnlbreak.BackgroundImage = Properties.Resources.uparrow; pnloptions.Hide(); txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height + pnloptions.Height); @@ -53,7 +54,7 @@ namespace ShiftOS API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => { string result = API.GetInfoboxResult(); - switch(result) + switch (result) { case "Yes": codepointsearned = 0; @@ -65,7 +66,8 @@ namespace ShiftOS } }; } - else { + else + { makenewdoc(); } } @@ -156,23 +158,25 @@ namespace ShiftOS if (res2 != "fail") { string fContents = File.ReadAllText(res2); - + txtuserinput.Text = fContents; } break; } }; } - else { + else + { string res = API.GetFSResult(); if (res != "fail") { - try { + try + { string fContents = File.ReadAllText(res); txtuserinput.Text = fContents; } - catch(Exception ex) + catch (Exception ex) { txtuserinput.Text = ex.Message; } @@ -206,7 +210,8 @@ namespace ShiftOS if (codepointscooldown == true) { } - else { + else + { codepointsearned = codepointsearned + 1; codepointscooldown = true; tmrcodepointcooldown.Start(); @@ -236,4 +241,4 @@ namespace ShiftOS tmrshowearnedcodepoints.Stop(); } } -} +} \ No newline at end of file -- cgit v1.2.3