mirror of
https://github.com/ShiftOS-Rewind/ShiftOS.git
synced 2025-01-22 11:21:45 -05:00
Merge branch 'master' of https://github.com/ShiftOS-Rewind/ShiftOS
This commit is contained in:
commit
d6359cad3e
4 changed files with 73 additions and 8 deletions
|
@ -76,6 +76,12 @@
|
||||||
<Compile Include="ShiftFS\ShiftFS.cs" />
|
<Compile Include="ShiftFS\ShiftFS.cs" />
|
||||||
<Compile Include="ShiftFS\IShiftNode.cs" />
|
<Compile Include="ShiftFS\IShiftNode.cs" />
|
||||||
<Compile Include="Misc\Tools.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">
|
<Compile Include="WindowManager\InfoboxTemplate.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -1102,8 +1108,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\zoombuttonpressed.png" />
|
<None Include="Resources\zoombuttonpressed.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup />
|
||||||
<Folder Include="UI\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
37
ShiftOS.Engine/UI/ShiftButton.Designer.cs
generated
Normal file
37
ShiftOS.Engine/UI/ShiftButton.Designer.cs
generated
Normal file
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
20
ShiftOS.Engine/UI/ShiftButton.cs
Normal file
20
ShiftOS.Engine/UI/ShiftButton.cs
Normal file
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,6 +30,7 @@ namespace ShiftOS.Main.Terminal
|
||||||
var theParams = new string[command.Split(' ').Length - 1];
|
var theParams = new string[command.Split(' ').Length - 1];
|
||||||
Array.Copy(command.Split(' '), 1, theParams, 0, command.Split(' ').Length - 1);
|
Array.Copy(command.Split(' '), 1, theParams, 0, command.Split(' ').Length - 1);
|
||||||
|
|
||||||
|
bool complete = false;
|
||||||
foreach (TerminalCommand instance in instances)
|
foreach (TerminalCommand instance in instances)
|
||||||
{
|
{
|
||||||
if (instance.Name.ToLower() == name.ToLower())
|
if (instance.Name.ToLower() == name.ToLower())
|
||||||
|
@ -38,14 +39,17 @@ namespace ShiftOS.Main.Terminal
|
||||||
// Add a new line!
|
// Add a new line!
|
||||||
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText("\n");
|
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText("\n");
|
||||||
instance.Run(theParams);
|
instance.Run(theParams);
|
||||||
|
complete = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
if(!complete)
|
||||||
{
|
{
|
||||||
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText($"\nsbash: {command.Split(' ').First()}: invalid command");
|
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.AppendText($"\nsbash: {command.Split(' ').First()}: invalid command");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.Text += " \n The command cannot be found. \n";
|
Array.Find(trm.ToArray(), w => w.TerminalID == TermID).termmain.Text += " \n The command cannot be found. \n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue