diff options
| author | Michael VanOverbeek <[email protected]> | 2016-07-25 12:57:52 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-07-25 12:57:52 -0400 |
| commit | 46c1c31302f111a1f3ec23a70e6f3986a9aa2a27 (patch) | |
| tree | f00af7ea3f6ad2641fb26fa1d310fd8b7179b39c /source/WindowsFormsApplication1/Apps/TextPad.cs | |
| parent | af48e774189596b8d7a058c564a7d6d75205ca03 (diff) | |
| parent | 6fa16209519896de09949a27425dff00ebf2970a (diff) | |
| download | shiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.tar.gz shiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.tar.bz2 shiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.zip | |
Merge pull request #17 from MichaelTheShifter/shiftui_integration
Shiftui integration
Diffstat (limited to 'source/WindowsFormsApplication1/Apps/TextPad.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Apps/TextPad.cs | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/source/WindowsFormsApplication1/Apps/TextPad.cs b/source/WindowsFormsApplication1/Apps/TextPad.cs index 1b49129..639bcca 100644 --- a/source/WindowsFormsApplication1/Apps/TextPad.cs +++ b/source/WindowsFormsApplication1/Apps/TextPad.cs @@ -7,7 +7,7 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Forms; +using ShiftUI; namespace ShiftOS { @@ -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 |
