mirror of
https://github.com/seriocomedy/ShiftOS-C-.git
synced 2025-02-02 13:07:33 +00:00
Shifter UI rewrite, fix shiftnet and spkg paths.
This commit is contained in:
parent
b52090021f
commit
fe4121c541
6 changed files with 1478 additions and 6416 deletions
|
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
||||||
using ShiftUI.Theming.Default;
|
using ShiftUI.Theming.Default;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using ShiftUI.ShiftOS;
|
using ShiftUI.ShiftOS;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
|
||||||
namespace ShiftUI.Theming
|
namespace ShiftUI.Theming
|
||||||
{
|
{
|
||||||
|
@ -23,10 +24,202 @@ namespace ShiftUI.Theming
|
||||||
return new Memphis.ButtonPainter();
|
return new Memphis.ButtonPainter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override CheckBoxPainter CheckBoxPainter
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new Memphis.CheckBoxPainter();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Memphis
|
namespace Memphis
|
||||||
{
|
{
|
||||||
|
internal class CheckBoxPainter : Default.CheckBoxPainter
|
||||||
|
{
|
||||||
|
#region Standard
|
||||||
|
public override void DrawNormalCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
int check_box_visible_size = (bounds.Height > bounds.Width) ? bounds.Width : bounds.Height;
|
||||||
|
int x_pos = Math.Max(0, bounds.X + (bounds.Width / 2) - check_box_visible_size / 2);
|
||||||
|
int y_pos = Math.Max(0, bounds.Y + (bounds.Height / 2) - check_box_visible_size / 2);
|
||||||
|
|
||||||
|
Rectangle rect = new Rectangle(x_pos, y_pos, check_box_visible_size, check_box_visible_size);
|
||||||
|
|
||||||
|
g.FillRectangle(new SolidBrush(Application.CurrentSkin.CheckBoxBackgroundColor), rect.X + 2, rect.Y + 2, rect.Width - 3, rect.Height - 3);
|
||||||
|
|
||||||
|
Pen pen = new Pen(Application.CurrentSkin.Border3DTopLeftInner, 1);
|
||||||
|
g.DrawLine(pen, rect.X, rect.Y, rect.X, rect.Bottom - 2);
|
||||||
|
g.DrawLine(pen, rect.X + 1, rect.Y, rect.Right - 2, rect.Y);
|
||||||
|
|
||||||
|
pen = new Pen(Application.CurrentSkin.Border3DBottomRight, 1);
|
||||||
|
g.DrawLine(pen, rect.X + 1, rect.Y + 1, rect.X + 1, rect.Bottom - 3);
|
||||||
|
g.DrawLine(pen, rect.X + 2, rect.Y + 1, rect.Right - 3, rect.Y + 1);
|
||||||
|
|
||||||
|
pen = new Pen(Application.CurrentSkin.Border3DTopLeftInner, 1);
|
||||||
|
g.DrawLine(pen, rect.Right - 1, rect.Y, rect.Right - 1, rect.Bottom - 1);
|
||||||
|
g.DrawLine(pen, rect.X, rect.Bottom - 1, rect.Right - 1, rect.Bottom - 1);
|
||||||
|
|
||||||
|
// oh boy, matching ms is like fighting against windmills
|
||||||
|
using (Pen h_pen = new Pen(Application.CurrentSkin.CheckBoxCheckColor))
|
||||||
|
{
|
||||||
|
g.DrawLine(h_pen, rect.X + 1, rect.Bottom - 2, rect.Right - 2, rect.Bottom - 2);
|
||||||
|
g.DrawLine(h_pen, rect.Right - 2, rect.Y + 1, rect.Right - 2, rect.Bottom - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == CheckState.Checked)
|
||||||
|
DrawCheck(g, bounds, Application.CurrentSkin.CheckBoxCheckColor);
|
||||||
|
else if (state == CheckState.Indeterminate)
|
||||||
|
DrawCheck(g, bounds, Application.CurrentSkin.CheckBoxCheckColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawHotCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
DrawNormalCheckBox(g, bounds, backColor, foreColor, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawPressedCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
int check_box_visible_size = (bounds.Height > bounds.Width) ? bounds.Width : bounds.Height;
|
||||||
|
int x_pos = Math.Max(0, bounds.X + (bounds.Width / 2) - check_box_visible_size / 2);
|
||||||
|
int y_pos = Math.Max(0, bounds.Y + (bounds.Height / 2) - check_box_visible_size / 2);
|
||||||
|
|
||||||
|
Rectangle rect = new Rectangle(x_pos, y_pos, check_box_visible_size, check_box_visible_size);
|
||||||
|
|
||||||
|
g.FillRectangle(new SolidBrush(Application.CurrentSkin.CheckBoxCheckColor), rect.X + 2, rect.Y + 2, rect.Width - 3, rect.Height - 3);
|
||||||
|
|
||||||
|
Pen pen = new Pen(Application.CurrentSkin.Border3DBottomRightInner, 1);
|
||||||
|
g.DrawLine(pen, rect.X, rect.Y, rect.X, rect.Bottom - 2);
|
||||||
|
g.DrawLine(pen, rect.X + 1, rect.Y, rect.Right - 2, rect.Y);
|
||||||
|
|
||||||
|
pen = new Pen(Application.CurrentSkin.Border3DBottomRight, 1);
|
||||||
|
g.DrawLine(pen, rect.X + 1, rect.Y + 1, rect.X + 1, rect.Bottom - 3);
|
||||||
|
g.DrawLine(pen, rect.X + 2, rect.Y + 1, rect.Right - 3, rect.Y + 1);
|
||||||
|
|
||||||
|
pen = new Pen(Application.CurrentSkin.Border3DTopLeftInner, 1);
|
||||||
|
g.DrawLine(pen, rect.Right - 1, rect.Y, rect.Right - 1, rect.Bottom - 1);
|
||||||
|
g.DrawLine(pen, rect.X, rect.Bottom - 1, rect.Right - 1, rect.Bottom - 1);
|
||||||
|
|
||||||
|
// oh boy, matching ms is like fighting against windmills
|
||||||
|
using (Pen h_pen = new Pen(Application.CurrentSkin.CheckBoxCheckColor))
|
||||||
|
{
|
||||||
|
g.DrawLine(h_pen, rect.X + 1, rect.Bottom - 2, rect.Right - 2, rect.Bottom - 2);
|
||||||
|
g.DrawLine(h_pen, rect.Right - 2, rect.Y + 1, rect.Right - 2, rect.Bottom - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == CheckState.Checked)
|
||||||
|
DrawCheck(g, bounds, Application.CurrentSkin.CheckBoxCheckColor);
|
||||||
|
else if (state == CheckState.Indeterminate)
|
||||||
|
DrawCheck(g, bounds, Application.CurrentSkin.CheckBoxCheckColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawDisabledCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
DrawPressedCheckBox(g, bounds, backColor, foreColor, CheckState.Unchecked);
|
||||||
|
|
||||||
|
if (state == CheckState.Checked || state == CheckState.Indeterminate)
|
||||||
|
DrawCheck(g, bounds, SystemColors.ControlDark);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region FlatStyle
|
||||||
|
public override void DrawFlatNormalCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
DrawNormalCheckBox(g, bounds, backColor, foreColor, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawFlatHotCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
DrawFlatNormalCheckBox(g, bounds, backColor, foreColor, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawFlatPressedCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
DrawPressedCheckBox(g, bounds, backColor, foreColor, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* public override void DrawFlatDisabledCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
Rectangle checkbox_rectangle;
|
||||||
|
|
||||||
|
checkbox_rectangle = new Rectangle(bounds.X, bounds.Y, Math.Max(bounds.Width - 2, 0), Math.Max(bounds.Height - 2, 0));
|
||||||
|
|
||||||
|
WidgetPaint.DrawBorder(g, checkbox_rectangle, foreColor, ButtonBorderStyle.Solid);
|
||||||
|
|
||||||
|
bounds.Offset(-1, 0);
|
||||||
|
|
||||||
|
if (state == CheckState.Checked || state == CheckState.Indeterminate)
|
||||||
|
DrawCheck(g, bounds, SystemColors.ControlDarkDark);
|
||||||
|
}*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Popup
|
||||||
|
public override void DrawPopupNormalCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
DrawFlatNormalCheckBox(g, bounds, backColor, foreColor, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawPopupHotCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
DrawFlatNormalCheckBox(g, bounds, backColor, foreColor, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawPopupPressedCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
DrawFlatPressedCheckBox(g, bounds, backColor, foreColor, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DrawPopupDisabledCheckBox(Graphics g, Rectangle bounds, Color backColor, Color foreColor, CheckState state)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Check
|
||||||
|
public override void DrawCheck(Graphics g, Rectangle bounds, Color checkColor)
|
||||||
|
{
|
||||||
|
int check_size = (bounds.Height > bounds.Width) ? bounds.Width / 2 : bounds.Height / 2;
|
||||||
|
|
||||||
|
Pen check_pen = ResPool.GetPen(checkColor);
|
||||||
|
|
||||||
|
if (check_size < 7)
|
||||||
|
{
|
||||||
|
int lineWidth = Math.Max(3, check_size / 3);
|
||||||
|
int Scale = Math.Max(1, check_size / 9);
|
||||||
|
|
||||||
|
Rectangle rect = new Rectangle(bounds.X + (bounds.Width / 2) - (check_size / 2) - 1, bounds.Y + (bounds.Height / 2) - (check_size / 2) - 1,
|
||||||
|
check_size, check_size);
|
||||||
|
|
||||||
|
for (int i = 0; i < lineWidth; i++)
|
||||||
|
{
|
||||||
|
g.DrawLine(check_pen, rect.Left + lineWidth / 2, rect.Top + lineWidth + i, rect.Left + lineWidth / 2 + 2 * Scale, rect.Top + lineWidth + 2 * Scale + i);
|
||||||
|
g.DrawLine(check_pen, rect.Left + lineWidth / 2 + 2 * Scale, rect.Top + lineWidth + 2 * Scale + i, rect.Left + lineWidth / 2 + 6 * Scale, rect.Top + lineWidth - 2 * Scale + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int lineWidth = Math.Max(3, check_size / 3) + 1;
|
||||||
|
|
||||||
|
int x_half = bounds.Width / 2;
|
||||||
|
int y_half = bounds.Height / 2;
|
||||||
|
|
||||||
|
Rectangle rect = new Rectangle(bounds.X + x_half - (check_size / 2) - 1, bounds.Y + y_half - (check_size / 2),
|
||||||
|
check_size, check_size);
|
||||||
|
|
||||||
|
int gradient_left = check_size / 3;
|
||||||
|
int gradient_right = check_size - gradient_left - 1;
|
||||||
|
|
||||||
|
for (int i = 0; i < lineWidth; i++)
|
||||||
|
{
|
||||||
|
g.DrawLine(check_pen, rect.X, rect.Bottom - 1 - gradient_left - i, rect.X + gradient_left, rect.Bottom - 1 - i);
|
||||||
|
g.DrawLine(check_pen, rect.X + gradient_left, rect.Bottom - 1 - i, rect.Right - 1, rect.Bottom - i - 1 - gradient_right);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
internal class ButtonPainter : Default.ButtonPainter
|
internal class ButtonPainter : Default.ButtonPainter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
5903
source/WindowsFormsApplication1/Apps/Shifter.Designer.cs
generated
5903
source/WindowsFormsApplication1/Apps/Shifter.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -19,6 +19,7 @@ namespace ShiftOS
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public Skinning.Skin CustomizingSkin = null;
|
public Skinning.Skin CustomizingSkin = null;
|
||||||
public Skinning.Images CustomizingImages = null;
|
public Skinning.Images CustomizingImages = null;
|
||||||
private bool EarnCP = false;
|
private bool EarnCP = false;
|
||||||
|
@ -1442,7 +1443,7 @@ namespace ShiftOS
|
||||||
HideAll();
|
HideAll();
|
||||||
pnlmenuoptions.Show();
|
pnlmenuoptions.Show();
|
||||||
pnlmenuoptions.BringToFront();
|
pnlmenuoptions.BringToFront();
|
||||||
SetPreviewSkin(true);*/
|
SetPreviewSkin(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Button2_Click(object sender, EventArgs e)
|
private void Button2_Click(object sender, EventArgs e)
|
||||||
|
@ -3088,6 +3089,6 @@ You can add options in the Lua interpreter using the shifter_add_category(string
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace ShiftOS
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string content = wc.DownloadString(url.Replace("shiftnet://", "http://www.playshiftos.ml/shiftnet/www/"));
|
string content = wc.DownloadString(url.Replace("shiftnet://", "http://releases.playshiftos.ml/shiftnet/www/"));
|
||||||
if (content.StartsWith("<!STML>"))
|
if (content.StartsWith("<!STML>"))
|
||||||
{
|
{
|
||||||
LastUrl = url;
|
LastUrl = url;
|
||||||
|
|
|
@ -14,6 +14,8 @@ using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ShiftUI;
|
using ShiftUI;
|
||||||
|
using ShiftOS.FinalMission;
|
||||||
|
using ShiftOS;
|
||||||
|
|
||||||
namespace ShiftOS
|
namespace ShiftOS
|
||||||
{
|
{
|
||||||
|
@ -1383,15 +1385,40 @@ Password: z7fjsd3");
|
||||||
|
|
||||||
public void DoCommand()
|
public void DoCommand()
|
||||||
{
|
{
|
||||||
API.LastRanCommand = command;
|
//Grab the type of this class using Reflection.
|
||||||
string[] args = command.ToLower().Split(' ');
|
var terminal = this.GetType();
|
||||||
switch (args[0])
|
string[] cmdargs = command.Split(' ');
|
||||||
|
var method_info = terminal.GetMethod("cmd_" + cmdargs[0].ToLower());
|
||||||
|
if(method_info != null)
|
||||||
{
|
{
|
||||||
case "ls":
|
method_info.Invoke(this, new object[] { cmdargs });
|
||||||
case "dir":
|
}
|
||||||
if(API.Upgrades["fileskimmer"])
|
else
|
||||||
{
|
{
|
||||||
foreach(var d in Directory.GetDirectories(current_dir))
|
terminal.GetMethod("cmd_default").Invoke(this, new object[] { cmdargs });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Terminal command methods
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adding terminal commands has been changed.
|
||||||
|
*
|
||||||
|
* It's now done in a way that doesn't require hardcoding.
|
||||||
|
*
|
||||||
|
* Simply add a new method here with a prefix 'cmd_', for example 'cmd_05tray', and
|
||||||
|
* one argument of type 'string[]'. Then, put all the stuff you want your command to
|
||||||
|
* do in that method, and try running your command (without the 'cmd_' prefix) in the
|
||||||
|
* Terminal and it should work just fine.
|
||||||
|
*
|
||||||
|
* Thanks to @carverh for inspiring this by making all commands their own function.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public void cmd_dir(String[] args)
|
||||||
|
{
|
||||||
|
if (API.Upgrades["fileskimmer"])
|
||||||
|
{
|
||||||
|
foreach (var d in Directory.GetDirectories(current_dir))
|
||||||
{
|
{
|
||||||
WriteLine($"[DIR] {new DirectoryInfo(d).Name}");
|
WriteLine($"[DIR] {new DirectoryInfo(d).Name}");
|
||||||
}
|
}
|
||||||
|
@ -1404,8 +1431,12 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "cd":
|
|
||||||
|
public void cmd_cd(String[] args)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
if (API.Upgrades["fileskimmer"])
|
if (API.Upgrades["fileskimmer"])
|
||||||
{
|
{
|
||||||
if (args[1] == "..")
|
if (args[1] == "..")
|
||||||
|
@ -1432,13 +1463,21 @@ Password: z7fjsd3");
|
||||||
SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> ");
|
SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "upg":
|
catch (Exception e)
|
||||||
if(API.DeveloperMode)
|
{
|
||||||
|
WriteLine("cd: " + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void cmd_upg(String[] args)
|
||||||
|
{
|
||||||
|
if (API.DeveloperMode)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
switch(args[1])
|
switch (args[1])
|
||||||
{
|
{
|
||||||
case "get":
|
case "get":
|
||||||
WriteLine(API.Upgrades[args[2]].ToString());
|
WriteLine(API.Upgrades[args[2]].ToString());
|
||||||
|
@ -1454,8 +1493,10 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "endgame_test":
|
|
||||||
|
public void cmd_endgame_test(String[] args)
|
||||||
|
{
|
||||||
if (API.DeveloperMode)
|
if (API.DeveloperMode)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -1483,11 +1524,15 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "htutorial":
|
|
||||||
|
public void cmd_htutorial(String[] args)
|
||||||
|
{
|
||||||
ShiftOS.Hacking.StartBattleTutorial();
|
ShiftOS.Hacking.StartBattleTutorial();
|
||||||
break;
|
}
|
||||||
case "fake_buy":
|
|
||||||
|
public void cmd_fake_buy(String[] args)
|
||||||
|
{
|
||||||
if (API.DeveloperMode)
|
if (API.DeveloperMode)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -1514,14 +1559,16 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "connections":
|
|
||||||
|
public void cmd_connections(String[] args)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
switch(args[1])
|
switch (args[1])
|
||||||
{
|
{
|
||||||
case "list":
|
case "list":
|
||||||
foreach(var client in Package_Grabber.clients)
|
foreach (var client in Package_Grabber.clients)
|
||||||
{
|
{
|
||||||
WriteLine($"Hostname: {client.Key}, Port: {client.Value.RemotePort}, Online: {client.Value.IsConnected}");
|
WriteLine($"Hostname: {client.Key}, Port: {client.Value.RemotePort}, Online: {client.Value.IsConnected}");
|
||||||
}
|
}
|
||||||
|
@ -1530,7 +1577,7 @@ Password: z7fjsd3");
|
||||||
API.CreateForm(new ConnectionManager(), "Connections", API.GetIcon("Connections"));
|
API.CreateForm(new ConnectionManager(), "Connections", API.GetIcon("Connections"));
|
||||||
break;
|
break;
|
||||||
case "drop":
|
case "drop":
|
||||||
foreach(var client in Package_Grabber.clients)
|
foreach (var client in Package_Grabber.clients)
|
||||||
{
|
{
|
||||||
Package_Grabber.Disconnect(client.Key);
|
Package_Grabber.Disconnect(client.Key);
|
||||||
}
|
}
|
||||||
|
@ -1552,7 +1599,8 @@ Password: z7fjsd3");
|
||||||
c.Connect(host, port);
|
c.Connect(host, port);
|
||||||
WriteLine("Re-established connection with host.");
|
WriteLine("Re-established connection with host.");
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
WriteLine("This host has been connected to already.");
|
WriteLine("This host has been connected to already.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1563,13 +1611,15 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
WriteLine("connections: Missing arguments.");
|
WriteLine("connections: Missing arguments.");
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "story":
|
|
||||||
if(API.DeveloperMode == true && API.Upgrades["shiftnet"])
|
public void cmd_story(String[] args)
|
||||||
|
{
|
||||||
|
if (API.DeveloperMode == true && API.Upgrades["shiftnet"])
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
switch(args[1])
|
switch (args[1])
|
||||||
{
|
{
|
||||||
case "aidennirh":
|
case "aidennirh":
|
||||||
StartAidenNirhStory();
|
StartAidenNirhStory();
|
||||||
|
@ -1594,8 +1644,10 @@ Password: z7fjsd3");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { wrongcommand(); }
|
else { wrongcommand(); }
|
||||||
break;
|
}
|
||||||
case "make":
|
|
||||||
|
public void cmd_make(String[] args)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string path = command.Replace("make ", "");
|
string path = command.Replace("make ", "");
|
||||||
|
@ -1614,12 +1666,14 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
WriteLine("make: Invalid arguments.");
|
WriteLine("make: Invalid arguments.");
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "linux":
|
|
||||||
if(API.DeveloperMode)
|
public void cmd_devupg(String[] args)
|
||||||
|
{
|
||||||
|
if (API.DeveloperMode)
|
||||||
{
|
{
|
||||||
WriteLine("Upgrading your system...");
|
WriteLine("Upgrading your system...");
|
||||||
foreach(var upg in Shiftorium.Utilities.GetAvailable())
|
foreach (var upg in Shiftorium.Utilities.GetAvailable())
|
||||||
{
|
{
|
||||||
API.Upgrades[upg.id] = true;
|
API.Upgrades[upg.id] = true;
|
||||||
WriteLine("Installed upgrade \"" + upg.Name + "\"...");
|
WriteLine("Installed upgrade \"" + upg.Name + "\"...");
|
||||||
|
@ -1631,13 +1685,17 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "netgen":
|
|
||||||
|
public void cmd_netgen(String[] args)
|
||||||
|
{
|
||||||
WriteLine("Starting netgen...");
|
WriteLine("Starting netgen...");
|
||||||
API.CreateForm(new NetGen(), "Network Generator", API.GetIcon("Terminal"));
|
API.CreateForm(new NetGen(), "Network Generator", API.GetIcon("Terminal"));
|
||||||
break;
|
}
|
||||||
case "lua":
|
|
||||||
if(API.DeveloperMode == true)
|
public void cmd_lua(String[] args)
|
||||||
|
{
|
||||||
|
if (API.DeveloperMode == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1678,9 +1736,11 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "hack":
|
|
||||||
if(API.Upgrades["hacking"] == true)
|
public void cmd_hack(String[] args)
|
||||||
|
{
|
||||||
|
if (API.Upgrades["hacking"] == true)
|
||||||
{
|
{
|
||||||
StartHackingSession("random");
|
StartHackingSession("random");
|
||||||
}
|
}
|
||||||
|
@ -1688,24 +1748,26 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "virusscanner":
|
|
||||||
case "vscan":
|
public void cmd_vscan(String[] args)
|
||||||
if(API.Upgrades["virusscanner"] == true)
|
{
|
||||||
|
if (API.Upgrades["virusscanner"] == true)
|
||||||
{
|
{
|
||||||
WriteLine("Scanning for infected files...");
|
WriteLine("Scanning for infected files...");
|
||||||
var goodList = new Dictionary<string, string>();
|
var goodList = new Dictionary<string, string>();
|
||||||
foreach (KeyValuePair<string, string> kv in Viruses.Infections)
|
foreach (KeyValuePair<string, string> kv in Viruses.Infections)
|
||||||
{
|
{
|
||||||
if(kv.Value.Contains(";"))
|
if (kv.Value.Contains(";"))
|
||||||
{
|
{
|
||||||
foreach(string file in kv.Value.Split(';'))
|
foreach (string file in kv.Value.Split(';'))
|
||||||
{
|
{
|
||||||
if (goodList.ContainsKey(file))
|
if (goodList.ContainsKey(file))
|
||||||
{
|
{
|
||||||
goodList[file] += ", " + kv.Key;
|
goodList[file] += ", " + kv.Key;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
goodList.Add(file, kv.Key);
|
goodList.Add(file, kv.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1716,7 +1778,8 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
goodList[kv.Value] += ", " + kv.Key;
|
goodList[kv.Value] += ", " + kv.Key;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
goodList.Add(kv.Value, kv.Key);
|
goodList.Add(kv.Value, kv.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1736,8 +1799,10 @@ Password: z7fjsd3");
|
||||||
WriteLine("No infections found. You are safe.");
|
WriteLine("No infections found. You are safe.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "infections":
|
|
||||||
|
public void cmd_infections(String[] args)
|
||||||
|
{
|
||||||
if (API.DeveloperMode == true)
|
if (API.DeveloperMode == true)
|
||||||
{
|
{
|
||||||
foreach (KeyValuePair<string, string> kv in Viruses.Infections)
|
foreach (KeyValuePair<string, string> kv in Viruses.Infections)
|
||||||
|
@ -1749,22 +1814,27 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "binarywater":
|
|
||||||
|
public void cmd_binarywater(String[] args)
|
||||||
|
{
|
||||||
if (API.DeveloperMode)
|
if (API.DeveloperMode)
|
||||||
{
|
{
|
||||||
ShiftOS.Hacking.AddCharacter(new Character("Philip Adams", "Hello, and welcome to another episode of OSFirstTimer.", 100, 100, 0));
|
ShiftOS.Hacking.AddCharacter(new Character("Philip Adams", "Hello, and welcome to another episode of OSFirstTimer.", 100, 100, 0));
|
||||||
WriteLine("Philip Adams is now in the list of hirable hackers.");
|
WriteLine("Philip Adams is now in the list of hirable hackers.");
|
||||||
|
WriteLine("\" I Don't Think This is Canon \" -Carver");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WriteLine("I see you went in the ShiftOS source code... ummm yeah... this isn't a developer mode release so I can't just give you a full-skilled hacker even if you beg.");
|
WriteLine("I see you went in the ShiftOS source code... ummm yeah... this isn't a developer mode release so I can't just give you a full-skilled hacker even if you beg.");
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "color":
|
|
||||||
|
public void cmd_color(String[] args)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(API.Upgrades["setterminalcolors"] == true)
|
if (API.Upgrades["setterminalcolors"] == true)
|
||||||
{
|
{
|
||||||
|
|
||||||
Color bcol = SetColor(args[1]);
|
Color bcol = SetColor(args[1]);
|
||||||
|
@ -1774,12 +1844,14 @@ Password: z7fjsd3");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
WriteLine("color: Missing arguments.");
|
WriteLine("color: Missing arguments.");
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "encrypt":
|
|
||||||
|
public void cmd_encrypt(String[] args)
|
||||||
|
{
|
||||||
if (API.DeveloperMode == true)
|
if (API.DeveloperMode == true)
|
||||||
{
|
{
|
||||||
string messageToEncrypt = command.Replace("encrypt ", "");
|
string messageToEncrypt = command.Replace("encrypt ", "");
|
||||||
|
@ -1790,12 +1862,14 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "font":
|
|
||||||
if(API.Upgrades["setterminalfont"] == true)
|
public void cmd_font(String[] args)
|
||||||
|
{
|
||||||
|
if (API.Upgrades["setterminalfont"] == true)
|
||||||
{
|
{
|
||||||
var fname = command.Replace("font ", "");
|
var fname = command.Replace("font ", "");
|
||||||
if(GetFonts().Contains(fname))
|
if (GetFonts().Contains(fname))
|
||||||
{
|
{
|
||||||
API.CurrentSkin.TerminalFontStyle = fname;
|
API.CurrentSkin.TerminalFontStyle = fname;
|
||||||
}
|
}
|
||||||
|
@ -1808,11 +1882,13 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "colorlist":
|
|
||||||
if(API.Upgrades["setterminalcolors"] == true)
|
public void cmd_colorlist(String[] args)
|
||||||
{
|
{
|
||||||
foreach(string itm in GetColorList())
|
if (API.Upgrades["setterminalcolors"] == true)
|
||||||
|
{
|
||||||
|
foreach (string itm in GetColorList())
|
||||||
{
|
{
|
||||||
WriteLine(itm);
|
WriteLine(itm);
|
||||||
}
|
}
|
||||||
|
@ -1821,8 +1897,10 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "spkg":
|
|
||||||
|
public void cmd_spkg(String[] args)
|
||||||
|
{
|
||||||
if (!API.LimitedMode)
|
if (!API.LimitedMode)
|
||||||
{
|
{
|
||||||
if (API.Upgrades["shiftnet"] == true)
|
if (API.Upgrades["shiftnet"] == true)
|
||||||
|
@ -1884,9 +1962,9 @@ Password: z7fjsd3");
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(args[2] == "god_utils")
|
if (args[2] == "god_utils")
|
||||||
{
|
{
|
||||||
if(FinalMission.EndGameHandler.GodModeInstallEnabled == true)
|
if (FinalMission.EndGameHandler.GodModeInstallEnabled == true)
|
||||||
{
|
{
|
||||||
var t = new Thread(new ThreadStart(new Action(() =>
|
var t = new Thread(new ThreadStart(new Action(() =>
|
||||||
{
|
{
|
||||||
|
@ -1897,9 +1975,7 @@ Password: z7fjsd3");
|
||||||
WriteLine("Beginning installation.");
|
WriteLine("Beginning installation.");
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
WriteLine(@" == GOD MODE ==
|
WriteLine(@" == GOD MODE ==
|
||||||
|
|
||||||
God Mode gives you FULL control of ShiftOS. You can add/remove Codepoints, buy or unbuy Shiftorium upgrades, and can do whatever you want.
|
God Mode gives you FULL control of ShiftOS. You can add/remove Codepoints, buy or unbuy Shiftorium upgrades, and can do whatever you want.
|
||||||
|
|
||||||
Installing core applications...");
|
Installing core applications...");
|
||||||
Thread.Sleep(250);
|
Thread.Sleep(250);
|
||||||
WriteLine("Installing subpackage 'json_edit'...");
|
WriteLine("Installing subpackage 'json_edit'...");
|
||||||
|
@ -1909,7 +1985,6 @@ Installing core applications...");
|
||||||
WriteLine("Installing subpackage 'hijacker'...");
|
WriteLine("Installing subpackage 'hijacker'...");
|
||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
WriteLine(@" == HIJACKER by DevX ==
|
WriteLine(@" == HIJACKER by DevX ==
|
||||||
|
|
||||||
HIJACKER is a utility that allows you to hijack any system and install ShiftOS on it during a hacker battle.");
|
HIJACKER is a utility that allows you to hijack any system and install ShiftOS on it during a hacker battle.");
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
WriteLine("[hijacker] Injecting HIJACKER code into hbattleui.sft...");
|
WriteLine("[hijacker] Injecting HIJACKER code into hbattleui.sft...");
|
||||||
|
@ -1937,11 +2012,17 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
WriteLine("spkg: Missing arguments.");
|
WriteLine("spkg: Missing arguments.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "alias":
|
|
||||||
|
/// <summary>
|
||||||
|
/// Command Functions, to Be Used For ShiftBatch
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args">String[] args</param>
|
||||||
|
public void cmd_alias(String[] args)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
switch(args[1])
|
switch (args[1])
|
||||||
{
|
{
|
||||||
case "-?":
|
case "-?":
|
||||||
case "--help":
|
case "--help":
|
||||||
|
@ -1955,7 +2036,7 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
break;
|
break;
|
||||||
case "--add":
|
case "--add":
|
||||||
case "-a":
|
case "-a":
|
||||||
if(API.AddAlias(args[2], command.Replace("alias " + args[1] + " " + args[2] + " ", "")))
|
if (API.AddAlias(args[2], command.Replace("alias " + args[1] + " " + args[2] + " ", "")))
|
||||||
{
|
{
|
||||||
WriteLine("Alias added successfully.");
|
WriteLine("Alias added successfully.");
|
||||||
API.SaveAliases();
|
API.SaveAliases();
|
||||||
|
@ -1967,7 +2048,7 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
break;
|
break;
|
||||||
case "--delete":
|
case "--delete":
|
||||||
case "-d":
|
case "-d":
|
||||||
if(API.RemoveAlias(args[2]) == true)
|
if (API.RemoveAlias(args[2]) == true)
|
||||||
{
|
{
|
||||||
WriteLine("Alias \"" + args[2] + "\" removed successfully.");
|
WriteLine("Alias \"" + args[2] + "\" removed successfully.");
|
||||||
API.SaveAliases();
|
API.SaveAliases();
|
||||||
|
@ -1980,7 +2061,7 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
case "-l":
|
case "-l":
|
||||||
case "--list":
|
case "--list":
|
||||||
WriteLine("Aliases:");
|
WriteLine("Aliases:");
|
||||||
foreach(KeyValuePair<string, string> kv in API.CommandAliases)
|
foreach (KeyValuePair<string, string> kv in API.CommandAliases)
|
||||||
{
|
{
|
||||||
WriteLine(kv.Key + " => " + kv.Value);
|
WriteLine(kv.Key + " => " + kv.Value);
|
||||||
}
|
}
|
||||||
|
@ -1994,9 +2075,11 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
WriteLine("alias: Missing arguments. Try alias --help for help with the Alias command.");
|
WriteLine("alias: Missing arguments. Try alias --help for help with the Alias command.");
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "username":
|
|
||||||
if(API.Upgrades["customusername"] == true)
|
public void cmd_username(String[] args)
|
||||||
|
{
|
||||||
|
if (API.Upgrades["customusername"] == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2011,8 +2094,10 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "osname":
|
|
||||||
|
public void cmd_osname(String[] args)
|
||||||
|
{
|
||||||
if (API.Upgrades["customusername"] == true)
|
if (API.Upgrades["customusername"] == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -2028,32 +2113,40 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
|
|
||||||
case "unity":
|
public void cmd_unity(String[] args)
|
||||||
|
{
|
||||||
if (API.Upgrades["unitymode"] == true)
|
if (API.Upgrades["unitymode"] == true)
|
||||||
{
|
{
|
||||||
API.CurrentSession.SetUnityMode();
|
API.CurrentSession.SetUnityMode();
|
||||||
API.CurrentSession.SetupDesktop();
|
API.CurrentSession.SetupDesktop();
|
||||||
txtterm.Focus();
|
txtterm.Focus();
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "time":
|
|
||||||
|
public void cmd_time(String[] args)
|
||||||
|
{
|
||||||
if (API.Upgrades["pmandam"] == false)
|
if (API.Upgrades["pmandam"] == false)
|
||||||
{
|
{
|
||||||
if (API.Upgrades["hourssincemidnight"] == false)
|
if (API.Upgrades["hourssincemidnight"] == false)
|
||||||
{
|
{
|
||||||
if (API.Upgrades["minutessincemidnight"] == false)
|
if (API.Upgrades["minutessincemidnight"] == false)
|
||||||
{
|
{
|
||||||
if (API.Upgrades["secondssincemidnight"] == true) {
|
if (API.Upgrades["secondssincemidnight"] == true)
|
||||||
|
{
|
||||||
WriteLine("Since midnight, " + API.GetTime() + " seconds have passed.");
|
WriteLine("Since midnight, " + API.GetTime() + " seconds have passed.");
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
WriteLine("Since midnight, " + API.GetTime() + " minutes have passed.");
|
WriteLine("Since midnight, " + API.GetTime() + " minutes have passed.");
|
||||||
}
|
}
|
||||||
|
@ -2062,13 +2155,17 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
WriteLine("Since Midnight, " + API.GetTime() + " hours have passed.");
|
WriteLine("Since Midnight, " + API.GetTime() + " hours have passed.");
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
WriteLine("Current time: " + API.GetTime());
|
WriteLine("Current time: " + API.GetTime());
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "saa":
|
|
||||||
if (API.Upgrades["shiftnet"]) {
|
public void cmd_saa(String[] args)
|
||||||
|
{
|
||||||
|
if (API.Upgrades["shiftnet"])
|
||||||
|
{
|
||||||
var f = command.Replace("saa ", "");
|
var f = command.Replace("saa ", "");
|
||||||
if (f.StartsWith("/"))
|
if (f.StartsWith("/"))
|
||||||
{
|
{
|
||||||
|
@ -2101,8 +2198,10 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "help":
|
|
||||||
|
public void cmd_help(String[] args)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
showhelp(args[1]);
|
showhelp(args[1]);
|
||||||
|
@ -2111,18 +2210,25 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
showhelp();
|
showhelp();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "codepoints":
|
|
||||||
case "cp":
|
public void cmd_cp(String[] args)
|
||||||
|
{
|
||||||
WriteLine("You have " + API.Codepoints.ToString() + " Codepoints.");
|
WriteLine("You have " + API.Codepoints.ToString() + " Codepoints.");
|
||||||
break;
|
}
|
||||||
case "shutdown":
|
|
||||||
|
public void cmd_shutdown(String[] args)
|
||||||
|
{
|
||||||
API.ShutDownShiftOS();
|
API.ShutDownShiftOS();
|
||||||
break;
|
}
|
||||||
case "clear":
|
|
||||||
|
public void cmd_clear(String[] args)
|
||||||
|
{
|
||||||
txtterm.Text = "";
|
txtterm.Text = "";
|
||||||
break;
|
}
|
||||||
case "close":
|
|
||||||
|
public void cmd_close(String[] args)
|
||||||
|
{
|
||||||
if (command.Contains("close "))
|
if (command.Contains("close "))
|
||||||
{
|
{
|
||||||
var pid = command.Replace("close ", "");
|
var pid = command.Replace("close ", "");
|
||||||
|
@ -2139,19 +2245,23 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
WriteLine("Insufficient arguments.");
|
WriteLine("Insufficient arguments.");
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "05tray":
|
|
||||||
|
public void cmd_05tray(String[] args)
|
||||||
|
{
|
||||||
if (API.DeveloperMode == true)
|
if (API.DeveloperMode == true)
|
||||||
{
|
{
|
||||||
API.AddCodepoints(500);
|
API.AddCodepoints(500);
|
||||||
WriteLine("You've been granted 500 Codepoints.");
|
WriteLine("You've been granted 500 Codepoints.");
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
public void cmd_debug(String[] args)
|
||||||
case "debug":
|
{
|
||||||
if (API.DeveloperMode == true)
|
if (API.DeveloperMode == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -2176,7 +2286,9 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
WriteLine("debug: " + ex.Message);
|
WriteLine("debug: " + ex.Message);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
switch (args[1].ToLower())
|
switch (args[1].ToLower())
|
||||||
|
@ -2186,17 +2298,20 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
API.DeveloperMode = true;
|
API.DeveloperMode = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wrongcommand();
|
WriteLine("debug: lp0 is on fire"); // Keeps Cheaters from Flooding The Fourms With "The Debug Mode Doesn't Work"
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch
|
}
|
||||||
|
catch
|
||||||
{
|
{
|
||||||
wrongcommand(); //Debug command pretends to be an invalid command if an exception is thrown.
|
WriteLine("debug: lp0 is on fire"); // Keeps Cheaters from Flooding The Fourms With "The Debug Mode Doesn't Work"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "echo":
|
|
||||||
if(command.Contains("echo "))
|
public void cmd_echo(String[] args)
|
||||||
|
{
|
||||||
|
if (command.Contains("echo "))
|
||||||
{
|
{
|
||||||
WriteLine(command.Replace("echo ", ""));
|
WriteLine(command.Replace("echo ", ""));
|
||||||
}
|
}
|
||||||
|
@ -2204,20 +2319,18 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
{
|
{
|
||||||
WriteLine("echo: Insufficient Parameters.");
|
WriteLine("echo: Insufficient Parameters.");
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
case "syncsave":
|
|
||||||
WriteLine("Command removed.");
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
public void cmd_default(String[] args)
|
||||||
|
{
|
||||||
if (API.OpenProgram(args[0]) == false)
|
if (API.OpenProgram(args[0]) == false)
|
||||||
{
|
{
|
||||||
if (API.Upgrades["trmfiles"] == false)
|
if (API.Upgrades["trmfiles"] == false)
|
||||||
{
|
{
|
||||||
bool done = false;
|
bool done = false;
|
||||||
foreach(KeyValuePair<string, string> kv in API.CommandAliases)
|
foreach (KeyValuePair<string, string> kv in API.CommandAliases)
|
||||||
{
|
{
|
||||||
if(kv.Key == command)
|
if (kv.Key == command)
|
||||||
{
|
{
|
||||||
command = kv.Value;
|
command = kv.Value;
|
||||||
done = true;
|
done = true;
|
||||||
|
@ -2225,7 +2338,7 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(done == false)
|
if (done == false)
|
||||||
{
|
{
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
|
@ -2267,10 +2380,30 @@ HIJACKER is a utility that allows you to hijack any system and install ShiftOS o
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// About Box, Created By Carver Harrison
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args">String[] args</param>
|
||||||
|
public void cmd_about(String[] args)
|
||||||
|
{
|
||||||
|
API.CreateInfoboxSession("About ShiftOS", "ShiftOS Version " + ProductVersion + "\n Copyright 2014-2016 ShiftOS Dev Team \n Type 'credits' in Terminal to Show Credits", infobox.InfoboxMode.Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HISTACOM REFERENCES, DO NOT REMOVE, CRUCIAL FOR SECRET STORY ARC
|
||||||
|
public void cmd_histacom_year(String[] args)
|
||||||
|
{
|
||||||
|
WriteLine("Year: 2002");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void cmd_histacom_timedistorter(String[] args)
|
||||||
|
{
|
||||||
|
WriteLine("Install 'timedistorter' by going to shiftnet://12padams");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
private void StartChoice1EndStory()
|
private void StartChoice1EndStory()
|
||||||
{
|
{
|
||||||
var t = new ShiftUI.Timer();
|
var t = new ShiftUI.Timer();
|
||||||
|
|
|
@ -188,7 +188,7 @@ namespace ShiftOS
|
||||||
Directory.CreateDirectory(downloadpath);
|
Directory.CreateDirectory(downloadpath);
|
||||||
}
|
}
|
||||||
WebClient wc = new WebClient();
|
WebClient wc = new WebClient();
|
||||||
wc.DownloadFile("http://playshiftos.ml/shiftnet/packages/" + pkgname + ".pkg", downloadpath + pkgname + ".pkg");
|
wc.DownloadFile("http://releases.playshiftos.ml/shiftnet/packages/" + pkgname + ".pkg", downloadpath + pkgname + ".pkg");
|
||||||
LastPackage_DownloadPath = downloadpath + pkgname + ".pkg";
|
LastPackage_DownloadPath = downloadpath + pkgname + ".pkg";
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
Loading…
Add table
Reference in a new issue