diff options
| author | FloppyDiskDrive <[email protected]> | 2017-11-21 16:28:17 -0600 |
|---|---|---|
| committer | FloppyDiskDrive <[email protected]> | 2017-11-21 16:28:17 -0600 |
| commit | d6359cad3e714d86b1ffd8ed8abe8f6e7e713f41 (patch) | |
| tree | 9d95413c3c4bc32dd00cc2e7fbd3906415a5b154 | |
| parent | b0cdadf275e2f3642da0a6cac2eabc294d4383c8 (diff) | |
| parent | f986e59659601108e64cf3475da99ca7b42c6f37 (diff) | |
| download | shiftos-rewind-d6359cad3e714d86b1ffd8ed8abe8f6e7e713f41.tar.gz shiftos-rewind-d6359cad3e714d86b1ffd8ed8abe8f6e7e713f41.tar.bz2 shiftos-rewind-d6359cad3e714d86b1ffd8ed8abe8f6e7e713f41.zip | |
Merge branch 'master' of https://github.com/ShiftOS-Rewind/ShiftOS
| -rw-r--r-- | ShiftOS.Engine/ShiftOS.Engine.csproj | 10 | ||||
| -rw-r--r-- | ShiftOS.Engine/UI/ShiftButton.Designer.cs | 37 | ||||
| -rw-r--r-- | ShiftOS.Engine/UI/ShiftButton.cs | 20 | ||||
| -rw-r--r-- | ShiftOS.Main/Terminal/TerminalBackend.cs | 14 |
4 files changed, 73 insertions, 8 deletions
diff --git a/ShiftOS.Engine/ShiftOS.Engine.csproj b/ShiftOS.Engine/ShiftOS.Engine.csproj index 384d356..db21b5a 100644 --- a/ShiftOS.Engine/ShiftOS.Engine.csproj +++ b/ShiftOS.Engine/ShiftOS.Engine.csproj @@ -76,6 +76,12 @@ <Compile Include="ShiftFS\ShiftFS.cs" /> <Compile Include="ShiftFS\IShiftNode.cs" /> <Compile Include="Misc\Tools.cs" /> + <Compile Include="UI\ShiftButton.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="UI\ShiftButton.Designer.cs"> + <DependentUpon>ShiftButton.cs</DependentUpon> + </Compile> <Compile Include="WindowManager\InfoboxTemplate.cs"> <SubType>UserControl</SubType> </Compile> @@ -1102,8 +1108,6 @@ <ItemGroup> <None Include="Resources\zoombuttonpressed.png" /> </ItemGroup> - <ItemGroup> - <Folder Include="UI\" /> - </ItemGroup> + <ItemGroup /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/ShiftOS.Engine/UI/ShiftButton.Designer.cs b/ShiftOS.Engine/UI/ShiftButton.Designer.cs new file mode 100644 index 0000000..a84ba4a --- /dev/null +++ b/ShiftOS.Engine/UI/ShiftButton.Designer.cs @@ -0,0 +1,37 @@ +namespace ShiftOS.Engine.UI +{ + partial class ShiftButton + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/ShiftOS.Engine/UI/ShiftButton.cs b/ShiftOS.Engine/UI/ShiftButton.cs new file mode 100644 index 0000000..ebf6e2b --- /dev/null +++ b/ShiftOS.Engine/UI/ShiftButton.cs @@ -0,0 +1,20 @@ +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; + +namespace ShiftOS.Engine.UI +{ + public partial class ShiftButton : UserControl + { + public ShiftButton() + { + InitializeComponent(); + } + } +} diff --git a/ShiftOS.Main/Terminal/TerminalBackend.cs b/ShiftOS.Main/Terminal/TerminalBackend.cs index 59e4f27..7904718 100644 --- a/ShiftOS.Main/Terminal/TerminalBackend.cs +++ b/ShiftOS.Main/Terminal/TerminalBackend.cs @@ -30,6 +30,7 @@ namespace ShiftOS.Main.Terminal var theParams = new string[command.Split(' ').Length - 1]; Array.Copy(command.Split(' '), 1, theParams, 0, command.Split(' ').Length - 1); + bool complete = false; foreach (TerminalCommand instance in instances) { if (instance.Name.ToLower() == name.ToLower()) @@ -38,14 +39,17 @@ namespace ShiftOS.Main.Terminal // Add a new line! Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText("\n"); instance.Run(theParams); - return; - } - else - { - Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText($"\nsbash: {command.Split(' ').First()}: invalid command"); + complete = true; return; } } + if(!complete) + { + Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText($"\nsbash: {command.Split(' ').First()}: invalid command"); + return; + } + + Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.Text += " \n The command cannot be found. \n"; } |
