0.1.1 Release Candidate 1

Committing all code for 0.1.1 Release Candidate 1.
This commit is contained in:
MichaelTheShifter 2016-05-24 20:27:25 -04:00
parent 95a1f2e4ae
commit b6bc4fd3de
39 changed files with 2726 additions and 405 deletions

View file

@ -353,64 +353,15 @@ namespace ShiftOS
} }
} }
var story_rnd = new Random(); var story_rnd = new Random();
int story_chance = story_rnd.Next(0, 100); int story_chance = story_rnd.Next(0, 3);
switch (story_chance) switch (story_chance) {
{ case 2:
case 4: if(API.Upgrades["holochat"] == false)
if (API.Upgrades["otherplayerstory"] == false)
{ {
var t = new Terminal(); var t = new Terminal();
API.CreateForm(t, LoadedNames.TerminalName, Properties.Resources.iconTerminal); API.CreateForm(t, API.LoadedNames.TerminalName, API.GetIcon("Terminal"));
t.StartOtherPlayerStory();
}
break;
case 25:
if (API.Upgrades["devxfurious"] == false)
{
var t = new Terminal();
API.CreateForm(t, LoadedNames.TerminalName, Properties.Resources.iconTerminal);
t.StartDevXFuriousStory(); t.StartDevXFuriousStory();
} t.BringToFront();
break;
case 30:
if (API.Upgrades["aidennirh"] == false)
{
var t = new Terminal();
API.CreateForm(t, LoadedNames.TerminalName, Properties.Resources.iconTerminal);
t.StartAidenNirhStory();
}
break;
case 75:
if (API.Upgrades["hacker101"] == false)
{
var t = new Terminal();
API.CreateForm(t, LoadedNames.TerminalName, Properties.Resources.iconTerminal);
t.StartHacker101Story();
}
break;
//case 1000:
// t.StartJonathanLadouceurStory();
// break;
//Do you honestly think HE would appear in ShiftOS? Yugh. NO.
default:
if (API.Upgrades["devxfurious"] == true)
{
if (API.Upgrades["otherplayerrescue"] == false)
{
var t = new Terminal();
t.StartOtherPlayerSysFix();
CreateForm(t, LoadedNames.TerminalName, Properties.Resources.iconTerminal);
}
else
{
if (API.Upgrades["midgamebridge"] == false)
{
/*var t = new Terminal();
t.StartBridgeToMidGame();
CreateForm(t, LoadedNames.TerminalName, Properties.Resources.iconTerminal);*/
}
}
} }
break; break;
} }
@ -687,6 +638,7 @@ namespace ShiftOS
AppLauncherItems.Add(new ApplauncherItem(LoadedNames.FileSkimmerName, GetIcon("FileSkimmer"), "open_program('file_skimmer')", Upgrades["alfileskimmer"])); AppLauncherItems.Add(new ApplauncherItem(LoadedNames.FileSkimmerName, GetIcon("FileSkimmer"), "open_program('file_skimmer')", Upgrades["alfileskimmer"]));
if (!LimitedMode) if (!LimitedMode)
{ {
AppLauncherItems.Add(new ApplauncherItem("Network Browser", GetIcon("NetworkBrowser"), "open_program('netbrowse')", Upgrades["networkbrowser"]));
AppLauncherItems.Add(new ApplauncherItem(LoadedNames.SkinLoaderName, GetIcon("SkinLoader"), "open_program('skinloader')", Upgrades["skinning"])); AppLauncherItems.Add(new ApplauncherItem(LoadedNames.SkinLoaderName, GetIcon("SkinLoader"), "open_program('skinloader')", Upgrades["skinning"]));
AppLauncherItems.Add(new ApplauncherItem(LoadedNames.ShiftoriumName, GetIcon("Shiftorium"), "open_program('shiftorium')", Upgrades["alshiftorium"])); AppLauncherItems.Add(new ApplauncherItem(LoadedNames.ShiftoriumName, GetIcon("Shiftorium"), "open_program('shiftorium')", Upgrades["alshiftorium"]));
} }
@ -1713,6 +1665,16 @@ namespace ShiftOS
bool succeeded = true; bool succeeded = true;
switch (cmd) switch (cmd)
{ {
case "netbrowse":
if(Upgrades["networkbrowser"])
{
CreateForm(new NetworkBrowser(), "Network Browser", GetIcon("NetworkBrowser"));
}
else
{
succeeded = false;
}
break;
case "quests": case "quests":
if(LimitedMode) if(LimitedMode)
{ {

View file

@ -12,6 +12,8 @@ namespace ShiftOS
{ {
public partial class Computer : UserControl public partial class Computer : UserControl
{ {
public int TotalHP = 100;
public Computer() public Computer()
{ {
InitializeComponent(); InitializeComponent();
@ -318,6 +320,16 @@ namespace ShiftOS
if (this.HP > 0) if (this.HP > 0)
{ {
lbstats.Text = $"HP: {_HP}"; lbstats.Text = $"HP: {_HP}";
if(!Enemy)
{
foreach(var m in Hacking.MyNetwork)
{
if(m.Hostname == Hostname)
{
m.HP = _HP;
}
}
}
switch (Type) switch (Type)
{ {
case SystemType.Core: case SystemType.Core:
@ -369,8 +381,24 @@ namespace ShiftOS
{ {
if (API.Upgrades["limitlesscustomshades"] == true) if (API.Upgrades["limitlesscustomshades"] == true)
{ {
int mod = _HP % 255; if(_HP > TotalHP / 2)
this.BackColor = Color.FromArgb(255, mod, mod); {
this.BackColor = Color.Green;
lbstats.ForeColor = Color.Black;
}
else
{
if(_HP > TotalHP / 3)
{
this.BackColor = Color.Orange;
lbstats.ForeColor = Color.Black;
}
else
{
this.BackColor = Color.Red;
lbstats.ForeColor = Color.White;
}
}
} }
if (Enemy == true) if (Enemy == true)
{ {

View file

@ -128,6 +128,7 @@ namespace ShiftOS
/// </summary> /// </summary>
public File_Skimmer() public File_Skimmer()
{ {
MountMgr.Init();
InitializeComponent(); InitializeComponent();
} }
@ -176,13 +177,28 @@ namespace ShiftOS
{ {
if (lbcurrentfolder.Text != "/") if (lbcurrentfolder.Text != "/")
{ {
CurrentFolder = Directory.GetParent(CurrentFolder).FullName; if (lbcurrentfolder.Text == MountPoint.Replace("\\", "/"))
ListFiles(); {
CurrentFolder = Paths.SaveRoot;
ListFiles();
}
else
{
CurrentFolder = Directory.GetParent(CurrentFolder).FullName;
ListFiles();
}
} else } else
{ {
API.CreateInfoboxSession("Can't read directory", "File Skimmer is not able to read the requested directory as it is not formatted with the ShiftFS file system.", infobox.InfoboxMode.Info); API.CreateInfoboxSession("Can't read directory", "File Skimmer is not able to read the requested directory as it is not formatted with the ShiftFS file system.", infobox.InfoboxMode.Info);
} }
} }
else if(tag.StartsWith("drv:"))
{
string drivepath = tag.Remove(0, 4);
CurrentFolder = drivepath;
MountPoint = drivepath;
ListFiles();
}
} }
} }
} }
@ -198,11 +214,14 @@ namespace ShiftOS
}; };
} }
string MountPoint = null;
/// <summary> /// <summary>
/// Lists all the files in the current folder. /// Lists all the files in the current folder.
/// </summary> /// </summary>
public void ListFiles() public void ListFiles()
{ {
MountMgr.Init();
SetupImages(); SetupImages();
txtfilename.Text = ""; txtfilename.Text = "";
//SetupUI(); //SetupUI();
@ -223,6 +242,18 @@ namespace ShiftOS
upone.Tag = "_uponedir"; upone.Tag = "_uponedir";
upone.ImageKey = "directory"; upone.ImageKey = "directory";
lvfiles.Items.Add(upone); lvfiles.Items.Add(upone);
if(CurrentFolder == Paths.SaveRoot)
{
foreach(var drive in MountMgr.links)
{
var dinf = new DirectoryInfo(drive.Key);
var item = new ListViewItem();
item.Text = drive.Value;
item.Tag = "drv:" + dinf.FullName;
lvfiles.Items.Add(item);
item.ImageKey = "directory";
}
}
foreach (string dir in Directory.GetDirectories(CurrentFolder)) foreach (string dir in Directory.GetDirectories(CurrentFolder))
{ {
var dirinf = new DirectoryInfo(dir); var dirinf = new DirectoryInfo(dir);

View file

@ -151,11 +151,13 @@ namespace ShiftOS
if (UserRequestedClose == false) if (UserRequestedClose == false)
{ {
tmrplayerhealthdetect.Stop(); tmrplayerhealthdetect.Stop();
foreach (var pc in AllPlayerComputers)
{
pc.HP = 0;
}
} }
else
{
e.Cancel = true;
API.CreateInfoboxSession("Can't retreat now.", "You started this battle, and made it this far. Finish what you started. Don't run away.", infobox.InfoboxMode.Info);
}
Hacking.RepairTimer.Start(); //Now the player can repair.
} }
public Computer SelectedPlayerComputer = null; public Computer SelectedPlayerComputer = null;
@ -450,8 +452,11 @@ namespace ShiftOS
} }
if (m == null) if (m == null)
{ {
cmbmodules.Items.Add(item.Hostname); if (item.HP > 0)
FutureModules.Add(item.Hostname, item.Type); {
cmbmodules.Items.Add(item.Hostname);
FutureModules.Add(item.Hostname, item.Type);
}
} }
} }
@ -703,7 +708,9 @@ namespace ShiftOS
} }
if (cont2 == true) if (cont2 == true)
{ {
GetMyNet().Add(new Module(mod.Type, Convert.ToInt32(txtgrade.Text), hname)); var newModule = new Module(mod.Type, Convert.ToInt32(txtgrade.Text), hname);
newModule.HP = newModule.GetTotalHP();
GetMyNet().Add(newModule);
API.RemoveCodepoints(mod.Cost); API.RemoveCodepoints(mod.Cost);
API.CreateInfoboxSession("Module added.", "To deploy the module to the network, select 'Add Module' and choose the hostname from the menu.", infobox.InfoboxMode.Info); API.CreateInfoboxSession("Module added.", "To deploy the module to the network, select 'Add Module' and choose the hostname from the menu.", infobox.InfoboxMode.Info);
pnlbuy.Hide(); pnlbuy.Hide();
@ -945,6 +952,7 @@ namespace ShiftOS
private void HackUI_Load(object sender, EventArgs e) private void HackUI_Load(object sender, EventArgs e)
{ {
Hacking.RepairTimer.Stop(); //Don't want the player to be able to repair dead modules during a battle!
this.TopMost = true; this.TopMost = true;
arc = new AudioResourceClient("HackerBattle"); arc = new AudioResourceClient("HackerBattle");
arc.SongFinished += (object s, EventArgs a) => arc.SongFinished += (object s, EventArgs a) =>
@ -975,8 +983,8 @@ namespace ShiftOS
var rnd = new Random(); var rnd = new Random();
foreach (Module m in ThisEnemyHacker.Network) foreach (Module m in ThisEnemyHacker.Network)
{ {
m.HP = m.GetTotalHP();
var c = m.Deploy(); var c = m.Deploy();
c.Location = new Point(m.X, m.Y);
if (c.Type == SystemType.Core) if (c.Type == SystemType.Core)
{ {
ThisEnemyPC = c; ThisEnemyPC = c;
@ -984,6 +992,7 @@ namespace ShiftOS
ThisPlayerPC.EnemyComputer = ThisEnemyPC; ThisPlayerPC.EnemyComputer = ThisEnemyPC;
} }
AddEnemyModule(c); AddEnemyModule(c);
c.Location = new Point(m.X, m.Y);
} }
} }
@ -1102,7 +1111,7 @@ namespace ShiftOS
public void Enemy_Firewall_Deflect(Computer fwall) public void Enemy_Firewall_Deflect(Computer fwall)
{ {
//Safegaurd... //Safeguard... also apparently I can't spell... because this used to be 'Safegaurd'...
if (fwall.Type == SystemType.Firewall) if (fwall.Type == SystemType.Firewall)
{ {
var r = fwall.GetAreaOfEffect(); var r = fwall.GetAreaOfEffect();

View file

@ -21,6 +21,24 @@ namespace ShiftOS
public static List<Module> MyNetwork = new List<Module>(); public static List<Module> MyNetwork = new List<Module>();
public static bool Failure = false; public static bool Failure = false;
public static DateTime FailDate = DateTime.Now; public static DateTime FailDate = DateTime.Now;
internal static string HackerBattleAward = null;
public static Timer RepairTimer = null;
public static Module MyCore
{
get
{
var m = new Module(SystemType.Core, 1, "invalid");
foreach(var mod in MyNetwork)
{
if(mod.Hostname == "localhost")
{
m = mod;
}
}
return m;
}
}
/// <summary> /// <summary>
/// Gives a shiftorium upgrade for free. /// Gives a shiftorium upgrade for free.
@ -474,6 +492,59 @@ namespace ShiftOS
File.WriteAllText(Paths.Drivers + "Network.dri", API.Encryption.Encrypt(JsonConvert.SerializeObject(MyNetwork))); File.WriteAllText(Paths.Drivers + "Network.dri", API.Encryption.Encrypt(JsonConvert.SerializeObject(MyNetwork)));
} }
List<Module> coresToRemove = new List<Module>();
foreach(var m in MyNetwork)
{
if(m.Type == SystemType.Core && m != MyCore)
{
coresToRemove.Add(m);
}
}
foreach(var m in coresToRemove)
{
MyNetwork.Remove(m);
}
RepairTimer = new Timer();
RepairTimer.Interval = 2000;
var r = new Random();
RepairTimer.Tick += (object s, EventArgs a) =>
{
var repairable = new List<Module>();
foreach(var mod in MyNetwork)
{
if(mod.HP < mod.GetTotalHP())
{
repairable.Add(mod);
}
}
int index = r.Next(0, repairable.Count);
try
{
int increase = 1;
foreach(var mod in MyNetwork)
{
if(mod.Type == SystemType.RepairModule)
{
increase += mod.HP / 4;
}
}
var m = repairable[index];
while(m.HP + increase > m.GetTotalHP())
{
increase -= 1;
}
if(m.HP < m.GetTotalHP())
{
m.HP += increase;
}
}
catch
{
}
};
RepairTimer.Start();
} }
/// <summary> /// <summary>
@ -588,34 +659,10 @@ namespace ShiftOS
public Computer Deploy() public Computer Deploy()
{ {
var c = new Computer(); var c = new Computer();
c.TotalHP = GetTotalHP(); //for proper status display
c.Hostname = Hostname; c.Hostname = Hostname;
c.Type = Type; c.Type = Type;
switch (Type) c.HP = HP;
{
case SystemType.Core:
c.HP = 100;
break;
default:
switch (Grade)
{
case 1:
c.HP = 10;
break;
case 2:
c.HP = 20;
break;
case 3:
c.HP = 40;
break;
case 4:
c.HP = 80;
break;
default:
c.HP = 10;
break;
}
break;
}
c.Visible = true; c.Visible = true;
c.Grade = Grade; c.Grade = Grade;
if(X != 0 && Y != 0) if(X != 0 && Y != 0)
@ -624,6 +671,30 @@ namespace ShiftOS
} }
return c; return c;
} }
public int GetTotalHP()
{
switch (Type)
{
case SystemType.Core:
return 100;
default:
switch (Grade)
{
case 1:
return 10;
case 2:
return 20;
case 3:
return 40;
case 4:
return 80;
default:
return 10;
}
}
}
} }
/// <summary> /// <summary>
@ -661,6 +732,7 @@ namespace ShiftOS
Network.Add(m); //Hacker will always have a core system. Network.Add(m); //Hacker will always have a core system.
} }
public bool IsLeader = false;
public string Name { get; set; } public string Name { get; set; }
public string FriendDesc { get; set; } public string FriendDesc { get; set; }
public string Description { get; set; } public string Description { get; set; }

View file

@ -1,4 +1,5 @@
using NetSockets; using NetSockets;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@ -40,6 +41,15 @@ namespace ShiftOS
{ {
IPs = new Dictionary<string, string>(); IPs = new Dictionary<string, string>();
lbrooms.Items.Clear(); lbrooms.Items.Clear();
this.Invoke(new Action(() =>
{
if (API.Upgrades["networkbrowser"] == false)
{
API.CreateInfoboxSession(Hacker_Alliance.Name, Hacker_Alliance.Topic, infobox.InfoboxMode.Info);
lbrooms.Items.Add(Hacker_Alliance.Name);
}
}));
foreach (var client in Package_Grabber.clients) foreach (var client in Package_Grabber.clients)
{ {
if (client.Value.IsConnected) if (client.Value.IsConnected)
@ -90,6 +100,7 @@ namespace ShiftOS
Package_Grabber.SendMessage(client.Key, "chat get_name"); Package_Grabber.SendMessage(client.Key, "chat get_name");
} }
} }
} }
else else
{ {
@ -101,6 +112,25 @@ namespace ShiftOS
} }
} }
private FakeChatClient Hacker_Alliance
{
get
{
var r = new FakeChatClient();
r.Name = "The Hacker Alliance";
r.OtherCharacters = new List<string>();
if (!API.Upgrades["networkbrowser"])
{
r.OtherCharacters.Add("Richard Ladouceur"); //Dear djdeedahx0 and other non-ShiftOS members: DEAL with the last name - I'm not creative. - Michael
r.OtherCharacters.Add("Hacker101");
r.Messages = JsonConvert.DeserializeObject<Dictionary<string, string>>(Properties.Resources.MidGame_Holochat);
r.Topic = "The Hacker Alliance - Please welcome our newest user!";
}
return r;
}
}
private void btnconnect_Click(object sender, EventArgs e) private void btnconnect_Click(object sender, EventArgs e)
{ {
if(lbrooms.SelectedItem != null) if(lbrooms.SelectedItem != null)
@ -108,25 +138,32 @@ namespace ShiftOS
if (!API.LimitedMode) if (!API.LimitedMode)
{ {
string topic = (string)lbrooms.SelectedItem; string topic = (string)lbrooms.SelectedItem;
string ip = ""; if (topic == Hacker_Alliance.Name)
foreach (var obj in IPs)
{ {
if (obj.Value == topic) SetupFakeClient(Hacker_Alliance);
{
ip = obj.Key;
}
} }
if (ip != "") else
{ {
API.CreateInfoboxSession("Choose a Nickname", "Please enter a nick name.", infobox.InfoboxMode.TextEntry); string ip = "";
API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => foreach (var obj in IPs)
{ {
var res = API.GetInfoboxResult(); if (obj.Value == topic)
if (res != "fail")
{ {
SetupClient(ip, res); ip = obj.Key;
} }
}; }
if (ip != "")
{
API.CreateInfoboxSession("Choose a Nickname", "Please enter a nick name.", infobox.InfoboxMode.TextEntry);
API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) =>
{
var res = API.GetInfoboxResult();
if (res != "fail")
{
SetupClient(ip, res);
}
};
}
} }
} }
else else
@ -225,8 +262,24 @@ namespace ShiftOS
string message = fClient.Messages.Keys.ElementAt(m); string message = fClient.Messages.Keys.ElementAt(m);
string user = fClient.Messages[message]; string user = fClient.Messages[message];
//show message on textbox //show message on textbox
txtchat.AppendText(Environment.NewLine + $"<{user}> {message}"); if (message.StartsWith("install:"))
if(m < fClient.Messages.Count - 1) {
try
{
string upg = message.Remove(0, 8);
API.Upgrades[upg] = true;
API.CurrentSession.SetupDesktop();
}
catch
{
}
}
else
{
txtchat.AppendText(Environment.NewLine + $"<{user}> {message}");
}
if (m < fClient.Messages.Count - 1)
{ {
m += 1; m += 1;
} }

View file

@ -0,0 +1,66 @@
namespace ShiftOS
{
partial class ListViewEx
{
/// <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.tblist = new System.Windows.Forms.TableLayoutPanel();
this.SuspendLayout();
//
// tblist
//
this.tblist.AutoSize = true;
this.tblist.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tblist.ColumnCount = 2;
this.tblist.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tblist.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tblist.Dock = System.Windows.Forms.DockStyle.Fill;
this.tblist.Location = new System.Drawing.Point(0, 0);
this.tblist.Name = "tblist";
this.tblist.RowCount = 2;
this.tblist.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tblist.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tblist.Size = new System.Drawing.Size(521, 343);
this.tblist.TabIndex = 0;
//
// ListViewEx
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tblist);
this.Name = "ListViewEx";
this.Size = new System.Drawing.Size(521, 343);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel tblist;
}
}

View file

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ShiftOS
{
public partial class ListViewEx : UserControl
{
private List<Item> items = null;
private List<Column> columns = null;
public ListViewEx()
{
InitializeComponent();
items = new List<Item>();
columns = new List<Column>();
}
private Color _item_color = Color.Gray;
public Color ItemSelectedColor
{
get { return _item_color; }
set
{
_item_color = value;
}
}
private void setup_ui()
{
}
}
public class Item
{
public Item(string text)
{
Text = text;
SubItems = new List<Item>();
}
public string Text { get; set; }
public List<Item> SubItems { get; set; }
public object Tag { get; set; }
}
public class Column
{
public Column(string text)
{
Text = text;
}
public string Text { get; set; }
}
}

View 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>

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace ShiftOS
{
class MountMgr
{
public static Dictionary<string, string> links = null;
public static void Init()
{
links = new Dictionary<string, string>();
if (API.Upgrades["fsexternaldevices"] == true)
{
var drives = DriveInfo.GetDrives();
foreach (var drive in drives)
{
try
{
if (!Paths.SaveRoot.Contains(drive.Name))
{
links.Add(drive.Name, drive.VolumeLabel);
}
}
catch
{
}
}
}
}
}
}

View file

@ -31,6 +31,11 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetGen)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetGen));
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.pnlnetdesign = new System.Windows.Forms.Panel(); this.pnlnetdesign = new System.Windows.Forms.Panel();
this.pnlpcinfo = new System.Windows.Forms.Panel();
this.btndelete = new System.Windows.Forms.Button();
this.lbpcinfo = new System.Windows.Forms.Label();
this.lbmoduletitle = new System.Windows.Forms.Label();
this.btncloseinfo = new System.Windows.Forms.Button();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.btnaddmodule = new System.Windows.Forms.Button(); this.btnaddmodule = new System.Windows.Forms.Button();
this.pnlbuy = new System.Windows.Forms.Panel(); this.pnlbuy = new System.Windows.Forms.Panel();
@ -43,6 +48,12 @@
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.btndonebuying = new System.Windows.Forms.Button(); this.btndonebuying = new System.Windows.Forms.Button();
this.pnlnetinf = new System.Windows.Forms.Panel(); this.pnlnetinf = new System.Windows.Forms.Panel();
this.label6 = new System.Windows.Forms.Label();
this.cbdifficulty = new System.Windows.Forms.ComboBox();
this.txtfspeed = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtfskill = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtnetdesc = new System.Windows.Forms.TextBox(); this.txtnetdesc = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.txtnetname = new System.Windows.Forms.TextBox(); this.txtnetname = new System.Windows.Forms.TextBox();
@ -53,23 +64,26 @@
this.pnlnetinfo = new System.Windows.Forms.Panel(); this.pnlnetinfo = new System.Windows.Forms.Panel();
this.lbdescription = new System.Windows.Forms.Label(); this.lbdescription = new System.Windows.Forms.Label();
this.lbtitle = new System.Windows.Forms.Label(); this.lbtitle = new System.Windows.Forms.Label();
this.pnlpcinfo = new System.Windows.Forms.Panel(); this.btnloadfromtemplate = new System.Windows.Forms.Button();
this.btndelete = new System.Windows.Forms.Button(); this.pnltemplates = new System.Windows.Forms.Panel();
this.lbpcinfo = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label();
this.lbmoduletitle = new System.Windows.Forms.Label(); this.cbnets = new System.Windows.Forms.ComboBox();
this.btncloseinfo = new System.Windows.Forms.Button(); this.label10 = new System.Windows.Forms.Label();
this.btnrecreate = new System.Windows.Forms.Button();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.pnlnetdesign.SuspendLayout(); this.pnlnetdesign.SuspendLayout();
this.pnlpcinfo.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout();
this.pnlbuy.SuspendLayout(); this.pnlbuy.SuspendLayout();
this.pnlnetinf.SuspendLayout(); this.pnlnetinf.SuspendLayout();
this.flbuttons.SuspendLayout(); this.flbuttons.SuspendLayout();
this.pnlnetinfo.SuspendLayout(); this.pnlnetinfo.SuspendLayout();
this.pnlpcinfo.SuspendLayout(); this.pnltemplates.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel1 // panel1
// //
this.panel1.Controls.Add(this.pnltemplates);
this.panel1.Controls.Add(this.pnlnetdesign); this.panel1.Controls.Add(this.pnlnetdesign);
this.panel1.Controls.Add(this.pnlnetinf); this.panel1.Controls.Add(this.pnlnetinf);
this.panel1.Controls.Add(this.flbuttons); this.panel1.Controls.Add(this.flbuttons);
@ -77,7 +91,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1242, 605); this.panel1.Size = new System.Drawing.Size(894, 591);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
// //
@ -89,17 +103,75 @@
this.pnlnetdesign.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlnetdesign.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlnetdesign.Location = new System.Drawing.Point(0, 76); this.pnlnetdesign.Location = new System.Drawing.Point(0, 76);
this.pnlnetdesign.Name = "pnlnetdesign"; this.pnlnetdesign.Name = "pnlnetdesign";
this.pnlnetdesign.Size = new System.Drawing.Size(1242, 498); this.pnlnetdesign.Size = new System.Drawing.Size(894, 484);
this.pnlnetdesign.TabIndex = 6; this.pnlnetdesign.TabIndex = 6;
this.pnlnetdesign.MouseDown += new System.Windows.Forms.MouseEventHandler(this.place_module); this.pnlnetdesign.MouseDown += new System.Windows.Forms.MouseEventHandler(this.place_module);
// //
// pnlpcinfo
//
this.pnlpcinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.pnlpcinfo.Controls.Add(this.btndelete);
this.pnlpcinfo.Controls.Add(this.lbpcinfo);
this.pnlpcinfo.Controls.Add(this.lbmoduletitle);
this.pnlpcinfo.Controls.Add(this.btncloseinfo);
this.pnlpcinfo.Location = new System.Drawing.Point(43, 167);
this.pnlpcinfo.Name = "pnlpcinfo";
this.pnlpcinfo.Size = new System.Drawing.Size(382, 280);
this.pnlpcinfo.TabIndex = 9;
this.pnlpcinfo.Visible = false;
//
// btndelete
//
this.btndelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btndelete.AutoSize = true;
this.btndelete.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btndelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btndelete.Location = new System.Drawing.Point(106, 254);
this.btndelete.Name = "btndelete";
this.btndelete.Size = new System.Drawing.Size(59, 23);
this.btndelete.TabIndex = 8;
this.btndelete.Text = "Delete";
this.btndelete.UseVisualStyleBackColor = true;
this.btndelete.Click += new System.EventHandler(this.btndelete_Click);
//
// lbpcinfo
//
this.lbpcinfo.Location = new System.Drawing.Point(12, 41);
this.lbpcinfo.Name = "lbpcinfo";
this.lbpcinfo.Size = new System.Drawing.Size(367, 86);
this.lbpcinfo.TabIndex = 6;
this.lbpcinfo.Text = resources.GetString("lbpcinfo.Text");
//
// lbmoduletitle
//
this.lbmoduletitle.AutoSize = true;
this.lbmoduletitle.Location = new System.Drawing.Point(10, 12);
this.lbmoduletitle.Name = "lbmoduletitle";
this.lbmoduletitle.Size = new System.Drawing.Size(75, 11);
this.lbmoduletitle.TabIndex = 2;
this.lbmoduletitle.Text = "Add Module";
//
// btncloseinfo
//
this.btncloseinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btncloseinfo.AutoSize = true;
this.btncloseinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btncloseinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btncloseinfo.Location = new System.Drawing.Point(327, 254);
this.btncloseinfo.Name = "btncloseinfo";
this.btncloseinfo.Size = new System.Drawing.Size(52, 23);
this.btncloseinfo.TabIndex = 1;
this.btncloseinfo.Text = "Done.";
this.btncloseinfo.UseVisualStyleBackColor = true;
this.btncloseinfo.Click += new System.EventHandler(this.btncloseinfo_Click);
//
// flowLayoutPanel1 // flowLayoutPanel1
// //
this.flowLayoutPanel1.Controls.Add(this.btnaddmodule); this.flowLayoutPanel1.Controls.Add(this.btnaddmodule);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 467); this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 453);
this.flowLayoutPanel1.Name = "flowLayoutPanel1"; this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(1242, 31); this.flowLayoutPanel1.Size = new System.Drawing.Size(894, 31);
this.flowLayoutPanel1.TabIndex = 8; this.flowLayoutPanel1.TabIndex = 8;
// //
// btnaddmodule // btnaddmodule
@ -126,7 +198,7 @@
this.pnlbuy.Controls.Add(this.cmbbuyable); this.pnlbuy.Controls.Add(this.cmbbuyable);
this.pnlbuy.Controls.Add(this.label4); this.pnlbuy.Controls.Add(this.label4);
this.pnlbuy.Controls.Add(this.btndonebuying); this.pnlbuy.Controls.Add(this.btndonebuying);
this.pnlbuy.Location = new System.Drawing.Point(3, 162); this.pnlbuy.Location = new System.Drawing.Point(3, 148);
this.pnlbuy.Name = "pnlbuy"; this.pnlbuy.Name = "pnlbuy";
this.pnlbuy.Size = new System.Drawing.Size(382, 299); this.pnlbuy.Size = new System.Drawing.Size(382, 299);
this.pnlbuy.TabIndex = 7; this.pnlbuy.TabIndex = 7;
@ -217,6 +289,12 @@
// //
// pnlnetinf // pnlnetinf
// //
this.pnlnetinf.Controls.Add(this.label6);
this.pnlnetinf.Controls.Add(this.cbdifficulty);
this.pnlnetinf.Controls.Add(this.txtfspeed);
this.pnlnetinf.Controls.Add(this.label5);
this.pnlnetinf.Controls.Add(this.txtfskill);
this.pnlnetinf.Controls.Add(this.label3);
this.pnlnetinf.Controls.Add(this.txtnetdesc); this.pnlnetinf.Controls.Add(this.txtnetdesc);
this.pnlnetinf.Controls.Add(this.label2); this.pnlnetinf.Controls.Add(this.label2);
this.pnlnetinf.Controls.Add(this.txtnetname); this.pnlnetinf.Controls.Add(this.txtnetname);
@ -224,9 +302,74 @@
this.pnlnetinf.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlnetinf.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlnetinf.Location = new System.Drawing.Point(0, 76); this.pnlnetinf.Location = new System.Drawing.Point(0, 76);
this.pnlnetinf.Name = "pnlnetinf"; this.pnlnetinf.Name = "pnlnetinf";
this.pnlnetinf.Size = new System.Drawing.Size(1242, 498); this.pnlnetinf.Size = new System.Drawing.Size(894, 484);
this.pnlnetinf.TabIndex = 0; this.pnlnetinf.TabIndex = 0;
// //
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(40, 225);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(124, 11);
this.label6.TabIndex = 11;
this.label6.Text = "Difficulty (Tier)";
//
// cbdifficulty
//
this.cbdifficulty.BackColor = System.Drawing.Color.Black;
this.cbdifficulty.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbdifficulty.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbdifficulty.ForeColor = System.Drawing.Color.Green;
this.cbdifficulty.FormattingEnabled = true;
this.cbdifficulty.Items.AddRange(new object[] {
"easy",
"medium",
"hard"});
this.cbdifficulty.Location = new System.Drawing.Point(170, 222);
this.cbdifficulty.Name = "cbdifficulty";
this.cbdifficulty.Size = new System.Drawing.Size(121, 19);
this.cbdifficulty.TabIndex = 10;
//
// txtfspeed
//
this.txtfspeed.BackColor = System.Drawing.Color.Black;
this.txtfspeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtfspeed.ForeColor = System.Drawing.Color.Green;
this.txtfspeed.Location = new System.Drawing.Point(142, 172);
this.txtfspeed.Name = "txtfspeed";
this.txtfspeed.Size = new System.Drawing.Size(41, 18);
this.txtfspeed.TabIndex = 9;
this.txtfspeed.TextChanged += new System.EventHandler(this.txtfspeed_TextChanged);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(40, 174);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(61, 11);
this.label5.TabIndex = 8;
this.label5.Text = "F. Speed";
//
// txtfskill
//
this.txtfskill.BackColor = System.Drawing.Color.Black;
this.txtfskill.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtfskill.ForeColor = System.Drawing.Color.Green;
this.txtfskill.Location = new System.Drawing.Point(142, 146);
this.txtfskill.Name = "txtfskill";
this.txtfskill.Size = new System.Drawing.Size(41, 18);
this.txtfskill.TabIndex = 7;
this.txtfskill.TextChanged += new System.EventHandler(this.txtfskill_TextChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(40, 148);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(61, 11);
this.label3.TabIndex = 6;
this.label3.Text = "F. Skill";
//
// txtnetdesc // txtnetdesc
// //
this.txtnetdesc.BackColor = System.Drawing.Color.Black; this.txtnetdesc.BackColor = System.Drawing.Color.Black;
@ -234,7 +377,7 @@
this.txtnetdesc.ForeColor = System.Drawing.Color.Green; this.txtnetdesc.ForeColor = System.Drawing.Color.Green;
this.txtnetdesc.Location = new System.Drawing.Point(142, 80); this.txtnetdesc.Location = new System.Drawing.Point(142, 80);
this.txtnetdesc.Name = "txtnetdesc"; this.txtnetdesc.Name = "txtnetdesc";
this.txtnetdesc.Size = new System.Drawing.Size(511, 18); this.txtnetdesc.Size = new System.Drawing.Size(492, 18);
this.txtnetdesc.TabIndex = 5; this.txtnetdesc.TabIndex = 5;
// //
// label2 // label2
@ -271,9 +414,9 @@
this.flbuttons.Controls.Add(this.btnback); this.flbuttons.Controls.Add(this.btnback);
this.flbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; this.flbuttons.Dock = System.Windows.Forms.DockStyle.Bottom;
this.flbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; this.flbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.flbuttons.Location = new System.Drawing.Point(0, 574); this.flbuttons.Location = new System.Drawing.Point(0, 560);
this.flbuttons.Name = "flbuttons"; this.flbuttons.Name = "flbuttons";
this.flbuttons.Size = new System.Drawing.Size(1242, 31); this.flbuttons.Size = new System.Drawing.Size(894, 31);
this.flbuttons.TabIndex = 0; this.flbuttons.TabIndex = 0;
// //
// btnnext // btnnext
@ -281,7 +424,7 @@
this.btnnext.AutoSize = true; this.btnnext.AutoSize = true;
this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnnext.Location = new System.Drawing.Point(1194, 3); this.btnnext.Location = new System.Drawing.Point(846, 3);
this.btnnext.Name = "btnnext"; this.btnnext.Name = "btnnext";
this.btnnext.Size = new System.Drawing.Size(45, 23); this.btnnext.Size = new System.Drawing.Size(45, 23);
this.btnnext.TabIndex = 0; this.btnnext.TabIndex = 0;
@ -294,7 +437,7 @@
this.btnback.AutoSize = true; this.btnback.AutoSize = true;
this.btnback.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.btnback.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnback.Location = new System.Drawing.Point(1143, 3); this.btnback.Location = new System.Drawing.Point(795, 3);
this.btnback.Name = "btnback"; this.btnback.Name = "btnback";
this.btnback.Size = new System.Drawing.Size(45, 23); this.btnback.Size = new System.Drawing.Size(45, 23);
this.btnback.TabIndex = 1; this.btnback.TabIndex = 1;
@ -304,12 +447,13 @@
// //
// pnlnetinfo // pnlnetinfo
// //
this.pnlnetinfo.Controls.Add(this.btnloadfromtemplate);
this.pnlnetinfo.Controls.Add(this.lbdescription); this.pnlnetinfo.Controls.Add(this.lbdescription);
this.pnlnetinfo.Controls.Add(this.lbtitle); this.pnlnetinfo.Controls.Add(this.lbtitle);
this.pnlnetinfo.Dock = System.Windows.Forms.DockStyle.Top; this.pnlnetinfo.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlnetinfo.Location = new System.Drawing.Point(0, 0); this.pnlnetinfo.Location = new System.Drawing.Point(0, 0);
this.pnlnetinfo.Name = "pnlnetinfo"; this.pnlnetinfo.Name = "pnlnetinfo";
this.pnlnetinfo.Size = new System.Drawing.Size(1242, 76); this.pnlnetinfo.Size = new System.Drawing.Size(894, 76);
this.pnlnetinfo.TabIndex = 1; this.pnlnetinfo.TabIndex = 1;
// //
// lbdescription // lbdescription
@ -318,7 +462,7 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.lbdescription.Location = new System.Drawing.Point(15, 31); this.lbdescription.Location = new System.Drawing.Point(15, 31);
this.lbdescription.Name = "lbdescription"; this.lbdescription.Name = "lbdescription";
this.lbdescription.Size = new System.Drawing.Size(1215, 36); this.lbdescription.Size = new System.Drawing.Size(867, 36);
this.lbdescription.TabIndex = 1; this.lbdescription.TabIndex = 1;
this.lbdescription.Text = "Information about the network."; this.lbdescription.Text = "Information about the network.";
// //
@ -332,78 +476,95 @@
this.lbtitle.TabIndex = 0; this.lbtitle.TabIndex = 0;
this.lbtitle.Text = "Network Information"; this.lbtitle.Text = "Network Information";
// //
// pnlpcinfo // btnloadfromtemplate
// //
this.pnlpcinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnloadfromtemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.pnlpcinfo.Controls.Add(this.btndelete); this.btnloadfromtemplate.AutoSize = true;
this.pnlpcinfo.Controls.Add(this.lbpcinfo); this.btnloadfromtemplate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.pnlpcinfo.Controls.Add(this.lbmoduletitle); this.btnloadfromtemplate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.pnlpcinfo.Controls.Add(this.btncloseinfo); this.btnloadfromtemplate.Location = new System.Drawing.Point(683, 47);
this.pnlpcinfo.Location = new System.Drawing.Point(391, 181); this.btnloadfromtemplate.Name = "btnloadfromtemplate";
this.pnlpcinfo.Name = "pnlpcinfo"; this.btnloadfromtemplate.Size = new System.Drawing.Size(199, 23);
this.pnlpcinfo.Size = new System.Drawing.Size(382, 280); this.btnloadfromtemplate.TabIndex = 2;
this.pnlpcinfo.TabIndex = 9; this.btnloadfromtemplate.Text = "This button breaks things.";
this.pnlpcinfo.Visible = false; this.btnloadfromtemplate.UseVisualStyleBackColor = true;
this.btnloadfromtemplate.Visible = false;
this.btnloadfromtemplate.Click += new System.EventHandler(this.btnloadfromtemplate_Click);
// //
// btndelete // pnltemplates
// //
this.btndelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.pnltemplates.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btndelete.AutoSize = true; this.pnltemplates.Controls.Add(this.label9);
this.btndelete.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.pnltemplates.Controls.Add(this.cbnets);
this.btndelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.pnltemplates.Controls.Add(this.label10);
this.btndelete.Location = new System.Drawing.Point(106, 254); this.pnltemplates.Controls.Add(this.btnrecreate);
this.btndelete.Name = "btndelete"; this.pnltemplates.Location = new System.Drawing.Point(256, 146);
this.btndelete.Size = new System.Drawing.Size(59, 23); this.pnltemplates.Name = "pnltemplates";
this.btndelete.TabIndex = 8; this.pnltemplates.Size = new System.Drawing.Size(382, 299);
this.btndelete.Text = "Delete"; this.pnltemplates.TabIndex = 8;
this.btndelete.UseVisualStyleBackColor = true; this.pnltemplates.Visible = false;
this.btndelete.Click += new System.EventHandler(this.btndelete_Click);
// //
// lbpcinfo // label9
// //
this.lbpcinfo.Location = new System.Drawing.Point(12, 41); this.label9.Location = new System.Drawing.Point(10, 63);
this.lbpcinfo.Name = "lbpcinfo"; this.label9.Name = "label9";
this.lbpcinfo.Size = new System.Drawing.Size(367, 86); this.label9.Size = new System.Drawing.Size(367, 156);
this.lbpcinfo.TabIndex = 6; this.label9.TabIndex = 6;
this.lbpcinfo.Text = resources.GetString("lbpcinfo.Text"); this.label9.Text = "Please choose a network from the above list. Net Generator will attempt to grab d" +
"ata about the network and recreate it for you.";
// //
// lbmoduletitle // cbnets
// //
this.lbmoduletitle.AutoSize = true; this.cbnets.BackColor = System.Drawing.Color.Black;
this.lbmoduletitle.Location = new System.Drawing.Point(10, 12); this.cbnets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.lbmoduletitle.Name = "lbmoduletitle"; this.cbnets.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lbmoduletitle.Size = new System.Drawing.Size(75, 11); this.cbnets.ForeColor = System.Drawing.Color.White;
this.lbmoduletitle.TabIndex = 2; this.cbnets.FormattingEnabled = true;
this.lbmoduletitle.Text = "Add Module"; this.cbnets.Location = new System.Drawing.Point(12, 38);
this.cbnets.Name = "cbnets";
this.cbnets.Size = new System.Drawing.Size(360, 19);
this.cbnets.TabIndex = 3;
// //
// btncloseinfo // label10
// //
this.btncloseinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.label10.AutoSize = true;
this.btncloseinfo.AutoSize = true; this.label10.Location = new System.Drawing.Point(10, 12);
this.btncloseinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.label10.Name = "label10";
this.btncloseinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.label10.Size = new System.Drawing.Size(124, 11);
this.btncloseinfo.Location = new System.Drawing.Point(327, 254); this.label10.TabIndex = 2;
this.btncloseinfo.Name = "btncloseinfo"; this.label10.Text = "Load from Network";
this.btncloseinfo.Size = new System.Drawing.Size(52, 23); //
this.btncloseinfo.TabIndex = 1; // btnrecreate
this.btncloseinfo.Text = "Done."; //
this.btncloseinfo.UseVisualStyleBackColor = true; this.btnrecreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btncloseinfo.Click += new System.EventHandler(this.btncloseinfo_Click); this.btnrecreate.AutoSize = true;
this.btnrecreate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnrecreate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnrecreate.Location = new System.Drawing.Point(334, 273);
this.btnrecreate.Name = "btnrecreate";
this.btnrecreate.Size = new System.Drawing.Size(45, 23);
this.btnrecreate.TabIndex = 1;
this.btnrecreate.Text = "Done";
this.btnrecreate.UseVisualStyleBackColor = true;
this.btnrecreate.Click += new System.EventHandler(this.btnrecreate_Click);
// //
// NetGen // NetGen
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black; this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(1242, 605); this.ClientSize = new System.Drawing.Size(894, 591);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("Lucida Console", 8.25F); this.Font = new System.Drawing.Font("Lucida Console", 8.25F);
this.ForeColor = System.Drawing.Color.LightGreen; this.ForeColor = System.Drawing.Color.LightGreen;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "NetGen"; this.Name = "NetGen";
this.Text = "NetGen"; this.Text = "NetGen";
this.Load += new System.EventHandler(this.NetGen_Load); this.Load += new System.EventHandler(this.NetGen_Load);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.pnlnetdesign.ResumeLayout(false); this.pnlnetdesign.ResumeLayout(false);
this.pnlpcinfo.ResumeLayout(false);
this.pnlpcinfo.PerformLayout();
this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout(); this.flowLayoutPanel1.PerformLayout();
this.pnlbuy.ResumeLayout(false); this.pnlbuy.ResumeLayout(false);
@ -414,8 +575,8 @@
this.flbuttons.PerformLayout(); this.flbuttons.PerformLayout();
this.pnlnetinfo.ResumeLayout(false); this.pnlnetinfo.ResumeLayout(false);
this.pnlnetinfo.PerformLayout(); this.pnlnetinfo.PerformLayout();
this.pnlpcinfo.ResumeLayout(false); this.pnltemplates.ResumeLayout(false);
this.pnlpcinfo.PerformLayout(); this.pnltemplates.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -451,5 +612,17 @@
private System.Windows.Forms.Label lbpcinfo; private System.Windows.Forms.Label lbpcinfo;
private System.Windows.Forms.Label lbmoduletitle; private System.Windows.Forms.Label lbmoduletitle;
private System.Windows.Forms.Button btncloseinfo; private System.Windows.Forms.Button btncloseinfo;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ComboBox cbdifficulty;
private System.Windows.Forms.TextBox txtfspeed;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtfskill;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnloadfromtemplate;
private System.Windows.Forms.Panel pnltemplates;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox cbnets;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Button btnrecreate;
} }
} }

View file

@ -46,8 +46,28 @@ namespace ShiftOS
pnlnetinf.BringToFront(); pnlnetinf.BringToFront();
break; break;
case 1: case 1:
//clear potential
if(potentialModules != null)
{
foreach(var p in potentialModules)
{
pnlnetdesign.Controls.Remove(p);
p.Hide();
}
potentialModules = new List<Computer>();
}
//create net //create net
network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, 0, 0, "unknown"); if (overwrite_net == true)
{
network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, this.skill, this.speed, cbdifficulty.Text);
}
else
{
network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, this.skill, this.speed, cbdifficulty.Text);
network.Network = TemplateNet;
}
network.Network[0].HP = network.Network[0].GetTotalHP();
var c = network.Network[0].Deploy(); var c = network.Network[0].Deploy();
c.Left = (pnlnetdesign.Width - 64) / 2; c.Left = (pnlnetdesign.Width - 64) / 2;
c.Top = (pnlnetdesign.Height - 64) / 2; c.Top = (pnlnetdesign.Height - 64) / 2;
@ -213,7 +233,7 @@ namespace ShiftOS
var coordinates = pnlnetdesign.PointToClient(Cursor.Position); var coordinates = pnlnetdesign.PointToClient(Cursor.Position);
int x = coordinates.X; int x = coordinates.X;
int y = coordinates.Y; int y = coordinates.Y;
fmod.HP = fmod.GetTotalHP();
var computerToPlace = fmod.Deploy(); var computerToPlace = fmod.Deploy();
computerToPlace.Location = new Point(x, y); computerToPlace.Location = new Point(x, y);
pnlnetdesign.Controls.Add(computerToPlace); pnlnetdesign.Controls.Add(computerToPlace);
@ -262,5 +282,80 @@ namespace ShiftOS
SelectedSystem = null; SelectedSystem = null;
pnlpcinfo.Hide(); pnlpcinfo.Hide();
} }
int skill = 0;
int speed = 0;
private void txtfskill_TextChanged(object sender, EventArgs e)
{
try
{
skill = Convert.ToInt32(txtfskill.Text);
}
catch
{
txtfskill.Text = skill.ToString();
}
}
private void txtfspeed_TextChanged(object sender, EventArgs e)
{
try
{
speed = Convert.ToInt32(txtfspeed.Text);
}
catch
{
txtfspeed.Text = speed.ToString();
}
}
Dictionary<string, EnemyHacker> Templates = null;
public void SetupTemplates()
{
Templates = JsonConvert.DeserializeObject<Dictionary<string, EnemyHacker>>(Properties.Resources.NetBrowser_Enemies);
cbnets.Items.Clear();
foreach(var t in Templates)
{
cbnets.Items.Add(t.Key);
}
}
private void btnloadfromtemplate_Click(object sender, EventArgs e)
{
SetupTemplates();
pnltemplates.BringToFront();
pnltemplates.Visible = !pnltemplates.Visible;
}
bool overwrite_net = true;
List<Module> TemplateNet = null;
public void SetupTemplate(EnemyHacker t)
{
txtnetname.Text = t.Name;
txtnetdesc.Text = t.Description;
txtfskill.Text = t.FriendSkill.ToString();
txtfspeed.Text = t.FriendSpeed.ToString();
cbdifficulty.SelectedItem = t.Difficulty;
stage = 0;
overwrite_net = false;
TemplateNet = t.Network;
SetupUI();
}
private void btnrecreate_Click(object sender, EventArgs e)
{
try
{
SetupTemplate(Templates[cbnets.Text]);
pnltemplates.Hide();
}
catch
{
}
}
} }
} }

View file

@ -0,0 +1,84 @@
namespace ShiftOS
{
partial class NetModuleStatus
{
/// <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.lbinfo = new System.Windows.Forms.Label();
this.pghealth = new ShiftOS.ProgressBarEX();
this.SuspendLayout();
//
// lbinfo
//
this.lbinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lbinfo.Location = new System.Drawing.Point(4, 4);
this.lbinfo.Name = "lbinfo";
this.lbinfo.Size = new System.Drawing.Size(102, 22);
this.lbinfo.TabIndex = 1;
this.lbinfo.Text = "label1";
//
// pghealth
//
this.pghealth.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.pghealth.BackColor = System.Drawing.Color.Black;
this.pghealth.BlockSeparation = 3;
this.pghealth.BlockWidth = 5;
this.pghealth.Color = System.Drawing.Color.Gray;
this.pghealth.ForeColor = System.Drawing.Color.White;
this.pghealth.Location = new System.Drawing.Point(112, 4);
this.pghealth.MaxValue = 100;
this.pghealth.MinValue = 0;
this.pghealth.Name = "pghealth";
this.pghealth.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal;
this.pghealth.ShowValue = true;
this.pghealth.Size = new System.Drawing.Size(227, 22);
this.pghealth.Step = 10;
this.pghealth.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Continuous;
this.pghealth.TabIndex = 0;
this.pghealth.Value = 0;
//
// NetModuleStatus
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lbinfo);
this.Controls.Add(this.pghealth);
this.Name = "NetModuleStatus";
this.Size = new System.Drawing.Size(352, 26);
this.ResumeLayout(false);
}
#endregion
private ProgressBarEX pghealth;
private System.Windows.Forms.Label lbinfo;
}
}

View file

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ShiftOS
{
public partial class NetModuleStatus : UserControl
{
private Module _module = null;
public NetModuleStatus(Module m)
{
_module = m;
InitializeComponent();
var t = new Timer();
t.Tick += (object s, EventArgs a) =>
{
lbinfo.Text = _module.Hostname;
pghealth.MaxValue = _module.GetTotalHP();
pghealth.Value = _module.HP;
if(_module.HP == _module.GetTotalHP())
{
if(this.Visible == true)
{
this.Hide();
}
}
else
{
if(this.Visible == false)
{
this.Show();
}
}
};
t.Interval = 100;
t.Start();
}
}
}

View 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>

View file

@ -0,0 +1,290 @@
namespace ShiftOS
{
partial class NetworkBrowser
{
/// <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.components = new System.ComponentModel.Container();
this.panel1 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.btnscreen = new System.Windows.Forms.Button();
this.pnlmynet = new System.Windows.Forms.Panel();
this.flmodules = new System.Windows.Forms.FlowLayoutPanel();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.btntier = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnstartbattle = new System.Windows.Forms.Button();
this.lbnets = new System.Windows.Forms.ListBox();
this.panel2 = new System.Windows.Forms.Panel();
this.lbnetdesc = new System.Windows.Forms.Label();
this.lbtitle = new System.Windows.Forms.Label();
this.pgtotalhealth = new ShiftOS.ProgressBarEX();
this.tmrcalctotal = new System.Windows.Forms.Timer(this.components);
this.panel1.SuspendLayout();
this.pnlmynet.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.btnscreen);
this.panel1.Controls.Add(this.pnlmynet);
this.panel1.Controls.Add(this.btntier);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.btnstartbattle);
this.panel1.Controls.Add(this.lbnets);
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(725, 495);
this.panel1.TabIndex = 0;
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(282, 470);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 13);
this.label3.TabIndex = 8;
this.label3.Text = "Screen:";
//
// btnscreen
//
this.btnscreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnscreen.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnscreen.Location = new System.Drawing.Point(332, 465);
this.btnscreen.Name = "btnscreen";
this.btnscreen.Size = new System.Drawing.Size(84, 23);
this.btnscreen.TabIndex = 7;
this.btnscreen.Text = "Network List";
this.btnscreen.UseVisualStyleBackColor = true;
this.btnscreen.Click += new System.EventHandler(this.btnscreen_Click);
//
// pnlmynet
//
this.pnlmynet.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.pnlmynet.Controls.Add(this.pgtotalhealth);
this.pnlmynet.Controls.Add(this.flmodules);
this.pnlmynet.Controls.Add(this.label5);
this.pnlmynet.Controls.Add(this.label4);
this.pnlmynet.Location = new System.Drawing.Point(12, 12);
this.pnlmynet.Name = "pnlmynet";
this.pnlmynet.Size = new System.Drawing.Size(404, 447);
this.pnlmynet.TabIndex = 6;
//
// flmodules
//
this.flmodules.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.flmodules.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flmodules.Location = new System.Drawing.Point(7, 140);
this.flmodules.Name = "flmodules";
this.flmodules.Size = new System.Drawing.Size(394, 298);
this.flmodules.TabIndex = 3;
this.flmodules.WrapContents = false;
//
// label5
//
this.label5.Location = new System.Drawing.Point(4, 37);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(397, 58);
this.label5.TabIndex = 2;
this.label5.Text = "Below you can see your network\'s total health, as well as a list of any damaged m" +
"odules\' health. If \'localhost\' is on the list and it\'s health is 0, you cannot p" +
"articipate in any battles.";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.label4.Location = new System.Drawing.Point(3, 5);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(91, 20);
this.label4.TabIndex = 1;
this.label4.Text = "My Network";
//
// btntier
//
this.btntier.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btntier.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btntier.Location = new System.Drawing.Point(47, 465);
this.btntier.Name = "btntier";
this.btntier.Size = new System.Drawing.Size(75, 23);
this.btntier.TabIndex = 5;
this.btntier.Text = "1";
this.btntier.UseVisualStyleBackColor = true;
this.btntier.Click += new System.EventHandler(this.btntier_Click);
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 470);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(28, 13);
this.label2.TabIndex = 4;
this.label2.Text = "Tier:";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(419, 354);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(294, 71);
this.label1.TabIndex = 3;
this.label1.Text = "When you\'re ready, click \'Start Battle\' to begin the hacker battle.";
//
// btnstartbattle
//
this.btnstartbattle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnstartbattle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnstartbattle.Location = new System.Drawing.Point(638, 465);
this.btnstartbattle.Name = "btnstartbattle";
this.btnstartbattle.Size = new System.Drawing.Size(75, 23);
this.btnstartbattle.TabIndex = 2;
this.btnstartbattle.Text = "Start Battle";
this.btnstartbattle.UseVisualStyleBackColor = true;
this.btnstartbattle.Click += new System.EventHandler(this.btnstartbattle_Click);
//
// lbnets
//
this.lbnets.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.lbnets.BackColor = System.Drawing.Color.Black;
this.lbnets.ForeColor = System.Drawing.Color.White;
this.lbnets.FormattingEnabled = true;
this.lbnets.Location = new System.Drawing.Point(13, 17);
this.lbnets.Name = "lbnets";
this.lbnets.Size = new System.Drawing.Size(403, 433);
this.lbnets.TabIndex = 1;
this.lbnets.SelectedIndexChanged += new System.EventHandler(this.lbnets_SelectedIndexChanged);
//
// panel2
//
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panel2.Controls.Add(this.lbnetdesc);
this.panel2.Controls.Add(this.lbtitle);
this.panel2.Location = new System.Drawing.Point(422, 13);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(291, 326);
this.panel2.TabIndex = 0;
//
// lbnetdesc
//
this.lbnetdesc.Location = new System.Drawing.Point(5, 36);
this.lbnetdesc.Name = "lbnetdesc";
this.lbnetdesc.Size = new System.Drawing.Size(283, 290);
this.lbnetdesc.TabIndex = 1;
this.lbnetdesc.Text = "No network selected.";
//
// lbtitle
//
this.lbtitle.AutoSize = true;
this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.lbtitle.Location = new System.Drawing.Point(4, 4);
this.lbtitle.Name = "lbtitle";
this.lbtitle.Size = new System.Drawing.Size(129, 20);
this.lbtitle.TabIndex = 0;
this.lbtitle.Text = "Network Browser";
//
// pgtotalhealth
//
this.pgtotalhealth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pgtotalhealth.BackColor = System.Drawing.Color.Black;
this.pgtotalhealth.BlockSeparation = 3;
this.pgtotalhealth.BlockWidth = 5;
this.pgtotalhealth.Color = System.Drawing.Color.Gray;
this.pgtotalhealth.Location = new System.Drawing.Point(7, 98);
this.pgtotalhealth.MaxValue = 100;
this.pgtotalhealth.MinValue = 0;
this.pgtotalhealth.Name = "pgtotalhealth";
this.pgtotalhealth.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal;
this.pgtotalhealth.ShowValue = true;
this.pgtotalhealth.Size = new System.Drawing.Size(394, 32);
this.pgtotalhealth.Step = 10;
this.pgtotalhealth.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Continuous;
this.pgtotalhealth.TabIndex = 4;
this.pgtotalhealth.Value = 0;
//
// tmrcalctotal
//
this.tmrcalctotal.Enabled = true;
this.tmrcalctotal.Tick += new System.EventHandler(this.tmrcalctotal_Tick);
//
// NetworkBrowser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(725, 495);
this.Controls.Add(this.panel1);
this.ForeColor = System.Drawing.Color.Black;
this.Name = "NetworkBrowser";
this.Text = "NetworkBrowser";
this.Load += new System.EventHandler(this.NetworkBrowser_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.pnlmynet.ResumeLayout(false);
this.pnlmynet.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnstartbattle;
private System.Windows.Forms.ListBox lbnets;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label lbnetdesc;
private System.Windows.Forms.Label lbtitle;
private System.Windows.Forms.Button btntier;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnscreen;
private System.Windows.Forms.Panel pnlmynet;
private System.Windows.Forms.FlowLayoutPanel flmodules;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private ProgressBarEX pgtotalhealth;
private System.Windows.Forms.Timer tmrcalctotal;
}
}

View file

@ -0,0 +1,301 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ShiftOS
{
public partial class NetworkBrowser : Form
{
public NetworkBrowser()
{
InitializeComponent();
}
public Dictionary<string, EnemyHacker> Networks = null;
private void NetworkBrowser_Load(object sender, EventArgs e)
{
LoadNetworks();
SetupSidePane();
pnlmynet.Hide();
}
public string CurrentTier = "easy";
public EnemyHacker SelectedNet = null;
public void LoadNetworks()
{
switch(CurrentTier)
{
case "easy":
btntier.Text = "1";
break;
case "medium":
btntier.Text = "2";
break;
case "hard":
btntier.Text = "3";
break;
}
Networks = JsonConvert.DeserializeObject<Dictionary<string, EnemyHacker>>(Properties.Resources.NetBrowser_Enemies);
lbnets.Items.Clear();
var Tier1 = new List<string>();
var Tier2 = new List<string>();
var Tier3 = new List<string>();
foreach (var net in Networks)
{
if (!API.CurrentSave.CompletedNets.Contains(net.Key))
{
switch (net.Value.Difficulty)
{
case "easy":
Tier1.Add(net.Key);
break;
case "medium":
Tier2.Add(net.Key);
break;
case "hard":
Tier3.Add(net.Key);
break;
}
}
}
switch (CurrentTier)
{
case "easy":
SetupUI(Tier1);
break;
case "medium":
SetupUI(Tier2);
break;
case "hard":
SetupUI(Tier3);
break;
}
}
public void SetupSidePane()
{
if(SelectedNet != null)
{
lbtitle.Text = SelectedNet.Name;
lbnetdesc.Text = SelectedNet.Description + @"
Leader hack speed: " + SelectedNet.FriendSpeed.ToString() + @"
Leader hack skill: " + SelectedNet.FriendSkill.ToString() + @"
Those above values only matter if the leader decides to become a friend. If they do, you can hire them for free to hack into certain ShiftOS applications.";
btnstartbattle.Enabled = true;
}
else
{
lbtitle.Text = "Network Browser";
lbnetdesc.Text = "No network selected.";
btnstartbattle.Enabled = false;
}
}
public void SetupUI(List<string> tier)
{
if (tier.Count > 0)
{
foreach (var t in tier)
{
lbnets.Items.Add(t);
}
}
else
{
AddLeader(CurrentTier);
}
}
public void AddLeader(string tier)
{
if (API.Upgrades["nb_tier_" + tier] == false)
{
var enemy = JsonConvert.DeserializeObject<EnemyHacker>(Get_Leader_JSON(tier));
Networks.Add(enemy.Name, enemy);
lbnets.Items.Add(enemy.Name);
}
}
public string Get_Leader_JSON(string tier)
{
switch(tier)
{
case "easy":
return Properties.Resources.Hacker_DanaRoss;
case "medium":
return Properties.Resources.Hacker_AustinWalker;
case "hard":
return Properties.Resources.Hacker_JonathanRivard;
default:
return null;
}
}
private void btntier_Click(object sender, EventArgs e)
{
switch(btntier.Text)
{
case "1":
if(API.Upgrades["nb_tier_easy"] == true)
{
CurrentTier = "medium";
}
break;
case "2":
if (API.Upgrades["nb_tier_medium"] == true)
{
CurrentTier = "hard";
}
else
{
CurrentTier = "easy";
}
break;
case "3":
CurrentTier = "easy";
break;
}
LoadNetworks();
}
private void lbnets_SelectedIndexChanged(object sender, EventArgs e)
{
var t = lbnets.SelectedItem as string;
foreach(var net in Networks)
{
if(net.Key == t)
{
SelectedNet = net.Value;
}
}
SetupSidePane();
}
private void btnstartbattle_Click(object sender, EventArgs e)
{
if (Hacking.MyCore.HP == 0)
{
SetupMyNet();
pnlmynet.Show();
btnscreen.Text = "My Network";
API.CreateInfoboxSession("Your Core isn't ready.", "Your Core (hostname \"localhost\") has 0 HP, and cannot fight. Please wait until your Core regenerates.", infobox.InfoboxMode.Info);
}
else
{
string tier_upgrade = null;
if (SelectedNet.IsLeader == true)
{
tier_upgrade = "nb_tier_" + CurrentTier;
}
var hui = new HackUI(SelectedNet);
hui.OnWin += (object s, EventArgs a) =>
{
if (tier_upgrade != null)
{
API.Upgrades[tier_upgrade] = true;
if(CurrentTier == "easy")
{
if(API.Upgrades["midgamebridge"] == false)
{
var term = new Terminal();
API.CreateForm(term, API.LoadedNames.TerminalName, API.GetIcon("Terminal"));
term.StartDanaRossStory();
}
}
else if(CurrentTier == "medium")
{
var h = new HoloChat();
var fakeroom = new FakeChatClient();
fakeroom.Name = "The Hacker Alliance";
fakeroom.Topic = "The Hacker Alliance - We are the masters. DevX cannot control us.";
fakeroom.OtherCharacters = new List<string>(new [] {"Richard Ladouceur"});
fakeroom.Messages = JsonConvert.DeserializeObject<Dictionary<string, string>>(Properties.Resources.AustinWalkerCompletionStory);
API.CreateForm(h, "QuickChat", API.GetIcon("QuickChat"));
var t = new Thread(new ThreadStart(new Action(() =>
{
Thread.Sleep(200);
h.Invoke(new Action(() =>
{
h.SetupFakeClient(fakeroom);
}));
})));
}
foreach(var mod in SelectedNet.Network)
{
if (mod.Type != SystemType.Core)
{
mod.HP = 0;
Hacking.MyNetwork.Add(mod);
}
}
SetupMyNet();
}
API.CurrentSave.CompletedNets.Add(SelectedNet.Name);
SelectedNet = null;
LoadNetworks();
SetupSidePane();
};
hui.Show();
}
}
public void SetupMyNet()
{
flmodules.Controls.Clear();
foreach(var m in Hacking.MyNetwork)
{
var mStatus = new NetModuleStatus(m);
flmodules.Controls.Add(mStatus);
mStatus.Show();
}
}
private void btnscreen_Click(object sender, EventArgs e)
{
switch (btnscreen.Text)
{
case "My Network":
LoadNetworks();
SetupSidePane();
pnlmynet.Hide();
btnscreen.Text = "Network List";
break;
case "Network List":
SetupMyNet();
pnlmynet.Show();
btnscreen.Text = "My Network";
break;
}
}
private void tmrcalctotal_Tick(object sender, EventArgs e)
{
int total = 0;
int hp = 0;
foreach(var mod in Hacking.MyNetwork)
{
total += mod.GetTotalHP();
hp += mod.HP;
}
pgtotalhealth.MaxValue = total;
pgtotalhealth.Value = hp;
}
}
}

View file

@ -0,0 +1,123 @@
<?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>
<metadata name="tmrcalctotal.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,132 @@
namespace ShiftOS
{
partial class PanelManager
{
/// <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.pnlmain = new System.Windows.Forms.Panel();
this.btndone = new System.Windows.Forms.Button();
this.pnlbgcolor = new System.Windows.Forms.Panel();
this.Label40 = new System.Windows.Forms.Label();
this.Label36 = new System.Windows.Forms.Label();
this.txtheight = new System.Windows.Forms.TextBox();
this.pnlmain.SuspendLayout();
this.SuspendLayout();
//
// pnlmain
//
this.pnlmain.BackColor = System.Drawing.Color.White;
this.pnlmain.Controls.Add(this.txtheight);
this.pnlmain.Controls.Add(this.Label36);
this.pnlmain.Controls.Add(this.pnlbgcolor);
this.pnlmain.Controls.Add(this.Label40);
this.pnlmain.Controls.Add(this.btndone);
this.pnlmain.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlmain.ForeColor = System.Drawing.Color.Black;
this.pnlmain.Location = new System.Drawing.Point(0, 0);
this.pnlmain.Name = "pnlmain";
this.pnlmain.Size = new System.Drawing.Size(360, 378);
this.pnlmain.TabIndex = 0;
//
// btndone
//
this.btndone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btndone.Location = new System.Drawing.Point(273, 343);
this.btndone.Name = "btndone";
this.btndone.Size = new System.Drawing.Size(75, 23);
this.btndone.TabIndex = 0;
this.btndone.Text = "Done";
this.btndone.UseVisualStyleBackColor = true;
this.btndone.Click += new System.EventHandler(this.btndone_Click);
//
// pnlbgcolor
//
this.pnlbgcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlbgcolor.Location = new System.Drawing.Point(307, 101);
this.pnlbgcolor.Name = "pnlbgcolor";
this.pnlbgcolor.Size = new System.Drawing.Size(41, 20);
this.pnlbgcolor.TabIndex = 22;
this.pnlbgcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.setbgcolor);
//
// Label40
//
this.Label40.AutoSize = true;
this.Label40.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label40.Location = new System.Drawing.Point(12, 101);
this.Label40.Name = "Label40";
this.Label40.Size = new System.Drawing.Size(259, 16);
this.Label40.TabIndex = 23;
this.Label40.Text = "Background Color (right-click to set image)";
//
// Label36
//
this.Label36.AutoSize = true;
this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label36.Location = new System.Drawing.Point(12, 136);
this.Label36.Name = "Label36";
this.Label36.Size = new System.Drawing.Size(50, 16);
this.Label36.TabIndex = 24;
this.Label36.Text = "Height:";
//
// txtheight
//
this.txtheight.BackColor = System.Drawing.Color.White;
this.txtheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtheight.ForeColor = System.Drawing.Color.Black;
this.txtheight.Location = new System.Drawing.Point(325, 134);
this.txtheight.Name = "txtheight";
this.txtheight.Size = new System.Drawing.Size(23, 22);
this.txtheight.TabIndex = 25;
this.txtheight.TextChanged += new System.EventHandler(this.txtheight_TextChanged);
//
// PanelManager
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(360, 378);
this.Controls.Add(this.pnlmain);
this.Name = "PanelManager";
this.Text = "PanelManager";
this.Load += new System.EventHandler(this.PanelManager_Load);
this.pnlmain.ResumeLayout(false);
this.pnlmain.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel pnlmain;
private System.Windows.Forms.Button btndone;
private System.Windows.Forms.Panel pnlbgcolor;
private System.Windows.Forms.Label Label40;
private System.Windows.Forms.Label Label36;
private System.Windows.Forms.TextBox txtheight;
}
}

View file

@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ShiftOS
{
public partial class PanelManager : Form
{
public PanelManager(Skinning.DesktopPanel newPanel)
{
pnl = newPanel;
InitializeComponent();
}
private Skinning.DesktopPanel pnl = null;
private void setbgcolor(object sender, MouseEventArgs e)
{
if(e.Button == MouseButtons.Left)
{
API.CreateColorPickerSession("Panel Background", pnl.BackgroundColor);
API.ColorPickerSession.FormClosing += (s, a) =>
{
var c = API.GetLastColorFromSession();
pnl.BackgroundColor = c;
pnl.BackgroundImage = null;
};
}
else if(e.Button == MouseButtons.Right)
{
API.CreateGraphicPickerSession("Panel Background", false);
API.GraphicPickerSession.FormClosing += (s, a) =>
{
var img = API.GraphicPickerSession.IdleImage;
pnl.BackgroundImage = img;
};
}
}
private void txtheight_TextChanged(object sender, EventArgs e)
{
try
{
int height = Convert.ToInt32(txtheight.Text);
pnl.Height = height;
}
catch
{
txtheight.Text = pnl.Height.ToString();
}
}
private void btndone_Click(object sender, EventArgs e)
{
API.CurrentSession.SetupDesktopPanel();
Skinning.Utilities.saveskin();
this.Close();
}
private void PanelManager_Load(object sender, EventArgs e)
{
pnlbgcolor.BackColor = pnl.BackgroundColor;
pnlbgcolor.BackgroundImage = pnl.BackgroundImage;
txtheight.Text = pnl.Height.ToString();
}
}
}

View 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>

View file

@ -66,6 +66,13 @@ namespace ShiftOS
//Load ShiftOS skin //Load ShiftOS skin
Skinning.Utilities.loadskin(); Skinning.Utilities.loadskin();
SaveSystem.ShiftoriumRegistry.UpdateShiftorium(); SaveSystem.ShiftoriumRegistry.UpdateShiftorium();
//Lua bootscreen.
if(File.Exists(Paths.SaveRoot + "BOOT"))
{
string lua = File.ReadAllText(Paths.SaveRoot + "BOOT");
var l = new LuaInterpreter();
l.mod(lua);
}
//Start recieving calls from the Modding API... //Start recieving calls from the Modding API...
Application.Run(new ShiftOSDesktop()); Application.Run(new ShiftOSDesktop());
//By now, the API receiver has been loaded, //By now, the API receiver has been loaded,

View file

@ -659,6 +659,20 @@ namespace ShiftOS.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to {
///&quot;Hey! Seems your Network Browser&apos;s working pretty well, huh?&quot;:&quot;Richard Ladouceur&quot;,
///&quot;I keep reading news about networks on the list going offline.&quot;:&quot;Richard Ladouceur&quot;,
///&quot;It&apos;s great to see you&apos;re doing this, because pretty soon, it&apos;ll be DevX&apos;s turn to suffer your wrath.&quot;:&quot;Richard Ladouceur&quot;,
///&quot;I&apos;ve patched your Network Browser to allow you to fight in Tier 3 battles.&quot;:&quot;Richard Ladouceur&quot;,
///&quot;Just be careful - if I&apos;m able to see all of this news, there&apos;s no doubt DevX has his eyes on it.&quot;:&quot;Richard Ladouce [rest of string was truncated]&quot;;.
/// </summary>
internal static string AustinWalkerCompletionStory {
get {
return ResourceManager.GetString("AustinWalkerCompletionStory", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -1113,6 +1127,33 @@ namespace ShiftOS.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to {&quot;IsLeader&quot;:true,&quot;Name&quot;:&quot;Austin Walker&quot;,&quot;FriendDesc&quot;:&quot;Austin Walker is a retired programmer who worked at Orange Inc. In an attempt to gain even more money, he has trained himself with hacker battles.&quot;,&quot;Description&quot;:&quot;Austin Walker is a retired programmer who worked at Orange Inc. In an attempt to gain even more money, he has trained himself with hacker battles.&quot;,&quot;FriendSpeed&quot;:45,&quot;FriendSkill&quot;:150,&quot;Difficulty&quot;:&quot;medium&quot;,&quot;Network&quot;:[{&quot;Hostname&quot;:&quot;austin_walker&quot;,&quot;ModuleType&quot;:0,&quot;Type&quot;:0,&quot;HP&quot;:100,&quot;Grade&quot;:1,&quot;X&quot;:0,&quot;Y [rest of string was truncated]&quot;;.
/// </summary>
internal static string Hacker_AustinWalker {
get {
return ResourceManager.GetString("Hacker_AustinWalker", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {&quot;Name&quot;:&quot;Dana Ross&quot;,&quot;FriendDesc&quot;:&quot;Dana Ross is a new, yet experienced ShiftOS user. She is also experienced in hacking, and is a worthy adversary for any Tier 1 network who dares try her.&quot;,&quot;Description&quot;:&quot;Dana Ross is a new, yet experienced ShiftOS user. She is also experienced in hacking, and is a worthy adversary for any Tier 1 network who dares try her.&quot;,&quot;FriendSpeed&quot;:100,&quot;FriendSkill&quot;:100,&quot;Difficulty&quot;:&quot;easy&quot;,&quot;Network&quot;:[{&quot;Hostname&quot;:&quot;dana_ross&quot;,&quot;ModuleType&quot;:0,&quot;Type&quot;:0,&quot;HP&quot;:0,&quot;Grade&quot;:1,&quot;X&quot;:0,&quot;Y&quot;:0},{&quot;Hostna [rest of string was truncated]&quot;;.
/// </summary>
internal static string Hacker_DanaRoss {
get {
return ResourceManager.GetString("Hacker_DanaRoss", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {}.
/// </summary>
internal static string Hacker_JonathanRivard {
get {
return ResourceManager.GetString("Hacker_JonathanRivard", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -1532,6 +1573,23 @@ namespace ShiftOS.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to {
/// &quot;Ahhh, User! I see the installation was successful and you made it.&quot;:&quot;Richard Ladouceur&quot;,
/// &quot;Oh - sorry. I&apos;m who you know as &apos;???&apos;.&quot;:&quot;Richard Ladouceur&quot;,
/// &quot;So listen. You&apos;ve heard of Hacker Battles, right?&quot;:&quot;Richard Ladouceur&quot;,
/// &quot;Well - every skilled hacker needs to know who to hit.&quot;:&quot;Richard Ladouceur&quot;,
/// &quot;Remember that hacker friend I told you about earlier?&quot;:&quot;Richard Ladouceur&quot;,
/// &quot;Yeah - that&apos;s me...&quot;:&quot;Hacker101&quot;,
/// &quot;Me and Richard have plans - and we need your help.&quot;:&quot;Hacker101&quot;,
/// &quot;We&apos;re plannin [rest of string was truncated]&quot;;.
/// </summary>
internal static string MidGame_Holochat {
get {
return ResourceManager.GetString("MidGame_Holochat", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -1562,6 +1620,16 @@ namespace ShiftOS.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to {
///&quot;BufferOverflow&quot;:{&quot;IsLeader&quot;:false,&quot;Name&quot;:&quot;BufferOverflow&quot;,&quot;FriendDesc&quot;:&quot;BufferOverflow is a question-and-answer site with millions of Shifters willing to share their knowledge.&quot;,&quot;Description&quot;:&quot;BufferOverflow is a question-and-answer site with millions of Shifters willing to share their knowledge.&quot;,&quot;FriendSpeed&quot;:0,&quot;FriendSkill&quot;:0,&quot;Difficulty&quot;:&quot;easy&quot;,&quot;Network&quot;:[{&quot;Hostname&quot;:&quot;bufferoverflow&quot;,&quot;ModuleType&quot;:0,&quot;Type&quot;:0,&quot;HP&quot;:100,&quot;Grade&quot;:1,&quot;X&quot;:0,&quot;Y&quot;:0},{&quot;Hostname&quot;:&quot;main_av&quot;,&quot;ModuleType&quot;:0,&quot;Type&quot;:1,&quot;HP&quot;:0,&quot;Grade&quot;: [rest of string was truncated]&quot;;.
/// </summary>
internal static string NetBrowser_Enemies {
get {
return ResourceManager.GetString("NetBrowser_Enemies", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View file

@ -715,9 +715,6 @@
<data name="upgradeartpadpaintbrushtool" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="upgradeartpadpaintbrushtool" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\upgradeartpadpaintbrushtool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\upgradeartpadpaintbrushtool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="iconColourPicker_fw" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconColourPicker.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="object_small2.Image" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="object_small2.Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\object_small2.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\object_small2.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -1201,4 +1198,25 @@
<data name="DevX_Secondary" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="DevX_Secondary" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DevX_Secondary.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> <value>..\Resources\DevX_Secondary.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data> </data>
<data name="Hacker_AustinWalker" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Hacker_AustinWalker.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="Hacker_DanaRoss" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Hacker_DanaRoss.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="Hacker_JonathanRivard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Hacker_JonathanRivard.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="MidGame_Holochat" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MidGame_Holochat.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="NetBrowser_Enemies" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NetBrowser_Enemies.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="iconColourPicker_fw" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconColourPicker.fw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AustinWalkerCompletionStory" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AustinWalkerCompletionStory.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root> </root>

View file

@ -0,0 +1,7 @@
{
"Hey! Seems your Network Browser's working pretty well, huh?":"Richard Ladouceur",
"I keep reading news about networks on the list going offline.":"Richard Ladouceur",
"It's great to see you're doing this, because pretty soon, it'll be DevX's turn to suffer your wrath.":"Richard Ladouceur",
"I've patched your Network Browser to allow you to fight in Tier 3 battles.":"Richard Ladouceur",
"Just be careful - if I'm able to see all of this news, there's no doubt DevX has his eyes on it.":"Richard Ladouceur"
}

View file

@ -0,0 +1 @@
{"IsLeader":true,"Name":"Austin Walker","FriendDesc":"Austin Walker is a retired programmer who worked at Orange Inc. In an attempt to gain even more money, he has trained himself with hacker battles.","Description":"Austin Walker is a retired programmer who worked at Orange Inc. In an attempt to gain even more money, he has trained himself with hacker battles.","FriendSpeed":45,"FriendSkill":150,"Difficulty":"medium","Network":[{"Hostname":"austin_walker","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"aus_ddos_1","ModuleType":0,"Type":6,"HP":0,"Grade":3,"X":489,"Y":242},{"Hostname":"aus_ddos_2","ModuleType":0,"Type":6,"HP":0,"Grade":3,"X":493,"Y":167},{"Hostname":"aus_fw_1","ModuleType":0,"Type":5,"HP":0,"Grade":4,"X":372,"Y":214},{"Hostname":"aus_repair1","ModuleType":0,"Type":9,"HP":0,"Grade":4,"X":553,"Y":212},{"Hostname":"aus_repair2","ModuleType":0,"Type":9,"HP":0,"Grade":4,"X":332,"Y":219},{"Hostname":"aus_repair3","ModuleType":0,"Type":9,"HP":0,"Grade":2,"X":509,"Y":136},{"Hostname":"aus_repair4","ModuleType":0,"Type":9,"HP":0,"Grade":2,"X":504,"Y":297},{"Hostname":"aus_turret1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":425,"Y":263},{"Hostname":"aus_turret2","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":429,"Y":151}]}

View file

@ -0,0 +1 @@
{"Name":"Dana Ross","FriendDesc":"Dana Ross is a new, yet experienced ShiftOS user. She is also experienced in hacking, and is a worthy adversary for any Tier 1 network who dares try her.","Description":"Dana Ross is a new, yet experienced ShiftOS user. She is also experienced in hacking, and is a worthy adversary for any Tier 1 network who dares try her.","FriendSpeed":100,"FriendSkill":100,"Difficulty":"easy","Network":[{"Hostname":"dana_ross","ModuleType":0,"Type":0,"HP":0,"Grade":1,"X":0,"Y":0},{"Hostname":"dr_ddos","ModuleType":0,"Type":6,"HP":0,"Grade":1,"X":659,"Y":208},{"Hostname":"dr_av1","ModuleType":0,"Type":1,"HP":0,"Grade":2,"X":714,"Y":215},{"Hostname":"main_firewall","ModuleType":0,"Type":5,"HP":0,"Grade":3,"X":526,"Y":220},{"Hostname":"trt_1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":600,"Y":154},{"Hostname":"trt_2","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":599,"Y":281}],"IsLeader":true}

View file

@ -0,0 +1 @@
{"IsLeader":false,"Name":"Jonathan Rivard","FriendDesc":"Jonathan is a 13 year old from the city of New York, who was also hijacked by DevX and told to try ShiftOS out. He was a member of the Hacker Alliance, but decided to leave to accomplish his goal of becoming a hacker battle giant. Just goes to show that kids can also be extremely competent hackers.","Description":"Jonathan is a 13 year old from the city of New York, who was also hijacked by DevX and told to try ShiftOS out. He was a member of the Hacker Alliance, but decided to leave to accomplish his goal of becoming a hacker battle giant. Just goes to show that kids can also be extremely competent hackers.","FriendSpeed":400,"FriendSkill":400,"Difficulty":"hard","Network":[{"Hostname":"jonathan_rivard","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"jr_trt1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":428,"Y":275},{"Hostname":"jr_trt2","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":433,"Y":142},{"Hostname":"jr_trt3","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":494,"Y":215},{"Hostname":"jr_trt4","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":367,"Y":218},{"Hostname":"jr_repair_alpha","ModuleType":0,"Type":9,"HP":0,"Grade":3,"X":364,"Y":276},{"Hostname":"jr_repair_beta","ModuleType":0,"Type":9,"HP":0,"Grade":4,"X":499,"Y":276},{"Hostname":"distributed_denial_of_freedom","ModuleType":0,"Type":2,"HP":0,"Grade":2,"X":492,"Y":149},{"Hostname":"distributed_grant_of_evil","ModuleType":0,"Type":2,"HP":0,"Grade":2,"X":364,"Y":144},{"Hostname":"sorry","ModuleType":0,"Type":6,"HP":0,"Grade":4,"X":543,"Y":196},{"Hostname":"not_really","ModuleType":0,"Type":6,"HP":0,"Grade":4,"X":289,"Y":207}]}

View file

@ -0,0 +1,18 @@
{
"Ahhh, User! I see the installation was successful and you made it.":"Richard Ladouceur",
"Oh - sorry. I'm who you know as '???'.":"Richard Ladouceur",
"So listen. You've heard of Hacker Battles, right?":"Richard Ladouceur",
"Well - every skilled hacker needs to know who to hit.":"Richard Ladouceur",
"Remember that hacker friend I told you about earlier?":"Richard Ladouceur",
"Yeah - that's me...":"Hacker101",
"Me and Richard have plans - and we need your help.":"Hacker101",
"We're planning on stopping DevX right in his tracks.":"Richard Ladouceur",
"And since you have the tools, we figured we'd get you on board.":"Richard Ladouceur",
"But first - I need to install ANOTHER thing on your system.":"Richard Ladouceur",
"It's called the 'Network Browser'. It's a handy tool that'll list various networks you can take down.":"Hacker101",
"It'll tell you their name, leader skill, leader speed, and their tier.":"Hacker101",
"install:networkbrowser":"Hacker101",
"Done. For now, we've locked it to only showing Tier 1 networks.":"Richard Ladouceur",
"Beat all the Tier 1 networks, and beat the leader, and you'll gain a special reward.":"Hacker101",
"Anyways, that's all we've gotta say. Talk to ya later!":"Hacker101"
}

View file

@ -0,0 +1,5 @@
{
"BufferOverflow":{"IsLeader":false,"Name":"BufferOverflow","FriendDesc":"BufferOverflow is a question-and-answer site with millions of Shifters willing to share their knowledge.","Description":"BufferOverflow is a question-and-answer site with millions of Shifters willing to share their knowledge.","FriendSpeed":0,"FriendSkill":0,"Difficulty":"easy","Network":[{"Hostname":"bufferoverflow","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"main_av","ModuleType":0,"Type":1,"HP":0,"Grade":4,"X":371,"Y":148},{"Hostname":"defense1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":252,"Y":121},{"Hostname":"defense2","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":251,"Y":163}]},
"Exodus Software":{"IsLeader":false,"Name":"Exodus Software","FriendDesc":"Known for their ShiftOS desktop environment \"Exodus Desktop Environment\", Exodus Software is well-known among the ShiftOS user-base. Now they're trying to dig their hands into hacker battles.","Description":"Known for their ShiftOS desktop environment \"Exodus Desktop Environment\", Exodus Software is well-known among the ShiftOS user-base. Now they're trying to dig their hands into hacker battles.","FriendSpeed":75,"FriendSkill":45,"Difficulty":"easy","Network":[{"Hostname":"exodus_software","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"exds_turret1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":500,"Y":215},{"Hostname":"exds_antimalware","ModuleType":0,"Type":1,"HP":0,"Grade":1,"X":500,"Y":259},{"Hostname":"exds_antimalware2","ModuleType":0,"Type":1,"HP":0,"Grade":1,"X":498,"Y":162},{"Hostname":"exds_repairman","ModuleType":0,"Type":9,"HP":0,"Grade":2,"X":351,"Y":210}]},
"Orange Inc.":{"IsLeader":false,"Name":"Orange Inc.","FriendDesc":"Orange is a computer industry giant. Let's see how they can compete in a Hacker Battle.","Description":"Orange is a computer industry giant. Let's see how they can compete in a Hacker Battle.","FriendSpeed":100,"FriendSkill":2001,"Difficulty":"hard","Network":[{"Hostname":"orange_inc.","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"blood_orange","ModuleType":0,"Type":6,"HP":0,"Grade":4,"X":484,"Y":203},{"Hostname":"yummy","ModuleType":0,"Type":2,"HP":0,"Grade":3,"X":497,"Y":150},{"Hostname":"juicy","ModuleType":0,"Type":5,"HP":0,"Grade":4,"X":356,"Y":212},{"Hostname":"sweet","ModuleType":0,"Type":9,"HP":0,"Grade":2,"X":316,"Y":212},{"Hostname":"orange","ModuleType":0,"Type":2,"HP":0,"Grade":3,"X":490,"Y":270}]}
}

Binary file not shown.

View file

@ -33,6 +33,7 @@ namespace SaveSystem
public int CodepointMultiplier = 1; public int CodepointMultiplier = 1;
public int PriceDivider = 1; public int PriceDivider = 1;
public string CloudID = ""; public string CloudID = "";
public List<string> CompletedNets = new List<string>();
} }
public class PrivateBitnoteAddress public class PrivateBitnoteAddress
@ -412,17 +413,26 @@ namespace SaveSystem
DefaultUpgrades.Add(new Shiftorium.Upgrade("Hack Command - 0 CP", null, null, "nodisplay", "fundamental")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Hack Command - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Hacker Battles - 0 CP", null, null, "nodisplay", "fundamental")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Hacker Battles - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Mid Game Bridge - 0 CP", null, null, "nodisplay", "fundamental")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Mid Game Bridge - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Network Browser - 0 CP", null, null, "nodisplay", "fundamental"));
//0.1.1/new //0.1.1/new
DefaultUpgrades.Add(new Shiftorium.Upgrade("Fancy Effects - 5000 CP", null, "Have you ever wanted to make your operating system look fancy, adding fade effects and other animations to various parts of the UI? If so, this upgrade is for you!", "limitlesscustomshades;shiftnet", "fancy")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Fancy Effects - 5000 CP", null, "Have you ever wanted to make your operating system look fancy, adding fade effects and other animations to various parts of the UI? If so, this upgrade is for you!", "limitlesscustomshades;shiftnet", "fancy"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Fancy Effects - 45 CP", null, "ShiftOS is looking pretty darn fine now. But, let's make it look even better. With this upgrade you will be able to customize fancy effects in the Shifter!", "advancedshifter;fancyeffects", "fancy")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Shift Fancy Effects - 45 CP", null, "ShiftOS is looking pretty darn fine now. But, let's make it look even better. With this upgrade you will be able to customize fancy effects in the Shifter!", "advancedshifter;fancyeffects", "fancy"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Icon Manager - 45 CP", null, "Add even more customization options to ShiftOS using the new Icon Manager. This tool allows you to change almost any icon on the system!", "advancedshifter;appicons", "useful")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Icon Manager - 45 CP", null, "Add even more customization options to ShiftOS using the new Icon Manager. This tool allows you to change almost any icon on the system!", "advancedshifter;appicons", "useful"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("FS External Devices - 175 CP", null, "Ever wanted to see the contents of another device on the system? For example, a USB drive, CD, floppy, or another hard drive? Well this upgrade is for you. It will give File Skimmer the ability to see other drives on the system.", "fileskimmer", "useful"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Advanced Desktop - 50 CP", null, "Want to further customize the desktop panel? Want to add even more panels, and add custom widgets to the panels? This upgrade's for you!", "desktoppanel;midgamebridge", "useful"));
//0.1.1/category //0.1.1/category
DefaultUpgrades.Add(new Shiftorium.Upgrade("Useful - 0 CP", null, null, "nodisplay", "fundamental")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Useful - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Fancy - 0 CP", null, null, "nodisplay", "fundamental")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Fancy - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Software - 0 CP", null, null, "nodisplay", "fundamental")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Software - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("HoloChat - 0 CP", null, null, "nodisplay", "fundamental")); DefaultUpgrades.Add(new Shiftorium.Upgrade("HoloChat - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("Story Complete - 0 CP", null, null, "nodisplay", "fundamental")); DefaultUpgrades.Add(new Shiftorium.Upgrade("Story Complete - 0 CP", null, null, "nodisplay", "fundamental"));
//0.1.1/netbrowser/tiers
DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_easy - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_medium - 0 CP", null, null, "nodisplay", "fundamental"));
DefaultUpgrades.Add(new Shiftorium.Upgrade("nb_tier_hard - 0 CP", null, null, "nodisplay", "fundamental"));
} }
/// <summary> /// <summary>

View file

@ -268,7 +268,14 @@
<Compile Include="Labyrinth.Designer.cs"> <Compile Include="Labyrinth.Designer.cs">
<DependentUpon>Labyrinth.cs</DependentUpon> <DependentUpon>Labyrinth.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ListViewEx.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ListViewEx.Designer.cs">
<DependentUpon>ListViewEx.cs</DependentUpon>
</Compile>
<Compile Include="Lua_Interp.cs" /> <Compile Include="Lua_Interp.cs" />
<Compile Include="MountMgr.cs" />
<Compile Include="NameChanger.cs"> <Compile Include="NameChanger.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -281,6 +288,18 @@
<Compile Include="NetGen.Designer.cs"> <Compile Include="NetGen.Designer.cs">
<DependentUpon>NetGen.cs</DependentUpon> <DependentUpon>NetGen.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="NetModuleStatus.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="NetModuleStatus.Designer.cs">
<DependentUpon>NetModuleStatus.cs</DependentUpon>
</Compile>
<Compile Include="NetworkBrowser.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NetworkBrowser.Designer.cs">
<DependentUpon>NetworkBrowser.cs</DependentUpon>
</Compile>
<Compile Include="Notification.cs"> <Compile Include="Notification.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
@ -289,6 +308,12 @@
</Compile> </Compile>
<Compile Include="OSInfo.cs" /> <Compile Include="OSInfo.cs" />
<Compile Include="Package_Grabber.cs" /> <Compile Include="Package_Grabber.cs" />
<Compile Include="PanelManager.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PanelManager.Designer.cs">
<DependentUpon>PanelManager.cs</DependentUpon>
</Compile>
<Compile Include="Pong.cs"> <Compile Include="Pong.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -448,15 +473,27 @@
<EmbeddedResource Include="KnowledgeInput.resx"> <EmbeddedResource Include="KnowledgeInput.resx">
<DependentUpon>KnowledgeInput.cs</DependentUpon> <DependentUpon>KnowledgeInput.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="ListViewEx.resx">
<DependentUpon>ListViewEx.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="NameChanger.resx"> <EmbeddedResource Include="NameChanger.resx">
<DependentUpon>NameChanger.cs</DependentUpon> <DependentUpon>NameChanger.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="NetGen.resx"> <EmbeddedResource Include="NetGen.resx">
<DependentUpon>NetGen.cs</DependentUpon> <DependentUpon>NetGen.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="NetModuleStatus.resx">
<DependentUpon>NetModuleStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="NetworkBrowser.resx">
<DependentUpon>NetworkBrowser.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Notification.resx"> <EmbeddedResource Include="Notification.resx">
<DependentUpon>Notification.cs</DependentUpon> <DependentUpon>Notification.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="PanelManager.resx">
<DependentUpon>PanelManager.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Pong.resx"> <EmbeddedResource Include="Pong.resx">
<DependentUpon>Pong.cs</DependentUpon> <DependentUpon>Pong.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -624,7 +661,6 @@
<None Include="Resources\iconBitnoteWallet.png" /> <None Include="Resources\iconBitnoteWallet.png" />
<None Include="Resources\iconCalculator.png" /> <None Include="Resources\iconCalculator.png" />
<None Include="Resources\iconClock.png" /> <None Include="Resources\iconClock.png" />
<None Include="Resources\iconColourPicker.fw.png" />
<None Include="Resources\iconDodge.png" /> <None Include="Resources\iconDodge.png" />
<None Include="Resources\iconDownloader.png" /> <None Include="Resources\iconDownloader.png" />
<None Include="Resources\iconFileOpener.fw.png" /> <None Include="Resources\iconFileOpener.fw.png" />
@ -900,6 +936,13 @@
<None Include="Resources\DevX_Primary.txt" /> <None Include="Resources\DevX_Primary.txt" />
<None Include="Resources\DevX_PrimaryNet.txt" /> <None Include="Resources\DevX_PrimaryNet.txt" />
<None Include="Resources\DevX_Secondary.txt" /> <None Include="Resources\DevX_Secondary.txt" />
<None Include="Resources\MidGame_Holochat.txt" />
<None Include="Resources\NetBrowser_Enemies.txt" />
<None Include="Resources\Hacker_DanaRoss.txt" />
<None Include="Resources\Hacker_AustinWalker.txt" />
<None Include="Resources\Hacker_JonathanRivard.txt" />
<None Include="Resources\iconColourPicker.fw.png" />
<None Include="Resources\AustinWalkerCompletionStory.txt" />
<Content Include="Snakey.Designer.vb" /> <Content Include="Snakey.Designer.vb" />
<Content Include="Snakey.vb" /> <Content Include="Snakey.vb" />
<Compile Include="ShiftOSDesktop.cs"> <Compile Include="ShiftOSDesktop.cs">

View file

@ -155,6 +155,7 @@
this.ShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.scriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addDesktopPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.addDesktopPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.widgetManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.imgshiftnetapps = new System.Windows.Forms.ImageList(this.components); this.imgshiftnetapps = new System.Windows.Forms.ImageList(this.components);
this.lbldebug = new System.Windows.Forms.Label(); this.lbldebug = new System.Windows.Forms.Label();
this.lblog = new System.Windows.Forms.Label(); this.lblog = new System.Windows.Forms.Label();
@ -170,7 +171,6 @@
this.appLauncherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.appLauncherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panelButtonsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.panelButtonsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clockToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.clockToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.widgetManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.desktoppanel.SuspendLayout(); this.desktoppanel.SuspendLayout();
this.applaunchermenuholder.SuspendLayout(); this.applaunchermenuholder.SuspendLayout();
this.desktopappmenu.SuspendLayout(); this.desktopappmenu.SuspendLayout();
@ -237,19 +237,21 @@
// //
this.pnlnotifications.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlnotifications.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlnotifications.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; this.pnlnotifications.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.pnlnotifications.Location = new System.Drawing.Point(1083, 0); this.pnlnotifications.Location = new System.Drawing.Point(132, 0);
this.pnlnotifications.Name = "pnlnotifications"; this.pnlnotifications.Name = "pnlnotifications";
this.pnlnotifications.Size = new System.Drawing.Size(88, 24); this.pnlnotifications.Size = new System.Drawing.Size(1039, 24);
this.pnlnotifications.TabIndex = 2; this.pnlnotifications.TabIndex = 2;
// //
// pnlpanelbuttonholder // pnlpanelbuttonholder
// //
this.pnlpanelbuttonholder.AutoSize = true;
this.pnlpanelbuttonholder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.pnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; this.pnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent;
this.pnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Left; this.pnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlpanelbuttonholder.Location = new System.Drawing.Point(130, 0); this.pnlpanelbuttonholder.Location = new System.Drawing.Point(130, 0);
this.pnlpanelbuttonholder.Name = "pnlpanelbuttonholder"; this.pnlpanelbuttonholder.Name = "pnlpanelbuttonholder";
this.pnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); this.pnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.pnlpanelbuttonholder.Size = new System.Drawing.Size(953, 24); this.pnlpanelbuttonholder.Size = new System.Drawing.Size(2, 24);
this.pnlpanelbuttonholder.TabIndex = 1; this.pnlpanelbuttonholder.TabIndex = 1;
// //
// applaunchermenuholder // applaunchermenuholder
@ -1157,7 +1159,7 @@
this.addDesktopPanelToolStripMenuItem, this.addDesktopPanelToolStripMenuItem,
this.widgetManagerToolStripMenuItem}); this.widgetManagerToolStripMenuItem});
this.cmbdesktopoptions.Name = "ContextMenuStrip1"; this.cmbdesktopoptions.Name = "ContextMenuStrip1";
this.cmbdesktopoptions.Size = new System.Drawing.Size(175, 92); this.cmbdesktopoptions.Size = new System.Drawing.Size(175, 70);
// //
// NewToolStripMenuItem // NewToolStripMenuItem
// //
@ -1177,49 +1179,49 @@
// FolderToolStripMenuItem // FolderToolStripMenuItem
// //
this.FolderToolStripMenuItem.Name = "FolderToolStripMenuItem"; this.FolderToolStripMenuItem.Name = "FolderToolStripMenuItem";
this.FolderToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.FolderToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.FolderToolStripMenuItem.Text = "Folder"; this.FolderToolStripMenuItem.Text = "Folder";
this.FolderToolStripMenuItem.Click += new System.EventHandler(this.FolderToolStripMenuItem_Click); this.FolderToolStripMenuItem.Click += new System.EventHandler(this.FolderToolStripMenuItem_Click);
// //
// ToolStripMenuItem2 // ToolStripMenuItem2
// //
this.ToolStripMenuItem2.Name = "ToolStripMenuItem2"; this.ToolStripMenuItem2.Name = "ToolStripMenuItem2";
this.ToolStripMenuItem2.Size = new System.Drawing.Size(151, 6); this.ToolStripMenuItem2.Size = new System.Drawing.Size(152, 6);
// //
// ArtpadPictureToolStripMenuItem // ArtpadPictureToolStripMenuItem
// //
this.ArtpadPictureToolStripMenuItem.Name = "ArtpadPictureToolStripMenuItem"; this.ArtpadPictureToolStripMenuItem.Name = "ArtpadPictureToolStripMenuItem";
this.ArtpadPictureToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.ArtpadPictureToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.ArtpadPictureToolStripMenuItem.Text = "Artpad Picture"; this.ArtpadPictureToolStripMenuItem.Text = "Artpad Picture";
// //
// TextDocumentToolStripMenuItem // TextDocumentToolStripMenuItem
// //
this.TextDocumentToolStripMenuItem.Name = "TextDocumentToolStripMenuItem"; this.TextDocumentToolStripMenuItem.Name = "TextDocumentToolStripMenuItem";
this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.TextDocumentToolStripMenuItem.Text = "Text Document"; this.TextDocumentToolStripMenuItem.Text = "Text Document";
// //
// NewSkin // NewSkin
// //
this.NewSkin.Name = "NewSkin"; this.NewSkin.Name = "NewSkin";
this.NewSkin.Size = new System.Drawing.Size(154, 22); this.NewSkin.Size = new System.Drawing.Size(155, 22);
this.NewSkin.Text = "Skin"; this.NewSkin.Text = "Skin";
this.NewSkin.Click += new System.EventHandler(this.NewSkin_Click); this.NewSkin.Click += new System.EventHandler(this.NewSkin_Click);
// //
// WebpageToolStripMenuItem // WebpageToolStripMenuItem
// //
this.WebpageToolStripMenuItem.Name = "WebpageToolStripMenuItem"; this.WebpageToolStripMenuItem.Name = "WebpageToolStripMenuItem";
this.WebpageToolStripMenuItem.Size = new System.Drawing.Size(151, 6); this.WebpageToolStripMenuItem.Size = new System.Drawing.Size(152, 6);
// //
// ShortcutToolStripMenuItem // ShortcutToolStripMenuItem
// //
this.ShortcutToolStripMenuItem.Name = "ShortcutToolStripMenuItem"; this.ShortcutToolStripMenuItem.Name = "ShortcutToolStripMenuItem";
this.ShortcutToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.ShortcutToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.ShortcutToolStripMenuItem.Text = "Shortcut"; this.ShortcutToolStripMenuItem.Text = "Shortcut";
// //
// scriptToolStripMenuItem // scriptToolStripMenuItem
// //
this.scriptToolStripMenuItem.Name = "scriptToolStripMenuItem"; this.scriptToolStripMenuItem.Name = "scriptToolStripMenuItem";
this.scriptToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.scriptToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.scriptToolStripMenuItem.Text = "Script"; this.scriptToolStripMenuItem.Text = "Script";
this.scriptToolStripMenuItem.Click += new System.EventHandler(this.scriptToolStripMenuItem_Click); this.scriptToolStripMenuItem.Click += new System.EventHandler(this.scriptToolStripMenuItem_Click);
// //
@ -1230,6 +1232,13 @@
this.addDesktopPanelToolStripMenuItem.Text = "Add Desktop Panel"; this.addDesktopPanelToolStripMenuItem.Text = "Add Desktop Panel";
this.addDesktopPanelToolStripMenuItem.Click += new System.EventHandler(this.addDesktopPanelToolStripMenuItem_Click); this.addDesktopPanelToolStripMenuItem.Click += new System.EventHandler(this.addDesktopPanelToolStripMenuItem_Click);
// //
// widgetManagerToolStripMenuItem
//
this.widgetManagerToolStripMenuItem.Name = "widgetManagerToolStripMenuItem";
this.widgetManagerToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
this.widgetManagerToolStripMenuItem.Text = "Widget Manager";
this.widgetManagerToolStripMenuItem.Click += new System.EventHandler(this.widgetManagerToolStripMenuItem_Click);
//
// imgshiftnetapps // imgshiftnetapps
// //
this.imgshiftnetapps.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; this.imgshiftnetapps.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@ -1317,6 +1326,7 @@
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(174, 22); this.optionsToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
this.optionsToolStripMenuItem.Text = "Options"; this.optionsToolStripMenuItem.Text = "Options";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
// //
// placeHereToolStripMenuItem // placeHereToolStripMenuItem
// //
@ -1349,13 +1359,6 @@
this.clockToolStripMenuItem1.Text = "Clock"; this.clockToolStripMenuItem1.Text = "Clock";
this.clockToolStripMenuItem1.Click += new System.EventHandler(this.clockToolStripMenuItem1_Click); this.clockToolStripMenuItem1.Click += new System.EventHandler(this.clockToolStripMenuItem1_Click);
// //
// widgetManagerToolStripMenuItem
//
this.widgetManagerToolStripMenuItem.Name = "widgetManagerToolStripMenuItem";
this.widgetManagerToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
this.widgetManagerToolStripMenuItem.Text = "Widget Manager";
this.widgetManagerToolStripMenuItem.Click += new System.EventHandler(this.widgetManagerToolStripMenuItem_Click);
//
// ShiftOSDesktop // ShiftOSDesktop
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1372,6 +1375,7 @@
this.Text = "ShiftOSDesktop"; this.Text = "ShiftOSDesktop";
this.Load += new System.EventHandler(this.ShiftOSDesktop_Load); this.Load += new System.EventHandler(this.ShiftOSDesktop_Load);
this.desktoppanel.ResumeLayout(false); this.desktoppanel.ResumeLayout(false);
this.desktoppanel.PerformLayout();
this.applaunchermenuholder.ResumeLayout(false); this.applaunchermenuholder.ResumeLayout(false);
this.desktopappmenu.ResumeLayout(false); this.desktopappmenu.ResumeLayout(false);
this.desktopappmenu.PerformLayout(); this.desktopappmenu.PerformLayout();

View file

@ -178,7 +178,7 @@ namespace ShiftOS
this.BackColor = Color.FromArgb(r, g, b); this.BackColor = Color.FromArgb(r, g, b);
this.BackgroundImage = null; this.BackgroundImage = null;
} }
if (Viruses.InfectedWith("holyfuckmyears")) if (Viruses.InfectedWith("ow"))
{ {
Random rand = new Random(); Random rand = new Random();
switch (rand.Next(0, 3)) { switch (rand.Next(0, 3)) {
@ -241,7 +241,32 @@ namespace ShiftOS
CheckUnity(); CheckUnity();
SetupWidgets(); SetupWidgets();
CheckForChristmas(); CheckForChristmas();
//Set up the context menus.
addDesktopPanelToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"];
widgetManagerToolStripMenuItem.Visible = API.Upgrades["advanceddesktop"];
if (API.Upgrades["advanceddesktop"])
{
AppLauncherPanel.ContextMenuStrip = cbwidget;
Clock.ContextMenuStrip = cbwidget;
PanelButtonHolder.ContextMenuStrip = cbwidget;
}
else
{
AppLauncherPanel.ContextMenuStrip = null;
Clock.ContextMenuStrip = null;
PanelButtonHolder.ContextMenuStrip = null;
}
foreach(var dp in DesktopPanels)
{
if(API.Upgrades["advanceddesktop"])
{
dp.ContextMenuStrip = cbdpanel;
}
else
{
dp.ContextMenuStrip = cbdpanel;
}
}
} }
public void SetupWidgets() public void SetupWidgets()
@ -455,57 +480,42 @@ namespace ShiftOS
{ {
if (this.Controls.Contains(pnl)) if (this.Controls.Contains(pnl))
{ {
pnl.Hide();
this.Controls.Remove(pnl); this.Controls.Remove(pnl);
} }
} }
} }
var old_list = new List<Skinning.DesktopPanel>();
var dp = new Skinning.DesktopPanel();
dp.Position = API.CurrentSkin.desktoppanelposition;
dp.Height = API.CurrentSkin.desktoppanelheight;
dp.BackgroundColor = API.CurrentSkin.desktoppanelcolour;
dp.BackgroundImage = API.CurrentSkinImages.desktoppanel;
old_list.Add(dp);
if (API.CurrentSkin.DesktopPanels.Count == 0) if (API.CurrentSkin.DesktopPanels.Count == 0)
{ {
var dp = new Skinning.DesktopPanel(); API.CurrentSkin.DesktopPanels = old_list;
dp.Position = API.CurrentSkin.desktoppanelposition;
dp.Height = API.CurrentSkin.desktoppanelheight;
dp.BackgroundColor = API.CurrentSkin.desktoppanelcolour;
API.CurrentSkin.DesktopPanels.Add(dp);
} }
DesktopPanels = new List<Panel>(); if(API.Upgrades["advanceddesktop"])
foreach (var dp in API.CurrentSkin.DesktopPanels)
{ {
Panel pnl = new Panel(); SetupPanels(API.CurrentSkin.DesktopPanels);
pnl.BackColor = dp.BackgroundColor;
switch (dp.Position)
{
case "Top":
pnl.Dock = DockStyle.Top;
break;
case "Bottom":
pnl.Dock = DockStyle.Bottom;
break;
}
pnl.Tag = dp;
pnl.Height = dp.Height;
this.DesktopPanels.Add(pnl);
this.Controls.Add(pnl);
} }
if (DesktopPanels != null) else
{ {
foreach (var pnl in DesktopPanels) if(API.Upgrades["desktoppanel"])
{ {
if (this.Controls.Contains(pnl)) SetupPanels(old_list);
{
this.Controls.Remove(pnl);
}
} }
} }
if (API.CurrentSkin.DesktopPanels.Count == 0) desktopappmenu.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.applauncherlayout;
{ }
var dp = new Skinning.DesktopPanel();
dp.Position = "Top"; public void SetupPanels(List<Skinning.DesktopPanel> lst)
dp.Height = API.CurrentSkin.desktoppanelheight; {
dp.BackgroundColor = API.CurrentSkin.desktoppanelcolour;
API.CurrentSkin.DesktopPanels.Add(dp);
}
DesktopPanels = new List<Panel>(); DesktopPanels = new List<Panel>();
foreach (var dp in API.CurrentSkin.DesktopPanels)
foreach (var dp in lst)
{ {
Panel pnl = new Panel(); Panel pnl = new Panel();
pnl.BackColor = dp.BackgroundColor; pnl.BackColor = dp.BackgroundColor;
@ -522,7 +532,7 @@ namespace ShiftOS
pnl.Height = dp.Height; pnl.Height = dp.Height;
pnl.MouseMove += (object s, MouseEventArgs a) => pnl.MouseMove += (object s, MouseEventArgs a) =>
{ {
if(MovingControl != null) if (MovingControl != null)
{ {
var newloc = new Point(a.X + 15, 0); var newloc = new Point(a.X + 15, 0);
var proper = pnl.PointToClient(newloc); var proper = pnl.PointToClient(newloc);
@ -531,15 +541,15 @@ namespace ShiftOS
}; };
pnl.MouseDown += (object s, MouseEventArgs a) => pnl.MouseDown += (object s, MouseEventArgs a) =>
{ {
if(MovingControl != null) if (MovingControl != null)
{ {
if(a.Button == MouseButtons.Left) if (a.Button == MouseButtons.Left)
{ {
var w = (Skinning.DesktopWidget)MovingControl.Tag; var w = (Skinning.DesktopWidget)MovingControl.Tag;
w.XLocation = MovingControl.Left; w.XLocation = MovingControl.Left;
Skinning.Utilities.saveskin(); Skinning.Utilities.saveskin();
} }
else if(a.Button == MouseButtons.Left) else if (a.Button == MouseButtons.Left)
{ {
var w = (Skinning.DesktopWidget)MovingControl.Tag; var w = (Skinning.DesktopWidget)MovingControl.Tag;
MovingControl.Left = w.XLocation; MovingControl.Left = w.XLocation;
@ -549,50 +559,63 @@ namespace ShiftOS
MovingControl = null; MovingControl = null;
} }
}; };
this.DesktopPanels.Add(pnl); DesktopPanels.Add(pnl);
this.Controls.Add(pnl);
}
//AL bug fix with mouse-over/click behavior
desktopappmenu.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.applauncherlayout;
foreach (var dp in DesktopPanels)
{
if (API.Upgrades["desktoppanel"] == true) if (API.Upgrades["desktoppanel"] == true)
{ {
if (API.CurrentSkinImages.desktoppanel == null) if (dp.BackgroundImage == null)
{ {
dp.BackgroundImage = null; pnl.BackgroundImage = null;
} }
else { else
dp.BackgroundImage = API.CurrentSkinImages.desktoppanel;
dp.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.desktoppanellayout;
dp.BackColor = Color.Transparent;
}
var t = (Skinning.DesktopPanel)dp.Tag;
if (API.CurrentSkin.ALPosition == t.Position)
{ {
ChangePosition(AppLauncherPanel, dp); pnl.BackgroundImage = dp.BackgroundImage;
pnl.BackgroundImageLayout = (ImageLayout)API.CurrentSkin.desktoppanellayout;
pnl.BackColor = Color.Transparent;
} }
if (API.CurrentSkin.PanelButtonPosition == t.Position) if (lst.Count > 1)
{ {
ChangePosition(PanelButtonHolder, dp); if (API.CurrentSkin.ALPosition == dp.Position)
{
ChangePosition(AppLauncherPanel, pnl);
}
if (API.CurrentSkin.PanelButtonPosition == dp.Position)
{
ChangePosition(PanelButtonHolder, pnl);
}
if (API.CurrentSkin.ClockPosition == dp.Position)
{
ChangePosition(Clock, pnl);
}
} }
if (API.CurrentSkin.ClockPosition == t.Position) else
{ {
ChangePosition(Clock, dp); ChangePosition(AppLauncherPanel, pnl);
ChangePosition(PanelButtonHolder, pnl);
ChangePosition(Clock, pnl);
} }
dp.MouseDown += (object s, MouseEventArgs a) => pnl.MouseDown += (object s, MouseEventArgs a) =>
{ {
if (a.Button == MouseButtons.Right) if (a.Button == MouseButtons.Right)
{ {
SelectedObject = dp; SelectedObject = pnl;
} }
}; };
dp.Size = new Size(desktoppanel.Size.Width, API.CurrentSkin.desktoppanelheight); if (API.Upgrades["advanceddesktop"])
dp.Show(); {
pnl.ContextMenuStrip = cbdpanel;
}
else
{
pnl.ContextMenuStrip = null;
}
pnl.Size = new Size(desktoppanel.Size.Width, dp.Height);
this.Controls.Add(pnl);
pnl.Show();
} }
else { else
dp.Hide(); {
this.Controls.Remove(dp); pnl.Hide();
this.Controls.Remove(pnl);
} }
} }
@ -1156,6 +1179,12 @@ namespace ShiftOS
{ {
API.CreateForm(new WidgetManager(), "Widget Manager", API.GetIcon("WidgetManager")); API.CreateForm(new WidgetManager(), "Widget Manager", API.GetIcon("WidgetManager"));
} }
private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
{
var dp = (Skinning.DesktopPanel)SelectedObject.Tag;
API.CreateForm(new PanelManager(dp), "Panel Options", API.GetIcon("PanelOptions"));
}
} }
public class DesktopIconManager public class DesktopIconManager

View file

@ -110,14 +110,14 @@ namespace ShiftOS
this.Label95 = new System.Windows.Forms.Label(); this.Label95 = new System.Windows.Forms.Label();
this.pnldesktoppaneloptions = new System.Windows.Forms.Panel(); this.pnldesktoppaneloptions = new System.Windows.Forms.Panel();
this.btnpanelbuttons = new System.Windows.Forms.Button(); this.btnpanelbuttons = new System.Windows.Forms.Button();
this.Label27 = new System.Windows.Forms.Label(); this.lbwarning = new System.Windows.Forms.Label();
this.combodesktoppanelposition = new System.Windows.Forms.ComboBox(); this.combodesktoppanelposition = new System.Windows.Forms.ComboBox();
this.Label46 = new System.Windows.Forms.Label(); this.lbposition = new System.Windows.Forms.Label();
this.Label47 = new System.Windows.Forms.Label(); this.Label47 = new System.Windows.Forms.Label();
this.txtdesktoppanelheight = new System.Windows.Forms.NumericUpDown(); this.txtdesktoppanelheight = new System.Windows.Forms.NumericUpDown();
this.Label48 = new System.Windows.Forms.Label(); this.lbheight = new System.Windows.Forms.Label();
this.pnldesktoppanelcolour = new System.Windows.Forms.Panel(); this.pnldesktoppanelcolour = new System.Windows.Forms.Panel();
this.Label49 = new System.Windows.Forms.Label(); this.lbpanelcolor = new System.Windows.Forms.Label();
this.pnldesktopbackgroundoptions = new System.Windows.Forms.Panel(); this.pnldesktopbackgroundoptions = new System.Windows.Forms.Panel();
this.pnldesktopcolour = new System.Windows.Forms.Panel(); this.pnldesktopcolour = new System.Windows.Forms.Panel();
this.Label45 = new System.Windows.Forms.Label(); this.Label45 = new System.Windows.Forms.Label();
@ -699,10 +699,10 @@ namespace ShiftOS
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.pnldesktopoptions.BackColor = System.Drawing.Color.White; this.pnldesktopoptions.BackColor = System.Drawing.Color.White;
this.pnldesktopoptions.Controls.Add(this.pnldesktoppaneloptions);
this.pnldesktopoptions.Controls.Add(this.pnlapplauncheroptions); this.pnldesktopoptions.Controls.Add(this.pnlapplauncheroptions);
this.pnldesktopoptions.Controls.Add(this.pnldesktopintro); this.pnldesktopoptions.Controls.Add(this.pnldesktopintro);
this.pnldesktopoptions.Controls.Add(this.pnlpanelbuttonsoptions); this.pnldesktopoptions.Controls.Add(this.pnlpanelbuttonsoptions);
this.pnldesktopoptions.Controls.Add(this.pnldesktoppaneloptions);
this.pnldesktopoptions.Controls.Add(this.pnldesktopbackgroundoptions); this.pnldesktopoptions.Controls.Add(this.pnldesktopbackgroundoptions);
this.pnldesktopoptions.Controls.Add(this.pnlpanelclockoptions); this.pnldesktopoptions.Controls.Add(this.pnlpanelclockoptions);
this.pnldesktopoptions.Controls.Add(this.pnldesktoppreview); this.pnldesktopoptions.Controls.Add(this.pnldesktoppreview);
@ -1430,14 +1430,14 @@ namespace ShiftOS
// //
this.pnldesktoppaneloptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.pnldesktoppaneloptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.pnldesktoppaneloptions.Controls.Add(this.btnpanelbuttons); this.pnldesktoppaneloptions.Controls.Add(this.btnpanelbuttons);
this.pnldesktoppaneloptions.Controls.Add(this.Label27); this.pnldesktoppaneloptions.Controls.Add(this.lbwarning);
this.pnldesktoppaneloptions.Controls.Add(this.combodesktoppanelposition); this.pnldesktoppaneloptions.Controls.Add(this.combodesktoppanelposition);
this.pnldesktoppaneloptions.Controls.Add(this.Label46); this.pnldesktoppaneloptions.Controls.Add(this.lbposition);
this.pnldesktoppaneloptions.Controls.Add(this.Label47); this.pnldesktoppaneloptions.Controls.Add(this.Label47);
this.pnldesktoppaneloptions.Controls.Add(this.txtdesktoppanelheight); this.pnldesktoppaneloptions.Controls.Add(this.txtdesktoppanelheight);
this.pnldesktoppaneloptions.Controls.Add(this.Label48); this.pnldesktoppaneloptions.Controls.Add(this.lbheight);
this.pnldesktoppaneloptions.Controls.Add(this.pnldesktoppanelcolour); this.pnldesktoppaneloptions.Controls.Add(this.pnldesktoppanelcolour);
this.pnldesktoppaneloptions.Controls.Add(this.Label49); this.pnldesktoppaneloptions.Controls.Add(this.lbpanelcolor);
this.pnldesktoppaneloptions.Location = new System.Drawing.Point(135, 159); this.pnldesktoppaneloptions.Location = new System.Drawing.Point(135, 159);
this.pnldesktoppaneloptions.Name = "pnldesktoppaneloptions"; this.pnldesktoppaneloptions.Name = "pnldesktoppaneloptions";
this.pnldesktoppaneloptions.Size = new System.Drawing.Size(317, 140); this.pnldesktoppaneloptions.Size = new System.Drawing.Size(317, 140);
@ -1457,13 +1457,13 @@ namespace ShiftOS
this.btnpanelbuttons.UseVisualStyleBackColor = false; this.btnpanelbuttons.UseVisualStyleBackColor = false;
this.btnpanelbuttons.Click += new System.EventHandler(this.btnpanelbuttons_Click); this.btnpanelbuttons.Click += new System.EventHandler(this.btnpanelbuttons_Click);
// //
// Label27 // lbwarning
// //
this.Label27.Location = new System.Drawing.Point(3, 52); this.lbwarning.Location = new System.Drawing.Point(3, 52);
this.Label27.Name = "Label27"; this.lbwarning.Name = "lbwarning";
this.Label27.Size = new System.Drawing.Size(290, 42); this.lbwarning.Size = new System.Drawing.Size(290, 42);
this.Label27.TabIndex = 8; this.lbwarning.TabIndex = 8;
this.Label27.Text = "Warning: If you set the panel position to the bottom you must hide your windows t" + this.lbwarning.Text = "Warning: If you set the panel position to the bottom you must hide your windows t" +
"askbar and restart ShiftOS on your host operating system to prevent a visual bug" + "askbar and restart ShiftOS on your host operating system to prevent a visual bug" +
"."; ".";
// //
@ -1480,15 +1480,15 @@ namespace ShiftOS
this.combodesktoppanelposition.TabIndex = 7; this.combodesktoppanelposition.TabIndex = 7;
this.combodesktoppanelposition.SelectedIndexChanged += new System.EventHandler(this.combodesktoppanelposition_SelectedIndexChanged); this.combodesktoppanelposition.SelectedIndexChanged += new System.EventHandler(this.combodesktoppanelposition_SelectedIndexChanged);
// //
// Label46 // lbposition
// //
this.Label46.AutoSize = true; this.lbposition.AutoSize = true;
this.Label46.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label46.Location = new System.Drawing.Point(3, 31); this.lbposition.Location = new System.Drawing.Point(3, 31);
this.Label46.Name = "Label46"; this.lbposition.Name = "lbposition";
this.Label46.Size = new System.Drawing.Size(97, 16); this.lbposition.Size = new System.Drawing.Size(97, 16);
this.Label46.TabIndex = 6; this.lbposition.TabIndex = 6;
this.Label46.Text = "Panel Position:"; this.lbposition.Text = "Panel Position:";
// //
// Label47 // Label47
// //
@ -1512,15 +1512,15 @@ namespace ShiftOS
this.txtdesktoppanelheight.TabIndex = 4; this.txtdesktoppanelheight.TabIndex = 4;
this.txtdesktoppanelheight.ValueChanged += new System.EventHandler(this.txtdesktoppanelheight_ValueChanged); this.txtdesktoppanelheight.ValueChanged += new System.EventHandler(this.txtdesktoppanelheight_ValueChanged);
// //
// Label48 // lbheight
// //
this.Label48.AutoSize = true; this.lbheight.AutoSize = true;
this.Label48.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label48.Location = new System.Drawing.Point(138, 7); this.lbheight.Location = new System.Drawing.Point(138, 7);
this.Label48.Name = "Label48"; this.lbheight.Name = "lbheight";
this.Label48.Size = new System.Drawing.Size(50, 16); this.lbheight.Size = new System.Drawing.Size(50, 16);
this.Label48.TabIndex = 2; this.lbheight.TabIndex = 2;
this.Label48.Text = "Height:"; this.lbheight.Text = "Height:";
// //
// pnldesktoppanelcolour // pnldesktoppanelcolour
// //
@ -1530,15 +1530,15 @@ namespace ShiftOS
this.pnldesktoppanelcolour.TabIndex = 1; this.pnldesktoppanelcolour.TabIndex = 1;
this.pnldesktoppanelcolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ChangeDesktopPanelColor); this.pnldesktoppanelcolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ChangeDesktopPanelColor);
// //
// Label49 // lbpanelcolor
// //
this.Label49.AutoSize = true; this.lbpanelcolor.AutoSize = true;
this.Label49.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbpanelcolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label49.Location = new System.Drawing.Point(3, 7); this.lbpanelcolor.Location = new System.Drawing.Point(3, 7);
this.Label49.Name = "Label49"; this.lbpanelcolor.Name = "lbpanelcolor";
this.Label49.Size = new System.Drawing.Size(88, 16); this.lbpanelcolor.Size = new System.Drawing.Size(88, 16);
this.Label49.TabIndex = 0; this.lbpanelcolor.TabIndex = 0;
this.Label49.Text = "Panel Colour:"; this.lbpanelcolor.Text = "Panel Colour:";
// //
// pnldesktopbackgroundoptions // pnldesktopbackgroundoptions
// //
@ -3510,8 +3510,8 @@ namespace ShiftOS
// pgcontents // pgcontents
// //
this.pgcontents.BackColor = System.Drawing.Color.White; this.pgcontents.BackColor = System.Drawing.Color.White;
this.pgcontents.Controls.Add(this.pnldesktopcomposition);
this.pgcontents.Controls.Add(this.pnldesktopoptions); this.pgcontents.Controls.Add(this.pnldesktopoptions);
this.pgcontents.Controls.Add(this.pnldesktopcomposition);
this.pgcontents.Controls.Add(this.pnlreset); this.pgcontents.Controls.Add(this.pnlreset);
this.pgcontents.Controls.Add(this.pnlwindowsoptions); this.pgcontents.Controls.Add(this.pnlwindowsoptions);
this.pgcontents.Controls.Add(this.pnlmenus); this.pgcontents.Controls.Add(this.pnlmenus);
@ -5201,14 +5201,14 @@ namespace ShiftOS
private System.Windows.Forms.Label Label95; private System.Windows.Forms.Label Label95;
private System.Windows.Forms.Panel pnldesktoppaneloptions; private System.Windows.Forms.Panel pnldesktoppaneloptions;
private System.Windows.Forms.Button btnpanelbuttons; private System.Windows.Forms.Button btnpanelbuttons;
private System.Windows.Forms.Label Label27; private System.Windows.Forms.Label lbwarning;
private System.Windows.Forms.ComboBox combodesktoppanelposition; private System.Windows.Forms.ComboBox combodesktoppanelposition;
private System.Windows.Forms.Label Label46; private System.Windows.Forms.Label lbposition;
private System.Windows.Forms.Label Label47; private System.Windows.Forms.Label Label47;
private System.Windows.Forms.NumericUpDown txtdesktoppanelheight; private System.Windows.Forms.NumericUpDown txtdesktoppanelheight;
private System.Windows.Forms.Label Label48; private System.Windows.Forms.Label lbheight;
private System.Windows.Forms.Panel pnldesktoppanelcolour; private System.Windows.Forms.Panel pnldesktoppanelcolour;
private System.Windows.Forms.Label Label49; private System.Windows.Forms.Label lbpanelcolor;
private System.Windows.Forms.Panel pnlapplauncheroptions; private System.Windows.Forms.Panel pnlapplauncheroptions;
private System.Windows.Forms.Label Label71; private System.Windows.Forms.Label Label71;
private System.Windows.Forms.TextBox txtapplauncherwidth; private System.Windows.Forms.TextBox txtapplauncherwidth;

View file

@ -605,7 +605,16 @@ namespace ShiftOS
pnldesktoppaneloptions.Show(); pnldesktoppaneloptions.Show();
pnldesktoppaneloptions.BringToFront(); pnldesktoppaneloptions.BringToFront();
SetupDesktopPanelValues(); SetupDesktopPanelValues();
if(API.Upgrades["advanceddesktop"])
{
lbpanelcolor.Hide();
pnldesktoppanelcolour.Hide();
lbheight.Hide();
txtdesktoppanelheight.Hide();
lbposition.Hide();
combodesktoppanelposition.Hide();
lbwarning.Text = "Desktop Panel customization has been moved from the Shifter! You can right-click panels to change their settings and add/remove widgets.";
}
} }
private void btnapply_Click(object sender, EventArgs e) private void btnapply_Click(object sender, EventArgs e)

View file

@ -193,6 +193,35 @@ namespace ShiftOS
command = command.ToLower(); command = command.ToLower();
} }
internal void StartDanaRossStory()
{
var t = new Thread(new ThreadStart(new Action(() =>
{
WriteLine("User <65.48.121.24> connecting as 'Dana'");
API.PlaySound(Properties.Resources.dial_up_modem_02);
WriteLine("Dana: Hey! That was quite the battle, huh?");
BeepSleep(1000);
WriteLine("Dana: Well - since you beat me, let me let you in on a little secret.");
BeepSleep(3000);
WriteLine("Dana: ShiftOS's desktop may seem pretty complicated and customizable for you right now, but trust me. It gets better.");
BeepSleep(2500);
WriteLine("Dana: I'm gonna patch your Shiftorium so you can get some neat upgrades!");
BeepSleep(3000);
WriteLine("Dana: Also, if you feel like doing more hacker battles, why not check out Tier 2 in the Network Browser?");
BeepSleep(2750);
WriteLine("Dana: I've also added my network modules to your network - you'll just have to wait for them to regenerate.");
BeepSleep(500);
WriteLine("Dana: Well, talk to you some other time!");
BeepSleep(1000);
this.Invoke(new Action(() =>
{
API.Upgrades["midgamebridge"] = true;
this.Close();
}));
})));
t.Start();
}
// ERROR: Handles clauses are not supported in C# // ERROR: Handles clauses are not supported in C#
private void txtterm_Click(object sender, EventArgs e) private void txtterm_Click(object sender, EventArgs e)
{ {
@ -1190,10 +1219,12 @@ Password: z7fjsd3");
WriteLine("DevX: I don't know what I'll do... I don't know when I'll do it... but you will wish you never touched a computer in your life..."); WriteLine("DevX: I don't know what I'll do... I don't know when I'll do it... but you will wish you never touched a computer in your life...");
break; break;
case 6: case 6:
API.Upgrades["devxfurious"] = true;
t.Stop(); t.Stop();
Viruses.DropDevXPayload(); Viruses.DropDevXPayload();
this.Close(); this.Close();
var trm = new Terminal();
API.CreateForm(trm, API.LoadedNames.TerminalName, API.GetIcon("Terminal"));
trm.StartDevXFuriousStory2();
break; break;
} }
i += 1; i += 1;
@ -1201,6 +1232,51 @@ Password: z7fjsd3");
t.Start(); t.Start();
} }
private void StartDevXFuriousStory2()
{
var t = new Thread(new ThreadStart(new Action(() =>
{
WriteLine("User '???' connecting...");
API.PlaySound(Properties.Resources.dial_up_modem_02);
WriteLine("???: Hello? Ummm... this is awkward...");
BeepSleep(3000);
WriteLine("???: Listen - I'm a hacker. Well, not really. I'm friends with one.");
BeepSleep(3000);
WriteLine("???: Seems like DevX completely obliterated your system with one of his viruses.");
BeepSleep(2500);
WriteLine("???: I'll fix that for you.");
API.Upgrades["virusscanner"] = true;
this.Invoke(new Action(() =>
{
this.command = "vscan";
this.DoCommand();
}));
BeepSleep(1000);
WriteLine("???: Better? Cool. Now, I need your help.");
BeepSleep(1250);
WriteLine("???: I can't reveal my identity yet - but I co-own this chat-room...");
BeepSleep(1175);
WriteLine("???: It's called the 'Hacker Alliance'.");
BeepSleep(1000);
WriteLine("???: I'm going to install something called 'HoloChat' on your system. It'll be quick.");
BeepSleep(2000);
WriteLine("Installing HoloChat...");
API.Upgrades["holochat"] = true;
Thread.Sleep(100);
WriteLine("Done. Resetting desktop...");
this.Invoke(new Action(() => { API.CurrentSession.SetupDesktop(); }));
WriteLine("Done.");
Thread.Sleep(3000);
WriteLine("???: Alright - I'll talk to you soon. Just join that chat room when you're ready.");
BeepSleep(1000);
this.Invoke(new Action(() =>
{
this.Close();
}));
})));
t.Start();
}
private LuaInterpreter Interpreter = null; private LuaInterpreter Interpreter = null;
private bool blockctrlt = false; private bool blockctrlt = false;
@ -1215,86 +1291,49 @@ Password: z7fjsd3");
int i = 0; int i = 0;
WriteLine("IP <hidden@shiftnet> connecting as 'Maureen Fenn'..."); WriteLine("IP <hidden@shiftnet> connecting as 'Maureen Fenn'...");
API.PlaySound(Properties.Resources.dial_up_modem_02); API.PlaySound(Properties.Resources.dial_up_modem_02);
tmrstory.Tick += (object s, EventArgs a) => var t = new Thread(new ThreadStart(new Action(() =>
{ {
switch(i) WriteLine("Maureen Fenn: Hey there, user! I have something to show you.");
BeepSleep(4000);
WriteLine("Maureen Fenn: So, there's this thing called the 'Shiftnet'");
BeepSleep(3750);
WriteLine("Maureen Fenn: Turns out, that DevX wants to keep it a secret, as such he only installed it on his and my systems.");
BeepSleep(4250);
WriteLine("Maureen Fenn: But what's the point of listening to DevX when we have people like you who like to experiment?");
BeepSleep(4000);
WriteLine("Maureen Fenn: Well, to be fair - he can destroy whatever he wants. Just like he did my company, Minimatch.");
BeepSleep(3000);
WriteLine("Maureen Fenn: But who cares! I'm going to install a few things on your system.");
API.Upgrades["shiftnet"] = true;
this.Invoke(new Action(() =>
{ {
case 0: this.command = "spkg install shiftnet";
WriteLine("Maureen Fenn: Hello, My name is Maureen Fenn. I want to talk to you about something."); this.DoCommand();
break; }));
case 1: WriteLine("Shiftnet installed on system...");
WriteLine("Maureen Fenn: I am another ShiftOS user. DevX hijacked my computer and installed ShiftOS on it about 2 years ago."); Thread.Sleep(4000);
break; WriteLine("Maureen Fenn: All done! Oh - just before I leave... go ahead and explore the Shiftnet!");
case 2: BeepSleep(3000);
WriteLine("Maureen Fenn: For some reason, he wanted me to develop some applications for ShiftOS and sell them on a Shiftnet website."); WriteLine("Maureen Fenn: But, be careful. Don't venture off the main server. You never know what's elsewhere...");
break; BeepSleep(1000);
case 3: WriteLine("Maureen Fenn: Well, bye!");
WriteLine("Maureen Fenn: He installed the Shiftnet on my system and gave me a neat little API to code them in."); this.Invoke(new Action(() =>
break; {
case 4: API.CurrentSession.SetupDesktop();
WriteLine("Maureen Fenn: It seems that I am the only one who has access to the Shiftnet, so seeings as you are able to run it on your system,"); this.Close();
break; }));
case 5: })));
WriteLine("Maureen Fenn: I figured I would install the Shiftnet client onto your computer."); t.Start();
break; }
case 6:
WriteLine("Maureen Fenn: Just let me connect to your system and install the Shiftnet for you.");
WriteLine("mf@" + API.OSName + " $> root");
break;
case 7:
API.PlaySound(Properties.Resources.typesound);
if(API.Upgrades["multitasking"] == true)
{
API.CreateInfoboxSession("Root connection", "A root connection has been established to your system. Be aware of any unusual, unwanted actions.", infobox.InfoboxMode.Info);
}
else
{
WriteLine("mf: Root connection established!");
}
break;
case 8:
WriteLine("Starting installation of package 'shiftnet.pkg'...");
if(!Directory.Exists(Paths.Applications))
{
Directory.CreateDirectory(Paths.Applications);
} /// <summary>
//Download Shiftnet package using spkg. /// *BEEP* ZZZZZZZZzzzzzzzzzzz.......
API.Upgrades["shiftnet"] = true; /// </summary>
command = "spkg install shiftnet"; /// <param name="time">Time to sleep.</param>
i = 66; private void BeepSleep(int time)
DoCommand(); {
break; API.PlaySound(Properties.Resources.writesound);
case 9: Thread.Sleep(time);
WriteLine("mf: Root connection disbanded.");
WriteLine("Maureen Fenn: There, the Shiftnet is now installed on your system!");
break;
case 10:
WriteLine("Maureen Fenn: I have also hacked on a few Shiftorium upgrades for you to make it a bit easier to run applications from the Shiftnet.");
break;
case 11:
WriteLine("Maureen Fenn: Be sure to check the Shiftorium, and my Shiftnet website on shiftnet://main/minimatch/home.rnp");
break;
case 12:
WriteLine("Maureen Fenn: Also, try not to venture too far off the main server cluster (shiftnet://main/), you may not know who's doing what. The main cluster is safe.");
break;
case 13:
WriteLine("Maureen Fenn: The Shiftnet also comes with a utility that will let you install software from it. Just run 'help' to find out more.");
break;
case 14:
WriteLine("Maureen Fenn: Anyways, I gotta go. Have fun using the Shiftnet! I'm gonna go... work on something else.");
ShiftOS.Hacking.AddCharacter(new Character("Maureen Fenn", "It's time I get back at DevX for what he's done.", 40, 75, 2));
tmrstory.Stop();
this.Close();
break;
case 67:
i = 9;
break;
}
API.PlaySound(Properties.Resources.typesound);
i += 1;
};
tmrstory.Start();
} }
private List<string> GetFonts() private List<string> GetFonts()
@ -1389,6 +1428,28 @@ Password: z7fjsd3");
string[] args = command.ToLower().Split(' '); string[] args = command.ToLower().Split(' ');
switch (args[0]) switch (args[0])
{ {
case "upg":
if(API.DeveloperMode)
{
try
{
switch(args[1])
{
case "get":
WriteLine(API.Upgrades[args[2]].ToString());
break;
}
}
catch
{
}
}
else
{
wrongcommand();
}
break;
case "endgame_test": case "endgame_test":
try try
{ {

View file

@ -284,6 +284,8 @@ namespace Skinning
public string Position = "Top"; public string Position = "Top";
public int Height = 24; public int Height = 24;
public Color BackgroundColor = Color.Gray; public Color BackgroundColor = Color.Gray;
public Image BackgroundImage = null;
public string ImagePath = null;
} }
public class PanelWidget public class PanelWidget
@ -440,6 +442,42 @@ namespace Skinning
} }
} }
/// <summary>
/// Loads background images for all desktop panels
/// </summary>
public static void LoadPanels()
{
foreach(var pnl in loadedSkin.DesktopPanels)
{
string dpath = Paths.LoadedSkin + "panels" + OSInfo.DirectorySeparator + pnl.Position + loadedSkin.DesktopPanels.IndexOf(pnl).ToString();
if (File.Exists(dpath))
{
pnl.BackgroundImage = Image.FromFile(dpath);
}
}
}
/// <summary>
/// Saves background images of panels
/// </summary>
public static void SavePanels()
{
string dir = Paths.LoadedSkin + "panels";
if(Directory.Exists(dir))
{
Directory.Delete(dir, true);
}
Directory.CreateDirectory(dir);
foreach(var pnl in loadedSkin.DesktopPanels)
{
string dpath = Paths.LoadedSkin + "panels" + OSInfo.DirectorySeparator + pnl.Position + loadedSkin.DesktopPanels.IndexOf(pnl).ToString();
if(pnl.BackgroundImage != null)
{
pnl.BackgroundImage.Save(dpath);
pnl.BackgroundImage = null;
}
}
}
/// <summary> /// <summary>
/// Randomize some skin variables. Used for a virus. /// Randomize some skin variables. Used for a virus.
/// </summary> /// </summary>
@ -517,26 +555,26 @@ namespace Skinning
{ {
if(Directory.Exists(Paths.LoadedSkin)) if(Directory.Exists(Paths.LoadedSkin))
{ {
try //try {
{
string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json"); string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json");
loadedSkin = JsonConvert.DeserializeObject<Skin>(rawData); loadedSkin = JsonConvert.DeserializeObject<Skin>(rawData);
if (File.Exists(Paths.LoadedSkin + "panels.json")) if (File.Exists(Paths.LoadedSkin + "panels.json"))
{ {
string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json"); string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json");
loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels); loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels);
LoadPanels();
} }
loadimages(); loadimages();
LoadEmbeddedNamePack(); LoadEmbeddedNamePack();
} /*}
catch (Exception ex) catch
{ {
//No skin to load. //No skin to load.
loadedSkin = new Skin(); loadedSkin = new Skin();
loadedskin_images = new Images(); loadedskin_images = new Images();
saveskin(); saveskin();
} }*/
} else } else
{ {
loadedSkin = new Skin(); loadedSkin = new Skin();
@ -751,6 +789,7 @@ namespace Skinning
saveimages(); saveimages();
string rawjson = JsonConvert.SerializeObject(loadedSkin); string rawjson = JsonConvert.SerializeObject(loadedSkin);
File.WriteAllText(Paths.LoadedSkin + "data.json", rawjson); File.WriteAllText(Paths.LoadedSkin + "data.json", rawjson);
SavePanels();
string panels = JsonConvert.SerializeObject(loadedSkin.DesktopPanels); string panels = JsonConvert.SerializeObject(loadedSkin.DesktopPanels);
File.WriteAllText(Paths.LoadedSkin + "panels.json", panels); File.WriteAllText(Paths.LoadedSkin + "panels.json", panels);
SaveEmbeddedNamePack(); SaveEmbeddedNamePack();