mirror of
https://github.com/ShiftOS-Rewind/ShiftOS.git
synced 2025-01-22 17:52:15 +00:00
updated the TerminalBackend.cs file lel
This commit is contained in:
parent
4534ff6252
commit
2950e4546a
6 changed files with 21 additions and 101 deletions
|
@ -28,21 +28,30 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
||||
this.shiftButton1 = new ShiftOS.Engine.UI.ShiftButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// shiftButton1
|
||||
//
|
||||
this.shiftButton1.Location = new System.Drawing.Point(133, 66);
|
||||
this.shiftButton1.Name = "shiftButton1";
|
||||
this.shiftButton1.Size = new System.Drawing.Size(75, 22);
|
||||
this.shiftButton1.TabIndex = 0;
|
||||
//
|
||||
// FileOpener
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.shiftButton1);
|
||||
this.Name = "FileOpener";
|
||||
this.Size = new System.Drawing.Size(368, 283);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
private UI.ShiftButton shiftButton1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ShiftOS.Engine.WindowManager;
|
||||
|
||||
namespace ShiftOS.Engine.ShiftFS.FileGUI
|
||||
{
|
||||
|
@ -15,12 +16,11 @@ namespace ShiftOS.Engine.ShiftFS.FileGUI
|
|||
public FileOpener()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
private void shiftButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("yay");
|
||||
ShiftWM.StartInfoboxSession("Test", "lol", InfoboxTemplate.ButtonType.Ok);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,12 +76,6 @@
|
|||
<Compile Include="ShiftFS\ShiftFS.cs" />
|
||||
<Compile Include="ShiftFS\IShiftNode.cs" />
|
||||
<Compile Include="Misc\Tools.cs" />
|
||||
<Compile Include="UI\ShiftButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\ShiftButton.Designer.cs">
|
||||
<DependentUpon>ShiftButton.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WindowManager\InfoboxTemplate.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -1108,5 +1102,8 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\zoombuttonpressed.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="UI\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
36
ShiftOS.Engine/UI/ShiftButton.Designer.cs
generated
36
ShiftOS.Engine/UI/ShiftButton.Designer.cs
generated
|
@ -1,36 +0,0 @@
|
|||
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();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ShiftOS.Engine.UI
|
||||
{
|
||||
public partial class ShiftButton : Control, IButtonControl
|
||||
{
|
||||
private bool _pressing = false;
|
||||
private Color _lightBack;
|
||||
public ShiftButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public DialogResult DialogResult { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public void NotifyDefault(bool value)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void PerformClick()
|
||||
{
|
||||
this.OnClick(new EventArgs());
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs pe)
|
||||
{
|
||||
base.OnPaint(pe);
|
||||
this.Font = new Font("Lucida Console", 9, FontStyle.Regular);
|
||||
_lightBack = Color.WhiteSmoke;
|
||||
var g = pe.Graphics;
|
||||
g.Clear(BackColor);
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
|
||||
var sf = new StringFormat();
|
||||
|
||||
if (_pressing)
|
||||
{
|
||||
g.FillRectangle(new SolidBrush(Color.White), 0, 0, Width, Height);
|
||||
g.DrawString(Text, Font, new SolidBrush(Color.Black), ((Width / 2) + 1), (Height / 2) + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
g.FillRectangle(new SolidBrush(Color.WhiteSmoke), 0, 0, Width, Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -40,6 +40,11 @@ namespace ShiftOS.Main.Terminal
|
|||
instance.Run(theParams);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
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";
|
||||
|
|
Loading…
Reference in a new issue