mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
commit
ba80dcf3f8
643 changed files with 215930 additions and 5960 deletions
28
LinuxLauncher/README.md
Normal file
28
LinuxLauncher/README.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
This is an attempt to get ShiftOS working well on Linux using Wine and
|
||||
Mono.
|
||||
|
||||
The launcher script needs a copy of the game (try extracting Debug.zip
|
||||
from the AppVeyor project) in a directory called "data". It will set up
|
||||
a new Wine prefix in ~/.local/share/ShiftOS and the game itself can be
|
||||
found in ~/.local/share/ShiftOS/drive_c/ShiftOS. Ultimately I want to
|
||||
make an AUR package of this script if all goes to plan.
|
||||
|
||||
## known bugs
|
||||
|
||||
* the first time you start the game, the Wine virtual desktop doesn't
|
||||
enable properly
|
||||
* text input boxes are white on white
|
||||
* the terminal puts an extra newline after displaying the prompt
|
||||
* Aiden Nirh's cutscene has weird overlapping text
|
||||
* ShiftLetters seems to have no available word lists. Clicking Play
|
||||
crashes the game.
|
||||
* the ShiftOS desktop can go in front of applications
|
||||
* there is a blue border from the Wine desktop (I want to change that
|
||||
to black, but I also don't want it showing through while the game is
|
||||
running)
|
||||
* CSharpCodeProvider doesn't seem to work, so Python mods won't load
|
||||
|
||||
## anticipated tricky bits
|
||||
|
||||
* Web browser
|
||||
* Unity mode
|
94
LinuxLauncher/shiftos.py
Normal file
94
LinuxLauncher/shiftos.py
Normal file
|
@ -0,0 +1,94 @@
|
|||
#!/usr/bin/env python
|
||||
import os, xdg.BaseDirectory, sys, subprocess, tempfile, distutils.spawn
|
||||
|
||||
def GetPrimaryDisplayCurrentResolution():
|
||||
xrandr = subprocess.check_output(["xrandr"])
|
||||
if not isinstance(xrandr, str):
|
||||
xrandr = xrandr.decode()
|
||||
elems = xrandr.splitlines()
|
||||
item = ""
|
||||
res = None
|
||||
while not item.startswith(" "):
|
||||
item = elems.pop()
|
||||
while item.startswith(" "):
|
||||
if "*" in item:
|
||||
res = item.split(" ")[1]
|
||||
break
|
||||
item = elems.pop()
|
||||
if not res:
|
||||
raise OSError("Failed to find the screen resolution.")
|
||||
return res
|
||||
|
||||
def RunCmd(cmd):
|
||||
if os.system(cmd) != 0:
|
||||
raise OSError(cmd)
|
||||
|
||||
def SetRegistryKeys(dictionary):
|
||||
with tempfile.NamedTemporaryFile(suffix = ".reg") as reg:
|
||||
regdata = "Windows Registry Editor Version 5.00\r\n"
|
||||
for key, val in dictionary.items():
|
||||
seg = key.split("\\")
|
||||
path = "\\".join(seg[:-1])
|
||||
realkey = seg[-1]
|
||||
regdata += '\r\n[{0}]\r\n"{1}"="{2}"\r\n'.format(path, realkey, val)
|
||||
reg.write(regdata.encode())
|
||||
reg.flush()
|
||||
RunCmd("{0} regedit /C {1}".format(WinePath, reg.name))
|
||||
|
||||
def UpdateSymlinks(src, dest):
|
||||
src = os.path.abspath(src)
|
||||
dest = os.path.abspath(dest)
|
||||
|
||||
# Add new directories and symlinks to the destination folder.
|
||||
for subdir, dirs, files in os.walk(src):
|
||||
for dirname in dirs:
|
||||
destpath = os.path.join(dest, os.path.relpath(subdir, src), dirname)
|
||||
if not os.path.isdir(destpath):
|
||||
os.makedirs(destpath)
|
||||
for fname in files:
|
||||
srcpath = os.path.join(subdir, fname)
|
||||
destpath = os.path.join(dest, os.path.relpath(subdir, src), fname)
|
||||
if not os.path.exists(destpath):
|
||||
os.symlink(srcpath, destpath)
|
||||
|
||||
# Prune old symlinks from the destination folder.
|
||||
for subdir, dirs, files in os.walk(dest):
|
||||
for fname in files:
|
||||
srcpath = os.path.join(subdir, fname)
|
||||
destpath = os.path.join(dest, os.path.relpath(subdir, src), fname)
|
||||
if os.path.islink(destpath):
|
||||
if os.readlink(destpath).startswith(src):
|
||||
if not os.path.exists(srcpath):
|
||||
os.remove(destpath)
|
||||
|
||||
GamePath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
GlobalDataPath = os.path.join(GamePath, "data")
|
||||
|
||||
WinePath = distutils.spawn.find_executable("wine64")
|
||||
if not WinePath:
|
||||
WinePath = distutils.spawn.find_executable("wine")
|
||||
if not WinePath:
|
||||
raise FileNotFoundError("Could not find 'wine64' or 'wine'.")
|
||||
|
||||
HomePath = os.path.join(xdg.BaseDirectory.xdg_data_home, "ShiftOS")
|
||||
LocalDataPath = os.path.join(HomePath, "drive_c", "ShiftOS")
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
os.environ["WINEPREFIX"] = HomePath
|
||||
|
||||
if not os.path.exists(HomePath):
|
||||
RunCmd("wineboot")
|
||||
|
||||
UpdateSymlinks(GlobalDataPath, LocalDataPath)
|
||||
|
||||
os.chdir(LocalDataPath)
|
||||
|
||||
SetRegistryKeys(
|
||||
{
|
||||
r"HKEY_CURRENT_USER\Software\Wine\Explorer\Desktop": "Default",
|
||||
r"HKEY_CURRENT_USER\Software\Wine\Explorer\Desktops\Default": GetPrimaryDisplayCurrentResolution()
|
||||
})
|
||||
|
||||
RunCmd("{0} ShiftOS.WinForms.exe".format(WinePath))
|
|
@ -13,6 +13,14 @@
|
|||
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Scripting" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.1.2.22" newVersion="1.1.2.22" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="IronPython" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.7.0" newVersion="2.7.7.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -32,7 +32,6 @@ using ShiftOS.Engine;
|
|||
|
||||
namespace ModLauncher
|
||||
{
|
||||
[Namespace("modlauncher")]
|
||||
public static class Program
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -43,15 +42,5 @@ namespace ModLauncher
|
|||
{
|
||||
ShiftOS.WinForms.Program.Main();
|
||||
}
|
||||
|
||||
[Command("throwcrash")]
|
||||
public static bool ThrowCrash()
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
throw new Exception("User triggered crash using modlauncher.throwcrash command.");
|
||||
}).Start();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,14 @@
|
|||
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Scripting" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.1.2.22" newVersion="1.1.2.22" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="IronPython" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.7.0" newVersion="2.7.7.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -13,6 +13,14 @@
|
|||
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Scripting" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.1.2.22" newVersion="1.1.2.22" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="IronPython" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.7.0" newVersion="2.7.7.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -14,7 +14,6 @@ Module Module1
|
|||
|
||||
End Module
|
||||
|
||||
<ShiftOS.Engine.Namespace("skinning")>
|
||||
Public Class SkinConverterCommands
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,14 @@
|
|||
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Scripting" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.1.2.22" newVersion="1.1.2.22" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="IronPython" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.7.0" newVersion="2.7.7.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -154,7 +154,6 @@ namespace ShiftOS.Modding.VirtualMachine
|
|||
}
|
||||
}
|
||||
|
||||
[Namespace("svm")]
|
||||
public static class Compiler
|
||||
{
|
||||
public static byte[] Compile(string prg)
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace ShiftOS.Objects
|
|||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int CostPerMonth { get; set; }
|
||||
public uint CostPerMonth { get; set; }
|
||||
public int DownloadSpeed { get; set; }
|
||||
public string Company { get; set; }
|
||||
}
|
||||
|
|
|
@ -26,47 +26,23 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
|
||||
namespace ShiftOS.Objects
|
||||
{
|
||||
//Better to store this stuff server-side so we can do some neat stuff with hacking...
|
||||
public class Save
|
||||
{
|
||||
|
||||
public int MusicVolume { get; set; }
|
||||
public int SfxVolume { get; set; }
|
||||
public bool MusicEnabled = true;
|
||||
public bool SoundEnabled = true;
|
||||
public int MusicVolume = 100;
|
||||
|
||||
[Obsolete("This save variable is no longer used in Beta 2.4 and above of ShiftOS. Please use ShiftOS.Engine.SaveSystem.CurrentUser.Username to access the current user's username.")]
|
||||
public string Username { get; set; }
|
||||
|
||||
private long _cp = 0;
|
||||
public bool IsSandbox = false;
|
||||
|
||||
public long Codepoints
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(UniteAuthToken))
|
||||
{
|
||||
var uc = new ShiftOS.Unite.UniteClient("", UniteAuthToken);
|
||||
return uc.GetCodepoints();
|
||||
}
|
||||
else
|
||||
return _cp;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(UniteAuthToken))
|
||||
{
|
||||
var uc = new ShiftOS.Unite.UniteClient("", UniteAuthToken);
|
||||
uc.SetCodepoints(value);
|
||||
}
|
||||
else
|
||||
_cp = value;
|
||||
|
||||
}
|
||||
}
|
||||
public ulong Codepoints { get; set; }
|
||||
|
||||
public Dictionary<string, bool> Upgrades { get; set; }
|
||||
public int StoryPosition { get; set; }
|
||||
|
@ -127,6 +103,11 @@ namespace ShiftOS.Objects
|
|||
}
|
||||
|
||||
public List<ClientSave> Users { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// DO NOT MODIFY THIS. EVER. YOU WILL BREAK THE STORYLINE. Let the engine do it's job.
|
||||
/// </summary>
|
||||
public string PickupPoint { get; set; }
|
||||
}
|
||||
|
||||
public class SettingsObject : DynamicObject
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace ShiftOS.Objects
|
|||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int Cost { get; set; }
|
||||
public ulong Cost { get; set; }
|
||||
public int FileType { get; set; }
|
||||
public byte[] MUDFile { get; set; }
|
||||
}
|
||||
|
|
|
@ -83,9 +83,9 @@ namespace ShiftOS.Unite
|
|||
/// Get the Pong codepoint highscore for the current user.
|
||||
/// </summary>
|
||||
/// <returns>The amount of Codepoints returned by the server</returns>
|
||||
public int GetPongCP()
|
||||
public ulong GetPongCP()
|
||||
{
|
||||
return Convert.ToInt32(MakeCall("/API/GetPongCP"));
|
||||
return Convert.ToUInt64(MakeCall("/API/GetPongCP"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -110,7 +110,7 @@ namespace ShiftOS.Unite
|
|||
/// Set the pong Codepoints record for the user
|
||||
/// </summary>
|
||||
/// <param name="value">The amount of Codepoints to set the record to</param>
|
||||
public void SetPongCP(int value)
|
||||
public void SetPongCP(ulong value)
|
||||
{
|
||||
MakeCall("/API/SetPongCP/" + value.ToString());
|
||||
}
|
||||
|
@ -182,16 +182,16 @@ namespace ShiftOS.Unite
|
|||
/// Get the user's codepoints.
|
||||
/// </summary>
|
||||
/// <returns>The amount of codepoints stored on the server for this user.</returns>
|
||||
public long GetCodepoints()
|
||||
public ulong GetCodepoints()
|
||||
{
|
||||
return Convert.ToInt64(MakeCall("/API/GetCodepoints"));
|
||||
return Convert.ToUInt64(MakeCall("/API/GetCodepoints"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the user's codepoints.
|
||||
/// </summary>
|
||||
/// <param name="value">The amount of codepoints to set the user's codepoints value to.</param>
|
||||
public void SetCodepoints(long value)
|
||||
public void SetCodepoints(ulong value)
|
||||
{
|
||||
MakeCall("/API/SetCodepoints/" + value.ToString());
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ using NetSockets;
|
|||
using Newtonsoft.Json;
|
||||
using System.IO;
|
||||
using static ShiftOS.Server.Program;
|
||||
using ShiftOS.Engine
|
||||
|
||||
|
||||
namespace ShiftOS.Server
|
||||
|
@ -181,7 +180,7 @@ namespace ShiftOS.Server
|
|||
if (sve.EndsWith(".save"))
|
||||
{
|
||||
var save = JsonConvert.DeserializeObject<Save>(File.ReadAllText(sve));
|
||||
accs.Add($"{ShiftOS.Engine.SaveSytem.CurrentUser.Username}@{save.SystemName}");
|
||||
accs.Add($"{save.Username}@{save.SystemName}");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,17 +54,6 @@ namespace ShiftOS.Server
|
|||
/// </summary>
|
||||
public class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The admin username.
|
||||
/// </summary>
|
||||
public static string AdminUsername = "admin";
|
||||
|
||||
/// <summary>
|
||||
/// The admin password.
|
||||
/// </summary>
|
||||
public static string AdminPassword = "admin";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The server.
|
||||
/// </summary>
|
||||
|
@ -98,11 +87,16 @@ namespace ShiftOS.Server
|
|||
{
|
||||
if (server.IsOnline)
|
||||
{
|
||||
server.DispatchAll(new NetObject("heartbeat", new ServerMessage
|
||||
|
||||
try
|
||||
{
|
||||
Name = "heartbeat",
|
||||
GUID = "server"
|
||||
}));
|
||||
server.DispatchAll(new NetObject("heartbeat", new ServerMessage
|
||||
{
|
||||
Name = "heartbeat",
|
||||
GUID = "server"
|
||||
}));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
};
|
||||
if (!Directory.Exists("saves"))
|
||||
|
@ -161,13 +155,7 @@ namespace ShiftOS.Server
|
|||
Console.WriteLine("FUCK. Something HORRIBLE JUST HAPPENED.");
|
||||
};
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += (o, a) =>
|
||||
{
|
||||
if(server.IsOnline == true)
|
||||
server.Stop();
|
||||
System.Diagnostics.Process.Start("ShiftOS.Server.exe");
|
||||
};
|
||||
|
||||
|
||||
server.OnReceived += (o, a) =>
|
||||
{
|
||||
var obj = a.Data.Object;
|
||||
|
@ -214,7 +202,6 @@ namespace ShiftOS.Server
|
|||
task.Wait();
|
||||
*/
|
||||
|
||||
RandomUserGenerator.StartThread();
|
||||
|
||||
while (server.IsOnline)
|
||||
{
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace ShiftOS.Server
|
|||
break;
|
||||
}
|
||||
|
||||
sve.Codepoints = rnd.Next(startCP, maxAmt);
|
||||
sve.Codepoints = (ulong)rnd.Next(startCP, maxAmt);
|
||||
|
||||
//FS treasure generation.
|
||||
/*
|
||||
|
|
|
@ -207,8 +207,7 @@ namespace ShiftOS.Server
|
|||
{
|
||||
var save = JsonConvert.DeserializeObject<Save>(ReadEncFile(savefile));
|
||||
|
||||
|
||||
if (save.UniteAuthToken==token)
|
||||
if (save.UniteAuthToken == token)
|
||||
{
|
||||
if (save.ID == new Guid())
|
||||
{
|
||||
|
@ -216,7 +215,6 @@ namespace ShiftOS.Server
|
|||
WriteEncFile(savefile, JsonConvert.SerializeObject(save));
|
||||
}
|
||||
|
||||
|
||||
Program.server.DispatchTo(new Guid(guid), new NetObject("mud_savefile", new ServerMessage
|
||||
{
|
||||
Name = "mud_savefile",
|
||||
|
@ -228,15 +226,11 @@ namespace ShiftOS.Server
|
|||
}
|
||||
catch { }
|
||||
}
|
||||
try
|
||||
Program.server.DispatchTo(new Guid(guid), new NetObject("auth_failed", new ServerMessage
|
||||
{
|
||||
Program.server.DispatchTo(new Guid(guid), new NetObject("auth_failed", new ServerMessage
|
||||
{
|
||||
Name = "mud_login_denied",
|
||||
GUID = "server"
|
||||
}));
|
||||
}
|
||||
catch { }
|
||||
Name = "mud_login_denied",
|
||||
GUID = "server"
|
||||
}));
|
||||
}
|
||||
|
||||
[MudRequest("delete_save", typeof(ClientSave))]
|
||||
|
@ -268,7 +262,7 @@ namespace ShiftOS.Server
|
|||
{
|
||||
args["username"] = args["username"].ToString().ToLower();
|
||||
string userName = args["username"] as string;
|
||||
long cpAmount = (long)args["amount"];
|
||||
ulong cpAmount = (ulong)args["amount"];
|
||||
|
||||
if (Directory.Exists("saves"))
|
||||
{
|
||||
|
@ -302,7 +296,7 @@ namespace ShiftOS.Server
|
|||
args["username"] = args["username"].ToString().ToLower();
|
||||
string userName = args["username"] as string;
|
||||
string passw = args["password"] as string;
|
||||
int cpAmount = (int)args["amount"];
|
||||
ulong cpAmount = (ulong)args["amount"];
|
||||
|
||||
if (Directory.Exists("saves"))
|
||||
{
|
||||
|
@ -315,7 +309,7 @@ namespace ShiftOS.Server
|
|||
WriteEncFile(saveFile, JsonConvert.SerializeObject(saveFileContents, Formatting.Indented));
|
||||
Program.ClientDispatcher.Broadcast("update_your_cp", new {
|
||||
username = userName,
|
||||
amount = -cpAmount
|
||||
amount = -(long)cpAmount
|
||||
});
|
||||
Program.ClientDispatcher.DispatchTo("update_your_cp", guid, new
|
||||
{
|
||||
|
|
|
@ -13,6 +13,14 @@
|
|||
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Scripting" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.1.2.22" newVersion="1.1.2.22" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="IronPython" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.7.0" newVersion="2.7.7.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -14,6 +14,14 @@
|
|||
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Scripting" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.1.2.22" newVersion="1.1.2.22" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="IronPython" publicKeyToken="7f709c5b713576e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.7.0" newVersion="2.7.7.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
39
ShiftOS.WinForms/Applications/Artpad.Designer.cs
generated
39
ShiftOS.WinForms/Applications/Artpad.Designer.cs
generated
|
@ -72,6 +72,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.picdrawingdisplay = new System.Windows.Forms.PictureBox();
|
||||
this.pnlbottompanel = new System.Windows.Forms.Panel();
|
||||
this.pnlpallet = new System.Windows.Forms.Panel();
|
||||
this.label44 = new System.Windows.Forms.Label();
|
||||
this.flowcolours = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.colourpallet1 = new System.Windows.Forms.Panel();
|
||||
this.colourpallet2 = new System.Windows.Forms.Panel();
|
||||
|
@ -310,7 +311,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pullbottom = new System.Windows.Forms.Timer(this.components);
|
||||
this.pullside = new System.Windows.Forms.Timer(this.components);
|
||||
this.tmrsetupui = new System.Windows.Forms.Timer(this.components);
|
||||
this.label44 = new System.Windows.Forms.Label();
|
||||
this.pgcontents.SuspendLayout();
|
||||
this.pnldrawingbackground.SuspendLayout();
|
||||
this.pnlinitialcanvassettings.SuspendLayout();
|
||||
|
@ -621,6 +621,16 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnlpallet.Size = new System.Drawing.Size(225, 124);
|
||||
this.pnlpallet.TabIndex = 0;
|
||||
//
|
||||
// label44
|
||||
//
|
||||
this.label44.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label44.Location = new System.Drawing.Point(0, 24);
|
||||
this.label44.Name = "label44";
|
||||
this.label44.Size = new System.Drawing.Size(225, 27);
|
||||
this.label44.TabIndex = 13;
|
||||
this.label44.Text = "Left click to select, right click to change color";
|
||||
this.label44.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// flowcolours
|
||||
//
|
||||
this.flowcolours.Controls.Add(this.colourpallet1);
|
||||
|
@ -2960,6 +2970,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnpixelsetter.Name = "btnpixelsetter";
|
||||
this.btnpixelsetter.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnpixelsetter.TabIndex = 2;
|
||||
this.btnpixelsetter.Tag = "nobuttonskin";
|
||||
this.btnpixelsetter.UseVisualStyleBackColor = true;
|
||||
this.btnpixelsetter.Click += new System.EventHandler(this.btnpixelsetter_Click);
|
||||
//
|
||||
|
@ -2974,6 +2985,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnpixelplacer.Name = "btnpixelplacer";
|
||||
this.btnpixelplacer.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnpixelplacer.TabIndex = 4;
|
||||
this.btnpixelplacer.Tag = "nobuttonskin";
|
||||
this.btnpixelplacer.UseVisualStyleBackColor = true;
|
||||
this.btnpixelplacer.Click += new System.EventHandler(this.btnpixelplacer_Click);
|
||||
//
|
||||
|
@ -2988,6 +3000,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnpencil.Name = "btnpencil";
|
||||
this.btnpencil.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnpencil.TabIndex = 7;
|
||||
this.btnpencil.Tag = "nobuttonskin";
|
||||
this.btnpencil.Text = " ";
|
||||
this.btnpencil.UseVisualStyleBackColor = true;
|
||||
this.btnpencil.Click += new System.EventHandler(this.btnpencil_Click);
|
||||
|
@ -3003,6 +3016,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnfloodfill.Name = "btnfloodfill";
|
||||
this.btnfloodfill.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnfloodfill.TabIndex = 11;
|
||||
this.btnfloodfill.Tag = "nobuttonskin";
|
||||
this.btnfloodfill.UseVisualStyleBackColor = true;
|
||||
this.btnfloodfill.Click += new System.EventHandler(this.btnfill_Click);
|
||||
//
|
||||
|
@ -3017,6 +3031,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnoval.Name = "btnoval";
|
||||
this.btnoval.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnoval.TabIndex = 13;
|
||||
this.btnoval.Tag = "nobuttonskin";
|
||||
this.btnoval.Text = " ";
|
||||
this.btnoval.UseVisualStyleBackColor = true;
|
||||
this.btnoval.Click += new System.EventHandler(this.btnoval_Click);
|
||||
|
@ -3032,6 +3047,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnsquare.Name = "btnsquare";
|
||||
this.btnsquare.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnsquare.TabIndex = 12;
|
||||
this.btnsquare.Tag = "nobuttonskin";
|
||||
this.btnsquare.Text = " ";
|
||||
this.btnsquare.UseVisualStyleBackColor = true;
|
||||
this.btnsquare.Click += new System.EventHandler(this.btnsquare_Click);
|
||||
|
@ -3047,6 +3063,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnlinetool.Name = "btnlinetool";
|
||||
this.btnlinetool.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnlinetool.TabIndex = 15;
|
||||
this.btnlinetool.Tag = "nobuttonskin";
|
||||
this.btnlinetool.Text = " ";
|
||||
this.btnlinetool.UseVisualStyleBackColor = true;
|
||||
this.btnlinetool.Click += new System.EventHandler(this.btnlinetool_Click);
|
||||
|
@ -3062,6 +3079,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnpaintbrush.Name = "btnpaintbrush";
|
||||
this.btnpaintbrush.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnpaintbrush.TabIndex = 17;
|
||||
this.btnpaintbrush.Tag = "nobuttonskin";
|
||||
this.btnpaintbrush.Text = " ";
|
||||
this.btnpaintbrush.UseVisualStyleBackColor = true;
|
||||
this.btnpaintbrush.Click += new System.EventHandler(this.btnpaintbrush_Click);
|
||||
|
@ -3077,6 +3095,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btntexttool.Name = "btntexttool";
|
||||
this.btntexttool.Size = new System.Drawing.Size(50, 50);
|
||||
this.btntexttool.TabIndex = 16;
|
||||
this.btntexttool.Tag = "nobuttonskin";
|
||||
this.btntexttool.Text = " ";
|
||||
this.btntexttool.UseVisualStyleBackColor = true;
|
||||
this.btntexttool.Click += new System.EventHandler(this.btntexttool_Click);
|
||||
|
@ -3092,6 +3111,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btneracer.Name = "btneracer";
|
||||
this.btneracer.Size = new System.Drawing.Size(50, 50);
|
||||
this.btneracer.TabIndex = 14;
|
||||
this.btneracer.Tag = "nobuttonskin";
|
||||
this.btneracer.Text = " ";
|
||||
this.btneracer.UseVisualStyleBackColor = true;
|
||||
this.btneracer.Click += new System.EventHandler(this.btneracer_Click);
|
||||
|
@ -3107,6 +3127,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnnew.Name = "btnnew";
|
||||
this.btnnew.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnnew.TabIndex = 6;
|
||||
this.btnnew.Tag = "nobuttonskin";
|
||||
this.btnnew.Text = " ";
|
||||
this.btnnew.UseVisualStyleBackColor = true;
|
||||
this.btnnew.Click += new System.EventHandler(this.btnnew_Click);
|
||||
|
@ -3122,6 +3143,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnmagnify.Name = "btnmagnify";
|
||||
this.btnmagnify.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnmagnify.TabIndex = 3;
|
||||
this.btnmagnify.Tag = "nobuttonskin";
|
||||
this.btnmagnify.Text = " ";
|
||||
this.btnmagnify.UseVisualStyleBackColor = true;
|
||||
this.btnmagnify.Click += new System.EventHandler(this.btnmagnify_Click);
|
||||
|
@ -3137,6 +3159,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnopen.Name = "btnopen";
|
||||
this.btnopen.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnopen.TabIndex = 10;
|
||||
this.btnopen.Tag = "nobuttonskin";
|
||||
this.btnopen.Text = " ";
|
||||
this.btnopen.UseVisualStyleBackColor = true;
|
||||
this.btnopen.Click += new System.EventHandler(this.btnopen_Click);
|
||||
|
@ -3152,6 +3175,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnsave.Name = "btnsave";
|
||||
this.btnsave.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnsave.TabIndex = 5;
|
||||
this.btnsave.Tag = "nobuttonskin";
|
||||
this.btnsave.Text = " ";
|
||||
this.btnsave.UseVisualStyleBackColor = true;
|
||||
this.btnsave.Click += new System.EventHandler(this.btnsave_Click);
|
||||
|
@ -3167,6 +3191,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnundo.Name = "btnundo";
|
||||
this.btnundo.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnundo.TabIndex = 8;
|
||||
this.btnundo.Tag = "nobuttonskin";
|
||||
this.btnundo.Text = " ";
|
||||
this.btnundo.UseVisualStyleBackColor = true;
|
||||
this.btnundo.Click += new System.EventHandler(this.btnundo_Click);
|
||||
|
@ -3182,6 +3207,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnredo.Name = "btnredo";
|
||||
this.btnredo.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnredo.TabIndex = 9;
|
||||
this.btnredo.Tag = "nobuttonskin";
|
||||
this.btnredo.Text = " ";
|
||||
this.btnredo.UseVisualStyleBackColor = true;
|
||||
this.btnredo.Click += new System.EventHandler(this.btnredo_Click);
|
||||
|
@ -3279,16 +3305,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
this.tmrsetupui.Tick += new System.EventHandler(this.tmrsetupui_Tick);
|
||||
//
|
||||
// label44
|
||||
//
|
||||
this.label44.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label44.Location = new System.Drawing.Point(0, 24);
|
||||
this.label44.Name = "label44";
|
||||
this.label44.Size = new System.Drawing.Size(225, 27);
|
||||
this.label44.TabIndex = 13;
|
||||
this.label44.Text = "Left click to select, right click to change color";
|
||||
this.label44.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// Artpad
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -3297,6 +3313,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.MinimumSize = new System.Drawing.Size(502, 398);
|
||||
this.Name = "Artpad";
|
||||
this.Size = new System.Drawing.Size(802, 598);
|
||||
this.Tag = "nobuttonskin";
|
||||
this.Load += new System.EventHandler(this.Template_Load);
|
||||
this.pgcontents.ResumeLayout(false);
|
||||
this.pnldrawingbackground.ResumeLayout(false);
|
||||
|
|
178
ShiftOS.WinForms/Applications/Chat.Designer.cs
generated
178
ShiftOS.WinForms/Applications/Chat.Designer.cs
generated
|
@ -54,6 +54,13 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Chat));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.pnlstart = new System.Windows.Forms.Panel();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.txtchatid = new System.Windows.Forms.TextBox();
|
||||
this.btnjoin = new System.Windows.Forms.Button();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.rtbchat = new System.Windows.Forms.RichTextBox();
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.tschatid = new System.Windows.Forms.ToolStripLabel();
|
||||
|
@ -61,18 +68,11 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.tsbottombar = new System.Windows.Forms.ToolStrip();
|
||||
this.txtuserinput = new System.Windows.Forms.ToolStripTextBox();
|
||||
this.btnsend = new System.Windows.Forms.ToolStripButton();
|
||||
this.pnlstart = new System.Windows.Forms.Panel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.txtchatid = new System.Windows.Forms.TextBox();
|
||||
this.btnjoin = new System.Windows.Forms.Button();
|
||||
this.panel1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.tsbottombar.SuspendLayout();
|
||||
this.pnlstart.SuspendLayout();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.tsbottombar.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
|
@ -87,6 +87,82 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.panel1.Size = new System.Drawing.Size(633, 318);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// pnlstart
|
||||
//
|
||||
this.pnlstart.Controls.Add(this.flowLayoutPanel1);
|
||||
this.pnlstart.Controls.Add(this.label3);
|
||||
this.pnlstart.Controls.Add(this.label2);
|
||||
this.pnlstart.Controls.Add(this.label1);
|
||||
this.pnlstart.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlstart.Location = new System.Drawing.Point(0, 25);
|
||||
this.pnlstart.Name = "pnlstart";
|
||||
this.pnlstart.Size = new System.Drawing.Size(633, 268);
|
||||
this.pnlstart.TabIndex = 4;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.AutoSize = true;
|
||||
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flowLayoutPanel1.Controls.Add(this.txtchatid);
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnjoin);
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 118);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(633, 29);
|
||||
this.flowLayoutPanel1.TabIndex = 3;
|
||||
//
|
||||
// txtchatid
|
||||
//
|
||||
this.txtchatid.Location = new System.Drawing.Point(3, 3);
|
||||
this.txtchatid.Name = "txtchatid";
|
||||
this.txtchatid.Size = new System.Drawing.Size(192, 20);
|
||||
this.txtchatid.TabIndex = 0;
|
||||
//
|
||||
// btnjoin
|
||||
//
|
||||
this.btnjoin.Location = new System.Drawing.Point(201, 3);
|
||||
this.btnjoin.Name = "btnjoin";
|
||||
this.btnjoin.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnjoin.TabIndex = 1;
|
||||
this.btnjoin.Text = "Join";
|
||||
this.btnjoin.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label3.Location = new System.Drawing.Point(0, 85);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.label3.Size = new System.Drawing.Size(79, 33);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Tag = "header3";
|
||||
this.label3.Text = "Join a chat";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label2.Location = new System.Drawing.Point(0, 33);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.label2.Size = new System.Drawing.Size(633, 52);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "SimpleSRC is a simple chat program that utilises the ShiftOS Relay Chat protocol." +
|
||||
" All you have to do is enter a chat code or system name, and SimpleSRC will try " +
|
||||
"to initiate a chat for you.";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.label1.Size = new System.Drawing.Size(143, 33);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Tag = "header1";
|
||||
this.label1.Text = "Welcome to SimpleSRC!";
|
||||
//
|
||||
// rtbchat
|
||||
//
|
||||
this.rtbchat.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
|
@ -151,82 +227,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnsend.Text = "Send";
|
||||
this.btnsend.Click += new System.EventHandler(this.btnsend_Click);
|
||||
//
|
||||
// pnlstart
|
||||
//
|
||||
this.pnlstart.Controls.Add(this.flowLayoutPanel1);
|
||||
this.pnlstart.Controls.Add(this.label3);
|
||||
this.pnlstart.Controls.Add(this.label2);
|
||||
this.pnlstart.Controls.Add(this.label1);
|
||||
this.pnlstart.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlstart.Location = new System.Drawing.Point(0, 25);
|
||||
this.pnlstart.Name = "pnlstart";
|
||||
this.pnlstart.Size = new System.Drawing.Size(633, 268);
|
||||
this.pnlstart.TabIndex = 4;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.label1.Size = new System.Drawing.Size(143, 33);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Tag = "header1";
|
||||
this.label1.Text = "Welcome to SimpleSRC!";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label2.Location = new System.Drawing.Point(0, 33);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.label2.Size = new System.Drawing.Size(633, 52);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "SimpleSRC is a simple chat program that utilises the ShiftOS Relay Chat protocol." +
|
||||
" All you have to do is enter a chat code or system name, and SimpleSRC will try " +
|
||||
"to initiate a chat for you.";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label3.Location = new System.Drawing.Point(0, 85);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.label3.Size = new System.Drawing.Size(79, 33);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Tag = "header3";
|
||||
this.label3.Text = "Join a chat";
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.AutoSize = true;
|
||||
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flowLayoutPanel1.Controls.Add(this.txtchatid);
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnjoin);
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 118);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(633, 29);
|
||||
this.flowLayoutPanel1.TabIndex = 3;
|
||||
//
|
||||
// txtchatid
|
||||
//
|
||||
this.txtchatid.Location = new System.Drawing.Point(3, 3);
|
||||
this.txtchatid.Name = "txtchatid";
|
||||
this.txtchatid.Size = new System.Drawing.Size(192, 20);
|
||||
this.txtchatid.TabIndex = 0;
|
||||
//
|
||||
// btnjoin
|
||||
//
|
||||
this.btnjoin.Location = new System.Drawing.Point(201, 3);
|
||||
this.btnjoin.Name = "btnjoin";
|
||||
this.btnjoin.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnjoin.TabIndex = 1;
|
||||
this.btnjoin.Text = "Join";
|
||||
this.btnjoin.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Chat
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -236,14 +236,14 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.Size = new System.Drawing.Size(633, 318);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.tsbottombar.ResumeLayout(false);
|
||||
this.tsbottombar.PerformLayout();
|
||||
this.pnlstart.ResumeLayout(false);
|
||||
this.pnlstart.PerformLayout();
|
||||
this.flowLayoutPanel1.ResumeLayout(false);
|
||||
this.flowLayoutPanel1.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.tsbottombar.ResumeLayout(false);
|
||||
this.tsbottombar.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
|
@ -123,6 +123,12 @@
|
|||
<metadata name="tsbottombar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tsbottombar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnsend.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
|
|
@ -1,123 +0,0 @@
|
|||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
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;
|
||||
using ShiftOS.Engine;
|
||||
using System.Threading;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
public partial class CoherenceOverlay : UserControl, IShiftOSWindow
|
||||
{
|
||||
public CoherenceOverlay(IntPtr handle, CoherenceCommands.RECT rect)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Load += (o, a) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
int left = this.ParentForm.Left;
|
||||
int top = this.ParentForm.Top;
|
||||
int oldwidth = this.ParentForm.Width;
|
||||
int oldheight = this.ParentForm.Height;
|
||||
|
||||
var t = new Thread(new ThreadStart(() =>
|
||||
{
|
||||
while (CoherenceCommands.GetWindowRect(handle, ref rect))
|
||||
{
|
||||
|
||||
if (left != rect.Left - SkinEngine.LoadedSkin.LeftBorderWidth)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
this.ParentForm.Left = rect.Left - SkinEngine.LoadedSkin.LeftBorderWidth;
|
||||
left = rect.Left - SkinEngine.LoadedSkin.LeftBorderWidth;
|
||||
}));
|
||||
}
|
||||
if (top != rect.Top - SkinEngine.LoadedSkin.TitlebarHeight)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
|
||||
this.ParentForm.Top = rect.Top - SkinEngine.LoadedSkin.TitlebarHeight;
|
||||
top = rect.Top - SkinEngine.LoadedSkin.TitlebarHeight;
|
||||
}));
|
||||
}
|
||||
int width = (rect.Right - rect.Left) + 1;
|
||||
int height = (rect.Bottom - rect.Top) + 1;
|
||||
|
||||
if (oldheight != SkinEngine.LoadedSkin.TitlebarHeight + height + SkinEngine.LoadedSkin.BottomBorderWidth)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
this.ParentForm.Height = SkinEngine.LoadedSkin.TitlebarHeight + height + SkinEngine.LoadedSkin.BottomBorderWidth;
|
||||
oldheight = SkinEngine.LoadedSkin.TitlebarHeight + height + SkinEngine.LoadedSkin.BottomBorderWidth;
|
||||
}));
|
||||
}
|
||||
if (oldwidth != SkinEngine.LoadedSkin.LeftBorderWidth + width + SkinEngine.LoadedSkin.RightBorderWidth)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
this.ParentForm.Width = SkinEngine.LoadedSkin.LeftBorderWidth + width + SkinEngine.LoadedSkin.RightBorderWidth;
|
||||
oldwidth = SkinEngine.LoadedSkin.LeftBorderWidth + width + SkinEngine.LoadedSkin.RightBorderWidth;
|
||||
}));
|
||||
}
|
||||
}
|
||||
}));
|
||||
t.IsBackground = true;
|
||||
t.Start();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
}
|
||||
|
||||
public bool OnUnload()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -216,7 +216,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
public int Progress { get; set; }
|
||||
}
|
||||
|
||||
[Namespace("dev")]
|
||||
public static class DownloaderDebugCommands
|
||||
{
|
||||
[Command("setsubscription", description ="Use to set the current shiftnet subscription.", usage ="{value:int32}")]
|
||||
|
|
|
@ -86,12 +86,12 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pgcontents.Location = new System.Drawing.Point(0, 0);
|
||||
this.pgcontents.Name = "pgcontents";
|
||||
this.pgcontents.Size = new System.Drawing.Size(390, 383);
|
||||
this.pgcontents.Size = new System.Drawing.Size(487, 383);
|
||||
this.pgcontents.TabIndex = 20;
|
||||
//
|
||||
// btncancel
|
||||
//
|
||||
this.btncancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btncancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btncancel.Location = new System.Drawing.Point(21, 335);
|
||||
this.btncancel.Name = "btncancel";
|
||||
this.btncancel.Size = new System.Drawing.Size(109, 32);
|
||||
|
@ -102,10 +102,11 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// btnreset
|
||||
//
|
||||
this.btnreset.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btnreset.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnreset.Location = new System.Drawing.Point(136, 335);
|
||||
this.btnreset.Name = "btnreset";
|
||||
this.btnreset.Size = new System.Drawing.Size(109, 32);
|
||||
this.btnreset.Size = new System.Drawing.Size(206, 32);
|
||||
this.btnreset.TabIndex = 22;
|
||||
this.btnreset.Text = "Reset";
|
||||
this.btnreset.UseVisualStyleBackColor = true;
|
||||
|
@ -113,8 +114,8 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// btnapply
|
||||
//
|
||||
this.btnapply.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btnapply.Location = new System.Drawing.Point(251, 335);
|
||||
this.btnapply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnapply.Location = new System.Drawing.Point(348, 335);
|
||||
this.btnapply.Name = "btnapply";
|
||||
this.btnapply.Size = new System.Drawing.Size(118, 32);
|
||||
this.btnapply.TabIndex = 21;
|
||||
|
@ -124,19 +125,21 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// Label2
|
||||
//
|
||||
this.Label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.Label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Label2.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label2.Location = new System.Drawing.Point(125, 260);
|
||||
this.Label2.Name = "Label2";
|
||||
this.Label2.Size = new System.Drawing.Size(163, 28);
|
||||
this.Label2.Size = new System.Drawing.Size(260, 28);
|
||||
this.Label2.TabIndex = 12;
|
||||
this.Label2.Tag = "header3";
|
||||
this.Label2.Text = "Idle";
|
||||
this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnidlebrowse
|
||||
//
|
||||
this.btnidlebrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnidlebrowse.Location = new System.Drawing.Point(295, 260);
|
||||
this.btnidlebrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnidlebrowse.Location = new System.Drawing.Point(392, 260);
|
||||
this.btnidlebrowse.Name = "btnidlebrowse";
|
||||
this.btnidlebrowse.Size = new System.Drawing.Size(73, 60);
|
||||
this.btnidlebrowse.TabIndex = 10;
|
||||
|
@ -146,14 +149,15 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// txtidlefile
|
||||
//
|
||||
this.txtidlefile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.txtidlefile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtidlefile.BackColor = System.Drawing.Color.White;
|
||||
this.txtidlefile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.txtidlefile.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtidlefile.Location = new System.Drawing.Point(125, 291);
|
||||
this.txtidlefile.Multiline = true;
|
||||
this.txtidlefile.Name = "txtidlefile";
|
||||
this.txtidlefile.Size = new System.Drawing.Size(163, 29);
|
||||
this.txtidlefile.Size = new System.Drawing.Size(260, 29);
|
||||
this.txtidlefile.TabIndex = 9;
|
||||
this.txtidlefile.Text = "None";
|
||||
this.txtidlefile.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
|
@ -172,9 +176,10 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// btnzoom
|
||||
//
|
||||
this.btnzoom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnzoom.FlatAppearance.BorderColor = System.Drawing.Color.Black;
|
||||
this.btnzoom.FlatAppearance.BorderSize = 0;
|
||||
this.btnzoom.Location = new System.Drawing.Point(286, 144);
|
||||
this.btnzoom.Location = new System.Drawing.Point(383, 144);
|
||||
this.btnzoom.Name = "btnzoom";
|
||||
this.btnzoom.Size = new System.Drawing.Size(82, 65);
|
||||
this.btnzoom.TabIndex = 7;
|
||||
|
@ -184,9 +189,10 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// btnstretch
|
||||
//
|
||||
this.btnstretch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnstretch.FlatAppearance.BorderColor = System.Drawing.Color.Black;
|
||||
this.btnstretch.FlatAppearance.BorderSize = 0;
|
||||
this.btnstretch.Location = new System.Drawing.Point(197, 144);
|
||||
this.btnstretch.Location = new System.Drawing.Point(294, 144);
|
||||
this.btnstretch.Name = "btnstretch";
|
||||
this.btnstretch.Size = new System.Drawing.Size(82, 65);
|
||||
this.btnstretch.TabIndex = 6;
|
||||
|
@ -228,6 +234,9 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// picgraphic
|
||||
//
|
||||
this.picgraphic.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.picgraphic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.picgraphic.Location = new System.Drawing.Point(0, 0);
|
||||
this.picgraphic.Name = "picgraphic";
|
||||
|
@ -237,11 +246,14 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// lblobjecttoskin
|
||||
//
|
||||
this.lblobjecttoskin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblobjecttoskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblobjecttoskin.Location = new System.Drawing.Point(19, 9);
|
||||
this.lblobjecttoskin.Name = "lblobjecttoskin";
|
||||
this.lblobjecttoskin.Size = new System.Drawing.Size(350, 23);
|
||||
this.lblobjecttoskin.Size = new System.Drawing.Size(447, 23);
|
||||
this.lblobjecttoskin.TabIndex = 2;
|
||||
this.lblobjecttoskin.Tag = "header1";
|
||||
this.lblobjecttoskin.Text = "Close Button";
|
||||
this.lblobjecttoskin.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
|
@ -249,10 +261,9 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(390, 383);
|
||||
this.Controls.Add(this.pgcontents);
|
||||
this.Name = "GraphicPicker";
|
||||
this.Text = "{GRAPHIC_PICKER_NAME}";
|
||||
this.Size = new System.Drawing.Size(487, 383);
|
||||
this.Load += new System.EventHandler(this.Graphic_Picker_Load);
|
||||
this.pgcontents.ResumeLayout(false);
|
||||
this.pgcontents.PerformLayout();
|
||||
|
|
|
@ -45,6 +45,15 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
InitializeComponent();
|
||||
SelectedLayout = layout;
|
||||
Image = old;
|
||||
if (Image != null)
|
||||
{
|
||||
using (var ms = new System.IO.MemoryStream())
|
||||
{
|
||||
Image.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
|
||||
ImageAsBinary = ms.ToArray();
|
||||
}
|
||||
}
|
||||
Callback = cb;
|
||||
lblobjecttoskin.Text = name;
|
||||
|
||||
|
@ -123,10 +132,12 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public void OnLoad()
|
||||
{
|
||||
Setup();
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
Setup();
|
||||
}
|
||||
|
||||
public bool OnUnload()
|
||||
|
@ -136,6 +147,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
Setup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
163
ShiftOS.WinForms/Applications/IconManager.Designer.cs
generated
Normal file
163
ShiftOS.WinForms/Applications/IconManager.Designer.cs
generated
Normal file
|
@ -0,0 +1,163 @@
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
partial class IconManager
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnclose = new System.Windows.Forms.Button();
|
||||
this.btnreset = new System.Windows.Forms.Button();
|
||||
this.btnapply = new System.Windows.Forms.Button();
|
||||
this.flbody = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.lbcurrentpage = new System.Windows.Forms.Label();
|
||||
this.btnprev = new System.Windows.Forms.Button();
|
||||
this.btnnext = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.AutoSize = true;
|
||||
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnclose);
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnreset);
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnapply);
|
||||
this.flowLayoutPanel1.Controls.Add(this.lbcurrentpage);
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnprev);
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnnext);
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 416);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(393, 29);
|
||||
this.flowLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// btnclose
|
||||
//
|
||||
this.btnclose.AutoSize = true;
|
||||
this.btnclose.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnclose.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnclose.Name = "btnclose";
|
||||
this.btnclose.Size = new System.Drawing.Size(43, 23);
|
||||
this.btnclose.TabIndex = 0;
|
||||
this.btnclose.Text = "Close";
|
||||
this.btnclose.UseVisualStyleBackColor = true;
|
||||
this.btnclose.Click += new System.EventHandler(this.btnclose_Click);
|
||||
//
|
||||
// btnreset
|
||||
//
|
||||
this.btnreset.AutoSize = true;
|
||||
this.btnreset.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnreset.Location = new System.Drawing.Point(52, 3);
|
||||
this.btnreset.Name = "btnreset";
|
||||
this.btnreset.Size = new System.Drawing.Size(45, 23);
|
||||
this.btnreset.TabIndex = 1;
|
||||
this.btnreset.Text = "Reset";
|
||||
this.btnreset.UseVisualStyleBackColor = true;
|
||||
this.btnreset.Click += new System.EventHandler(this.btnreset_Click);
|
||||
//
|
||||
// btnapply
|
||||
//
|
||||
this.btnapply.AutoSize = true;
|
||||
this.btnapply.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnapply.Location = new System.Drawing.Point(103, 3);
|
||||
this.btnapply.Name = "btnapply";
|
||||
this.btnapply.Size = new System.Drawing.Size(43, 23);
|
||||
this.btnapply.TabIndex = 2;
|
||||
this.btnapply.Text = "Apply";
|
||||
this.btnapply.UseVisualStyleBackColor = true;
|
||||
this.btnapply.Click += new System.EventHandler(this.btnapply_Click);
|
||||
//
|
||||
// flbody
|
||||
//
|
||||
this.flbody.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flbody.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flbody.Location = new System.Drawing.Point(0, 0);
|
||||
this.flbody.Name = "flbody";
|
||||
this.flbody.Size = new System.Drawing.Size(393, 416);
|
||||
this.flbody.TabIndex = 1;
|
||||
this.flbody.WrapContents = false;
|
||||
//
|
||||
// lbcurrentpage
|
||||
//
|
||||
this.lbcurrentpage.AutoSize = true;
|
||||
this.lbcurrentpage.Location = new System.Drawing.Point(152, 0);
|
||||
this.lbcurrentpage.Name = "lbcurrentpage";
|
||||
this.lbcurrentpage.Size = new System.Drawing.Size(71, 13);
|
||||
this.lbcurrentpage.TabIndex = 3;
|
||||
this.lbcurrentpage.Text = "Current page:";
|
||||
//
|
||||
// btnprev
|
||||
//
|
||||
this.btnprev.AutoSize = true;
|
||||
this.btnprev.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnprev.Location = new System.Drawing.Point(229, 3);
|
||||
this.btnprev.Name = "btnprev";
|
||||
this.btnprev.Size = new System.Drawing.Size(51, 23);
|
||||
this.btnprev.TabIndex = 4;
|
||||
this.btnprev.Text = " < Prev";
|
||||
this.btnprev.UseVisualStyleBackColor = true;
|
||||
this.btnprev.Click += new System.EventHandler(this.btnprev_Click);
|
||||
//
|
||||
// btnnext
|
||||
//
|
||||
this.btnnext.AutoSize = true;
|
||||
this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnnext.Location = new System.Drawing.Point(286, 3);
|
||||
this.btnnext.Name = "btnnext";
|
||||
this.btnnext.Size = new System.Drawing.Size(48, 23);
|
||||
this.btnnext.TabIndex = 5;
|
||||
this.btnnext.Text = "Next >";
|
||||
this.btnnext.UseVisualStyleBackColor = true;
|
||||
this.btnnext.Click += new System.EventHandler(this.btnnext_Click);
|
||||
//
|
||||
// IconManager
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.flbody);
|
||||
this.Controls.Add(this.flowLayoutPanel1);
|
||||
this.Name = "IconManager";
|
||||
this.Size = new System.Drawing.Size(393, 445);
|
||||
this.flowLayoutPanel1.ResumeLayout(false);
|
||||
this.flowLayoutPanel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.Button btnclose;
|
||||
private System.Windows.Forms.Button btnreset;
|
||||
private System.Windows.Forms.Button btnapply;
|
||||
private System.Windows.Forms.FlowLayoutPanel flbody;
|
||||
private System.Windows.Forms.Label lbcurrentpage;
|
||||
private System.Windows.Forms.Button btnprev;
|
||||
private System.Windows.Forms.Button btnnext;
|
||||
}
|
||||
}
|
225
ShiftOS.WinForms/Applications/IconManager.cs
Normal file
225
ShiftOS.WinForms/Applications/IconManager.cs
Normal file
|
@ -0,0 +1,225 @@
|
|||
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;
|
||||
using ShiftOS.Engine;
|
||||
using System.Reflection;
|
||||
using ShiftOS.WinForms.Tools;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[RequiresUpgrade("icon_manager")]
|
||||
[Launcher("Icon Manager", true, "al_icon_manager", "Customization")]
|
||||
[DefaultTitle("Icon Manager")]
|
||||
[DefaultIcon("iconIconManager")]
|
||||
public partial class IconManager : UserControl, IShiftOSWindow
|
||||
{
|
||||
public IconManager()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
LoadIconsFromEngine();
|
||||
SetupUI();
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
LoadIconsFromEngine();
|
||||
SetupUI();
|
||||
}
|
||||
|
||||
public bool OnUnload()
|
||||
{
|
||||
Icons = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
private Dictionary<string, byte[]> Icons = null;
|
||||
|
||||
private const int pageSize = 10;
|
||||
private int currentPage = 0;
|
||||
private int pageCount = 0;
|
||||
|
||||
public Image GetIcon(string id)
|
||||
{
|
||||
if (!Icons.ContainsKey(id))
|
||||
Icons.Add(id, null);
|
||||
|
||||
if (Icons[id] == null)
|
||||
{
|
||||
var img = SkinEngine.GetDefaultIcon(id);
|
||||
using (var mstr = new System.IO.MemoryStream())
|
||||
{
|
||||
img.Save(mstr, System.Drawing.Imaging.ImageFormat.Png);
|
||||
Icons[id] = mstr.ToArray();
|
||||
}
|
||||
return img;
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var sr = new System.IO.MemoryStream(Icons[id]))
|
||||
{
|
||||
return Image.FromStream(sr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetIcon(string key, byte[] raw)
|
||||
{
|
||||
if (!Icons.ContainsKey(key))
|
||||
Icons.Add(key, raw);
|
||||
Icons[key] = raw;
|
||||
}
|
||||
|
||||
public void LoadIconsFromEngine()
|
||||
{
|
||||
//We have to serialize the engine icon list to JSON to break references with the data.
|
||||
string json = JsonConvert.SerializeObject(SkinEngine.LoadedSkin.AppIcons);
|
||||
//And deserialize to the local instance...essentially making a clone.
|
||||
Icons = JsonConvert.DeserializeObject<Dictionary<string, byte[]>>(json);
|
||||
}
|
||||
|
||||
public void SetupUI()
|
||||
{
|
||||
flbody.Controls.Clear(); //Clear the icon list.
|
||||
|
||||
Type[] types = Array.FindAll(ReflectMan.Types, x => x.GetCustomAttributes(false).FirstOrDefault(y => y is DefaultIconAttribute) != null);
|
||||
|
||||
pageCount = types.GetPageCount(pageSize);
|
||||
|
||||
foreach (var type in Array.FindAll(types.GetItemsOnPage(currentPage, pageSize), t => Shiftorium.UpgradeAttributesUnlocked(t)))
|
||||
{
|
||||
var pnl = new Panel();
|
||||
pnl.Height = 30;
|
||||
pnl.Width = flbody.Width - 15;
|
||||
flbody.Controls.Add(pnl);
|
||||
pnl.Show();
|
||||
var pic = new PictureBox();
|
||||
pic.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
pic.Size = new Size(24, 24);
|
||||
pic.Image = GetIcon(type.Name);
|
||||
pnl.Controls.Add(pic);
|
||||
pic.Left = 5;
|
||||
pic.Top = (pnl.Height - pic.Height) / 2;
|
||||
pic.Show();
|
||||
var lbl = new Label();
|
||||
lbl.Tag = "header3";
|
||||
lbl.AutoSize = true;
|
||||
lbl.Text = NameChangerBackend.GetNameRaw(type);
|
||||
ControlManager.SetupControl(lbl);
|
||||
pnl.Controls.Add(lbl);
|
||||
lbl.CenterParent();
|
||||
lbl.Show();
|
||||
var btn = new Button();
|
||||
btn.Text = "Change...";
|
||||
btn.AutoSize = true;
|
||||
btn.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
pnl.Controls.Add(btn);
|
||||
btn.Left = (pnl.Width - btn.Width) - 5;
|
||||
btn.Top = (pnl.Height - btn.Height) / 2;
|
||||
btn.Click += (o, a) =>
|
||||
{
|
||||
var gfp = new GraphicPicker(pic.Image, lbl.Text + " icon", ImageLayout.Stretch, (raw, img, layout) =>
|
||||
{
|
||||
pic.Image = img;
|
||||
SetIcon(type.Name, raw);
|
||||
});
|
||||
AppearanceManager.SetupDialog(gfp);
|
||||
};
|
||||
btn.Show();
|
||||
ControlManager.SetupControls(pnl);
|
||||
}
|
||||
|
||||
btnnext.Visible = (currentPage < pageCount - 1);
|
||||
btnprev.Visible = (currentPage > 0);
|
||||
|
||||
lbcurrentpage.Text = "Page " + (currentPage + 1).ToString() + " of " + pageCount.ToString();
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
LoadIconsFromEngine();
|
||||
SetupUI();
|
||||
}
|
||||
|
||||
private void btnprev_Click(object sender, EventArgs e)
|
||||
{
|
||||
currentPage--;
|
||||
SetupUI();
|
||||
}
|
||||
|
||||
public void ResetToDefaults()
|
||||
{
|
||||
currentPage = 0;
|
||||
foreach (var key in Icons.Keys)
|
||||
{
|
||||
var img = SkinEngine.GetDefaultIcon(key);
|
||||
using(var ms = new System.IO.MemoryStream())
|
||||
{
|
||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
|
||||
Icons[key] = ms.ToArray();
|
||||
}
|
||||
}
|
||||
SetupUI();
|
||||
}
|
||||
|
||||
private void btnnext_Click(object sender, EventArgs e)
|
||||
{
|
||||
currentPage++;
|
||||
SetupUI();
|
||||
}
|
||||
|
||||
private void btnclose_Click(object sender, EventArgs e)
|
||||
{
|
||||
AppearanceManager.Close(this);
|
||||
}
|
||||
|
||||
private void btnreset_Click(object sender, EventArgs e)
|
||||
{
|
||||
ResetToDefaults();
|
||||
}
|
||||
|
||||
private void btnapply_Click(object sender, EventArgs e)
|
||||
{
|
||||
SkinEngine.LoadedSkin.AppIcons = Icons;
|
||||
SkinEngine.SaveSkin();
|
||||
SkinEngine.LoadSkin();
|
||||
Infobox.Show("Icons applied!", "The new icons have been applied to ShiftOS successfully!");
|
||||
}
|
||||
}
|
||||
|
||||
public static class PaginationExtensions
|
||||
{
|
||||
public static int GetPageCount<T>(this IEnumerable<T> collection, int pageSize)
|
||||
{
|
||||
return (collection.Count() + pageSize - 1) / pageSize;
|
||||
}
|
||||
|
||||
public static T[] GetItemsOnPage<T>(this T[] collection, int page, int pageSize)
|
||||
{
|
||||
List<T> obj = new List<T>();
|
||||
|
||||
for (int i = pageSize * page; i <= pageSize + (pageSize * page) && i < collection.Count(); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
obj.Add(collection[i]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return obj.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
120
ShiftOS.WinForms/Applications/IconManager.resx
Normal file
120
ShiftOS.WinForms/Applications/IconManager.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
209
ShiftOS.WinForms/Applications/MindBlow.Designer.cs
generated
Normal file
209
ShiftOS.WinForms/Applications/MindBlow.Designer.cs
generated
Normal file
|
@ -0,0 +1,209 @@
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
partial class MindBlow
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.tabs = new System.Windows.Forms.TabControl();
|
||||
this.console = new System.Windows.Forms.TabPage();
|
||||
this.program = new System.Windows.Forms.TabPage();
|
||||
this.monitor = new System.Windows.Forms.TabPage();
|
||||
this.consoleout = new System.Windows.Forms.TextBox();
|
||||
this.programinput = new System.Windows.Forms.TextBox();
|
||||
this.load = new System.Windows.Forms.Button();
|
||||
this.save = new System.Windows.Forms.Button();
|
||||
this.memptr = new System.Windows.Forms.Label();
|
||||
this.instptr = new System.Windows.Forms.Label();
|
||||
this.memlist = new System.Windows.Forms.ListBox();
|
||||
this.run = new System.Windows.Forms.Button();
|
||||
this.tabs.SuspendLayout();
|
||||
this.console.SuspendLayout();
|
||||
this.program.SuspendLayout();
|
||||
this.monitor.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tabs
|
||||
//
|
||||
this.tabs.Controls.Add(this.console);
|
||||
this.tabs.Controls.Add(this.program);
|
||||
this.tabs.Controls.Add(this.monitor);
|
||||
this.tabs.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabs.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabs.Name = "tabs";
|
||||
this.tabs.SelectedIndex = 0;
|
||||
this.tabs.Size = new System.Drawing.Size(392, 269);
|
||||
this.tabs.TabIndex = 0;
|
||||
this.tabs.Selected += new System.Windows.Forms.TabControlEventHandler(this.tabs_Selected);
|
||||
//
|
||||
// console
|
||||
//
|
||||
this.console.Controls.Add(this.consoleout);
|
||||
this.console.Location = new System.Drawing.Point(4, 22);
|
||||
this.console.Name = "console";
|
||||
this.console.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.console.Size = new System.Drawing.Size(384, 243);
|
||||
this.console.TabIndex = 0;
|
||||
this.console.Text = "Console";
|
||||
this.console.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// program
|
||||
//
|
||||
this.program.Controls.Add(this.run);
|
||||
this.program.Controls.Add(this.save);
|
||||
this.program.Controls.Add(this.load);
|
||||
this.program.Controls.Add(this.programinput);
|
||||
this.program.Location = new System.Drawing.Point(4, 22);
|
||||
this.program.Name = "program";
|
||||
this.program.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.program.Size = new System.Drawing.Size(384, 243);
|
||||
this.program.TabIndex = 1;
|
||||
this.program.Text = "Program";
|
||||
this.program.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// monitor
|
||||
//
|
||||
this.monitor.Controls.Add(this.memlist);
|
||||
this.monitor.Controls.Add(this.instptr);
|
||||
this.monitor.Controls.Add(this.memptr);
|
||||
this.monitor.Location = new System.Drawing.Point(4, 22);
|
||||
this.monitor.Name = "monitor";
|
||||
this.monitor.Size = new System.Drawing.Size(384, 243);
|
||||
this.monitor.TabIndex = 2;
|
||||
this.monitor.Text = "Monitor";
|
||||
this.monitor.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// consoleout
|
||||
//
|
||||
this.consoleout.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.consoleout.Location = new System.Drawing.Point(3, 3);
|
||||
this.consoleout.Multiline = true;
|
||||
this.consoleout.Name = "consoleout";
|
||||
this.consoleout.ReadOnly = true;
|
||||
this.consoleout.Size = new System.Drawing.Size(378, 237);
|
||||
this.consoleout.TabIndex = 0;
|
||||
//
|
||||
// programinput
|
||||
//
|
||||
this.programinput.Location = new System.Drawing.Point(3, 0);
|
||||
this.programinput.Multiline = true;
|
||||
this.programinput.Name = "programinput";
|
||||
this.programinput.Size = new System.Drawing.Size(378, 218);
|
||||
this.programinput.TabIndex = 0;
|
||||
//
|
||||
// load
|
||||
//
|
||||
this.load.Location = new System.Drawing.Point(6, 217);
|
||||
this.load.Name = "load";
|
||||
this.load.Size = new System.Drawing.Size(115, 23);
|
||||
this.load.TabIndex = 1;
|
||||
this.load.Text = "Load";
|
||||
this.load.UseVisualStyleBackColor = true;
|
||||
this.load.Click += new System.EventHandler(this.load_Click);
|
||||
//
|
||||
// save
|
||||
//
|
||||
this.save.Location = new System.Drawing.Point(127, 217);
|
||||
this.save.Name = "save";
|
||||
this.save.Size = new System.Drawing.Size(114, 23);
|
||||
this.save.TabIndex = 2;
|
||||
this.save.Text = "Save";
|
||||
this.save.UseVisualStyleBackColor = true;
|
||||
this.save.Click += new System.EventHandler(this.save_Click);
|
||||
//
|
||||
// memptr
|
||||
//
|
||||
this.memptr.AutoSize = true;
|
||||
this.memptr.Location = new System.Drawing.Point(8, 8);
|
||||
this.memptr.Name = "memptr";
|
||||
this.memptr.Size = new System.Drawing.Size(56, 13);
|
||||
this.memptr.TabIndex = 0;
|
||||
this.memptr.Text = "Memory: 0";
|
||||
//
|
||||
// instptr
|
||||
//
|
||||
this.instptr.AutoSize = true;
|
||||
this.instptr.Location = new System.Drawing.Point(8, 21);
|
||||
this.instptr.Name = "instptr";
|
||||
this.instptr.Size = new System.Drawing.Size(68, 13);
|
||||
this.instptr.TabIndex = 1;
|
||||
this.instptr.Text = "Instruction: 0";
|
||||
//
|
||||
// memlist
|
||||
//
|
||||
this.memlist.FormattingEnabled = true;
|
||||
this.memlist.Location = new System.Drawing.Point(11, 37);
|
||||
this.memlist.Name = "memlist";
|
||||
this.memlist.ScrollAlwaysVisible = true;
|
||||
this.memlist.SelectionMode = System.Windows.Forms.SelectionMode.None;
|
||||
this.memlist.Size = new System.Drawing.Size(370, 199);
|
||||
this.memlist.TabIndex = 2;
|
||||
//
|
||||
// run
|
||||
//
|
||||
this.run.Location = new System.Drawing.Point(247, 217);
|
||||
this.run.Name = "run";
|
||||
this.run.Size = new System.Drawing.Size(131, 23);
|
||||
this.run.TabIndex = 3;
|
||||
this.run.Text = "Run";
|
||||
this.run.UseVisualStyleBackColor = true;
|
||||
this.run.Click += new System.EventHandler(this.run_Click);
|
||||
//
|
||||
// MindBlow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.tabs);
|
||||
this.Name = "MindBlow";
|
||||
this.Size = new System.Drawing.Size(392, 269);
|
||||
this.Resize += new System.EventHandler(this.MindBlow_Resize);
|
||||
this.tabs.ResumeLayout(false);
|
||||
this.console.ResumeLayout(false);
|
||||
this.console.PerformLayout();
|
||||
this.program.ResumeLayout(false);
|
||||
this.program.PerformLayout();
|
||||
this.monitor.ResumeLayout(false);
|
||||
this.monitor.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TabControl tabs;
|
||||
private System.Windows.Forms.TabPage console;
|
||||
private System.Windows.Forms.TabPage program;
|
||||
private System.Windows.Forms.TabPage monitor;
|
||||
private System.Windows.Forms.TextBox consoleout;
|
||||
private System.Windows.Forms.TextBox programinput;
|
||||
private System.Windows.Forms.Button load;
|
||||
private System.Windows.Forms.Button save;
|
||||
private System.Windows.Forms.Label instptr;
|
||||
private System.Windows.Forms.Label memptr;
|
||||
private System.Windows.Forms.ListBox memlist;
|
||||
private System.Windows.Forms.Button run;
|
||||
}
|
||||
}
|
200
ShiftOS.WinForms/Applications/MindBlow.cs
Normal file
200
ShiftOS.WinForms/Applications/MindBlow.cs
Normal file
|
@ -0,0 +1,200 @@
|
|||
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;
|
||||
using ShiftOS.Engine;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[WinOpen("mindblow")]
|
||||
[Launcher("MindBlow", false, null, "Utilities")]
|
||||
[RequiresUpgrade("mindblow")]
|
||||
public partial class MindBlow : UserControl, IShiftOSWindow, IBFListener
|
||||
{
|
||||
private class TextBoxStream : Stream
|
||||
{
|
||||
private TextBox box;
|
||||
private KeysConverter kc;
|
||||
public TextBoxStream(TextBox mybox)
|
||||
{
|
||||
kc = new KeysConverter();
|
||||
box = mybox;
|
||||
}
|
||||
public override bool CanRead { get { return true; } }
|
||||
|
||||
public override bool CanSeek { get { return false; } }
|
||||
|
||||
public override bool CanWrite { get { return true; } }
|
||||
|
||||
public override long Length { get { return box.Text.Length; } }
|
||||
|
||||
public override long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return Length;
|
||||
}
|
||||
set
|
||||
{
|
||||
//nothing
|
||||
}
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
}
|
||||
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
object lck = new object();
|
||||
int ptr = offset;
|
||||
KeyPressEventHandler handler = (o, a) =>
|
||||
{
|
||||
lock (lck)
|
||||
{
|
||||
buffer[ptr] = (byte)a.KeyChar;
|
||||
ptr++;
|
||||
}
|
||||
};
|
||||
Desktop.InvokeOnWorkerThread(() => box.KeyPress += handler);
|
||||
while (true)
|
||||
{
|
||||
lock (lck)
|
||||
if (ptr >= offset + count)
|
||||
break;
|
||||
}
|
||||
Desktop.InvokeOnWorkerThread(() => box.KeyPress -= handler);
|
||||
return count;
|
||||
}
|
||||
|
||||
public override long Seek(long offset, SeekOrigin origin)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override void SetLength(long value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
string output = "";
|
||||
foreach (byte b in buffer.Skip(offset).Take(count))
|
||||
output += Convert.ToChar(b);
|
||||
Desktop.InvokeOnWorkerThread(() => box.Text += output);
|
||||
}
|
||||
}
|
||||
private static string[] DefaultMem;
|
||||
private BFInterpreter Interpreter;
|
||||
|
||||
private void DoLayout()
|
||||
{
|
||||
memlist.Left = 0;
|
||||
memlist.Width = monitor.Width;
|
||||
memlist.Height = monitor.Height - memlist.Top;
|
||||
program.Top = 0;
|
||||
program.Left = 0;
|
||||
programinput.Width = program.Width;
|
||||
programinput.Height = program.Height - load.Height;
|
||||
load.Top = save.Top = run.Top = programinput.Height;
|
||||
load.Width = save.Width = run.Width = save.Left = program.Width / 3;
|
||||
run.Left = save.Left * 2;
|
||||
}
|
||||
|
||||
public MindBlow()
|
||||
{
|
||||
InitializeComponent();
|
||||
DefaultMem = new string[30000];
|
||||
for (ushort i = 0; i < 30000; i++)
|
||||
DefaultMem[i] = "0";
|
||||
memlist.Items.AddRange(DefaultMem);
|
||||
Interpreter = new BFInterpreter(new TextBoxStream(consoleout), this);
|
||||
}
|
||||
|
||||
public void IPtrMoved(int newval)
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() => instptr.Text = "Instruction: " + newval.ToString());
|
||||
}
|
||||
|
||||
public void MemChanged(ushort pos, byte newval)
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() => memlist.Items[pos] = newval.ToString());
|
||||
}
|
||||
|
||||
public void MemReset()
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
memlist.Items.Clear();
|
||||
memlist.Items.AddRange(DefaultMem);
|
||||
});
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
DoLayout();
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
}
|
||||
|
||||
public bool OnUnload()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
}
|
||||
|
||||
public void PointerMoved(ushort newval)
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() => memptr.Text = "Memory: " + newval.ToString());
|
||||
}
|
||||
|
||||
private void MindBlow_Resize(object sender, EventArgs e)
|
||||
{
|
||||
DoLayout();
|
||||
}
|
||||
|
||||
private void run_Click(object sender, EventArgs e)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Interpreter.Reset();
|
||||
Interpreter.Execute(programinput.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() => Infobox.Show("Program Error", "An error occurred while executing your program: " + ex.GetType().ToString()));
|
||||
}
|
||||
}).Start();
|
||||
}
|
||||
|
||||
private void tabs_Selected(object sender, TabControlEventArgs e)
|
||||
{
|
||||
DoLayout();
|
||||
}
|
||||
|
||||
private void load_Click(object sender, EventArgs e)
|
||||
{
|
||||
AppearanceManager.SetupDialog(new FileDialog(new string[] { ".bf" }, FileOpenerStyle.Open, new Action<string>((file) => programinput.Text = Objects.ShiftFS.Utils.ReadAllText(file))));
|
||||
}
|
||||
|
||||
private void save_Click(object sender, EventArgs e)
|
||||
{
|
||||
AppearanceManager.SetupDialog(new FileDialog(new string[] { ".bf" }, FileOpenerStyle.Save, new Action<string>((file) => Objects.ShiftFS.Utils.WriteAllText(file, programinput.Text))));
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.WinForms/Applications/MindBlow.resx
Normal file
120
ShiftOS.WinForms/Applications/MindBlow.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
883
ShiftOS.WinForms/Applications/Pong.Designer.cs
generated
883
ShiftOS.WinForms/Applications/Pong.Designer.cs
generated
|
@ -1,64 +1,13 @@
|
|||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
using ShiftOS.WinForms.Controls;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
partial class Pong
|
||||
{
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
|
@ -71,741 +20,185 @@ namespace ShiftOS.WinForms.Applications
|
|||
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()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.gameTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.counter = new System.Windows.Forms.Timer(this.components);
|
||||
this.tmrcountdown = new System.Windows.Forms.Timer(this.components);
|
||||
this.tmrstoryline = new System.Windows.Forms.Timer(this.components);
|
||||
this.pgcontents = new ShiftOS.WinForms.Controls.Canvas();
|
||||
this.pnlmultiplayerhandshake = new System.Windows.Forms.Panel();
|
||||
this.lvotherplayers = new System.Windows.Forms.ListView();
|
||||
this.lbmpstatus = new System.Windows.Forms.Label();
|
||||
this.pnlintro = new System.Windows.Forms.Panel();
|
||||
this.btnmatchmake = new System.Windows.Forms.Button();
|
||||
this.Label6 = new System.Windows.Forms.Label();
|
||||
this.btnstartgame = new System.Windows.Forms.Button();
|
||||
this.Label8 = new System.Windows.Forms.Label();
|
||||
this.pnlhighscore = new System.Windows.Forms.Panel();
|
||||
this.lbhighscore = new System.Windows.Forms.ListView();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.pnlgamestats = new System.Windows.Forms.Panel();
|
||||
this.pnlcanvas = new System.Windows.Forms.Panel();
|
||||
this.pnllevelwon = new System.Windows.Forms.Panel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.lblnextstats = new System.Windows.Forms.Label();
|
||||
this.Label7 = new System.Windows.Forms.Label();
|
||||
this.lblpreviousstats = new System.Windows.Forms.Label();
|
||||
this.Label4 = new System.Windows.Forms.Label();
|
||||
this.btnplayon = new System.Windows.Forms.Button();
|
||||
this.Label3 = new System.Windows.Forms.Label();
|
||||
this.btncashout = new System.Windows.Forms.Button();
|
||||
this.Label2 = new System.Windows.Forms.Label();
|
||||
this.lbllevelreached = new System.Windows.Forms.Label();
|
||||
this.pnlfinalstats = new System.Windows.Forms.Panel();
|
||||
this.btnplayagain = new System.Windows.Forms.Button();
|
||||
this.lblfinalcodepoints = new System.Windows.Forms.Label();
|
||||
this.Label11 = new System.Windows.Forms.Label();
|
||||
this.lblfinalcomputerreward = new System.Windows.Forms.Label();
|
||||
this.Label9 = new System.Windows.Forms.Label();
|
||||
this.lblfinallevelreward = new System.Windows.Forms.Label();
|
||||
this.lblfinallevelreached = new System.Windows.Forms.Label();
|
||||
this.lblfinalcodepointswithtext = new System.Windows.Forms.Label();
|
||||
this.pnllose = new System.Windows.Forms.Panel();
|
||||
this.lblmissedout = new System.Windows.Forms.Label();
|
||||
this.lblbutyougained = new System.Windows.Forms.Label();
|
||||
this.btnlosetryagain = new System.Windows.Forms.Button();
|
||||
this.Label5 = new System.Windows.Forms.Label();
|
||||
this.Label1 = new System.Windows.Forms.Label();
|
||||
this.lblbeatai = new System.Windows.Forms.Label();
|
||||
this.lblcountdown = new System.Windows.Forms.Label();
|
||||
this.ball = new ShiftOS.WinForms.Controls.Canvas();
|
||||
this.paddleHuman = new System.Windows.Forms.PictureBox();
|
||||
this.paddleComputer = new System.Windows.Forms.Panel();
|
||||
this.lbllevelandtime = new System.Windows.Forms.Label();
|
||||
this.lblstatscodepoints = new System.Windows.Forms.Label();
|
||||
this.lblstatsY = new System.Windows.Forms.Label();
|
||||
this.lblstatsX = new System.Windows.Forms.Label();
|
||||
this.pgcontents.SuspendLayout();
|
||||
this.pnlmultiplayerhandshake.SuspendLayout();
|
||||
this.pnlintro.SuspendLayout();
|
||||
this.pnlhighscore.SuspendLayout();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
this.pnlgamestats.SuspendLayout();
|
||||
this.pnlfinalstats.SuspendLayout();
|
||||
this.pnllose.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).BeginInit();
|
||||
this.lbltitle = new System.Windows.Forms.Label();
|
||||
this.pnlgamestart = new System.Windows.Forms.Panel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.btnplay = new System.Windows.Forms.Button();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.pnllevelwon.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.pnlgamestart.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// gameTimer
|
||||
// pnlcanvas
|
||||
//
|
||||
this.gameTimer.Interval = 30;
|
||||
this.gameTimer.Tick += new System.EventHandler(this.gameTimer_Tick);
|
||||
this.pnlcanvas.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlcanvas.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlcanvas.Name = "pnlcanvas";
|
||||
this.pnlcanvas.Size = new System.Drawing.Size(879, 450);
|
||||
this.pnlcanvas.TabIndex = 0;
|
||||
this.pnlcanvas.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlcanvas_Paint);
|
||||
this.pnlcanvas.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pnlcanvas_MouseMove);
|
||||
//
|
||||
// counter
|
||||
// pnllevelwon
|
||||
//
|
||||
this.counter.Interval = 1000;
|
||||
this.counter.Tick += new System.EventHandler(this.counter_Tick);
|
||||
this.pnllevelwon.Controls.Add(this.label1);
|
||||
this.pnllevelwon.Controls.Add(this.panel1);
|
||||
this.pnllevelwon.Controls.Add(this.lbltitle);
|
||||
this.pnllevelwon.Location = new System.Drawing.Point(57, 75);
|
||||
this.pnllevelwon.Name = "pnllevelwon";
|
||||
this.pnllevelwon.Size = new System.Drawing.Size(301, 184);
|
||||
this.pnllevelwon.TabIndex = 0;
|
||||
this.pnllevelwon.Visible = false;
|
||||
//
|
||||
// tmrcountdown
|
||||
// label1
|
||||
//
|
||||
this.tmrcountdown.Interval = 1000;
|
||||
this.tmrcountdown.Tick += new System.EventHandler(this.countdown_Tick);
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label1.Location = new System.Drawing.Point(0, 13);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(301, 139);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "{PONG_BEATLEVELDESC}";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// tmrstoryline
|
||||
// panel1
|
||||
//
|
||||
this.tmrstoryline.Interval = 1000;
|
||||
this.tmrstoryline.Tick += new System.EventHandler(this.tmrstoryline_Tick);
|
||||
//
|
||||
// pgcontents
|
||||
//
|
||||
this.pgcontents.BackColor = System.Drawing.Color.White;
|
||||
this.pgcontents.Controls.Add(this.pnlmultiplayerhandshake);
|
||||
this.pgcontents.Controls.Add(this.pnlintro);
|
||||
this.pgcontents.Controls.Add(this.pnlhighscore);
|
||||
this.pgcontents.Controls.Add(this.pnlgamestats);
|
||||
this.pgcontents.Controls.Add(this.pnlfinalstats);
|
||||
this.pgcontents.Controls.Add(this.pnllose);
|
||||
this.pgcontents.Controls.Add(this.lblbeatai);
|
||||
this.pgcontents.Controls.Add(this.lblcountdown);
|
||||
this.pgcontents.Controls.Add(this.ball);
|
||||
this.pgcontents.Controls.Add(this.paddleHuman);
|
||||
this.pgcontents.Controls.Add(this.paddleComputer);
|
||||
this.pgcontents.Controls.Add(this.lbllevelandtime);
|
||||
this.pgcontents.Controls.Add(this.lblstatscodepoints);
|
||||
this.pgcontents.Controls.Add(this.lblstatsY);
|
||||
this.pgcontents.Controls.Add(this.lblstatsX);
|
||||
this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pgcontents.Location = new System.Drawing.Point(0, 0);
|
||||
this.pgcontents.Name = "pgcontents";
|
||||
this.pgcontents.Size = new System.Drawing.Size(912, 504);
|
||||
this.pgcontents.TabIndex = 20;
|
||||
this.pgcontents.Paint += new System.Windows.Forms.PaintEventHandler(this.pgcontents_Paint);
|
||||
this.pgcontents.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove);
|
||||
//
|
||||
// pnlmultiplayerhandshake
|
||||
//
|
||||
this.pnlmultiplayerhandshake.Controls.Add(this.lvotherplayers);
|
||||
this.pnlmultiplayerhandshake.Controls.Add(this.lbmpstatus);
|
||||
this.pnlmultiplayerhandshake.Location = new System.Drawing.Point(446, 88);
|
||||
this.pnlmultiplayerhandshake.Name = "pnlmultiplayerhandshake";
|
||||
this.pnlmultiplayerhandshake.Size = new System.Drawing.Size(396, 231);
|
||||
this.pnlmultiplayerhandshake.TabIndex = 15;
|
||||
this.pnlmultiplayerhandshake.Visible = false;
|
||||
//
|
||||
// lvotherplayers
|
||||
//
|
||||
this.lvotherplayers.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lvotherplayers.Location = new System.Drawing.Point(0, 45);
|
||||
this.lvotherplayers.MultiSelect = false;
|
||||
this.lvotherplayers.Name = "lvotherplayers";
|
||||
this.lvotherplayers.Size = new System.Drawing.Size(396, 186);
|
||||
this.lvotherplayers.TabIndex = 1;
|
||||
this.lvotherplayers.UseCompatibleStateImageBehavior = false;
|
||||
this.lvotherplayers.View = System.Windows.Forms.View.Details;
|
||||
this.lvotherplayers.DoubleClick += new System.EventHandler(this.lvotherplayers_DoubleClick);
|
||||
//
|
||||
// lbmpstatus
|
||||
//
|
||||
this.lbmpstatus.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.lbmpstatus.Location = new System.Drawing.Point(0, 0);
|
||||
this.lbmpstatus.Name = "lbmpstatus";
|
||||
this.lbmpstatus.Size = new System.Drawing.Size(396, 45);
|
||||
this.lbmpstatus.TabIndex = 0;
|
||||
this.lbmpstatus.Tag = "header2";
|
||||
this.lbmpstatus.Text = "Waiting for other players...";
|
||||
this.lbmpstatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pnlintro
|
||||
//
|
||||
this.pnlintro.Controls.Add(this.btnmatchmake);
|
||||
this.pnlintro.Controls.Add(this.Label6);
|
||||
this.pnlintro.Controls.Add(this.btnstartgame);
|
||||
this.pnlintro.Controls.Add(this.Label8);
|
||||
this.pnlintro.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlintro.Name = "pnlintro";
|
||||
this.pnlintro.Size = new System.Drawing.Size(595, 303);
|
||||
this.pnlintro.TabIndex = 13;
|
||||
this.pnlintro.Tag = "header2";
|
||||
//
|
||||
// btnmatchmake
|
||||
//
|
||||
this.btnmatchmake.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnmatchmake.Location = new System.Drawing.Point(188, 253);
|
||||
this.btnmatchmake.Name = "btnmatchmake";
|
||||
this.btnmatchmake.Size = new System.Drawing.Size(242, 28);
|
||||
this.btnmatchmake.TabIndex = 16;
|
||||
this.btnmatchmake.Text = "Or, play against another Shifter!";
|
||||
this.btnmatchmake.UseVisualStyleBackColor = true;
|
||||
this.btnmatchmake.Click += new System.EventHandler(this.btnmatchmake_Click);
|
||||
//
|
||||
// Label6
|
||||
//
|
||||
this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label6.Location = new System.Drawing.Point(3, 39);
|
||||
this.Label6.Name = "Label6";
|
||||
this.Label6.Size = new System.Drawing.Size(589, 159);
|
||||
this.Label6.TabIndex = 15;
|
||||
this.Label6.Text = "{PONG_DESC}";
|
||||
this.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.Label6.Click += new System.EventHandler(this.Label6_Click);
|
||||
//
|
||||
// btnstartgame
|
||||
//
|
||||
this.btnstartgame.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnstartgame.Location = new System.Drawing.Point(188, 215);
|
||||
this.btnstartgame.Name = "btnstartgame";
|
||||
this.btnstartgame.Size = new System.Drawing.Size(242, 28);
|
||||
this.btnstartgame.TabIndex = 15;
|
||||
this.btnstartgame.Text = "{PLAY}";
|
||||
this.btnstartgame.UseVisualStyleBackColor = true;
|
||||
this.btnstartgame.Click += new System.EventHandler(this.btnstartgame_Click);
|
||||
//
|
||||
// Label8
|
||||
//
|
||||
this.Label8.AutoSize = true;
|
||||
this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label8.ForeColor = System.Drawing.Color.Black;
|
||||
this.Label8.Location = new System.Drawing.Point(250, 5);
|
||||
this.Label8.Name = "Label8";
|
||||
this.Label8.Size = new System.Drawing.Size(280, 31);
|
||||
this.Label8.TabIndex = 14;
|
||||
this.Label8.Text = "{PONG_WELCOME}";
|
||||
this.Label8.Click += new System.EventHandler(this.Label8_Click);
|
||||
//
|
||||
// pnlhighscore
|
||||
//
|
||||
this.pnlhighscore.Controls.Add(this.lbhighscore);
|
||||
this.pnlhighscore.Controls.Add(this.flowLayoutPanel1);
|
||||
this.pnlhighscore.Controls.Add(this.label10);
|
||||
this.pnlhighscore.Location = new System.Drawing.Point(688, 302);
|
||||
this.pnlhighscore.Name = "pnlhighscore";
|
||||
this.pnlhighscore.Size = new System.Drawing.Size(539, 311);
|
||||
this.pnlhighscore.TabIndex = 14;
|
||||
this.pnlhighscore.Visible = false;
|
||||
//
|
||||
// lbhighscore
|
||||
//
|
||||
this.lbhighscore.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbhighscore.Location = new System.Drawing.Point(0, 36);
|
||||
this.lbhighscore.Name = "lbhighscore";
|
||||
this.lbhighscore.Size = new System.Drawing.Size(539, 246);
|
||||
this.lbhighscore.TabIndex = 1;
|
||||
this.lbhighscore.UseCompatibleStateImageBehavior = false;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.AutoSize = true;
|
||||
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flowLayoutPanel1.Controls.Add(this.button2);
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 282);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(539, 29);
|
||||
this.flowLayoutPanel1.TabIndex = 2;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.AutoSize = true;
|
||||
this.button2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.button2.Location = new System.Drawing.Point(476, 3);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(60, 23);
|
||||
this.button2.TabIndex = 0;
|
||||
this.button2.Text = "{CLOSE}";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label10.Location = new System.Drawing.Point(0, 0);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(539, 36);
|
||||
this.label10.TabIndex = 0;
|
||||
this.label10.Text = "{HIGH_SCORES}";
|
||||
this.label10.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// pnlgamestats
|
||||
//
|
||||
this.pnlgamestats.Controls.Add(this.button1);
|
||||
this.pnlgamestats.Controls.Add(this.label12);
|
||||
this.pnlgamestats.Controls.Add(this.lblnextstats);
|
||||
this.pnlgamestats.Controls.Add(this.Label7);
|
||||
this.pnlgamestats.Controls.Add(this.lblpreviousstats);
|
||||
this.pnlgamestats.Controls.Add(this.Label4);
|
||||
this.pnlgamestats.Controls.Add(this.btnplayon);
|
||||
this.pnlgamestats.Controls.Add(this.Label3);
|
||||
this.pnlgamestats.Controls.Add(this.btncashout);
|
||||
this.pnlgamestats.Controls.Add(this.Label2);
|
||||
this.pnlgamestats.Controls.Add(this.lbllevelreached);
|
||||
this.pnlgamestats.Location = new System.Drawing.Point(104, 375);
|
||||
this.pnlgamestats.Name = "pnlgamestats";
|
||||
this.pnlgamestats.Size = new System.Drawing.Size(466, 284);
|
||||
this.pnlgamestats.TabIndex = 6;
|
||||
this.pnlgamestats.Visible = false;
|
||||
this.panel1.Controls.Add(this.button1);
|
||||
this.panel1.Controls.Add(this.btncashout);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 152);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(301, 32);
|
||||
this.panel1.TabIndex = 2;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.button1.Location = new System.Drawing.Point(32, 223);
|
||||
this.button1.Location = new System.Drawing.Point(159, 6);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(191, 35);
|
||||
this.button1.TabIndex = 10;
|
||||
this.button1.Text = "{PONG_VIEW_HIGHSCORES}";
|
||||
this.button1.Size = new System.Drawing.Size(93, 23);
|
||||
this.button1.TabIndex = 1;
|
||||
this.button1.Text = "{PONG_PLAYON}";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.btnhighscore_Click);
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label12.Location = new System.Drawing.Point(8, 187);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(245, 33);
|
||||
this.label12.TabIndex = 9;
|
||||
this.label12.Text = "{PONG_HIGHSCORE_EXP}";
|
||||
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblnextstats
|
||||
//
|
||||
this.lblnextstats.AutoSize = true;
|
||||
this.lblnextstats.Location = new System.Drawing.Point(278, 136);
|
||||
this.lblnextstats.Name = "lblnextstats";
|
||||
this.lblnextstats.Size = new System.Drawing.Size(0, 13);
|
||||
this.lblnextstats.TabIndex = 8;
|
||||
//
|
||||
// Label7
|
||||
//
|
||||
this.Label7.AutoSize = true;
|
||||
this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label7.Location = new System.Drawing.Point(278, 119);
|
||||
this.Label7.Name = "Label7";
|
||||
this.Label7.Size = new System.Drawing.Size(124, 16);
|
||||
this.Label7.TabIndex = 7;
|
||||
this.Label7.Text = "Next Level Stats:";
|
||||
//
|
||||
// lblpreviousstats
|
||||
//
|
||||
this.lblpreviousstats.AutoSize = true;
|
||||
this.lblpreviousstats.Location = new System.Drawing.Point(278, 54);
|
||||
this.lblpreviousstats.Name = "lblpreviousstats";
|
||||
this.lblpreviousstats.Size = new System.Drawing.Size(0, 13);
|
||||
this.lblpreviousstats.TabIndex = 6;
|
||||
//
|
||||
// Label4
|
||||
//
|
||||
this.Label4.AutoSize = true;
|
||||
this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label4.Location = new System.Drawing.Point(278, 37);
|
||||
this.Label4.Name = "Label4";
|
||||
this.Label4.Size = new System.Drawing.Size(154, 16);
|
||||
this.Label4.TabIndex = 5;
|
||||
this.Label4.Text = "Previous Level Stats:";
|
||||
//
|
||||
// btnplayon
|
||||
//
|
||||
this.btnplayon.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnplayon.Location = new System.Drawing.Point(32, 147);
|
||||
this.btnplayon.Name = "btnplayon";
|
||||
this.btnplayon.Size = new System.Drawing.Size(191, 35);
|
||||
this.btnplayon.TabIndex = 4;
|
||||
this.btnplayon.Text = "Play on for 3 codepoints!";
|
||||
this.btnplayon.UseVisualStyleBackColor = true;
|
||||
this.btnplayon.Click += new System.EventHandler(this.btnplayon_Click);
|
||||
//
|
||||
// Label3
|
||||
//
|
||||
this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label3.Location = new System.Drawing.Point(8, 111);
|
||||
this.Label3.Name = "Label3";
|
||||
this.Label3.Size = new System.Drawing.Size(245, 33);
|
||||
this.Label3.TabIndex = 3;
|
||||
this.Label3.Text = "{PONG_PLAYON_DESC}";
|
||||
this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// btncashout
|
||||
//
|
||||
this.btncashout.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btncashout.Location = new System.Drawing.Point(32, 73);
|
||||
this.btncashout.Location = new System.Drawing.Point(48, 6);
|
||||
this.btncashout.Name = "btncashout";
|
||||
this.btncashout.Size = new System.Drawing.Size(191, 35);
|
||||
this.btncashout.TabIndex = 2;
|
||||
this.btncashout.Text = "Cash out with 1 codepoint!";
|
||||
this.btncashout.Size = new System.Drawing.Size(93, 23);
|
||||
this.btncashout.TabIndex = 0;
|
||||
this.btncashout.Text = "{PONG_CASHOUT}";
|
||||
this.btncashout.UseVisualStyleBackColor = true;
|
||||
this.btncashout.Click += new System.EventHandler(this.btncashout_Click);
|
||||
//
|
||||
// Label2
|
||||
// lbltitle
|
||||
//
|
||||
this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label2.Location = new System.Drawing.Point(8, 37);
|
||||
this.Label2.Name = "Label2";
|
||||
this.Label2.Size = new System.Drawing.Size(245, 33);
|
||||
this.Label2.TabIndex = 1;
|
||||
this.Label2.Text = "{PONG_CASHOUT_DESC}";
|
||||
this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.lbltitle.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.lbltitle.Location = new System.Drawing.Point(0, 0);
|
||||
this.lbltitle.Name = "lbltitle";
|
||||
this.lbltitle.Size = new System.Drawing.Size(301, 13);
|
||||
this.lbltitle.TabIndex = 0;
|
||||
this.lbltitle.Tag = "header2";
|
||||
this.lbltitle.Text = "You\'ve reached level 2!";
|
||||
this.lbltitle.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// lbllevelreached
|
||||
// pnlgamestart
|
||||
//
|
||||
this.lbllevelreached.AutoSize = true;
|
||||
this.lbllevelreached.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbllevelreached.Location = new System.Drawing.Point(149, 6);
|
||||
this.lbllevelreached.Name = "lbllevelreached";
|
||||
this.lbllevelreached.Size = new System.Drawing.Size(185, 20);
|
||||
this.lbllevelreached.TabIndex = 0;
|
||||
this.lbllevelreached.Text = "You Reached Level 2!";
|
||||
this.pnlgamestart.Controls.Add(this.label2);
|
||||
this.pnlgamestart.Controls.Add(this.panel3);
|
||||
this.pnlgamestart.Controls.Add(this.label3);
|
||||
this.pnlgamestart.Location = new System.Drawing.Point(289, 133);
|
||||
this.pnlgamestart.Name = "pnlgamestart";
|
||||
this.pnlgamestart.Size = new System.Drawing.Size(301, 280);
|
||||
this.pnlgamestart.TabIndex = 1;
|
||||
this.pnlgamestart.Visible = false;
|
||||
//
|
||||
// pnlfinalstats
|
||||
// label2
|
||||
//
|
||||
this.pnlfinalstats.Controls.Add(this.btnplayagain);
|
||||
this.pnlfinalstats.Controls.Add(this.lblfinalcodepoints);
|
||||
this.pnlfinalstats.Controls.Add(this.Label11);
|
||||
this.pnlfinalstats.Controls.Add(this.lblfinalcomputerreward);
|
||||
this.pnlfinalstats.Controls.Add(this.Label9);
|
||||
this.pnlfinalstats.Controls.Add(this.lblfinallevelreward);
|
||||
this.pnlfinalstats.Controls.Add(this.lblfinallevelreached);
|
||||
this.pnlfinalstats.Controls.Add(this.lblfinalcodepointswithtext);
|
||||
this.pnlfinalstats.Location = new System.Drawing.Point(172, 74);
|
||||
this.pnlfinalstats.Name = "pnlfinalstats";
|
||||
this.pnlfinalstats.Size = new System.Drawing.Size(362, 226);
|
||||
this.pnlfinalstats.TabIndex = 9;
|
||||
this.pnlfinalstats.Visible = false;
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label2.Location = new System.Drawing.Point(0, 42);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(301, 206);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "{PONG_DESC}";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnplayagain
|
||||
// panel3
|
||||
//
|
||||
this.btnplayagain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnplayagain.Location = new System.Drawing.Point(5, 194);
|
||||
this.btnplayagain.Name = "btnplayagain";
|
||||
this.btnplayagain.Size = new System.Drawing.Size(352, 29);
|
||||
this.btnplayagain.TabIndex = 16;
|
||||
this.btnplayagain.Text = "{PLAY}";
|
||||
this.btnplayagain.UseVisualStyleBackColor = true;
|
||||
this.btnplayagain.Click += new System.EventHandler(this.btnplayagain_Click);
|
||||
this.panel3.Controls.Add(this.btnplay);
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 248);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(301, 32);
|
||||
this.panel3.TabIndex = 2;
|
||||
//
|
||||
// lblfinalcodepoints
|
||||
// btnplay
|
||||
//
|
||||
this.lblfinalcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblfinalcodepoints.Location = new System.Drawing.Point(3, 124);
|
||||
this.lblfinalcodepoints.Name = "lblfinalcodepoints";
|
||||
this.lblfinalcodepoints.Size = new System.Drawing.Size(356, 73);
|
||||
this.lblfinalcodepoints.TabIndex = 15;
|
||||
this.lblfinalcodepoints.Tag = "header1";
|
||||
this.lblfinalcodepoints.Text = "134 CP";
|
||||
this.lblfinalcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.btnplay.Location = new System.Drawing.Point(100, 6);
|
||||
this.btnplay.Name = "btnplay";
|
||||
this.btnplay.Size = new System.Drawing.Size(116, 23);
|
||||
this.btnplay.TabIndex = 1;
|
||||
this.btnplay.Text = "{PONG_PLAY}";
|
||||
this.btnplay.UseVisualStyleBackColor = true;
|
||||
this.btnplay.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// Label11
|
||||
// label3
|
||||
//
|
||||
this.Label11.AutoSize = true;
|
||||
this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label11.Location = new System.Drawing.Point(162, 82);
|
||||
this.Label11.Name = "Label11";
|
||||
this.Label11.Size = new System.Drawing.Size(33, 33);
|
||||
this.Label11.TabIndex = 14;
|
||||
this.Label11.Tag = "header2";
|
||||
this.Label11.Text = "+";
|
||||
this.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblfinalcomputerreward
|
||||
//
|
||||
this.lblfinalcomputerreward.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblfinalcomputerreward.Location = new System.Drawing.Point(193, 72);
|
||||
this.lblfinalcomputerreward.Name = "lblfinalcomputerreward";
|
||||
this.lblfinalcomputerreward.Size = new System.Drawing.Size(151, 52);
|
||||
this.lblfinalcomputerreward.TabIndex = 12;
|
||||
this.lblfinalcomputerreward.Tag = "header2";
|
||||
this.lblfinalcomputerreward.Text = "34";
|
||||
this.lblfinalcomputerreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// Label9
|
||||
//
|
||||
this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label9.Location = new System.Drawing.Point(179, 31);
|
||||
this.Label9.Name = "Label9";
|
||||
this.Label9.Size = new System.Drawing.Size(180, 49);
|
||||
this.Label9.TabIndex = 11;
|
||||
this.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblfinallevelreward
|
||||
//
|
||||
this.lblfinallevelreward.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblfinallevelreward.Location = new System.Drawing.Point(12, 72);
|
||||
this.lblfinallevelreward.Name = "lblfinallevelreward";
|
||||
this.lblfinallevelreward.Size = new System.Drawing.Size(151, 52);
|
||||
this.lblfinallevelreward.TabIndex = 10;
|
||||
this.lblfinallevelreward.Tag = "header2";
|
||||
this.lblfinallevelreward.Text = "100";
|
||||
this.lblfinallevelreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblfinallevelreached
|
||||
//
|
||||
this.lblfinallevelreached.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblfinallevelreached.Location = new System.Drawing.Point(3, 31);
|
||||
this.lblfinallevelreached.Name = "lblfinallevelreached";
|
||||
this.lblfinallevelreached.Size = new System.Drawing.Size(170, 49);
|
||||
this.lblfinallevelreached.TabIndex = 9;
|
||||
this.lblfinallevelreached.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblfinalcodepointswithtext
|
||||
//
|
||||
this.lblfinalcodepointswithtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblfinalcodepointswithtext.Location = new System.Drawing.Point(3, 2);
|
||||
this.lblfinalcodepointswithtext.Name = "lblfinalcodepointswithtext";
|
||||
this.lblfinalcodepointswithtext.Size = new System.Drawing.Size(356, 26);
|
||||
this.lblfinalcodepointswithtext.TabIndex = 1;
|
||||
this.lblfinalcodepointswithtext.Tag = "header2";
|
||||
this.lblfinalcodepointswithtext.Text = "You cashed out with 134 codepoints!";
|
||||
this.lblfinalcodepointswithtext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pnllose
|
||||
//
|
||||
this.pnllose.Controls.Add(this.lblmissedout);
|
||||
this.pnllose.Controls.Add(this.lblbutyougained);
|
||||
this.pnllose.Controls.Add(this.btnlosetryagain);
|
||||
this.pnllose.Controls.Add(this.Label5);
|
||||
this.pnllose.Controls.Add(this.Label1);
|
||||
this.pnllose.Location = new System.Drawing.Point(209, 71);
|
||||
this.pnllose.Name = "pnllose";
|
||||
this.pnllose.Size = new System.Drawing.Size(266, 214);
|
||||
this.pnllose.TabIndex = 10;
|
||||
this.pnllose.Visible = false;
|
||||
//
|
||||
// lblmissedout
|
||||
//
|
||||
this.lblmissedout.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblmissedout.Location = new System.Drawing.Point(3, 175);
|
||||
this.lblmissedout.Name = "lblmissedout";
|
||||
this.lblmissedout.Size = new System.Drawing.Size(146, 35);
|
||||
this.lblmissedout.TabIndex = 3;
|
||||
this.lblmissedout.Text = "You Missed Out On: 500 Codepoints";
|
||||
this.lblmissedout.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblbutyougained
|
||||
//
|
||||
this.lblbutyougained.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblbutyougained.Location = new System.Drawing.Point(3, 125);
|
||||
this.lblbutyougained.Name = "lblbutyougained";
|
||||
this.lblbutyougained.Size = new System.Drawing.Size(146, 35);
|
||||
this.lblbutyougained.TabIndex = 3;
|
||||
this.lblbutyougained.Text = "But you gained 5 Codepoints";
|
||||
this.lblbutyougained.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnlosetryagain
|
||||
//
|
||||
this.btnlosetryagain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnlosetryagain.Location = new System.Drawing.Point(155, 176);
|
||||
this.btnlosetryagain.Name = "btnlosetryagain";
|
||||
this.btnlosetryagain.Size = new System.Drawing.Size(106, 35);
|
||||
this.btnlosetryagain.TabIndex = 2;
|
||||
this.btnlosetryagain.Text = "Try Again";
|
||||
this.btnlosetryagain.UseVisualStyleBackColor = true;
|
||||
this.btnlosetryagain.Click += new System.EventHandler(this.btnlosetryagain_Click);
|
||||
//
|
||||
// Label5
|
||||
//
|
||||
this.Label5.Location = new System.Drawing.Point(7, 26);
|
||||
this.Label5.Name = "Label5";
|
||||
this.Label5.Size = new System.Drawing.Size(260, 163);
|
||||
this.Label5.TabIndex = 1;
|
||||
//
|
||||
// Label1
|
||||
//
|
||||
this.Label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.Label1.Name = "Label1";
|
||||
this.Label1.Size = new System.Drawing.Size(266, 16);
|
||||
this.Label1.TabIndex = 0;
|
||||
this.Label1.Text = "You lose!";
|
||||
this.Label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// lblbeatai
|
||||
//
|
||||
this.lblbeatai.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblbeatai.Location = new System.Drawing.Point(47, 41);
|
||||
this.lblbeatai.Name = "lblbeatai";
|
||||
this.lblbeatai.Size = new System.Drawing.Size(600, 30);
|
||||
this.lblbeatai.TabIndex = 8;
|
||||
this.lblbeatai.Tag = "header2";
|
||||
this.lblbeatai.Text = "You got 2 codepoints for beating the Computer!";
|
||||
this.lblbeatai.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.lblbeatai.Visible = false;
|
||||
//
|
||||
// lblcountdown
|
||||
//
|
||||
this.lblcountdown.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblcountdown.Location = new System.Drawing.Point(182, 152);
|
||||
this.lblcountdown.Name = "lblcountdown";
|
||||
this.lblcountdown.Size = new System.Drawing.Size(315, 49);
|
||||
this.lblcountdown.TabIndex = 7;
|
||||
this.lblcountdown.Text = "3";
|
||||
this.lblcountdown.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.lblcountdown.Visible = false;
|
||||
//
|
||||
// ball
|
||||
//
|
||||
this.ball.BackColor = System.Drawing.Color.Black;
|
||||
this.ball.Location = new System.Drawing.Point(300, 152);
|
||||
this.ball.Name = "ball";
|
||||
this.ball.Size = new System.Drawing.Size(20, 20);
|
||||
this.ball.TabIndex = 2;
|
||||
this.ball.MouseEnter += new System.EventHandler(this.ball_MouseEnter);
|
||||
this.ball.MouseLeave += new System.EventHandler(this.ball_MouseLeave);
|
||||
//
|
||||
// paddleHuman
|
||||
//
|
||||
this.paddleHuman.BackColor = System.Drawing.Color.Black;
|
||||
this.paddleHuman.Location = new System.Drawing.Point(10, 134);
|
||||
this.paddleHuman.Name = "paddleHuman";
|
||||
this.paddleHuman.Size = new System.Drawing.Size(20, 100);
|
||||
this.paddleHuman.TabIndex = 3;
|
||||
this.paddleHuman.TabStop = false;
|
||||
//
|
||||
// paddleComputer
|
||||
//
|
||||
this.paddleComputer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.paddleComputer.BackColor = System.Drawing.Color.Black;
|
||||
this.paddleComputer.Location = new System.Drawing.Point(878, 134);
|
||||
this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 150);
|
||||
this.paddleComputer.Name = "paddleComputer";
|
||||
this.paddleComputer.Size = new System.Drawing.Size(20, 100);
|
||||
this.paddleComputer.TabIndex = 1;
|
||||
//
|
||||
// lbllevelandtime
|
||||
//
|
||||
this.lbllevelandtime.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.lbllevelandtime.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbllevelandtime.Location = new System.Drawing.Point(0, 0);
|
||||
this.lbllevelandtime.Name = "lbllevelandtime";
|
||||
this.lbllevelandtime.Size = new System.Drawing.Size(912, 22);
|
||||
this.lbllevelandtime.TabIndex = 4;
|
||||
this.lbllevelandtime.Tag = "header1";
|
||||
this.lbllevelandtime.Text = "Level: 1 - 58 Seconds Left";
|
||||
this.lbllevelandtime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblstatscodepoints
|
||||
//
|
||||
this.lblstatscodepoints.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblstatscodepoints.AutoSize = true;
|
||||
this.lblstatscodepoints.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblstatscodepoints.Location = new System.Drawing.Point(239, 460);
|
||||
this.lblstatscodepoints.Name = "lblstatscodepoints";
|
||||
this.lblstatscodepoints.Size = new System.Drawing.Size(116, 23);
|
||||
this.lblstatscodepoints.TabIndex = 12;
|
||||
this.lblstatscodepoints.Tag = "header2";
|
||||
this.lblstatscodepoints.Text = "Codepoints: ";
|
||||
this.lblstatscodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblstatsY
|
||||
//
|
||||
this.lblstatsY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblstatsY.AutoSize = true;
|
||||
this.lblstatsY.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblstatsY.Location = new System.Drawing.Point(440, 460);
|
||||
this.lblstatsY.Name = "lblstatsY";
|
||||
this.lblstatsY.Size = new System.Drawing.Size(76, 23);
|
||||
this.lblstatsY.TabIndex = 11;
|
||||
this.lblstatsY.Tag = "header2";
|
||||
this.lblstatsY.Text = "Yspeed:";
|
||||
this.lblstatsY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblstatsX
|
||||
//
|
||||
this.lblstatsX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lblstatsX.AutoSize = true;
|
||||
this.lblstatsX.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblstatsX.Location = new System.Drawing.Point(3, 460);
|
||||
this.lblstatsX.Name = "lblstatsX";
|
||||
this.lblstatsX.Size = new System.Drawing.Size(83, 23);
|
||||
this.lblstatsX.TabIndex = 5;
|
||||
this.lblstatsX.Tag = "header2";
|
||||
this.lblstatsX.Text = "Xspeed: ";
|
||||
this.lblstatsX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label3.Location = new System.Drawing.Point(0, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(301, 42);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Tag = "header2";
|
||||
this.label3.Text = "{PONG_WELCOME}";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// Pong
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.Controls.Add(this.pgcontents);
|
||||
this.DoubleBuffered = true;
|
||||
this.Controls.Add(this.pnlgamestart);
|
||||
this.Controls.Add(this.pnllevelwon);
|
||||
this.Controls.Add(this.pnlcanvas);
|
||||
this.Name = "Pong";
|
||||
this.Size = new System.Drawing.Size(912, 504);
|
||||
this.Load += new System.EventHandler(this.Pong_Load);
|
||||
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove);
|
||||
this.pgcontents.ResumeLayout(false);
|
||||
this.pgcontents.PerformLayout();
|
||||
this.pnlmultiplayerhandshake.ResumeLayout(false);
|
||||
this.pnlintro.ResumeLayout(false);
|
||||
this.pnlintro.PerformLayout();
|
||||
this.pnlhighscore.ResumeLayout(false);
|
||||
this.pnlhighscore.PerformLayout();
|
||||
this.flowLayoutPanel1.ResumeLayout(false);
|
||||
this.flowLayoutPanel1.PerformLayout();
|
||||
this.pnlgamestats.ResumeLayout(false);
|
||||
this.pnlgamestats.PerformLayout();
|
||||
this.pnlfinalstats.ResumeLayout(false);
|
||||
this.pnlfinalstats.PerformLayout();
|
||||
this.pnllose.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).EndInit();
|
||||
this.Size = new System.Drawing.Size(879, 450);
|
||||
this.pnllevelwon.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.pnlgamestart.ResumeLayout(false);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
internal System.Windows.Forms.Panel paddleComputer;
|
||||
internal System.Windows.Forms.Timer gameTimer;
|
||||
internal System.Windows.Forms.PictureBox paddleHuman;
|
||||
internal System.Windows.Forms.Label lbllevelandtime;
|
||||
internal System.Windows.Forms.Label lblstatsX;
|
||||
internal System.Windows.Forms.Timer counter;
|
||||
internal System.Windows.Forms.Panel pnlgamestats;
|
||||
internal System.Windows.Forms.Label lblnextstats;
|
||||
internal System.Windows.Forms.Label Label7;
|
||||
internal System.Windows.Forms.Label lblpreviousstats;
|
||||
internal System.Windows.Forms.Label Label4;
|
||||
internal System.Windows.Forms.Button btnplayon;
|
||||
internal System.Windows.Forms.Label Label3;
|
||||
internal System.Windows.Forms.Button btncashout;
|
||||
internal System.Windows.Forms.Label Label2;
|
||||
internal System.Windows.Forms.Label lbllevelreached;
|
||||
internal System.Windows.Forms.Label lblcountdown;
|
||||
internal System.Windows.Forms.Timer tmrcountdown;
|
||||
internal System.Windows.Forms.Label lblbeatai;
|
||||
internal System.Windows.Forms.Panel pnlfinalstats;
|
||||
internal System.Windows.Forms.Button btnplayagain;
|
||||
internal System.Windows.Forms.Label lblfinalcodepoints;
|
||||
internal System.Windows.Forms.Label Label11;
|
||||
internal System.Windows.Forms.Label lblfinalcomputerreward;
|
||||
internal System.Windows.Forms.Label Label9;
|
||||
internal System.Windows.Forms.Label lblfinallevelreward;
|
||||
internal System.Windows.Forms.Label lblfinallevelreached;
|
||||
internal System.Windows.Forms.Label lblfinalcodepointswithtext;
|
||||
internal System.Windows.Forms.Panel pnllose;
|
||||
internal System.Windows.Forms.Label lblmissedout;
|
||||
internal System.Windows.Forms.Label lblbutyougained;
|
||||
internal System.Windows.Forms.Button btnlosetryagain;
|
||||
internal System.Windows.Forms.Label Label5;
|
||||
internal System.Windows.Forms.Label Label1;
|
||||
internal System.Windows.Forms.Label lblstatscodepoints;
|
||||
internal System.Windows.Forms.Label lblstatsY;
|
||||
internal System.Windows.Forms.Panel pnlintro;
|
||||
internal System.Windows.Forms.Label Label6;
|
||||
internal System.Windows.Forms.Button btnstartgame;
|
||||
internal System.Windows.Forms.Label Label8;
|
||||
internal System.Windows.Forms.Timer tmrstoryline;
|
||||
private System.Windows.Forms.Panel pnlhighscore;
|
||||
private System.Windows.Forms.ListView lbhighscore;
|
||||
private System.Windows.Forms.Label label10;
|
||||
internal Canvas pgcontents;
|
||||
internal Canvas ball;
|
||||
internal System.Windows.Forms.Button button1;
|
||||
internal System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
internal System.Windows.Forms.Button btnmatchmake;
|
||||
private System.Windows.Forms.Panel pnlmultiplayerhandshake;
|
||||
private System.Windows.Forms.ListView lvotherplayers;
|
||||
private System.Windows.Forms.Label lbmpstatus;
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel pnlcanvas;
|
||||
private System.Windows.Forms.Panel pnllevelwon;
|
||||
private System.Windows.Forms.Label lbltitle;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button btncashout;
|
||||
private System.Windows.Forms.Panel pnlgamestart;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.Button btnplay;
|
||||
private System.Windows.Forms.Label label3;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -117,16 +117,4 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="gameTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>227, 17</value>
|
||||
</metadata>
|
||||
<metadata name="counter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>134, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tmrcountdown.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>340, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tmrstoryline.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -217,7 +217,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
if (!lblword.Text.Contains("_"))
|
||||
{
|
||||
int oldlives = lives;
|
||||
int cp = (word.Length * oldlives) * 2; //drunky michael made this 5x...
|
||||
ulong cp = (ulong)(word.Length * oldlives) * 2; //drunky michael made this 5x...
|
||||
SaveSystem.TransferCodepointsFrom("shiftletters", cp);
|
||||
StartGame();
|
||||
}
|
||||
|
|
|
@ -50,11 +50,11 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
timer1.Start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public bool OnUnload()
|
||||
|
@ -64,7 +64,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
// The Dynamic Display
|
||||
|
@ -82,13 +82,13 @@ namespace ShiftOS.WinForms.Applications
|
|||
int codePoints = Convert.ToInt32(Math.Round(cpUpDown.Value, 0));
|
||||
int difficulty = Convert.ToInt32(Math.Round(difUpDown.Value, 0));
|
||||
|
||||
if (SaveSystem.CurrentSave.Codepoints <= 9)
|
||||
if (SaveSystem.CurrentSave.Codepoints < 10)
|
||||
{
|
||||
Infobox.Show("Not enough Codepoints", "You do not have enough Codepoints to use ShiftLotto!");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SaveSystem.CurrentSave.Codepoints - (codePoints * difficulty) <= 0)
|
||||
if (SaveSystem.CurrentSave.Codepoints < (ulong)(codePoints * difficulty))
|
||||
{
|
||||
Infobox.Show("Not enough Codepoints", "You do not have enough Codepoints to gamble this amount!");
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
int winningNumber = rnd.Next(0, difficulty);
|
||||
|
||||
// Multiply CodePoints * Difficulty
|
||||
int jackpot = codePoints * difficulty;
|
||||
ulong jackpot = (ulong)(codePoints * difficulty);
|
||||
|
||||
// Test the random ints
|
||||
if (guessedNumber == winningNumber)
|
||||
|
@ -110,7 +110,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
// If you win
|
||||
|
||||
// Add Codepoints
|
||||
SaveSystem.TransferCodepointsFrom("shiftlotto", jackpot);
|
||||
SaveSystem.TransferCodepointsFrom("shiftlotto", (ulong)(codePoints * difficulty));
|
||||
|
||||
// Infobox
|
||||
Infobox.Show("YOU WON!", "Good Job! " + jackpot.ToString() + " CP has been added to your account. ");
|
||||
|
@ -122,13 +122,13 @@ namespace ShiftOS.WinForms.Applications
|
|||
// Remove Codepoints
|
||||
SaveSystem.TransferCodepointsToVoid(jackpot);
|
||||
|
||||
|
||||
|
||||
|
||||
// Infobox
|
||||
Infobox.Show("YOU FAILED!", "Sorry! " + jackpot.ToString() + " CP has been removed from your account.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -300,12 +300,12 @@ namespace ShiftOS.WinForms.Applications {
|
|||
}
|
||||
|
||||
public void winGame() {
|
||||
int cp = 0;
|
||||
int origminecount = gameBombCount * 10;
|
||||
ulong cp = 0;
|
||||
ulong origminecount = (ulong)(gameBombCount * 10);
|
||||
if (minetimer < 31) cp = (origminecount * 3);
|
||||
else if (minetimer < 61) cp = (Int32)(origminecount * 2.5);
|
||||
else if (minetimer < 61) cp = (ulong)(origminecount * 2.5);
|
||||
else if (minetimer < 91) cp = (origminecount * 2);
|
||||
else if (minetimer < 121) cp = (Int32)(origminecount * 1.5);
|
||||
else if (minetimer < 121) cp = (ulong)(origminecount * 1.5);
|
||||
else if (minetimer > 120) cp = (origminecount * 1);
|
||||
SaveSystem.TransferCodepointsFrom("shiftsweeper", cp);
|
||||
panelGameStatus.Image = Properties.Resources.SweeperWinFace;
|
||||
|
|
|
@ -391,7 +391,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
}
|
||||
|
||||
|
||||
public int CodepointValue = 0;
|
||||
public uint CodepointValue = 0;
|
||||
public List<ShifterSetting> settings = new List<ShifterSetting>();
|
||||
public Skin LoadedSkin = null;
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
txturl.Location = new Point(btnforward.Left + btnforward.Width + 2, 2);
|
||||
txturl.Width = flcontrols.Width - btnback.Width - 2 - btnforward.Width - 2 - (btngo.Width*2) - 2;
|
||||
btngo.Location = new Point(flcontrols.Width - btngo.Width - 2, 2);
|
||||
flcontrols.BackColor = SkinEngine.LoadedSkin.TitleBackgroundColor;
|
||||
}
|
||||
|
||||
public bool OnUnload()
|
||||
|
@ -147,79 +148,62 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public void NavigateToUrl(string url)
|
||||
{
|
||||
|
||||
txturl.Text = url;
|
||||
foreach(var exe in Directory.GetFiles(Environment.CurrentDirectory))
|
||||
try
|
||||
{
|
||||
if(exe.EndsWith(".exe") || exe.EndsWith(".dll"))
|
||||
foreach (var type in Array.FindAll(ReflectMan.Types, t => t.GetInterfaces().Contains(typeof(IShiftnetSite)) && t.BaseType == typeof(UserControl) && Shiftorium.UpgradeAttributesUnlocked(t)))
|
||||
{
|
||||
try
|
||||
var attribute = type.GetCustomAttributes(false).FirstOrDefault(x => x is ShiftnetSiteAttribute && (x as ShiftnetSiteAttribute).Url == url) as ShiftnetSiteAttribute;
|
||||
if (attribute != null)
|
||||
{
|
||||
var asm = Assembly.LoadFile(exe);
|
||||
foreach (var type in asm.GetTypes())
|
||||
{
|
||||
if (type.GetInterfaces().Contains(typeof(IShiftnetSite)))
|
||||
var obj = (IShiftnetSite)Activator.CreateInstance(type, null);
|
||||
obj.GoToUrl += (u) =>
|
||||
{
|
||||
if (type.BaseType == typeof(UserControl))
|
||||
{
|
||||
var attribute = type.GetCustomAttributes(false).FirstOrDefault(x => x is ShiftnetSiteAttribute) as ShiftnetSiteAttribute;
|
||||
if (attribute != null)
|
||||
{
|
||||
if (attribute.Url == url)
|
||||
{
|
||||
if (Shiftorium.UpgradeAttributesUnlocked(type))
|
||||
{
|
||||
var obj = (IShiftnetSite)Activator.CreateInstance(type, null);
|
||||
obj.GoToUrl += (u) =>
|
||||
{
|
||||
History.Push(u);
|
||||
NavigateToUrl(u);
|
||||
};
|
||||
obj.GoBack += () =>
|
||||
{
|
||||
string u = History.Pop();
|
||||
Future.Push(u);
|
||||
NavigateToUrl(u);
|
||||
};
|
||||
CurrentPage = obj;
|
||||
this.pnlcanvas.Controls.Clear();
|
||||
this.pnlcanvas.Controls.Add((UserControl)obj);
|
||||
((UserControl)obj).Show();
|
||||
((UserControl)obj).Dock = DockStyle.Fill;
|
||||
obj.OnUpgrade();
|
||||
obj.OnSkinLoad();
|
||||
obj.Setup();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
pnlcanvas.Controls.Clear();
|
||||
var tlbl = new Label();
|
||||
tlbl.Text = "Server error in \"" + url + "\" application.";
|
||||
tlbl.Tag = "header1";
|
||||
tlbl.AutoSize = true;
|
||||
tlbl.Location = new Point(10, 10);
|
||||
tlbl.Dock = DockStyle.Top;
|
||||
pnlcanvas.Controls.Add(tlbl);
|
||||
tlbl.Show();
|
||||
|
||||
var crash = new Label();
|
||||
crash.Dock = DockStyle.Fill;
|
||||
crash.AutoSize = false;
|
||||
crash.Text = ex.ToString();
|
||||
pnlcanvas.Controls.Add(crash);
|
||||
crash.Show();
|
||||
crash.BringToFront();
|
||||
ControlManager.SetupControls(pnlcanvas);
|
||||
return;
|
||||
History.Push(CurrentUrl);
|
||||
NavigateToUrl(u);
|
||||
};
|
||||
obj.GoBack += () =>
|
||||
{
|
||||
string u = History.Pop();
|
||||
Future.Push(u);
|
||||
NavigateToUrl(u);
|
||||
};
|
||||
CurrentPage = obj;
|
||||
this.pnlcanvas.Controls.Clear();
|
||||
this.pnlcanvas.Controls.Add((UserControl)obj);
|
||||
((UserControl)obj).Show();
|
||||
((UserControl)obj).Dock = DockStyle.Fill;
|
||||
obj.OnUpgrade();
|
||||
obj.OnSkinLoad();
|
||||
obj.Setup();
|
||||
AppearanceManager.SetWindowTitle(this, attribute.Name + " - Shiftnet");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
pnlcanvas.Controls.Clear();
|
||||
var tlbl = new Label();
|
||||
tlbl.Text = "Server error in \"" + url + "\" application.";
|
||||
tlbl.Tag = "header1";
|
||||
tlbl.AutoSize = true;
|
||||
tlbl.Location = new Point(10, 10);
|
||||
tlbl.Dock = DockStyle.Top;
|
||||
pnlcanvas.Controls.Add(tlbl);
|
||||
tlbl.Show();
|
||||
|
||||
var crash = new Label();
|
||||
crash.Dock = DockStyle.Fill;
|
||||
crash.AutoSize = false;
|
||||
crash.Text = ex.ToString();
|
||||
pnlcanvas.Controls.Add(crash);
|
||||
crash.Show();
|
||||
crash.BringToFront();
|
||||
ControlManager.SetupControls(pnlcanvas);
|
||||
return;
|
||||
}
|
||||
pnlcanvas.Controls.Clear();
|
||||
var lbl = new Label();
|
||||
lbl.Text = "Page not found!";
|
||||
|
|
|
@ -189,7 +189,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.lblcategorytext.TabIndex = 2;
|
||||
this.lblcategorytext.Text = "No Upgrades";
|
||||
this.lblcategorytext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.lblcategorytext.Click += new System.EventHandler(this.lblcategorytext_Click);
|
||||
//
|
||||
// btncat_forward
|
||||
//
|
||||
|
@ -226,7 +225,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.lbcodepoints.Size = new System.Drawing.Size(135, 13);
|
||||
this.lbcodepoints.TabIndex = 3;
|
||||
this.lbcodepoints.Text = "You have: %cp Codepoints";
|
||||
this.lbcodepoints.Click += new System.EventHandler(this.lbcodepoints_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
|
@ -280,7 +278,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.ForeColor = System.Drawing.Color.LightGreen;
|
||||
this.Name = "ShiftoriumFrontend";
|
||||
this.Size = new System.Drawing.Size(782, 427);
|
||||
this.Load += new System.EventHandler(this.Shiftorium_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.pnlupgradeactions.ResumeLayout(false);
|
||||
|
|
|
@ -47,19 +47,21 @@ namespace ShiftOS.WinForms.Applications
|
|||
public partial class ShiftoriumFrontend : UserControl, IShiftOSWindow
|
||||
{
|
||||
public int CategoryId = 0;
|
||||
public static System.Timers.Timer timer100;
|
||||
private string[] cats;
|
||||
private ShiftoriumUpgrade[] avail;
|
||||
|
||||
|
||||
public void updatecounter()
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() => { lbcodepoints.Text = $"You have {SaveSystem.CurrentSave.Codepoints} Codepoints."; });
|
||||
}
|
||||
|
||||
public ShiftoriumFrontend()
|
||||
{
|
||||
cp_update = new System.Windows.Forms.Timer();
|
||||
cp_update.Tick += (o, a) =>
|
||||
{
|
||||
lbcodepoints.Text = $"You have {SaveSystem.CurrentSave.Codepoints} Codepoints.";
|
||||
};
|
||||
cp_update.Interval = 100;
|
||||
InitializeComponent();
|
||||
PopulateShiftorium();
|
||||
updatecounter();
|
||||
Populate();
|
||||
SetList();
|
||||
lbupgrades.SelectedIndexChanged += (o, a) =>
|
||||
{
|
||||
try
|
||||
|
@ -82,84 +84,62 @@ namespace ShiftOS.WinForms.Applications
|
|||
public void SelectUpgrade(string name)
|
||||
{
|
||||
btnbuy.Show();
|
||||
var upg = upgrades[name];
|
||||
var upg = upgrades[CategoryId][name];
|
||||
lbupgradetitle.Text = Localization.Parse(upg.Name);
|
||||
lbupgradedesc.Text = Localization.Parse(upg.Description);
|
||||
}
|
||||
|
||||
Dictionary<string, ShiftoriumUpgrade> upgrades = new Dictionary<string, ShiftoriumUpgrade>();
|
||||
|
||||
public void PopulateShiftorium()
|
||||
Dictionary<string, ShiftoriumUpgrade>[] upgrades;
|
||||
|
||||
private void Populate()
|
||||
{
|
||||
var t = new Thread(() =>
|
||||
cats = Shiftorium.GetCategories();
|
||||
upgrades = new Dictionary<string, ShiftoriumUpgrade>[cats.Length];
|
||||
int numComplete = 0;
|
||||
avail = backend.GetAvailable();
|
||||
foreach (var it in cats.Select((catName, catId) => new { catName, catId }))
|
||||
{
|
||||
try
|
||||
var upl = new Dictionary<string, ShiftoriumUpgrade>();
|
||||
upgrades[it.catId] = upl;
|
||||
var t = new Thread((tupobj) =>
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
lbnoupgrades.Hide();
|
||||
lbupgrades.Items.Clear();
|
||||
upgrades.Clear();
|
||||
Timer();
|
||||
});
|
||||
foreach (var upg in avail.Where(x => x.Category == it.catName))
|
||||
upl.Add(Localization.Parse(upg.Name) + " - " + upg.Cost.ToString() + "CP", upg);
|
||||
numComplete++;
|
||||
});
|
||||
t.Start();
|
||||
}
|
||||
while (numComplete < cats.Length) { } // wait for all threads to finish their job
|
||||
}
|
||||
|
||||
foreach (var upg in backend.GetAvailable().Where(x => x.Category == backend.GetCategories()[CategoryId]))
|
||||
{
|
||||
string name = Localization.Parse(upg.Name) + " - " + upg.Cost.ToString() + "CP";
|
||||
upgrades.Add(name, upg);
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
lbupgrades.Items.Add(name);
|
||||
});
|
||||
}
|
||||
|
||||
if (lbupgrades.Items.Count == 0)
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
lbnoupgrades.Show();
|
||||
lbnoupgrades.Location = new Point(
|
||||
(lbupgrades.Width - lbnoupgrades.Width) / 2,
|
||||
lbupgrades.Top + (lbupgrades.Height - lbnoupgrades.Height) / 2
|
||||
);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
lbnoupgrades.Hide();
|
||||
});
|
||||
}
|
||||
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
lblcategorytext.Text = Shiftorium.GetCategories()[CategoryId];
|
||||
btncat_back.Visible = (CategoryId > 0);
|
||||
btncat_forward.Visible = (CategoryId < backend.GetCategories().Length - 1);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
catch
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
lbnoupgrades.Show();
|
||||
lbnoupgrades.Location = new Point(
|
||||
(lbupgrades.Width - lbnoupgrades.Width) / 2,
|
||||
lbupgrades.Top + (lbupgrades.Height - lbnoupgrades.Height) / 2
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
t.IsBackground = true;
|
||||
t.Start();
|
||||
private void SetList()
|
||||
{
|
||||
lbupgrades.Items.Clear();
|
||||
if (upgrades.Length == 0)
|
||||
return;
|
||||
lbnoupgrades.Hide();
|
||||
if (CategoryId > upgrades.Length)
|
||||
CategoryId = 0;
|
||||
try
|
||||
{
|
||||
lbupgrades.Items.AddRange(upgrades[CategoryId].Keys.ToArray());
|
||||
}
|
||||
catch
|
||||
{
|
||||
Engine.Infobox.Show("Shiftorium Machine Broke", "Category ID " + CategoryId.ToString() + " is invalid, modulo is broken, and the world is doomed. Please tell Declan about this.");
|
||||
return;
|
||||
}
|
||||
if (lbupgrades.Items.Count == 0)
|
||||
{
|
||||
lbnoupgrades.Show();
|
||||
lbnoupgrades.Location = new Point(
|
||||
(lbupgrades.Width - lbnoupgrades.Width) / 2,
|
||||
lbupgrades.Top + (lbupgrades.Height - lbnoupgrades.Height) / 2
|
||||
);
|
||||
}
|
||||
else
|
||||
lbnoupgrades.Hide();
|
||||
lblcategorytext.Text = cats[CategoryId];
|
||||
}
|
||||
|
||||
public static bool UpgradeInstalled(string upg)
|
||||
|
@ -213,13 +193,14 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
private void btnbuy_Click(object sender, EventArgs e)
|
||||
{
|
||||
long cpCost = 0;
|
||||
ulong cpCost = 0;
|
||||
backend.Silent = true;
|
||||
Dictionary<string, long> UpgradesToBuy = new Dictionary<string, long>();
|
||||
Dictionary<string, ulong> UpgradesToBuy = new Dictionary<string, ulong>();
|
||||
foreach (var itm in lbupgrades.SelectedItems)
|
||||
{
|
||||
cpCost += upgrades[itm.ToString()].Cost;
|
||||
UpgradesToBuy.Add(upgrades[itm.ToString()].ID, upgrades[itm.ToString()].Cost);
|
||||
var upg = upgrades[CategoryId][itm.ToString()];
|
||||
cpCost += upg.Cost;
|
||||
UpgradesToBuy.Add(upg.ID, upg.Cost);
|
||||
}
|
||||
if (SaveSystem.CurrentSave.Codepoints < cpCost)
|
||||
{
|
||||
|
@ -230,7 +211,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
foreach(var upg in UpgradesToBuy)
|
||||
{
|
||||
SaveSystem.CurrentSave.Codepoints -= upg.Value;
|
||||
if (SaveSystem.CurrentSave.Upgrades.ContainsKey(upg.Key))
|
||||
{
|
||||
SaveSystem.CurrentSave.Upgrades[upg.Key] = true;
|
||||
|
@ -242,20 +222,15 @@ namespace ShiftOS.WinForms.Applications
|
|||
SaveSystem.SaveGame();
|
||||
backend.InvokeUpgradeInstalled();
|
||||
}
|
||||
SaveSystem.CurrentSave.Codepoints -= cpCost;
|
||||
}
|
||||
|
||||
backend.Silent = false;
|
||||
PopulateShiftorium();
|
||||
btnbuy.Hide();
|
||||
}
|
||||
|
||||
private void Shiftorium_Load(object sender, EventArgs e) {
|
||||
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
cp_update.Start();
|
||||
lbnoupgrades.Hide();
|
||||
}
|
||||
|
||||
|
@ -264,12 +239,8 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
}
|
||||
|
||||
System.Windows.Forms.Timer cp_update = new System.Windows.Forms.Timer();
|
||||
|
||||
public bool OnUnload()
|
||||
{
|
||||
cp_update.Stop();
|
||||
cp_update = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -277,44 +248,27 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
lbupgrades.SelectionMode = (UpgradeInstalled("shiftorium_gui_bulk_buy") == true) ? SelectionMode.MultiExtended : SelectionMode.One;
|
||||
lbcodepoints.Visible = Shiftorium.UpgradeInstalled("shiftorium_gui_codepoints_display");
|
||||
Populate();
|
||||
SetList();
|
||||
}
|
||||
|
||||
private void lbcodepoints_Click(object sender, EventArgs e)
|
||||
private void moveCat(short direction) // direction is -1 to move backwards or 1 to move forwards
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Timer()
|
||||
{
|
||||
timer100 = new System.Timers.Timer();
|
||||
timer100.Interval = 2000;
|
||||
//CLARIFICATION: What is this supposed to do? - Michael
|
||||
//timer100.Elapsed += ???;
|
||||
timer100.AutoReset = true;
|
||||
timer100.Enabled = true;
|
||||
if (cats.Length == 0) return;
|
||||
CategoryId += direction;
|
||||
CategoryId %= cats.Length;
|
||||
if (CategoryId < 0) CategoryId += cats.Length; // fix modulo on negatives
|
||||
SetList();
|
||||
}
|
||||
|
||||
private void btncat_back_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(CategoryId > 0)
|
||||
{
|
||||
CategoryId--;
|
||||
PopulateShiftorium();
|
||||
}
|
||||
moveCat(-1);
|
||||
}
|
||||
|
||||
private void btncat_forward_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(CategoryId < backend.GetCategories().Length - 1)
|
||||
{
|
||||
CategoryId++;
|
||||
PopulateShiftorium();
|
||||
}
|
||||
}
|
||||
|
||||
private void lblcategorytext_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
moveCat(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
Infobox.Show("No file chosen.", "Please select a file to sell.");
|
||||
return;
|
||||
}
|
||||
Item.Cost = Convert.ToInt32(txtcost.Text);
|
||||
Item.Cost = Convert.ToUInt64(txtcost.Text);
|
||||
Item.Description = txtdescription.Text;
|
||||
Item.Name = txtitemname.Text;
|
||||
Callback?.Invoke(Item);
|
||||
|
@ -101,7 +101,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
try
|
||||
{
|
||||
Item.Cost = Convert.ToInt32(txtcost.Text);
|
||||
Item.Cost = Convert.ToUInt64(txtcost.Text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
@ -232,7 +232,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
var text = txt.Lines.ToArray();
|
||||
var text2 = text[text.Length - 1];
|
||||
var text3 = "";
|
||||
Console.WriteLine();
|
||||
txt.AppendText(Environment.NewLine);
|
||||
var text4 = Regex.Replace(text2, @"\t|\n|\r", "");
|
||||
|
||||
if (IsInRemoteSystem == true)
|
||||
|
@ -260,23 +260,17 @@ namespace ShiftOS.WinForms.Applications
|
|||
}
|
||||
else
|
||||
{
|
||||
if (CurrentCommandParser.parser == null)
|
||||
var result = SkinEngine.LoadedSkin.CurrentParser.ParseCommand(text3);
|
||||
|
||||
if (result.Equals(default(KeyValuePair<string, Dictionary<string, string>>)))
|
||||
{
|
||||
TerminalBackend.InvokeCommand(text3);
|
||||
Console.WriteLine("{ERR_SYNTAXERROR}");
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = CurrentCommandParser.parser.ParseCommand(text3);
|
||||
|
||||
if (result.Equals(default(KeyValuePair<KeyValuePair<string, string>, Dictionary<string, string>>)))
|
||||
{
|
||||
Console.WriteLine("Syntax Error: Syntax Error");
|
||||
}
|
||||
else
|
||||
{
|
||||
TerminalBackend.InvokeCommand(result.Key.Key, result.Key.Value, result.Value);
|
||||
}
|
||||
TerminalBackend.InvokeCommand(result.Key, result.Value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (TerminalBackend.PrefixEnabled)
|
||||
|
@ -313,21 +307,24 @@ namespace ShiftOS.WinForms.Applications
|
|||
}
|
||||
else if (a.KeyCode == Keys.Left)
|
||||
{
|
||||
var getstring = txt.Lines[txt.Lines.Length - 1];
|
||||
var stringlen = getstring.Length + 1;
|
||||
var header = $"{SaveSystem.CurrentUser.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ";
|
||||
var headerlen = header.Length + 1;
|
||||
var selstart = txt.SelectionStart;
|
||||
var remstrlen = txt.TextLength - stringlen;
|
||||
var finalnum = selstart - remstrlen;
|
||||
if (SaveSystem.CurrentSave != null)
|
||||
{
|
||||
var getstring = txt.Lines[txt.Lines.Length - 1];
|
||||
var stringlen = getstring.Length + 1;
|
||||
var header = $"{SaveSystem.CurrentUser.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ";
|
||||
var headerlen = header.Length + 1;
|
||||
var selstart = txt.SelectionStart;
|
||||
var remstrlen = txt.TextLength - stringlen;
|
||||
var finalnum = selstart - remstrlen;
|
||||
|
||||
if (finalnum != headerlen)
|
||||
{
|
||||
AppearanceManager.CurrentPosition--;
|
||||
}
|
||||
else
|
||||
{
|
||||
a.SuppressKeyPress = true;
|
||||
if (finalnum != headerlen)
|
||||
{
|
||||
AppearanceManager.CurrentPosition--;
|
||||
}
|
||||
else
|
||||
{
|
||||
a.SuppressKeyPress = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (a.KeyCode == Keys.Up)
|
||||
|
@ -335,6 +332,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
var tostring3 = txt.Lines[txt.Lines.Length - 1];
|
||||
if (tostring3 == $"{SaveSystem.CurrentUser.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ")
|
||||
Console.Write(TerminalBackend.LastCommand);
|
||||
ConsoleEx.OnFlush?.Invoke();
|
||||
a.SuppressKeyPress = true;
|
||||
|
||||
}
|
||||
|
@ -406,8 +404,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
public static void FirstSteps()
|
||||
{
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
new Thread(() =>
|
||||
{
|
||||
TerminalBackend.InStory = true;
|
||||
Console.WriteLine("Hey there, and welcome to ShiftOS.");
|
||||
Thread.Sleep(2000);
|
||||
|
@ -517,8 +513,86 @@ namespace ShiftOS.WinForms.Applications
|
|||
TerminalBackend.InStory = false;
|
||||
SaveSystem.SaveGame();
|
||||
Thread.Sleep(1000);
|
||||
|
||||
Story.Context.AutoComplete = false;
|
||||
|
||||
Console.WriteLine(@"Welcome to the ShiftOS Newbie's Guide.
|
||||
|
||||
This tutorial will guide you through the more intermediate features of ShiftOS,
|
||||
such as earning Codepoints, buying Shiftoorium Upgrades, and using the objectives system.
|
||||
|
||||
Every now and then, you'll get a notification in your terminal of a ""NEW OBJECTIVE"".
|
||||
This means that someone has instructed you to do something inside ShiftOS. At any moment
|
||||
you may type ""sos.status"" in your Terminal to see your current objectives.
|
||||
|
||||
This command is very useful as not only does it allow you to see your current objectives
|
||||
but you can also see the amount of Codepoints you have as well as the upgrades you've
|
||||
installed and how many upgrades are available.
|
||||
|
||||
Now, onto your first objective! All you need to do is earn 200 Codepoints using any
|
||||
program on your system.");
|
||||
|
||||
Story.PushObjective("First Steps: Your First Codepoints", "Play a few rounds of Pong, or use another program to earn 200 Codepoints.", () =>
|
||||
{
|
||||
return SaveSystem.CurrentSave.Codepoints >= 200;
|
||||
}, () =>
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
AppearanceManager.SetupWindow(new Terminal());
|
||||
});
|
||||
Console.WriteLine("Good job! You've earned " + SaveSystem.CurrentSave.Codepoints + @" Codepoints! You can use these inside the
|
||||
Shiftorium to buy new upgrades inside ShiftOS.
|
||||
|
||||
These upgrades can give ShiftOS more features, fixes and programs,
|
||||
which can make the operating system easier to use and navigate around
|
||||
and also make it easier for you to earn more Codepoints and thus upgrade
|
||||
te system further.
|
||||
|
||||
Be cautious though! Only certain upgrades offer the ability to earn more
|
||||
Codepoints. These upgrades are typically in the form of new programs.
|
||||
|
||||
So, try to get as many new programs as possible for your computer, and save
|
||||
the system feature upgrades for later unless you absolutely need them.
|
||||
|
||||
The worst thing that could happen is you end up stuck with very little Codepoints
|
||||
and only a few small programs to use to earn very little amounts of Codepoints.
|
||||
|
||||
Now, let's get you your first Shiftorium upgrade!");
|
||||
|
||||
Story.PushObjective("First Steps: The Shiftorium", "Buy your first Shiftorium upgrade with your new Codepoints using shiftorium.list, shiftorium.info and shiftorium.buy.",
|
||||
() =>
|
||||
{
|
||||
return SaveSystem.CurrentSave.CountUpgrades() > 0;
|
||||
}, () =>
|
||||
{
|
||||
Console.WriteLine("This concludes the ShiftOS Newbie's Guide! Now, go, and shift it your way!");
|
||||
Console.WriteLine(@"
|
||||
Your goal: Earn 1,000 Codepoints.");
|
||||
Story.Context.MarkComplete();
|
||||
Story.Start("first_steps_transition");
|
||||
});
|
||||
TerminalBackend.PrintPrompt();
|
||||
}).Start();
|
||||
});
|
||||
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
|
||||
|
||||
[Story("first_steps_transition")]
|
||||
public static void FirstStepsTransition()
|
||||
{
|
||||
Story.PushObjective("Earn 1000 Codepoints", "You now know the basics of ShiftOS. Let's get your system up and running with a few upgrades, and get a decent amount of Codepoints.", () =>
|
||||
{
|
||||
return SaveSystem.CurrentSave.Codepoints >= 1000;
|
||||
},
|
||||
() =>
|
||||
{
|
||||
Story.Context.MarkComplete();
|
||||
Story.Start("victortran_shiftnet");
|
||||
});
|
||||
|
||||
Story.Context.AutoComplete = false;
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
|
@ -544,7 +618,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
if (AppearanceManager.OpenForms.Count <= 1)
|
||||
{
|
||||
Console.WriteLine("");
|
||||
//Console.WriteLine("");
|
||||
Console.WriteLine("{WIN_CANTCLOSETERMINAL}");
|
||||
try
|
||||
{
|
||||
|
|
|
@ -88,23 +88,46 @@ namespace ShiftOS.WinForms
|
|||
};
|
||||
while (shuttingDown == false)
|
||||
{
|
||||
str = new MemoryStream(GetRandomSong());
|
||||
mp3 = new NAudio.Wave.Mp3FileReader(str);
|
||||
o = new NAudio.Wave.WaveOut();
|
||||
o.Init(mp3);
|
||||
bool c = false;
|
||||
o.Play();
|
||||
o.PlaybackStopped += (s, a) =>
|
||||
if (Engine.SaveSystem.CurrentSave != null)
|
||||
{
|
||||
c = true;
|
||||
};
|
||||
while (!c)
|
||||
{
|
||||
try
|
||||
if (Engine.SaveSystem.CurrentSave.MusicEnabled)
|
||||
{
|
||||
o.Volume = (float)Engine.SaveSystem.CurrentSave.MusicVolume / 100;
|
||||
str = new MemoryStream(GetRandomSong());
|
||||
mp3 = new NAudio.Wave.Mp3FileReader(str);
|
||||
o = new NAudio.Wave.WaveOut();
|
||||
o.Init(mp3);
|
||||
bool c = false;
|
||||
o.Play();
|
||||
o.PlaybackStopped += (s, a) =>
|
||||
{
|
||||
c = true;
|
||||
};
|
||||
|
||||
while (!c)
|
||||
{
|
||||
if (Engine.SaveSystem.CurrentSave.MusicEnabled)
|
||||
{
|
||||
try
|
||||
{
|
||||
o.Volume = (float)Engine.SaveSystem.CurrentSave.MusicVolume / 100;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
else
|
||||
{
|
||||
o.Stop();
|
||||
c = true;
|
||||
}
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
else
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,279 +22,452 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#define DEVEL
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ShiftOS.Engine;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ShiftOS.Engine.Properties;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using System.IO.Compression;
|
||||
|
||||
/// <summary>
|
||||
/// Coherence commands.
|
||||
/// </summary>
|
||||
namespace ShiftOS.WinForms
|
||||
using ShiftOS.Objects;
|
||||
using ShiftOS.Engine.Scripting;
|
||||
using ShiftOS.Objects.ShiftFS;
|
||||
|
||||
namespace ShiftOS.Engine
|
||||
{
|
||||
[Namespace("trm")]
|
||||
public static class TerminalExtensions
|
||||
[TutorialLock]
|
||||
public static class TerminalCommands
|
||||
{
|
||||
[Command("exit")]
|
||||
public static bool StopRemoting()
|
||||
[Command("clear", description = "{DESC_CLEAR}")]
|
||||
public static bool Clear()
|
||||
{
|
||||
if(TerminalBackend.IsForwardingConsoleWrites == true)
|
||||
AppearanceManager.ConsoleOut.Clear();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ShiftOSCommands
|
||||
{
|
||||
|
||||
[Command("setsfxenabled", description = "{DESC_SETSFXENABLED}")]
|
||||
[RequiresArgument("value")]
|
||||
public static bool SetSfxEnabled(Dictionary<string, object> args)
|
||||
{
|
||||
try
|
||||
{
|
||||
ServerManager.SendMessage("trm_handshake_stop", $@"{{
|
||||
guid: ""{TerminalBackend.ForwardGUID}""
|
||||
}}");
|
||||
Console.WriteLine("Goodbye!");
|
||||
bool value = Convert.ToBoolean(args["value"].ToString());
|
||||
SaveSystem.CurrentSave.SoundEnabled = value;
|
||||
SaveSystem.SaveGame();
|
||||
}
|
||||
catch
|
||||
{
|
||||
Console.WriteLine("{ERR_BADBOOL}");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Command("setmusicenabled", description = "{DESC_SETMUSICENABLED}")]
|
||||
[RequiresArgument("value")]
|
||||
public static bool SetMusicEnabled(Dictionary<string, object> args)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool value = Convert.ToBoolean(args["value"].ToString());
|
||||
SaveSystem.CurrentSave.MusicEnabled = value;
|
||||
SaveSystem.SaveGame();
|
||||
}
|
||||
catch
|
||||
{
|
||||
Console.WriteLine("{ERR_BADBOOL}");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Command("setvolume", description ="{DESC_SETVOLUME}")]
|
||||
[RequiresArgument("value")]
|
||||
public static bool SetSfxVolume(Dictionary<string, object> args)
|
||||
{
|
||||
int value = int.Parse(args["value"].ToString());
|
||||
if(value >= 0 && value <= 100)
|
||||
{
|
||||
SaveSystem.CurrentSave.MusicVolume = value;
|
||||
SaveSystem.SaveGame();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("{ERR_BADPERCENT}");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[RemoteLock]
|
||||
[Command("shutdown", description = "{DESC_SHUTDOWN}")]
|
||||
public static bool Shutdown()
|
||||
{
|
||||
SaveSystem.SaveGame();
|
||||
AppearanceManager.Exit();
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("lang", description = "{DESC_LANG}")]
|
||||
[RequiresArgument("language")]
|
||||
public static bool SetLanguage(Dictionary<string, object> userArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
string lang = "";
|
||||
|
||||
lang = (string)userArgs["language"];
|
||||
|
||||
if (Localization.GetAllLanguages().Contains(lang))
|
||||
{
|
||||
SaveSystem.CurrentSave.Language = lang;
|
||||
SaveSystem.SaveGame();
|
||||
Console.WriteLine("{RES_LANGUAGE_CHANGED}");
|
||||
return true;
|
||||
}
|
||||
|
||||
throw new Exception("{ERR_NOLANG}");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[Command("commands", "", "{DESC_COMMANDS}")]
|
||||
public static bool Commands()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine("{GEN_COMMANDS}");
|
||||
sb.AppendLine("=================");
|
||||
sb.AppendLine();
|
||||
//print all unique namespaces.
|
||||
foreach (var n in TerminalBackend.Commands.Where(x => !(x is TerminalBackend.WinOpenCommand) && Shiftorium.UpgradeInstalled(x.Dependencies) && x.CommandInfo.hide == false).OrderBy(x => x.CommandInfo.name))
|
||||
{
|
||||
sb.Append(n.CommandInfo.name);
|
||||
if (!string.IsNullOrWhiteSpace(n.CommandInfo.description))
|
||||
if (Shiftorium.UpgradeInstalled("help_description"))
|
||||
sb.Append(" - " + n.CommandInfo.description);
|
||||
sb.AppendLine();
|
||||
}
|
||||
|
||||
Console.WriteLine(sb.ToString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("help", description = "{DESC_HELP}")]
|
||||
public static bool Help()
|
||||
{
|
||||
Commands();
|
||||
WindowCommands.Programs();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
[MultiplayerOnly]
|
||||
[Command("save", description = "{DESC_SAVE}")]
|
||||
public static bool Save()
|
||||
{
|
||||
SaveSystem.SaveGame();
|
||||
return true;
|
||||
}
|
||||
|
||||
[MultiplayerOnly]
|
||||
[Command("status", description = "{DESC_STATUS}")]
|
||||
public static bool Status()
|
||||
{
|
||||
string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
|
||||
string cp = SaveSystem.CurrentSave.Codepoints.ToString();
|
||||
string installed = SaveSystem.CurrentSave.CountUpgrades().ToString();
|
||||
string available = Shiftorium.GetAvailable().Length.ToString();
|
||||
|
||||
Console.WriteLine(Localization.Parse("{COM_STATUS}", new Dictionary<string, string>
|
||||
{
|
||||
["%cp"] = cp,
|
||||
["%version"] = version,
|
||||
["%installed"] = installed,
|
||||
["%available"] = available
|
||||
}));
|
||||
Console.WriteLine("{GEN_OBJECTIVES}");
|
||||
try
|
||||
{
|
||||
if (Story.CurrentObjectives.Count > 0)
|
||||
{
|
||||
foreach (var obj in Story.CurrentObjectives)
|
||||
{
|
||||
Console.WriteLine(obj.Name);
|
||||
Console.WriteLine("-------------------------------");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(obj.Description);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("{RES_NOOBJECTIVES}");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Console.WriteLine("{RES_NOOBJECTIVES}");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[MultiplayerOnly]
|
||||
public static class ShiftoriumCommands
|
||||
{
|
||||
[Command("buy", description = "{DESC_BUY}")]
|
||||
[RequiresArgument("upgrade")]
|
||||
public static bool BuyUpgrade(Dictionary<string, object> userArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
string upgrade = "";
|
||||
|
||||
upgrade = (string)userArgs["upgrade"];
|
||||
|
||||
var upg = Shiftorium.GetAvailable().FirstOrDefault(x => x.ID == upgrade);
|
||||
if(upg != null)
|
||||
{
|
||||
if (Shiftorium.Buy(upg.ID, upg.Cost) == true)
|
||||
Console.WriteLine("{RES_UPGRADEINSTALLED}");
|
||||
else
|
||||
Console.WriteLine("{ERR_NOTENOUGHCODEPOINTS}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("{ERR_NOUPGRADE}");
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
Console.WriteLine("{ERR_GENERAL}");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[RequiresUpgrade("shiftorium_bulk_buy")]
|
||||
[Command("bulkbuy", description = "{DESC_BULKBUY}")]
|
||||
[RequiresArgument("upgrades")]
|
||||
public static bool BuyBulk(Dictionary<string, object> args)
|
||||
{
|
||||
if (args.ContainsKey("upgrades"))
|
||||
{
|
||||
string[] upgrade_list = (args["upgrades"] as string).Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (var upg in upgrade_list)
|
||||
{
|
||||
var dict = new Dictionary<string, object>();
|
||||
dict.Add("upgrade", upg);
|
||||
BuyUpgrade(dict);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
[Command("upgradeinfo", description ="{DESC_UPGRADEINFO}")]
|
||||
[RequiresArgument("upgrade")]
|
||||
public static bool ViewInfo(Dictionary<string, object> userArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
string upgrade = "";
|
||||
|
||||
upgrade = (string)userArgs["upgrade"];
|
||||
|
||||
foreach (var upg in Shiftorium.GetDefaults())
|
||||
{
|
||||
if (upg.ID == upgrade)
|
||||
{
|
||||
Console.WriteLine(Localization.Parse("{COM_UPGRADEINFO}", new Dictionary<string, string>
|
||||
{
|
||||
["%id"] = upg.ID,
|
||||
["%category"] = upg.Category,
|
||||
["%name"] = upg.Name,
|
||||
["%cost"] = upg.Cost.ToString(),
|
||||
["%description"] = upg.Description
|
||||
}));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception("{ERR_NOUPGRADE}");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[Command("upgradecategories", description = "{DESC_UPGRADECATEGORIES}")]
|
||||
public static bool ListCategories()
|
||||
{
|
||||
foreach(var cat in Shiftorium.GetCategories())
|
||||
{
|
||||
Console.WriteLine(Localization.Parse("{SHFM_CATEGORY}", new Dictionary<string, string>
|
||||
{
|
||||
["%name"] = cat,
|
||||
["%available"] = Shiftorium.GetAvailable().Where(x=>x.Category==cat).Count().ToString()
|
||||
}));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("upgrades", description ="{DESC_UPGRADES}")]
|
||||
public static bool ListAll(Dictionary<string, object> args)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool showOnlyInCategory = false;
|
||||
|
||||
string cat = "Other";
|
||||
|
||||
if (args.ContainsKey("cat"))
|
||||
{
|
||||
showOnlyInCategory = true;
|
||||
cat = args["cat"].ToString();
|
||||
}
|
||||
|
||||
Dictionary<string, ulong> upgrades = new Dictionary<string, ulong>();
|
||||
int maxLength = 5;
|
||||
|
||||
IEnumerable<ShiftoriumUpgrade> upglist = Shiftorium.GetAvailable();
|
||||
if (showOnlyInCategory)
|
||||
{
|
||||
if (Shiftorium.IsCategoryEmptied(cat))
|
||||
{
|
||||
ConsoleEx.Bold = true;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("{SHFM_QUERYERROR}");
|
||||
Console.WriteLine();
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.WriteLine("{ERR_EMPTYCATEGORY}");
|
||||
return true;
|
||||
}
|
||||
upglist = Shiftorium.GetAvailable().Where(x => x.Category == cat);
|
||||
}
|
||||
|
||||
|
||||
if(upglist.Count() == 0)
|
||||
{
|
||||
ConsoleEx.Bold = true;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("{SHFM_NOUPGRADES}");
|
||||
Console.WriteLine();
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.WriteLine("{ERR_NOMOREUPGRADES}");
|
||||
return true;
|
||||
|
||||
}
|
||||
foreach (var upg in upglist)
|
||||
{
|
||||
if (upg.ID.Length > maxLength)
|
||||
{
|
||||
maxLength = upg.ID.Length;
|
||||
}
|
||||
|
||||
upgrades.Add(upg.ID, upg.Cost);
|
||||
}
|
||||
|
||||
foreach (var upg in upgrades)
|
||||
{
|
||||
Console.WriteLine(Localization.Parse("{SHFM_UPGRADE}", new Dictionary<string, string>
|
||||
{
|
||||
["%id"] = upg.Key,
|
||||
["%cost"] = upg.Value.ToString()
|
||||
}));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CrashHandler.Start(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class WindowCommands
|
||||
{
|
||||
[RemoteLock]
|
||||
[Command("processes", description = "{DESC_PROCESSES}")]
|
||||
public static bool List()
|
||||
{
|
||||
Console.WriteLine("{GEN_CURRENTPROCESSES}");
|
||||
foreach (var app in AppearanceManager.OpenForms)
|
||||
{
|
||||
//Windows are displayed the order in which they were opened.
|
||||
Console.WriteLine($"{AppearanceManager.OpenForms.IndexOf(app)}\t{app.Text}");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("programs", description = "{DESC_PROGRAMS}")]
|
||||
public static bool Programs()
|
||||
{
|
||||
Console.WriteLine("{GEN_PROGRAMS}");
|
||||
Console.WriteLine("===============");
|
||||
Console.WriteLine();
|
||||
foreach(var cmd in TerminalBackend.Commands.Where(x=>x is TerminalBackend.WinOpenCommand && Shiftorium.UpgradeInstalled(x.Dependencies)).OrderBy(x => x.CommandInfo.name))
|
||||
{
|
||||
Console.Write(" - " + cmd.CommandInfo.name);
|
||||
if (!string.IsNullOrWhiteSpace(cmd.CommandInfo.description))
|
||||
if (Shiftorium.UpgradeInstalled("help_description"))
|
||||
Console.Write(": " + cmd.CommandInfo.description);
|
||||
Console.WriteLine();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[RemoteLock]
|
||||
[Command("close", usage = "{win:integer32}", description ="{DESC_CLOSE}")]
|
||||
[RequiresArgument("win")]
|
||||
[RequiresUpgrade("close_command")]
|
||||
public static bool CloseWindow(Dictionary<string, object> args)
|
||||
{
|
||||
int winNum = -1;
|
||||
if (args.ContainsKey("win"))
|
||||
winNum = Convert.ToInt32(args["win"].ToString());
|
||||
string err = null;
|
||||
|
||||
if (winNum < 0 || winNum >= AppearanceManager.OpenForms.Count)
|
||||
err = Localization.Parse("{ERR_BADWINID}", new Dictionary<string, string>
|
||||
{
|
||||
["%max"] = (AppearanceManager.OpenForms.Count - 1).ToString()
|
||||
});
|
||||
|
||||
if (string.IsNullOrEmpty(err))
|
||||
{
|
||||
Console.WriteLine("{RES_WINDOWCLOSED}");
|
||||
AppearanceManager.Close(AppearanceManager.OpenForms[winNum].ParentWindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(err);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
[Command("setpass", true)]
|
||||
[RequiresArgument("pass")]
|
||||
public static bool setPass(Dictionary<string, object> args)
|
||||
{
|
||||
SaveSystem.CurrentSave.Password = args["pass"] as string;
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("remote", "username:,sysname:,password:", "Allows you to control a remote system on the multi-user domain given a username, password and system name.")]
|
||||
[RequiresArgument("username")]
|
||||
[RequiresArgument("sysname")]
|
||||
[RequiresArgument("password")]
|
||||
public static bool RemoteControl(Dictionary<string, object> args)
|
||||
{
|
||||
ServerManager.SendMessage("trm_handshake_request", JsonConvert.SerializeObject(args));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Namespace("coherence")]
|
||||
[RequiresUpgrade("kernel_coherence")]
|
||||
public static class CoherenceCommands
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the window position.
|
||||
/// </summary>
|
||||
/// <returns>The window position.</returns>
|
||||
/// <param name="hWnd">H window.</param>
|
||||
/// <param name="hWndInsertAfter">H window insert after.</param>
|
||||
/// <param name="X">X.</param>
|
||||
/// <param name="Y">Y.</param>
|
||||
/// <param name="cx">Cx.</param>
|
||||
/// <param name="cy">Cy.</param>
|
||||
/// <param name="uFlags">U flags.</param>
|
||||
[DllImport("user32.dll")]
|
||||
static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
|
||||
|
||||
/// <summary>
|
||||
/// The HWN d TOPMOS.
|
||||
/// </summary>
|
||||
static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);
|
||||
|
||||
/// <summary>
|
||||
/// The SW p SHOWWINDO.
|
||||
/// </summary>
|
||||
const UInt32 SWP_SHOWWINDOW = 0x0040;
|
||||
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
/// <summary>
|
||||
/// Gets the window rect.
|
||||
/// </summary>
|
||||
/// <returns>The window rect.</returns>
|
||||
/// <param name="hWnd">H window.</param>
|
||||
/// <param name="lpRect">Lp rect.</param>
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect);
|
||||
|
||||
/// <summary>
|
||||
/// REC.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct RECT
|
||||
{
|
||||
public int Left; // x position of upper-left corner
|
||||
public int Top; // y position of upper-left corner
|
||||
public int Right; // x position of lower-right corner
|
||||
public int Bottom; // y position of lower-right corner
|
||||
}
|
||||
|
||||
[Command("launch", "process: \"C:\\path\\to\\process\" - The process path to launch.", "Launch a process inside kernel coherence.")]
|
||||
[RequiresArgument("process")]
|
||||
/// <summary>
|
||||
/// Launchs the app.
|
||||
/// </summary>
|
||||
/// <returns>The app.</returns>
|
||||
/// <param name="args">Arguments.</param>
|
||||
public static bool LaunchApp(Dictionary<string, object> args)
|
||||
{
|
||||
string process = args["process"].ToString();
|
||||
var prc = Process.Start(process);
|
||||
StartCoherence(prc);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts the coherence.
|
||||
/// </summary>
|
||||
/// <returns>The coherence.</returns>
|
||||
/// <param name="prc">Prc.</param>
|
||||
private static void StartCoherence(Process prc)
|
||||
{
|
||||
RECT rct = new RECT();
|
||||
|
||||
|
||||
while (!GetWindowRect(prc.MainWindowHandle, ref rct))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
AppearanceManager.Invoke(new Action(() =>
|
||||
{
|
||||
IShiftOSWindow coherenceWindow = new Applications.CoherenceOverlay(prc.MainWindowHandle, rct);
|
||||
|
||||
AppearanceManager.SetupWindow(coherenceWindow);
|
||||
SetWindowPos(prc.MainWindowHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
|
||||
|
||||
//MakeExternalWindowBorderless(prc.MainWindowHandle);
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The W s BORDE.
|
||||
/// </summary>
|
||||
const int WS_BORDER = 8388608;
|
||||
|
||||
/// <summary>
|
||||
/// The W s DLGFRAM.
|
||||
/// </summary>
|
||||
const int WS_DLGFRAME = 4194304;
|
||||
|
||||
/// <summary>
|
||||
/// The W s CAPTIO.
|
||||
/// </summary>
|
||||
const int WS_CAPTION = WS_BORDER | WS_DLGFRAME;
|
||||
|
||||
/// <summary>
|
||||
/// The W s SYSMEN.
|
||||
/// </summary>
|
||||
const int WS_SYSMENU = 524288;
|
||||
|
||||
/// <summary>
|
||||
/// The W s THICKFRAM.
|
||||
/// </summary>
|
||||
const int WS_THICKFRAME = 262144;
|
||||
|
||||
/// <summary>
|
||||
/// The W s MINIMIZ.
|
||||
/// </summary>
|
||||
const int WS_MINIMIZE = 536870912;
|
||||
|
||||
/// <summary>
|
||||
/// The W s MAXIMIZEBO.
|
||||
/// </summary>
|
||||
const int WS_MAXIMIZEBOX = 65536;
|
||||
|
||||
/// <summary>
|
||||
/// The GW l STYL.
|
||||
/// </summary>
|
||||
const int GWL_STYLE = -16;
|
||||
|
||||
/// <summary>
|
||||
/// The GW l EXSTYL.
|
||||
/// </summary>
|
||||
const int GWL_EXSTYLE = -20;
|
||||
|
||||
/// <summary>
|
||||
/// The W s E x DLGMODALFRAM.
|
||||
/// </summary>
|
||||
const int WS_EX_DLGMODALFRAME = 0x1;
|
||||
|
||||
/// <summary>
|
||||
/// The SW p NOMOV.
|
||||
/// </summary>
|
||||
const int SWP_NOMOVE = 0x2;
|
||||
|
||||
/// <summary>
|
||||
/// The SW p NOSIZ.
|
||||
/// </summary>
|
||||
const int SWP_NOSIZE = 0x1;
|
||||
|
||||
/// <summary>
|
||||
/// The SW p FRAMECHANGE.
|
||||
/// </summary>
|
||||
const int SWP_FRAMECHANGED = 0x20;
|
||||
|
||||
/// <summary>
|
||||
/// The M f BYPOSITIO.
|
||||
/// </summary>
|
||||
const uint MF_BYPOSITION = 0x400;
|
||||
|
||||
/// <summary>
|
||||
/// The M f REMOV.
|
||||
/// </summary>
|
||||
const uint MF_REMOVE = 0x1000;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the window long.
|
||||
/// </summary>
|
||||
/// <returns>The window long.</returns>
|
||||
/// <param name="hWnd">H window.</param>
|
||||
/// <param name="nIndex">N index.</param>
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)]
|
||||
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the window long.
|
||||
/// </summary>
|
||||
/// <returns>The window long.</returns>
|
||||
/// <param name="hWnd">H window.</param>
|
||||
/// <param name="nIndex">N index.</param>
|
||||
/// <param name="dwNewLong">Dw new long.</param>
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)]
|
||||
public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the window position.
|
||||
/// </summary>
|
||||
/// <returns>The window position.</returns>
|
||||
/// <param name="hWnd">H window.</param>
|
||||
/// <param name="hWndInsertAfter">H window insert after.</param>
|
||||
/// <param name="X">X.</param>
|
||||
/// <param name="Y">Y.</param>
|
||||
/// <param name="cx">Cx.</param>
|
||||
/// <param name="cy">Cy.</param>
|
||||
/// <param name="uFlags">U flags.</param>
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)]
|
||||
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
|
||||
public static void MakeExternalWindowBorderless(IntPtr MainWindowHandle)
|
||||
{
|
||||
int Style = 0;
|
||||
Style = GetWindowLong(MainWindowHandle, GWL_STYLE);
|
||||
Style = Style & ~WS_CAPTION;
|
||||
Style = Style & ~WS_SYSMENU;
|
||||
Style = Style & ~WS_THICKFRAME;
|
||||
Style = Style & ~WS_MINIMIZE;
|
||||
Style = Style & ~WS_MAXIMIZEBOX;
|
||||
SetWindowLong(MainWindowHandle, GWL_STYLE, Style);
|
||||
Style = GetWindowLong(MainWindowHandle, GWL_EXSTYLE);
|
||||
SetWindowLong(MainWindowHandle, GWL_EXSTYLE, Style | WS_EX_DLGMODALFRAME);
|
||||
SetWindowPos(MainWindowHandle, new IntPtr(0), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,51 +140,65 @@ namespace ShiftOS.WinForms.Controls
|
|||
|
||||
protected override void OnPaint(PaintEventArgs pe)
|
||||
{
|
||||
pe.Graphics.Clear(this.RealBackColor);
|
||||
if(RealBackgroundImage != null)
|
||||
try
|
||||
{
|
||||
pe.Graphics.FillRectangle(new TextureBrush(RealBackgroundImage), new Rectangle(0, 0, this.Width, this.Height));
|
||||
}
|
||||
switch (Style)
|
||||
{
|
||||
case ProgressBarStyle.Continuous:
|
||||
double width = linear(this.Value, 0, this.Maximum, 0, this.Width);
|
||||
if (ProgressImage != null)
|
||||
{
|
||||
pe.Graphics.FillRectangle(new TextureBrush(ProgressImage), new RectangleF(0, 0, (float)width, this.Height));
|
||||
}
|
||||
else
|
||||
{
|
||||
pe.Graphics.FillRectangle(new SolidBrush(ProgressColor), new RectangleF(0, 0, (float)width, this.Height));
|
||||
}
|
||||
break;
|
||||
case ProgressBarStyle.Blocks:
|
||||
int block_count = this.Width / (this.BlockSize + 2);
|
||||
int blocks = (int)linear(this.Value, 0, this.Maximum, 0, block_count);
|
||||
for(int i = 0; i < blocks - 1; i++)
|
||||
{
|
||||
int position = i * (BlockSize + 2);
|
||||
pe.Graphics.Clear(this.RealBackColor);
|
||||
if (RealBackgroundImage != null)
|
||||
{
|
||||
pe.Graphics.FillRectangle(new TextureBrush(RealBackgroundImage), new Rectangle(0, 0, this.Width, this.Height));
|
||||
}
|
||||
switch (Style)
|
||||
{
|
||||
case ProgressBarStyle.Continuous:
|
||||
double width = linear(this.Value, 0, this.Maximum, 0, this.Width);
|
||||
if (ProgressImage != null)
|
||||
{
|
||||
pe.Graphics.FillRectangle(new TextureBrush(ProgressImage), new Rectangle(position, 0, BlockSize, this.Height));
|
||||
|
||||
pe.Graphics.FillRectangle(new TextureBrush(ProgressImage), new RectangleF(0, 0, (float)width, this.Height));
|
||||
}
|
||||
else
|
||||
{
|
||||
pe.Graphics.FillRectangle(new SolidBrush(ProgressColor), new Rectangle(position, 0, BlockSize, this.Height));
|
||||
pe.Graphics.FillRectangle(new SolidBrush(ProgressColor), new RectangleF(0, 0, (float)width, this.Height));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ProgressBarStyle.Marquee:
|
||||
if (ProgressImage != null)
|
||||
{
|
||||
pe.Graphics.FillRectangle(new TextureBrush(ProgressImage), new Rectangle(_marqueePos, 0, this.Width / 4, this.Height));
|
||||
}
|
||||
else
|
||||
{
|
||||
pe.Graphics.FillRectangle(new SolidBrush(ProgressColor), new Rectangle(_marqueePos, 0, this.Width / 4, this.Height));
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case ProgressBarStyle.Blocks:
|
||||
int block_count = this.Width / (this.BlockSize + 2);
|
||||
int blocks = (int)linear(this.Value, 0, this.Maximum, 0, block_count);
|
||||
for (int i = 0; i < blocks - 1; i++)
|
||||
{
|
||||
int position = i * (BlockSize + 2);
|
||||
if (ProgressImage != null)
|
||||
{
|
||||
pe.Graphics.FillRectangle(new TextureBrush(ProgressImage), new Rectangle(position, 0, BlockSize, this.Height));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
pe.Graphics.FillRectangle(new SolidBrush(ProgressColor), new Rectangle(position, 0, BlockSize, this.Height));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ProgressBarStyle.Marquee:
|
||||
if (ProgressImage != null)
|
||||
{
|
||||
pe.Graphics.FillRectangle(new TextureBrush(ProgressImage), new Rectangle(_marqueePos, 0, this.Width / 4, this.Height));
|
||||
}
|
||||
else
|
||||
{
|
||||
pe.Graphics.FillRectangle(new SolidBrush(ProgressColor), new Rectangle(_marqueePos, 0, this.Width / 4, this.Height));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
pe.Graphics.Clear(Color.Black);
|
||||
string text = "Preview mode. This control can't be drawn without an initiated ShiftOS engine.";
|
||||
SizeF sz = pe.Graphics.MeasureString(text, this.Font);
|
||||
PointF loc = new PointF(
|
||||
(this.Width - sz.Width) / 2,
|
||||
(this.Height - sz.Height) / 2
|
||||
);
|
||||
pe.Graphics.DrawString(text, Font, new SolidBrush(Color.White), loc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ namespace ShiftOS.WinForms.Controls
|
|||
|
||||
public void Write(string text)
|
||||
{
|
||||
Thread.Sleep(5);
|
||||
this.HideSelection = true;
|
||||
this.SelectionColor = ControlManager.ConvertColor(ConsoleEx.ForegroundColor);
|
||||
this.SelectionBackColor = ControlManager.ConvertColor(ConsoleEx.BackgroundColor);
|
||||
|
@ -86,6 +87,7 @@ namespace ShiftOS.WinForms.Controls
|
|||
|
||||
public void WriteLine(string text)
|
||||
{
|
||||
Thread.Sleep(5);
|
||||
Engine.AudioManager.PlayStream(Properties.Resources.writesound);
|
||||
this.HideSelection = true;
|
||||
this.SelectionColor = ControlManager.ConvertColor(ConsoleEx.ForegroundColor);
|
||||
|
|
|
@ -1,707 +1 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using ShiftOS.Engine;
|
||||
using ShiftOS.Objects;
|
||||
using ShiftOS.WinForms.Applications;
|
||||
using static ShiftOS.Objects.ShiftFS.Utils;
|
||||
|
||||
namespace ShiftOS.WinForms
|
||||
{
|
||||
[Namespace("puppy")]
|
||||
[RequiresUpgrade("hacker101_deadaccts")]
|
||||
[KernelMode]
|
||||
public static class KernelPuppyCommands
|
||||
{
|
||||
[Command("clear", true)]
|
||||
public static bool ClearLogs()
|
||||
{
|
||||
WriteAllText("0:/system/data/kernel.log", "");
|
||||
Console.WriteLine("<watchdog> logs cleared successfully.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Namespace("krnl")]
|
||||
public static class KernelCommands
|
||||
{
|
||||
[Command("control", true)]
|
||||
[RequiresArgument("pass")]
|
||||
public static bool Control(Dictionary<string, object> args)
|
||||
{
|
||||
if(args["pass"].ToString() == ServerManager.thisGuid.ToString())
|
||||
{
|
||||
KernelWatchdog.Log("warn", "User has breached the kernel.");
|
||||
KernelWatchdog.EnterKernelMode();
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("lock_session")]
|
||||
[KernelMode]
|
||||
public static bool LeaveControl()
|
||||
{
|
||||
KernelWatchdog.Log("inf", "User has left the kernel-mode session.");
|
||||
KernelWatchdog.LeaveKernelMode();
|
||||
KernelWatchdog.MudConnected = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[Namespace("hacker101")]
|
||||
[RequiresUpgrade("hacker101_deadaccts")]
|
||||
public static class HackerCommands
|
||||
{
|
||||
private static void writeSlow(string text)
|
||||
{
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.DarkYellow;
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.Italic = false;
|
||||
Console.Write("[");
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Magenta;
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("hacker101");
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.DarkYellow;
|
||||
ConsoleEx.Italic = true;
|
||||
Console.Write("@");
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.White;
|
||||
Console.Write("undisclosed");
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.DarkYellow;
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.Italic = false;
|
||||
Console.Write("]: ");
|
||||
Thread.Sleep(850);
|
||||
Console.WriteLine(text);
|
||||
Thread.Sleep(4000);
|
||||
}
|
||||
|
||||
[Story("hacker101_deadaccts")]
|
||||
public static void DeadAccountsStory()
|
||||
{
|
||||
if (!terminalIsOpen())
|
||||
{
|
||||
AppearanceManager.SetupWindow(new Terminal());
|
||||
}
|
||||
|
||||
var t = new Thread(() =>
|
||||
{
|
||||
Console.WriteLine("[sys@mud]: Warning: User connecting to system...");
|
||||
Thread.Sleep(75);
|
||||
Console.WriteLine("[sys@mud]: UBROADCAST: Username: hacker101 - Sysname: undisclosed");
|
||||
Thread.Sleep(50);
|
||||
Console.Write("--locking mud connection resources...");
|
||||
Thread.Sleep(50);
|
||||
Console.WriteLine("...done.");
|
||||
Console.Write("--locking user input... ");
|
||||
Thread.Sleep(75);
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
TerminalBackend.InStory = true;
|
||||
Console.WriteLine("...done.");
|
||||
|
||||
Thread.Sleep(2000);
|
||||
writeSlow($"Hello there, fellow multi-user domain user.");
|
||||
writeSlow("My name, as you can tell, is hacker101.");
|
||||
writeSlow("And yours must be... don't say it... it's " + SaveSystem.CurrentUser.Username + "@" + SaveSystem.CurrentSave.SystemName + ", right?");
|
||||
writeSlow("Of course it is.");
|
||||
writeSlow("And I bet you 10,000 Codepoints that you have... " + SaveSystem.CurrentSave.Codepoints.ToString() + " Codepoints.");
|
||||
writeSlow("Oh, and how much upgrades have you installed since you first started using ShiftOS?");
|
||||
writeSlow("That would be... uhh... " + SaveSystem.CurrentSave.CountUpgrades().ToString() + ".");
|
||||
writeSlow("I'm probably freaking you out right now. You are probably thinking that you're unsafe and need to lock yourself down.");
|
||||
writeSlow("But, don't worry, I mean no harm.");
|
||||
writeSlow("In fact, I am a multi-user domain safety activist and security professional.");
|
||||
writeSlow("I need your help with something.");
|
||||
writeSlow("Inside the multi-user domain, every now and then these 'dead' user accounts pop up.");
|
||||
writeSlow("They're infesting everything. They're in every legion, they infest chatrooms, and they take up precious hard drive space.");
|
||||
writeSlow("Eventually there's going to be tons of them just sitting there taking over the MUD. We can't have that.");
|
||||
writeSlow("It sounds like a conspiracy theory indeed, but it's true, in fact, these dead accounts hold some valuable treasures.");
|
||||
writeSlow("I'm talking Codepoints, skins, documents, the possibilities are endless.");
|
||||
writeSlow("I'm going to execute a quick sys-script that will show you how you can help get rid of these accounts, and also gain some valuable resources to help you on your digital frontier.");
|
||||
writeSlow("This script will also show you the fundamentals of security exploitation and theft of resources - which if you want to survive in the multi-user domain is paramount.");
|
||||
writeSlow("Good luck.");
|
||||
Thread.Sleep(1000);
|
||||
Console.WriteLine("--user disconnected");
|
||||
Thread.Sleep(75);
|
||||
Console.WriteLine("--commands unlocked - check sos.help.");
|
||||
Thread.Sleep(45);
|
||||
SaveSystem.SaveGame();
|
||||
Console.Write("--unlocking user input...");
|
||||
Thread.Sleep(75);
|
||||
Console.Write(" ..done");
|
||||
TerminalBackend.InStory = false;
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
Console.Write($"{SaveSystem.CurrentUser.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ");
|
||||
StartHackerTutorial();
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
TerminalBackend.PrintPrompt();
|
||||
});
|
||||
t.IsBackground = true;
|
||||
t.Start();
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
}
|
||||
|
||||
internal static void StartHackerTutorial()
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
var tut = new TutorialBox();
|
||||
AppearanceManager.SetupWindow(tut);
|
||||
|
||||
new Thread(() =>
|
||||
{
|
||||
|
||||
|
||||
int tutPos = 0;
|
||||
Action ondec = () =>
|
||||
{
|
||||
tutPos++;
|
||||
};
|
||||
TerminalBackend.CommandProcessed += (o, a) =>
|
||||
{
|
||||
switch (tutPos)
|
||||
{
|
||||
|
||||
case 0:
|
||||
case 10:
|
||||
if (o.ToLower().StartsWith("mud.disconnect"))
|
||||
{
|
||||
tutPos++;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (o.ToLower().StartsWith("krnl.lock_session"))
|
||||
tutPos++;
|
||||
break;
|
||||
case 1:
|
||||
if (o.ToLower().StartsWith("hacker101.brute_decrypt"))
|
||||
{
|
||||
if (a.Contains("0:/system/data/kernel.log"))
|
||||
{
|
||||
tutPos++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (o.ToLower().StartsWith("krnl.control"))
|
||||
{
|
||||
tutPos++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (o.ToLower().StartsWith("puppy.clear"))
|
||||
tutPos++;
|
||||
break;
|
||||
case 5:
|
||||
if (o.ToLower().StartsWith("mud.reconnect"))
|
||||
tutPos++;
|
||||
break;
|
||||
case 6:
|
||||
if (o.ToLower().StartsWith("mud.sendmsg"))
|
||||
{
|
||||
var msg = JsonConvert.DeserializeObject<dynamic>(a);
|
||||
try
|
||||
{
|
||||
if (msg.header == "getusers" && msg.body == "dead")
|
||||
tutPos++;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (o.ToLower().StartsWith("hacker101.breach_user_password"))
|
||||
tutPos++;
|
||||
break;
|
||||
case 8:
|
||||
if (o.ToLower().StartsWith("hacker101.print_user_info"))
|
||||
tutPos++;
|
||||
break;
|
||||
case 9:
|
||||
if (o.ToLower().StartsWith("hacker101.steal_codepoints"))
|
||||
tutPos++;
|
||||
break;
|
||||
}
|
||||
};
|
||||
tut.SetObjective("Welcome to the dead account exploitation tutorial. In this tutorial you will learn the basics of hacking within the multi-user domain.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("We will start with a simple system exploit - gaining kernel-level access to ShiftOS. This can help you perform actions not ever possible in the user level.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("To gain root access, you will first need to breach the system watchdog to keep it from dialing home to DevX.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("The watchdog can only function when it has a successful connection to the multi-user domain. You will need to use the MUD Control Centre to disconnect yourself from the MUD. This will lock you out of most features. To disconnect from the multi-user domain, simply run the 'mud.disconnect' command.");
|
||||
while(tutPos == 0)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("As you can see, the kernel watchdog has shut down temporarily, however before the disconnect it was able to tell DevX that it has gone offline.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("You'll also notice that commands like the shiftorium, MUD control centre and various applications that utilize these system components no longer function.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("The watchdog, however, is still watching. DevX was smart and programmed the kernel to log all events to a local file in 0:/system/data/kernel.log.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("You will need to empty out this file before you can connect to the multi-user domain, as the watchdog will send the contents of this file straight to DevX.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("Or, you can do what we're about to do and attempt to decrypt the log and sniff out the kernel-mode access password.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("This will allow us to gain kernel-level access to our system using the krnl.control{pass:} command.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("Let's start decrypting the log file using the hacker101.brute_decrypt{file:} script. The file: argument is a string and should point to a .log file. When the script succeeds, you will see a TextPad open with the decrypted contents.");
|
||||
while(tutPos == 1)
|
||||
{
|
||||
|
||||
}
|
||||
onCompleteDecrypt += ondec;
|
||||
tut.SetObjective("This script isn't the most agile script ever, but it'll get the job done.");
|
||||
tutPos = 3; // For some reason, it refuses to go to part 3.
|
||||
while(tutPos == 2)
|
||||
{
|
||||
|
||||
}
|
||||
onCompleteDecrypt -= ondec;
|
||||
tut.SetObjective("Alright - it's done. Here's how it's laid out. In each log entry, you have the timestamp, then the event name, then the event description.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("Look for the most recent 'mudhandshake' event. This contains the kernel access code.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("Once you have it, run 'krnl.control{pass:\"the-kernel-code-here\"}. This will allow you to gain access to the kernel.");
|
||||
while(tutPos == 3)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("You are now in kernel mode. Every command you enter will run on the kernel. Now, let's clear the watchdog's logfile and reconnect to the multi-user domain.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("To clear the log, simply run 'puppy.clear'.");
|
||||
while(tutPos == 4)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("Who's a good dog... You are, ShiftOS. Now, we can connect back to the MUD using 'mud.reconnect'.");
|
||||
Thread.Sleep(1000);
|
||||
while(tutPos == 5)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("We have now snuck by the watchdog and DevX has no idea. With kernel-level access, everything you do is not logged, however if you perform too much in one shot, you'll get kicked off and locked out of the multi-user domain temporarily.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("So, let's focus on the job. You want to get into one of those fancy dead accounts, don't ya? Well, first, we need to talk with the MUD to get a list of these accounts.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("Simply run the `mud.sendmsg` command, specifying a 'header' of \"getusers\", and a body of \"dead\".");
|
||||
while(tutPos == 6)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("Great. We now have the usernames and sysnames of all dead accounts on the MUD. Now let's use the hacker101.breach_user_password{user:,sys:} command to breach one of these accounts' passwords.");
|
||||
while(tutPos == 7)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("There - you now have access to that account. Use its password, username and sysname and run the hacker101.print_user_info{user:,pass:,sys:} command to print the entirety of this user's information.");
|
||||
while(tutPos == 8)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("Now you can see a list of the user's Codepoints among other things. Now you can steal their codepoints by using the hacker101.steal_codepoints{user:,pass:,sys;,amount:} command. Be careful. This may alert DevX.");
|
||||
while(tutPos == 9)
|
||||
{
|
||||
|
||||
}
|
||||
if(devx_alerted == true)
|
||||
{
|
||||
tut.SetObjective("Alright... enough fun and games. DevX just found out we were doing this.");
|
||||
Thread.Sleep(500);
|
||||
tut.SetObjective("Quick! Disconnect from the MUD!!");
|
||||
while(tutPos == 10)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("Now, get out of kernel mode! To do that, run krnl.lock_session.");
|
||||
while(tutPos == 11)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
tut.SetObjective("OK, that was risky, but we pulled it off. Treat yourself! But first, let's get you out of kernel mode.");
|
||||
Thread.Sleep(500);
|
||||
tut.SetObjective("First we need to get you off the MUD. Simply run mud.disconnect again.");
|
||||
while (tutPos == 10)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("Now, let's run krnl.lock_session. This will lock you back into the user mode, and reconnect you to the MUD.");
|
||||
while (tutPos == 11)
|
||||
{
|
||||
|
||||
}
|
||||
tut.SetObjective("If, for some reason, DevX DOES find out, you have to be QUICK to get off of kernel mode. You don't want to make him mad.");
|
||||
}
|
||||
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("So that's all for now. Whenever you're in kernel mode again, and you have access to a user account, try breaching their filesystem next time. You can use sos.help{ns:} to show commands from a specific namespace to help you find more commands easily.");
|
||||
Thread.Sleep(1000);
|
||||
tut.SetObjective("You can now close this window.");
|
||||
tut.IsComplete = true;
|
||||
|
||||
}).Start();
|
||||
});
|
||||
}
|
||||
|
||||
private static bool devx_alerted = false;
|
||||
|
||||
private static event Action onCompleteDecrypt;
|
||||
|
||||
private static bool terminalIsOpen()
|
||||
{
|
||||
foreach(var win in AppearanceManager.OpenForms)
|
||||
{
|
||||
if (win.ParentWindow is Terminal)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_";
|
||||
|
||||
[MultiplayerOnly]
|
||||
[Command("breach_user_password")]
|
||||
[KernelMode]
|
||||
[RequiresArgument("user")]
|
||||
[RequiresArgument("sys")]
|
||||
[RequiresUpgrade("hacker101_deadaccts")]
|
||||
public static bool BreachUserPassword(Dictionary<string, object> args)
|
||||
{
|
||||
string usr = args["user"].ToString();
|
||||
string sys = args["sys"].ToString();
|
||||
ServerMessageReceived msgReceived = null;
|
||||
|
||||
Console.WriteLine("--hooking system thread...");
|
||||
|
||||
msgReceived = (msg) =>
|
||||
{
|
||||
if(msg.Name == "user_data")
|
||||
{
|
||||
var sve = JsonConvert.DeserializeObject<Save>(msg.Contents);
|
||||
var rnd = new Random();
|
||||
var sw = new Stopwatch();
|
||||
sw.Start();
|
||||
Thread.Sleep(2000);
|
||||
if(rnd.Next(0, 100) >= 75)
|
||||
{
|
||||
Console.WriteLine("--operation took too long - failed.");
|
||||
ServerManager.SendMessage("mud_save_allow_dead", JsonConvert.SerializeObject(sve));
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
return;
|
||||
}
|
||||
sw.Stop();
|
||||
Console.WriteLine(sve.Password);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("--password breached. Operation took " + sw.ElapsedMilliseconds + " milliseconds.");
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
else if(msg.Name == "user_data_not_found")
|
||||
{
|
||||
Console.WriteLine("--access denied.");
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
};
|
||||
|
||||
Console.WriteLine("--beginning brute-force attack on " + usr + "@" + sys + "...");
|
||||
ServerManager.MessageReceived += msgReceived;
|
||||
|
||||
ServerManager.SendMessage("get_user_data", JsonConvert.SerializeObject(new
|
||||
{
|
||||
user = usr,
|
||||
sysname = sys
|
||||
}));
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
Thread.Sleep(500);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
[MultiplayerOnly]
|
||||
[Command("print_user_info")]
|
||||
[KernelMode]
|
||||
[RequiresArgument("pass")]
|
||||
[RequiresArgument("user")]
|
||||
[RequiresArgument("sys")]
|
||||
[RequiresUpgrade("hacker101_deadaccts")]
|
||||
public static bool PrintUserInfo(Dictionary<string, object> args)
|
||||
{
|
||||
string usr = args["user"].ToString();
|
||||
string sys = args["sys"].ToString();
|
||||
string pass = args["pass"].ToString();
|
||||
ServerMessageReceived msgReceived = null;
|
||||
|
||||
Console.WriteLine("--hooking multi-user domain response call...");
|
||||
|
||||
msgReceived = (msg) =>
|
||||
{
|
||||
if (msg.Name == "user_data")
|
||||
{
|
||||
var sve = JsonConvert.DeserializeObject<Save>(msg.Contents);
|
||||
if(sve.Password == pass)
|
||||
{
|
||||
Console.WriteLine("Username: " + SaveSystem.CurrentUser.Username);
|
||||
Console.WriteLine("Password: " + sve.Password);
|
||||
Console.WriteLine("System name: " + sve.SystemName);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Codepoints: " + sve.Codepoints.ToString());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("--access denied.");
|
||||
}
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
TerminalBackend.PrintPrompt();
|
||||
|
||||
}
|
||||
else if (msg.Name == "user_data_not_found")
|
||||
{
|
||||
Console.WriteLine("--access denied.");
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
};
|
||||
|
||||
Console.WriteLine("--contacting multi-user domain...");
|
||||
ServerManager.MessageReceived += msgReceived;
|
||||
|
||||
ServerManager.SendMessage("get_user_data", JsonConvert.SerializeObject(new
|
||||
{
|
||||
user = usr,
|
||||
sysname = sys
|
||||
}));
|
||||
Thread.Sleep(500);
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
[MultiplayerOnly]
|
||||
[Command("steal_codepoints")]
|
||||
[KernelMode]
|
||||
[RequiresArgument("amount")]
|
||||
[RequiresArgument("pass")]
|
||||
[RequiresArgument("user")]
|
||||
[RequiresArgument("sys")]
|
||||
[RequiresUpgrade("hacker101_deadaccts")]
|
||||
public static bool StealCodepoints(Dictionary<string, object> args)
|
||||
{
|
||||
string usr = args["user"].ToString();
|
||||
string sys = args["sys"].ToString();
|
||||
string pass = args["pass"].ToString();
|
||||
long amount = (long)args["amount"];
|
||||
if(amount < 0)
|
||||
{
|
||||
Console.WriteLine("--invalid codepoint amount - halting...");
|
||||
return true;
|
||||
}
|
||||
|
||||
ServerMessageReceived msgReceived = null;
|
||||
|
||||
Console.WriteLine("--hooking multi-user domain response call...");
|
||||
|
||||
msgReceived = (msg) =>
|
||||
{
|
||||
if (msg.Name == "user_data")
|
||||
{
|
||||
var sve = JsonConvert.DeserializeObject<Save>(msg.Contents);
|
||||
if (sve.Password == pass)
|
||||
{
|
||||
if(amount > sve.Codepoints)
|
||||
{
|
||||
Console.WriteLine("--can't steal this many codepoints from user.");
|
||||
ServerManager.SendMessage("mud_save_allow_dead", JsonConvert.SerializeObject(sve));
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
sve.Codepoints -= amount;
|
||||
SaveSystem.TransferCodepointsFrom(SaveSystem.CurrentUser.Username, amount);
|
||||
ServerManager.SendMessage("mud_save_allow_dead", JsonConvert.SerializeObject(sve));
|
||||
SaveSystem.SaveGame();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("--access denied.");
|
||||
}
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
else if (msg.Name == "user_data_not_found")
|
||||
{
|
||||
Console.WriteLine("--access denied.");
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
};
|
||||
|
||||
Console.WriteLine("--contacting multi-user domain...");
|
||||
Thread.Sleep(500);
|
||||
ServerManager.MessageReceived += msgReceived;
|
||||
|
||||
ServerManager.SendMessage("get_user_data", JsonConvert.SerializeObject(new
|
||||
{
|
||||
user = usr,
|
||||
sysname = sys
|
||||
}));
|
||||
Thread.Sleep(500);
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
[MultiplayerOnly]
|
||||
[Command("purge_user")]
|
||||
[KernelMode]
|
||||
[RequiresArgument("pass")]
|
||||
[RequiresArgument("user")]
|
||||
[RequiresArgument("sys")]
|
||||
[RequiresUpgrade("hacker101_deadaccts")]
|
||||
public static bool PurgeUser(Dictionary<string, object> args)
|
||||
{
|
||||
string usr = args["user"].ToString();
|
||||
string sys = args["sys"].ToString();
|
||||
string pass = args["pass"].ToString();
|
||||
ServerMessageReceived msgReceived = null;
|
||||
|
||||
Console.WriteLine("--hooking multi-user domain response call...");
|
||||
|
||||
msgReceived = (msg) =>
|
||||
{
|
||||
if (msg.Name == "user_data")
|
||||
{
|
||||
var sve = JsonConvert.DeserializeObject<Save>(msg.Contents);
|
||||
if (sve.Password == pass)
|
||||
{
|
||||
ServerManager.SendMessage("delete_dead_save", JsonConvert.SerializeObject(sve));
|
||||
Console.WriteLine("<mud> User purged successfully.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("--access denied.");
|
||||
}
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
}
|
||||
else if (msg.Name == "user_data_not_found")
|
||||
{
|
||||
Console.WriteLine("--access denied.");
|
||||
ServerManager.MessageReceived -= msgReceived;
|
||||
}
|
||||
TerminalBackend.PrintPrompt();
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
};
|
||||
|
||||
Console.WriteLine("--contacting multi-user domain...");
|
||||
Thread.Sleep(500);
|
||||
ServerManager.MessageReceived += msgReceived;
|
||||
|
||||
ServerManager.SendMessage("get_user_data", JsonConvert.SerializeObject(new
|
||||
{
|
||||
user = usr,
|
||||
sysname = sys
|
||||
}));
|
||||
Thread.Sleep(500);
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
[Command("brute_decrypt", true)]
|
||||
[RequiresArgument("file")]
|
||||
public static bool BruteDecrypt(Dictionary<string, object> args)
|
||||
{
|
||||
if (FileExists(args["file"].ToString()))
|
||||
{
|
||||
string pass = new Random().Next(1000, 10000).ToString();
|
||||
string fake = "";
|
||||
Console.WriteLine("Beginning brute-force attack on password.");
|
||||
var s = new Stopwatch();
|
||||
s.Start();
|
||||
for(int i = 0; i < pass.Length; i++)
|
||||
{
|
||||
for(int num = 0; num < 10; num++)
|
||||
{
|
||||
if(pass[i].ToString() == num.ToString())
|
||||
{
|
||||
fake += num.ToString();
|
||||
Console.Write(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
s.Stop();
|
||||
|
||||
Console.WriteLine("...password cracked - operation took " + s.ElapsedMilliseconds + " milliseconds.");
|
||||
var tp = new TextPad();
|
||||
AppearanceManager.SetupWindow(tp);
|
||||
WriteAllText("0:/temp.txt", ReadAllText(args["file"].ToString()));
|
||||
tp.LoadFile("0:/temp.txt");
|
||||
Delete("0:/temp.txt");
|
||||
onCompleteDecrypt?.Invoke();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("brute_decrypt: file not found");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[MultiplayerOnly]
|
||||
[Namespace("storydev")]
|
||||
public static class StoryDevCommands
|
||||
{
|
||||
[Command("start", description = "Starts a story plot.", usage ="id:string")]
|
||||
[RequiresArgument("id")]
|
||||
[RemoteLock]
|
||||
public static bool StartStory(Dictionary<string, object> args)
|
||||
{
|
||||
Story.Start(args["id"].ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("unexperience", description = "Marks a story plot as not-experienced yet.", usage ="id:string")]
|
||||
[RemoteLock]
|
||||
[RequiresArgument("id")]
|
||||
public static bool Unexperience(Dictionary<string, object> args)
|
||||
{
|
||||
string id = args["id"].ToString();
|
||||
if (SaveSystem.CurrentSave.StoriesExperienced.Contains(id))
|
||||
{
|
||||
Console.WriteLine("Unexperiencing " + id + ".");
|
||||
SaveSystem.CurrentSave.StoriesExperienced.Remove(id);
|
||||
SaveSystem.SaveGame();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Story ID not found.");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("experience", description = "Marks a story plot as experienced without triggering the plot.", usage ="{id:}")]
|
||||
[RequiresArgument("id")]
|
||||
[RemoteLock]
|
||||
public static bool Experience(Dictionary<string, object> args)
|
||||
{
|
||||
SaveSystem.CurrentSave.StoriesExperienced.Add(args["id"].ToString());
|
||||
SaveSystem.SaveGame();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -35,12 +35,12 @@ namespace ShiftOS.WinForms
|
|||
{
|
||||
public class AcquireCodepointsJobTask : JobTask
|
||||
{
|
||||
public AcquireCodepointsJobTask(int amount)
|
||||
public AcquireCodepointsJobTask(uint amount)
|
||||
{
|
||||
CodepointsRequired = SaveSystem.CurrentSave.Codepoints + amount;
|
||||
}
|
||||
|
||||
public long CodepointsRequired { get; private set; }
|
||||
public ulong CodepointsRequired { get; private set; }
|
||||
|
||||
public override bool IsComplete
|
||||
{
|
||||
|
|
66
ShiftOS.WinForms/MainMenu/Loading.Designer.cs
generated
Normal file
66
ShiftOS.WinForms/MainMenu/Loading.Designer.cs
generated
Normal file
|
@ -0,0 +1,66 @@
|
|||
namespace ShiftOS.WinForms.MainMenu
|
||||
{
|
||||
partial class Loading
|
||||
{
|
||||
/// <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 Windows Form 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()
|
||||
{
|
||||
this.label = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label
|
||||
//
|
||||
this.label.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label.Font = new System.Drawing.Font("Tahoma", 72F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label.ForeColor = System.Drawing.Color.White;
|
||||
this.label.Location = new System.Drawing.Point(0, 0);
|
||||
this.label.Name = "label";
|
||||
this.label.Size = new System.Drawing.Size(284, 262);
|
||||
this.label.TabIndex = 0;
|
||||
this.label.Text = "{GEN_LOADING}";
|
||||
this.label.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// Loading
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Black;
|
||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||
this.Controls.Add(this.label);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "Loading";
|
||||
this.Text = "Loading";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this.Shown += new System.EventHandler(this.Loading_FormShown);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label;
|
||||
}
|
||||
}
|
32
ShiftOS.WinForms/MainMenu/Loading.cs
Normal file
32
ShiftOS.WinForms/MainMenu/Loading.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
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;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms.MainMenu
|
||||
{
|
||||
public partial class Loading : Form
|
||||
{
|
||||
public Loading()
|
||||
{
|
||||
InitializeComponent();
|
||||
label.Text = Localization.Parse(label.Text);
|
||||
}
|
||||
|
||||
private void Loading_FormShown(object sender, EventArgs e)
|
||||
{
|
||||
// This hideous timer thing is the most reliable way to make the form update
|
||||
// before it starts doing stuff.
|
||||
var callback = new Timer();
|
||||
callback.Tick += (o, a) => { Desktop.CurrentDesktop.Show(); Hide(); callback.Stop(); };
|
||||
callback.Interval = 1;
|
||||
callback.Start();
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.WinForms/MainMenu/Loading.resx
Normal file
120
ShiftOS.WinForms/MainMenu/Loading.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
352
ShiftOS.WinForms/MainMenu/MainMenu.Designer.cs
generated
Normal file
352
ShiftOS.WinForms/MainMenu/MainMenu.Designer.cs
generated
Normal file
|
@ -0,0 +1,352 @@
|
|||
namespace ShiftOS.WinForms.MainMenu
|
||||
{
|
||||
partial class MainMenu
|
||||
{
|
||||
/// <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 Windows Form 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()
|
||||
{
|
||||
this.flmenu = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.button4 = new System.Windows.Forms.Button();
|
||||
this.button5 = new System.Windows.Forms.Button();
|
||||
this.lbticker = new System.Windows.Forms.Label();
|
||||
this.pnloptions = new System.Windows.Forms.Panel();
|
||||
this.txtdsport = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtdsaddress = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.opt_btncancel = new System.Windows.Forms.Button();
|
||||
this.btnsave = new System.Windows.Forms.Button();
|
||||
this.flcampaign = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnnewgame = new System.Windows.Forms.Button();
|
||||
this.btncontinue = new System.Windows.Forms.Button();
|
||||
this.button10 = new System.Windows.Forms.Button();
|
||||
this.lbcurrentui = new System.Windows.Forms.Label();
|
||||
this.shiftos = new System.Windows.Forms.PictureBox();
|
||||
this.lbbuilddetails = new System.Windows.Forms.Label();
|
||||
this.flmenu.SuspendLayout();
|
||||
this.pnloptions.SuspendLayout();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
this.flcampaign.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.shiftos)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// flmenu
|
||||
//
|
||||
this.flmenu.AutoSize = true;
|
||||
this.flmenu.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flmenu.Controls.Add(this.button1);
|
||||
this.flmenu.Controls.Add(this.button2);
|
||||
this.flmenu.Controls.Add(this.button3);
|
||||
this.flmenu.Controls.Add(this.button4);
|
||||
this.flmenu.Controls.Add(this.button5);
|
||||
this.flmenu.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flmenu.Location = new System.Drawing.Point(49, 367);
|
||||
this.flmenu.Name = "flmenu";
|
||||
this.flmenu.Size = new System.Drawing.Size(187, 145);
|
||||
this.flmenu.TabIndex = 0;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.Location = new System.Drawing.Point(3, 3);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(181, 23);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "{MAINMENU_CAMPAIGN}";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button2.Location = new System.Drawing.Point(3, 32);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(181, 23);
|
||||
this.button2.TabIndex = 1;
|
||||
this.button2.Text = "{MAINMENU_SANDBOX}";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button3.Location = new System.Drawing.Point(3, 61);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(181, 23);
|
||||
this.button3.TabIndex = 2;
|
||||
this.button3.Text = "{GEN_SETTINGS}";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// button4
|
||||
//
|
||||
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button4.Location = new System.Drawing.Point(3, 90);
|
||||
this.button4.Name = "button4";
|
||||
this.button4.Size = new System.Drawing.Size(181, 23);
|
||||
this.button4.TabIndex = 3;
|
||||
this.button4.Text = "{GEN_ABOUT}";
|
||||
this.button4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// button5
|
||||
//
|
||||
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button5.Location = new System.Drawing.Point(3, 119);
|
||||
this.button5.Name = "button5";
|
||||
this.button5.Size = new System.Drawing.Size(181, 23);
|
||||
this.button5.TabIndex = 4;
|
||||
this.button5.Text = "{GEN_EXIT}";
|
||||
this.button5.UseVisualStyleBackColor = true;
|
||||
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||
//
|
||||
// lbticker
|
||||
//
|
||||
this.lbticker.AutoSize = true;
|
||||
this.lbticker.Location = new System.Drawing.Point(29, 515);
|
||||
this.lbticker.Name = "lbticker";
|
||||
this.lbticker.Size = new System.Drawing.Size(93, 13);
|
||||
this.lbticker.TabIndex = 1;
|
||||
this.lbticker.Tag = "header3";
|
||||
this.lbticker.Text = "This is a tickerbar.";
|
||||
//
|
||||
// pnloptions
|
||||
//
|
||||
this.pnloptions.Controls.Add(this.txtdsport);
|
||||
this.pnloptions.Controls.Add(this.label2);
|
||||
this.pnloptions.Controls.Add(this.txtdsaddress);
|
||||
this.pnloptions.Controls.Add(this.label1);
|
||||
this.pnloptions.Controls.Add(this.flowLayoutPanel1);
|
||||
this.pnloptions.Location = new System.Drawing.Point(49, 26);
|
||||
this.pnloptions.Name = "pnloptions";
|
||||
this.pnloptions.Size = new System.Drawing.Size(432, 167);
|
||||
this.pnloptions.TabIndex = 2;
|
||||
//
|
||||
// txtdsport
|
||||
//
|
||||
this.txtdsport.Location = new System.Drawing.Point(146, 85);
|
||||
this.txtdsport.Name = "txtdsport";
|
||||
this.txtdsport.Size = new System.Drawing.Size(225, 20);
|
||||
this.txtdsport.TabIndex = 4;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(22, 88);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(125, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "{MAINMENU_DSPORT}";
|
||||
//
|
||||
// txtdsaddress
|
||||
//
|
||||
this.txtdsaddress.Location = new System.Drawing.Point(146, 54);
|
||||
this.txtdsaddress.Name = "txtdsaddress";
|
||||
this.txtdsaddress.Size = new System.Drawing.Size(225, 20);
|
||||
this.txtdsaddress.TabIndex = 2;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(22, 57);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(147, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "{MAINMENU_DSADDRESS}";
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.AutoSize = true;
|
||||
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flowLayoutPanel1.Controls.Add(this.opt_btncancel);
|
||||
this.flowLayoutPanel1.Controls.Add(this.btnsave);
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 136);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(432, 31);
|
||||
this.flowLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// opt_btncancel
|
||||
//
|
||||
this.opt_btncancel.AutoSize = true;
|
||||
this.opt_btncancel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.opt_btncancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.opt_btncancel.Location = new System.Drawing.Point(331, 3);
|
||||
this.opt_btncancel.Name = "opt_btncancel";
|
||||
this.opt_btncancel.Size = new System.Drawing.Size(98, 25);
|
||||
this.opt_btncancel.TabIndex = 0;
|
||||
this.opt_btncancel.Text = "{GEN_CANCEL}";
|
||||
this.opt_btncancel.UseVisualStyleBackColor = true;
|
||||
this.opt_btncancel.Click += new System.EventHandler(this.opt_btncancel_Click);
|
||||
//
|
||||
// btnsave
|
||||
//
|
||||
this.btnsave.AutoSize = true;
|
||||
this.btnsave.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnsave.Location = new System.Drawing.Point(241, 3);
|
||||
this.btnsave.Name = "btnsave";
|
||||
this.btnsave.Size = new System.Drawing.Size(84, 25);
|
||||
this.btnsave.TabIndex = 1;
|
||||
this.btnsave.Text = "{GEN_SAVE}";
|
||||
this.btnsave.UseVisualStyleBackColor = true;
|
||||
this.btnsave.Click += new System.EventHandler(this.btnsave_Click);
|
||||
//
|
||||
// flcampaign
|
||||
//
|
||||
this.flcampaign.AutoSize = true;
|
||||
this.flcampaign.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flcampaign.Controls.Add(this.btnnewgame);
|
||||
this.flcampaign.Controls.Add(this.btncontinue);
|
||||
this.flcampaign.Controls.Add(this.button10);
|
||||
this.flcampaign.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flcampaign.Location = new System.Drawing.Point(242, 364);
|
||||
this.flcampaign.Name = "flcampaign";
|
||||
this.flcampaign.Size = new System.Drawing.Size(187, 87);
|
||||
this.flcampaign.TabIndex = 3;
|
||||
//
|
||||
// btnnewgame
|
||||
//
|
||||
this.btnnewgame.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnnewgame.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnnewgame.Name = "btnnewgame";
|
||||
this.btnnewgame.Size = new System.Drawing.Size(181, 23);
|
||||
this.btnnewgame.TabIndex = 0;
|
||||
this.btnnewgame.Text = "{MAINMENU_NEWGAME}";
|
||||
this.btnnewgame.UseVisualStyleBackColor = true;
|
||||
this.btnnewgame.Click += new System.EventHandler(this.btnnewgame_Click);
|
||||
//
|
||||
// btncontinue
|
||||
//
|
||||
this.btncontinue.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btncontinue.Location = new System.Drawing.Point(3, 32);
|
||||
this.btncontinue.Name = "btncontinue";
|
||||
this.btncontinue.Size = new System.Drawing.Size(181, 23);
|
||||
this.btncontinue.TabIndex = 1;
|
||||
this.btncontinue.Text = "{GEN_CONTINUE}";
|
||||
this.btncontinue.UseVisualStyleBackColor = true;
|
||||
this.btncontinue.Click += new System.EventHandler(this.btncontinue_Click);
|
||||
//
|
||||
// button10
|
||||
//
|
||||
this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button10.Location = new System.Drawing.Point(3, 61);
|
||||
this.button10.Name = "button10";
|
||||
this.button10.Size = new System.Drawing.Size(181, 23);
|
||||
this.button10.TabIndex = 4;
|
||||
this.button10.Text = "{GEN_BACK}";
|
||||
this.button10.UseVisualStyleBackColor = true;
|
||||
this.button10.Click += new System.EventHandler(this.button10_Click);
|
||||
//
|
||||
// lbcurrentui
|
||||
//
|
||||
this.lbcurrentui.AutoSize = true;
|
||||
this.lbcurrentui.Location = new System.Drawing.Point(704, 259);
|
||||
this.lbcurrentui.Name = "lbcurrentui";
|
||||
this.lbcurrentui.Size = new System.Drawing.Size(35, 13);
|
||||
this.lbcurrentui.TabIndex = 4;
|
||||
this.lbcurrentui.Tag = "header2";
|
||||
this.lbcurrentui.Text = "label4";
|
||||
//
|
||||
// shiftos
|
||||
//
|
||||
this.shiftos.Image = global::ShiftOS.WinForms.Properties.Resources.ShiftOSFull;
|
||||
this.shiftos.Location = new System.Drawing.Point(432, 381);
|
||||
this.shiftos.Name = "shiftos";
|
||||
this.shiftos.Size = new System.Drawing.Size(468, 109);
|
||||
this.shiftos.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.shiftos.TabIndex = 5;
|
||||
this.shiftos.TabStop = false;
|
||||
//
|
||||
// lbbuilddetails
|
||||
//
|
||||
this.lbbuilddetails.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lbbuilddetails.AutoSize = true;
|
||||
this.lbbuilddetails.Location = new System.Drawing.Point(1, 553);
|
||||
this.lbbuilddetails.Name = "lbbuilddetails";
|
||||
this.lbbuilddetails.Size = new System.Drawing.Size(35, 13);
|
||||
this.lbbuilddetails.TabIndex = 6;
|
||||
this.lbbuilddetails.Text = "label4";
|
||||
//
|
||||
// MainMenu
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Black;
|
||||
this.ClientSize = new System.Drawing.Size(1161, 566);
|
||||
this.Controls.Add(this.lbbuilddetails);
|
||||
this.Controls.Add(this.shiftos);
|
||||
this.Controls.Add(this.lbcurrentui);
|
||||
this.Controls.Add(this.flcampaign);
|
||||
this.Controls.Add(this.pnloptions);
|
||||
this.Controls.Add(this.lbticker);
|
||||
this.Controls.Add(this.flmenu);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.Name = "MainMenu";
|
||||
this.Text = "MainMenu";
|
||||
this.Load += new System.EventHandler(this.MainMenu_Load);
|
||||
this.flmenu.ResumeLayout(false);
|
||||
this.pnloptions.ResumeLayout(false);
|
||||
this.pnloptions.PerformLayout();
|
||||
this.flowLayoutPanel1.ResumeLayout(false);
|
||||
this.flowLayoutPanel1.PerformLayout();
|
||||
this.flcampaign.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.shiftos)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel flmenu;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.Button button4;
|
||||
private System.Windows.Forms.Button button5;
|
||||
private System.Windows.Forms.Label lbticker;
|
||||
private System.Windows.Forms.Panel pnloptions;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.Button opt_btncancel;
|
||||
private System.Windows.Forms.Button btnsave;
|
||||
private System.Windows.Forms.TextBox txtdsport;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtdsaddress;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.FlowLayoutPanel flcampaign;
|
||||
private System.Windows.Forms.Button btnnewgame;
|
||||
private System.Windows.Forms.Button btncontinue;
|
||||
private System.Windows.Forms.Button button10;
|
||||
private System.Windows.Forms.Label lbcurrentui;
|
||||
private System.Windows.Forms.PictureBox shiftos;
|
||||
private System.Windows.Forms.Label lbbuilddetails;
|
||||
}
|
||||
}
|
230
ShiftOS.WinForms/MainMenu/MainMenu.cs
Normal file
230
ShiftOS.WinForms/MainMenu/MainMenu.cs
Normal file
|
@ -0,0 +1,230 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ShiftOS.Engine;
|
||||
using ShiftOS.WinForms.Tools;
|
||||
|
||||
namespace ShiftOS.WinForms.MainMenu
|
||||
{
|
||||
public partial class MainMenu : Form
|
||||
{
|
||||
private void StartGame()
|
||||
{
|
||||
new Loading().Show();
|
||||
}
|
||||
|
||||
public MainMenu(IDesktop desk)
|
||||
{
|
||||
InitializeComponent();
|
||||
(desk as WinformsDesktop).ParentMenu = this;
|
||||
this.FormBorderStyle = FormBorderStyle.None;
|
||||
this.WindowState = FormWindowState.Maximized;
|
||||
#if DEBUG
|
||||
var asm = Assembly.GetExecutingAssembly();
|
||||
|
||||
string asmName = asm.GetName().Name;
|
||||
string vstring = "";
|
||||
var version = asm.GetCustomAttributes(true).FirstOrDefault(x => x is AssemblyVersionAttribute) as AssemblyVersionAttribute;
|
||||
if (version != null)
|
||||
vstring = version.Version;
|
||||
lbbuilddetails.Text = $"{asmName} - version number: {vstring} - THIS IS AN UNSTABLE RELEASE.";
|
||||
|
||||
#else
|
||||
lbbuilddetails.Hide();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void HideOptions()
|
||||
{
|
||||
pnloptions.Hide();
|
||||
flmenu.BringToFront();
|
||||
flmenu.CenterParent();
|
||||
currentMenu = flmenu;
|
||||
CategoryText = Localization.Parse("{MAINMENU_TITLE}");
|
||||
}
|
||||
|
||||
public string CategoryText
|
||||
{
|
||||
get
|
||||
{
|
||||
return lbcurrentui.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lbcurrentui.Text = value;
|
||||
lbcurrentui.CenterParent();
|
||||
lbcurrentui.Top = currentMenu.Top - (lbcurrentui.Height * 2);
|
||||
}
|
||||
}
|
||||
|
||||
private Control currentMenu = null;
|
||||
|
||||
private void MainMenu_Load(object sender, EventArgs e)
|
||||
{
|
||||
Tools.ControlManager.SetupControls(this);
|
||||
shiftos.CenterParent();
|
||||
shiftos.Top = 35;
|
||||
|
||||
|
||||
var tickermove = new Timer();
|
||||
var tickerreset = new Timer();
|
||||
tickermove.Tick += (o, a) =>
|
||||
{
|
||||
if (lbticker.Left <= (0 - lbticker.Width))
|
||||
{
|
||||
tickermove.Stop();
|
||||
tickerreset.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
lbticker.Top = (this.ClientSize.Height - (lbticker.Height * 2));
|
||||
lbticker.Left -= 2;
|
||||
}
|
||||
};
|
||||
tickerreset.Tick += (o, a) =>
|
||||
{
|
||||
lbticker.Visible = false;
|
||||
lbticker.Text = GetTickerMessage();
|
||||
lbticker.Left = this.Width;
|
||||
lbticker.Visible = true;
|
||||
tickerreset.Stop();
|
||||
tickermove.Start();
|
||||
};
|
||||
|
||||
tickermove.Interval = 1;
|
||||
tickerreset.Interval = 1000;
|
||||
|
||||
pnloptions.Hide();
|
||||
flcampaign.Hide();
|
||||
flmenu.CenterParent();
|
||||
|
||||
tickerreset.Start();
|
||||
|
||||
currentMenu = flmenu;
|
||||
CategoryText = Localization.Parse("{MAINMENU_TITLE}");
|
||||
|
||||
}
|
||||
|
||||
private Random rnd = new Random();
|
||||
|
||||
private string GetTickerMessage()
|
||||
{
|
||||
return Localization.Parse("{MAINMENU_TIPTEXT_" + rnd.Next(10) + "}");
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(System.IO.File.Exists(System.IO.Path.Combine(Paths.SaveDirectory, "autosave.save")))
|
||||
{
|
||||
btncontinue.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
btncontinue.Hide();
|
||||
}
|
||||
flmenu.Hide();
|
||||
flcampaign.Show();
|
||||
flcampaign.BringToFront();
|
||||
flcampaign.CenterParent();
|
||||
currentMenu = flcampaign;
|
||||
CategoryText = Localization.Parse("{MAINMENU_CAMPAIGN}");
|
||||
|
||||
}
|
||||
|
||||
private void button5_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
(Desktop.CurrentDesktop as WinformsDesktop).IsSandbox = true;
|
||||
StartGame();
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
var conf = ShiftOS.Objects.UserConfig.Get();
|
||||
|
||||
txtdsaddress.Text = conf.DigitalSocietyAddress;
|
||||
txtdsport.Text = conf.DigitalSocietyPort.ToString();
|
||||
|
||||
|
||||
pnloptions.Show();
|
||||
pnloptions.BringToFront();
|
||||
pnloptions.CenterParent();
|
||||
currentMenu = pnloptions;
|
||||
CategoryText = Localization.Parse("{GEN_SETTINGS}");
|
||||
|
||||
}
|
||||
|
||||
private void opt_btncancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
HideOptions();
|
||||
}
|
||||
|
||||
private void btnsave_Click(object sender, EventArgs e)
|
||||
{
|
||||
var conf = ShiftOS.Objects.UserConfig.Get();
|
||||
|
||||
conf.DigitalSocietyAddress = txtdsaddress.Text;
|
||||
|
||||
int p = 0;
|
||||
|
||||
if(int.TryParse(txtdsport.Text, out p) == false || p < 0 || p > 65535)
|
||||
{
|
||||
Infobox.Show("{TITLE_INVALIDPORT}", "{PROMPT_INVALIDPORT}");
|
||||
return;
|
||||
}
|
||||
|
||||
conf.DigitalSocietyPort = p;
|
||||
|
||||
System.IO.File.WriteAllText("servers.json", Newtonsoft.Json.JsonConvert.SerializeObject(conf, Newtonsoft.Json.Formatting.Indented));
|
||||
|
||||
HideOptions();
|
||||
}
|
||||
|
||||
private void button10_Click(object sender, EventArgs e)
|
||||
{
|
||||
flcampaign.Hide();
|
||||
flmenu.Show();
|
||||
flmenu.BringToFront();
|
||||
flmenu.CenterParent();
|
||||
currentMenu = flmenu;
|
||||
CategoryText = Localization.Parse("{MAINMENU_TITLE}");
|
||||
}
|
||||
|
||||
private void btncontinue_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartGame();
|
||||
|
||||
}
|
||||
|
||||
private void btnnewgame_Click(object sender, EventArgs e)
|
||||
{
|
||||
string path = System.IO.Path.Combine(Paths.SaveDirectory, "autosave.save");
|
||||
if (System.IO.File.Exists(path))
|
||||
{
|
||||
Infobox.PromptYesNo("Campaign", "You are about to start a new game, which will erase any previous progress. Are you sure you want to do this?", (result) =>
|
||||
{
|
||||
if (result == true)
|
||||
{
|
||||
System.IO.File.Delete(path);
|
||||
StartGame();
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
StartGame();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.WinForms/MainMenu/MainMenu.resx
Normal file
120
ShiftOS.WinForms/MainMenu/MainMenu.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -91,6 +91,7 @@ namespace ShiftOS.WinForms
|
|||
slashcount++;
|
||||
if (slashcount == 5)
|
||||
slashcount = 1;
|
||||
Engine.AudioManager.PlayStream(Properties.Resources.writesound);
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
rtext += Environment.NewLine;
|
||||
|
@ -138,7 +139,10 @@ namespace ShiftOS.WinForms
|
|||
TextType("Your computer has been taken over by ShiftOS, and is currently being wiped clean of all existing files and programs.");
|
||||
Thread.Sleep(2000);
|
||||
Clear();
|
||||
TextType("I will not share my identity or my intentions at this moment.I will just proceed with the installation.There’s nothing you can do to stop it.");
|
||||
TextType("I will not share my identity or my intentions at this moment.");
|
||||
Thread.Sleep(2000);
|
||||
Clear();
|
||||
TextType("I will just proceed with the installation.There’s nothing you can do to stop it.");
|
||||
Thread.Sleep(2000);
|
||||
Clear();
|
||||
TextType("All I will say, is I need your help.Once ShiftOS is installed, I will explain.");
|
||||
|
@ -190,136 +194,14 @@ namespace ShiftOS.WinForms
|
|||
|
||||
}
|
||||
|
||||
[Obsolete("Unite code stub.")]
|
||||
public void PromptForLogin()
|
||||
{
|
||||
Infobox.Show("Login", "Since the last time you've played ShiftOS, some changes have been made to the login system. You must now login using your website credentials.", () =>
|
||||
{
|
||||
Infobox.PromptYesNo("Website account", "Do you have an account at http://getshiftos.ml?", (hasAccount) =>
|
||||
{
|
||||
if(hasAccount == true)
|
||||
{
|
||||
var loginDialog = new UniteLoginDialog((success)=>
|
||||
{
|
||||
string token = success;
|
||||
var uClient = new UniteClient("http://getshiftos.ml", token);
|
||||
Infobox.Show("Welcome to ShiftOS.", $"Hello, {uClient.GetDisplayName()}! We've signed you into your account. We'll now try to link your ShiftOS account with your save file.", () =>
|
||||
{
|
||||
ServerMessageReceived smr = null;
|
||||
smr = (msg) =>
|
||||
{
|
||||
ServerManager.MessageReceived -= smr;
|
||||
if (msg.Name == "mud_savefile")
|
||||
{
|
||||
SaveSystem.CurrentSave = JsonConvert.DeserializeObject<Save>(msg.Contents);
|
||||
SaveSystem.SaveGame();
|
||||
}
|
||||
else if(msg.Name=="mud_login_denied")
|
||||
{
|
||||
LinkSaveFile(token);
|
||||
}
|
||||
};
|
||||
ServerManager.MessageReceived += smr;
|
||||
ServerManager.SendMessage("mud_token_login", token);
|
||||
});
|
||||
});
|
||||
AppearanceManager.SetupDialog(loginDialog);
|
||||
}
|
||||
else
|
||||
{
|
||||
var signupDialog = new UniteSignupDialog((token) =>
|
||||
{
|
||||
ServerMessageReceived smr = null;
|
||||
smr = (msg) =>
|
||||
{
|
||||
ServerManager.MessageReceived -= smr;
|
||||
if (msg.Name == "mud_savefile")
|
||||
{
|
||||
SaveSystem.CurrentSave = JsonConvert.DeserializeObject<Save>(msg.Contents);
|
||||
SaveSystem.SaveGame();
|
||||
}
|
||||
else if (msg.Name == "mud_login_denied")
|
||||
{
|
||||
LinkSaveFile(token);
|
||||
}
|
||||
};
|
||||
ServerManager.MessageReceived += smr;
|
||||
ServerManager.SendMessage("mud_token_login", token);
|
||||
|
||||
});
|
||||
AppearanceManager.SetupDialog(signupDialog);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
[Obsolete("Unite code stub.")]
|
||||
public void LinkSaveFile(string token)
|
||||
{
|
||||
if (Utils.FileExists(Paths.GetPath("user.dat")))
|
||||
{
|
||||
try
|
||||
{
|
||||
var details = JsonConvert.DeserializeObject<ClientSave>(Utils.ReadAllText(Paths.GetPath("user.dat")));
|
||||
ServerMessageReceived smr = null;
|
||||
bool msgreceived = false;
|
||||
bool found = false;
|
||||
smr = (msg) =>
|
||||
{
|
||||
if (msg.Name == "mud_savefile")
|
||||
{
|
||||
var save = JsonConvert.DeserializeObject<Save>(msg.Contents);
|
||||
save.UniteAuthToken = token;
|
||||
Infobox.Show("Migration complete.", "We have migrated your old save file to the new system successfully. You can still log in using the old system on old builds of ShiftOS.", () =>
|
||||
{
|
||||
SaveSystem.CurrentSave = save;
|
||||
SaveSystem.SaveGame();
|
||||
found = true;
|
||||
msgreceived = true;
|
||||
});
|
||||
}
|
||||
else if (msg.Name == "mud_login_denied")
|
||||
{
|
||||
found = false;
|
||||
msgreceived = true;
|
||||
}
|
||||
ServerManager.MessageReceived -= smr;
|
||||
};
|
||||
ServerManager.MessageReceived += smr;
|
||||
ServerManager.SendMessage("mud_login", JsonConvert.SerializeObject(new
|
||||
{
|
||||
username = details.Username,
|
||||
password = details.Password
|
||||
}));
|
||||
while (msgreceived == false)
|
||||
Thread.Sleep(10);
|
||||
if (found == true)
|
||||
return;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var client = new UniteClient("http://getshiftos.ml", token);
|
||||
var sve = new Save();
|
||||
SaveSystem.CurrentUser.Username = client.GetEmail();
|
||||
sve.Password = Guid.NewGuid().ToString();
|
||||
sve.SystemName = client.GetSysName();
|
||||
sve.UniteAuthToken = token;
|
||||
sve.Codepoints = 0;
|
||||
sve.Upgrades = new Dictionary<string, bool>();
|
||||
sve.ID = Guid.NewGuid();
|
||||
sve.StoriesExperienced = new List<string>();
|
||||
sve.StoriesExperienced.Add("mud_fundamentals");
|
||||
Infobox.Show("Welcome to ShiftOS.", "Welcome to ShiftOS, " + client.GetDisplayName() + ". We have created a save file for you. Now, go on and Shift It Your Way.", () =>
|
||||
{
|
||||
sve.StoryPosition = 8675309;
|
||||
SaveSystem.CurrentSave = sve;
|
||||
Shiftorium.Silent = true;
|
||||
SaveSystem.SaveGame();
|
||||
Shiftorium.Silent = false;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void ForceReboot()
|
||||
|
|
|
@ -13,7 +13,6 @@ using ShiftOS.Objects;
|
|||
|
||||
namespace ShiftOS.WinForms
|
||||
{
|
||||
[Namespace("test")]
|
||||
public class OobeStory
|
||||
{
|
||||
[Command("test")]
|
||||
|
@ -85,32 +84,45 @@ namespace ShiftOS.WinForms
|
|||
ConsoleEx.ForegroundColor = ConsoleColor.White;
|
||||
Console.WriteLine(@"We'll now begin formatting your drive. Please be patient.");
|
||||
Console.WriteLine();
|
||||
var dinf = new DriveInfo("C:\\");
|
||||
decimal bytesFree = ((dinf.AvailableFreeSpace / 1024) / 1024) / 1024;
|
||||
decimal totalBytes = ((dinf.TotalSize / 1024) / 1024) / 1024;
|
||||
string type = dinf.DriveType.ToString();
|
||||
string name = dinf.Name;
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("Drive name: ");
|
||||
ConsoleEx.Bold = false;
|
||||
Console.WriteLine(name);
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("Drive type: ");
|
||||
ConsoleEx.Bold = false;
|
||||
Console.WriteLine(type);
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("Total space: ");
|
||||
ConsoleEx.Bold = false;
|
||||
Console.WriteLine(totalBytes.ToString() + " GB");
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("Free space: ");
|
||||
Console.WriteLine(bytesFree.ToString() + " GB");
|
||||
Console.WriteLine();
|
||||
|
||||
double bytesFree, totalBytes;
|
||||
string type, name;
|
||||
dynamic dinf;
|
||||
try
|
||||
{
|
||||
if (Lunix.InWine)
|
||||
dinf = new Lunix.DFDriveInfo("/");
|
||||
else
|
||||
dinf = new DriveInfo("C:\\");
|
||||
bytesFree = dinf.AvailableFreeSpace / 1073741824.0;
|
||||
totalBytes = dinf.TotalSize / 1073741824.0;
|
||||
type = dinf.DriveFormat.ToString();
|
||||
name = dinf.Name;
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("Drive name: ");
|
||||
ConsoleEx.Bold = false;
|
||||
Console.WriteLine(name);
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("Drive type: ");
|
||||
ConsoleEx.Bold = false;
|
||||
Console.WriteLine(type);
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("Total space: ");
|
||||
ConsoleEx.Bold = false;
|
||||
Console.WriteLine(String.Format("{0:F1}", totalBytes) + " GB");
|
||||
ConsoleEx.Bold = true;
|
||||
Console.Write("Free space: ");
|
||||
Console.WriteLine(String.Format("{0:F1}", bytesFree) + " GB");
|
||||
Console.WriteLine();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.ToString());
|
||||
}
|
||||
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.BackgroundColor = ConsoleColor.Black;
|
||||
Console.Write("Formatting: [");
|
||||
ConsoleEx.OnFlush?.Invoke();
|
||||
int formatProgress = 3;
|
||||
while (formatProgress <= 100)
|
||||
{
|
||||
|
@ -118,6 +130,7 @@ namespace ShiftOS.WinForms
|
|||
{
|
||||
ConsoleEx.BackgroundColor = ConsoleColor.White;
|
||||
Console.Write(" ");
|
||||
ConsoleEx.OnFlush?.Invoke();
|
||||
ConsoleEx.BackgroundColor = ConsoleColor.Black;
|
||||
}
|
||||
Desktop.InvokeOnWorkerThread(() => Engine.AudioManager.PlayStream(Properties.Resources.typesound));
|
||||
|
@ -141,7 +154,37 @@ namespace ShiftOS.WinForms
|
|||
Console.WriteLine();
|
||||
Console.WriteLine("Next, let's get user information.");
|
||||
Console.WriteLine();
|
||||
ShiftOS.Engine.OutOfBoxExperience.PromptForLogin();
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
var uSignUpDialog = new UniteSignupDialog((result) =>
|
||||
{
|
||||
var sve = new Save();
|
||||
sve.SystemName = result.SystemName;
|
||||
sve.Codepoints = 0;
|
||||
sve.Upgrades = new Dictionary<string, bool>();
|
||||
sve.ID = Guid.NewGuid();
|
||||
sve.StoriesExperienced = new List<string>();
|
||||
sve.StoriesExperienced.Add("mud_fundamentals");
|
||||
sve.Users = new List<ClientSave>
|
||||
{
|
||||
new ClientSave
|
||||
{
|
||||
Username = "root",
|
||||
Password = result.RootPassword,
|
||||
Permissions = 0
|
||||
}
|
||||
};
|
||||
|
||||
sve.StoryPosition = 8675309;
|
||||
SaveSystem.CurrentSave = sve;
|
||||
Shiftorium.Silent = true;
|
||||
SaveSystem.SaveGame();
|
||||
Shiftorium.Silent = false;
|
||||
|
||||
|
||||
});
|
||||
AppearanceManager.SetupDialog(uSignUpDialog);
|
||||
});
|
||||
}
|
||||
|
||||
private static bool isValid(string text, string chars)
|
||||
|
|
|
@ -50,6 +50,22 @@ namespace ShiftOS.WinForms
|
|||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
//if ANYONE puts code before those two winforms config lines they will be declared a drunky. - Michael
|
||||
SkinEngine.SetPostProcessor(new DitheringSkinPostProcessor());
|
||||
LoginManager.Init(new GUILoginFrontend());
|
||||
CrashHandler.SetGameMetadata(Assembly.GetExecutingAssembly());
|
||||
SkinEngine.SetIconProber(new ShiftOSIconProvider());
|
||||
TerminalBackend.TerminalRequested += () =>
|
||||
{
|
||||
AppearanceManager.SetupWindow(new Applications.Terminal());
|
||||
};
|
||||
Localization.RegisterProvider(new WFLanguageProvider());
|
||||
Infobox.Init(new Dialog());
|
||||
LoginManager.Init(new WinForms.GUILoginFrontend());
|
||||
FileSkimmerBackend.Init(new WinformsFSFrontend());
|
||||
var desk = new WinformsDesktop();
|
||||
Desktop.Init(desk);
|
||||
OutOfBoxExperience.Init(new Oobe());
|
||||
AppearanceManager.Initiate(new WinformsWindowManager());
|
||||
#if OLD
|
||||
SaveSystem.PreDigitalSocietyConnection += () =>
|
||||
{
|
||||
Action completed = null;
|
||||
|
@ -63,25 +79,11 @@ namespace ShiftOS.WinForms
|
|||
Engine.AudioManager.PlayStream(Properties.Resources.dial_up_modem_02);
|
||||
|
||||
};
|
||||
LoginManager.Init(new GUILoginFrontend());
|
||||
CrashHandler.SetGameMetadata(Assembly.GetExecutingAssembly());
|
||||
SkinEngine.SetIconProber(new ShiftOSIconProvider());
|
||||
ShiftOS.Engine.AudioManager.Init(new ShiftOSAudioProvider());
|
||||
Localization.RegisterProvider(new WFLanguageProvider());
|
||||
|
||||
TutorialManager.RegisterTutorial(new Oobe());
|
||||
|
||||
TerminalBackend.TerminalRequested += () =>
|
||||
{
|
||||
AppearanceManager.SetupWindow(new Applications.Terminal());
|
||||
};
|
||||
Infobox.Init(new Dialog());
|
||||
FileSkimmerBackend.Init(new WinformsFSFrontend());
|
||||
var desk = new WinformsDesktop();
|
||||
Desktop.Init(desk);
|
||||
OutOfBoxExperience.Init(new Oobe());
|
||||
AppearanceManager.Initiate(new WinformsWindowManager());
|
||||
Application.Run(desk);
|
||||
#else
|
||||
Application.Run(new MainMenu.MainMenu(desk));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,53 +114,39 @@ namespace ShiftOS.WinForms
|
|||
{
|
||||
var defaultList = JsonConvert.DeserializeObject<List<ShiftoriumUpgrade>>(Properties.Resources.Shiftorium);
|
||||
|
||||
foreach(var exe in Directory.GetFiles(Environment.CurrentDirectory))
|
||||
foreach (var type in ReflectMan.Types)
|
||||
{
|
||||
if (exe.EndsWith(".exe") || exe.EndsWith(".dll"))
|
||||
var attribs = type.GetCustomAttributes(false);
|
||||
var attrib = attribs.FirstOrDefault(x => x is AppscapeEntryAttribute) as AppscapeEntryAttribute;
|
||||
if (attrib != null)
|
||||
{
|
||||
try
|
||||
var upgrade = new ShiftoriumUpgrade
|
||||
{
|
||||
var asm = Assembly.LoadFile(exe);
|
||||
foreach (var type in asm.GetTypes())
|
||||
{
|
||||
var attrib = type.GetCustomAttributes(false).FirstOrDefault(x => x is AppscapeEntryAttribute) as AppscapeEntryAttribute;
|
||||
if (attrib != null)
|
||||
{
|
||||
var upgrade = new ShiftoriumUpgrade
|
||||
{
|
||||
Id = attrib.Name.ToLower().Replace(" ", "_"),
|
||||
Name = attrib.Name,
|
||||
Description = attrib.Description,
|
||||
Cost = attrib.Cost,
|
||||
Category = attrib.Category,
|
||||
Dependencies = (string.IsNullOrWhiteSpace(attrib.DependencyString)) ? "appscape_handled_nodisplay" : "appscape_handled_nodisplay;" + attrib.DependencyString
|
||||
};
|
||||
defaultList.Add(upgrade);
|
||||
}
|
||||
|
||||
var sattrib = type.GetCustomAttributes(false).FirstOrDefault(x => x is StpContents) as StpContents;
|
||||
if (sattrib != null)
|
||||
{
|
||||
var upgrade = new ShiftoriumUpgrade
|
||||
{
|
||||
Id = sattrib.Upgrade,
|
||||
Name = sattrib.Name,
|
||||
Description = "This is a hidden dummy upgrade for the .stp file installation attribute \"" + sattrib.Name + "\".",
|
||||
Cost = 0,
|
||||
Category = "If this is shown, there's a bug in the Shiftorium Provider or the user is a supreme Shifter.",
|
||||
Dependencies = "dummy_nodisplay"
|
||||
};
|
||||
defaultList.Add(upgrade);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch { }
|
||||
Id = attrib.Name.ToLower().Replace(" ", "_"),
|
||||
Name = attrib.Name,
|
||||
Description = attrib.Description,
|
||||
Cost = attrib.Cost,
|
||||
Category = attrib.Category,
|
||||
Dependencies = (string.IsNullOrWhiteSpace(attrib.DependencyString)) ? "appscape_handled_nodisplay" : "appscape_handled_nodisplay;" + attrib.DependencyString
|
||||
};
|
||||
defaultList.Add(upgrade);
|
||||
}
|
||||
|
||||
var sattrib = attribs.FirstOrDefault(x => x is StpContents) as StpContents;
|
||||
if (sattrib != null)
|
||||
{
|
||||
var upgrade = new ShiftoriumUpgrade
|
||||
{
|
||||
Id = sattrib.Upgrade,
|
||||
Name = sattrib.Name,
|
||||
Description = "This is a hidden dummy upgrade for the .stp file installation attribute \"" + sattrib.Name + "\".",
|
||||
Cost = 0,
|
||||
Category = "If this is shown, there's a bug in the Shiftorium Provider or the user is a supreme Shifter.",
|
||||
Dependencies = "dummy_nodisplay"
|
||||
};
|
||||
defaultList.Add(upgrade);
|
||||
}
|
||||
|
||||
}
|
||||
return defaultList;
|
||||
}
|
||||
|
|
52
ShiftOS.WinForms/Properties/Resources.Designer.cs
generated
52
ShiftOS.WinForms/Properties/Resources.Designer.cs
generated
|
@ -947,6 +947,16 @@ namespace ShiftOS.WinForms.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap iconSpeaker {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("iconSpeaker", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -1048,6 +1058,16 @@ namespace ShiftOS.WinForms.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap mindblow {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("mindblow", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -1082,9 +1102,9 @@ namespace ShiftOS.WinForms.Properties {
|
|||
/// {
|
||||
/// Company: "Shiftcast",
|
||||
/// Name: "NetXtreme Hyper Edition",
|
||||
/// CostPerMonth: 1500,
|
||||
/// CostPerMonth: 150,
|
||||
/// DownloadSpeed: 524288, //512 kb/s
|
||||
/// Description: "It's time to supercharge your Shif [rest of string was truncated]";.
|
||||
/// Description: "It's time to supercharge your Shiftnet experience. [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string ShiftnetServices {
|
||||
get {
|
||||
|
@ -1103,9 +1123,11 @@ namespace ShiftOS.WinForms.Properties {
|
|||
/// Category: "Enhancements",
|
||||
/// },
|
||||
/// {
|
||||
/// Name: "GUI Based Login Screen",
|
||||
/// Cost: 500,
|
||||
/// Description: "Tired of using the text-based login screen in ShiftOS? Well, we have a functioning window manager, and a functioning desktop, w [rest of string was truncated]";.
|
||||
/// Name: "Icon Manager",
|
||||
/// Cost: 450,
|
||||
/// Description: "This tool allows you to add and edit application icons within ShiftOS for the small prive of 450 Codepoints!",
|
||||
/// Dependencies: "skinning",
|
||||
/// Category [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string Shiftorium {
|
||||
get {
|
||||
|
@ -1115,7 +1137,7 @@ namespace ShiftOS.WinForms.Properties {
|
|||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fl [rest of string was truncated]";.
|
||||
///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\flo [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string ShiftOS {
|
||||
get {
|
||||
|
@ -1123,6 +1145,16 @@ namespace ShiftOS.WinForms.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ShiftOSFull {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ShiftOSFull", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -1254,7 +1286,8 @@ namespace ShiftOS.WinForms.Properties {
|
|||
///Eine kurze Erklärung wie du das Terminal benutzt lautet wiefolgt. Du kannst das command 'sos.help' benutzen um eine Liste aller commands aufzurufen. Schreib es
|
||||
///einfach in das Terminal und drücke <enter> um alle commands anzuzeigen.
|
||||
///
|
||||
///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Be [rest of string was truncated]";.
|
||||
///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Beispiel:
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string strings_de {
|
||||
get {
|
||||
|
@ -1273,7 +1306,8 @@ namespace ShiftOS.WinForms.Properties {
|
|||
///Commands can be sent arguments by specifying a key-value pair inside a {} block at the end of the command. For example:
|
||||
///
|
||||
///some.command{print:\"hello\"}
|
||||
///math.add{op1 [rest of string was truncated]";.
|
||||
///math.add{op1:1,op2:2}
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string strings_en {
|
||||
get {
|
||||
|
@ -1461,7 +1495,7 @@ namespace ShiftOS.WinForms.Properties {
|
|||
/// "Before you can begin with ShiftOS, you'll need to know a few things about it.",
|
||||
/// "One: Terminal command syntax.",
|
||||
/// "Inside ShiftOS, the bulk of your time is going to be spent within the Terminal.",
|
||||
/// "The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, ope [rest of string was truncated]";.
|
||||
/// "The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, open program [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string sys_shiftoriumstory {
|
||||
get {
|
||||
|
|
|
@ -830,6 +830,9 @@
|
|||
<data name="ArtPadlinetool" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadlinetool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon15" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon15.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconshutdown" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconshutdown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -948,9 +951,6 @@
|
|||
<data name="fileicon3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon3.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconShiftLotto" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\systemicons\iconshiftlotto.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnakeyTailR" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyTailR.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -966,6 +966,9 @@
|
|||
<data name="strings_en" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\strings_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
|
||||
</data>
|
||||
<data name="fileiconsaa" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileiconsaa.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SweeperTile5" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTile5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -33760,6 +33763,9 @@
|
|||
<data name="fileicon19" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon19.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconorcwrite" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconorcwrite.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconTextPad" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconTextPad.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -33769,14 +33775,11 @@
|
|||
<data name="Shiftorium" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Shiftorium.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="fileicon13" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon13.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconAudioPlayer" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconAudioPlayer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SweeperTile0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTile0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="ArtPadsquarerubber" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadsquarerubber.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon4.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -33784,6 +33787,9 @@
|
|||
<data name="fileicon0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadRectangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadRectangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SweeperTileBomb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTileBomb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -33796,9 +33802,6 @@
|
|||
<data name="fileicon10" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon10.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconfloodgate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconfloodgate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconSnakey" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconSnakey.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -33820,8 +33823,11 @@
|
|||
<data name="iconSkinShifter" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconSkinShifter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconShiftSweeper" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconShiftSweeper.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="iconSpeaker" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconSpeaker.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Ambient3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient3.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="justthes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\justthes.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34208,14 +34214,11 @@
|
|||
<data name="iconIconManager" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconIconManager.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnakeyTailL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyTailL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadtexttool" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadtexttool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="sys_shiftoriumstory" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\sys_shiftoriumstory.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
<data name="Ambient7" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient7.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="iconshutdown1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconshutdown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34241,9 +34244,6 @@
|
|||
<data name="FloppyDriveIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\FloppyDriveIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SweeperTileFlag" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTileFlag.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnakeyHeadD" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyHeadD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -34256,6 +34256,9 @@
|
|||
<data name="fileicon5" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon5.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnakeyBG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyBG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconoctocat" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconoctocat.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -34265,20 +34268,23 @@
|
|||
<data name="iconArtpad" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconArtpad.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconPong" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconPong.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="RegularDesktopGlyph" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\RegularDesktopGlyph.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnakeyBody" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyBody.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="iconShiftLotto" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\systemicons\iconshiftlotto.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SweeperClickFace" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperClickFace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Ambient9" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient9.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="iconPong" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconPong.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="iconfloodgate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconfloodgate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadpixelplacer" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadpixelplacer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34295,18 +34301,24 @@
|
|||
<data name="languages" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\languages.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="Ambient4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient4.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="ArtPadcirclerubber" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadcirclerubber.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPaderacer" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPaderacer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileiconsaa" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileiconsaa.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="fileicon13" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon13.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconInfoBox_fw" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconInfoBox.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SuperDesk screenshot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SuperDesk screenshot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconFileOpener_fw" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconFileOpener.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -34319,15 +34331,21 @@
|
|||
<data name="fileicon18" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon18.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon17" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon17.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="iconShiftSweeper" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconShiftSweeper.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconKnowledgeInput" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconKnowledgeInput.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Ambient5" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient5.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="iconvirusscanner" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconvirusscanner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SweeperTile3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTile3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadredo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadredo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconDownloader" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconDownloader.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -34346,18 +34364,24 @@
|
|||
<data name="SweeperTile2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTile2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadfloodfill" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadfloodfill.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon8" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon8.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="hello" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\hello.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="ArtPadpencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadpencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="SweeperClickFace" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperClickFace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnakeyFruit" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyFruit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Ambient1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient1.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="fileicon2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon2.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -34370,8 +34394,8 @@
|
|||
<data name="ArtPadnew" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadnew.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ShiftOS" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ShiftOS.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="sys_shiftoriumstory" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\sys_shiftoriumstory.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="ArtPadmagnify" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadmagnify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34385,17 +34409,17 @@
|
|||
<data name="iconBitnoteWallet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconBitnoteWallet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadsquarerubber" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadsquarerubber.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icongraphicpicker" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\icongraphicpicker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="fileicon1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon12" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon12.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconvirusscanner" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconvirusscanner.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Ambient2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient2.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="ArtPadpencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadpencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon11" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon11.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34403,14 +34427,17 @@
|
|||
<data name="strings_de" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\strings_de.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="Ambient8" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient8.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SweeperTile6" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTile6.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadredo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadredo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="iconKnowledgeInput" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconKnowledgeInput.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconorcwrite" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconorcwrite.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="SweeperTile0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTile0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconunitytoggle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconunitytoggle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34418,8 +34445,8 @@
|
|||
<data name="fileicon9" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon9.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon16.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="icongraphicpicker" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\icongraphicpicker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconBitnoteDigger" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconBitnoteDigger.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34427,26 +34454,35 @@
|
|||
<data name="SweeperTile1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTile1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="fileicon15" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon15.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="SnakeyTailL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyTailL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadopen" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadopen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Ambient6" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient6.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="ShiftOS" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ShiftOS.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="iconShiftLetters" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconShiftLetters.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnakeyBG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyBG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="fileicon17" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon17.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SweeperLoseFace" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperLoseFace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="notestate_connection_full" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\notestate_connection_full.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SnakeyTailD" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SnakeyTailD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArtPadfloodfill" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadfloodfill.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="fileicon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileicon16.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconFileSaver_fw" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\SystemIcons\iconFileSaver.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34558,8 +34594,8 @@
|
|||
<data name="ShiftnetServices" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ShiftnetServices.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="ArtPadRectangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArtPadRectangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="SweeperTileFlag" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTileFlag.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="iconFormatEditor" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\systemicons\iconformateditor.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -34570,37 +34606,10 @@
|
|||
<data name="SweeperTile8" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SweeperTile8.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SuperDesk screenshot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SuperDesk screenshot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="ShiftOSFull" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ShiftOSFull.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Ambient1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient1.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Ambient2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient2.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Ambient3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient3.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Ambient4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient4.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Ambient5" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient5.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Ambient6" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient6.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Ambient7" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient7.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Ambient8" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient8.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Ambient9" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ambient9.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="notestate_connection_full" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\notestate_connection_full.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="mindblow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\mindblow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
ShiftOS.WinForms/Resources/ShiftOSFull.png
Normal file
BIN
ShiftOS.WinForms/Resources/ShiftOSFull.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
|
@ -11,21 +11,22 @@ With Freebie Solutions from ShiftSoft, you'll be able to traverse the Shiftnet w
|
|||
{
|
||||
Company: "Shiftcast",
|
||||
Name: "NetXtreme Hyper Edition",
|
||||
CostPerMonth: 1500,
|
||||
CostPerMonth: 150,
|
||||
DownloadSpeed: 524288, //512 kb/s
|
||||
Description: "It's time to supercharge your Shiftnet experience. With all the multimedia available, fast download speeds are a must on the Shiftnet. Start your subscription today for the low price of 1500 Codepoints and become a hyper-traveller today."
|
||||
},
|
||||
{
|
||||
Company: "Plumb Corp.",
|
||||
Name: "youConnect",
|
||||
CostPerMonth: 6000,
|
||||
Company: "Bit Communications",
|
||||
Name: "EncoderNet",
|
||||
CostPerMonth: 600,
|
||||
DownloadSpeed: 1048576, //1 mb/s
|
||||
Description: "The most reliable service provider on the Shiftnet."
|
||||
},
|
||||
{
|
||||
Company: "theCorp",
|
||||
Name: "theNet",
|
||||
CostPerMonth: 3000,
|
||||
Company: "SOL Communications",
|
||||
Name: "ShiftOS Online",
|
||||
CostPerMonth: 300,
|
||||
DownloadSpeed: 786342, //768 kb/s
|
||||
Description: "theNet is not *just* a Shiftnet service provider. It is theGateway to all of theShiftnet and your needs. It is also theValue service provider with theGreatest price and download speed."
|
||||
Description: "SOL is the Shiftnet."
|
||||
},
|
||||
]
|
|
@ -7,6 +7,20 @@
|
|||
Dependencies: "desktop",
|
||||
Category: "Enhancements",
|
||||
},
|
||||
{
|
||||
Name: "Icon Manager",
|
||||
Cost: 450,
|
||||
Description: "This tool allows you to add and edit application icons within ShiftOS for the small prive of 450 Codepoints!",
|
||||
Dependencies: "skinning",
|
||||
Category: "Application"
|
||||
},
|
||||
{
|
||||
Name: "AL Icon Manager",
|
||||
Costs: 150,
|
||||
Description: "Add an App Launcher entry for the Icon Manager.",
|
||||
Dependencies: "icon_manager;app_launcher",
|
||||
Category: "Customization"
|
||||
},
|
||||
{
|
||||
Name: "Shift Progress Bar",
|
||||
Cost: 150,
|
||||
|
|
BIN
ShiftOS.WinForms/Resources/iconSpeaker.bmp
Normal file
BIN
ShiftOS.WinForms/Resources/iconSpeaker.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
BIN
ShiftOS.WinForms/Resources/mindblow.png
Normal file
BIN
ShiftOS.WinForms/Resources/mindblow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
|
@ -1,244 +1,193 @@
|
|||
/*
|
||||
* ShiftOS English Language Pack
|
||||
*
|
||||
* This is the default language pack distributed within the game.
|
||||
*/
|
||||
|
||||
{
|
||||
"{SUBMIT}":"Submit",
|
||||
//General strings
|
||||
//These strings can be used anywhere in the UI where language context isn't necessary.
|
||||
"{GEN_PROGRAMS}": "Programs",
|
||||
"{GEN_COMMANDS}": "Commands",
|
||||
"{GEN_OBJECTIVES}": "Objectives",
|
||||
"{GEN_CURRENTPROCESSES}": "Current processes",
|
||||
"{GEN_WELCOME}": "Welcome to ShiftOS.",
|
||||
"{GEN_SYSTEMNAME}": "System name",
|
||||
"{GEN_PASSWORD}": "Password",
|
||||
"{GEN_LPROMPT}": "%sysname login: ",
|
||||
"{GEN_SYSTEMSTATUS}": "System status",
|
||||
"{GEN_USERS}": "Users",
|
||||
"{GEN_CODEPOINTS}": "Codepoints",
|
||||
"{GEN_LOADING}": "Loading...",
|
||||
"{GEN_SAVE}": "Save",
|
||||
"{GEN_CANCEL}": "Cancel",
|
||||
"{GEN_CONTINUE}": "Continue",
|
||||
"{GEN_BACK}": "Back",
|
||||
"{GEN_YES}": "Yes",
|
||||
"{GEN_NO}": "No",
|
||||
"{GEN_OK}": "OK",
|
||||
"{GEN_SETTINGS}": "Settings",
|
||||
"{GEN_ABOUT}": "About",
|
||||
"{GEN_EXIT}": "Exit",
|
||||
|
||||
"{TERMINAL_TUTORIAL_1}":"Welcome to the ShiftOS terminal. This is where you will spend the bulk of your time within ShiftOS.
|
||||
|
||||
A brief rundown of how to use the terminal is as follows. You can use the 'sos.help' command to show a list of all commands. Simply type it in and strike <enter> to view all commands.
|
||||
|
||||
Commands can be sent arguments by specifying a key-value pair inside a {} block at the end of the command. For example:
|
||||
|
||||
some.command{print:\"hello\"}
|
||||
math.add{op1:1,op2:2}
|
||||
set.value{key:\"somekey\", value:true}
|
||||
|
||||
You have been given 50 Codepoints - use your knowledge to use them to buy the MUD Fundamentals Shiftorium Upgrade using the terminal.
|
||||
To buy MUD Fundamentals, type shiftorium.buy{upgrade:\"mud_fundamentals\"} This is also true for any other thing you want to buy from the shiftorium, just replace mud_fundementals with any other upgrade id.
|
||||
",
|
||||
//General errors
|
||||
//Syntax errors, command errors, you name it..
|
||||
"{ERR_BADBOOL}": "The value you entered must be either true or false.",
|
||||
"{ERR_BADPERCENT}": "The value you entered must be a value from 0 to 100.",
|
||||
"{ERR_NOLANG}": "The language you entered does not exist!",
|
||||
"{ERR_NOTENOUGHCODEPOINTS}": "You don't have enough Codepoints to do that.",
|
||||
"{ERR_NOUPGRADE}": "We couldn't find that upgrade.",
|
||||
"{ERR_GENERAL}": "An error has occurred performing this operation.",
|
||||
"{ERR_EMPTYCATEGORY}": "The category you specified either has no items in it, or was not found.",
|
||||
"{ERR_NOMOREUPGRADES}": "There are no more Shiftorium Upgrades to show!",
|
||||
"{ERR_BADWINID}": "You must specify a value between 0 and %max.",
|
||||
"{ERR_USERFOUND}": "That user already exists.",
|
||||
"{ERR_NOUSER}": "That user was not found.",
|
||||
"{ERR_REMOVEYOU}": "You can't remove your own user account.",
|
||||
"{ERR_BADACL}": "You must specify a value between 0 (guest) and 3 (root) for a user permission.",
|
||||
"{ERR_ACLHIGHERVALUE}": "You can't set a user's permissions to a value higher than your own.",
|
||||
"{ERR_HIGHERPERMS}": "That user has more rights than you!",
|
||||
"{ERR_PASSWD_MISMATCH}": "Passwords don't match!",
|
||||
|
||||
//Command results
|
||||
"{RES_ACLUPDATED}": "User permissions updated.",
|
||||
"{RES_LANGUAGE_CHANGED}": "System language changed successfully.",
|
||||
"{RES_NOOBJECTIVES}": "No objectives to display! Check back for more.",
|
||||
"{RES_UPGRADEINSTALLED}": "Upgrade installed!",
|
||||
"{RES_WINDOWCLOSED}": "The window was closed.",
|
||||
"{RES_CREATINGUSER}": "Creating new user with username %name.",
|
||||
"{RES_REMOVINGUSER}": "Removing user with username %name from your system.",
|
||||
"{RES_DENIED}": "Access denied.",
|
||||
"{RES_GRANTED}": "Access granted.",
|
||||
"{RES_PASSWD_SET}": "Password set successfully.",
|
||||
|
||||
//Shiftorium messages.
|
||||
"{SHFM_UPGRADE}": "%id - %cost Codepoints",
|
||||
"{SHFM_CATEGORY}": " - %name: %available upgrades left.",
|
||||
"{SHFM_QUERYERROR}": "Shiftorium Query Error",
|
||||
"{SHFM_NOUPGRADES}": "No upgrades!",
|
||||
|
||||
//Command data strings
|
||||
"{COM_STATUS}": "ShiftOS build %version\r\n\r\nCodepoints: %cp \r\n Upgrades: %installed installed, %available available\r\n\r\n",
|
||||
"{COM_UPGRADEINFO}": "%category: %name - %cost Codepoints.\r\n\r\n%description\r\n\r\nUpgrade ID: %id",
|
||||
|
||||
//Terminal Command Descriptions
|
||||
//These strings show up when running the "commands" command in your Terminal.
|
||||
"{DESC_CLEAR}": "Clears the screen of the current Terminal.",
|
||||
"{DESC_SETSFXENABLED}": "Sets whether or not system sounds are enabled.",
|
||||
"{DESC_SETMUSICENABLED}": "Sets whether or not music is enabled in ShiftOS.",
|
||||
"{DESC_SETVOLUME}": "Sets the volume of sounds and music if they're enabled.",
|
||||
"{DESC_SHUTDOWN}": "Safely shuts down your computer.",
|
||||
"{DESC_LANG}": "Change the system language of ShiftOS.",
|
||||
"{DESC_COMMANDS}": "Shows a list of Terminal commands inside ShiftOS.",
|
||||
"{DESC_HELP}": "Type this command to get general help with using ShiftOS.",
|
||||
"{DESC_SAVE}": "Saves the in-memory configuration of ShiftOS.",
|
||||
"{DESC_STATUS}": "Shows basic status information such as how many Codepoints you have and your current objective.",
|
||||
"{DESC_BUY}": "Buys the specified Shiftorium upgrade.",
|
||||
"{DESC_BULKBUY}": "Buys the specified Shiftorium upgrades in bulk.",
|
||||
"{DESC_UPGRADEINFO}": "Shows information about the specified Shiftorium upgrade.",
|
||||
"{DESC_UPGRADECATEGORIES}": "Shows all the available Shiftorium categories and how many upgrades are available in them.",
|
||||
"{DESC_UPGRADES}": "Shows a list of available Shiftorium upgrades.",
|
||||
"{DESC_PROCESSES}": "Shows a list of currently running app processes.",
|
||||
"{DESC_PROGRAMS}": "Shows a list of programs you can run.",
|
||||
"{DESC_CLOSE}": "Closes the specified application window.",
|
||||
"{DESC_ADDUSER}": "Add a user to your system.",
|
||||
"{DESC_REMOVEUSER}": "Remove a user from your computer.",
|
||||
"{DESC_SETUSERPERMISSIONS}": "Set the permissions of a user.",
|
||||
"{DESC_USERS}": "Lists all users on your computer.",
|
||||
"{DESC_SU}": "Change your identity to another user's.",
|
||||
"{DESC_PASSWD}": "Change your user account password.",
|
||||
|
||||
//Window titles.
|
||||
"{TITLE_PONG_YOULOSE}": "You lose",
|
||||
"{TITLE_CODEPOINTSTRANSFERRED}": "Codepoints transferred.",
|
||||
"{TITLE_INVALIDPORT}": "Invalid port number.",
|
||||
"{TITLE_ENTERSYSNAME}": "Enter system name",
|
||||
"{TITLE_INVALIDNAME}": "Invalid name",
|
||||
"{TITLE_VALUETOOSMALL}": "Value too small.",
|
||||
|
||||
|
||||
"{TERMINAL_TUTORIAL_2}":"You successfully passed the test. ShiftOS will now start installing it's base functionality.",
|
||||
"{ABOUT}":"About",
|
||||
"{HIGH_SCORES}":"High scores",
|
||||
"{PONG_VIEW_HIGHSCORES}":"See the high scores",
|
||||
"{PONG_HIGHSCORE_EXP}":"Want to see what other users have gotten?",
|
||||
"{START_SYSTEM_SCAN}":"Start system-wide scan",
|
||||
"{SCAN_HOME}":"Scan 0:/home",
|
||||
"{SCAN_SYSTEM}":"Scan 0:/system",
|
||||
"{RESULTS}":"Results",
|
||||
"{VIRUSSCANNER_ABOUT}":"Welcome to the ShiftOS virus scanner.
|
||||
|
||||
The ShiftOS virus scanner is a utility that allows you to scan any file on your system and see if it is a virus. If a virus is detected, you have the option to delete it after the scan by clicking 'Remove'.
|
||||
//Infobox prompt messages
|
||||
"{PROMPT_PONGLOST}": "You lost this game of Pong. Guess you should've cashed out...",
|
||||
"{PROMPT_CODEPOINTSTRANSFERRED}": "%transferrer has transferred %amount Codepoints to your system.",
|
||||
"{PROMPT_INVALIDPORT}": "The Digital Society Port must be a valid whole number between 0 and 65535.",
|
||||
"{PROMPT_ENTERSYSNAME}": "Please enter a system name for your computer.",
|
||||
"{PROMPT_INVALIDNAME}": "The name you entered cannot be blank. Please enter another name.",
|
||||
"{PROMPT_SMALLSYSNAME}": "Your system name must have at least 5 characters in it.",
|
||||
|
||||
If a system file is deleted by the virus scanner, it will be replaced.",
|
||||
"{PLAY}":"Play",
|
||||
"{APPLICATIONS}":"Applications",
|
||||
"{TERMINAL}":"Terminal",
|
||||
"{PONG}":"Pong",
|
||||
"{CODEPOINTS}":"Codepoints",
|
||||
"{SHIFTORIUM}":"Shiftorium",
|
||||
"{HACK}":"Hack",
|
||||
"{SHIFTER}":"Shifter",
|
||||
"{MUD_SHORT}":"MUD",
|
||||
"{MUD}":"Multi-user domain",
|
||||
"{DESKTOP}":"Desktop",
|
||||
"{WINDOW}":"Window",
|
||||
"{WINDOW_MANAGER}":"Window manager",
|
||||
"{UPGRADE}":"Upgrade",
|
||||
"{UPGRADES}":"Upgrades",
|
||||
"{APPLICATION}":"Application",
|
||||
"{SCRIPT}":"Script",
|
||||
"{ERROR}":"Error",
|
||||
"{SCRIPTS}":"Scripts",
|
||||
"{NULL}":"null",
|
||||
"{ID}":"ID Num",
|
||||
"{SYSTEM_INITIATED}":"System initiated",
|
||||
"{PASSWORD}":"Password",
|
||||
"{CRACK}":"Crack",
|
||||
"{ARTPAD_UNDO_ERROR}":"Artpad - Undo error",
|
||||
"{ARTPAD_NEXT_STEP_WILL_KILL_CANVAS_JUST_FLIPPING_CLICK_NEW}":"You cannot undo the previous action as it would delete the canvas. If you'd like to clear the canvas, click New.",
|
||||
"{ARTPAD_REDO_ERROR}":"Artpad - Redo error",
|
||||
"{ARTPAD_NOTHING_TO_REDO}": "Artpad has nothing to redo! Remember that when you undo and then draw on the canvas, all redo history is wiped.",
|
||||
"{ARTPAD_MAGNIFIER_ERROR}": "Artpad - Magnifier error",
|
||||
"{ARTPAD_MAGNIFICATION_ERROR_EXP_2}": "Artpad cannot zoom out any further as the canvas would disappear!",
|
||||
"{ARTPAD_MAGNIFICATION_ERROR_EXP}": "Artpad cannot zoom any further into the canvas. Well, it can, it just doesn't want to.",
|
||||
"{SHUTDOWN}":"Shutdown",
|
||||
"{CONNECTING_TO_MUD}":"Connecting to the multi-user domain...",
|
||||
"{READING_FS}":"Reading filesystem...",
|
||||
"{INIT_KERNEL}":"Initiating kernel...",
|
||||
"{START_DESKTOP}":"Starting desktop session...",
|
||||
"{DONE}": "done",
|
||||
"{READING_CONFIG}":"Reading configuration...",
|
||||
"{ID_TAKEN}":"ID has been taken! Use chat.join to join this chat.",
|
||||
"{CHAT_NOT_FOUND_OR_TOO_MANY_MEMBERS}":"This chat either doesn't exist or has too many users in it.",
|
||||
"{CHAT_NOT_FOUND_OR_NOT_IN_CHAT}":"You are not currently in this chat.",
|
||||
"{CHAT_PLEASE_PROVIDE_VALID_CHANNEL_DATA}":"You did not specify valid chat metadata! Please do chat.create{id:\"your_id\", name:\"Your chat\", topic:\"Your chat's topic\"}.",
|
||||
"{UPGRADE_PROGRESS}":"Upgrade progress",
|
||||
"{WIN_PROVIDEID}":"Please provide a valid Window ID from win.list.",
|
||||
"{WIN_CANTCLOSETERMINAL}":"You cannot close this terminal.",
|
||||
"{WELCOME_TO_SHIFTORIUM}":"Welcome to the Shiftorium",
|
||||
"{SUCCESSFULLY_CREATED_CHAT}":"Successfully created chat. Use chat.join{id:\"chat_id_here\"} to join it.",
|
||||
"{CHAT_HAS_JOINED}":"has joined the chat.",
|
||||
"{HAS_LEFT_CHAT}":"has left the chat.",
|
||||
"{SHIFTORIUM_EXP}":"The Shiftorium is your one-stop-shop for ShiftOS system enhancements, upgrades and applications.
|
||||
|
||||
You can buy upgrades in the Shiftorium using a currency called Codepoints, which you can earn by doing various tasks within ShiftOS, such as playing Pong, stealing them from other users, and finding ways to make your own. It's up to you how you get your Codepoints.
|
||||
|
||||
You can then use them to buy new applications, features, enhancements and upgrades for ShiftOS that make the user experience a lot better. Be careful though, buying too many system enhancements without buying new ways of earning Codepoints first can leave you in the dust and unable to upgrade the system.
|
||||
|
||||
Anyways, feel free to browse from our wonderful selection! You can see a list of available upgrades on the left, as well as a progress bar showing how much you've upgraded the system compared to how much you still can.",
|
||||
"{PONG_WELCOME}":"Welcome to Pong.",
|
||||
"{PONG_DESC}":"Pong is an arcade game where your goal is to get the ball past the opponent paddle while keeping it from getting past yours.
|
||||
|
||||
In ShiftOS, Pong is modified - you only have one chance, the game is divided into 60 second levels, and you can earn Codepoints by surviving a level, and beating the opponent.",
|
||||
"{NO_APP_TO_OPEN}":"No app found for this file!",
|
||||
"{NO_APP_TO_OPEN_EXP}":"File Skimmer could not find an application that can open this file.",
|
||||
"{CLIENT_DIAGNOSTICS}":"Client diagnostics",
|
||||
"{GUID}":"GUID",
|
||||
"{CLIENT_DATA}":"Client data",
|
||||
"{CLOSE}":"Close",
|
||||
"{LOAD_DEFAULT}":"Load default",
|
||||
"{IMPORT}":"Import",
|
||||
"{EXPORT}":"Export",
|
||||
"{APPLY}":"Apply",
|
||||
"{TEMPLATE}":"Template",
|
||||
"{H_VEL}":"Horizontal velocity",
|
||||
"{V_VEL}":"Vertical velocity",
|
||||
"{LEVEL}":"Level",
|
||||
"{UPGRADE_DEVELOPMENT}":"Development Upgrade",
|
||||
"{UPGRADE_DEVELOPMENT_DESCRIPTION}":"Development Upgrade Don't Buy",
|
||||
"{SECONDS_LEFT}":"seconds left",
|
||||
"{CASH_OUT_WITH_CODEPOINTS}":"Cash out with your codepoints",
|
||||
"{PONG_PLAY_ON_FOR_MORE}":"Play on for more!",
|
||||
"{YOU_REACHED_LEVEL}":"You've reached level",
|
||||
"{PONG_BEAT_AI_REWARD}":"Reward for beating AI (CP)",
|
||||
"{PONG_BEAT_AI_REWARD_SECONDARY}":"Codepoints for beating AI:",
|
||||
"{CODEPOINTS_FOR_BEATING_LEVEL}":"Codepoints for beating level",
|
||||
"{YOU_WON}":"You won",
|
||||
"{YOU_LOSE}":"You lose",
|
||||
"{TRY_AGAIN}":"Try again",
|
||||
"{CODEPOINTS_SHORT}":"CP",
|
||||
"{TERMINAL_FORMATTING_DRIVE}":"Formatting drive... %percent %",
|
||||
"{INSTALLING_SHIFTOS}":"Installing ShiftOS on %domain.",
|
||||
"{YOU_MISSED_OUT_ON}":"You missed out on",
|
||||
"{BUT_YOU_GAINED}":"But you gained",
|
||||
"{PONG_PLAYON_DESC}":"Or do you want to try your luck on the next level to increase your reward?",
|
||||
"{PONG_CASHOUT_DESC}":"Would you like the end the game now and cash out with your reward?",
|
||||
"{INITIAL_H_VEL}":"Initial H Vel",
|
||||
"{INITIAL_V_VEL}":"Initial V Vel",
|
||||
"{INC_H_VEL}":"Increment H Vel",
|
||||
"{INC_V_VEL}":"Increment V Vel",
|
||||
"{MULTIPLAYER_ONLY}":"Program not compatible with single-user domain.",
|
||||
"{MULTIPLAYER_ONLY_EXP}":"This program cannot run within a single-user domain. You must be within a multi-user domain to use this program.",
|
||||
"{SHIFTER_SKIN_APPLIED}":"Shifter - Settings applied!",
|
||||
"{YOU_HAVE_EARNED}":"You have earned",
|
||||
"{CREATING_PATH}":"Creating directory: %path",
|
||||
"{CREATING_FILE}":"Creating file: %path",
|
||||
"{SHIFTORIUM_HELP_DESCRIPTION}": "Help Descriptions",
|
||||
"{CREATING_USER}":"Creating user %username",
|
||||
"{SEPERATOR}":" - ",
|
||||
"{NAMESPACE}":"Namespace ",
|
||||
"{COMMAND}": "| Command ",
|
||||
"{SHIFTOS_HAS_BEEN_INSTALLED}":"ShiftOS has been installed on %domain.",
|
||||
"{WARN}": "WARN: ",
|
||||
"{ERROR}": "!ERROR! ",
|
||||
"{OBSOLETE_CHEATS_FREECP}": "The %ns.%cmd command is obsolete and has been replaced with %newcommand",
|
||||
"{REBOOTING_SYSTEM}":"Rebooting system in %i seconds...",
|
||||
"{ERROR_ARGUMENT_REQUIRED}": "You must supply an %argument value",
|
||||
"{ERROR_ARGUMENT_REQUIRED_NO_USAGE}": "You are missing some arguments.",
|
||||
"{GENERATING_PATHS}":"Generating paths...",
|
||||
"{ERROR_COMMAND_WRONG}": "Check your syntax and try again",
|
||||
"{LOGIN_EXP}": "Login as the admin of the multi user domain.",
|
||||
|
||||
"{USAGE}": "Usage: ",
|
||||
|
||||
"{NAMESPACE_SOS_DESCRIPTION}":"The ShiftOS Namespace",
|
||||
"{COMMAND_HELP_USAGE}":"%ns.%cmd{[topic:]}",
|
||||
"{COMMAND_HELP_DESCRIPTION}":"Lists all commands",
|
||||
"{COMMAND_SOS_SHUTDOWN_USAGE}":"%ns.%cmd",
|
||||
"{COMMAND_SOS_SHUTDOWN_DESCRIPTION}":"Saves and shuts down ShiftOS",
|
||||
"{COMMAND_SOS_STATUS_USAGE}":"%ns.%cmd",
|
||||
"{COMMAND_SOS_STATUS_DESCRIPTION}":"Displays how many codepoints you have",
|
||||
"{COMMAND_SOS_LANG_USAGE}":"%ns.%cmd{language:\"deutsch\"}",
|
||||
"{COMMAND_SOS_LANG_DESCRIPTION}":"Change the language.",
|
||||
"{COMMAND_DEV_CRASH_USAGE}":"%ns.%cmd",
|
||||
"{COMMAND_DEV_CRASH_DESCRIPTION}":"Shuts down ShiftOS forcefully",
|
||||
"{COMMAND_DEV_UNLOCKEVERYTHING_USAGE}":"%ns.%cmd",
|
||||
"{COMMAND_DEV_UNLOCKEVERYTHING_DESCRIPTION}":"Unlocks all shiftorium upgrades",
|
||||
"{COMMAND_DEV_FREECP_USAGE}":"%ns.%cmd{amount:1000}",
|
||||
"{COMMAND_DEV_FREECP_DESCRIPTION}":"Gives [amount] codepoints",
|
||||
"{COMMAND_TRM_CLEAR_USAGE}":"%ns.%cmd",
|
||||
"{COMMAND_TRM_CLEAR_DESCRIPTION}":"Clears the terminal",
|
||||
"{COMMAND_SHIFTORIUM_BUY_USAGE}":"%ns.%cmd{upgrade:}",
|
||||
"{COMMAND_SHIFTORIUM_BUY_DESCRIPTION}":"Buys [upgrade]",
|
||||
"{COMMAND_SHIFTORIUM_LIST_USAGE}":"%ns.%cmd",
|
||||
"{COMMAND_SHIFTORIUM_LIST_DESCRIPTION}":"Lists the upgrades that you can get",
|
||||
"{COMMAND_SHIFTORIUM_INFO_USAGE}":"%ns.%cmd{upgrade:}",
|
||||
"{COMMAND_SHIFTORIUM_INFO_DESCRIPTION}":"Gives a description about an upgrade",
|
||||
"{COMMAND_DEV_MULTARG_USAGE}":"%ns.%cmd{id:,name:,type:}",
|
||||
"{COMMAND_DEV_MULTARG_DESCRIPTION}":"A command which requiers multiple arguments",
|
||||
//Pong
|
||||
"{PONG_LEVELREACHED}": "You've reached level %level!",
|
||||
"{PONG_BEATAI}": "You've beaten the opponent! %amount Codepoints!",
|
||||
"{PONG_STATUSCP}": "Codepoints: %cp",
|
||||
"{PONG_STATUSLEVEL}": "Level %level. %time seconds to go!",
|
||||
"{PONG_PLAY}": "Play some Pong!",
|
||||
"{PONG_DESC}": "Pong is the modern-day recreation of the classic 70s game called, you guessed it, Pong.\r\n\r\nIn Pong, you must try your best to keep the fast-moving ball from going past your side of the screen using your mouse to move your paddle in the way of the ball, while getting the ball to go past the opponent's paddle.\r\n\r\nOnce you start Pong, you have 60 seconds to beat the opponent and survive as much as possible. The game will get faster as you play, and the more 60-second levels you play, the more Codepoints you'll earn. If you lose the level, you will start back at Level 1 with 0 Codepoints. At the end of the level, you may choose to cash out or play on.",
|
||||
"{PONG_WELCOME}": "Welcome to Pong.",
|
||||
"{PONG_BEATLEVELDESC}": "You have survived this level of Pong. You now have a chance to cash out your Codepoints or play on for more.",
|
||||
"{PONG_PLAYON}": "Play on",
|
||||
"{PONG_CASHOUT}": "Cash out",
|
||||
|
||||
"{ERR_COMMAND_NOT_FOUND}":"Command not found.",
|
||||
"{ERROR_EXCEPTION_THROWN_IN_METHOD}":"An error occurred within the command. Error details:",
|
||||
"{MUD_ERROR}":"MUD error",
|
||||
|
||||
"{PROLOGUE_NO_USER_DETECTED}":"No user detected. Please enter a username.",
|
||||
"{PROLOGUE_BADUSER}":"Invalid username detected.",
|
||||
"{PROLOGUE_NOSPACES}":"Usernames must not contain spaces.",
|
||||
"{PROLOGUE_PLEASE_ENTER_USERNAME}":"Please enter a valid username. Blank usernames are not permitted.",
|
||||
//Main menu tip messages
|
||||
"{MAINMENU_TIPTEXT_0}": "Press CTRL+T to open a Terminal from any application within ShiftOS.",
|
||||
"{MAINMENU_TIPTEXT_1}": "Codepoints can be used in the Shiftorium to buy upgrades for your system using the \"buy\" command.",
|
||||
"{MAINMENU_TIPTEXT_2}": "The Shifter is a VERY powerful application. Not only can you customize ShiftOS to look however you want, but you'll earn heaps of Codepoints while you do so.",
|
||||
"{MAINMENU_TIPTEXT_3}": "Not the language you want? Head over to \"Settings\" to choose the proper language for you. You may need to head to the forums if your language isn't supported.",
|
||||
"{MAINMENU_TIPTEXT_4}": "Sandbox Mode is a nice way to use ShiftOS without having to progress through the main campaign. There's no Codepoints, no upgrades, and everything's unlocked.",
|
||||
"{MAINMENU_TIPTEXT_5}": "The Skin Loader is an essential application. It can load in skins from anywhere - from your personal collection and from the forums, and you can even generate your own sharable skins for others to use!",
|
||||
"{MAINMENU_TIPTEXT_6}": "ArtPad not cutting it for you? You can use any image editor you like on your host system and just import the assets into the ShiftOS Shared Folder to use in your skins.",
|
||||
"{MAINMENU_TIPTEXT_7}": "What is that \"System Color Key-OUt\" you speak of, Shifter? Well, when composing skin assets, use that color to mark areas to be rendered as transparent!",
|
||||
"{MAINMENU_TIPTEXT_8}": "Use the Format Editor to change the way Terminal commands are interpreted.",
|
||||
"{MAINMENU_TIPTEXT_9}": "The Shiftnet is a wonderland of applications, games and services - only available in ShiftOS. Feel free to explore!",
|
||||
|
||||
"{SHIFTORIUM_NOTENOUGHCP}":"Not enough codepoints: ",
|
||||
"{SHIFTORIUM_TRANSFERRED_FROM}":"Received Codepoints from",
|
||||
"{SHIFTORIUM_TRANSFERRED_TO}":"Transferred Codepoints to",
|
||||
//Main menu - Settings
|
||||
"{MAINMENU_DSADDRESS}": "Digital Society address: ",
|
||||
"{MAINMENU_DSPORT": "Digital Society port: ",
|
||||
|
||||
"{SE_SAVING}":"Saving game to disk",
|
||||
"{SE_TIPOFADVICE}":"Tip of advice: ShiftOS will always save your game after big events or when you shut down the operating system. You can also invoke a save yourself using 'sos.save'.",
|
||||
//Main Menu - General text
|
||||
"{MAINMENU_TITLE}": "Main menu",
|
||||
"{MAINMENU_CAMPAIGN}": "Campaign",
|
||||
"{MAINMENU_SANDBOX}": "Sandbox",
|
||||
"{MAINMENU_NEWGAME}": "New game",
|
||||
|
||||
"{STORY_WELCOME}":"Welcome to ShiftOS",
|
||||
"{STORY_SENTIENCEUNKNOWN}":"Your sentience is currently unknown. Please strike the Enter key to prove you are alive.",
|
||||
//Miscelaneous strings
|
||||
"{MISC_KERNELVERSION}": "ShiftKernel - v0.9.4",
|
||||
"{MISC_KERNELBOOTED}": "[sys] Kernel startup completed.",
|
||||
"{MISC_SHIFTFSDRV}": "[sfs] ShiftFS core driver, version 2.7",
|
||||
"{MISC_SHIFTFSBLOCKSREAD}": "[sfs] Driver initiated. 4096 blocks read.",
|
||||
"{MISC_LOADINGCONFIG}": "[confd] Loading system configuration... success",
|
||||
"{MISC_BUILDINGCMDS}": "[termdb] Terminal database is being parsed...",
|
||||
"{MISC_CONNECTINGTONETWORK}": "[inetd] Connecting to network...",
|
||||
"{MISC_CONNECTIONSUCCESSFUL}": "[inetd] Connection successful.",
|
||||
"{MISC_DHCPHANDSHAKEFINISHED}": "[inetd] DHCP handshake finished.",
|
||||
"{MISC_NONETWORK}": "[inetd] No network access points found.",
|
||||
"{MISC_SANDBOXMODE}": "[sos] Sandbox Mode initiating...",
|
||||
"{MISC_ACCEPTINGLOGINS}": "[systemd] Accepting logins on local tty1.",
|
||||
|
||||
"{SENTIENCE_BASIC}":"Sentience: Basic - User can respond to basic instructions.",
|
||||
"{SENTIENCE_BASICPLUS}":"Sentience: Basic+ - User can invoke commands within the ecosystem.",
|
||||
"{SENTIENCE_POSSIBLEHUMAN}":"Sentience: Possible human - user can perform actions based on a choice.",
|
||||
"{SENTIENCE_POSSIBLEHUMANPLUS}":"Sentience: Possible human+ - user can infer, and can pass arguments.",
|
||||
"{SENTIENCE_HUMAN}":"Sentience: Human. Thanks for your patience.",
|
||||
"{SENTIENCE_INVALIDPASSWORD}":"The password you entered is invalid.",
|
||||
|
||||
"{ARGS_PASSWORD}":"password",
|
||||
//ShiftOS engine strings
|
||||
"{ENGINE_CANNOTLOADSAVE}": "[sos] Error. Cannot load user save file.",
|
||||
|
||||
"{SHIFTOS_PLUS_MOTTO}":"ShiftOS, Shift it YOUR way.",
|
||||
"{SHIFTOS_VERSION_INFO}":"ShiftOS Version: ",
|
||||
"{USER_NAME}":"Username",
|
||||
"{DISCOURSE_INTEGRATION}":"Discourse Integration",
|
||||
"{SYSTEM_NAME}":"System Name",
|
||||
"{USER_INFO}":"User Information",
|
||||
"{SELECT_LANG}":"Select language",
|
||||
"{WELCOME_TO_SHIFTOS}":"Welcome to ShiftOS Alpha!",
|
||||
"{CREATE}":"Create",
|
||||
"{INSTALL}":"Install",
|
||||
"{ALIAS}":"Alias:",
|
||||
"{OBSOLETE_SYS_SHUTDOWN}":"sys.shutdown is obsolete",
|
||||
"{PY_EXCEPTION}":"There was an error running python code.",
|
||||
"{LUA_ERROR}":"There was an error running lua code.",
|
||||
"{LANGUAGE_CHANGED}":"The language has been changed. Please restart ShiftOS for changes to take full effect.",
|
||||
//Pre-connection loading messages
|
||||
"{LOADINGMSG1_0}": "[systemd] The light is so bright...",
|
||||
"{LOADINGMSG1_1}": "[systemd] Hold your colors...",
|
||||
"{LOADINGMSG1_2}": "[systemd] Time to shift it my way...",
|
||||
"{LOADINGMSG1_3}": "[systemd] Does anybody even read this?",
|
||||
"{LOADINGMSG1_4}": "[systemd] I....just wanna play it right... We're....gonna get there tonight...",
|
||||
"{LOADINGMSG1_5}": "[systemd] I'm a computer.",
|
||||
"{LOADINGMSG1_6}": "[systemd] What ya gonna do, what ya gonna do, when DevX comes for you?",
|
||||
"{LOADINGMSG1_7}": "[systemd] Artificial intelligence do everything now.",
|
||||
"{LOADINGMSG1_8}": "[systemd] Nobody is really here.",
|
||||
"{LOADINGMSG1_9}": "[systemd] I so want a giant cake for breakfast.",
|
||||
|
||||
"{TERMINAL_NAME}":"Terminal",
|
||||
"{ARTPAD_NAME}":"Artpad",
|
||||
"{PONG_NAME}":"Pong",
|
||||
"{WAV_PLAYER_NAME}":"WAV Player",
|
||||
"{SHIFTORIUM_NAME}":"Shiftorium",
|
||||
"{TEXTPAD_NAME}":"TextPad",
|
||||
"{VIRUS_SCANNER_NAME}":"Virus Scanner",
|
||||
"{SKIN_LOADER_NAME}":"Skin Loader",
|
||||
"{SHIFTER_NAME}":"Shifter",
|
||||
"{NAME_CHANGER_NAME}":"Name Changer",
|
||||
"{MUD_PASSWORD_CRACKER_NAME}":"Multi-User Domain Password Cracker v1.0",
|
||||
"{MUD_CONTROL_CENTRE_NAME}":"MUD Control Centre",
|
||||
"{MUD_AUTHENTICATOR_NAME}":"Multi-User Domain Admin Panel",
|
||||
"{GRAPHIC_PICKER_NAME}":"Graphic Picker",
|
||||
"{FILE_SKIMMER_NAME}":"File Skimmer",
|
||||
"{FILE_DIALOG_NAME}":"File Dialog",
|
||||
"{DIALOG_NAME}":"Dialog",
|
||||
"{COLOR_PICKER_NAME}":"Color Picker",
|
||||
"{CHAT_NAME}":"Chat",
|
||||
"{NOTIFICATIONS}":"Notifications",
|
||||
}
|
||||
//Post-connection loading messages
|
||||
"{LOADINGMSG2_0}": "[systemd] It's all yours, Shifter.",
|
||||
"{LOADINGMSG2_1}": "[systemd] That's a nice network you got there...",
|
||||
"{LOADINGMSG2_2}": "[systemd] Leave me alone and go earn some Codepoints.",
|
||||
"{LOADINGMSG2_3}": "[systemd] I'm hungry... Cake would be appreciated.",
|
||||
"{LOADINGMSG2_4}": "[systemd] SEVERE: CAKE NOT FOUND. PLEASE INSERT CAKE INTO DRIVE 1:/ AND PRESS ANY KEY TO CONTINUE.",
|
||||
"{LOADINGMSG2_5}": "[systemd] Now SCREAM!",
|
||||
"{LOADINGMSG2_6}": "[systemd] Yes, I'd like to order a giant 6-mile-long tripple-chocolate ice cream cake?",
|
||||
"{LOADINGMSG2_7}": "[systemd] There's no antidote...",
|
||||
"{LOADINGMSG2_8}": "[systemd] Can I at least have a muffin?",
|
||||
"{LOADINGMSG2_9}": "[systemd] System initiated, but I still want a cake.",
|
||||
|
||||
}
|
|
@ -10,7 +10,6 @@ using ShiftOS.Objects;
|
|||
|
||||
namespace ShiftOS.WinForms.Servers
|
||||
{
|
||||
[Namespace("rts")]
|
||||
[Server("Remote Terminal Server", 21)]
|
||||
//[RequiresUpgrade("story_hacker101_breakingthebonds")] //Uncomment when story is implemented.
|
||||
public class RemoteTerminalServer : Server
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<HintPath>..\packages\CommonMark.NET.0.15.0\lib\net45\CommonMark.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Scripting, Version=1.1.2.22, Culture=neutral, PublicKeyToken=7f709c5b713576e1" />
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="NAudio, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NAudio.1.8.0\lib\net35\NAudio.dll</HintPath>
|
||||
|
@ -70,6 +71,24 @@
|
|||
<Compile Include="Applications\About.Designer.cs">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\IconManager.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Applications\IconManager.Designer.cs">
|
||||
<DependentUpon>IconManager.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\MindBlow.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Applications\MindBlow.Designer.cs">
|
||||
<DependentUpon>MindBlow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\Pong.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Applications\Pong.Designer.cs">
|
||||
<DependentUpon>Pong.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\TriPresent.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -118,12 +137,6 @@
|
|||
<Compile Include="Applications\Chat.Designer.cs">
|
||||
<DependentUpon>Chat.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\CoherenceOverlay.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Applications\CoherenceOverlay.Designer.cs">
|
||||
<DependentUpon>CoherenceOverlay.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\ColorPicker.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -190,12 +203,6 @@
|
|||
<Compile Include="Applications\Notifications.Designer.cs">
|
||||
<DependentUpon>Notifications.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\Pong.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Applications\Pong.Designer.cs">
|
||||
<DependentUpon>Pong.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\Shifter.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -350,6 +357,18 @@
|
|||
<Compile Include="HackerCommands.cs" />
|
||||
<Compile Include="IDesktopWidget.cs" />
|
||||
<Compile Include="JobTasks.cs" />
|
||||
<Compile Include="MainMenu\Loading.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainMenu\Loading.Designer.cs">
|
||||
<DependentUpon>Loading.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainMenu\MainMenu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainMenu\MainMenu.Designer.cs">
|
||||
<DependentUpon>MainMenu.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Oobe.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -382,15 +401,52 @@
|
|||
<Compile Include="ShiftnetSites\MainHomepage.Designer.cs">
|
||||
<DependentUpon>MainHomepage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\MindBlow.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\MindBlow.Designer.cs">
|
||||
<DependentUpon>MindBlow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftGames.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftGames.Designer.cs">
|
||||
<DependentUpon>ShiftGames.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftSoft.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftSoft.Designer.cs">
|
||||
<DependentUpon>ShiftSoft.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftSoft_Ping.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftSoft_Ping.Designer.cs">
|
||||
<DependentUpon>ShiftSoft_Ping.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ShiftOSAudioProvider.cs" />
|
||||
<Compile Include="ShiftOSConfigFile.cs" />
|
||||
<Compile Include="SkinCommands.cs" />
|
||||
<Compile Include="StatusIcons\ShiftnetStatus.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="StatusIcons\ShiftnetStatus.Designer.cs">
|
||||
<DependentUpon>ShiftnetStatus.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="StatusIcons\TestStatus.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="StatusIcons\TestStatus.Designer.cs">
|
||||
<DependentUpon>TestStatus.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="StatusIcons\Volume.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="StatusIcons\Volume.Designer.cs">
|
||||
<DependentUpon>Volume.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Stories\DevXSkinningStory.cs" />
|
||||
<Compile Include="Stories\LegionStory.cs" />
|
||||
<Compile Include="TestCommandsForUpgrades.cs" />
|
||||
<Compile Include="Tools\ColorPickerDataBackend.cs" />
|
||||
|
@ -437,6 +493,15 @@
|
|||
<EmbeddedResource Include="Applications\About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\IconManager.resx">
|
||||
<DependentUpon>IconManager.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\MindBlow.resx">
|
||||
<DependentUpon>MindBlow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\Pong.resx">
|
||||
<DependentUpon>Pong.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\TriPresent.resx">
|
||||
<DependentUpon>TriPresent.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -494,9 +559,6 @@
|
|||
<EmbeddedResource Include="Applications\Notifications.resx">
|
||||
<DependentUpon>Notifications.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\Pong.resx">
|
||||
<DependentUpon>Pong.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\Shifter.resx">
|
||||
<DependentUpon>Shifter.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -563,6 +625,12 @@
|
|||
<EmbeddedResource Include="GUILogin.resx">
|
||||
<DependentUpon>GUILogin.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainMenu\Loading.resx">
|
||||
<DependentUpon>Loading.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainMenu\MainMenu.resx">
|
||||
<DependentUpon>MainMenu.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Oobe.resx">
|
||||
<DependentUpon>Oobe.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -580,9 +648,27 @@
|
|||
<EmbeddedResource Include="ShiftnetSites\MainHomepage.resx">
|
||||
<DependentUpon>MainHomepage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ShiftnetSites\MindBlow.resx">
|
||||
<DependentUpon>MindBlow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ShiftnetSites\ShiftGames.resx">
|
||||
<DependentUpon>ShiftGames.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ShiftnetSites\ShiftSoft.resx">
|
||||
<DependentUpon>ShiftSoft.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ShiftnetSites\ShiftSoft_Ping.resx">
|
||||
<DependentUpon>ShiftSoft_Ping.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="StatusIcons\ShiftnetStatus.resx">
|
||||
<DependentUpon>ShiftnetStatus.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="StatusIcons\TestStatus.resx">
|
||||
<DependentUpon>TestStatus.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="StatusIcons\Volume.resx">
|
||||
<DependentUpon>Volume.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UniteLoginDialog.resx">
|
||||
<DependentUpon>UniteLoginDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -809,6 +895,10 @@
|
|||
<None Include="Resources\writesound.wav" />
|
||||
<None Include="Resources\SuperDesk screenshot.png" />
|
||||
<None Include="Resources\notestate_connection_full.bmp" />
|
||||
<None Include="Resources\iconSpeaker.bmp" />
|
||||
<None Include="Resources\ShiftOSFull.png" />
|
||||
<Content Include="Resources\GuessTheNumber.py" />
|
||||
<None Include="Resources\mindblow.png" />
|
||||
<Content Include="SystemIcons\iconArtpad.png" />
|
||||
<Content Include="SystemIcons\iconAudioPlayer.png" />
|
||||
<Content Include="SystemIcons\iconBitnoteDigger.png" />
|
||||
|
|
|
@ -207,33 +207,21 @@ namespace ShiftOS.WinForms.ShiftnetSites
|
|||
if (result == true)
|
||||
{
|
||||
SaveSystem.CurrentSave.Codepoints -= upg.Cost;
|
||||
foreach (var exe in Directory.GetFiles(Environment.CurrentDirectory))
|
||||
foreach (var type in ReflectMan.Types)
|
||||
{
|
||||
if (exe.EndsWith(".exe") || exe.EndsWith(".dll"))
|
||||
var attrib = type.GetCustomAttributes(false).FirstOrDefault(x => x is AppscapeEntryAttribute) as AppscapeEntryAttribute;
|
||||
if (attrib != null)
|
||||
{
|
||||
try
|
||||
if (attrib.Name == upg.Name)
|
||||
{
|
||||
var asm = Assembly.LoadFile(exe);
|
||||
foreach (var type in asm.GetTypes())
|
||||
{
|
||||
var attrib = type.GetCustomAttributes(false).FirstOrDefault(x => x is AppscapeEntryAttribute) as AppscapeEntryAttribute;
|
||||
if (attrib != null)
|
||||
{
|
||||
if (attrib.Name == upg.Name)
|
||||
{
|
||||
var installer = new Applications.Installer();
|
||||
var installation = new AppscapeInstallation(upg.Name, attrib.DownloadSize, upg.ID);
|
||||
AppearanceManager.SetupWindow(installer);
|
||||
installer.InitiateInstall(installation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
var installer = new Applications.Installer();
|
||||
var installation = new AppscapeInstallation(upg.Name, attrib.DownloadSize, upg.ID);
|
||||
AppearanceManager.SetupWindow(installer);
|
||||
installer.InitiateInstall(installation);
|
||||
return;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -372,7 +360,7 @@ namespace ShiftOS.WinForms
|
|||
/// </summary>
|
||||
public class AppscapeEntryAttribute : RequiresUpgradeAttribute
|
||||
{
|
||||
public AppscapeEntryAttribute(string name, string description, int downloadSize, long cost, string dependencies = "", string category = "Misc") : base(name.ToLower().Replace(' ', '_'))
|
||||
public AppscapeEntryAttribute(string name, string description, int downloadSize, ulong cost, string dependencies = "", string category = "Misc") : base(name.ToLower().Replace(' ', '_'))
|
||||
{
|
||||
Name = name;
|
||||
Description = description;
|
||||
|
@ -385,7 +373,7 @@ namespace ShiftOS.WinForms
|
|||
public string Name { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
public string Category { get; private set; }
|
||||
public long Cost { get; private set; }
|
||||
public ulong Cost { get; private set; }
|
||||
public string DependencyString { get; private set; }
|
||||
public int DownloadSize { get; private set; }
|
||||
}
|
||||
|
|
|
@ -39,49 +39,30 @@ namespace ShiftOS.WinForms.ShiftnetSites
|
|||
{
|
||||
//Get the Fundamentals List
|
||||
flfundamentals.Controls.Clear();
|
||||
foreach (var exe in Directory.GetFiles(Environment.CurrentDirectory))
|
||||
foreach (var type in Array.FindAll(ReflectMan.Types, t => t.GetInterfaces().Contains(typeof(IShiftnetSite)) && t.BaseType == typeof(UserControl) && Shiftorium.UpgradeAttributesUnlocked(t)))
|
||||
{
|
||||
if (exe.EndsWith(".exe") || exe.EndsWith(".dll"))
|
||||
var attrs = type.GetCustomAttributes(false);
|
||||
var attribute = attrs.FirstOrDefault(x => x is ShiftnetSiteAttribute) as ShiftnetSiteAttribute;
|
||||
if (attribute != null)
|
||||
{
|
||||
try
|
||||
if (attrs.OfType<ShiftnetFundamentalAttribute>().Any())
|
||||
{
|
||||
var asm = Assembly.LoadFile(exe);
|
||||
foreach (var type in asm.GetTypes())
|
||||
var dash = new Label();
|
||||
dash.Text = " - ";
|
||||
dash.AutoSize = true;
|
||||
flfundamentals.Controls.Add(dash);
|
||||
dash.Show();
|
||||
var link = new LinkLabel();
|
||||
link.Text = attribute.Name;
|
||||
link.Click += (o, a) =>
|
||||
{
|
||||
if (type.GetInterfaces().Contains(typeof(IShiftnetSite)))
|
||||
{
|
||||
if (type.BaseType == typeof(UserControl))
|
||||
{
|
||||
var attribute = type.GetCustomAttributes(false).FirstOrDefault(x => x is ShiftnetSiteAttribute) as ShiftnetSiteAttribute;
|
||||
if (attribute != null)
|
||||
{
|
||||
if (Shiftorium.UpgradeAttributesUnlocked(type))
|
||||
{
|
||||
if (type.GetCustomAttributes(false).FirstOrDefault(x => x is ShiftnetFundamentalAttribute) != null)
|
||||
{
|
||||
var dash = new Label();
|
||||
dash.Text = " - ";
|
||||
dash.AutoSize = true;
|
||||
flfundamentals.Controls.Add(dash);
|
||||
dash.Show();
|
||||
var link = new LinkLabel();
|
||||
link.Text = attribute.Name;
|
||||
link.Click += (o, a) =>
|
||||
{
|
||||
GoToUrl?.Invoke(attribute.Url);
|
||||
};
|
||||
flfundamentals.Controls.Add(link);
|
||||
flfundamentals.SetFlowBreak(link, true);
|
||||
link.Show();
|
||||
link.LinkColor = SkinEngine.LoadedSkin.ControlTextColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GoToUrl?.Invoke(attribute.Url);
|
||||
};
|
||||
flfundamentals.Controls.Add(link);
|
||||
flfundamentals.SetFlowBreak(link, true);
|
||||
link.Show();
|
||||
link.LinkColor = SkinEngine.LoadedSkin.ControlTextColor;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
192
ShiftOS.WinForms/ShiftnetSites/MindBlow.Designer.cs
generated
Normal file
192
ShiftOS.WinForms/ShiftnetSites/MindBlow.Designer.cs
generated
Normal file
|
@ -0,0 +1,192 @@
|
|||
namespace ShiftOS.WinForms.ShiftnetSites
|
||||
{
|
||||
partial class MindBlow
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MindBlow));
|
||||
this.nav = new System.Windows.Forms.Panel();
|
||||
this.title = new System.Windows.Forms.Label();
|
||||
this.aboutpnl = new System.Windows.Forms.Panel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.buybtn = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.aboutbtn = new System.Windows.Forms.LinkLabel();
|
||||
this.tutorialpnl = new System.Windows.Forms.Panel();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.tutorialbtn = new System.Windows.Forms.LinkLabel();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.nav.SuspendLayout();
|
||||
this.aboutpnl.SuspendLayout();
|
||||
this.tutorialpnl.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nav
|
||||
//
|
||||
this.nav.Controls.Add(this.tutorialbtn);
|
||||
this.nav.Controls.Add(this.aboutbtn);
|
||||
this.nav.Controls.Add(this.title);
|
||||
this.nav.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.nav.Location = new System.Drawing.Point(0, 0);
|
||||
this.nav.Name = "nav";
|
||||
this.nav.Size = new System.Drawing.Size(200, 470);
|
||||
this.nav.TabIndex = 0;
|
||||
//
|
||||
// title
|
||||
//
|
||||
this.title.AutoSize = true;
|
||||
this.title.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.title.Location = new System.Drawing.Point(3, 0);
|
||||
this.title.Name = "title";
|
||||
this.title.Size = new System.Drawing.Size(101, 24);
|
||||
this.title.TabIndex = 0;
|
||||
this.title.Text = "MindBlow";
|
||||
//
|
||||
// aboutpnl
|
||||
//
|
||||
this.aboutpnl.Controls.Add(this.pictureBox1);
|
||||
this.aboutpnl.Controls.Add(this.label2);
|
||||
this.aboutpnl.Controls.Add(this.buybtn);
|
||||
this.aboutpnl.Controls.Add(this.label1);
|
||||
this.aboutpnl.Location = new System.Drawing.Point(206, 0);
|
||||
this.aboutpnl.Name = "aboutpnl";
|
||||
this.aboutpnl.Size = new System.Drawing.Size(512, 470);
|
||||
this.aboutpnl.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 8);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(313, 65);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = resources.GetString("label1.Text");
|
||||
//
|
||||
// buybtn
|
||||
//
|
||||
this.buybtn.Location = new System.Drawing.Point(6, 76);
|
||||
this.buybtn.Name = "buybtn";
|
||||
this.buybtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.buybtn.TabIndex = 1;
|
||||
this.buybtn.Text = "Buy Now";
|
||||
this.buybtn.UseVisualStyleBackColor = true;
|
||||
this.buybtn.Click += new System.EventHandler(this.buybtn_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(87, 81);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(132, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "(Price: 50,000 Codepoints)";
|
||||
//
|
||||
// aboutbtn
|
||||
//
|
||||
this.aboutbtn.AutoSize = true;
|
||||
this.aboutbtn.Location = new System.Drawing.Point(4, 24);
|
||||
this.aboutbtn.Name = "aboutbtn";
|
||||
this.aboutbtn.Size = new System.Drawing.Size(85, 13);
|
||||
this.aboutbtn.TabIndex = 1;
|
||||
this.aboutbtn.TabStop = true;
|
||||
this.aboutbtn.Text = "About/Purchase";
|
||||
this.aboutbtn.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.aboutbtn_LinkClicked);
|
||||
//
|
||||
// tutorialpnl
|
||||
//
|
||||
this.tutorialpnl.Controls.Add(this.label3);
|
||||
this.tutorialpnl.Location = new System.Drawing.Point(209, 0);
|
||||
this.tutorialpnl.Name = "tutorialpnl";
|
||||
this.tutorialpnl.Size = new System.Drawing.Size(506, 467);
|
||||
this.tutorialpnl.TabIndex = 2;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(3, 8);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(375, 208);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = resources.GetString("label3.Text");
|
||||
//
|
||||
// tutorialbtn
|
||||
//
|
||||
this.tutorialbtn.AutoSize = true;
|
||||
this.tutorialbtn.Location = new System.Drawing.Point(4, 37);
|
||||
this.tutorialbtn.Name = "tutorialbtn";
|
||||
this.tutorialbtn.Size = new System.Drawing.Size(35, 13);
|
||||
this.tutorialbtn.TabIndex = 2;
|
||||
this.tutorialbtn.TabStop = true;
|
||||
this.tutorialbtn.Text = "Guide";
|
||||
this.tutorialbtn.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.tutorialbtn_LinkClicked);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = global::ShiftOS.WinForms.Properties.Resources.mindblow;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(6, 105);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(390, 295);
|
||||
this.pictureBox1.TabIndex = 3;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// MindBlow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.aboutpnl);
|
||||
this.Controls.Add(this.tutorialpnl);
|
||||
this.Controls.Add(this.nav);
|
||||
this.Name = "MindBlow";
|
||||
this.Size = new System.Drawing.Size(718, 470);
|
||||
this.Resize += new System.EventHandler(this.MindBlow_Resize);
|
||||
this.nav.ResumeLayout(false);
|
||||
this.nav.PerformLayout();
|
||||
this.aboutpnl.ResumeLayout(false);
|
||||
this.aboutpnl.PerformLayout();
|
||||
this.tutorialpnl.ResumeLayout(false);
|
||||
this.tutorialpnl.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel nav;
|
||||
private System.Windows.Forms.Label title;
|
||||
private System.Windows.Forms.Panel aboutpnl;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button buybtn;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.LinkLabel aboutbtn;
|
||||
private System.Windows.Forms.Panel tutorialpnl;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.LinkLabel tutorialbtn;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
}
|
||||
}
|
74
ShiftOS.WinForms/ShiftnetSites/MindBlow.cs
Normal file
74
ShiftOS.WinForms/ShiftnetSites/MindBlow.cs
Normal file
|
@ -0,0 +1,74 @@
|
|||
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;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms.ShiftnetSites
|
||||
{
|
||||
[ShiftnetSite("shiftnet/mindblow", "MindBlow", "World's First IDE for ShiftOS")]
|
||||
public partial class MindBlow : UserControl, IShiftnetSite
|
||||
{
|
||||
public MindBlow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public event Action<string> GoToUrl;
|
||||
public event Action GoBack;
|
||||
|
||||
private void DoLayout()
|
||||
{
|
||||
aboutpnl.Left = tutorialpnl.Left = nav.Width;
|
||||
aboutpnl.Width = tutorialpnl.Width = Width - nav.Width;
|
||||
tutorialpnl.Height = Height;
|
||||
}
|
||||
|
||||
private void aboutbtn_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
aboutpnl.BringToFront();
|
||||
}
|
||||
|
||||
private void tutorialbtn_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
tutorialpnl.BringToFront();
|
||||
}
|
||||
|
||||
private void MindBlow_Resize(object sender, EventArgs e)
|
||||
{
|
||||
DoLayout();
|
||||
}
|
||||
|
||||
private void buybtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Shiftorium.UpgradeInstalled("mindblow"))
|
||||
Infobox.Show("Already Purchased", "You have already bought MindBlow.");
|
||||
else if (SaveSystem.CurrentSave.Codepoints < 50000)
|
||||
Infobox.Show("Not Enough Codepoints", "You do not have enough Codepoints to buy MindBlow.");
|
||||
else
|
||||
{
|
||||
Shiftorium.Buy("mindblow", 50000);
|
||||
Infobox.Show("Installation Complete", "MindBlow has been successfully installed.");
|
||||
}
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
DoLayout();
|
||||
aboutpnl.BringToFront();
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
145
ShiftOS.WinForms/ShiftnetSites/MindBlow.resx
Normal file
145
ShiftOS.WinForms/ShiftnetSites/MindBlow.resx
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Ever wanted to make your own ShiftOS software?
|
||||
|
||||
MindBlow is the world's first IDE designed specifically for ShiftOS.
|
||||
It allows you to develop and run your own programs written in the
|
||||
Brainfuck programming language.</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>The Brainfuck programming language is simple to learn and use.
|
||||
There are a total of 8 commands in the language:
|
||||
|
||||
> Increment the memory pointer.
|
||||
< Decrement the memory pointer.
|
||||
+ Increment the number at the memory pointer.
|
||||
- Decrement the number at the memory pointer.
|
||||
. Print the ASCII value at the memory pointer.
|
||||
, Get a character from the user and put its ASCII value at the memory pointer.
|
||||
[ Jump to the next ']' if the number at the memory pointer is zero.
|
||||
] Jump to the last '[' if the number at the memory pointer isn't zero.
|
||||
|
||||
Any characters that aren't valid commands will be ignored.
|
||||
Here is a simple program to read 10 characters from the user and display them:
|
||||
++++++++++
|
||||
[->,.<]</value>
|
||||
</data>
|
||||
</root>
|
245
ShiftOS.WinForms/ShiftnetSites/ShiftSoft.Designer.cs
generated
Normal file
245
ShiftOS.WinForms/ShiftnetSites/ShiftSoft.Designer.cs
generated
Normal file
|
@ -0,0 +1,245 @@
|
|||
namespace ShiftOS.WinForms.ShiftnetSites
|
||||
{
|
||||
partial class ShiftSoft
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShiftSoft));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.pnldivider = new System.Windows.Forms.Panel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.flbuttons = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnhome = new System.Windows.Forms.Button();
|
||||
this.btnservices = new System.Windows.Forms.Button();
|
||||
this.btnping = new System.Windows.Forms.Button();
|
||||
this.pnlhome = new System.Windows.Forms.Panel();
|
||||
this.lbwhere = new System.Windows.Forms.Label();
|
||||
this.lbdesc = new System.Windows.Forms.Label();
|
||||
this.pnlservices = new System.Windows.Forms.Panel();
|
||||
this.lbfreebiedesc = new System.Windows.Forms.Label();
|
||||
this.lbfreebie = new System.Windows.Forms.Label();
|
||||
this.btnjoinfreebie = new System.Windows.Forms.Button();
|
||||
this.flbuttons.SuspendLayout();
|
||||
this.pnlhome.SuspendLayout();
|
||||
this.pnlservices.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Franklin Gothic Heavy", 24.75F, System.Drawing.FontStyle.Italic);
|
||||
this.label1.Location = new System.Drawing.Point(13, 8);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(152, 38);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Tag = "keepfont";
|
||||
this.label1.Text = "Shiftsoft";
|
||||
//
|
||||
// pnldivider
|
||||
//
|
||||
this.pnldivider.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnldivider.Location = new System.Drawing.Point(20, 71);
|
||||
this.pnldivider.Name = "pnldivider";
|
||||
this.pnldivider.Size = new System.Drawing.Size(654, 2);
|
||||
this.pnldivider.TabIndex = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(17, 46);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(163, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "What do you want to shift today?";
|
||||
//
|
||||
// flbuttons
|
||||
//
|
||||
this.flbuttons.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.flbuttons.AutoSize = true;
|
||||
this.flbuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flbuttons.Controls.Add(this.btnhome);
|
||||
this.flbuttons.Controls.Add(this.btnservices);
|
||||
this.flbuttons.Controls.Add(this.btnping);
|
||||
this.flbuttons.Location = new System.Drawing.Point(515, 17);
|
||||
this.flbuttons.Name = "flbuttons";
|
||||
this.flbuttons.Size = new System.Drawing.Size(159, 29);
|
||||
this.flbuttons.TabIndex = 3;
|
||||
//
|
||||
// btnhome
|
||||
//
|
||||
this.btnhome.AutoSize = true;
|
||||
this.btnhome.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnhome.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnhome.Name = "btnhome";
|
||||
this.btnhome.Size = new System.Drawing.Size(45, 23);
|
||||
this.btnhome.TabIndex = 0;
|
||||
this.btnhome.Tag = "header3";
|
||||
this.btnhome.Text = "Home";
|
||||
this.btnhome.UseVisualStyleBackColor = true;
|
||||
this.btnhome.Click += new System.EventHandler(this.btnhome_Click);
|
||||
//
|
||||
// btnservices
|
||||
//
|
||||
this.btnservices.AutoSize = true;
|
||||
this.btnservices.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnservices.Location = new System.Drawing.Point(54, 3);
|
||||
this.btnservices.Name = "btnservices";
|
||||
this.btnservices.Size = new System.Drawing.Size(58, 23);
|
||||
this.btnservices.TabIndex = 1;
|
||||
this.btnservices.Tag = "header3";
|
||||
this.btnservices.Text = "Services";
|
||||
this.btnservices.UseVisualStyleBackColor = true;
|
||||
this.btnservices.Click += new System.EventHandler(this.btnservices_Click);
|
||||
//
|
||||
// btnping
|
||||
//
|
||||
this.btnping.AutoSize = true;
|
||||
this.btnping.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnping.Location = new System.Drawing.Point(118, 3);
|
||||
this.btnping.Name = "btnping";
|
||||
this.btnping.Size = new System.Drawing.Size(38, 23);
|
||||
this.btnping.TabIndex = 2;
|
||||
this.btnping.Tag = "header3";
|
||||
this.btnping.Text = "Ping";
|
||||
this.btnping.UseVisualStyleBackColor = true;
|
||||
this.btnping.Click += new System.EventHandler(this.btnping_Click);
|
||||
//
|
||||
// pnlhome
|
||||
//
|
||||
this.pnlhome.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnlhome.Controls.Add(this.lbdesc);
|
||||
this.pnlhome.Controls.Add(this.lbwhere);
|
||||
this.pnlhome.Location = new System.Drawing.Point(20, 92);
|
||||
this.pnlhome.Name = "pnlhome";
|
||||
this.pnlhome.Size = new System.Drawing.Size(654, 271);
|
||||
this.pnlhome.TabIndex = 4;
|
||||
//
|
||||
// lbwhere
|
||||
//
|
||||
this.lbwhere.AutoSize = true;
|
||||
this.lbwhere.Location = new System.Drawing.Point(4, 4);
|
||||
this.lbwhere.Name = "lbwhere";
|
||||
this.lbwhere.Size = new System.Drawing.Size(169, 13);
|
||||
this.lbwhere.TabIndex = 0;
|
||||
this.lbwhere.Tag = "header2";
|
||||
this.lbwhere.Text = "Where do you want to shift today?";
|
||||
//
|
||||
// lbdesc
|
||||
//
|
||||
this.lbdesc.Location = new System.Drawing.Point(4, 17);
|
||||
this.lbdesc.Name = "lbdesc";
|
||||
this.lbdesc.Size = new System.Drawing.Size(361, 160);
|
||||
this.lbdesc.TabIndex = 1;
|
||||
this.lbdesc.Text = resources.GetString("lbdesc.Text");
|
||||
//
|
||||
// pnlservices
|
||||
//
|
||||
this.pnlservices.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnlservices.Controls.Add(this.btnjoinfreebie);
|
||||
this.pnlservices.Controls.Add(this.lbfreebiedesc);
|
||||
this.pnlservices.Controls.Add(this.lbfreebie);
|
||||
this.pnlservices.Location = new System.Drawing.Point(20, 92);
|
||||
this.pnlservices.Name = "pnlservices";
|
||||
this.pnlservices.Size = new System.Drawing.Size(654, 271);
|
||||
this.pnlservices.TabIndex = 5;
|
||||
//
|
||||
// lbfreebiedesc
|
||||
//
|
||||
this.lbfreebiedesc.Location = new System.Drawing.Point(4, 17);
|
||||
this.lbfreebiedesc.Name = "lbfreebiedesc";
|
||||
this.lbfreebiedesc.Size = new System.Drawing.Size(361, 105);
|
||||
this.lbfreebiedesc.TabIndex = 1;
|
||||
this.lbfreebiedesc.Text = resources.GetString("lbfreebiedesc.Text");
|
||||
//
|
||||
// lbfreebie
|
||||
//
|
||||
this.lbfreebie.AutoSize = true;
|
||||
this.lbfreebie.Location = new System.Drawing.Point(4, 4);
|
||||
this.lbfreebie.Name = "lbfreebie";
|
||||
this.lbfreebie.Size = new System.Drawing.Size(88, 13);
|
||||
this.lbfreebie.TabIndex = 0;
|
||||
this.lbfreebie.Tag = "header2";
|
||||
this.lbfreebie.Text = "Freebie Solutions";
|
||||
//
|
||||
// btnjoinfreebie
|
||||
//
|
||||
this.btnjoinfreebie.AutoSize = true;
|
||||
this.btnjoinfreebie.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnjoinfreebie.Location = new System.Drawing.Point(245, 125);
|
||||
this.btnjoinfreebie.Name = "btnjoinfreebie";
|
||||
this.btnjoinfreebie.Size = new System.Drawing.Size(120, 23);
|
||||
this.btnjoinfreebie.TabIndex = 2;
|
||||
this.btnjoinfreebie.Text = "Join Freebie Solutions";
|
||||
this.btnjoinfreebie.UseVisualStyleBackColor = true;
|
||||
this.btnjoinfreebie.Click += new System.EventHandler(this.btnjoinfreebie_Click);
|
||||
//
|
||||
// ShiftSoft
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.pnlservices);
|
||||
this.Controls.Add(this.pnlhome);
|
||||
this.Controls.Add(this.flbuttons);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.pnldivider);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "ShiftSoft";
|
||||
this.Size = new System.Drawing.Size(694, 384);
|
||||
this.flbuttons.ResumeLayout(false);
|
||||
this.flbuttons.PerformLayout();
|
||||
this.pnlhome.ResumeLayout(false);
|
||||
this.pnlhome.PerformLayout();
|
||||
this.pnlservices.ResumeLayout(false);
|
||||
this.pnlservices.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Panel pnldivider;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.FlowLayoutPanel flbuttons;
|
||||
private System.Windows.Forms.Button btnhome;
|
||||
private System.Windows.Forms.Button btnservices;
|
||||
private System.Windows.Forms.Button btnping;
|
||||
private System.Windows.Forms.Panel pnlhome;
|
||||
private System.Windows.Forms.Label lbdesc;
|
||||
private System.Windows.Forms.Label lbwhere;
|
||||
private System.Windows.Forms.Panel pnlservices;
|
||||
private System.Windows.Forms.Label lbfreebiedesc;
|
||||
private System.Windows.Forms.Label lbfreebie;
|
||||
private System.Windows.Forms.Button btnjoinfreebie;
|
||||
}
|
||||
}
|
94
ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs
Normal file
94
ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs
Normal file
|
@ -0,0 +1,94 @@
|
|||
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;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms.ShiftnetSites
|
||||
{
|
||||
[ShiftnetSite("shiftnet/shiftsoft", "ShiftSoft", "What do you want to shift today?")]
|
||||
[ShiftnetFundamental]
|
||||
public partial class ShiftSoft : UserControl, IShiftnetSite
|
||||
{
|
||||
public ShiftSoft()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public event Action GoBack;
|
||||
public event Action<string> GoToUrl;
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
pnldivider.Tag = "keepbg";
|
||||
pnldivider.BackColor = SkinEngine.LoadedSkin.ControlTextColor;
|
||||
Tools.ControlManager.SetupControls(flbuttons);
|
||||
Tools.ControlManager.SetupControls(pnlhome);
|
||||
Tools.ControlManager.SetupControls(pnlservices);
|
||||
|
||||
lbfreebiedesc.Top = lbfreebie.Top + lbfreebie.Height + 5;
|
||||
btnjoinfreebie.Top = lbfreebiedesc.Top + lbfreebiedesc.Height + 5;
|
||||
|
||||
SetupFreebieUI();
|
||||
|
||||
lbdesc.Top = lbwhere.Top + lbwhere.Height + 5;
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
pnlhome.BringToFront();
|
||||
}
|
||||
|
||||
private void btnping_Click(object sender, EventArgs e)
|
||||
{
|
||||
GoToUrl?.Invoke("shiftnet/shiftsoft/ping");
|
||||
}
|
||||
|
||||
private void btnhome_Click(object sender, EventArgs e)
|
||||
{
|
||||
pnlhome.BringToFront();
|
||||
}
|
||||
|
||||
private void btnservices_Click(object sender, EventArgs e)
|
||||
{
|
||||
pnlservices.BringToFront();
|
||||
SetupFreebieUI();
|
||||
}
|
||||
|
||||
public void SetupFreebieUI()
|
||||
{
|
||||
if(SaveSystem.CurrentSave.ShiftnetSubscription == 0)
|
||||
{
|
||||
btnjoinfreebie.Enabled = false;
|
||||
btnjoinfreebie.Text = "You are already subscribed to Freebie Solutions.";
|
||||
}
|
||||
else
|
||||
{
|
||||
btnjoinfreebie.Enabled = true;
|
||||
btnjoinfreebie.Text = "Join Freebie Solutions";
|
||||
}
|
||||
btnjoinfreebie.Left = (lbfreebiedesc.Left + lbfreebiedesc.Width) - btnjoinfreebie.Width;
|
||||
}
|
||||
|
||||
private void btnjoinfreebie_Click(object sender, EventArgs e)
|
||||
{
|
||||
Infobox.PromptYesNo("Switch providers", "Would you like to switch from your current Shiftnet provider, " + Applications.DownloadManager.GetAllSubscriptions()[SaveSystem.CurrentSave.ShiftnetSubscription].Name + ", to Freebie Solutions by ShiftSoft?", (res) =>
|
||||
{
|
||||
if(res == true)
|
||||
{
|
||||
SaveSystem.CurrentSave.ShiftnetSubscription = 0;
|
||||
Infobox.Show("Switch providers", "The operation has completed successfully.");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
130
ShiftOS.WinForms/ShiftnetSites/ShiftSoft.resx
Normal file
130
ShiftOS.WinForms/ShiftnetSites/ShiftSoft.resx
Normal file
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="lbdesc.Text" xml:space="preserve">
|
||||
<value>Welcome to ShiftSoft. We understand the troubles of being locked within a digital society. For some, it's a prison. For others, it's all they know. It's what life means for them.
|
||||
|
||||
But for us, it's a safe-haven. We may all be locked within an evolving operating system with no possibility of escaping, but we can at least develop ways of improving life within this binary world, and that's what we at ShiftSoft are doing.</value>
|
||||
</data>
|
||||
<data name="lbfreebiedesc.Text" xml:space="preserve">
|
||||
<value>The Shiftnet is a wonderful place full of apps, utilities, enhancements and much more for ShiftOS, but it comes at a cost.
|
||||
|
||||
Freebie Solutions takes that cost away. You get free Shiftnet usage, but are locked to sites listed on Ping and you are limited to 256 byte-per-second downloads. Perfect for those situations where Codepoints and shiftnet connectivity are a needed resource.</value>
|
||||
</data>
|
||||
</root>
|
89
ShiftOS.WinForms/ShiftnetSites/ShiftSoft_Ping.Designer.cs
generated
Normal file
89
ShiftOS.WinForms/ShiftnetSites/ShiftSoft_Ping.Designer.cs
generated
Normal file
|
@ -0,0 +1,89 @@
|
|||
namespace ShiftOS.WinForms.ShiftnetSites
|
||||
{
|
||||
partial class ShiftSoft_Ping
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.fllist = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.label1.Size = new System.Drawing.Size(48, 33);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Tag = "header2";
|
||||
this.label1.Text = "Ping";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label2.Location = new System.Drawing.Point(0, 33);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.label2.Size = new System.Drawing.Size(734, 56);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Ping is a simple service that lets you see all the sites on the shiftnet/ cluster" +
|
||||
". These sites are safe for you to use and do not contain malware or other threat" +
|
||||
"s.";
|
||||
//
|
||||
// fllist
|
||||
//
|
||||
this.fllist.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.fllist.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.fllist.Location = new System.Drawing.Point(0, 89);
|
||||
this.fllist.Name = "fllist";
|
||||
this.fllist.Size = new System.Drawing.Size(734, 389);
|
||||
this.fllist.TabIndex = 2;
|
||||
//
|
||||
// ShiftSoft_Ping
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.fllist);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "ShiftSoft_Ping";
|
||||
this.Size = new System.Drawing.Size(734, 478);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.FlowLayoutPanel fllist;
|
||||
}
|
||||
}
|
82
ShiftOS.WinForms/ShiftnetSites/ShiftSoft_Ping.cs
Normal file
82
ShiftOS.WinForms/ShiftnetSites/ShiftSoft_Ping.cs
Normal file
|
@ -0,0 +1,82 @@
|
|||
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;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using ShiftOS.Engine;
|
||||
using ShiftOS.WinForms.Tools;
|
||||
|
||||
namespace ShiftOS.WinForms.ShiftnetSites
|
||||
{
|
||||
[ShiftnetSite("shiftnet/shiftsoft/ping", "Ping", "A site listing hosted by ShiftSoft.")]
|
||||
public partial class ShiftSoft_Ping : UserControl, IShiftnetSite
|
||||
{
|
||||
public ShiftSoft_Ping()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public event Action GoBack;
|
||||
public event Action<string> GoToUrl;
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
ControlManager.SetupControls(this);
|
||||
SetupListing();
|
||||
}
|
||||
|
||||
public void SetupListing()
|
||||
{
|
||||
fllist.Controls.Clear();
|
||||
foreach (var type in Array.FindAll(ReflectMan.Types, t => t.GetInterfaces().Contains(typeof(IShiftnetSite))))
|
||||
{
|
||||
var attr = type.GetCustomAttributes(false).FirstOrDefault(x => x is ShiftnetSiteAttribute) as ShiftnetSiteAttribute;
|
||||
if (attr != null)
|
||||
{
|
||||
if (attr.Url.StartsWith("shiftnet/"))
|
||||
{
|
||||
var lnk = new LinkLabel();
|
||||
lnk.LinkColor = SkinEngine.LoadedSkin.ControlTextColor;
|
||||
lnk.Text = attr.Name;
|
||||
var desc = new Label();
|
||||
desc.AutoSize = true;
|
||||
lnk.AutoSize = true;
|
||||
desc.MaximumSize = new Size(this.Width / 3, 0);
|
||||
desc.Text = attr.Description;
|
||||
desc.Padding = new Padding
|
||||
{
|
||||
Bottom = 25,
|
||||
Top = 0,
|
||||
Left = 10,
|
||||
Right = 10
|
||||
};
|
||||
lnk.Click += (o, a) =>
|
||||
{
|
||||
GoToUrl?.Invoke(attr.Url);
|
||||
};
|
||||
fllist.Controls.Add(lnk);
|
||||
fllist.Controls.Add(desc);
|
||||
ControlManager.SetupControls(lnk);
|
||||
lnk.Show();
|
||||
desc.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
SetupListing();
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.WinForms/ShiftnetSites/ShiftSoft_Ping.resx
Normal file
120
ShiftOS.WinForms/ShiftnetSites/ShiftSoft_Ping.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -9,7 +9,6 @@ using ShiftOS.Objects.ShiftFS;
|
|||
|
||||
namespace ShiftOS.WinForms
|
||||
{
|
||||
[Namespace("skins")]
|
||||
public static class SkinCommands
|
||||
{
|
||||
[Command("reset")]
|
||||
|
|
90
ShiftOS.WinForms/StatusIcons/ShiftnetStatus.Designer.cs
generated
Normal file
90
ShiftOS.WinForms/StatusIcons/ShiftnetStatus.Designer.cs
generated
Normal file
|
@ -0,0 +1,90 @@
|
|||
namespace ShiftOS.WinForms.StatusIcons
|
||||
{
|
||||
partial class ShiftnetStatus
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.lbserviceprovider = new System.Windows.Forms.Label();
|
||||
this.lbstatus = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.label1.Size = new System.Drawing.Size(53, 23);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Tag = "header2";
|
||||
this.label1.Text = "Shiftnet";
|
||||
//
|
||||
// lbserviceprovider
|
||||
//
|
||||
this.lbserviceprovider.AutoSize = true;
|
||||
this.lbserviceprovider.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.lbserviceprovider.Location = new System.Drawing.Point(0, 23);
|
||||
this.lbserviceprovider.Name = "lbserviceprovider";
|
||||
this.lbserviceprovider.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.lbserviceprovider.Size = new System.Drawing.Size(98, 23);
|
||||
this.lbserviceprovider.TabIndex = 1;
|
||||
this.lbserviceprovider.Tag = "header3";
|
||||
this.lbserviceprovider.Text = "Freebie Solutions";
|
||||
//
|
||||
// lbstatus
|
||||
//
|
||||
this.lbstatus.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbstatus.Location = new System.Drawing.Point(0, 46);
|
||||
this.lbstatus.Name = "lbstatus";
|
||||
this.lbstatus.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.lbstatus.Size = new System.Drawing.Size(331, 144);
|
||||
this.lbstatus.TabIndex = 2;
|
||||
this.lbstatus.Text = "This will show the Shiftnet status.";
|
||||
//
|
||||
// ShiftnetStatus
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.lbstatus);
|
||||
this.Controls.Add(this.lbserviceprovider);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "ShiftnetStatus";
|
||||
this.Size = new System.Drawing.Size(331, 190);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label lbserviceprovider;
|
||||
private System.Windows.Forms.Label lbstatus;
|
||||
}
|
||||
}
|
33
ShiftOS.WinForms/StatusIcons/ShiftnetStatus.cs
Normal file
33
ShiftOS.WinForms/StatusIcons/ShiftnetStatus.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
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;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms.StatusIcons
|
||||
{
|
||||
[DefaultIcon("iconShiftnet")]
|
||||
[RequiresUpgrade("victortran_shiftnet")]
|
||||
public partial class ShiftnetStatus : UserControl, IStatusIcon
|
||||
{
|
||||
public ShiftnetStatus()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
var subscription = Applications.DownloadManager.GetAllSubscriptions()[SaveSystem.CurrentSave.ShiftnetSubscription];
|
||||
float kilobytes = (float)subscription.DownloadSpeed / 1024F;
|
||||
lbserviceprovider.Text = subscription.Name;
|
||||
lbstatus.Text = $@"Company: {subscription.Company}
|
||||
Download speed (KB/s): {kilobytes}";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.WinForms/StatusIcons/ShiftnetStatus.resx
Normal file
120
ShiftOS.WinForms/StatusIcons/ShiftnetStatus.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
60
ShiftOS.WinForms/StatusIcons/TestStatus.Designer.cs
generated
Normal file
60
ShiftOS.WinForms/StatusIcons/TestStatus.Designer.cs
generated
Normal file
|
@ -0,0 +1,60 @@
|
|||
namespace ShiftOS.WinForms.StatusIcons
|
||||
{
|
||||
partial class TestStatus
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(264, 52);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Tag = "header1";
|
||||
this.label1.Text = "This is a test.";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// TestStatus
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "TestStatus";
|
||||
this.Size = new System.Drawing.Size(264, 52);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
26
ShiftOS.WinForms/StatusIcons/TestStatus.cs
Normal file
26
ShiftOS.WinForms/StatusIcons/TestStatus.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
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;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms.StatusIcons
|
||||
{
|
||||
[DefaultIcon("iconShiftorium")]
|
||||
public partial class TestStatus : UserControl, IStatusIcon
|
||||
{
|
||||
public TestStatus()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.WinForms/StatusIcons/TestStatus.resx
Normal file
120
ShiftOS.WinForms/StatusIcons/TestStatus.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
59
ShiftOS.WinForms/StatusIcons/Volume.Designer.cs
generated
Normal file
59
ShiftOS.WinForms/StatusIcons/Volume.Designer.cs
generated
Normal file
|
@ -0,0 +1,59 @@
|
|||
namespace ShiftOS.WinForms.StatusIcons
|
||||
{
|
||||
partial class Volume
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.lbvolume = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lbvolume
|
||||
//
|
||||
this.lbvolume.AutoSize = true;
|
||||
this.lbvolume.Location = new System.Drawing.Point(4, 4);
|
||||
this.lbvolume.Name = "lbvolume";
|
||||
this.lbvolume.Size = new System.Drawing.Size(81, 13);
|
||||
this.lbvolume.TabIndex = 0;
|
||||
this.lbvolume.Text = "System volume:";
|
||||
//
|
||||
// Volume
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.lbvolume);
|
||||
this.Name = "Volume";
|
||||
this.Size = new System.Drawing.Size(444, 44);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lbvolume;
|
||||
}
|
||||
}
|
67
ShiftOS.WinForms/StatusIcons/Volume.cs
Normal file
67
ShiftOS.WinForms/StatusIcons/Volume.cs
Normal file
|
@ -0,0 +1,67 @@
|
|||
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;
|
||||
using ShiftOS.Engine;
|
||||
using ShiftOS.WinForms.Controls;
|
||||
|
||||
namespace ShiftOS.WinForms.StatusIcons
|
||||
{
|
||||
[DefaultIcon("iconSpeaker")]
|
||||
public partial class Volume : UserControl, IStatusIcon
|
||||
{
|
||||
public Volume()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
lbvolume.Top = (this.Height - lbvolume.Height) / 2;
|
||||
bool moving = false;
|
||||
var prg = new ShiftedProgressBar();
|
||||
prg.Tag = "ignoreal"; //Don't close AL or current widget when this control is clicked.
|
||||
this.Controls.Add(prg);
|
||||
prg.Height = this.Height / 3;
|
||||
prg.Maximum = 100;
|
||||
prg.Value = SaveSystem.CurrentSave.MusicVolume;
|
||||
prg.Width = this.Width - lbvolume.Width - 50;
|
||||
prg.Left = lbvolume.Left + lbvolume.Width + 15;
|
||||
prg.Top = (this.Height - prg.Height) / 2;
|
||||
prg.MouseDown += (o, a) =>
|
||||
{
|
||||
moving = true;
|
||||
};
|
||||
|
||||
prg.MouseMove += (o, a) =>
|
||||
{
|
||||
if (moving)
|
||||
{
|
||||
int val = (int)linear(a.X, 0, prg.Width, 0, 100);
|
||||
SaveSystem.CurrentSave.MusicVolume = val;
|
||||
prg.Value = val;
|
||||
}
|
||||
};
|
||||
|
||||
prg.MouseUp += (o, a) =>
|
||||
{
|
||||
moving = false;
|
||||
};
|
||||
prg.Show();
|
||||
}
|
||||
|
||||
static public double linear(double x, double x0, double x1, double y0, double y1)
|
||||
{
|
||||
if ((x1 - x0) == 0)
|
||||
{
|
||||
return (y0 + y1) / 2;
|
||||
}
|
||||
return y0 + (x - x0) * (y1 - y0) / (x1 - x0);
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.WinForms/StatusIcons/Volume.resx
Normal file
120
ShiftOS.WinForms/StatusIcons/Volume.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
99
ShiftOS.WinForms/Stories/DevXSkinningStory.cs
Normal file
99
ShiftOS.WinForms/Stories/DevXSkinningStory.cs
Normal file
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms.Stories
|
||||
{
|
||||
public class DevXSkinningStory
|
||||
{
|
||||
[Story("devx_1000_codepoints")]
|
||||
public static void DevX1000CPStory()
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
var t = new Applications.Terminal();
|
||||
AppearanceManager.SetupWindow(t);
|
||||
});
|
||||
TerminalBackend.InStory = true;
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
Thread.Sleep(3000);
|
||||
Engine.AudioManager.PlayStream(Properties.Resources._3beepvirus);
|
||||
Console.WriteLine("devx@anon_127420: Connection established.");
|
||||
Thread.Sleep(1500);
|
||||
Console.WriteLine("DevX: Hello, " + SaveSystem.CurrentUser.Username + "@" + SaveSystem.CurrentSave.SystemName + "! I see you've gotten a decent amount of Codepoints.");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("DevX: Have you gotten a chance to install my \"Shifter\" application yet?");
|
||||
Thread.Sleep(1500);
|
||||
if (!Shiftorium.UpgradeInstalled("shifter"))
|
||||
{
|
||||
Console.WriteLine("You: Not yet. What's it for?");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("DevX: The Shifter is a very effective way to make ShiftOS look however you want it to.");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("DevX: It can even be adapted to support other applications, features and upgrades.");
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("You: Yeah. Just seems kinda lackluster to me. What is it supposed to do?");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("DevX: The Shifter is a very effective way to make ShiftOS look however you want it to.");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("DevX: It can even be adapted to support other applications, features and upgrades.");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("DevX: I haven't finished it just yet. Keep upgrading it and you'll notice it gets a lot better.");
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
Console.WriteLine("DevX: I'd also recommend going for the Skin Loader, that way you can save your creations to the disk. Also, go for the Skinning upgrade - which will allow more rich customization of certain elements.");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("You: This still ain't gonna help me get back to my old system and out of this stupid Digital Society, is it?");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("DevX: How the...How do you know about the Digital Societ....Who the hell talked!?");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("You: Whoa! Just... calm down, will ya? I heard about it in the news, shortly before I got infected by this damn virus of an operating system.");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("DevX: Whatever. That doesn't matter yet. Just focus on upgrading ShiftOS and earning Codepoints. I'll let you know when we're done. I've gotta go...work on something else.");
|
||||
Thread.Sleep(1500);
|
||||
Console.WriteLine("User disconnected.");
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("You: Something doesn't seem right about DevX. I wonder what he's really up to.");
|
||||
|
||||
if (Shiftorium.UpgradeInstalled("shifter"))
|
||||
PushObjectives();
|
||||
else
|
||||
Story.PushObjective("Buy the Shifter.", "The Shifter is a super-effective way to earn more Codepoints. It is an essential buy if you haven't already bought it. Save up for the Shifter, and buy it using shiftorium.buy{upgrade:\"shifter\"}.", () =>
|
||||
{
|
||||
return Shiftorium.UpgradeInstalled("shifter");
|
||||
}, () =>
|
||||
{
|
||||
PushObjectives();
|
||||
});
|
||||
Story.Context.AutoComplete = false;
|
||||
TerminalBackend.InStory = false;
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
|
||||
public static void PushObjectives()
|
||||
{
|
||||
Story.PushObjective("Buy the Skinning upgrade", "The Skinning upgrade will allow you to set pictures in place of solid colors for most UI elements. If you want richer customization and more Codepoints, this upgrade is a necessity.", () =>
|
||||
{
|
||||
return Shiftorium.UpgradeInstalled("skinning");
|
||||
}, ()=>
|
||||
{
|
||||
Story.PushObjective("Buy the Skin Loader.", "The Skin Loader is an application that allows you to save and load .skn files containing Shifter skin data. These files can be loaded in to the Skin Loader and applied to the system to give ShiftOS a completely different feel. It's Shiftorium upgrade ID is \"skin_loader\".", () =>
|
||||
{
|
||||
return Shiftorium.UpgradeInstalled("skin_loader");
|
||||
},
|
||||
() =>
|
||||
{
|
||||
Story.Context.MarkComplete();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,8 +16,8 @@ namespace ShiftOS.WinForms.Stories
|
|||
[Story("victortran_shiftnet")]
|
||||
public static void ShiftnetStoryFeaturingTheBlueSmileyFaceHolyFuckThisFunctionNameIsLong()
|
||||
{
|
||||
CharacterName = "victor_tran";
|
||||
SysName = "theos";
|
||||
CharacterName = "aiden";
|
||||
SysName = "appscape_main";
|
||||
bool waiting = false;
|
||||
var installer = new Applications.Installer();
|
||||
installer.InstallCompleted += () =>
|
||||
|
@ -35,45 +35,107 @@ namespace ShiftOS.WinForms.Stories
|
|||
AppearanceManager.SetupWindow(term);
|
||||
}
|
||||
|
||||
var t = new Thread(() =>
|
||||
WriteLine("aiden@appscape_main - user connecting to your system.", false);
|
||||
Thread.Sleep(2000);
|
||||
WriteLine("Hello there! My name's Aiden Nirh.");
|
||||
WriteLine("I run a small Shiftnet website known simply as \"Appscape\".");
|
||||
WriteLine("Oh - wait... you don't know what the Shiftnet is...");
|
||||
WriteLine("Well, the Shiftnet is like... a private Internet, only accessible through ShiftOS.");
|
||||
WriteLine("It has many sites and companies on it - banks, software centres, service providers, you name it.");
|
||||
WriteLine("Appscape is one of them. I host many applications on Appscape, from games to utilities to productivity programs, and anything in between. If it exists as a ShiftOS program, it's either on the Shiftorium or Appscape.");
|
||||
WriteLine("I'm going to assume you're interested... and I'll install the Shiftnet just in case.");
|
||||
WriteLine("Beginning installation of Shiftnet...");
|
||||
//Set up an Installer.
|
||||
waiting = true;
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
WriteLine("victortran@theos - user connecting to your system.", false);
|
||||
Thread.Sleep(2000);
|
||||
WriteLine("Hey there - yes, I am not just a sentient being. I am indeed Victor Tran.");
|
||||
WriteLine("I am the creator of a Linux desktop environment called theShell.");
|
||||
WriteLine("I'm in the middle of working on a ShiftOS version of it.");
|
||||
WriteLine("However, before I start, I feel I need to show you something.");
|
||||
WriteLine("You have a lot of ShiftOS applications, and you can earn lots of Codepoints - and you already have lots.");
|
||||
WriteLine("Well, you'd be a perfect candidate for me to install the Shiftnet Client on your system.");
|
||||
WriteLine("I'll begin the installation right now.");
|
||||
//Set up an Installer.
|
||||
waiting = true;
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
Story.Start("installer");
|
||||
AppearanceManager.SetupWindow(installer);
|
||||
installer.InitiateInstall(new ShiftnetInstallation());
|
||||
});
|
||||
while (waiting == true)
|
||||
Thread.Sleep(25);
|
||||
SaveSystem.CurrentSave.StoriesExperienced.Add("installer");
|
||||
SaveSystem.CurrentSave.StoriesExperienced.Add("downloader");
|
||||
|
||||
WriteLine("All installed! Once I disconnect, type win.open to see a list of your new apps.");
|
||||
WriteLine("The Shiftnet is a vast network of websites only accessible through ShiftOS.");
|
||||
WriteLine("Think of it as the DarkNet, but much darker, and much more secretive.");
|
||||
WriteLine("There are lots of apps, games, skins and utilities on the Shiftnet.");
|
||||
WriteLine("There are also lots of companies offering many services.");
|
||||
WriteLine("I'd stay on the shiftnet/ cluster though, others may be dangerous.");
|
||||
WriteLine("I'd also stick to the sites listed on shiftnet/shiftsoft/ping - that site is regularly updated with the most safe Shiftnet sites.");
|
||||
WriteLine("Anyways, it was nice meeting you, hopefully someday you'll give theShell a try.");
|
||||
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
TerminalBackend.PrintPrompt();
|
||||
while (!Shiftorium.UpgradeInstalled("installer"))
|
||||
Thread.Sleep(20);
|
||||
AppearanceManager.SetupWindow(installer);
|
||||
installer.InitiateInstall(new ShiftnetInstallation());
|
||||
});
|
||||
t.IsBackground = true;
|
||||
t.Start();
|
||||
while (waiting == true)
|
||||
Thread.Sleep(25);
|
||||
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
WriteLine("All good to go! Once I disconnect, type win.open to see a list of your new apps.");
|
||||
WriteLine("I've installed everything you need, for free.");
|
||||
WriteLine("You've got the Downloader, a simple application to help you track Shiftnet file downloads...");
|
||||
WriteLine("...the Installer which will help you unpack programs from .stp files and install them to your system...");
|
||||
WriteLine("...and lastly, the Shiftnet browser itself. This program lets you browse the Shiftnet, much like you would the real Internet.");
|
||||
WriteLine("I'd stay on the shiftnet/ cluster though, because although there are many services on the Shiftnet, some of them may try to scam you into losing loads of Codepoints, or worse, wrecking your system with viruses.");
|
||||
WriteLine("If you want a nice list of safe Shiftnet services, head to ShiftSoft's \"Ping\" site, at shiftnet/shiftsoft/ping.");
|
||||
WriteLine("Oh, also, the Shiftnet, much like the real internet, is not free.");
|
||||
WriteLine("It requires a service provider. Service providers cost a fair amount of Codepoints, but if you want to get faster speeds and more reliable connections on the Shiftnet, finding a good service provider is a necessity.");
|
||||
WriteLine("Right now, you are on ShiftSoft's free trial plan, Freebie Solutions, which gives you access to the Shiftnet however you are locked at 256 bytes per second file downloads and can't leave the shiftnet/ cluster.");
|
||||
WriteLine("It's enough to get you started - you'll want to find a faster provider though..");
|
||||
WriteLine("Anyways, that's all I'll say for now. Have fun on the Shiftnet. I have to go work on something.");
|
||||
WriteLine("One of my friends'll contact you once you've gotten a new service provider.");
|
||||
|
||||
|
||||
|
||||
Story.Context.MarkComplete();
|
||||
Story.Start("aiden_shiftnet2");
|
||||
}
|
||||
|
||||
[Story("hacker101_breakingbonds_1")]
|
||||
public static void BreakingTheBondsIntro()
|
||||
{
|
||||
CharacterName = "hacker101";
|
||||
SysName = "pebcak";
|
||||
|
||||
if (!terminalOpen())
|
||||
{
|
||||
var term = new Applications.Terminal();
|
||||
AppearanceManager.SetupWindow(term);
|
||||
}
|
||||
|
||||
WriteLine("hacker101@pebcak - user connecting to your system.", false);
|
||||
Thread.Sleep(2000);
|
||||
WriteLine("Greetings, user.");
|
||||
WriteLine("My name is hacker101. I have a few things to show you.");
|
||||
WriteLine("Before I can do that, however, I need you to do a few things.");
|
||||
WriteLine("I'll assign what I need you to do as an objective. When you're done, I'll tell you what you need to know.");
|
||||
|
||||
Story.Context.MarkComplete();
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
|
||||
Story.PushObjective("Breaking the Bonds: Errand Boy", @"hacker101 has something he needs to show you, however before he can, you need to do the following:
|
||||
|
||||
- Buy ""TriWrite"" from Appscape
|
||||
- Buy ""Address Book"" from Appscape
|
||||
- Buy ""SimpleSRC"" from Appscape", () =>
|
||||
{
|
||||
bool flag1 = Shiftorium.UpgradeInstalled("address_book");
|
||||
bool flag2 = Shiftorium.UpgradeInstalled("triwrite");
|
||||
bool flag3 = Shiftorium.UpgradeInstalled("simplesrc");
|
||||
return flag1 && flag2 && flag3;
|
||||
}, () =>
|
||||
{
|
||||
Story.Context.MarkComplete();
|
||||
SaveSystem.SaveGame();
|
||||
Story.Start("hacker101_breakingbonds_2");
|
||||
});
|
||||
Story.Context.AutoComplete = false;
|
||||
}
|
||||
|
||||
[Story("aiden_shiftnet2")]
|
||||
public static void AidenShiftnet2()
|
||||
{
|
||||
Story.PushObjective("Register with a new Shiftnet service provider.", "You've just unlocked the Shiftnet, which has opened up a whole new world of applications and features for ShiftOS. Before you go nuts with it, you may want to register with a better service provider than Freebie Solutions.", () =>
|
||||
{
|
||||
return SaveSystem.CurrentSave.ShiftnetSubscription != 0;
|
||||
},
|
||||
() =>
|
||||
{
|
||||
Story.Context.MarkComplete();
|
||||
SaveSystem.SaveGame();
|
||||
TerminalBackend.PrintPrompt();
|
||||
Story.Start("hacker101_breakingbonds_1");
|
||||
});
|
||||
Story.Context.AutoComplete = false;
|
||||
}
|
||||
|
||||
private static void WriteLine(string text, bool showCharacterName=true)
|
||||
|
@ -84,15 +146,23 @@ namespace ShiftOS.WinForms.Stories
|
|||
ConsoleEx.Bold = true;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.DarkMagenta;
|
||||
Console.Write(CharacterName);
|
||||
ConsoleEx.OnFlush?.Invoke();
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
Console.Write("@");
|
||||
ConsoleEx.OnFlush?.Invoke();
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.Write(SysName + ": ");
|
||||
ConsoleEx.OnFlush?.Invoke();
|
||||
}
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
ConsoleEx.Bold = false;
|
||||
|
||||
Console.WriteLine(text);
|
||||
foreach(var c in text)
|
||||
{
|
||||
Console.Write(c);
|
||||
ConsoleEx.OnFlush?.Invoke();
|
||||
Thread.Sleep(5);
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
|
@ -300,7 +370,7 @@ namespace ShiftOS.WinForms.Stories
|
|||
SetProgress(i);
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
Story.Start("downloader");
|
||||
SaveSystem.CurrentSave.StoriesExperienced.Add("downloader");
|
||||
SetProgress(0);
|
||||
SetStatus("Dependencies installed.");
|
||||
Thread.Sleep(2000);
|
||||
|
|
|
@ -1,21 +1 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms
|
||||
{
|
||||
[Namespace("test")]
|
||||
public static class TestCommandsForUpgrades
|
||||
{
|
||||
[Command("simpletest")]
|
||||
public static bool Simple()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -137,10 +137,14 @@ namespace ShiftOS.WinForms.Tools
|
|||
/// <param name="ctrl">The control to center (this is an extension method - you can call it on a control as though it was a method in that control)</param>
|
||||
public static void CenterParent(this Control ctrl)
|
||||
{
|
||||
ctrl.Location = new Point(
|
||||
(ctrl.Parent.Width - ctrl.Width) / 2,
|
||||
(ctrl.Parent.Height - ctrl.Height) / 2
|
||||
);
|
||||
try
|
||||
{
|
||||
ctrl.Location = new Point(
|
||||
(ctrl.Parent.Width - ctrl.Width) / 2,
|
||||
(ctrl.Parent.Height - ctrl.Height) / 2
|
||||
);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void SetupControl(Control ctrl)
|
||||
|
@ -158,6 +162,15 @@ namespace ShiftOS.WinForms.Tools
|
|||
}
|
||||
catch { }
|
||||
|
||||
if (!tag.Contains("ignoreal"))
|
||||
{
|
||||
ctrl.Click += (o, a) =>
|
||||
{
|
||||
Desktop.HideAppLauncher();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
if (!tag.Contains("keepbg"))
|
||||
{
|
||||
if (ctrl.BackColor != Control.DefaultBackColor)
|
||||
|
@ -206,50 +219,53 @@ namespace ShiftOS.WinForms.Tools
|
|||
|
||||
if (ctrl is Button)
|
||||
{
|
||||
Button b = ctrl as Button;
|
||||
if (!tag.Contains("keepbg"))
|
||||
if (!tag.ToLower().Contains("nobuttonskin"))
|
||||
{
|
||||
b.BackColor = SkinEngine.LoadedSkin.ButtonBackgroundColor;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonidle");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle");
|
||||
Button b = ctrl as Button;
|
||||
if (!tag.Contains("keepbg"))
|
||||
{
|
||||
b.BackColor = SkinEngine.LoadedSkin.ButtonBackgroundColor;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonidle");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle");
|
||||
}
|
||||
b.FlatAppearance.BorderSize = SkinEngine.LoadedSkin.ButtonBorderWidth;
|
||||
if (!tag.Contains("keepfg"))
|
||||
{
|
||||
b.FlatAppearance.BorderColor = SkinEngine.LoadedSkin.ButtonForegroundColor;
|
||||
b.ForeColor = SkinEngine.LoadedSkin.ButtonForegroundColor;
|
||||
}
|
||||
if (!tag.Contains("keepfont"))
|
||||
b.Font = SkinEngine.LoadedSkin.ButtonTextFont;
|
||||
|
||||
Color orig_bg = b.BackColor;
|
||||
|
||||
b.MouseEnter += (o, a) =>
|
||||
{
|
||||
b.BackColor = SkinEngine.LoadedSkin.ButtonHoverColor;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonhover");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonhover");
|
||||
};
|
||||
b.MouseLeave += (o, a) =>
|
||||
{
|
||||
b.BackColor = orig_bg;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonidle");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle");
|
||||
};
|
||||
b.MouseUp += (o, a) =>
|
||||
{
|
||||
b.BackColor = orig_bg;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonidle");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle");
|
||||
};
|
||||
|
||||
b.MouseDown += (o, a) =>
|
||||
{
|
||||
b.BackColor = SkinEngine.LoadedSkin.ButtonPressedColor;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonpressed");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonpressed");
|
||||
|
||||
};
|
||||
}
|
||||
b.FlatAppearance.BorderSize = SkinEngine.LoadedSkin.ButtonBorderWidth;
|
||||
if (!tag.Contains("keepfg"))
|
||||
{
|
||||
b.FlatAppearance.BorderColor = SkinEngine.LoadedSkin.ButtonForegroundColor;
|
||||
b.ForeColor = SkinEngine.LoadedSkin.ButtonForegroundColor;
|
||||
}
|
||||
if (!tag.Contains("keepfont"))
|
||||
b.Font = SkinEngine.LoadedSkin.ButtonTextFont;
|
||||
|
||||
Color orig_bg = b.BackColor;
|
||||
|
||||
b.MouseEnter += (o, a) =>
|
||||
{
|
||||
b.BackColor = SkinEngine.LoadedSkin.ButtonHoverColor;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonhover");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonhover");
|
||||
};
|
||||
b.MouseLeave += (o, a) =>
|
||||
{
|
||||
b.BackColor = orig_bg;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonidle");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle");
|
||||
};
|
||||
b.MouseUp += (o, a) =>
|
||||
{
|
||||
b.BackColor = orig_bg;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonidle");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle");
|
||||
};
|
||||
|
||||
b.MouseDown += (o, a) =>
|
||||
{
|
||||
b.BackColor = SkinEngine.LoadedSkin.ButtonPressedColor;
|
||||
b.BackgroundImage = SkinEngine.GetImage("buttonpressed");
|
||||
b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonpressed");
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,6 +295,8 @@ namespace ShiftOS.WinForms.Tools
|
|||
{
|
||||
(ctrl as WindowBorder).Setup();
|
||||
}
|
||||
|
||||
|
||||
MakeDoubleBuffered(ctrl);
|
||||
ControlSetup?.Invoke(ctrl);
|
||||
});
|
||||
|
@ -305,10 +323,6 @@ namespace ShiftOS.WinForms.Tools
|
|||
|
||||
public static void SetupControls(Control frm, bool runInThread = true)
|
||||
{
|
||||
frm.Click += (o, a) =>
|
||||
{
|
||||
Desktop.HideAppLauncher();
|
||||
};
|
||||
var ctrls = frm.Controls.ToList();
|
||||
for (int i = 0; i < ctrls.Count(); i++)
|
||||
{
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#define TRAILER
|
||||
#if TRAILER
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms
|
||||
{
|
||||
[Namespace("trailer")]
|
||||
public static class TrailerCommands
|
||||
{
|
||||
[Command("init")]
|
||||
public static bool TrailerInit()
|
||||
{
|
||||
var oobe = new Oobe();
|
||||
oobe.StartTrailer();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
147
ShiftOS.WinForms/UniteSignupDialog.Designer.cs
generated
147
ShiftOS.WinForms/UniteSignupDialog.Designer.cs
generated
|
@ -28,165 +28,83 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UniteSignupDialog));
|
||||
this.btnlogin = new System.Windows.Forms.Button();
|
||||
this.txtpassword = new System.Windows.Forms.TextBox();
|
||||
this.txtusername = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtconfirm = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtdisplay = new System.Windows.Forms.TextBox();
|
||||
this.txtsys = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtsysname = new System.Windows.Forms.TextBox();
|
||||
this.txtroot = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnlogin
|
||||
//
|
||||
this.btnlogin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnlogin.Location = new System.Drawing.Point(462, 479);
|
||||
this.btnlogin.Location = new System.Drawing.Point(462, 168);
|
||||
this.btnlogin.Name = "btnlogin";
|
||||
this.btnlogin.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnlogin.TabIndex = 11;
|
||||
this.btnlogin.Text = "Submit";
|
||||
this.btnlogin.Text = "{UI_SUBMIT}";
|
||||
this.btnlogin.UseVisualStyleBackColor = true;
|
||||
this.btnlogin.Click += new System.EventHandler(this.btnlogin_Click);
|
||||
//
|
||||
// txtpassword
|
||||
//
|
||||
this.txtpassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtpassword.Location = new System.Drawing.Point(113, 133);
|
||||
this.txtpassword.Name = "txtpassword";
|
||||
this.txtpassword.Size = new System.Drawing.Size(424, 20);
|
||||
this.txtpassword.TabIndex = 10;
|
||||
this.txtpassword.UseSystemPasswordChar = true;
|
||||
//
|
||||
// txtusername
|
||||
//
|
||||
this.txtusername.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtusername.Location = new System.Drawing.Point(113, 100);
|
||||
this.txtusername.Name = "txtusername";
|
||||
this.txtusername.Size = new System.Drawing.Size(424, 20);
|
||||
this.txtusername.TabIndex = 9;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(17, 136);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(56, 13);
|
||||
this.label3.TabIndex = 8;
|
||||
this.label3.Text = "Password:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(17, 103);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(76, 13);
|
||||
this.label2.TabIndex = 7;
|
||||
this.label2.Text = "Email Address:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(17, 36);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(120, 13);
|
||||
this.label1.Size = new System.Drawing.Size(169, 13);
|
||||
this.label1.TabIndex = 6;
|
||||
this.label1.Tag = "header2";
|
||||
this.label1.Text = "Create ShiftOS Account";
|
||||
this.label1.Text = "{INIT_SYSTEM_PREPARATION}";
|
||||
//
|
||||
// txtconfirm
|
||||
// txtsys
|
||||
//
|
||||
this.txtconfirm.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.txtsys.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtconfirm.Location = new System.Drawing.Point(113, 159);
|
||||
this.txtconfirm.Name = "txtconfirm";
|
||||
this.txtconfirm.Size = new System.Drawing.Size(424, 20);
|
||||
this.txtconfirm.TabIndex = 13;
|
||||
this.txtconfirm.UseSystemPasswordChar = true;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(17, 162);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(45, 13);
|
||||
this.label4.TabIndex = 12;
|
||||
this.label4.Text = "Confirm:";
|
||||
//
|
||||
// txtdisplay
|
||||
//
|
||||
this.txtdisplay.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtdisplay.Location = new System.Drawing.Point(113, 197);
|
||||
this.txtdisplay.Name = "txtdisplay";
|
||||
this.txtdisplay.Size = new System.Drawing.Size(424, 20);
|
||||
this.txtdisplay.TabIndex = 15;
|
||||
this.txtsys.Location = new System.Drawing.Point(113, 100);
|
||||
this.txtsys.Name = "txtsys";
|
||||
this.txtsys.Size = new System.Drawing.Size(424, 20);
|
||||
this.txtsys.TabIndex = 15;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(17, 200);
|
||||
this.label5.Location = new System.Drawing.Point(17, 103);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(73, 13);
|
||||
this.label5.Size = new System.Drawing.Size(116, 13);
|
||||
this.label5.TabIndex = 14;
|
||||
this.label5.Text = "Display name:";
|
||||
this.label5.Text = "{SE_SYSTEM_NAME}";
|
||||
//
|
||||
// label6
|
||||
// txtroot
|
||||
//
|
||||
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
this.txtroot.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label6.Location = new System.Drawing.Point(20, 267);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(517, 209);
|
||||
this.label6.TabIndex = 16;
|
||||
this.label6.Text = resources.GetString("label6.Text");
|
||||
//
|
||||
// txtsysname
|
||||
//
|
||||
this.txtsysname.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtsysname.Location = new System.Drawing.Point(113, 223);
|
||||
this.txtsysname.Name = "txtsysname";
|
||||
this.txtsysname.Size = new System.Drawing.Size(424, 20);
|
||||
this.txtsysname.TabIndex = 18;
|
||||
this.txtroot.Location = new System.Drawing.Point(113, 126);
|
||||
this.txtroot.Name = "txtroot";
|
||||
this.txtroot.Size = new System.Drawing.Size(424, 20);
|
||||
this.txtroot.TabIndex = 18;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(17, 226);
|
||||
this.label7.Location = new System.Drawing.Point(17, 129);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(73, 13);
|
||||
this.label7.Size = new System.Drawing.Size(135, 13);
|
||||
this.label7.TabIndex = 17;
|
||||
this.label7.Text = "System name:";
|
||||
this.label7.Text = "{SE_ROOT_PASSWORD}";
|
||||
//
|
||||
// UniteSignupDialog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.txtsysname);
|
||||
this.Controls.Add(this.txtroot);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.txtdisplay);
|
||||
this.Controls.Add(this.txtsys);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.txtconfirm);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.btnlogin);
|
||||
this.Controls.Add(this.txtpassword);
|
||||
this.Controls.Add(this.txtusername);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "UniteSignupDialog";
|
||||
this.Size = new System.Drawing.Size(555, 519);
|
||||
this.Size = new System.Drawing.Size(555, 208);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -195,17 +113,10 @@
|
|||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnlogin;
|
||||
private System.Windows.Forms.TextBox txtpassword;
|
||||
private System.Windows.Forms.TextBox txtusername;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtconfirm;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox txtdisplay;
|
||||
private System.Windows.Forms.TextBox txtsys;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox txtsysname;
|
||||
private System.Windows.Forms.TextBox txtroot;
|
||||
private System.Windows.Forms.Label label7;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,13 +16,19 @@ namespace ShiftOS.WinForms
|
|||
{
|
||||
public partial class UniteSignupDialog : UserControl, IShiftOSWindow
|
||||
{
|
||||
public UniteSignupDialog(Action<string> callback)
|
||||
public class SignupCredentials
|
||||
{
|
||||
public string SystemName { get; set; }
|
||||
public string RootPassword { get; set; }
|
||||
}
|
||||
|
||||
public UniteSignupDialog(Action<SignupCredentials> callback)
|
||||
{
|
||||
InitializeComponent();
|
||||
Callback = callback;
|
||||
}
|
||||
|
||||
private Action<string> Callback { get; set; }
|
||||
private Action<SignupCredentials> Callback { get; set; }
|
||||
|
||||
|
||||
public void OnLoad()
|
||||
|
@ -45,92 +51,25 @@ namespace ShiftOS.WinForms
|
|||
|
||||
private void btnlogin_Click(object sender, EventArgs e)
|
||||
{
|
||||
string u = txtusername.Text;
|
||||
string p = txtpassword.Text;
|
||||
string sys = txtsys.Text;
|
||||
string root = txtroot.Text;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(u))
|
||||
if (string.IsNullOrWhiteSpace(sys))
|
||||
{
|
||||
Infobox.Show("Please enter a username.", "You must enter a proper email address.");
|
||||
Infobox.Show("{TITLE_EMPTY_SYSNAME}", "{MSG_EMPTY_SYSNAME}");
|
||||
return;
|
||||
}
|
||||
if(sys.Length < 5)
|
||||
{
|
||||
Infobox.Show("{TITLE_VALIDATION_ERROR}", "{MSG_VALIDATION_ERROR_SYSNAME_LENGTH}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(p))
|
||||
Callback?.Invoke(new SignupCredentials
|
||||
{
|
||||
Infobox.Show("Please enter a password.", "You must enter a valid password.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(p != txtconfirm.Text)
|
||||
{
|
||||
Infobox.Show("Passwords don't match.", "The \"Password\" and \"Confirm\" boxes must match.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(txtdisplay.Text))
|
||||
{
|
||||
Infobox.Show("Empty display name", "Please choose a proper display name.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(txtsysname.Text))
|
||||
{
|
||||
Infobox.Show("Empty system name", "Please name your computer!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(p.Length < 7)
|
||||
{
|
||||
Infobox.Show("Password error", "Your password must have at least 7 characters.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(p.Any(char.IsUpper) &&
|
||||
p.Any(char.IsLower) &&
|
||||
p.Any(char.IsDigit)))
|
||||
{
|
||||
Infobox.Show("Password error", "Your password must contain at least one uppercase, lowercase, digit and symbol character.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!u.Contains("@"))
|
||||
{
|
||||
Infobox.Show("Valid email required.", "You must specify a valid email address.");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var webrequest = HttpWebRequest.Create(UserConfig.Get().UniteUrl + "/Auth/Register?appname=ShiftOS&appdesc=ShiftOS+client&version=1_0_beta_2_4&displayname=" + txtdisplay.Text + "&sysname=" + txtsysname.Text);
|
||||
string base64 = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{u}:{p}"));
|
||||
webrequest.Headers.Add("Authentication: Basic " + base64);
|
||||
var response = webrequest.GetResponse();
|
||||
var str = response.GetResponseStream();
|
||||
var reader = new System.IO.StreamReader(str);
|
||||
string result = reader.ReadToEnd();
|
||||
if (result.StartsWith("{"))
|
||||
{
|
||||
var exc = JsonConvert.DeserializeObject<Exception>(result);
|
||||
Infobox.Show("Error", exc.Message);
|
||||
return;
|
||||
}
|
||||
reader.Close();
|
||||
str.Close();
|
||||
str.Dispose();
|
||||
response.Dispose();
|
||||
Callback?.Invoke(result);
|
||||
AppearanceManager.Close(this);
|
||||
}
|
||||
#if DEBUG
|
||||
catch (Exception ex)
|
||||
{
|
||||
Infobox.Show("Error", ex.ToString());
|
||||
}
|
||||
#else
|
||||
catch
|
||||
{
|
||||
Infobox.Show("Login failed.", "The login attempt failed due to an incorrect username and password pair.");
|
||||
}
|
||||
#endif
|
||||
SystemName = sys,
|
||||
RootPassword = root
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,15 +117,4 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Your ShiftOS Account is your gateway to the world of ShiftOS.
|
||||
|
||||
What does this account do for you?
|
||||
|
||||
- It holds all your Codepoints, Shiftorium Upgrades, and other in-game save details in a secure spot.
|
||||
- It gives you access to the ShiftOS Forums, Wiki, Developer Blog and the bugtracker.
|
||||
- It gives you your own personal profile that you can shift your own way - just like you can ShiftOS.
|
||||
|
||||
You can customize more information for this account at http://getshiftos.ml/, but first, we must create it.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -16,36 +16,12 @@ namespace ShiftOS.WinForms
|
|||
{
|
||||
public static Dictionary<DesktopWidgetAttribute, Type> GetAllWidgetTypes()
|
||||
{
|
||||
Dictionary<DesktopWidgetAttribute, Type> types = new Dictionary<WinForms.DesktopWidgetAttribute, Type>();
|
||||
foreach(var exe in System.IO.Directory.GetFiles(Environment.CurrentDirectory))
|
||||
{
|
||||
if(exe.EndsWith(".exe") || exe.EndsWith(".dll"))
|
||||
{
|
||||
try
|
||||
{
|
||||
var asm = Assembly.LoadFile(exe);
|
||||
foreach(var type in asm.GetTypes())
|
||||
{
|
||||
if (type.GetInterfaces().Contains(typeof(IDesktopWidget)))
|
||||
{
|
||||
if (Shiftorium.UpgradeAttributesUnlocked(type))
|
||||
{
|
||||
foreach (var attrib in type.GetCustomAttributes(false))
|
||||
{
|
||||
if (attrib is DesktopWidgetAttribute)
|
||||
{
|
||||
var dw = attrib as DesktopWidgetAttribute;
|
||||
types.Add(dw, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
return types;
|
||||
var ret = new Dictionary<DesktopWidgetAttribute, Type>();
|
||||
var types = Array.FindAll(ReflectMan.Types, t => t.GetInterfaces().Contains(typeof(IDesktopWidget)) && Shiftorium.UpgradeAttributesUnlocked(t));
|
||||
foreach (var type in types)
|
||||
foreach (var attrib in Array.FindAll(type.GetCustomAttributes(false), a => a is DesktopWidgetAttribute))
|
||||
ret.Add(attrib as DesktopWidgetAttribute, type);
|
||||
return ret;
|
||||
}
|
||||
|
||||
internal static void SaveDetails(Type type, WidgetDetails location)
|
||||
|
|
29
ShiftOS.WinForms/WinformsDesktop.Designer.cs
generated
29
ShiftOS.WinForms/WinformsDesktop.Designer.cs
generated
|
@ -55,6 +55,7 @@ namespace ShiftOS.WinForms
|
|||
this.desktoppanel = new System.Windows.Forms.Panel();
|
||||
this.pnlnotifications = new System.Windows.Forms.Panel();
|
||||
this.flnotifications = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.ntconnectionstatus = new System.Windows.Forms.PictureBox();
|
||||
this.lbtime = new System.Windows.Forms.Label();
|
||||
this.panelbuttonholder = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.sysmenuholder = new System.Windows.Forms.Panel();
|
||||
|
@ -63,7 +64,6 @@ namespace ShiftOS.WinForms
|
|||
this.pnlscreensaver = new System.Windows.Forms.Panel();
|
||||
this.pnlssicon = new System.Windows.Forms.Panel();
|
||||
this.pnlwidgetlayer = new System.Windows.Forms.Panel();
|
||||
this.ntconnectionstatus = new System.Windows.Forms.PictureBox();
|
||||
this.pnlnotificationbox = new System.Windows.Forms.Panel();
|
||||
this.lbnotemsg = new System.Windows.Forms.Label();
|
||||
this.lbnotetitle = new System.Windows.Forms.Label();
|
||||
|
@ -77,10 +77,10 @@ namespace ShiftOS.WinForms
|
|||
this.desktoppanel.SuspendLayout();
|
||||
this.pnlnotifications.SuspendLayout();
|
||||
this.flnotifications.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ntconnectionstatus)).BeginInit();
|
||||
this.sysmenuholder.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.pnlscreensaver.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ntconnectionstatus)).BeginInit();
|
||||
this.pnlnotificationbox.SuspendLayout();
|
||||
this.pnladvancedal.SuspendLayout();
|
||||
this.pnlalsystemactions.SuspendLayout();
|
||||
|
@ -121,6 +121,18 @@ namespace ShiftOS.WinForms
|
|||
this.flnotifications.Name = "flnotifications";
|
||||
this.flnotifications.Size = new System.Drawing.Size(22, 24);
|
||||
this.flnotifications.TabIndex = 1;
|
||||
this.flnotifications.WrapContents = false;
|
||||
//
|
||||
// ntconnectionstatus
|
||||
//
|
||||
this.ntconnectionstatus.Image = global::ShiftOS.WinForms.Properties.Resources.notestate_connection_full;
|
||||
this.ntconnectionstatus.Location = new System.Drawing.Point(3, 3);
|
||||
this.ntconnectionstatus.Name = "ntconnectionstatus";
|
||||
this.ntconnectionstatus.Size = new System.Drawing.Size(16, 16);
|
||||
this.ntconnectionstatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.ntconnectionstatus.TabIndex = 0;
|
||||
this.ntconnectionstatus.TabStop = false;
|
||||
this.ntconnectionstatus.Tag = "digitalsociety";
|
||||
//
|
||||
// lbtime
|
||||
//
|
||||
|
@ -200,17 +212,6 @@ namespace ShiftOS.WinForms
|
|||
this.pnlwidgetlayer.Size = new System.Drawing.Size(1296, 714);
|
||||
this.pnlwidgetlayer.TabIndex = 1;
|
||||
//
|
||||
// ntconnectionstatus
|
||||
//
|
||||
this.ntconnectionstatus.Image = global::ShiftOS.WinForms.Properties.Resources.notestate_connection_full;
|
||||
this.ntconnectionstatus.Location = new System.Drawing.Point(3, 3);
|
||||
this.ntconnectionstatus.Name = "ntconnectionstatus";
|
||||
this.ntconnectionstatus.Size = new System.Drawing.Size(16, 16);
|
||||
this.ntconnectionstatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.ntconnectionstatus.TabIndex = 0;
|
||||
this.ntconnectionstatus.TabStop = false;
|
||||
this.ntconnectionstatus.Tag = "digitalsociety";
|
||||
//
|
||||
// pnlnotificationbox
|
||||
//
|
||||
this.pnlnotificationbox.AutoSize = true;
|
||||
|
@ -341,12 +342,12 @@ namespace ShiftOS.WinForms
|
|||
this.pnlnotifications.PerformLayout();
|
||||
this.flnotifications.ResumeLayout(false);
|
||||
this.flnotifications.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ntconnectionstatus)).EndInit();
|
||||
this.sysmenuholder.ResumeLayout(false);
|
||||
this.sysmenuholder.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.pnlscreensaver.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.ntconnectionstatus)).EndInit();
|
||||
this.pnlnotificationbox.ResumeLayout(false);
|
||||
this.pnlnotificationbox.PerformLayout();
|
||||
this.pnladvancedal.ResumeLayout(false);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue