mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
Merge remote-tracking branch 'refs/remotes/shiftos-game/master'
This commit is contained in:
commit
ad387c41e7
62 changed files with 3695 additions and 531 deletions
5
.gitattributes
vendored
5
.gitattributes
vendored
|
@ -61,3 +61,8 @@
|
|||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
|
||||
# don't display Python? hopefully?
|
||||
ShiftOS.Engine/Lib/* linguist-vendored
|
||||
ResourceCompressor/res/Dependencies/* linguist-vendored
|
||||
*.py linguist-vendored
|
||||
|
|
169
ShiftOS.MFSProfiler/Infobox.Designer.cs
generated
Normal file
169
ShiftOS.MFSProfiler/Infobox.Designer.cs
generated
Normal file
|
@ -0,0 +1,169 @@
|
|||
namespace ShiftOS.MFSProfiler
|
||||
{
|
||||
partial class Infobox
|
||||
{
|
||||
/// <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.panel1 = new System.Windows.Forms.Panel();
|
||||
this.txtinput = new System.Windows.Forms.TextBox();
|
||||
this.lbmessage = new System.Windows.Forms.Label();
|
||||
this.flyesno = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnyes = new System.Windows.Forms.Button();
|
||||
this.btnno = new System.Windows.Forms.Button();
|
||||
this.btnok = new System.Windows.Forms.Button();
|
||||
this.pbicon = new System.Windows.Forms.PictureBox();
|
||||
this.panel1.SuspendLayout();
|
||||
this.flyesno.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbicon)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.txtinput);
|
||||
this.panel1.Controls.Add(this.lbmessage);
|
||||
this.panel1.Controls.Add(this.flyesno);
|
||||
this.panel1.Controls.Add(this.btnok);
|
||||
this.panel1.Controls.Add(this.pbicon);
|
||||
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(325, 138);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// txtinput
|
||||
//
|
||||
this.txtinput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtinput.Location = new System.Drawing.Point(88, 77);
|
||||
this.txtinput.Name = "txtinput";
|
||||
this.txtinput.Size = new System.Drawing.Size(234, 20);
|
||||
this.txtinput.TabIndex = 4;
|
||||
//
|
||||
// lbmessage
|
||||
//
|
||||
this.lbmessage.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.lbmessage.Location = new System.Drawing.Point(85, 19);
|
||||
this.lbmessage.Name = "lbmessage";
|
||||
this.lbmessage.Size = new System.Drawing.Size(237, 55);
|
||||
this.lbmessage.TabIndex = 3;
|
||||
this.lbmessage.Text = "label1";
|
||||
this.lbmessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// flyesno
|
||||
//
|
||||
this.flyesno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.flyesno.AutoSize = true;
|
||||
this.flyesno.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flyesno.Controls.Add(this.btnyes);
|
||||
this.flyesno.Controls.Add(this.btnno);
|
||||
this.flyesno.Location = new System.Drawing.Point(129, 95);
|
||||
this.flyesno.Name = "flyesno";
|
||||
this.flyesno.Size = new System.Drawing.Size(78, 29);
|
||||
this.flyesno.TabIndex = 2;
|
||||
this.flyesno.WrapContents = false;
|
||||
//
|
||||
// btnyes
|
||||
//
|
||||
this.btnyes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnyes.AutoSize = true;
|
||||
this.btnyes.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnyes.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnyes.Name = "btnyes";
|
||||
this.btnyes.Size = new System.Drawing.Size(35, 23);
|
||||
this.btnyes.TabIndex = 4;
|
||||
this.btnyes.Text = "Yes";
|
||||
this.btnyes.UseVisualStyleBackColor = true;
|
||||
this.btnyes.Click += new System.EventHandler(this.btnyes_Click);
|
||||
//
|
||||
// btnno
|
||||
//
|
||||
this.btnno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnno.AutoSize = true;
|
||||
this.btnno.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnno.Location = new System.Drawing.Point(44, 3);
|
||||
this.btnno.Name = "btnno";
|
||||
this.btnno.Size = new System.Drawing.Size(31, 23);
|
||||
this.btnno.TabIndex = 3;
|
||||
this.btnno.Text = "No";
|
||||
this.btnno.UseVisualStyleBackColor = true;
|
||||
this.btnno.Click += new System.EventHandler(this.btnno_Click);
|
||||
//
|
||||
// btnok
|
||||
//
|
||||
this.btnok.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnok.AutoSize = true;
|
||||
this.btnok.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnok.Location = new System.Drawing.Point(149, 101);
|
||||
this.btnok.Name = "btnok";
|
||||
this.btnok.Size = new System.Drawing.Size(32, 23);
|
||||
this.btnok.TabIndex = 1;
|
||||
this.btnok.Text = "OK";
|
||||
this.btnok.UseVisualStyleBackColor = true;
|
||||
this.btnok.Click += new System.EventHandler(this.btnok_Click);
|
||||
//
|
||||
// pbicon
|
||||
//
|
||||
this.pbicon.Location = new System.Drawing.Point(14, 19);
|
||||
this.pbicon.Name = "pbicon";
|
||||
this.pbicon.Size = new System.Drawing.Size(64, 64);
|
||||
this.pbicon.TabIndex = 0;
|
||||
this.pbicon.TabStop = false;
|
||||
//
|
||||
// Infobox
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(325, 138);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "Infobox";
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.flyesno.ResumeLayout(false);
|
||||
this.flyesno.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbicon)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label lbmessage;
|
||||
private System.Windows.Forms.FlowLayoutPanel flyesno;
|
||||
private System.Windows.Forms.Button btnyes;
|
||||
private System.Windows.Forms.Button btnno;
|
||||
private System.Windows.Forms.Button btnok;
|
||||
private System.Windows.Forms.PictureBox pbicon;
|
||||
private System.Windows.Forms.TextBox txtinput;
|
||||
}
|
||||
}
|
87
ShiftOS.MFSProfiler/Infobox.cs
Normal file
87
ShiftOS.MFSProfiler/Infobox.cs
Normal file
|
@ -0,0 +1,87 @@
|
|||
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.MFSProfiler
|
||||
{
|
||||
public partial class Infobox : Form
|
||||
{
|
||||
public Infobox()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public Action<string> TextCallback = null;
|
||||
public Action<bool> YesNoCallback = null;
|
||||
|
||||
public string MessageText
|
||||
{
|
||||
get
|
||||
{
|
||||
return lbmessage.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lbmessage.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowText
|
||||
{
|
||||
get { return txtinput.Visible; }
|
||||
set { txtinput.Visible = value; }
|
||||
}
|
||||
|
||||
public bool ShowYesNo
|
||||
{
|
||||
get { return btnyes.Parent.Visible; }
|
||||
set { btnyes.Parent.Visible = value; }
|
||||
}
|
||||
|
||||
public static void PromptYesNo(string title, string message, Action<bool> callback)
|
||||
{
|
||||
var inf = new Infobox();
|
||||
inf.ShowText = false;
|
||||
inf.ShowYesNo = true;
|
||||
inf.Text = title;
|
||||
inf.MessageText = message;
|
||||
inf.YesNoCallback = callback;
|
||||
inf.ShowDialog();
|
||||
}
|
||||
|
||||
public static void PromptText(string title, string message, Action<string> callback)
|
||||
{
|
||||
var inf = new Infobox();
|
||||
inf.ShowYesNo = false;
|
||||
inf.ShowText = true;
|
||||
inf.Text = title;
|
||||
inf.MessageText = message;
|
||||
inf.TextCallback = callback;
|
||||
inf.ShowDialog();
|
||||
}
|
||||
|
||||
private void btnyes_Click(object sender, EventArgs e)
|
||||
{
|
||||
YesNoCallback?.Invoke(true);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnno_Click(object sender, EventArgs e)
|
||||
{
|
||||
YesNoCallback?.Invoke(false);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnok_Click(object sender, EventArgs e)
|
||||
{
|
||||
TextCallback?.Invoke(txtinput.Text);
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.MFSProfiler/Infobox.resx
Normal file
120
ShiftOS.MFSProfiler/Infobox.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
45
ShiftOS.MFSProfiler/Main.Designer.cs
generated
45
ShiftOS.MFSProfiler/Main.Designer.cs
generated
|
@ -56,6 +56,7 @@ namespace ShiftOS.MFSProfiler
|
|||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.tvfiles = new System.Windows.Forms.TreeView();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.pnlfileinfo = new System.Windows.Forms.Panel();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
|
@ -71,6 +72,8 @@ namespace ShiftOS.MFSProfiler
|
|||
this.newFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newDirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exportToMFSFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
|
@ -115,6 +118,8 @@ namespace ShiftOS.MFSProfiler
|
|||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.button3);
|
||||
this.panel1.Controls.Add(this.button2);
|
||||
this.panel1.Controls.Add(this.button1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
|
@ -122,6 +127,16 @@ namespace ShiftOS.MFSProfiler
|
|||
this.panel1.Size = new System.Drawing.Size(246, 30);
|
||||
this.panel1.TabIndex = 1;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(86, 4);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(75, 23);
|
||||
this.button2.TabIndex = 1;
|
||||
this.button2.Text = "Create New";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(4, 4);
|
||||
|
@ -237,14 +252,15 @@ namespace ShiftOS.MFSProfiler
|
|||
this.ctxfileoptions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.newFileToolStripMenuItem,
|
||||
this.newDirectoryToolStripMenuItem,
|
||||
this.deleteToolStripMenuItem});
|
||||
this.deleteToolStripMenuItem,
|
||||
this.exportToMFSFileToolStripMenuItem});
|
||||
this.ctxfileoptions.Name = "ctxfileoptions";
|
||||
this.ctxfileoptions.Size = new System.Drawing.Size(153, 92);
|
||||
this.ctxfileoptions.Size = new System.Drawing.Size(171, 92);
|
||||
//
|
||||
// newFileToolStripMenuItem
|
||||
//
|
||||
this.newFileToolStripMenuItem.Name = "newFileToolStripMenuItem";
|
||||
this.newFileToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.newFileToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
|
||||
this.newFileToolStripMenuItem.Text = "New file";
|
||||
this.newFileToolStripMenuItem.Click += new System.EventHandler(this.newFileToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -253,13 +269,31 @@ namespace ShiftOS.MFSProfiler
|
|||
this.newDirectoryToolStripMenuItem.Name = "newDirectoryToolStripMenuItem";
|
||||
this.newDirectoryToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.newDirectoryToolStripMenuItem.Text = "New directory";
|
||||
this.newDirectoryToolStripMenuItem.Click += new System.EventHandler(this.newDirectoryToolStripMenuItem_Click);
|
||||
//
|
||||
// deleteToolStripMenuItem
|
||||
//
|
||||
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
|
||||
this.deleteToolStripMenuItem.Text = "Delete";
|
||||
//
|
||||
// exportToMFSFileToolStripMenuItem
|
||||
//
|
||||
this.exportToMFSFileToolStripMenuItem.Name = "exportToMFSFileToolStripMenuItem";
|
||||
this.exportToMFSFileToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
|
||||
this.exportToMFSFileToolStripMenuItem.Text = "Export To MFS File";
|
||||
this.exportToMFSFileToolStripMenuItem.Click += new System.EventHandler(this.exportToMFSFileToolStripMenuItem_Click);
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Location = new System.Drawing.Point(167, 3);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(75, 23);
|
||||
this.button3.TabIndex = 2;
|
||||
this.button3.Text = "From Dir";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// Main
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -306,6 +340,9 @@ namespace ShiftOS.MFSProfiler
|
|||
private System.Windows.Forms.ToolStripMenuItem newFileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem newDirectoryToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.ToolStripMenuItem exportToMFSFileToolStripMenuItem;
|
||||
private System.Windows.Forms.Button button3;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -135,9 +135,101 @@ System path: {tvfiles.SelectedNode.Tag.ToString()}";
|
|||
|
||||
private void newFileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var fCreator = new FileCreator(tvfiles.SelectedNode.Tag.ToString());
|
||||
if(fCreator.ShowDialog() == DialogResult.OK)
|
||||
var opener = new OpenFileDialog();
|
||||
opener.Title = "Import file into ShiftFS";
|
||||
opener.Filter = "All files|*.*";
|
||||
opener.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
if (opener.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
var bytes = System.IO.File.ReadAllBytes(opener.FileName);
|
||||
WriteAllBytes(tvfiles.SelectedNode.Tag.ToString() + "/" + opener.SafeFileName, bytes);
|
||||
SetupTree();
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
Infobox.PromptText("Create filesystem", "Please name your file system.", (result) =>
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(result))
|
||||
MessageBox.Show(text: "ShiftFS does not allow blank volume names.", caption: "Volume name can't be blank", icon: MessageBoxIcon.Error, buttons:MessageBoxButtons.OK);
|
||||
else
|
||||
{
|
||||
var dir = new Directory();
|
||||
dir.Name = result;
|
||||
dir.permissions = Objects.UserPermissions.Guest;
|
||||
Mounts.Add(dir);
|
||||
SetupTree();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void newDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DirectoryExists(tvfiles.SelectedNode.Tag.ToString()))
|
||||
{
|
||||
Infobox.PromptText("New directory", "Please name your directory.", (result) =>
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(result))
|
||||
MessageBox.Show(text: "ShiftFS does not allow blank directory names.", caption: "Directory name can't be blank", icon: MessageBoxIcon.Error, buttons: MessageBoxButtons.OK);
|
||||
else
|
||||
{
|
||||
var dinf = GetDirectoryInfo(tvfiles.SelectedNode.Tag.ToString());
|
||||
dinf.AddDirectory(new Directory
|
||||
{
|
||||
Name = result,
|
||||
permissions = Objects.UserPermissions.Guest
|
||||
});
|
||||
SetupTree();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void Import(string win, string sfs)
|
||||
{
|
||||
foreach(var dir in System.IO.Directory.GetDirectories(win))
|
||||
{
|
||||
var dinf = new System.IO.DirectoryInfo(dir);
|
||||
CreateDirectory(sfs + dinf.Name);
|
||||
Import(dir, sfs + dinf.Name + "/");
|
||||
}
|
||||
foreach(var file in System.IO.Directory.GetFiles(win))
|
||||
{
|
||||
var finf = new System.IO.FileInfo(file);
|
||||
WriteAllBytes(sfs + finf.Name, System.IO.File.ReadAllBytes(file));
|
||||
}
|
||||
}
|
||||
|
||||
private void exportToMFSFileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
string path = tvfiles.SelectedNode.Tag.ToString();
|
||||
string[] split = path.Split('/');
|
||||
int number = Convert.ToInt32(split[0].Replace(":", ""));
|
||||
string json = ExportMount(number);
|
||||
var saver = new SaveFileDialog();
|
||||
saver.Filter = "MFS/ShiftFS file (Why the fuck do we also call it \".mfs\"?)|*.mfs";
|
||||
saver.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
if (saver.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
System.IO.File.WriteAllText(saver.FileName, json);
|
||||
}
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
var picker = new FolderBrowserDialog();
|
||||
if(picker.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var inf = new System.IO.DirectoryInfo(picker.SelectedPath);
|
||||
var dir = new Directory
|
||||
{
|
||||
Name = inf.Name,
|
||||
permissions = Objects.UserPermissions.Guest,
|
||||
};
|
||||
Mounts.Add(dir);
|
||||
string mpath = (Mounts.Count - 1) + ":/";
|
||||
Import(inf.FullName, mpath);
|
||||
SetupTree();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,12 @@
|
|||
<Compile Include="FileCreator.Designer.cs">
|
||||
<DependentUpon>FileCreator.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Infobox.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Infobox.Designer.cs">
|
||||
<DependentUpon>Infobox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Main.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -63,6 +69,9 @@
|
|||
<EmbeddedResource Include="FileCreator.resx">
|
||||
<DependentUpon>FileCreator.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Infobox.resx">
|
||||
<DependentUpon>Infobox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Main.resx">
|
||||
<DependentUpon>Main.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -14,24 +14,27 @@ namespace ShiftOS.Objects
|
|||
public string DigitalSocietyAddress { get; set; }
|
||||
public int DigitalSocietyPort { get; set; }
|
||||
|
||||
public static UserConfig Get()
|
||||
{
|
||||
var conf = new UserConfig
|
||||
private static UserConfig def = new UserConfig
|
||||
{
|
||||
Language = "english",
|
||||
DigitalSocietyAddress = "michaeltheshifter.me",
|
||||
DigitalSocietyPort = 13370
|
||||
};
|
||||
|
||||
if (!File.Exists("servers.json"))
|
||||
{
|
||||
File.WriteAllText("servers.json", JsonConvert.SerializeObject(conf, Formatting.Indented));
|
||||
}
|
||||
public static UserConfig current = null;
|
||||
|
||||
public static UserConfig Get()
|
||||
{
|
||||
if (current != null)
|
||||
return current;
|
||||
if (File.Exists("servers.json"))
|
||||
current = JsonConvert.DeserializeObject<UserConfig>(File.ReadAllText("servers.json"));
|
||||
else
|
||||
{
|
||||
conf = JsonConvert.DeserializeObject<UserConfig>(File.ReadAllText("servers.json"));
|
||||
File.WriteAllText("servers.json", JsonConvert.SerializeObject(def, Formatting.Indented));
|
||||
current = def;
|
||||
}
|
||||
return conf;
|
||||
return current;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ using Newtonsoft.Json;
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[WinOpen("{WO_ADDRESSBOOK}")]
|
||||
[AppscapeEntry("{TITLE_ADDRESSBOOK}", "{DESC_ADDRESSBOOK}", 1024, 750, null, "{AL_OFFICE}")]
|
||||
[AppscapeEntry("address_book", "{TITLE_ADDRESSBOOK}", "{DESC_ADDRESSBOOK}", 1024, 750, null, "{AL_OFFICE}")]
|
||||
[DefaultTitle("{TITLE_ADDRESSBOOK}")]
|
||||
[Launcher("{TITLE_ADDRESSBOOK}", false, null, "{AL_OFFICE}")]
|
||||
public partial class AddressBook : UserControl, IShiftOSWindow
|
||||
|
|
509
ShiftOS.WinForms/Applications/Artpad.Designer.cs
generated
509
ShiftOS.WinForms/Applications/Artpad.Designer.cs
generated
|
@ -50,7 +50,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pgcontents = new System.Windows.Forms.Panel();
|
||||
this.pnldrawingbackground = new System.Windows.Forms.Panel();
|
||||
this.pnlinitialcanvassettings = new System.Windows.Forms.Panel();
|
||||
this.btncancel = new System.Windows.Forms.Button();
|
||||
this.btncreate = new System.Windows.Forms.Button();
|
||||
this.Label11 = new System.Windows.Forms.Label();
|
||||
this.lbltotalpixels = new System.Windows.Forms.Label();
|
||||
|
@ -205,6 +204,11 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.Label4 = new System.Windows.Forms.Label();
|
||||
this.line6 = new System.Windows.Forms.Panel();
|
||||
this.pnltoolproperties = new System.Windows.Forms.Panel();
|
||||
this.pnlmagnifiersettings = new System.Windows.Forms.Panel();
|
||||
this.btnzoomout = new System.Windows.Forms.Button();
|
||||
this.btnzoomin = new System.Windows.Forms.Button();
|
||||
this.lblzoomlevel = new System.Windows.Forms.Label();
|
||||
this.Label7 = new System.Windows.Forms.Label();
|
||||
this.pnleracertoolsettings = new System.Windows.Forms.Panel();
|
||||
this.Label28 = new System.Windows.Forms.Label();
|
||||
this.btneracersquare = new System.Windows.Forms.Button();
|
||||
|
@ -255,11 +259,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.Label3 = new System.Windows.Forms.Label();
|
||||
this.Label2 = new System.Windows.Forms.Label();
|
||||
this.Label1 = new System.Windows.Forms.Label();
|
||||
this.pnlmagnifiersettings = new System.Windows.Forms.Panel();
|
||||
this.btnzoomout = new System.Windows.Forms.Button();
|
||||
this.btnzoomin = new System.Windows.Forms.Button();
|
||||
this.lblzoomlevel = new System.Windows.Forms.Label();
|
||||
this.Label7 = new System.Windows.Forms.Label();
|
||||
this.pnlfloodfillsettings = new System.Windows.Forms.Panel();
|
||||
this.Label12 = new System.Windows.Forms.Label();
|
||||
this.Label15 = new System.Windows.Forms.Label();
|
||||
|
@ -292,12 +291,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnpaintbrush = new System.Windows.Forms.Button();
|
||||
this.btntexttool = new System.Windows.Forms.Button();
|
||||
this.btneracer = new System.Windows.Forms.Button();
|
||||
this.btnnew = new System.Windows.Forms.Button();
|
||||
this.btnmagnify = new System.Windows.Forms.Button();
|
||||
this.btnopen = new System.Windows.Forms.Button();
|
||||
this.btnsave = new System.Windows.Forms.Button();
|
||||
this.btnundo = new System.Windows.Forms.Button();
|
||||
this.btnredo = new System.Windows.Forms.Button();
|
||||
this.line1 = new System.Windows.Forms.Panel();
|
||||
this.pnltoolpreview = new System.Windows.Forms.Panel();
|
||||
this.Label13 = new System.Windows.Forms.Label();
|
||||
|
@ -311,6 +304,22 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pullbottom = new System.Windows.Forms.Timer(this.components);
|
||||
this.pullside = new System.Windows.Forms.Timer(this.components);
|
||||
this.tmrsetupui = new System.Windows.Forms.Timer(this.components);
|
||||
this.msTools = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.gENNEWToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.gENLOADToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.gENSAVEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.gENEXITToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.zoomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.moreControlsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pgcontents.SuspendLayout();
|
||||
this.pnldrawingbackground.SuspendLayout();
|
||||
this.pnlinitialcanvassettings.SuspendLayout();
|
||||
|
@ -320,6 +329,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnlpallet.SuspendLayout();
|
||||
this.flowcolours.SuspendLayout();
|
||||
this.pnltoolproperties.SuspendLayout();
|
||||
this.pnlmagnifiersettings.SuspendLayout();
|
||||
this.pnleracertoolsettings.SuspendLayout();
|
||||
this.pnlpixelplacersettings.SuspendLayout();
|
||||
this.pnlovaltoolsettings.SuspendLayout();
|
||||
|
@ -327,7 +337,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnlpaintbrushtoolsettings.SuspendLayout();
|
||||
this.pnltexttoolsettings.SuspendLayout();
|
||||
this.pnlpixelsettersettings.SuspendLayout();
|
||||
this.pnlmagnifiersettings.SuspendLayout();
|
||||
this.pnlfloodfillsettings.SuspendLayout();
|
||||
this.pnlsquaretoolsettings.SuspendLayout();
|
||||
this.pnlpencilsettings.SuspendLayout();
|
||||
|
@ -335,6 +344,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnltoolpositioner.SuspendLayout();
|
||||
this.pnltoolpreview.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picpreview)).BeginInit();
|
||||
this.msTools.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pgcontents
|
||||
|
@ -344,9 +354,9 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pgcontents.Controls.Add(this.pnlbottompanel);
|
||||
this.pgcontents.Controls.Add(this.pnltools);
|
||||
this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pgcontents.Location = new System.Drawing.Point(0, 0);
|
||||
this.pgcontents.Location = new System.Drawing.Point(0, 24);
|
||||
this.pgcontents.Name = "pgcontents";
|
||||
this.pgcontents.Size = new System.Drawing.Size(802, 598);
|
||||
this.pgcontents.Size = new System.Drawing.Size(802, 574);
|
||||
this.pgcontents.TabIndex = 20;
|
||||
//
|
||||
// pnldrawingbackground
|
||||
|
@ -365,7 +375,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
// pnlinitialcanvassettings
|
||||
//
|
||||
this.pnlinitialcanvassettings.BackColor = System.Drawing.Color.White;
|
||||
this.pnlinitialcanvassettings.Controls.Add(this.btncancel);
|
||||
this.pnlinitialcanvassettings.Controls.Add(this.btncreate);
|
||||
this.pnlinitialcanvassettings.Controls.Add(this.Label11);
|
||||
this.pnlinitialcanvassettings.Controls.Add(this.lbltotalpixels);
|
||||
|
@ -373,28 +382,17 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnlinitialcanvassettings.Controls.Add(this.Label10);
|
||||
this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvaswidth);
|
||||
this.pnlinitialcanvassettings.Controls.Add(this.Label9);
|
||||
this.pnlinitialcanvassettings.Location = new System.Drawing.Point(223, 178);
|
||||
this.pnlinitialcanvassettings.Location = new System.Drawing.Point(144, 137);
|
||||
this.pnlinitialcanvassettings.Name = "pnlinitialcanvassettings";
|
||||
this.pnlinitialcanvassettings.Size = new System.Drawing.Size(223, 100);
|
||||
this.pnlinitialcanvassettings.Size = new System.Drawing.Size(326, 160);
|
||||
this.pnlinitialcanvassettings.TabIndex = 1;
|
||||
//
|
||||
// btncancel
|
||||
//
|
||||
this.btncancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btncancel.Location = new System.Drawing.Point(7, 66);
|
||||
this.btncancel.Name = "btncancel";
|
||||
this.btncancel.Size = new System.Drawing.Size(102, 28);
|
||||
this.btncancel.TabIndex = 7;
|
||||
this.btncancel.Text = "Cancel";
|
||||
this.btncancel.UseVisualStyleBackColor = true;
|
||||
this.btncancel.Click += new System.EventHandler(this.btncancel_Click);
|
||||
//
|
||||
// btncreate
|
||||
//
|
||||
this.btncreate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btncreate.Location = new System.Drawing.Point(114, 66);
|
||||
this.btncreate.Location = new System.Drawing.Point(196, 93);
|
||||
this.btncreate.Name = "btncreate";
|
||||
this.btncreate.Size = new System.Drawing.Size(102, 28);
|
||||
this.btncreate.Size = new System.Drawing.Size(115, 50);
|
||||
this.btncreate.TabIndex = 6;
|
||||
this.btncreate.Text = "Create";
|
||||
this.btncreate.UseVisualStyleBackColor = true;
|
||||
|
@ -403,19 +401,19 @@ namespace ShiftOS.WinForms.Applications
|
|||
// Label11
|
||||
//
|
||||
this.Label11.AutoSize = true;
|
||||
this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label11.Location = new System.Drawing.Point(124, 9);
|
||||
this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F);
|
||||
this.Label11.Location = new System.Drawing.Point(200, 7);
|
||||
this.Label11.Name = "Label11";
|
||||
this.Label11.Size = new System.Drawing.Size(88, 20);
|
||||
this.Label11.Size = new System.Drawing.Size(106, 24);
|
||||
this.Label11.TabIndex = 5;
|
||||
this.Label11.Text = "Total Pixels";
|
||||
//
|
||||
// lbltotalpixels
|
||||
//
|
||||
this.lbltotalpixels.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbltotalpixels.Location = new System.Drawing.Point(114, 30);
|
||||
this.lbltotalpixels.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F);
|
||||
this.lbltotalpixels.Location = new System.Drawing.Point(181, 31);
|
||||
this.lbltotalpixels.Name = "lbltotalpixels";
|
||||
this.lbltotalpixels.Size = new System.Drawing.Size(106, 29);
|
||||
this.lbltotalpixels.Size = new System.Drawing.Size(143, 56);
|
||||
this.lbltotalpixels.TabIndex = 4;
|
||||
this.lbltotalpixels.Text = "0";
|
||||
this.lbltotalpixels.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
|
@ -424,21 +422,22 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
this.txtnewcanvasheight.BackColor = System.Drawing.Color.White;
|
||||
this.txtnewcanvasheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.txtnewcanvasheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtnewcanvasheight.Location = new System.Drawing.Point(59, 37);
|
||||
this.txtnewcanvasheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.txtnewcanvasheight.Location = new System.Drawing.Point(82, 93);
|
||||
this.txtnewcanvasheight.MaxLength = 4;
|
||||
this.txtnewcanvasheight.Name = "txtnewcanvasheight";
|
||||
this.txtnewcanvasheight.Size = new System.Drawing.Size(54, 22);
|
||||
this.txtnewcanvasheight.Size = new System.Drawing.Size(54, 26);
|
||||
this.txtnewcanvasheight.TabIndex = 3;
|
||||
this.txtnewcanvasheight.Text = "0";
|
||||
this.txtnewcanvasheight.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged);
|
||||
//
|
||||
// Label10
|
||||
//
|
||||
this.Label10.AutoSize = true;
|
||||
this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label10.Location = new System.Drawing.Point(8, 40);
|
||||
this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
|
||||
this.Label10.Location = new System.Drawing.Point(7, 91);
|
||||
this.Label10.Name = "Label10";
|
||||
this.Label10.Size = new System.Drawing.Size(50, 16);
|
||||
this.Label10.Size = new System.Drawing.Size(74, 25);
|
||||
this.Label10.TabIndex = 2;
|
||||
this.Label10.Text = "Height:";
|
||||
//
|
||||
|
@ -446,21 +445,22 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
this.txtnewcanvaswidth.BackColor = System.Drawing.Color.White;
|
||||
this.txtnewcanvaswidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.txtnewcanvaswidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtnewcanvaswidth.Location = new System.Drawing.Point(59, 9);
|
||||
this.txtnewcanvaswidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.txtnewcanvaswidth.Location = new System.Drawing.Point(82, 41);
|
||||
this.txtnewcanvaswidth.MaxLength = 4;
|
||||
this.txtnewcanvaswidth.Name = "txtnewcanvaswidth";
|
||||
this.txtnewcanvaswidth.Size = new System.Drawing.Size(54, 22);
|
||||
this.txtnewcanvaswidth.Size = new System.Drawing.Size(54, 26);
|
||||
this.txtnewcanvaswidth.TabIndex = 1;
|
||||
this.txtnewcanvaswidth.Text = "0";
|
||||
this.txtnewcanvaswidth.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged);
|
||||
//
|
||||
// Label9
|
||||
//
|
||||
this.Label9.AutoSize = true;
|
||||
this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label9.Location = new System.Drawing.Point(8, 12);
|
||||
this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
|
||||
this.Label9.Location = new System.Drawing.Point(7, 39);
|
||||
this.Label9.Name = "Label9";
|
||||
this.Label9.Size = new System.Drawing.Size(45, 16);
|
||||
this.Label9.Size = new System.Drawing.Size(69, 25);
|
||||
this.Label9.TabIndex = 0;
|
||||
this.Label9.Text = "Width:";
|
||||
//
|
||||
|
@ -477,7 +477,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnlpalettesize.Controls.Add(this.Label42);
|
||||
this.pnlpalettesize.Controls.Add(this.txtcolorpalletwidth);
|
||||
this.pnlpalettesize.Controls.Add(this.Label43);
|
||||
this.pnlpalettesize.Location = new System.Drawing.Point(207, 178);
|
||||
this.pnlpalettesize.Location = new System.Drawing.Point(144, 303);
|
||||
this.pnlpalettesize.Name = "pnlpalettesize";
|
||||
this.pnlpalettesize.Size = new System.Drawing.Size(259, 100);
|
||||
this.pnlpalettesize.TabIndex = 2;
|
||||
|
@ -604,7 +604,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnlbottompanel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.pnlbottompanel.Location = new System.Drawing.Point(120, 474);
|
||||
this.pnlbottompanel.Name = "pnlbottompanel";
|
||||
this.pnlbottompanel.Size = new System.Drawing.Size(682, 124);
|
||||
this.pnlbottompanel.Size = new System.Drawing.Size(682, 100);
|
||||
this.pnlbottompanel.TabIndex = 1;
|
||||
//
|
||||
// pnlpallet
|
||||
|
@ -618,15 +618,15 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnlpallet.Controls.Add(this.line6);
|
||||
this.pnlpallet.Location = new System.Drawing.Point(457, 0);
|
||||
this.pnlpallet.Name = "pnlpallet";
|
||||
this.pnlpallet.Size = new System.Drawing.Size(225, 124);
|
||||
this.pnlpallet.Size = new System.Drawing.Size(225, 100);
|
||||
this.pnlpallet.TabIndex = 0;
|
||||
//
|
||||
// label44
|
||||
//
|
||||
this.label44.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label44.Location = new System.Drawing.Point(0, 24);
|
||||
this.label44.Location = new System.Drawing.Point(0, 16);
|
||||
this.label44.Name = "label44";
|
||||
this.label44.Size = new System.Drawing.Size(225, 27);
|
||||
this.label44.Size = new System.Drawing.Size(225, 11);
|
||||
this.label44.TabIndex = 13;
|
||||
this.label44.Text = "Left click to select, right click to change color";
|
||||
this.label44.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
|
@ -762,7 +762,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.flowcolours.Controls.Add(this.colourpallet127);
|
||||
this.flowcolours.Controls.Add(this.colourpallet128);
|
||||
this.flowcolours.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.flowcolours.Location = new System.Drawing.Point(0, 51);
|
||||
this.flowcolours.Location = new System.Drawing.Point(0, 27);
|
||||
this.flowcolours.Name = "flowcolours";
|
||||
this.flowcolours.Padding = new System.Windows.Forms.Padding(1, 1, 0, 0);
|
||||
this.flowcolours.Size = new System.Drawing.Size(225, 73);
|
||||
|
@ -2054,9 +2054,9 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label4.Location = new System.Drawing.Point(0, 1);
|
||||
this.Label4.Name = "Label4";
|
||||
this.Label4.Size = new System.Drawing.Size(225, 23);
|
||||
this.Label4.Size = new System.Drawing.Size(225, 15);
|
||||
this.Label4.TabIndex = 11;
|
||||
this.Label4.Text = "Colours";
|
||||
this.Label4.Text = "Colors";
|
||||
this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// line6
|
||||
|
@ -2070,6 +2070,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
// pnltoolproperties
|
||||
//
|
||||
this.pnltoolproperties.Controls.Add(this.pnlmagnifiersettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnleracertoolsettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnlpixelplacersettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnlovaltoolsettings);
|
||||
|
@ -2077,7 +2078,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnltoolproperties.Controls.Add(this.pnlpaintbrushtoolsettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnltexttoolsettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnlpixelsettersettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnlmagnifiersettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnlfloodfillsettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnlsquaretoolsettings);
|
||||
this.pnltoolproperties.Controls.Add(this.pnlpencilsettings);
|
||||
|
@ -2090,6 +2090,60 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnltoolproperties.Size = new System.Drawing.Size(457, 100);
|
||||
this.pnltoolproperties.TabIndex = 1;
|
||||
//
|
||||
// pnlmagnifiersettings
|
||||
//
|
||||
this.pnlmagnifiersettings.Controls.Add(this.btnzoomout);
|
||||
this.pnlmagnifiersettings.Controls.Add(this.btnzoomin);
|
||||
this.pnlmagnifiersettings.Controls.Add(this.lblzoomlevel);
|
||||
this.pnlmagnifiersettings.Controls.Add(this.Label7);
|
||||
this.pnlmagnifiersettings.Location = new System.Drawing.Point(78, 50);
|
||||
this.pnlmagnifiersettings.Name = "pnlmagnifiersettings";
|
||||
this.pnlmagnifiersettings.Size = new System.Drawing.Size(67, 44);
|
||||
this.pnlmagnifiersettings.TabIndex = 6;
|
||||
this.pnlmagnifiersettings.Visible = false;
|
||||
//
|
||||
// btnzoomout
|
||||
//
|
||||
this.btnzoomout.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnzoomout.Location = new System.Drawing.Point(16, 33);
|
||||
this.btnzoomout.Name = "btnzoomout";
|
||||
this.btnzoomout.Size = new System.Drawing.Size(129, 56);
|
||||
this.btnzoomout.TabIndex = 11;
|
||||
this.btnzoomout.Text = "-";
|
||||
this.btnzoomout.UseVisualStyleBackColor = true;
|
||||
this.btnzoomout.Click += new System.EventHandler(this.btnzoomout_Click);
|
||||
//
|
||||
// btnzoomin
|
||||
//
|
||||
this.btnzoomin.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnzoomin.Location = new System.Drawing.Point(313, 33);
|
||||
this.btnzoomin.Name = "btnzoomin";
|
||||
this.btnzoomin.Size = new System.Drawing.Size(129, 56);
|
||||
this.btnzoomin.TabIndex = 10;
|
||||
this.btnzoomin.Text = "+";
|
||||
this.btnzoomin.UseVisualStyleBackColor = true;
|
||||
this.btnzoomin.Click += new System.EventHandler(this.btnzoomin_Click);
|
||||
//
|
||||
// lblzoomlevel
|
||||
//
|
||||
this.lblzoomlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblzoomlevel.Location = new System.Drawing.Point(151, 33);
|
||||
this.lblzoomlevel.Name = "lblzoomlevel";
|
||||
this.lblzoomlevel.Size = new System.Drawing.Size(156, 56);
|
||||
this.lblzoomlevel.TabIndex = 1;
|
||||
this.lblzoomlevel.Text = "1X";
|
||||
this.lblzoomlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// Label7
|
||||
//
|
||||
this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label7.Location = new System.Drawing.Point(6, 3);
|
||||
this.Label7.Name = "Label7";
|
||||
this.Label7.Size = new System.Drawing.Size(444, 23);
|
||||
this.Label7.TabIndex = 0;
|
||||
this.Label7.Text = "Magnifier Settings";
|
||||
this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pnleracertoolsettings
|
||||
//
|
||||
this.pnleracertoolsettings.Controls.Add(this.Label28);
|
||||
|
@ -2120,7 +2174,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btneracersquare.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadsquarerubberselected;
|
||||
this.btneracersquare.FlatAppearance.BorderSize = 0;
|
||||
this.btneracersquare.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btneracersquare.Location = new System.Drawing.Point(75, 21);
|
||||
this.btneracersquare.Location = new System.Drawing.Point(75, 15);
|
||||
this.btneracersquare.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btneracersquare.Name = "btneracersquare";
|
||||
this.btneracersquare.Size = new System.Drawing.Size(60, 50);
|
||||
|
@ -2134,7 +2188,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btneracercircle.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadcirclerubber;
|
||||
this.btneracercircle.FlatAppearance.BorderSize = 0;
|
||||
this.btneracercircle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btneracercircle.Location = new System.Drawing.Point(9, 21);
|
||||
this.btneracercircle.Location = new System.Drawing.Point(9, 15);
|
||||
this.btneracercircle.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btneracercircle.Name = "btneracercircle";
|
||||
this.btneracercircle.Size = new System.Drawing.Size(60, 50);
|
||||
|
@ -2146,9 +2200,9 @@ namespace ShiftOS.WinForms.Applications
|
|||
// Label24
|
||||
//
|
||||
this.Label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label24.Location = new System.Drawing.Point(141, 29);
|
||||
this.Label24.Location = new System.Drawing.Point(141, 25);
|
||||
this.Label24.Name = "Label24";
|
||||
this.Label24.Size = new System.Drawing.Size(314, 38);
|
||||
this.Label24.Size = new System.Drawing.Size(314, 35);
|
||||
this.Label24.TabIndex = 15;
|
||||
this.Label24.Text = "Choose a shape and size for your eracer then rub out unwanted parts of your drawi" +
|
||||
"ng with the mouse.";
|
||||
|
@ -2159,7 +2213,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.txteracersize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.txteracersize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txteracersize.ForeColor = System.Drawing.Color.Black;
|
||||
this.txteracersize.Location = new System.Drawing.Point(198, 70);
|
||||
this.txteracersize.Location = new System.Drawing.Point(198, 69);
|
||||
this.txteracersize.Name = "txteracersize";
|
||||
this.txteracersize.Size = new System.Drawing.Size(73, 26);
|
||||
this.txteracersize.TabIndex = 12;
|
||||
|
@ -2180,7 +2234,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.Label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label27.Location = new System.Drawing.Point(6, 3);
|
||||
this.Label27.Name = "Label27";
|
||||
this.Label27.Size = new System.Drawing.Size(444, 23);
|
||||
this.Label27.Size = new System.Drawing.Size(444, 18);
|
||||
this.Label27.TabIndex = 0;
|
||||
this.Label27.Text = "Eraser Tool Settings";
|
||||
this.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
|
@ -2661,60 +2715,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.Label1.Text = "Pixel Setter Settings";
|
||||
this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pnlmagnifiersettings
|
||||
//
|
||||
this.pnlmagnifiersettings.Controls.Add(this.btnzoomout);
|
||||
this.pnlmagnifiersettings.Controls.Add(this.btnzoomin);
|
||||
this.pnlmagnifiersettings.Controls.Add(this.lblzoomlevel);
|
||||
this.pnlmagnifiersettings.Controls.Add(this.Label7);
|
||||
this.pnlmagnifiersettings.Location = new System.Drawing.Point(78, 50);
|
||||
this.pnlmagnifiersettings.Name = "pnlmagnifiersettings";
|
||||
this.pnlmagnifiersettings.Size = new System.Drawing.Size(67, 44);
|
||||
this.pnlmagnifiersettings.TabIndex = 6;
|
||||
this.pnlmagnifiersettings.Visible = false;
|
||||
//
|
||||
// btnzoomout
|
||||
//
|
||||
this.btnzoomout.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnzoomout.Location = new System.Drawing.Point(16, 33);
|
||||
this.btnzoomout.Name = "btnzoomout";
|
||||
this.btnzoomout.Size = new System.Drawing.Size(129, 56);
|
||||
this.btnzoomout.TabIndex = 11;
|
||||
this.btnzoomout.Text = "-";
|
||||
this.btnzoomout.UseVisualStyleBackColor = true;
|
||||
this.btnzoomout.Click += new System.EventHandler(this.btnzoomout_Click);
|
||||
//
|
||||
// btnzoomin
|
||||
//
|
||||
this.btnzoomin.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnzoomin.Location = new System.Drawing.Point(313, 33);
|
||||
this.btnzoomin.Name = "btnzoomin";
|
||||
this.btnzoomin.Size = new System.Drawing.Size(129, 56);
|
||||
this.btnzoomin.TabIndex = 10;
|
||||
this.btnzoomin.Text = "+";
|
||||
this.btnzoomin.UseVisualStyleBackColor = true;
|
||||
this.btnzoomin.Click += new System.EventHandler(this.btnzoomin_Click);
|
||||
//
|
||||
// lblzoomlevel
|
||||
//
|
||||
this.lblzoomlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblzoomlevel.Location = new System.Drawing.Point(151, 33);
|
||||
this.lblzoomlevel.Name = "lblzoomlevel";
|
||||
this.lblzoomlevel.Size = new System.Drawing.Size(156, 56);
|
||||
this.lblzoomlevel.TabIndex = 1;
|
||||
this.lblzoomlevel.Text = "1X";
|
||||
this.lblzoomlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// Label7
|
||||
//
|
||||
this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label7.Location = new System.Drawing.Point(6, 3);
|
||||
this.Label7.Name = "Label7";
|
||||
this.Label7.Size = new System.Drawing.Size(444, 23);
|
||||
this.Label7.TabIndex = 0;
|
||||
this.Label7.Text = "Magnifier Settings";
|
||||
this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pnlfloodfillsettings
|
||||
//
|
||||
this.pnlfloodfillsettings.Controls.Add(this.Label12);
|
||||
|
@ -2933,7 +2933,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnltools.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.pnltools.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnltools.Name = "pnltools";
|
||||
this.pnltools.Size = new System.Drawing.Size(120, 598);
|
||||
this.pnltools.Size = new System.Drawing.Size(120, 574);
|
||||
this.pnltools.TabIndex = 0;
|
||||
//
|
||||
// pnltoolpositioner
|
||||
|
@ -2946,18 +2946,12 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnltoolpositioner.Controls.Add(this.btnsquare);
|
||||
this.pnltoolpositioner.Controls.Add(this.btnlinetool);
|
||||
this.pnltoolpositioner.Controls.Add(this.btnpaintbrush);
|
||||
this.pnltoolpositioner.Controls.Add(this.btntexttool);
|
||||
this.pnltoolpositioner.Controls.Add(this.btneracer);
|
||||
this.pnltoolpositioner.Controls.Add(this.btnnew);
|
||||
this.pnltoolpositioner.Controls.Add(this.btnmagnify);
|
||||
this.pnltoolpositioner.Controls.Add(this.btnopen);
|
||||
this.pnltoolpositioner.Controls.Add(this.btnsave);
|
||||
this.pnltoolpositioner.Controls.Add(this.btnundo);
|
||||
this.pnltoolpositioner.Controls.Add(this.btnredo);
|
||||
this.pnltoolpositioner.Controls.Add(this.btntexttool);
|
||||
this.pnltoolpositioner.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnltoolpositioner.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnltoolpositioner.Name = "pnltoolpositioner";
|
||||
this.pnltoolpositioner.Size = new System.Drawing.Size(119, 498);
|
||||
this.pnltoolpositioner.Size = new System.Drawing.Size(119, 474);
|
||||
this.pnltoolpositioner.TabIndex = 2;
|
||||
//
|
||||
// btnpixelsetter
|
||||
|
@ -3090,7 +3084,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btntexttool.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.btntexttool.FlatAppearance.BorderSize = 0;
|
||||
this.btntexttool.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btntexttool.Location = new System.Drawing.Point(6, 230);
|
||||
this.btntexttool.Location = new System.Drawing.Point(62, 230);
|
||||
this.btntexttool.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btntexttool.Name = "btntexttool";
|
||||
this.btntexttool.Size = new System.Drawing.Size(50, 50);
|
||||
|
@ -3106,7 +3100,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btneracer.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.btneracer.FlatAppearance.BorderSize = 0;
|
||||
this.btneracer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btneracer.Location = new System.Drawing.Point(62, 230);
|
||||
this.btneracer.Location = new System.Drawing.Point(6, 230);
|
||||
this.btneracer.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btneracer.Name = "btneracer";
|
||||
this.btneracer.Size = new System.Drawing.Size(50, 50);
|
||||
|
@ -3116,109 +3110,13 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btneracer.UseVisualStyleBackColor = true;
|
||||
this.btneracer.Click += new System.EventHandler(this.btneracer_Click);
|
||||
//
|
||||
// btnnew
|
||||
//
|
||||
this.btnnew.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadnew;
|
||||
this.btnnew.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.btnnew.FlatAppearance.BorderSize = 0;
|
||||
this.btnnew.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnnew.Location = new System.Drawing.Point(6, 286);
|
||||
this.btnnew.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btnnew.Name = "btnnew";
|
||||
this.btnnew.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnnew.TabIndex = 6;
|
||||
this.btnnew.Tag = "nobuttonskin";
|
||||
this.btnnew.Text = " ";
|
||||
this.btnnew.UseVisualStyleBackColor = true;
|
||||
this.btnnew.Click += new System.EventHandler(this.btnnew_Click);
|
||||
//
|
||||
// btnmagnify
|
||||
//
|
||||
this.btnmagnify.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadmagnify;
|
||||
this.btnmagnify.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.btnmagnify.FlatAppearance.BorderSize = 0;
|
||||
this.btnmagnify.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnmagnify.Location = new System.Drawing.Point(62, 286);
|
||||
this.btnmagnify.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btnmagnify.Name = "btnmagnify";
|
||||
this.btnmagnify.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnmagnify.TabIndex = 3;
|
||||
this.btnmagnify.Tag = "nobuttonskin";
|
||||
this.btnmagnify.Text = " ";
|
||||
this.btnmagnify.UseVisualStyleBackColor = true;
|
||||
this.btnmagnify.Click += new System.EventHandler(this.btnmagnify_Click);
|
||||
//
|
||||
// btnopen
|
||||
//
|
||||
this.btnopen.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadopen;
|
||||
this.btnopen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.btnopen.FlatAppearance.BorderSize = 0;
|
||||
this.btnopen.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnopen.Location = new System.Drawing.Point(6, 342);
|
||||
this.btnopen.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btnopen.Name = "btnopen";
|
||||
this.btnopen.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnopen.TabIndex = 10;
|
||||
this.btnopen.Tag = "nobuttonskin";
|
||||
this.btnopen.Text = " ";
|
||||
this.btnopen.UseVisualStyleBackColor = true;
|
||||
this.btnopen.Click += new System.EventHandler(this.btnopen_Click);
|
||||
//
|
||||
// btnsave
|
||||
//
|
||||
this.btnsave.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadsave;
|
||||
this.btnsave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.btnsave.FlatAppearance.BorderSize = 0;
|
||||
this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnsave.Location = new System.Drawing.Point(62, 342);
|
||||
this.btnsave.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btnsave.Name = "btnsave";
|
||||
this.btnsave.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnsave.TabIndex = 5;
|
||||
this.btnsave.Tag = "nobuttonskin";
|
||||
this.btnsave.Text = " ";
|
||||
this.btnsave.UseVisualStyleBackColor = true;
|
||||
this.btnsave.Click += new System.EventHandler(this.btnsave_Click);
|
||||
//
|
||||
// btnundo
|
||||
//
|
||||
this.btnundo.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadundo;
|
||||
this.btnundo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.btnundo.FlatAppearance.BorderSize = 0;
|
||||
this.btnundo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnundo.Location = new System.Drawing.Point(6, 398);
|
||||
this.btnundo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btnundo.Name = "btnundo";
|
||||
this.btnundo.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnundo.TabIndex = 8;
|
||||
this.btnundo.Tag = "nobuttonskin";
|
||||
this.btnundo.Text = " ";
|
||||
this.btnundo.UseVisualStyleBackColor = true;
|
||||
this.btnundo.Click += new System.EventHandler(this.btnundo_Click);
|
||||
//
|
||||
// btnredo
|
||||
//
|
||||
this.btnredo.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadredo;
|
||||
this.btnredo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.btnredo.FlatAppearance.BorderSize = 0;
|
||||
this.btnredo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnredo.Location = new System.Drawing.Point(62, 398);
|
||||
this.btnredo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0);
|
||||
this.btnredo.Name = "btnredo";
|
||||
this.btnredo.Size = new System.Drawing.Size(50, 50);
|
||||
this.btnredo.TabIndex = 9;
|
||||
this.btnredo.Tag = "nobuttonskin";
|
||||
this.btnredo.Text = " ";
|
||||
this.btnredo.UseVisualStyleBackColor = true;
|
||||
this.btnredo.Click += new System.EventHandler(this.btnredo_Click);
|
||||
//
|
||||
// line1
|
||||
//
|
||||
this.line1.BackColor = System.Drawing.Color.Black;
|
||||
this.line1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.line1.Location = new System.Drawing.Point(119, 0);
|
||||
this.line1.Name = "line1";
|
||||
this.line1.Size = new System.Drawing.Size(1, 498);
|
||||
this.line1.Size = new System.Drawing.Size(1, 474);
|
||||
this.line1.TabIndex = 1;
|
||||
//
|
||||
// pnltoolpreview
|
||||
|
@ -3229,7 +3127,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnltoolpreview.Controls.Add(this.line4);
|
||||
this.pnltoolpreview.Controls.Add(this.line2);
|
||||
this.pnltoolpreview.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.pnltoolpreview.Location = new System.Drawing.Point(0, 498);
|
||||
this.pnltoolpreview.Location = new System.Drawing.Point(0, 474);
|
||||
this.pnltoolpreview.Name = "pnltoolpreview";
|
||||
this.pnltoolpreview.Size = new System.Drawing.Size(120, 100);
|
||||
this.pnltoolpreview.TabIndex = 0;
|
||||
|
@ -3305,11 +3203,140 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
this.tmrsetupui.Tick += new System.EventHandler(this.tmrsetupui_Tick);
|
||||
//
|
||||
// msTools
|
||||
//
|
||||
this.msTools.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.editToolStripMenuItem,
|
||||
this.viewToolStripMenuItem});
|
||||
this.msTools.Location = new System.Drawing.Point(0, 0);
|
||||
this.msTools.Name = "msTools";
|
||||
this.msTools.Size = new System.Drawing.Size(802, 24);
|
||||
this.msTools.TabIndex = 3;
|
||||
this.msTools.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.gENNEWToolStripMenuItem,
|
||||
this.gENLOADToolStripMenuItem,
|
||||
this.gENSAVEToolStripMenuItem,
|
||||
this.gENEXITToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// gENNEWToolStripMenuItem
|
||||
//
|
||||
this.gENNEWToolStripMenuItem.Name = "gENNEWToolStripMenuItem";
|
||||
this.gENNEWToolStripMenuItem.Size = new System.Drawing.Size(140, 22);
|
||||
this.gENNEWToolStripMenuItem.Text = "{GEN_NEW}";
|
||||
this.gENNEWToolStripMenuItem.Click += new System.EventHandler(this.btnnew_Click);
|
||||
//
|
||||
// gENLOADToolStripMenuItem
|
||||
//
|
||||
this.gENLOADToolStripMenuItem.Name = "gENLOADToolStripMenuItem";
|
||||
this.gENLOADToolStripMenuItem.Size = new System.Drawing.Size(140, 22);
|
||||
this.gENLOADToolStripMenuItem.Text = "{GEN_LOAD}";
|
||||
this.gENLOADToolStripMenuItem.Click += new System.EventHandler(this.btnopen_Click);
|
||||
//
|
||||
// gENSAVEToolStripMenuItem
|
||||
//
|
||||
this.gENSAVEToolStripMenuItem.Name = "gENSAVEToolStripMenuItem";
|
||||
this.gENSAVEToolStripMenuItem.Size = new System.Drawing.Size(140, 22);
|
||||
this.gENSAVEToolStripMenuItem.Text = "{GEN_SAVE}";
|
||||
this.gENSAVEToolStripMenuItem.Click += new System.EventHandler(this.btnsave_Click);
|
||||
//
|
||||
// gENEXITToolStripMenuItem
|
||||
//
|
||||
this.gENEXITToolStripMenuItem.Name = "gENEXITToolStripMenuItem";
|
||||
this.gENEXITToolStripMenuItem.Size = new System.Drawing.Size(140, 22);
|
||||
this.gENEXITToolStripMenuItem.Text = "{GEN_EXIT}";
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.undoToolStripMenuItem,
|
||||
this.redoToolStripMenuItem});
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.editToolStripMenuItem.Text = "Edit";
|
||||
//
|
||||
// undoToolStripMenuItem
|
||||
//
|
||||
this.undoToolStripMenuItem.Name = "undoToolStripMenuItem";
|
||||
this.undoToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
|
||||
this.undoToolStripMenuItem.Text = "Undo";
|
||||
this.undoToolStripMenuItem.Click += new System.EventHandler(this.btnundo_Click);
|
||||
//
|
||||
// redoToolStripMenuItem
|
||||
//
|
||||
this.redoToolStripMenuItem.Name = "redoToolStripMenuItem";
|
||||
this.redoToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
|
||||
this.redoToolStripMenuItem.Text = "Redo";
|
||||
this.redoToolStripMenuItem.Click += new System.EventHandler(this.btnredo_Click);
|
||||
//
|
||||
// viewToolStripMenuItem
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.zoomToolStripMenuItem});
|
||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(42, 20);
|
||||
this.viewToolStripMenuItem.Text = "View";
|
||||
//
|
||||
// zoomToolStripMenuItem
|
||||
//
|
||||
this.zoomToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem2,
|
||||
this.toolStripMenuItem3,
|
||||
this.toolStripMenuItem4,
|
||||
this.toolStripMenuItem5,
|
||||
this.moreControlsToolStripMenuItem});
|
||||
this.zoomToolStripMenuItem.Name = "zoomToolStripMenuItem";
|
||||
this.zoomToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
|
||||
this.zoomToolStripMenuItem.Text = "Zoom";
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(138, 22);
|
||||
this.toolStripMenuItem2.Text = "25%";
|
||||
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(138, 22);
|
||||
this.toolStripMenuItem3.Text = "50%";
|
||||
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
|
||||
//
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22);
|
||||
this.toolStripMenuItem4.Text = "100%";
|
||||
this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
|
||||
//
|
||||
// toolStripMenuItem5
|
||||
//
|
||||
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||
this.toolStripMenuItem5.Size = new System.Drawing.Size(138, 22);
|
||||
this.toolStripMenuItem5.Text = "200%";
|
||||
this.toolStripMenuItem5.Click += new System.EventHandler(this.toolStripMenuItem5_Click);
|
||||
//
|
||||
// moreControlsToolStripMenuItem
|
||||
//
|
||||
this.moreControlsToolStripMenuItem.Name = "moreControlsToolStripMenuItem";
|
||||
this.moreControlsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||
this.moreControlsToolStripMenuItem.Text = "More controls";
|
||||
this.moreControlsToolStripMenuItem.Click += new System.EventHandler(this.btnmagnify_Click);
|
||||
//
|
||||
// Artpad
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.pgcontents);
|
||||
this.Controls.Add(this.msTools);
|
||||
this.MinimumSize = new System.Drawing.Size(502, 398);
|
||||
this.Name = "Artpad";
|
||||
this.Size = new System.Drawing.Size(802, 598);
|
||||
|
@ -3327,6 +3354,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.flowcolours.ResumeLayout(false);
|
||||
this.pnltoolproperties.ResumeLayout(false);
|
||||
this.pnltoolproperties.PerformLayout();
|
||||
this.pnlmagnifiersettings.ResumeLayout(false);
|
||||
this.pnleracertoolsettings.ResumeLayout(false);
|
||||
this.pnleracertoolsettings.PerformLayout();
|
||||
this.pnlpixelplacersettings.ResumeLayout(false);
|
||||
|
@ -3340,7 +3368,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnltexttoolsettings.PerformLayout();
|
||||
this.pnlpixelsettersettings.ResumeLayout(false);
|
||||
this.pnlpixelsettersettings.PerformLayout();
|
||||
this.pnlmagnifiersettings.ResumeLayout(false);
|
||||
this.pnlfloodfillsettings.ResumeLayout(false);
|
||||
this.pnlsquaretoolsettings.ResumeLayout(false);
|
||||
this.pnlsquaretoolsettings.PerformLayout();
|
||||
|
@ -3349,7 +3376,10 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pnltoolpositioner.ResumeLayout(false);
|
||||
this.pnltoolpreview.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picpreview)).EndInit();
|
||||
this.msTools.ResumeLayout(false);
|
||||
this.msTools.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
internal System.Windows.Forms.Panel pgcontents;
|
||||
|
@ -3369,7 +3399,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
internal System.Windows.Forms.Button btnpixelsettersetpixel;
|
||||
internal System.Windows.Forms.TextBox txtpixelsetterycoordinate;
|
||||
internal System.Windows.Forms.TextBox txtpixelsetterxcoordinate;
|
||||
internal System.Windows.Forms.Button btnmagnify;
|
||||
internal System.Windows.Forms.Panel colourpallet32;
|
||||
internal System.Windows.Forms.Panel colourpallet31;
|
||||
internal System.Windows.Forms.Panel colourpallet30;
|
||||
|
@ -3415,7 +3444,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
internal System.Windows.Forms.Label lblpixelplacerhelp;
|
||||
internal System.Windows.Forms.Label Label6;
|
||||
internal System.Windows.Forms.Label Label5;
|
||||
internal System.Windows.Forms.Button btnnew;
|
||||
internal System.Windows.Forms.FlowLayoutPanel flowcolours;
|
||||
internal System.Windows.Forms.Button btnpencil;
|
||||
internal System.Windows.Forms.Panel pnlpencilsettings;
|
||||
|
@ -3454,10 +3482,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
internal System.Windows.Forms.Label lbltoolselected;
|
||||
internal System.Windows.Forms.Panel line4;
|
||||
internal System.Windows.Forms.Panel line2;
|
||||
internal System.Windows.Forms.Button btnopen;
|
||||
internal System.Windows.Forms.Button btnsave;
|
||||
internal System.Windows.Forms.Button btnundo;
|
||||
internal System.Windows.Forms.Button btnredo;
|
||||
internal System.Windows.Forms.Button btneracer;
|
||||
internal System.Windows.Forms.Button btnlinetool;
|
||||
internal System.Windows.Forms.Panel pnllinetoolsettings;
|
||||
|
@ -3503,7 +3527,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
internal System.Windows.Forms.TextBox txtcolorpalletwidth;
|
||||
internal System.Windows.Forms.Label Label43;
|
||||
internal System.Windows.Forms.Panel pnlinitialcanvassettings;
|
||||
internal System.Windows.Forms.Button btncancel;
|
||||
internal System.Windows.Forms.Button btncreate;
|
||||
internal System.Windows.Forms.Label Label11;
|
||||
internal System.Windows.Forms.Label lbltotalpixels;
|
||||
|
@ -3616,5 +3639,21 @@ namespace ShiftOS.WinForms.Applications
|
|||
internal System.Windows.Forms.Timer pullside;
|
||||
private System.Windows.Forms.Timer tmrsetupui;
|
||||
private System.Windows.Forms.Label label44;
|
||||
private System.Windows.Forms.MenuStrip msTools;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem gENNEWToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem gENLOADToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem gENSAVEToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem gENEXITToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem undoToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem redoToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem zoomToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
|
||||
private System.Windows.Forms.ToolStripMenuItem moreControlsToolStripMenuItem;
|
||||
}
|
||||
}
|
|
@ -57,11 +57,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
try
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
InitializeComponent();
|
||||
sw.Stop();
|
||||
Console.WriteLine("ArtPad construction timespan:" + sw.Elapsed.ToString());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -97,8 +93,8 @@ namespace ShiftOS.WinForms.Applications
|
|||
Color canvascolor = Color.White;
|
||||
|
||||
Bitmap previewcanvasbitmap;
|
||||
int magnificationlevel = 1;
|
||||
Rectangle magnifyRect;
|
||||
float magnificationlevel = 1;
|
||||
RectangleF magnifyRect;
|
||||
Graphics graphicsbitmap;
|
||||
public Color drawingcolour = Color.Black;
|
||||
string selectedtool = "Pixel Setter";
|
||||
|
@ -107,7 +103,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
System.Drawing.Drawing2D.GraphicsPath mousePath = new System.Drawing.Drawing2D.GraphicsPath();
|
||||
int pencilwidth = 1;
|
||||
undo undo = new undo();
|
||||
Point thisPoint;
|
||||
PointF thisPoint;
|
||||
int eracerwidth = 15;
|
||||
|
||||
string eracertype = "square";
|
||||
|
@ -169,6 +165,17 @@ namespace ShiftOS.WinForms.Applications
|
|||
//PHILCODE: I just reduced this function's amount of Windows Forms calls by 66%.
|
||||
public void setuptoolbox()
|
||||
{
|
||||
gENSAVEToolStripMenuItem.Visible = Shiftorium.UpgradeInstalled("artpad_save");
|
||||
gENLOADToolStripMenuItem.Visible = Shiftorium.UpgradeInstalled("artpad_open");
|
||||
gENNEWToolStripMenuItem.Visible = Shiftorium.UpgradeInstalled("artpad_new");
|
||||
|
||||
undoToolStripMenuItem.Visible = Shiftorium.UpgradeInstalled("artpad_undo");
|
||||
redoToolStripMenuItem.Visible = Shiftorium.UpgradeInstalled("artpad_redo");
|
||||
|
||||
editToolStripMenuItem.Visible = (undoToolStripMenuItem.Visible || redoToolStripMenuItem.Visible);
|
||||
|
||||
|
||||
|
||||
btnpixelplacer.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_placer") == true);
|
||||
btnpencil.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_pencil") == true);
|
||||
btnfloodfill.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_fill_tool") == true);
|
||||
|
@ -178,11 +185,6 @@ namespace ShiftOS.WinForms.Applications
|
|||
btnpaintbrush.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_paintbrush") == true);
|
||||
btntexttool.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_text_tool") == true);
|
||||
btneracer.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_eraser") == true);
|
||||
btnnew.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_new") == true);
|
||||
btnopen.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_load") == true);
|
||||
btnsave.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_save") == true);
|
||||
btnundo.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_undo") == true);
|
||||
btnredo.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_redo") == true);
|
||||
btnpixelplacermovementmode.Visible = (ShiftoriumFrontend.UpgradeInstalled("artpad_pp_movement_mode") == true);
|
||||
}
|
||||
|
||||
|
@ -371,8 +373,8 @@ namespace ShiftOS.WinForms.Applications
|
|||
undo.redoStack.Clear();
|
||||
|
||||
|
||||
thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.X = (e.Location.X - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.Y = (e.Location.Y - (magnificationlevel / 2)) / magnificationlevel;
|
||||
|
||||
if (selectedtool == "Pixel Placer")
|
||||
{
|
||||
|
@ -382,7 +384,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1)
|
||||
{
|
||||
canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour);
|
||||
canvasbitmap.SetPixel((int)thisPoint.X, (int)thisPoint.Y, drawingcolour);
|
||||
//set the pixel on the canvas
|
||||
picdrawingdisplay.Invalidate();
|
||||
//refresh the picture from the canvas
|
||||
|
@ -408,7 +410,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1)
|
||||
{
|
||||
SafeFloodFill(canvasbitmap, thisPoint.X, thisPoint.Y, drawingcolour);
|
||||
SafeFloodFill(canvasbitmap, (int)thisPoint.X, (int)thisPoint.Y, drawingcolour);
|
||||
graphicsbitmap = Graphics.FromImage(canvasbitmap);
|
||||
picdrawingdisplay.Invalidate();
|
||||
}
|
||||
|
@ -494,10 +496,10 @@ namespace ShiftOS.WinForms.Applications
|
|||
// ERROR: Handles clauses are not supported in C#
|
||||
private void picdrawingdisplay_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
Point lastpoint;
|
||||
PointF lastpoint;
|
||||
|
||||
thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.X = (e.Location.X - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.Y = (e.Location.Y - (magnificationlevel / 2)) / magnificationlevel;
|
||||
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
|
@ -512,7 +514,8 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1)
|
||||
{
|
||||
canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour);
|
||||
//NO, NO, NO... Please don't tell me you're using SetPixel()... Whatever...
|
||||
canvasbitmap.SetPixel((int)thisPoint.X, (int)thisPoint.Y, drawingcolour);
|
||||
//set the pixel on the canvas
|
||||
picdrawingdisplay.Invalidate();
|
||||
//refresh the picture from the canvas
|
||||
|
@ -585,8 +588,8 @@ namespace ShiftOS.WinForms.Applications
|
|||
// ERROR: Handles clauses are not supported in C#
|
||||
private void picdrawingdisplay_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.X = (e.Location.X - (magnificationlevel / 2)) / magnificationlevel;
|
||||
thisPoint.Y = (e.Location.Y - (magnificationlevel / 2)) / magnificationlevel;
|
||||
|
||||
if (selectedtool == "Pencil")
|
||||
{
|
||||
|
@ -687,7 +690,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
// ERROR: Handles clauses are not supported in C#
|
||||
private void btnzoomout_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (magnificationlevel > 1)
|
||||
if (magnificationlevel > 0)
|
||||
{
|
||||
magnificationlevel /= 2;
|
||||
pnldrawingbackground.AutoScrollPosition = new Point(0, 0);
|
||||
|
@ -702,16 +705,16 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
private void setmagnification()
|
||||
{
|
||||
magnifyRect.Width = (int)canvaswidth / magnificationlevel;
|
||||
magnifyRect.Height = (int)canvasheight / magnificationlevel;
|
||||
picdrawingdisplay.Size = new Size(canvaswidth * magnificationlevel, canvasheight * magnificationlevel);
|
||||
magnifyRect.Width = canvaswidth / magnificationlevel;
|
||||
magnifyRect.Height = canvasheight / magnificationlevel;
|
||||
picdrawingdisplay.Size = new Size((int)(canvaswidth * magnificationlevel), (int)(canvasheight * magnificationlevel));
|
||||
if (picdrawingdisplay.Height > 468 && picdrawingdisplay.Width > 676)
|
||||
{
|
||||
picdrawingdisplay.Location = new Point(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth * magnificationlevel) / 2, (pnldrawingbackground.Height - canvasheight * magnificationlevel) / 2);
|
||||
picdrawingdisplay.CenterParent();
|
||||
}
|
||||
picdrawingdisplay.Invalidate();
|
||||
lblzoomlevel.Text = magnificationlevel + "X";
|
||||
|
@ -783,7 +786,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
// ERROR: Handles clauses are not supported in C#
|
||||
private void txtnewcanvaswidth_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (txtnewcanvaswidth.Text == "" | txtnewcanvasheight.Text == "")
|
||||
if (txtnewcanvaswidth.Text == "" || txtnewcanvasheight.Text == "")
|
||||
{
|
||||
if (txtnewcanvasheight.Text == "")
|
||||
{
|
||||
|
@ -801,7 +804,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
lbltotalpixels.Text = (Convert.ToInt32(txtnewcanvaswidth.Text) * Convert.ToInt32(txtnewcanvasheight.Text)).ToString();
|
||||
if (ShiftoriumFrontend.UpgradeInstalled("artpad_limitless_pixels") == true)
|
||||
{
|
||||
lbltotalpixels.ForeColor = Color.Black;
|
||||
lbltotalpixels.ForeColor = SkinEngine.LoadedSkin.ControlTextColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -811,7 +814,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
}
|
||||
else
|
||||
{
|
||||
lbltotalpixels.ForeColor = Color.Black;
|
||||
lbltotalpixels.ForeColor = SkinEngine.LoadedSkin.ControlTextColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1559,6 +1562,33 @@ namespace ShiftOS.WinForms.Applications
|
|||
public void OnUpgrade()
|
||||
{
|
||||
}
|
||||
|
||||
private void toolStripMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
magnificationlevel = 0.25f;
|
||||
setmagnification();
|
||||
}
|
||||
|
||||
private void toolStripMenuItem3_Click(object sender, EventArgs e)
|
||||
{
|
||||
magnificationlevel = 0.5f;
|
||||
setmagnification();
|
||||
|
||||
}
|
||||
|
||||
private void toolStripMenuItem4_Click(object sender, EventArgs e)
|
||||
{
|
||||
magnificationlevel = 1;
|
||||
setmagnification();
|
||||
|
||||
}
|
||||
|
||||
private void toolStripMenuItem5_Click(object sender, EventArgs e)
|
||||
{
|
||||
magnificationlevel = 2f;
|
||||
setmagnification();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class undo
|
||||
|
|
|
@ -135,4 +135,7 @@
|
|||
<metadata name="tmrsetupui.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>685, 17</value>
|
||||
</metadata>
|
||||
<metadata name="msTools.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>796, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -37,7 +37,7 @@ using System.Threading;
|
|||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[AppscapeEntry("{TITLE_AUDIOPLAYER}", "{DESC_AUDIOPLAYER}", 3047, 1000, "file_skimmer", "{AL_ENTERTAINMENT}")]
|
||||
[AppscapeEntry("audio_player", "{TITLE_AUDIOPLAYER}", "{DESC_AUDIOPLAYER}", 3047, 1000, "file_skimmer", "{AL_ENTERTAINMENT}")]
|
||||
[Launcher("{TITLE_AUDIOPLAYER}", false, null, "{AL_ENTERTAINMENT}")]
|
||||
[WinOpen("{WO_AUDIOPLAYER}")]
|
||||
[DefaultTitle("{TITLE_AUDIOPLAYER}")]
|
||||
|
|
181
ShiftOS.WinForms/Applications/ButtonMaster.Designer.cs
generated
Normal file
181
ShiftOS.WinForms/Applications/ButtonMaster.Designer.cs
generated
Normal file
|
@ -0,0 +1,181 @@
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
partial class ButtonMaster
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ButtonMaster));
|
||||
this.startpnl = new System.Windows.Forms.Panel();
|
||||
this.quitbtn = new System.Windows.Forms.Button();
|
||||
this.playbtn = new System.Windows.Forms.Button();
|
||||
this.difficultysel = new System.Windows.Forms.ListBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.desclabel = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.scorecounter = new System.Windows.Forms.Label();
|
||||
this.startpnl.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// startpnl
|
||||
//
|
||||
this.startpnl.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.startpnl.Controls.Add(this.quitbtn);
|
||||
this.startpnl.Controls.Add(this.playbtn);
|
||||
this.startpnl.Controls.Add(this.difficultysel);
|
||||
this.startpnl.Controls.Add(this.label3);
|
||||
this.startpnl.Controls.Add(this.desclabel);
|
||||
this.startpnl.Controls.Add(this.label2);
|
||||
this.startpnl.Controls.Add(this.label1);
|
||||
this.startpnl.Location = new System.Drawing.Point(27, 31);
|
||||
this.startpnl.Name = "startpnl";
|
||||
this.startpnl.Size = new System.Drawing.Size(580, 409);
|
||||
this.startpnl.TabIndex = 0;
|
||||
//
|
||||
// quitbtn
|
||||
//
|
||||
this.quitbtn.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.quitbtn.Location = new System.Drawing.Point(291, 303);
|
||||
this.quitbtn.Name = "quitbtn";
|
||||
this.quitbtn.Size = new System.Drawing.Size(58, 23);
|
||||
this.quitbtn.TabIndex = 7;
|
||||
this.quitbtn.Text = "Quit";
|
||||
this.quitbtn.UseVisualStyleBackColor = true;
|
||||
this.quitbtn.Click += new System.EventHandler(this.quitbtn_Click);
|
||||
//
|
||||
// playbtn
|
||||
//
|
||||
this.playbtn.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.playbtn.Location = new System.Drawing.Point(229, 303);
|
||||
this.playbtn.Name = "playbtn";
|
||||
this.playbtn.Size = new System.Drawing.Size(56, 23);
|
||||
this.playbtn.TabIndex = 6;
|
||||
this.playbtn.Text = "Play";
|
||||
this.playbtn.UseVisualStyleBackColor = true;
|
||||
this.playbtn.Click += new System.EventHandler(this.playbtn_Click);
|
||||
//
|
||||
// difficultysel
|
||||
//
|
||||
this.difficultysel.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.difficultysel.FormattingEnabled = true;
|
||||
this.difficultysel.Location = new System.Drawing.Point(152, 202);
|
||||
this.difficultysel.Name = "difficultysel";
|
||||
this.difficultysel.Size = new System.Drawing.Size(276, 95);
|
||||
this.difficultysel.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.Location = new System.Drawing.Point(243, 179);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(79, 20);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Tag = "header2";
|
||||
this.label3.Text = "Difficulty";
|
||||
//
|
||||
// desclabel
|
||||
//
|
||||
this.desclabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.desclabel.Location = new System.Drawing.Point(3, 67);
|
||||
this.desclabel.Name = "desclabel";
|
||||
this.desclabel.Size = new System.Drawing.Size(577, 112);
|
||||
this.desclabel.TabIndex = 2;
|
||||
this.desclabel.Tag = "";
|
||||
this.desclabel.Text = resources.GetString("desclabel.Text");
|
||||
this.desclabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(235, 37);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(105, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "by Appscape Games";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(211, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(152, 25);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Tag = "header1";
|
||||
this.label1.Text = "ButtonMaster";
|
||||
//
|
||||
// scorecounter
|
||||
//
|
||||
this.scorecounter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.scorecounter.BackColor = System.Drawing.Color.Transparent;
|
||||
this.scorecounter.Font = new System.Drawing.Font("Courier New", 15.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.scorecounter.ForeColor = System.Drawing.Color.Red;
|
||||
this.scorecounter.Location = new System.Drawing.Point(548, 454);
|
||||
this.scorecounter.Name = "scorecounter";
|
||||
this.scorecounter.Size = new System.Drawing.Size(92, 26);
|
||||
this.scorecounter.TabIndex = 1;
|
||||
this.scorecounter.Tag = "keepfont keepfg keepbg";
|
||||
this.scorecounter.Text = "score";
|
||||
this.scorecounter.TextAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.scorecounter.Visible = false;
|
||||
//
|
||||
// ButtonMaster
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.BlueBlueVerticalGradient;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.Controls.Add(this.scorecounter);
|
||||
this.Controls.Add(this.startpnl);
|
||||
this.Name = "ButtonMaster";
|
||||
this.Size = new System.Drawing.Size(640, 480);
|
||||
this.startpnl.ResumeLayout(false);
|
||||
this.startpnl.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel startpnl;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label desclabel;
|
||||
private System.Windows.Forms.ListBox difficultysel;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button playbtn;
|
||||
private System.Windows.Forms.Button quitbtn;
|
||||
private System.Windows.Forms.Label scorecounter;
|
||||
}
|
||||
}
|
176
ShiftOS.WinForms/Applications/ButtonMaster.cs
Normal file
176
ShiftOS.WinForms/Applications/ButtonMaster.cs
Normal file
|
@ -0,0 +1,176 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
// Behold... The ShiftOS program that doesn't use threading.
|
||||
[WinOpen("buttonmaster")]
|
||||
[Launcher("Button Master", false, "", "Games")]
|
||||
[AppscapeEntry("buttonmaster", "ButtonMaster", "Can you click all the buttons in 60 seconds?", 300, 10000)]
|
||||
public partial class ButtonMaster : UserControl, IShiftOSWindow
|
||||
{
|
||||
public ushort Buttons;
|
||||
public double Codepoints, Loss;
|
||||
private ulong RoundedCodepoints { get { return (ulong) Math.Round(Codepoints); } }
|
||||
public Timer clock = new Timer();
|
||||
private ButtonObject[] ButtonObjects;
|
||||
private static ButtonMasterDifficulty[] difficulties = new ButtonMasterDifficulty[]
|
||||
{
|
||||
new ButtonMasterDifficulty("Easy", 24, 500),
|
||||
new ButtonMasterDifficulty("Medium", 48, 1000),
|
||||
new ButtonMasterDifficulty("Hard", 100, 2000),
|
||||
new ButtonMasterDifficulty("Super Hard", 500, 10000)
|
||||
};
|
||||
public ButtonMaster()
|
||||
{
|
||||
InitializeComponent();
|
||||
difficultysel.Items.AddRange(difficulties);
|
||||
difficultysel.SelectedIndex = 0;
|
||||
clock.Interval = 20;
|
||||
clock.Tick += gameloop;
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public bool OnUnload()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void quitbtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
AppearanceManager.Close(this);
|
||||
}
|
||||
|
||||
private void playbtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
var difficulty = difficultysel.SelectedItem as ButtonMasterDifficulty;
|
||||
Buttons = difficulty.Buttons;
|
||||
Codepoints = difficulty.Codepoints;
|
||||
Loss = difficulty.Codepoints / 3000.0;
|
||||
startpnl.Hide();
|
||||
scorecounter.Text = difficulty.Codepoints.ToString();
|
||||
scorecounter.Show();
|
||||
ButtonObjects = new ButtonObject[Buttons];
|
||||
for (ushort i = 0; i < Buttons; i++)
|
||||
ButtonObjects[i] = new ButtonObject(this);
|
||||
Controls.AddRange(ButtonObjects.Select(b => b.ctl).ToArray());
|
||||
clock.Start();
|
||||
}
|
||||
|
||||
private void StopGame(string text)
|
||||
{
|
||||
desclabel.Text = text;
|
||||
startpnl.Show();
|
||||
clock.Stop();
|
||||
scorecounter.Hide();
|
||||
foreach (var b in ButtonObjects)
|
||||
{
|
||||
clock.Tick -= b.move;
|
||||
Controls.Remove(b.ctl);
|
||||
}
|
||||
}
|
||||
|
||||
private void gameloop(object sender, EventArgs e)
|
||||
{
|
||||
if (Codepoints <= 0)
|
||||
{
|
||||
Codepoints = 0;
|
||||
string text = String.Format("You lost. There were {0} buttons to go.", Buttons);
|
||||
if (difficultysel.SelectedIndex > 0)
|
||||
text += " Try an easier difficulty?";
|
||||
StopGame(text);
|
||||
}
|
||||
else if (Buttons <= 0)
|
||||
{
|
||||
SaveSystem.CurrentSave.Codepoints += RoundedCodepoints;
|
||||
string text = String.Format("You won! {0} Codepoints have been transferred to your system.", RoundedCodepoints);
|
||||
StopGame(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
Codepoints -= Loss;
|
||||
scorecounter.Text = RoundedCodepoints.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
public class ButtonMasterDifficulty
|
||||
{
|
||||
public string Name { get; private set; }
|
||||
public ushort Buttons { get; private set; }
|
||||
public uint Codepoints { get; private set; }
|
||||
public string Display { get; private set; }
|
||||
public override string ToString()
|
||||
{
|
||||
return Display;
|
||||
}
|
||||
public ButtonMasterDifficulty(string in_Name, ushort in_Buttons, uint in_Codepoints)
|
||||
{
|
||||
Name = in_Name;
|
||||
Buttons = in_Buttons;
|
||||
Codepoints = in_Codepoints;
|
||||
Display = String.Format("{0} ({1} Buttons, {2} Codepoints)", Name, Buttons, Codepoints);
|
||||
}
|
||||
}
|
||||
|
||||
public class ButtonObject
|
||||
{
|
||||
public Button ctl;
|
||||
public sbyte xspeed, yspeed;
|
||||
public ButtonMaster parent;
|
||||
private static Random rnd = new Random();
|
||||
public void move(object sender, EventArgs e)
|
||||
{
|
||||
ctl.Top += yspeed;
|
||||
if (ctl.Top < 0 || ctl.Bottom > parent.Height)
|
||||
yspeed = (sbyte)(Math.Abs(yspeed) * -(ctl.Top / Math.Abs(ctl.Top))); // Change the sign of yspeed to be the opposite of that of ctl.Top
|
||||
ctl.Left += xspeed;
|
||||
if (ctl.Left < 0 || ctl.Right > parent.Width)
|
||||
xspeed = (sbyte)(Math.Abs(xspeed) * -(ctl.Left / Math.Abs(ctl.Left)));
|
||||
}
|
||||
public void click(object sender, EventArgs e)
|
||||
{
|
||||
parent.Buttons--;
|
||||
ctl.Hide();
|
||||
parent.clock.Tick -= move;
|
||||
}
|
||||
public ButtonObject(ButtonMaster in_parent)
|
||||
{
|
||||
xspeed = (sbyte) rnd.Next(10, 20);
|
||||
yspeed = (sbyte) rnd.Next(10, 20);
|
||||
parent = in_parent;
|
||||
parent.clock.Tick += move;
|
||||
ctl = new Button();
|
||||
ctl.Click += click;
|
||||
ctl.Top = rnd.Next(parent.Height);
|
||||
ctl.Left = rnd.Next(parent.Width);
|
||||
ctl.Width = 75;
|
||||
ctl.Height = 23;
|
||||
ctl.Text = "Click";
|
||||
// Time to invoke a private method using reflection. What could possibly go wrong?
|
||||
// This stops the player from just holding down space to beat the level.
|
||||
typeof(Button).GetMethod("SetStyle", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).Invoke(ctl, new object[] { ControlStyles.Selectable, false });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
130
ShiftOS.WinForms/Applications/ButtonMaster.resx
Normal file
130
ShiftOS.WinForms/Applications/ButtonMaster.resx
Normal file
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="desclabel.Text" xml:space="preserve">
|
||||
<value>In the game of ButtonMaster, dozens of buttons bounce
|
||||
around the window. Your task is to click all of them in
|
||||
60 seconds. The quicker you pull it off, the more points
|
||||
you earn.
|
||||
|
||||
In this special ShiftOS version, any points you earn are
|
||||
added to your Codepoints balance at the end of the game.
|
||||
So, what are you waiting for?</value>
|
||||
</data>
|
||||
</root>
|
32
ShiftOS.WinForms/Applications/Chat.Designer.cs
generated
32
ShiftOS.WinForms/Applications/Chat.Designer.cs
generated
|
@ -65,9 +65,12 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.tschatid = new System.Windows.Forms.ToolStripLabel();
|
||||
this.tsuserdata = new System.Windows.Forms.ToolStripLabel();
|
||||
this.lbtyping = new System.Windows.Forms.ToolStripLabel();
|
||||
this.tsbottombar = new System.Windows.Forms.ToolStrip();
|
||||
this.txtuserinput = new System.Windows.Forms.ToolStripTextBox();
|
||||
this.btnsend = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.btnsendfile = new System.Windows.Forms.ToolStripButton();
|
||||
this.panel1.SuspendLayout();
|
||||
this.pnlstart.SuspendLayout();
|
||||
this.flowLayoutPanel1.SuspendLayout();
|
||||
|
@ -179,7 +182,10 @@ namespace ShiftOS.WinForms.Applications
|
|||
//
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tschatid,
|
||||
this.tsuserdata});
|
||||
this.tsuserdata,
|
||||
this.lbtyping,
|
||||
this.toolStripSeparator1,
|
||||
this.btnsendfile});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(633, 25);
|
||||
|
@ -198,6 +204,12 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.tsuserdata.Size = new System.Drawing.Size(86, 22);
|
||||
this.tsuserdata.Text = "toolStripLabel1";
|
||||
//
|
||||
// lbtyping
|
||||
//
|
||||
this.lbtyping.Name = "lbtyping";
|
||||
this.lbtyping.Size = new System.Drawing.Size(86, 22);
|
||||
this.lbtyping.Text = "toolStripLabel1";
|
||||
//
|
||||
// tsbottombar
|
||||
//
|
||||
this.tsbottombar.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
|
@ -227,6 +239,21 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.btnsend.Text = "Send";
|
||||
this.btnsend.Click += new System.EventHandler(this.btnsend_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// btnsendfile
|
||||
//
|
||||
this.btnsendfile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.btnsendfile.Image = ((System.Drawing.Image)(resources.GetObject("btnsendfile.Image")));
|
||||
this.btnsendfile.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnsendfile.Name = "btnsendfile";
|
||||
this.btnsendfile.Size = new System.Drawing.Size(65, 22);
|
||||
this.btnsendfile.Text = "Send a file";
|
||||
this.btnsendfile.Click += new System.EventHandler(this.btnsendfile_Click);
|
||||
//
|
||||
// Chat
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -265,5 +292,8 @@ namespace ShiftOS.WinForms.Applications
|
|||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.TextBox txtchatid;
|
||||
private System.Windows.Forms.Button btnjoin;
|
||||
private System.Windows.Forms.ToolStripLabel lbtyping;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripButton btnsendfile;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
[WinOpen("{WO_SIMPLESRC}")]
|
||||
[Launcher("{TITLE_SIMPLESRC}", false, null, "{AL_NETWORKING}")]
|
||||
[DefaultTitle("{TITLE_SIMPLESRC}")]
|
||||
[AppscapeEntry("{TITLE_SIMPLESRC}", "{DESC_SIMPLESRC}", 300, 145, "file_skimmer", "{AL_NETWORKING}")]
|
||||
[AppscapeEntry("simplesrc_client", "{TITLE_SIMPLESRC}", "{DESC_SIMPLESRC}", 300, 145, "file_skimmer", "{AL_NETWORKING}")]
|
||||
public partial class Chat : UserControl, IShiftOSWindow
|
||||
{
|
||||
public Chat()
|
||||
|
@ -49,6 +49,41 @@ namespace ShiftOS.WinForms.Applications
|
|||
InitializeComponent();
|
||||
}
|
||||
|
||||
public event Action<ShiftOS.Objects.ShiftFS.File> FileSent;
|
||||
|
||||
public string Typing
|
||||
{
|
||||
get
|
||||
{
|
||||
return lbtyping.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
lbtyping.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
lbtyping.Text = value + " is typing...";
|
||||
lbtyping.Visible = true;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowChat()
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
pnlstart.Hide();
|
||||
rtbchat.Show();
|
||||
rtbchat.BringToFront();
|
||||
}));
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
AllInstances.Add(this);
|
||||
|
@ -86,7 +121,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
private void txtuserinput_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if(e.KeyCode == Keys.Enter)
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
|
||||
|
@ -108,7 +143,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public static void SendMessage(string user, string destination, string msg)
|
||||
{
|
||||
foreach(var chat in AllInstances)
|
||||
foreach (var chat in AllInstances)
|
||||
{
|
||||
chat.PostMessage(user, destination, msg);
|
||||
}
|
||||
|
@ -138,62 +173,14 @@ namespace ShiftOS.WinForms.Applications
|
|||
txtuserinput.Text = "";
|
||||
}
|
||||
|
||||
[Story("story_thefennfamily")]
|
||||
public static void Story_TheFennFamily()
|
||||
private void btnsendfile_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool complete = false;
|
||||
Infobox.Show("SimpleSRC", "A direct message has been sent to you on SimpleSRC from user \"maureenfenn@trisys\".", () =>
|
||||
FileSkimmerBackend.GetFile(new[] { "" }, FileOpenerStyle.Open, (file) =>
|
||||
{
|
||||
string ch = "maureenfenn@trisys";
|
||||
var c = new Chat();
|
||||
c.ChatID = ch;
|
||||
AppearanceManager.SetupWindow(c);
|
||||
string you = $"{SaveSystem.CurrentUser.Username}@{SaveSystem.CurrentSave.SystemName}";
|
||||
|
||||
var t = new Thread(() =>
|
||||
{
|
||||
SendMessage(you, ch, "User has joined the chat.");
|
||||
Thread.Sleep(2000);
|
||||
SendMessage(ch, ch, "Hello, " + you + ". My name is Maureen. Maureen Fenn.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "I am the author of the various Tri applications you may see on Appscape.");
|
||||
Thread.Sleep(2000);
|
||||
SendMessage(ch, ch, "I need your help with something...");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "Firstly, a little backstory. There was a time in ShiftOS when none of us were connected.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "There wasn't a Digital Society, we didn't have chat applications or anything...");
|
||||
Thread.Sleep(2000);
|
||||
SendMessage(ch, ch, "All we had was the Shiftnet.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "However, in 2016, something happened called the \"connected revolution\". It was like, the invention of the Internet - it was huge for the world of ShiftOS.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "Before this, the only way you could earn Codepoints was through playing games in ShiftOS.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "I was the one who coded those games, and I would put them on a Shiftnet website that you can still access today, shiftnet/main/shiftgames.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "But when the Connected Revolution took place, things got difficult. My son, Nalyr Fenn, was born, and people stopped using my software and instead moved on to hacking eachother and stealing peoples' Codepoints.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "When Nalyr's sentience levels reached near human - i.e, he grew up, we decided to start TriOffice. It was a huge success, thanks to Aiden Nirh, the guy who runs Appscape.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "However... a few months ago he cut contact with us and we stopped receiving Codepoints from TriOffice.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "I'm running low - I can't afford to keep my system running much longer. You have to help!");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "Perhaps, you could breach Aiden's server and look for clues as to why he's against us? I'll reward you with the last Codepoints I have.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(you, ch, "Alright, I'm in - but I don't know where to begin...");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "A little birdie tells me you know about the RTS exploits going around... Try using that on Aiden's server. You can find his systemname on Appscape under \"Contact Us.\" He has a mailserver on Appscape - and also has RTS on the same server.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "Good luck... My life depends on you!");
|
||||
complete = true;
|
||||
});
|
||||
t.IsBackground = true;
|
||||
t.Start();
|
||||
var finf = ShiftOS.Objects.ShiftFS.Utils.GetFileInfo(file);
|
||||
PostMessage($"{SaveSystem.CurrentUser.Username}@{SaveSystem.CurrentSave.SystemName}", ChatID, "<user sent a file: " + finf.Name + ">");
|
||||
FileSent?.Invoke(finf);
|
||||
});
|
||||
while (!complete)
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,16 +120,25 @@
|
|||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tsbottombar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tsbottombar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnsendfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="tsbottombar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 17</value>
|
||||
</metadata>
|
||||
<data name="btnsend.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
|
|
73
ShiftOS.WinForms/Applications/Clock.Designer.cs
generated
Normal file
73
ShiftOS.WinForms/Applications/Clock.Designer.cs
generated
Normal file
|
@ -0,0 +1,73 @@
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
partial class Clock
|
||||
{
|
||||
/// <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.lbheader = new System.Windows.Forms.Label();
|
||||
this.lbcurrenttime = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lbheader
|
||||
//
|
||||
this.lbheader.AutoSize = true;
|
||||
this.lbheader.Location = new System.Drawing.Point(234, 183);
|
||||
this.lbheader.Name = "lbheader";
|
||||
this.lbheader.Size = new System.Drawing.Size(66, 13);
|
||||
this.lbheader.TabIndex = 0;
|
||||
this.lbheader.Tag = "header2";
|
||||
this.lbheader.Text = "Current time:";
|
||||
//
|
||||
// lbcurrenttime
|
||||
//
|
||||
this.lbcurrenttime.AutoSize = true;
|
||||
this.lbcurrenttime.Location = new System.Drawing.Point(294, 140);
|
||||
this.lbcurrenttime.Name = "lbcurrenttime";
|
||||
this.lbcurrenttime.Size = new System.Drawing.Size(135, 13);
|
||||
this.lbcurrenttime.TabIndex = 1;
|
||||
this.lbcurrenttime.Tag = "header1";
|
||||
this.lbcurrenttime.Text = "000001 seconds since helll";
|
||||
//
|
||||
// Clock
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.lbcurrenttime);
|
||||
this.Controls.Add(this.lbheader);
|
||||
this.Name = "Clock";
|
||||
this.Size = new System.Drawing.Size(527, 260);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lbheader;
|
||||
private System.Windows.Forms.Label lbcurrenttime;
|
||||
}
|
||||
}
|
55
ShiftOS.WinForms/Applications/Clock.cs
Normal file
55
ShiftOS.WinForms/Applications/Clock.cs
Normal file
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ShiftOS.Engine;
|
||||
using ShiftOS.WinForms.Tools;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[RequiresUpgrade("clock")]
|
||||
[WinOpen("clock")]
|
||||
[Launcher("Clock", false, null, "Accessories")]
|
||||
[DefaultTitle("Clock")]
|
||||
public partial class Clock : UserControl, IShiftOSWindow
|
||||
{
|
||||
public Clock()
|
||||
{
|
||||
InitializeComponent();
|
||||
clocktimer = new Timer();
|
||||
clocktimer.Interval = 100;
|
||||
clocktimer.Tick += (o, a) =>
|
||||
{
|
||||
lbheader.CenterParent();
|
||||
lbheader.Top = 15;
|
||||
lbcurrenttime.Text = Terminal.GetTime();
|
||||
lbcurrenttime.CenterParent();
|
||||
};
|
||||
}
|
||||
|
||||
private Timer clocktimer = null;
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
clocktimer.Start();
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
}
|
||||
|
||||
public bool OnUnload()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
120
ShiftOS.WinForms/Applications/Clock.resx
Normal file
120
ShiftOS.WinForms/Applications/Clock.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
187
ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs
generated
187
ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs
generated
|
@ -52,6 +52,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileSkimmer));
|
||||
this.lvitems = new System.Windows.Forms.ListView();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.pinnedItems = new System.Windows.Forms.TreeView();
|
||||
|
@ -63,8 +64,25 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.moveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pnlconnect = new System.Windows.Forms.Panel();
|
||||
this.flcbuttons = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btncancel = new System.Windows.Forms.Button();
|
||||
this.btnok = new System.Windows.Forms.Button();
|
||||
this.pnlcreds = new System.Windows.Forms.Panel();
|
||||
this.txtcpass = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtcuser = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtcsys = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.lbcdesc = new System.Windows.Forms.Label();
|
||||
this.lbctitle = new System.Windows.Forms.Label();
|
||||
this.disconnectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.panel1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.pnlconnect.SuspendLayout();
|
||||
this.flcbuttons.SuspendLayout();
|
||||
this.pnlcreds.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lvitems
|
||||
|
@ -114,6 +132,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.newFolderToolStripMenuItem,
|
||||
this.deleteToolStripMenuItem,
|
||||
this.connectToRemoteServerToolStripMenuItem,
|
||||
this.disconnectToolStripMenuItem,
|
||||
this.copyToolStripMenuItem,
|
||||
this.moveToolStripMenuItem,
|
||||
this.pinToolStripMenuItem});
|
||||
|
@ -140,9 +159,9 @@ namespace ShiftOS.WinForms.Applications
|
|||
// connectToRemoteServerToolStripMenuItem
|
||||
//
|
||||
this.connectToRemoteServerToolStripMenuItem.Name = "connectToRemoteServerToolStripMenuItem";
|
||||
this.connectToRemoteServerToolStripMenuItem.Size = new System.Drawing.Size(153, 20);
|
||||
this.connectToRemoteServerToolStripMenuItem.Text = "Connect to remote server";
|
||||
this.connectToRemoteServerToolStripMenuItem.Visible = false;
|
||||
this.connectToRemoteServerToolStripMenuItem.Size = new System.Drawing.Size(129, 20);
|
||||
this.connectToRemoteServerToolStripMenuItem.Text = "Start Remote Session";
|
||||
this.connectToRemoteServerToolStripMenuItem.Click += new System.EventHandler(this.connectToRemoteServerToolStripMenuItem_Click);
|
||||
//
|
||||
// copyToolStripMenuItem
|
||||
//
|
||||
|
@ -165,10 +184,152 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.pinToolStripMenuItem.Text = "Pin";
|
||||
this.pinToolStripMenuItem.Click += new System.EventHandler(this.pinToolStripMenuItem_Click);
|
||||
//
|
||||
// pnlconnect
|
||||
//
|
||||
this.pnlconnect.Controls.Add(this.flcbuttons);
|
||||
this.pnlconnect.Controls.Add(this.pnlcreds);
|
||||
this.pnlconnect.Controls.Add(this.lbcdesc);
|
||||
this.pnlconnect.Controls.Add(this.lbctitle);
|
||||
this.pnlconnect.Location = new System.Drawing.Point(100, 27);
|
||||
this.pnlconnect.Name = "pnlconnect";
|
||||
this.pnlconnect.Size = new System.Drawing.Size(419, 306);
|
||||
this.pnlconnect.TabIndex = 4;
|
||||
this.pnlconnect.Visible = false;
|
||||
//
|
||||
// flcbuttons
|
||||
//
|
||||
this.flcbuttons.AutoSize = true;
|
||||
this.flcbuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flcbuttons.Controls.Add(this.btncancel);
|
||||
this.flcbuttons.Controls.Add(this.btnok);
|
||||
this.flcbuttons.Location = new System.Drawing.Point(116, 256);
|
||||
this.flcbuttons.Name = "flcbuttons";
|
||||
this.flcbuttons.Size = new System.Drawing.Size(94, 29);
|
||||
this.flcbuttons.TabIndex = 3;
|
||||
//
|
||||
// btncancel
|
||||
//
|
||||
this.btncancel.AutoSize = true;
|
||||
this.btncancel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btncancel.Location = new System.Drawing.Point(3, 3);
|
||||
this.btncancel.Name = "btncancel";
|
||||
this.btncancel.Size = new System.Drawing.Size(50, 23);
|
||||
this.btncancel.TabIndex = 0;
|
||||
this.btncancel.Text = "Cancel";
|
||||
this.btncancel.UseVisualStyleBackColor = true;
|
||||
this.btncancel.Click += new System.EventHandler(this.btncancel_Click);
|
||||
//
|
||||
// btnok
|
||||
//
|
||||
this.btnok.AutoSize = true;
|
||||
this.btnok.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnok.Location = new System.Drawing.Point(59, 3);
|
||||
this.btnok.Name = "btnok";
|
||||
this.btnok.Size = new System.Drawing.Size(32, 23);
|
||||
this.btnok.TabIndex = 1;
|
||||
this.btnok.Text = "OK";
|
||||
this.btnok.UseVisualStyleBackColor = true;
|
||||
this.btnok.Click += new System.EventHandler(this.btnok_Click);
|
||||
//
|
||||
// pnlcreds
|
||||
//
|
||||
this.pnlcreds.Controls.Add(this.txtcpass);
|
||||
this.pnlcreds.Controls.Add(this.label3);
|
||||
this.pnlcreds.Controls.Add(this.txtcuser);
|
||||
this.pnlcreds.Controls.Add(this.label2);
|
||||
this.pnlcreds.Controls.Add(this.txtcsys);
|
||||
this.pnlcreds.Controls.Add(this.label1);
|
||||
this.pnlcreds.Location = new System.Drawing.Point(25, 129);
|
||||
this.pnlcreds.Name = "pnlcreds";
|
||||
this.pnlcreds.Size = new System.Drawing.Size(300, 104);
|
||||
this.pnlcreds.TabIndex = 2;
|
||||
//
|
||||
// txtcpass
|
||||
//
|
||||
this.txtcpass.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtcpass.Location = new System.Drawing.Point(91, 62);
|
||||
this.txtcpass.Name = "txtcpass";
|
||||
this.txtcpass.Size = new System.Drawing.Size(196, 20);
|
||||
this.txtcpass.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(12, 65);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(56, 13);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "Password:";
|
||||
//
|
||||
// txtcuser
|
||||
//
|
||||
this.txtcuser.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtcuser.Location = new System.Drawing.Point(91, 36);
|
||||
this.txtcuser.Name = "txtcuser";
|
||||
this.txtcuser.Size = new System.Drawing.Size(196, 20);
|
||||
this.txtcuser.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 39);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(58, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Username:";
|
||||
//
|
||||
// txtcsys
|
||||
//
|
||||
this.txtcsys.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtcsys.Location = new System.Drawing.Point(91, 10);
|
||||
this.txtcsys.Name = "txtcsys";
|
||||
this.txtcsys.Size = new System.Drawing.Size(196, 20);
|
||||
this.txtcsys.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 13);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(73, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "System name:";
|
||||
//
|
||||
// lbcdesc
|
||||
//
|
||||
this.lbcdesc.Location = new System.Drawing.Point(46, 51);
|
||||
this.lbcdesc.Name = "lbcdesc";
|
||||
this.lbcdesc.Size = new System.Drawing.Size(357, 54);
|
||||
this.lbcdesc.TabIndex = 1;
|
||||
this.lbcdesc.Text = resources.GetString("lbcdesc.Text");
|
||||
this.lbcdesc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lbctitle
|
||||
//
|
||||
this.lbctitle.AutoSize = true;
|
||||
this.lbctitle.Location = new System.Drawing.Point(13, 18);
|
||||
this.lbctitle.Name = "lbctitle";
|
||||
this.lbctitle.Size = new System.Drawing.Size(133, 13);
|
||||
this.lbctitle.TabIndex = 0;
|
||||
this.lbctitle.Tag = "header3";
|
||||
this.lbctitle.Text = "Connect to Remote Server";
|
||||
//
|
||||
// disconnectToolStripMenuItem
|
||||
//
|
||||
this.disconnectToolStripMenuItem.Name = "disconnectToolStripMenuItem";
|
||||
this.disconnectToolStripMenuItem.Size = new System.Drawing.Size(78, 20);
|
||||
this.disconnectToolStripMenuItem.Text = "Disconnect";
|
||||
this.disconnectToolStripMenuItem.Visible = false;
|
||||
this.disconnectToolStripMenuItem.Click += new System.EventHandler(this.disconnectToolStripMenuItem_Click);
|
||||
//
|
||||
// FileSkimmer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.pnlconnect);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Name = "FileSkimmer";
|
||||
|
@ -177,6 +338,12 @@ namespace ShiftOS.WinForms.Applications
|
|||
this.panel1.ResumeLayout(false);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.pnlconnect.ResumeLayout(false);
|
||||
this.pnlconnect.PerformLayout();
|
||||
this.flcbuttons.ResumeLayout(false);
|
||||
this.flcbuttons.PerformLayout();
|
||||
this.pnlcreds.ResumeLayout(false);
|
||||
this.pnlcreds.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -195,5 +362,19 @@ namespace ShiftOS.WinForms.Applications
|
|||
private System.Windows.Forms.ToolStripMenuItem moveToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem pinToolStripMenuItem;
|
||||
private System.Windows.Forms.TreeView pinnedItems;
|
||||
private System.Windows.Forms.Panel pnlconnect;
|
||||
private System.Windows.Forms.FlowLayoutPanel flcbuttons;
|
||||
private System.Windows.Forms.Button btncancel;
|
||||
private System.Windows.Forms.Button btnok;
|
||||
private System.Windows.Forms.Panel pnlcreds;
|
||||
private System.Windows.Forms.TextBox txtcpass;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtcuser;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtcsys;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label lbcdesc;
|
||||
private System.Windows.Forms.Label lbctitle;
|
||||
private System.Windows.Forms.ToolStripMenuItem disconnectToolStripMenuItem;
|
||||
}
|
||||
}
|
|
@ -36,6 +36,7 @@ using System.Windows.Forms;
|
|||
using static ShiftOS.Objects.ShiftFS.Utils;
|
||||
using ShiftOS.Engine;
|
||||
using Newtonsoft.Json;
|
||||
using ShiftOS.WinForms.Tools;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
|
@ -46,6 +47,24 @@ namespace ShiftOS.WinForms.Applications
|
|||
[DefaultIcon("iconFileSkimmer")]
|
||||
public partial class FileSkimmer : UserControl, IShiftOSWindow
|
||||
{
|
||||
|
||||
public static Objects.ClientSave CurrentRemoteUser = new Objects.ClientSave();
|
||||
public static ShiftOSEnvironment OpenConnection = new ShiftOSEnvironment();
|
||||
|
||||
private static event Action OnDisconnect;
|
||||
|
||||
public static void DisconnectRemote()
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
OnDisconnect?.Invoke();
|
||||
CurrentRemoteUser = new Objects.ClientSave();
|
||||
if (!string.IsNullOrWhiteSpace(OpenConnection.SystemName))
|
||||
Infobox.Show("Connections terminated.", "All outbound File Skimmer connections have been terminated.");
|
||||
OpenConnection = new ShiftOSEnvironment();
|
||||
});
|
||||
}
|
||||
|
||||
public FileSkimmer()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -53,6 +72,15 @@ namespace ShiftOS.WinForms.Applications
|
|||
{
|
||||
ChangeDirectory(Paths.GetPath("root"));
|
||||
};
|
||||
OnDisconnect += FileSkimmer_OnDisconnect;
|
||||
}
|
||||
|
||||
private void FileSkimmer_OnDisconnect()
|
||||
{
|
||||
connectToRemoteServerToolStripMenuItem.Text = "Start Remote Session";
|
||||
disconnectToolStripMenuItem.Visible = false;
|
||||
currentdir = "__system";
|
||||
ResetList();
|
||||
}
|
||||
|
||||
private void lvitems_DoubleClick(object sender, EventArgs e)
|
||||
|
@ -300,6 +328,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public bool OnUnload()
|
||||
{
|
||||
OnDisconnect -= FileSkimmer_OnDisconnect;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -497,5 +526,79 @@ namespace ShiftOS.WinForms.Applications
|
|||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void connectToRemoteServerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowConnectionBox();
|
||||
}
|
||||
|
||||
public void ShowConnectionBox()
|
||||
{
|
||||
pnlconnect.Show();
|
||||
pnlconnect.BringToFront();
|
||||
pnlconnect.CenterParent();
|
||||
|
||||
//header
|
||||
lbctitle.CenterParent();
|
||||
lbctitle.Top = 5;
|
||||
|
||||
//description
|
||||
lbcdesc.CenterParent();
|
||||
lbcdesc.Top = lbctitle.Top + lbctitle.Height + 5;
|
||||
|
||||
//credentials
|
||||
pnlcreds.CenterParent();
|
||||
pnlcreds.Top = lbcdesc.Top + lbcdesc.Height + 5;
|
||||
txtcsys.Text = OpenConnection.SystemName;
|
||||
txtcuser.Text = CurrentRemoteUser.Username;
|
||||
txtcpass.Text = CurrentRemoteUser.Password;
|
||||
|
||||
//controls
|
||||
flcbuttons.CenterParent();
|
||||
flcbuttons.Top = pnlcreds.Top + pnlcreds.Height + 5;
|
||||
}
|
||||
|
||||
private void btncancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
pnlconnect.Hide();
|
||||
}
|
||||
|
||||
private void btnok_Click(object sender, EventArgs e)
|
||||
{
|
||||
var sys = VirtualEnvironments.Get(txtcsys.Text);
|
||||
|
||||
if(sys != null)
|
||||
{
|
||||
//user auth
|
||||
var user = sys.Users.FirstOrDefault(x => x.Username == txtcuser.Text && x.Password == txtcpass.Text);
|
||||
if(user != null)
|
||||
{
|
||||
OpenConnection = sys;
|
||||
CurrentRemoteUser = user;
|
||||
if (Mounts.Count == 3)
|
||||
Mounts.RemoveAt(2);
|
||||
Mounts.Add(sys.Filesystem);
|
||||
ChangeDirectory("2:");
|
||||
pnlconnect.Hide();
|
||||
connectToRemoteServerToolStripMenuItem.Text = "Reauthenticate";
|
||||
disconnectToolStripMenuItem.Visible = true;
|
||||
return;
|
||||
}
|
||||
Infobox.Show("Access denied.", "Authentication failed for the specified user. Connection aborted.");
|
||||
return;
|
||||
}
|
||||
var t = new System.Threading.Thread(() =>
|
||||
{
|
||||
System.Threading.Thread.Sleep(5000);
|
||||
Infobox.Show("Connection timeout.", "Cannot connect to the specified system name...");
|
||||
});
|
||||
t.IsBackground = true;
|
||||
t.Start();
|
||||
}
|
||||
|
||||
private void disconnectToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
DisconnectRemote();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,4 +120,7 @@
|
|||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="lbcdesc.Text" xml:space="preserve">
|
||||
<value>Remote servers allow you to store and retrieve documents and files on computers from all over the Digital Society. Simply enter a system name and the relevant user credentials to log in and we'll mount the remote filesystem as if it were a drive on your computer.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -40,7 +40,7 @@ namespace ShiftOS.WinForms.Applications {
|
|||
|
||||
[MultiplayerOnly]
|
||||
[Launcher("{TITLE_NAMECHANGER}", false, null, "{AL_CUSTOMIZATION}")]
|
||||
[AppscapeEntry("{TITLE_NAMECHANGER}", "{DESC_NAMECHANGER}", 342, 500, "skinning;file_skimmer;wm_titlebar", "{AL_CUSTOMIZATION}")]
|
||||
[AppscapeEntry("name_changer", "{TITLE_NAMECHANGER}", "{DESC_NAMECHANGER}", 342, 500, "skinning;file_skimmer;wm_titlebar", "{AL_CUSTOMIZATION}")]
|
||||
[WinOpen("{WO_NAMECHANGER}")]
|
||||
[DefaultTitle("{TITLE_NAMECHANGER}")]
|
||||
[DefaultIcon("iconNameChanger")]
|
||||
|
|
|
@ -304,7 +304,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
doAi = true;
|
||||
}
|
||||
|
||||
private bool drawAiBall = true;
|
||||
private bool drawAiBall = false;
|
||||
|
||||
private void pnlcanvas_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
|
@ -402,6 +402,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public void OnLoad()
|
||||
{
|
||||
pnlgamestart.CenterParent();
|
||||
doAi = false;
|
||||
doBallCalc = false;
|
||||
pnlgamestart.Show();
|
||||
|
|
|
@ -33,12 +33,13 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ShiftOS.WinForms.Tools;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[MultiplayerOnly]
|
||||
[Launcher("{TITLE_SHIFTLETTERS}", false, null, "{AL_GAMES}")]
|
||||
[AppscapeEntry("{TITLE_SHIFTLETTERS}", "{DESC_SHIFTLETTERS}", 300, 150, null, "{AL_GAMES}")]
|
||||
[AppscapeEntry("shiftletters", "{TITLE_SHIFTLETTERS}", "{DESC_SHIFTLETTERS}", 300, 150, null, "{AL_GAMES}")]
|
||||
[WinOpen("{WO_SHIFTLETTERS}")]
|
||||
[DefaultIcon("iconShiftLetters")]
|
||||
public partial class ShiftLetters : UserControl, IShiftOSWindow
|
||||
|
@ -180,8 +181,18 @@ namespace ShiftOS.WinForms.Applications
|
|||
if (Shiftorium.UpgradeInstalled("sl_operating_systems_wordlist")) comboBox1.Items.Add("Operating Systems");
|
||||
btnrestart.Visible = true;
|
||||
lblword.Left = (this.Width - lblword.Width) / 2;
|
||||
comboBox1.SelectedIndex = 0;
|
||||
tmrcenter.Tick += (o, a) =>
|
||||
{
|
||||
this.tbguess.CenterParent();
|
||||
this.tbguess.Parent.CenterParent();
|
||||
};
|
||||
tmrcenter.Interval = 50;
|
||||
tmrcenter.Start();
|
||||
}
|
||||
|
||||
Timer tmrcenter = new Timer();
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
|
||||
|
@ -189,6 +200,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public bool OnUnload()
|
||||
{
|
||||
tmrcenter.Stop();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ using ShiftOS.Engine;
|
|||
|
||||
namespace ShiftOS.WinForms.Applications {
|
||||
[Launcher("{TITLE_SHIFTSWEEPER}", true, "al_shiftsweeper", "{AL_GAMES}")]
|
||||
[AppscapeEntry("{TITLE_SHIFTSWEEPER}", "{DESC_SHIFTSWEEPER}", 1600, 800, "shiftletters", "{AL_GAMES}")]
|
||||
[AppscapeEntry("shiftsweeper", "{TITLE_SHIFTSWEEPER}", "{DESC_SHIFTSWEEPER}", 1600, 800, "shiftletters", "{AL_GAMES}")]
|
||||
[MultiplayerOnly]
|
||||
[WinOpen("{WO_SHIFTSWEEPER}")]
|
||||
[DefaultIcon("iconShiftSweeper")]
|
||||
|
|
|
@ -15,7 +15,7 @@ using ShiftOS.Objects.ShiftFS;
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[WinOpen("trisheet")]
|
||||
[AppscapeEntry("TriSheet", "Part of the trilogy of office applications for enhancement of your system. TriSheet is easliy the best spreadsheet program out there for ShiftOS.", 1024, 750, "file_skimmer;textpad", "Office")]
|
||||
[AppscapeEntry("trisheet", "TriSheet", "Part of the trilogy of office applications for enhancement of your system. TriSheet is easliy the best spreadsheet program out there for ShiftOS.", 1024, 750, "file_skimmer;textpad", "Office")]
|
||||
[DefaultTitle("TriSheet")]
|
||||
[Launcher("TriSheet", false, null, "Office")]
|
||||
public partial class TriSheet : UserControl, IShiftOSWindow
|
||||
|
@ -36,11 +36,10 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public void ResetFonts()
|
||||
{
|
||||
#if YALL_GOT_ANY_MORE_OF_THEM_NONEXISTENT_CONTROLS
|
||||
fonts.Items.Clear();
|
||||
foreach (var font in FontFamily.Families)
|
||||
{
|
||||
fonts.Items.Add(font.Name);
|
||||
}
|
||||
fonts.Items.AddRange(FontFamily.Families.Select(f => f.Name));
|
||||
#endif
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ using ShiftOS.Engine;
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[WinOpen("triwrite")]
|
||||
[AppscapeEntry("TriWrite", "Part of the trilogy of office applications for enhancement of your system. TriWrite is easliy the best text editor out there for ShiftOS.", 1024, 750, "file_skimmer;textpad", "Office")]
|
||||
[AppscapeEntry("triwrite", "TriWrite", "Part of the trilogy of office applications for enhancement of your system. TriWrite is easliy the best text editor out there for ShiftOS.", 1024, 750, "file_skimmer;textpad", "Office")]
|
||||
[DefaultTitle("TriWrite")]
|
||||
[Launcher("TriWrite", false, null, "Office")]
|
||||
public partial class TriWrite : UserControl, IShiftOSWindow
|
||||
|
|
|
@ -12,7 +12,7 @@ using System.IO;
|
|||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[AppscapeEntry("Video Player", "Play .mp4 files or .wmv files as videos inside ShiftOS! Perfect for a shifted movie night.", 1524, 1000, "file_skimmer", "Entertainment")]
|
||||
[AppscapeEntry("video_player", "Video Player", "Play .mp4 files or .wmv files as videos inside ShiftOS! Perfect for a shifted movie night.", 1524, 1000, "file_skimmer", "Entertainment")]
|
||||
[DefaultTitle("Video Player")]
|
||||
[Launcher("Video Player", false, null, "Entertainment")]
|
||||
[WinOpen("video_player")]
|
||||
|
|
|
@ -12,7 +12,7 @@ using ShiftOS.Engine;
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[WinOpen("web_browser")]
|
||||
[AppscapeEntry("Web Browser", "We're going surfing on the Internet! This application allows you to break the bounds of the Digital Society and connect to the outer Internet inside ShiftOS.",
|
||||
[AppscapeEntry("web_browser", "Web Browser", "We're going surfing on the Internet! This application allows you to break the bounds of the Digital Society and connect to the outer Internet inside ShiftOS.",
|
||||
4096, 10000, "color_depth_24_bits", "Networking")]
|
||||
[Launcher("Web Browser", false, null, "Networking")]
|
||||
[DefaultTitle("Web Browser")]
|
||||
|
|
|
@ -49,7 +49,10 @@ namespace ShiftOS.Engine
|
|||
[Command("clear", description = "{DESC_CLEAR}")]
|
||||
public static bool Clear()
|
||||
{
|
||||
AppearanceManager.ConsoleOut.Clear();
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
AppearanceManager.ConsoleOut.Clear();
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +160,7 @@ namespace ShiftOS.Engine
|
|||
//print all unique namespaces.
|
||||
foreach (var n in TerminalBackend.Commands.Where(x => !(x is TerminalBackend.WinOpenCommand) && Shiftorium.UpgradeInstalled(x.Dependencies) && x.CommandInfo.hide == false).OrderBy(x => x.CommandInfo.name))
|
||||
{
|
||||
sb.Append(n.CommandInfo.name);
|
||||
sb.Append(" - " + n.CommandInfo.name);
|
||||
if (!string.IsNullOrWhiteSpace(n.CommandInfo.description))
|
||||
if (Shiftorium.UpgradeInstalled("help_description"))
|
||||
sb.Append(" - " + n.CommandInfo.description);
|
||||
|
|
116
ShiftOS.WinForms/MissionCommands.cs
Normal file
116
ShiftOS.WinForms/MissionCommands.cs
Normal file
|
@ -0,0 +1,116 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms
|
||||
{
|
||||
[RequiresUpgrade("hacker101_breakingbonds_3")]
|
||||
public static class MissionCommands
|
||||
{
|
||||
public static List<MissionAttribute> GetMissionsList()
|
||||
{
|
||||
var missions = new List<MissionAttribute>();
|
||||
foreach (var type in ReflectMan.Types)
|
||||
{
|
||||
foreach (var method in type.GetMethods(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
||||
{
|
||||
var attrib = method.GetCustomAttributes(false).FirstOrDefault(x => x is MissionAttribute) as MissionAttribute;
|
||||
if (attrib != null)
|
||||
{
|
||||
if (Shiftorium.UpgradeAttributesUnlocked(method))
|
||||
{
|
||||
if (!Shiftorium.UpgradeInstalled(attrib.StoryID))
|
||||
{
|
||||
missions.Add(attrib);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return missions;
|
||||
}
|
||||
|
||||
[Command("missions", description = "Lists all available missions.")]
|
||||
public static void ShowAll()
|
||||
{
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
|
||||
ConsoleEx.Bold = true;
|
||||
Console.WriteLine(" - Missions - ");
|
||||
|
||||
var missions = GetMissionsList();
|
||||
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.White;
|
||||
ConsoleEx.Bold = false;
|
||||
if(missions.Count == 0)
|
||||
{
|
||||
Console.WriteLine("No missions available. Check back later!");
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach(var mission in missions)
|
||||
{
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(mission.Name);
|
||||
Console.WriteLine("--------------------------");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(mission.Description);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("assigner: " + mission.Assigner);
|
||||
Console.WriteLine("reward: " + mission.CodepointAward + " Codepoints");
|
||||
Console.WriteLine("To start this mission, run:");
|
||||
ConsoleEx.Bold = true;
|
||||
Console.WriteLine("startmission --id " + missions.IndexOf(mission));
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine("Story progress:");
|
||||
ConsoleEx.Bold = true;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Cyan;
|
||||
double percentage = GetMissionPercentage() * 100;
|
||||
Console.WriteLine(percentage.ToString("#.##") + "%");
|
||||
}
|
||||
|
||||
public static double GetMissionPercentage()
|
||||
{
|
||||
int missionsFound = 0;
|
||||
int missionsComplete = 0;
|
||||
foreach(var type in ReflectMan.Types)
|
||||
{
|
||||
foreach (var mth in type.GetMethods(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static))
|
||||
{
|
||||
var missionAttrib = mth.GetCustomAttributes(false).FirstOrDefault(x => x is MissionAttribute) as MissionAttribute;
|
||||
if (missionAttrib != null)
|
||||
{
|
||||
missionsFound++;
|
||||
if (Shiftorium.UpgradeInstalled(missionAttrib.StoryID))
|
||||
missionsComplete++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
double percentage = (double)missionsComplete / (double)missionsFound;
|
||||
return percentage;
|
||||
}
|
||||
|
||||
[Command("startmission", description = "Starts the specified mission.")]
|
||||
[RequiresArgument("id")]
|
||||
public static void StartMission(Dictionary<string, object> args)
|
||||
{
|
||||
var id = Convert.ToInt32(args["id"].ToString());
|
||||
var missions = GetMissionsList();
|
||||
if (id < 0 || id >= missions.Count)
|
||||
Console.WriteLine("Error: Mission ID not found.");
|
||||
else
|
||||
{
|
||||
var mission = missions[id];
|
||||
Story.Start(mission.StoryID);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -71,7 +71,7 @@ namespace ShiftOS.WinForms
|
|||
Action completed = null;
|
||||
completed = () =>
|
||||
{
|
||||
SaveSystem.Ready = true;
|
||||
SaveSystem.Ready.Set();
|
||||
Engine.AudioManager.PlayCompleted -= completed;
|
||||
AudioManager.StartAmbientLoop();
|
||||
};
|
||||
|
@ -122,7 +122,7 @@ namespace ShiftOS.WinForms
|
|||
{
|
||||
var upgrade = new ShiftoriumUpgrade
|
||||
{
|
||||
Id = attrib.Name.ToLower().Replace(" ", "_"),
|
||||
Id = attrib.Upgrade,
|
||||
Name = attrib.Name,
|
||||
Description = attrib.Description,
|
||||
Cost = attrib.Cost,
|
||||
|
|
111
ShiftOS.WinForms/Properties/Resources.Designer.cs
generated
111
ShiftOS.WinForms/Properties/Resources.Designer.cs
generated
|
@ -159,6 +159,35 @@ namespace ShiftOS.WinForms.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "Name": "appscape_main",
|
||||
/// "Files": [],
|
||||
/// "Subdirectories": [
|
||||
/// {
|
||||
/// "Name": "bans",
|
||||
/// "Files": [
|
||||
/// {
|
||||
/// "Name": "hacker101.txt",
|
||||
/// "Data": "RGF0ZTogMTAvMy8yMDE4DQpVc2VyOiBoYWNrZXIxMDENCg0KQmFuIHR5cGU6IEF1dG9tYXRlZA0KDQpEZXNjcmlwdGlvbjoNCg0KVGhpcyB1c2VyIGhhcyBiZWVuIGJhbm5lZCBieSB0aGUgYXV0b21hdGVkIGFudGktaGFja2luZyBzeXN0ZW0gZm9yIGNyZWF0aW9uIG9mIG1hbGljaW91cyBzb2Z0d2FyZSBhbmQgZXhwbG9pdGF0aW9uIHV0aWxpdGllcy4=",
|
||||
/// "HeaderData": null,
|
||||
/// "ReadAccessToLo [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string AppscapeServerFS {
|
||||
get {
|
||||
return ResourceManager.GetString("AppscapeServerFS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to RGF0ZTogMDQvMS8yMDE4DQpVc2VyOiBtYXVyZWVuX2Zlbm4NCg0KQmFuIHR5cGU6IENlYXNlIGFuZCBkZXNpc3QgKERldlgpDQoNCkRlc2NyaXB0aW9uOg0KDQpEZXZYIGhhcyBzZW50IGEgY2Vhc2UgYW5kIGRlc2lzdCByZXF1ZXN0IHRvIEFwcHNjYXBlIGZvciBob3N0aW5nIHRoaXMgdXNlcidzIGFwcGxpY2F0aW9ucyBhbmQgc2VuZGluZyBwcm9maXRzIG92ZXIuIFRoaXMgdXNlcidzIHNvZnR3YXJlIHdpbGwgbm90IGJlIHB1bGxlZCwgYnV0IGFsbCBDb2RlcG9pbnRzIGVhcm5lZCBmcm9tIGl0IHdpbGwgbm90IGJlIHJlZGlyZWN0ZWQgYW5kIHRoZSB1c2VyIHdpbGwgbm90IGJlIGFibGUgdG8gYWNjZXNzIHRoZWlyIGRldmVsb3BtZW50IHBhbmVsLg==.
|
||||
/// </summary>
|
||||
internal static string AppscapeWantedFile {
|
||||
get {
|
||||
return ResourceManager.GetString("AppscapeWantedFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -359,6 +388,26 @@ namespace ShiftOS.WinForms.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap BlueBlueVerticalGradient {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("BlueBlueVerticalGradient", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] brute {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("brute", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -1088,6 +1137,38 @@ namespace ShiftOS.WinForms.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "Name": "pebcak_devel",
|
||||
/// "Files": [],
|
||||
/// "Subdirectories": [
|
||||
/// {
|
||||
/// "Name": "home",
|
||||
/// "Files": [],
|
||||
/// "Subdirectories": [
|
||||
/// {
|
||||
/// "Name": "desktop",
|
||||
/// "Files": [],
|
||||
/// "Subdirectories": [],
|
||||
/// "ReadAccessToLowUsers": false,
|
||||
/// "permissions": 0
|
||||
/// },
|
||||
/// {
|
||||
/// "Name": "documents",
|
||||
/// "Files": [],
|
||||
/// "Subdirectories": [],
|
||||
/// "ReadAccessToLowUsers": false,
|
||||
/// "permissions": 0
|
||||
/// },
|
||||
/// {
|
||||
/// "Name" [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string PebcakDevelFS {
|
||||
get {
|
||||
return ResourceManager.GetString("PebcakDevelFS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -1114,7 +1195,7 @@ namespace ShiftOS.WinForms.Properties {
|
|||
/// Name: "NetXtreme Hyper Edition",
|
||||
/// CostPerMonth: 150,
|
||||
/// DownloadSpeed: 524288, //512 kb/s
|
||||
/// Description: "It's time to supercharge your Shift [rest of string was truncated]";.
|
||||
/// Description: "It's time to supercharge your Shiftnet experience. [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string ShiftnetServices {
|
||||
get {
|
||||
|
@ -1136,7 +1217,8 @@ namespace ShiftOS.WinForms.Properties {
|
|||
/// Name: "Icon Manager",
|
||||
/// Cost: 450,
|
||||
/// Description: "This tool allows you to add and edit application icons within ShiftOS for the small prive of 450 Codepoints!",
|
||||
/// Dependencies: "skinning [rest of string was truncated]";.
|
||||
/// Dependencies: "skinning",
|
||||
/// Category [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string Shiftorium {
|
||||
get {
|
||||
|
@ -1146,7 +1228,7 @@ namespace ShiftOS.WinForms.Properties {
|
|||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fl [rest of string was truncated]";.
|
||||
///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\flo [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string ShiftOS {
|
||||
get {
|
||||
|
@ -1295,7 +1377,8 @@ namespace ShiftOS.WinForms.Properties {
|
|||
///Eine kurze Erklärung wie du das Terminal benutzt lautet wiefolgt. Du kannst das command 'sos.help' benutzen um eine Liste aller commands aufzurufen. Schreib es
|
||||
///einfach in das Terminal und drücke <enter> um alle commands anzuzeigen.
|
||||
///
|
||||
///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Be [rest of string was truncated]";.
|
||||
///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Beispiel:
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string strings_de {
|
||||
get {
|
||||
|
@ -1320,7 +1403,7 @@ namespace ShiftOS.WinForms.Properties {
|
|||
/// "{GEN_WELCOME}": "Welcome to ShiftOS.",
|
||||
/// "{GEN_SYSTEMNAME}": "System name",
|
||||
/// "{GEN_PASSWORD}": "Password",
|
||||
/// "{GEN_LPROMPT [rest of string was truncated]";.
|
||||
/// "{GEN_LPROMPT}": "%sysname lo [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string strings_en {
|
||||
get {
|
||||
|
@ -1330,14 +1413,22 @@ namespace ShiftOS.WinForms.Properties {
|
|||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to /*
|
||||
/// * French translation
|
||||
/// *
|
||||
/// * Made by Michael VanOverbeek with his grade 9 french skills because why not.
|
||||
/// * ShiftOS French Language Pack
|
||||
/// *
|
||||
/// * This is a default language pack distributed within the game.
|
||||
/// */
|
||||
///
|
||||
///{
|
||||
///}.
|
||||
/// //General strings
|
||||
/// //These strings can be used anywhere in the UI where language context isn't necessary.
|
||||
/// "{GEN_PROGRAMS}": "Les programmes",
|
||||
/// "{GEN_COMMANDS}": "Les ordres",
|
||||
/// "{GEN_OBJECTIVES}": "Les objectifs",
|
||||
/// "{GEN_CURRENTPROCESSES}": "Les procèdures actuelles",
|
||||
/// "{GEN_WELCOME}": "Bienvenue au ShiftOS.",
|
||||
/// "{GEN_SYSTEMNAME}": "Nom de système",
|
||||
/// "{GEN_PASSWORD}": "Mot de passe",
|
||||
/// "{GEN [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string strings_fr {
|
||||
get {
|
||||
|
@ -1525,7 +1616,7 @@ namespace ShiftOS.WinForms.Properties {
|
|||
/// "Before you can begin with ShiftOS, you'll need to know a few things about it.",
|
||||
/// "One: Terminal command syntax.",
|
||||
/// "Inside ShiftOS, the bulk of your time is going to be spent within the Terminal.",
|
||||
/// "The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, ope [rest of string was truncated]";.
|
||||
/// "The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, open program [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string sys_shiftoriumstory {
|
||||
get {
|
||||
|
|
|
@ -34618,4 +34618,20 @@
|
|||
<data name="strings_fr" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\strings_fr.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="AppscapeServerFS" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AppscapeServerFS.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="AppscapeWantedFile" xml:space="preserve">
|
||||
<value>RGF0ZTogMDQvMS8yMDE4DQpVc2VyOiBtYXVyZWVuX2Zlbm4NCg0KQmFuIHR5cGU6IENlYXNlIGFuZCBkZXNpc3QgKERldlgpDQoNCkRlc2NyaXB0aW9uOg0KDQpEZXZYIGhhcyBzZW50IGEgY2Vhc2UgYW5kIGRlc2lzdCByZXF1ZXN0IHRvIEFwcHNjYXBlIGZvciBob3N0aW5nIHRoaXMgdXNlcidzIGFwcGxpY2F0aW9ucyBhbmQgc2VuZGluZyBwcm9maXRzIG92ZXIuIFRoaXMgdXNlcidzIHNvZnR3YXJlIHdpbGwgbm90IGJlIHB1bGxlZCwgYnV0IGFsbCBDb2RlcG9pbnRzIGVhcm5lZCBmcm9tIGl0IHdpbGwgbm90IGJlIHJlZGlyZWN0ZWQgYW5kIHRoZSB1c2VyIHdpbGwgbm90IGJlIGFibGUgdG8gYWNjZXNzIHRoZWlyIGRldmVsb3BtZW50IHBhbmVsLg==</value>
|
||||
<comment>The file that Maureen Fenn wants to see in the Appscape Troubles storyline.</comment>
|
||||
</data>
|
||||
<data name="brute" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\brute.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="PebcakDevelFS" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PebcakDevelFS.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="BlueBlueVerticalGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\BlueBlueVerticalGradient.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
52
ShiftOS.WinForms/Resources/AppscapeServerFS.txt
Normal file
52
ShiftOS.WinForms/Resources/AppscapeServerFS.txt
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"Name": "appscape_main",
|
||||
"Files": [],
|
||||
"Subdirectories": [
|
||||
{
|
||||
"Name": "bans",
|
||||
"Files": [
|
||||
{
|
||||
"Name": "hacker101.txt",
|
||||
"Data": "RGF0ZTogMTAvMy8yMDE4DQpVc2VyOiBoYWNrZXIxMDENCg0KQmFuIHR5cGU6IEF1dG9tYXRlZA0KDQpEZXNjcmlwdGlvbjoNCg0KVGhpcyB1c2VyIGhhcyBiZWVuIGJhbm5lZCBieSB0aGUgYXV0b21hdGVkIGFudGktaGFja2luZyBzeXN0ZW0gZm9yIGNyZWF0aW9uIG9mIG1hbGljaW91cyBzb2Z0d2FyZSBhbmQgZXhwbG9pdGF0aW9uIHV0aWxpdGllcy4=",
|
||||
"HeaderData": null,
|
||||
"ReadAccessToLowUsers": false,
|
||||
"permissions": 0
|
||||
},
|
||||
{
|
||||
"Name": "maureen_fenn.txt",
|
||||
"Data": "RGF0ZTogMDQvMS8yMDE4DQpVc2VyOiBtYXVyZWVuX2Zlbm4NCg0KQmFuIHR5cGU6IENlYXNlIGFuZCBkZXNpc3QgKERldlgpDQoNCkRlc2NyaXB0aW9uOg0KDQpEZXZYIGhhcyBzZW50IGEgY2Vhc2UgYW5kIGRlc2lzdCByZXF1ZXN0IHRvIEFwcHNjYXBlIGZvciBob3N0aW5nIHRoaXMgdXNlcidzIGFwcGxpY2F0aW9ucyBhbmQgc2VuZGluZyBwcm9maXRzIG92ZXIuIFRoaXMgdXNlcidzIHNvZnR3YXJlIHdpbGwgbm90IGJlIHB1bGxlZCwgYnV0IGFsbCBDb2RlcG9pbnRzIGVhcm5lZCBmcm9tIGl0IHdpbGwgbm90IGJlIHJlZGlyZWN0ZWQgYW5kIHRoZSB1c2VyIHdpbGwgbm90IGJlIGFibGUgdG8gYWNjZXNzIHRoZWlyIGRldmVsb3BtZW50IHBhbmVsLg==",
|
||||
"HeaderData": null,
|
||||
"ReadAccessToLowUsers": false,
|
||||
"permissions": 0
|
||||
}
|
||||
],
|
||||
"Subdirectories": [],
|
||||
"ReadAccessToLowUsers": false,
|
||||
"permissions": 3
|
||||
},
|
||||
{
|
||||
"Name": "feedback",
|
||||
"Files": [
|
||||
{
|
||||
"Name": "better_feedback_system.txt",
|
||||
"Data": "VXNlcjogYW5vbnltb3VzDQpEYXRlOiAyNS8xMi8yMDE3DQpUaXRsZTogQmV0dGVyIGZlZWRiYWNrIHN5c3RlbS4NCg0KRGVzY3JpcHRpb246DQoNCldoeSBtdXN0IHdlIEZUUCBpbnRvIHlvdXIgc3lzdGVtIHRvIGxlYXZlIGZlZWRiYWNrIGZvciBBcHBzY2FwZT8gSSBrbm93IHRoYXQgeW91J3ZlIGdvdCB0aGlzIGFjY291bnQgdGlnaHRseSBsb2NrZWQgYW5kIGl0IGNhbiBvbmx5IGFjY2VzcyB0aGlzIHBhcnQgb2YgeW91ciBjb21wdXRlciwgYnV0IGl0J3MgdGhlIERpZ2l0YWwgU29jaWV0eS4gU29tZW9uZSdzIGdvbm5hIGJyZWFrIHRoaXMuIENhbid0IHdlIGF0IGxlYXN0IGhhdmUgYSBtb3JlIHNlY3VyZSBTTVRQLWJhc2VkIGZlZWRiYWNrIHN5c3RlbT8gT3IgZXZlbiBhIGZvcm0gb24gQXBwc2NhcGUncyB3ZWJzaXRlPw0KDQpSZXBseToNCg0KQ29tZSBvbiBtYW4hIEl0J3MgQ2hyaXN0bWFzLCB5b3UncmUgZ29ubmEgbWFrZSBtZSBjb2RlPyBJJ20gdHJ5aW5nIHRvIHNwZW5kIHRpbWUgd2l0aCB0aGUgZmFtaWx5IGhlcmUuLi4gd2FpdCBhIG1pbnV0ZS4uLiB1aGhoLi4uIG5ldmVybWluZC4gSSdtIGFjdHVhbGx5IHdvcmtpbmcgb24gdGhhdCBhcyB3ZSBzcGVhay4=",
|
||||
"HeaderData": null,
|
||||
"ReadAccessToLowUsers": false,
|
||||
"permissions": 0
|
||||
},
|
||||
{
|
||||
"Name": "screenshots.txt",
|
||||
"Data": "VXNlcjogYW5vbnltb3VzDQpEYXRlOiAwNC8xMi8yMDE3DQpUaXRsZTogQnJpbmcgYmFjayBzY3JlZW5zaG90cy4NCg0KRGVzY3JpcHRpb246DQoNCkJhY2sgaW4gdGhlIG9sZGVuIGRheXMsIGJlZm9yZSB0aGUgRGlnaXRhbCBTb2NpZXR5LCBBcHBzY2FwZSBoYWQgZGVjZW50IHNjcmVlbnNob3RzIGZvciBpdHMgYXBwcy4gV2h5IGNhbid0IHdlIGhhdmUgdGhlbSBpbiBtb2Rlcm4gQXBwc2NhcGU/DQoNClJlcGx5Og0KDQpUaGUgU2hpZnRuZXQgaXMgaW4gaXRzIGVuZmFuY3kgYXQgdGhpcyB0aW1lLi4uIGV2ZXIgc2luY2UgRGV2WCBtYWRlIGl0IGFuIG9mZmljaWFsIHBhcnQgb2YgU2hpZnRPUyBhbmQgcmV3cm90ZSB0aGUgcGFnZSB0ZW1wbGF0aW5nIHN5c3RlbSwgSSBoYXZlbid0IGxlYXJuZWQgeWV0IGhvdyB0byBkZWFsIHdpdGggcGljdHVyZXMuIEknbGwgbG9vayBpbnRvIGl0IHRob3VnaC4gSSBzdXJlIGRvIG1pc3MgdGhlIG9sZGVyIFNoaWZ0bmV0Li4u",
|
||||
"HeaderData": null,
|
||||
"ReadAccessToLowUsers": false,
|
||||
"permissions": 0
|
||||
}
|
||||
],
|
||||
"Subdirectories": [],
|
||||
"ReadAccessToLowUsers": false,
|
||||
"permissions": 0
|
||||
}
|
||||
],
|
||||
"ReadAccessToLowUsers": false,
|
||||
"permissions": 3
|
||||
}
|
BIN
ShiftOS.WinForms/Resources/BlueBlueVerticalGradient.png
Normal file
BIN
ShiftOS.WinForms/Resources/BlueBlueVerticalGradient.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 154 B |
146
ShiftOS.WinForms/Resources/PebcakDevelFS.txt
Normal file
146
ShiftOS.WinForms/Resources/PebcakDevelFS.txt
Normal file
File diff suppressed because one or more lines are too long
|
@ -14,6 +14,13 @@
|
|||
Dependencies: "skinning",
|
||||
Category: "Application"
|
||||
},
|
||||
{
|
||||
Name: "Shift States",
|
||||
Cost: 325,
|
||||
Description: "It's time to make ShiftOS more responsive. This upgrade adds various state-specific settings for window borders, title buttons, and more!",
|
||||
Category: "Customizatuib & Scripting",
|
||||
Dependencies: "shift_titlebar;shift_title_buttons;shift_panel_buttons;shift_window_borders",
|
||||
},
|
||||
{
|
||||
Name: "AL Icon Manager",
|
||||
Costs: 150,
|
||||
|
|
BIN
ShiftOS.WinForms/Resources/brute.mp3
Normal file
BIN
ShiftOS.WinForms/Resources/brute.mp3
Normal file
Binary file not shown.
|
@ -249,7 +249,7 @@
|
|||
|
||||
//Program commands
|
||||
"{WO_ABOUT}": "about",
|
||||
"{WO_ADDRESSBOOK}": "adress_book",
|
||||
"{WO_ADDRESSBOOK}": "address_book",
|
||||
"{WO_ARTPAD}": "artpad",
|
||||
"{WO_AUDIOPLAYER}": "audio_player",
|
||||
"{WO_CALCULATOR}": "calculator",
|
||||
|
|
|
@ -43,35 +43,35 @@
|
|||
"{ERR_NOTENOUGHCODEPOINTS}": "Tu n'as pas assez de Codepoints à faire cela.",
|
||||
"{ERR_NOUPGRADE}": "Nous ne pouvons pas trouver cela mise à jour.",
|
||||
"{ERR_GENERAL}": "Une erreur a appairé en faisons l'opération.",
|
||||
"{ERR_EMPTYCATEGORY}": "The category you specified either has no items in it, or was not found.",
|
||||
"{ERR_NOMOREUPGRADES}": "There are no more Shiftorium Upgrades to show!",
|
||||
"{ERR_BADWINID}": "You must specify a value between 0 and %max.",
|
||||
"{ERR_USERFOUND}": "That user already exists.",
|
||||
"{ERR_NOUSER}": "That user was not found.",
|
||||
"{ERR_REMOVEYOU}": "You can't remove your own user account.",
|
||||
"{ERR_BADACL}": "You must specify a value between 0 (guest) and 3 (root) for a user permission.",
|
||||
"{ERR_ACLHIGHERVALUE}": "You can't set a user's permissions to a value higher than your own.",
|
||||
"{ERR_HIGHERPERMS}": "That user has more rights than you!",
|
||||
"{ERR_PASSWD_MISMATCH}": "Passwords don't match!",
|
||||
"{ERR_SYNTAXERROR}": "Syntax error.",
|
||||
"{ERR_EMPTYCATEGORY}": "La catégorie tu as précisé solt n'a pas d'objets en la catégorie, solt n'a trouvé pas.",
|
||||
"{ERR_NOMOREUPGRADES}": "Nous ne sommes pas de mises de jours!",
|
||||
"{ERR_BADWINID}": "Préciser une valeur en 0 et %max, s'il vous plait.",
|
||||
"{ERR_USERFOUND}": "Ça personne déjà existe.",
|
||||
"{ERR_NOUSER}": "Ça personne n'a trouvé.",
|
||||
"{ERR_REMOVEYOU}": "Tu ne peux pas enlever ton compte de système.",
|
||||
"{ERR_BADACL}": "Préciser une valeur en 0 (invité) et 3 (dieu) pour une permission de personne.",
|
||||
"{ERR_ACLHIGHERVALUE}": "Tu ne peux pas mettre une permission de personne au une valeur meilleure que ta permission.",
|
||||
"{ERR_HIGHERPERMS}": "Ça personne a meilleure permissions que toi!",
|
||||
"{ERR_PASSWD_MISMATCH}": "Les mots de passe n'asscocier pas!",
|
||||
"{ERR_SYNTAXERROR}": "Erreur de syntaxe.",
|
||||
|
||||
//Command results
|
||||
"{RES_ACLUPDATED}": "User permissions updated.",
|
||||
"{RES_LANGUAGE_CHANGED}": "System language changed successfully.",
|
||||
"{RES_NOOBJECTIVES}": "No objectives to display! Check back for more.",
|
||||
"{RES_UPGRADEINSTALLED}": "Upgrade installed!",
|
||||
"{RES_WINDOWCLOSED}": "The window was closed.",
|
||||
"{RES_CREATINGUSER}": "Creating new user with username %name.",
|
||||
"{RES_REMOVINGUSER}": "Removing user with username %name from your system.",
|
||||
"{RES_DENIED}": "Access denied.",
|
||||
"{RES_GRANTED}": "Access granted.",
|
||||
"{RES_PASSWD_SET}": "Password set successfully.",
|
||||
"{RES_ACLUPDATED}": "Permissions de personne ont appliqué.",
|
||||
"{RES_LANGUAGE_CHANGED}": "La langue de système a changé.",
|
||||
"{RES_NOOBJECTIVES}": "Nous ne sommes pas des objectifs afficher!",
|
||||
"{RES_UPGRADEINSTALLED}": "Mise de jour a appliqué!",
|
||||
"{RES_WINDOWCLOSED}": "La programme a se fermé.",
|
||||
"{RES_CREATINGUSER}": "Nous créons une nouvelle compte avec le nom %name.",
|
||||
"{RES_REMOVINGUSER}": "Nous sortissons la compte avec le nom %name depuis ton système.",
|
||||
"{RES_DENIED}": "L'accès a démenti.",
|
||||
"{RES_GRANTED}": "L'accès a accordé.",
|
||||
"{RES_PASSWD_SET}": "Le mot de passe a appliqué.",
|
||||
|
||||
//Shiftorium messages.
|
||||
"{SHFM_UPGRADE}": "%id - %cost Codepoints",
|
||||
"{SHFM_CATEGORY}": " - %name: %available upgrades left.",
|
||||
"{SHFM_QUERYERROR}": "Shiftorium Query Error",
|
||||
"{SHFM_NOUPGRADES}": "No upgrades!",
|
||||
"{SHFM_CATEGORY}": " - %name: %available mises de jours restants.",
|
||||
"{SHFM_QUERYERROR}": "Erreur en mettre en doubte de Shiftorium.",
|
||||
"{SHFM_NOUPGRADES}": "Zèro mises de jours restants!",
|
||||
|
||||
//Command data strings
|
||||
"{COM_STATUS}": "ShiftOS build %version\r\n\r\nCodepoints: %cp \r\n Upgrades: %installed installed, %available available\r\n\r\n",
|
||||
|
|
|
@ -71,6 +71,18 @@
|
|||
<Compile Include="Applications\About.Designer.cs">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\ButtonMaster.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Applications\ButtonMaster.Designer.cs">
|
||||
<DependentUpon>ButtonMaster.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\Clock.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Applications\Clock.Designer.cs">
|
||||
<DependentUpon>Clock.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\IconManager.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -351,6 +363,7 @@
|
|||
<Compile Include="MainMenu\MainMenu.Designer.cs">
|
||||
<DependentUpon>MainMenu.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MissionCommands.cs" />
|
||||
<Compile Include="Oobe.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -395,6 +408,12 @@
|
|||
<Compile Include="ShiftnetSites\ShiftGames.Designer.cs">
|
||||
<DependentUpon>ShiftGames.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftOSOnline.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftOSOnline.Designer.cs">
|
||||
<DependentUpon>ShiftOSOnline.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ShiftnetSites\ShiftSoft.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -442,6 +461,7 @@
|
|||
<Compile Include="UniteSignupDialog.Designer.cs">
|
||||
<DependentUpon>UniteSignupDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="VirtualEnvironments.cs" />
|
||||
<Compile Include="VisualBasicStuff.cs" />
|
||||
<Compile Include="WFLanguageProvider.cs" />
|
||||
<Compile Include="WidgetManager.cs" />
|
||||
|
@ -469,6 +489,12 @@
|
|||
<EmbeddedResource Include="Applications\About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\ButtonMaster.resx">
|
||||
<DependentUpon>ButtonMaster.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\Clock.resx">
|
||||
<DependentUpon>Clock.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\IconManager.resx">
|
||||
<DependentUpon>IconManager.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -621,6 +647,9 @@
|
|||
<EmbeddedResource Include="ShiftnetSites\ShiftGames.resx">
|
||||
<DependentUpon>ShiftGames.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ShiftnetSites\ShiftOSOnline.resx">
|
||||
<DependentUpon>ShiftOSOnline.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ShiftnetSites\ShiftSoft.resx">
|
||||
<DependentUpon>ShiftSoft.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -854,6 +883,9 @@
|
|||
<None Include="Resources\Ambient8.mp3" />
|
||||
<None Include="Resources\Ambient9.mp3" />
|
||||
<None Include="Resources\austmicrotrends.png" />
|
||||
<None Include="Resources\brute.mp3" />
|
||||
<None Include="Resources\AppscapeServerFS.txt" />
|
||||
<None Include="Resources\BlueBlueVerticalGradient.png" />
|
||||
<Content Include="Resources\fileiconcf.bmp" />
|
||||
<None Include="Resources\infobox.wav" />
|
||||
<None Include="Resources\typesound.wav" />
|
||||
|
@ -865,6 +897,7 @@
|
|||
<Content Include="Resources\GuessTheNumber.py" />
|
||||
<None Include="Resources\mindblow.png" />
|
||||
<None Include="Resources\strings_fr.txt" />
|
||||
<None Include="Resources\PebcakDevelFS.txt" />
|
||||
<Content Include="SystemIcons\iconArtpad.png" />
|
||||
<Content Include="SystemIcons\iconAudioPlayer.png" />
|
||||
<Content Include="SystemIcons\iconBitnoteDigger.png" />
|
||||
|
@ -932,6 +965,7 @@
|
|||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ProjectExtensions />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
|
|
@ -48,8 +48,8 @@ namespace ShiftOS.WinForms.ShiftnetSites
|
|||
if (upgrades.Count() > 0)
|
||||
foreach (var upg in upgrades)
|
||||
{
|
||||
if (!cats.Contains(upg.Category))
|
||||
cats.Add(upg.Category);
|
||||
if (!cats.Contains(Localization.Parse(upg.Category)))
|
||||
cats.Add(Localization.Parse(upg.Category));
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
@ -63,9 +63,9 @@ namespace ShiftOS.WinForms.ShiftnetSites
|
|||
pnlappslist.Controls.Clear();
|
||||
pnlappslist.Show();
|
||||
pnlappslist.BringToFront();
|
||||
Category = cat;
|
||||
Category = Localization.Parse(cat);
|
||||
var upgrades = GetAllInCategory();
|
||||
lbtitle.Text = cat;
|
||||
lbtitle.Text = Localization.Parse(cat);
|
||||
if(upgrades.Length == 0)
|
||||
{
|
||||
var err = new Label();
|
||||
|
@ -282,7 +282,7 @@ namespace ShiftOS.WinForms.ShiftnetSites
|
|||
if (Category == "All")
|
||||
return upgrades.ToArray();
|
||||
else
|
||||
return upgrades.Where(x => x.Category == Category).ToArray();
|
||||
return upgrades.Where(x => Localization.Parse(x.Category) == Localization.Parse(Category)).ToArray();
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
|
@ -360,7 +360,7 @@ namespace ShiftOS.WinForms
|
|||
/// </summary>
|
||||
public class AppscapeEntryAttribute : RequiresUpgradeAttribute
|
||||
{
|
||||
public AppscapeEntryAttribute(string name, string description, int downloadSize, ulong cost, string dependencies = "", string category = "Misc") : base(name.ToLower().Replace(' ', '_'))
|
||||
public AppscapeEntryAttribute(string id, string name, string description, int downloadSize, ulong cost, string dependencies = "", string category = "Misc") : base(id)
|
||||
{
|
||||
Name = name;
|
||||
Description = description;
|
||||
|
|
89
ShiftOS.WinForms/ShiftnetSites/ShiftOSOnline.Designer.cs
generated
Normal file
89
ShiftOS.WinForms/ShiftnetSites/ShiftOSOnline.Designer.cs
generated
Normal file
|
@ -0,0 +1,89 @@
|
|||
namespace ShiftOS.WinForms.ShiftnetSites
|
||||
{
|
||||
partial class ShiftOSOnline
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShiftOSOnline));
|
||||
this.lbtitle = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnsubscribe = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lbtitle
|
||||
//
|
||||
this.lbtitle.AutoSize = true;
|
||||
this.lbtitle.Location = new System.Drawing.Point(242, 294);
|
||||
this.lbtitle.Name = "lbtitle";
|
||||
this.lbtitle.Size = new System.Drawing.Size(76, 13);
|
||||
this.lbtitle.TabIndex = 0;
|
||||
this.lbtitle.Tag = "header1";
|
||||
this.lbtitle.Text = "ShiftOS Online";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(42, 64);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(327, 137);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = resources.GetString("label1.Text");
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnsubscribe
|
||||
//
|
||||
this.btnsubscribe.AutoSize = true;
|
||||
this.btnsubscribe.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.btnsubscribe.Location = new System.Drawing.Point(45, 401);
|
||||
this.btnsubscribe.Name = "btnsubscribe";
|
||||
this.btnsubscribe.Size = new System.Drawing.Size(96, 23);
|
||||
this.btnsubscribe.TabIndex = 2;
|
||||
this.btnsubscribe.Tag = "header3";
|
||||
this.btnsubscribe.Text = "Subscribe today!";
|
||||
this.btnsubscribe.UseVisualStyleBackColor = true;
|
||||
this.btnsubscribe.Click += new System.EventHandler(this.btnsubscribe_Click);
|
||||
//
|
||||
// ShiftOSOnline
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.btnsubscribe);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.lbtitle);
|
||||
this.Name = "ShiftOSOnline";
|
||||
this.Size = new System.Drawing.Size(562, 469);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lbtitle;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btnsubscribe;
|
||||
}
|
||||
}
|
105
ShiftOS.WinForms/ShiftnetSites/ShiftOSOnline.cs
Normal file
105
ShiftOS.WinForms/ShiftnetSites/ShiftOSOnline.cs
Normal file
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ShiftOS.Engine;
|
||||
using ShiftOS.WinForms.Tools;
|
||||
|
||||
namespace ShiftOS.WinForms.ShiftnetSites
|
||||
{
|
||||
[ShiftnetSite("shiftnet/sol/subscription", "ShiftOS Online", "SOL is the Shiftnet.")]
|
||||
[ShiftnetFundamental]
|
||||
public partial class ShiftOSOnline : UserControl, IShiftnetSite
|
||||
{
|
||||
public ShiftOSOnline()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public event Action GoBack;
|
||||
public event Action<string> GoToUrl;
|
||||
|
||||
public void OnSkinLoad()
|
||||
{
|
||||
Tools.ControlManager.SetupControls(this);
|
||||
lbtitle.CenterParent();
|
||||
lbtitle.Top = 15;
|
||||
label1.CenterParent();
|
||||
btnsubscribe.CenterParent();
|
||||
btnsubscribe.Top = (label1.Top + label1.Height) + 15;
|
||||
}
|
||||
|
||||
public void OnUpgrade()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string SOL_YOUARESUBSCRIBED
|
||||
{
|
||||
get
|
||||
{
|
||||
return Localization.Parse("You're already subscribed! Unsubscribe here.");
|
||||
}
|
||||
}
|
||||
|
||||
public string SOL_SUBSCRIBE
|
||||
{
|
||||
get
|
||||
{
|
||||
return Localization.Parse("Subscribe today!");
|
||||
}
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
if(SaveSystem.CurrentSave.ShiftnetSubscription == 3)
|
||||
{
|
||||
btnsubscribe.Text = SOL_YOUARESUBSCRIBED;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnsubscribe.Text = SOL_SUBSCRIBE;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnsubscribe_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(btnsubscribe.Text == SOL_YOUARESUBSCRIBED)
|
||||
{
|
||||
Infobox.PromptYesNo("Unsubscribe", "Are you sure you want to unsubscribe from ShiftOS Online?", (result) =>
|
||||
{
|
||||
if (result == true)
|
||||
{
|
||||
SaveSystem.CurrentSave.ShiftnetSubscription = 0;
|
||||
Setup();
|
||||
OnSkinLoad();
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Infobox.PromptYesNo("Subscribe?", "Would you like to subscribe to ShiftOS Online to get 768 kb/s for 300 Codepoints?", (result) =>
|
||||
{
|
||||
if(result == true)
|
||||
{
|
||||
if(SaveSystem.CurrentSave.Codepoints >= 300)
|
||||
{
|
||||
SaveSystem.CurrentSave.Codepoints -= 300;
|
||||
SaveSystem.CurrentSave.ShiftnetSubscription = 3;
|
||||
Infobox.Show("Subscribed.", "You have sent 300 Codepoints to ShiftOS Online and have successfully subscribed to their Shiftnet Service.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Infobox.Show("Insufficient Codepoints", "You do not have enough Codepoints to complete this operation.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
125
ShiftOS.WinForms/ShiftnetSites/ShiftOSOnline.resx
Normal file
125
ShiftOS.WinForms/ShiftnetSites/ShiftOSOnline.resx
Normal file
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>In need of a speedboost when browsing the Shiftnet? We'll be happy to provide.
|
||||
|
||||
With our staggering 768 kilobytes per second connection speed, and one of the cheapest subscription costs in the entire Digital Society, ShiftOS Online is the perfect choice for anyone wanting to get the best bang for their buck.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -4,7 +4,9 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using ShiftOS.Engine;
|
||||
using ShiftOS.Objects;
|
||||
|
||||
namespace ShiftOS.WinForms.Stories
|
||||
{
|
||||
|
@ -79,6 +81,374 @@ namespace ShiftOS.WinForms.Stories
|
|||
Story.Context.MarkComplete();
|
||||
Story.Start("aiden_shiftnet2");
|
||||
}
|
||||
|
||||
[RequiresUpgrade("appscape_troubles")]
|
||||
[Mission("appscape_troubles_end", "Appscape Troubles: Lifting The Ban", "Maureen's been banned from Appscape. Let's see if we can get Aiden to reverse that.", 1200l, "maureen_fenn")]
|
||||
public static void AppscapeTroublesEnd()
|
||||
{
|
||||
Applications.Chat chat = null;
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
chat = OpenChat();
|
||||
});
|
||||
while (chat == null)
|
||||
Thread.Sleep(10);
|
||||
chat.ShowChat();
|
||||
chat.ChatID = "maureen_fenn@trisys";
|
||||
CurrentChat = chat;
|
||||
SendChatMessage("maureen_fenn", "I just talked to hacker101 about our little issue here...");
|
||||
SendChatMessage("maureen_fenn", "He tried to get Aiden to lighten up, but he's too hell-bent on making DevX happy.");
|
||||
SendChatMessage("maureen_fenn", "But, I think we've gotten a plan.");
|
||||
SendChatMessage("hacker101", "<user joined chat>");
|
||||
chat.ChatID = "maureen_fenn@trisys, hacker101@pebcak";
|
||||
SendChatMessage("hacker101", "We meet again, " + SaveSystem.CurrentUser.Username + "...");
|
||||
SendChatMessage("hacker101", "Maureen tells me you've used your hacking skills to steal a document from Aiden Nirh.");
|
||||
SendChatMessage("hacker101", "I hope he didn't find out about brute...");
|
||||
SendChatMessage("maureen_fenn", "Ugh... brute? That thing? That's not hacking.");
|
||||
SendChatMessage("maureen_fenn", "You're just turning " + SaveSystem.CurrentUser.Username + " into a script-kiddie.");
|
||||
SendChatMessage("maureen_fenn", SaveSystem.CurrentUser.Username + ", you want REAL hacking? Why don't you come to me after we're done here. I'll show you how REAL sentiences get their way.");
|
||||
SendChatMessage("hacker101", "HEY. You gotta give Brute some credit. It's good at cracking passwords.");
|
||||
SendChatMessage("maureen_fenn", "Well, what happens if the user runs into a firewall block? Brute ain't going to help with that.");
|
||||
SendChatMessage("hacker101", "....whatever. Let's just get on with this.");
|
||||
SendChatMessage("hacker101", "We need to get rid of that cease and desist ban.");
|
||||
SendChatMessage("hacker101", "Firstly, let's review the document.");
|
||||
SendChatMessage("hacker101", "<sent a file: maureen_fenn.txt>");
|
||||
var bytes = Convert.FromBase64String(Properties.Resources.AppscapeWantedFile);
|
||||
chat.PostMessage("maureen_fenn.txt", chat.ChatID, Encoding.UTF8.GetString(bytes));
|
||||
SendChatMessage("hacker101", "I ain't no lawyer but I can tell you right now that C&D is bull.");
|
||||
SendChatMessage("hacker101", "Guess this is just DevX's way of saying he can't stand you, Maureen.");
|
||||
SendChatMessage("hacker101", "I want you to know that unlike him, I can. I... I...");
|
||||
SendChatMessage("maureen_fenn", "..Nope, nope. Let's not go there. You're getting a bit creepy, hacker.");
|
||||
SendChatMessage("hacker101", "Whoops. Oh well... We need to show DevX who's boss.");
|
||||
SendChatMessage("hacker101", "Maybe, " + SaveSystem.CurrentUser.Username + " can help us.");
|
||||
SendChatMessage("maureen_fenn", "Maybe they can... and meybe Aiden can as well.");
|
||||
SendChatMessage("hacker101", "No, he's convinced that we're the bad guys.");
|
||||
SendChatMessage("hacker101", "He's got me banned because of brute.");
|
||||
SendChatMessage("maureen_fenn", "Lol, banned... for BRUTE? That little harmless tool? Bahahahaha.");
|
||||
SendChatMessage(SaveSystem.CurrentUser.Username, "Will you two stop bickering at eachother about Brute and hacker101's love for Maureen and let us get on with this? I could be playing Pong right now.");
|
||||
SendChatMessage("maureen_fenn", "Right. We need to gather as much evidence against DevX as possible.");
|
||||
SendChatMessage("hacker101", "Then, we need to send it all to Aiden, right? We'll need " + SaveSystem.CurrentUser.Username + " to do that.");
|
||||
SendChatMessage("maureen_fenn", "Alrighty, " + SaveSystem.CurrentUser.Username + ". You're on our team. We'll have any tasks we need you to do in your missions list.");
|
||||
SendChatMessage("maureen_fenn", "Oh yeah, and here's a couple Codepoints as compensation for helping us out.");
|
||||
Story.Context.MarkComplete();
|
||||
Thread.Sleep(5000);
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
AppearanceManager.Close(chat);
|
||||
});
|
||||
}
|
||||
|
||||
[RequiresUpgrade("hacker101_breakingbonds_3")]
|
||||
[Mission("appscape_troubles", "Appscape Troubles", "You know how to do some basic hacking, now you've got a chance to exercise it.", 750l, "maureen_fenn")]
|
||||
public static void AppscapeTroubles()
|
||||
{
|
||||
Applications.Chat chat = null;
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
chat = OpenChat();
|
||||
});
|
||||
while (chat == null)
|
||||
Thread.Sleep(10);
|
||||
chat.ShowChat();
|
||||
chat.ChatID = "maureen_fenn@trisys";
|
||||
CurrentChat = chat;
|
||||
SendChatMessage("maureen_fenn", "Hello there, " + SaveSystem.CurrentUser.Username + ". My name is Maureen.");
|
||||
SendChatMessage("maureen_fenn", "I'm the developer of the various Tri apps you may've seen around the Shiftnet.");
|
||||
Story.Context.AutoComplete = false;
|
||||
SendChatMessage("maureen_fenn", "I have a bit of a problem that may need your assistance..");
|
||||
SendChatMessage("maureen_fenn", "I struck a deal with Aiden Nirh to put my software on his site and split the profits in half with me and him.");
|
||||
SendChatMessage("maureen_fenn", "But lately, even though many people have been buying my software, I've been getting nothing for it.");
|
||||
SendChatMessage("maureen_fenn", "Now I have barely enough Codepoints to keep my development environment online...");
|
||||
SendChatMessage("maureen_fenn", "My friend, you know him as hacker101, he's told me that you know how to hack.");
|
||||
SendChatMessage("maureen_fenn", "Can you bust into Aiden's server and see if he's gotten any documents or anything indicating why he's not paying me?");
|
||||
SendChatMessage("maureen_fenn", "He likes to document a lot of things about what he does and he likes to store those docs on his central Appscape server. Maybe there's something on there about me...");
|
||||
SendChatMessage("maureen_fenn", "You can find connection details for his server on Appscape's Contact page.");
|
||||
SendChatMessage("maureen_fenn", "The guy has pretty good security though... so be careful.");
|
||||
SendChatMessage("maureen_fenn", "When you find the right file, I'd download it to your system and just send it through SimpleSRC.");
|
||||
|
||||
|
||||
VirtualEnvironments.Create("appscape_main", new List<ClientSave>
|
||||
{
|
||||
new ClientSave
|
||||
{
|
||||
Username = "aiden",
|
||||
Password = GenRandomPassword(),
|
||||
Permissions = UserPermissions.Root,
|
||||
},
|
||||
new ClientSave
|
||||
{
|
||||
Username = "feedback",
|
||||
Password = "",
|
||||
Permissions = UserPermissions.Guest
|
||||
}
|
||||
}, 15000l, JsonConvert.DeserializeObject<ShiftOS.Objects.ShiftFS.Directory>(Properties.Resources.AppscapeServerFS));
|
||||
|
||||
bool validFileSent = false;
|
||||
chat.FileSent += (file) =>
|
||||
{
|
||||
if (Convert.ToBase64String(file.Data) == Properties.Resources.AppscapeWantedFile)
|
||||
validFileSent = true;
|
||||
};
|
||||
|
||||
Story.Context.AutoComplete = false;
|
||||
|
||||
Story.PushObjective("Appscape Troubles: The Secret", "Maureen has asked you to find out why Aiden Nirh, the maintainer of Appscape, isn't paying her half the profits for her TriOffice suite. Time to use your hacking skills... just like before.",
|
||||
() => { return validFileSent; },
|
||||
() =>
|
||||
{
|
||||
SendChatMessage("maureen_fenn", "File received.");
|
||||
SendChatMessage("maureen_fenn", "Awwww, come on, man! You can't tell me I got banned due to a cease and desist from DevX... That bastard... DevX, I mean.");
|
||||
SendChatMessage("maureen_fenn", "Anyways, I'll talk to Aiden about that... if I can... or maybe you can? Either way, here's your Codepoints.");
|
||||
Story.Context.MarkComplete();
|
||||
Thread.Sleep(5000);
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
AppearanceManager.Close(chat);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static Applications.Chat CurrentChat;
|
||||
|
||||
public static void SendChatMessage(string who, string msg)
|
||||
{
|
||||
CurrentChat.Typing = who;
|
||||
foreach(var c in msg)
|
||||
{
|
||||
Thread.Sleep(75);
|
||||
}
|
||||
CurrentChat?.PostMessage(who, CurrentChat?.ChatID, msg);
|
||||
CurrentChat.Typing = "";
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
|
||||
public static Applications.Chat OpenChat()
|
||||
{
|
||||
var chatbrd = AppearanceManager.OpenForms.FirstOrDefault(x => x.ParentWindow is Applications.Chat);
|
||||
Applications.Chat chat = null;
|
||||
if(chatbrd == null)
|
||||
{
|
||||
chat = new Applications.Chat();
|
||||
AppearanceManager.SetupWindow(chat);
|
||||
}
|
||||
else
|
||||
{
|
||||
chat = chatbrd.ParentWindow as Applications.Chat;
|
||||
}
|
||||
return chat;
|
||||
}
|
||||
|
||||
|
||||
[Mission("hacker101_breakingbonds_3", "Breaking the Bonds", "It's time you've learned how to hack.", 500l, "hacker101")]
|
||||
public static void BreakingTheBonds_Outro()
|
||||
{
|
||||
Story.Context.AutoComplete = false;
|
||||
CharacterName = "hacker101";
|
||||
SysName = "pebcak";
|
||||
|
||||
if (!terminalOpen())
|
||||
{
|
||||
var term = new Applications.Terminal();
|
||||
AppearanceManager.SetupWindow(term);
|
||||
}
|
||||
|
||||
WriteLine("Now let's teach you how to hack others' systems.");
|
||||
WriteLine("I'll start up a safe virtual environment for you to mess with.");
|
||||
VirtualEnvironments.Create("pebcak_devel", new List<Objects.ClientSave>
|
||||
{
|
||||
new Objects.ClientSave
|
||||
{
|
||||
Username = "root",
|
||||
Password = GenRandomPassword(),
|
||||
Permissions = Objects.UserPermissions.Root
|
||||
},
|
||||
new Objects.ClientSave
|
||||
{
|
||||
Username = "user",
|
||||
Password = "",
|
||||
Permissions = Objects.UserPermissions.Admin,
|
||||
}
|
||||
}, 6500l, JsonConvert.DeserializeObject<ShiftOS.Objects.ShiftFS.Directory>(Properties.Resources.PebcakDevelFS));
|
||||
Thread.Sleep(2000);
|
||||
WriteLine("It's all set up now. The system name for this environment is \"pebcak_devel\".");
|
||||
WriteLine("This server allows FTP connections through your File Skimmer.");
|
||||
WriteLine("Other systems can allow RTS connections (which allows you to control their terminals remotely), SMTP (mail transfer), etc. It depends on the system's role.");
|
||||
|
||||
bool isFsCopyInstalled = Shiftorium.UpgradeInstalled("fs_copy");
|
||||
if (isFsCopyInstalled == false)
|
||||
{
|
||||
WriteLine("Before we can begin, one last thing. You need the FS Copy Shiftorium upgrade.");
|
||||
Story.PushObjective("Breaking The Bonds: Preparations", "You need to buy the FS Copy upgrade from the Shiftorium.", () => { return Shiftorium.UpgradeInstalled("fs_copy"); }, () =>
|
||||
{
|
||||
isFsCopyInstalled = true;
|
||||
});
|
||||
}
|
||||
while (isFsCopyInstalled == false)
|
||||
Thread.Sleep(10);
|
||||
|
||||
WriteLine("Alright, open your File Skimmer, click \"Start Remote Session\", and connect to the system name \"pebcak_devel\" with user name \"user\" and no password.");
|
||||
|
||||
Story.PushObjective("Breaking The Bonds: A little practice...", "hacker101 has set up a virtual environment for you to connect to. Its system name is \"pebcak_local\", and has an unsecured user account with the name \"user\". Log into that user using your File Skimmer.",
|
||||
() => { return Applications.FileSkimmer.OpenConnection.SystemName == "pebcak_devel"; },
|
||||
() =>
|
||||
{
|
||||
WriteLine("Good work. You're in. This user only has Admin privileges, and doesn't have anything useful on it. This is where hacking comes in.");
|
||||
WriteLine("See that \"super private personal stuff\" folder? It can only be accessed as a root user. You'll need the root password for pebcak_devel to get in there.");
|
||||
WriteLine("I'll send you a password cracking utility that can use open ShiftOS connections to sniff out all the users on the system and allow you to brute-force into an account.");
|
||||
Console.WriteLine("New program unlocked: brute");
|
||||
SaveSystem.CurrentSave.StoriesExperienced.Add("brute");
|
||||
WriteLine("Go ahead and open it! Use it to breach the root user on pebcak_devel.");
|
||||
WriteLine("Once you've got the root password, click the Reauthenticate button in File Skimmer and it will ask you to log in as a new user.");
|
||||
WriteLine("Use the new credentials to log in.");
|
||||
Story.PushObjective("Breaking The Bonds: The Brute", "Use your new \"brute\" application to breach the root account on pebcak_local so you can access the super secret folder and download its contents.", () =>
|
||||
{
|
||||
return Applications.FileSkimmer.CurrentRemoteUser == Applications.FileSkimmer.OpenConnection.Users.FirstOrDefault(x => x.Username == "root");
|
||||
},
|
||||
() =>
|
||||
{
|
||||
WriteLine("Now, open the folder and you can copy files and folders from it to your system.");
|
||||
WriteLine("You've got 60 seconds before ShiftOS's internet daemon terminates this connection.");
|
||||
int counter = 60;
|
||||
while(counter > 0 && Applications.FileSkimmer.OpenConnection.SystemName == "pebcak_devel")
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
Console.WriteLine("Connection termination in " + counter + " seconds...");
|
||||
if (counter == 30 || counter == 15)
|
||||
Engine.AudioManager.PlayStream(Properties.Resources._3beepvirus);
|
||||
if (counter <= 10)
|
||||
Engine.AudioManager.PlayStream(Properties.Resources.writesound);
|
||||
counter--;
|
||||
}
|
||||
VirtualEnvironments.Clear();
|
||||
Applications.FileSkimmer.DisconnectRemote();
|
||||
WriteLine("Connections terminated I see.. Alright. Have fun with those dummy documents - you can keep them if you'd like. There's nothing important in them.");
|
||||
WriteLine("That's one thing you can do with brute and other hacking utilities. I'd recommend buying some of brute's Shiftorium upgrades to make it faster and more efficient.");
|
||||
WriteLine("Also, along the way, you're going to find a lot of new tricks. Some of them will require more than just brute to get into.");
|
||||
WriteLine("So be on the lookout on the Shiftnet for other hacking-related tools. You won't find any on Appscape, however...");
|
||||
WriteLine("That darn Aiden Nirh guy can't stand hackers.");
|
||||
WriteLine("Looking at your logs, I see he's contacted you before... Seriously... don't let him find out about brute. He'll report it directly to DevX.");
|
||||
WriteLine("Oh yeah, one more thing... that virus scanner... you may want to scan any files that you transfer from other systems with it.");
|
||||
WriteLine("You never know what sorts of digital filth is hidden within such innocent-looking files.");
|
||||
WriteLine("ALWAYS scan before opening - because if you open a file containing malicious code, it'll get run. It's just how ShiftOS's kernel works.");
|
||||
WriteLine("Oh yeah, one last thing. Things are going to start getting pretty open in the Digital Society..");
|
||||
WriteLine("Multiple people are going to want you to help them out with multiple things.");
|
||||
WriteLine("I've written a little command-line utility that'll help you keep track of these missions and see how far you've gotten.");
|
||||
WriteLine("Use the missions command to list out all the available missions, then use the startmission command to start one.");
|
||||
WriteLine("When you complete a mission, you'll earn Codepoints depending on the mission.");
|
||||
WriteLine("Allow me to demonstrate...");
|
||||
Console.WriteLine("User has disconnected.");
|
||||
|
||||
|
||||
|
||||
Story.Context.MarkComplete();
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
SaveSystem.SaveGame();
|
||||
TerminalBackend.PrintPrompt();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
[Story("brute")]
|
||||
public static void BreakingBondsStubStory()
|
||||
{
|
||||
//just to annoy victor tran
|
||||
}
|
||||
|
||||
const string VALID_PASSWORD_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_";
|
||||
|
||||
public static string GenRandomPassword()
|
||||
{
|
||||
var rnd = new Random();
|
||||
int len = rnd.Next(5, 15);
|
||||
string pass = "";
|
||||
for(int i = 0; i < len; i++)
|
||||
{
|
||||
char c = VALID_PASSWORD_CHARS[rnd.Next(VALID_PASSWORD_CHARS.Length)];
|
||||
pass += c;
|
||||
}
|
||||
return pass;
|
||||
}
|
||||
|
||||
[Story("hacker101_breakingbonds_2")]
|
||||
public static void BreakingTheBonds_Patchwork()
|
||||
{
|
||||
CharacterName = "hacker101";
|
||||
SysName = "pebcak";
|
||||
|
||||
if (!terminalOpen())
|
||||
{
|
||||
var term = new Applications.Terminal();
|
||||
AppearanceManager.SetupWindow(term);
|
||||
}
|
||||
|
||||
WriteLine("hacker101@pebcak - user connecting to your system.", false);
|
||||
Thread.Sleep(2000);
|
||||
WriteLine("Alright, you've gotten the applications you need.");
|
||||
WriteLine("Now, I know you're wondering, why do you need these three applications on your system?");
|
||||
WriteLine("Well, you're going to be doing some shady things and we need secure ways of storing the things you learn.");
|
||||
WriteLine("TriWrite is also needed so you can view rich-formatted text documents without them being garbled in TextPad.");
|
||||
WriteLine("Address Book is a secure way of storing information about the people you meet and learn about in the Digital Society.");
|
||||
WriteLine("And SimpleSRC is a chat system, much more advanced and secure than this remote terminal stuff you may have seen people doing to you.");
|
||||
WriteLine("ALL further operations with me will be done on SimpleSRC. But, for now, let's get you set up with your task.");
|
||||
WriteLine("You're going to be learning how to hack and crack systems in the Digital Society.");
|
||||
WriteLine("And this ain't no hippy DDoS stuff. Pfft, that crap is boring as hell.");
|
||||
WriteLine("I'm talking the ability to steal people's files remotely, read them on your system, and also, gain desktop-level and even root-level access to their ShiftOS installations, without them even knowing.");
|
||||
WriteLine("You'll be able to steal documents, programs, Codepoints and even more.");
|
||||
WriteLine("Of course, there's going to be defenses in place on other people's systems, such as secure passwords, advanced firewalls, network monitors, virus scanners, etc. You should get those kinds of things going on your system before we continue.");
|
||||
Story.Context.AutoComplete = false;
|
||||
WriteLine("I'll push out a sequence of objectives for you to follow to get your system secure.");
|
||||
Story.PushObjective("Breaking The Bonds: Patchwork - Get a virus scanner.", "Viruses are programs with the intent to harm users. They spread across the Digital Society infecting whoever they can find. A virus scanner can help you fight them off. There's a minimal one in the Shiftorium. Go get it!",
|
||||
|
||||
() => { return Shiftorium.UpgradeInstalled("virus_scanner"); },
|
||||
() =>
|
||||
{
|
||||
WriteLine("Alright, you've got a virus scanning program.");
|
||||
WriteLine("Now, let's take care of your system's biggest vulnerability, your root account.");
|
||||
bool isRootVulnerable = false;
|
||||
if (string.IsNullOrWhiteSpace(SaveSystem.Users.FirstOrDefault(x => x.Username == "root").Password))
|
||||
{
|
||||
isRootVulnerable = true;
|
||||
WriteLine("I was able to authenticate as root on your system without a password. Use the passwd command when logged in as root to change that.");
|
||||
Story.PushObjective("Breaking The Bonds: Patchwork - Set a root password.", "If you aren't already, login as root using the su command. Then, Jesus Christ, set a root password!",
|
||||
() => { return string.IsNullOrWhiteSpace(SaveSystem.Users.FirstOrDefault(x => x.Username == "root").Password); },
|
||||
() => {
|
||||
WriteLine("Man, oh man. My connection got terminated. That means you did it.");
|
||||
WriteLine("Be lucky that was me and not someone who wanted to harm you.");
|
||||
WriteLine("In ShiftOS, as well as most other Unix-likes, the root account has full permissions to everything on your system, no matter what.");
|
||||
WriteLine("If someone gains access to your root system remotely, you must change its password immediately or you can call that system toast.");
|
||||
|
||||
isRootVulnerable = false; });
|
||||
}
|
||||
while (isRootVulnerable)
|
||||
Thread.Sleep(10);
|
||||
|
||||
WriteLine("Alright, now let's make you another user account.");
|
||||
WriteLine("This user account will have administrative permissions, but in order for you to use them, you'll need to type your root password to confirm any administrative task.");
|
||||
WriteLine("Use the adduser command to add a new user. Give it a name, log into it, set a password if you'd like, then log back into root using su...");
|
||||
WriteLine("Then, in root, run \"setuserpermissions --user \"yourusername\" --val 2\". This will give the specified user \"admin\" permissions.");
|
||||
Story.PushObjective("Breaking The Bonds: Patchwork - Create an admin user", "Your root account looks nice and safe, but it's good practice on any Unix-like operating system, including ShiftOS, to have a user with slightly lower permissions called an Admin user. This user can do all the things that root can, but it requires you to enter your root password to verify administrative tasks.",
|
||||
|
||||
() =>
|
||||
{
|
||||
bool success = false;
|
||||
if(SaveSystem.Users.Count() > 1)
|
||||
{
|
||||
success = SaveSystem.Users.FirstOrDefault(x => x.Username != "root" && x.Permissions == Objects.UserPermissions.Admin) != null;
|
||||
}
|
||||
return success;
|
||||
},
|
||||
() =>
|
||||
{
|
||||
WriteLine("It's as secure as you need now. There are a few other things you'll want to do, like setting up a firewall and a network monitor, but we'll save that for later.");
|
||||
Story.Context.MarkComplete();
|
||||
Story.Start("hacker101_breakingbonds_3");
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
[Story("hacker101_breakingbonds_1")]
|
||||
public static void BreakingTheBondsIntro()
|
||||
|
@ -99,7 +469,6 @@ namespace ShiftOS.WinForms.Stories
|
|||
WriteLine("Before I can do that, however, I need you to do a few things.");
|
||||
WriteLine("I'll assign what I need you to do as an objective. When you're done, I'll tell you what you need to know.");
|
||||
|
||||
Story.Context.MarkComplete();
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
|
||||
Story.PushObjective("Breaking the Bonds: Errand Boy", @"hacker101 has something he needs to show you, however before he can, you need to do the following:
|
||||
|
@ -110,7 +479,7 @@ namespace ShiftOS.WinForms.Stories
|
|||
{
|
||||
bool flag1 = Shiftorium.UpgradeInstalled("address_book");
|
||||
bool flag2 = Shiftorium.UpgradeInstalled("triwrite");
|
||||
bool flag3 = Shiftorium.UpgradeInstalled("simplesrc");
|
||||
bool flag3 = Shiftorium.UpgradeInstalled("simplesrc_client");
|
||||
return flag1 && flag2 && flag3;
|
||||
}, () =>
|
||||
{
|
||||
|
|
152
ShiftOS.WinForms/VirtualEnvironments.cs
Normal file
152
ShiftOS.WinForms/VirtualEnvironments.cs
Normal file
|
@ -0,0 +1,152 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms
|
||||
{
|
||||
public static class VirtualEnvironments
|
||||
{
|
||||
private static List<ShiftOSEnvironment> _environments = new List<ShiftOSEnvironment>();
|
||||
|
||||
public static void Create(string sysname, List<ShiftOS.Objects.ClientSave> users, ulong cp, ShiftOS.Objects.ShiftFS.Directory fs)
|
||||
{
|
||||
var env = new ShiftOSEnvironment
|
||||
{
|
||||
SystemName = sysname,
|
||||
Users = users,
|
||||
Codepoints = cp,
|
||||
Filesystem = fs
|
||||
};
|
||||
_environments.Add(env);
|
||||
}
|
||||
|
||||
public static void Clear()
|
||||
{
|
||||
_environments.Clear();
|
||||
}
|
||||
|
||||
const string VALID_PASSWORD_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_";
|
||||
|
||||
|
||||
[RequiresUpgrade("brute")]
|
||||
[Command("brute")]
|
||||
public static void Brute()
|
||||
{
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
bool cracked = false;
|
||||
var brute = Properties.Resources.brute;
|
||||
var str = new System.IO.MemoryStream(brute);
|
||||
var reader = new NAudio.Wave.Mp3FileReader(str);
|
||||
var _out = new NAudio.Wave.WaveOut();
|
||||
_out.Init(reader);
|
||||
_out.PlaybackStopped += (o, a) =>
|
||||
{
|
||||
if (cracked == false)
|
||||
{
|
||||
cracked = true;
|
||||
TerminalCommands.Clear();
|
||||
ConsoleEx.Bold = true;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine(" - access denied - ");
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.Italic = true;
|
||||
Console.WriteLine("password could not be cracked before connection termination.");
|
||||
}
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
TerminalBackend.PrintPrompt();
|
||||
_out.Dispose();
|
||||
reader.Dispose();
|
||||
str.Dispose();
|
||||
};
|
||||
_out.Play();
|
||||
|
||||
var t = new Thread(() =>
|
||||
{
|
||||
|
||||
|
||||
Console.WriteLine("brute - version 1.0");
|
||||
Console.WriteLine("Copyright (c) 2018 hacker101. All rights reserved.");
|
||||
Console.WriteLine();
|
||||
Thread.Sleep(4000);
|
||||
Console.WriteLine("Scanning outbound connections...");
|
||||
if (string.IsNullOrWhiteSpace(Applications.FileSkimmer.OpenConnection.SystemName))
|
||||
{
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine(" - no outbound connections to scan, aborting - ");
|
||||
_out.Stop();
|
||||
_out.Dispose();
|
||||
reader.Dispose();
|
||||
str.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
Thread.Sleep(2000);
|
||||
var con = Applications.FileSkimmer.OpenConnection;
|
||||
Console.WriteLine($@"{con.SystemName}
|
||||
------------------
|
||||
|
||||
Active connection: ftp, rts
|
||||
System name: {con.SystemName}
|
||||
Users: {con.Users.Count}");
|
||||
Thread.Sleep(500);
|
||||
var user = con.Users.FirstOrDefault(x => x.Permissions == Objects.UserPermissions.Root);
|
||||
if (user == null)
|
||||
Console.WriteLine(" - no users found with root access - this is a shiftos bug - ");
|
||||
else
|
||||
{
|
||||
Console.WriteLine(" - starting bruteforce attack on user: " + user.Username + " - ");
|
||||
var rnd = new Random();
|
||||
|
||||
char[] pass = new char[user.Password.Length];
|
||||
for (int i = 0; i < pass.Length; i++)
|
||||
{
|
||||
if (cracked == true)
|
||||
break;
|
||||
while (pass[i] != user.Password[i])
|
||||
{
|
||||
if (cracked == true)
|
||||
break;
|
||||
char c = VALID_PASSWORD_CHARS[rnd.Next(VALID_PASSWORD_CHARS.Length)];
|
||||
if (char.IsLetterOrDigit(c))
|
||||
{
|
||||
pass[i] = c;
|
||||
Console.WriteLine(new string(pass));
|
||||
Console.WriteLine();
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cracked == false)
|
||||
{
|
||||
cracked = true;
|
||||
TerminalCommands.Clear();
|
||||
Console.WriteLine(" - credentials cracked. -");
|
||||
Console.WriteLine($@"sysname: {con.SystemName}
|
||||
user: {user.Username}
|
||||
password: {user.Password}");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
t.Start();
|
||||
}
|
||||
|
||||
public static ShiftOSEnvironment Get(string sysname)
|
||||
{
|
||||
return _environments.FirstOrDefault(x => x.SystemName == sysname);
|
||||
}
|
||||
}
|
||||
|
||||
public class ShiftOSEnvironment
|
||||
{
|
||||
public string SystemName { get; set; }
|
||||
public ulong Codepoints { get; set; }
|
||||
public ShiftOS.Objects.ShiftFS.Directory Filesystem { get; set; }
|
||||
public List<ShiftOS.Objects.ClientSave> Users { get; set; }
|
||||
}
|
||||
}
|
|
@ -119,7 +119,7 @@ namespace ShiftOS.WinForms
|
|||
|
||||
public void WriteTranscript()
|
||||
{
|
||||
Utils.WriteAllText(GetLanguagePath(), GetCurrentTranscript());
|
||||
System.IO.File.WriteAllText(GetLanguagePath(), GetCurrentTranscript());
|
||||
}
|
||||
|
||||
private string getDefault()
|
||||
|
|
|
@ -48,6 +48,8 @@ namespace ShiftOS.WinForms
|
|||
/// </summary>
|
||||
public partial class WindowBorder : Form, IWindowBorder
|
||||
{
|
||||
private bool IsFocused { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raises the closing event.
|
||||
/// </summary>
|
||||
|
@ -109,6 +111,17 @@ namespace ShiftOS.WinForms
|
|||
public WindowBorder(UserControl win)
|
||||
{
|
||||
InitializeComponent();
|
||||
IsFocused = true;
|
||||
this.Activated += (o, a) =>
|
||||
{
|
||||
IsFocused = true;
|
||||
SetupSkin();
|
||||
};
|
||||
this.Deactivate += (o, a) =>
|
||||
{
|
||||
IsFocused = false;
|
||||
SetupSkin();
|
||||
};
|
||||
this._parentWindow = win;
|
||||
Shiftorium.Installed += () =>
|
||||
{
|
||||
|
@ -249,55 +262,113 @@ namespace ShiftOS.WinForms
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Setups the skin.
|
||||
/// </summary>
|
||||
/// <returns>The skin.</returns>
|
||||
public void SetupSkin()
|
||||
public void SetDefaultBorders()
|
||||
{
|
||||
this.DoubleBuffered = true;
|
||||
this.TransparencyKey = LoadedSkin.SystemKey;
|
||||
pnlcontents.BackColor = this.TransparencyKey;
|
||||
pnltitle.Height = LoadedSkin.TitlebarHeight;
|
||||
pnltitle.BackColor = LoadedSkin.TitleBackgroundColor;
|
||||
pnltitle.BackgroundImage = GetImage("titlebar");
|
||||
pnltitleleft.Visible = LoadedSkin.ShowTitleCorners;
|
||||
pnltitleright.Visible = LoadedSkin.ShowTitleCorners;
|
||||
pnltitleleft.BackColor = LoadedSkin.TitleLeftCornerBackground;
|
||||
pnltitleright.BackColor = LoadedSkin.TitleRightCornerBackground;
|
||||
pnltitleleft.Width = LoadedSkin.TitleLeftCornerWidth;
|
||||
pnltitleright.Width = LoadedSkin.TitleRightCornerWidth;
|
||||
pnltitleleft.BackgroundImage = GetImage("titleleft");
|
||||
pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleft");
|
||||
pnltitleright.BackgroundImage = GetImage("titleright");
|
||||
pnltitleright.BackgroundImageLayout = GetImageLayout("titleright");
|
||||
pnltitle.BackgroundImageLayout = GetImageLayout("titlebar"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED?
|
||||
|
||||
lbtitletext.BackColor = (pnltitle.BackgroundImage != null) ? Color.Transparent : LoadedSkin.TitleBackgroundColor;
|
||||
lbtitletext.ForeColor = LoadedSkin.TitleTextColor;
|
||||
lbtitletext.Font = LoadedSkin.TitleFont;
|
||||
|
||||
pnlleft.BackColor = LoadedSkin.BorderLeftBackground;
|
||||
pnlleft.BackgroundImage = GetImage("leftborder");
|
||||
pnlleft.BackgroundImageLayout = GetImageLayout("leftborder");
|
||||
pnlleft.Width = LoadedSkin.LeftBorderWidth;
|
||||
|
||||
pnlright.BackColor = LoadedSkin.BorderRightBackground;
|
||||
pnlright.BackgroundImage = GetImage("rightborder");
|
||||
pnlright.BackgroundImageLayout = GetImageLayout("rightborder");
|
||||
pnlright.Width = LoadedSkin.RightBorderWidth;
|
||||
|
||||
pnlbottom.BackColor = LoadedSkin.BorderBottomBackground;
|
||||
pnlbottom.BackgroundImage = GetImage("bottomborder");
|
||||
pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborder");
|
||||
pnlbottom.Height = LoadedSkin.BottomBorderWidth;
|
||||
|
||||
pnlbottomr.BackColor = LoadedSkin.BorderBottomRightBackground;
|
||||
pnlbottomr.BackgroundImage = GetImage("bottomrborder");
|
||||
pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborder");
|
||||
pnlbottomr.Width = pnlright.Width;
|
||||
|
||||
pnlbottoml.BackColor = LoadedSkin.BorderBottomLeftBackground;
|
||||
pnlbottoml.BackgroundImage = GetImage("bottomlborder");
|
||||
pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborder");
|
||||
|
||||
}
|
||||
|
||||
public void SetInactiveBorders()
|
||||
{
|
||||
pnltitle.BackColor = LoadedSkin.TitleInactiveBackgroundColor;
|
||||
pnltitle.BackgroundImage = GetImage("titlebarinactive");
|
||||
pnltitleleft.BackColor = LoadedSkin.TitleInactiveLeftCornerBackground;
|
||||
pnltitleright.BackColor = LoadedSkin.TitleInactiveRightCornerBackground;
|
||||
pnltitleleft.BackgroundImage = GetImage("titleleftinactive");
|
||||
pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleftinactive");
|
||||
pnltitleright.BackgroundImage = GetImage("titlerightinactive");
|
||||
pnltitleright.BackgroundImageLayout = GetImageLayout("titlerightinactive");
|
||||
pnltitle.BackgroundImageLayout = GetImageLayout("titlebarinactive"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED?
|
||||
|
||||
pnlleft.BackColor = LoadedSkin.BorderInactiveLeftBackground;
|
||||
pnlleft.BackgroundImage = GetImage("leftborderinactive");
|
||||
pnlleft.BackgroundImageLayout = GetImageLayout("leftborderinactive");
|
||||
|
||||
pnlright.BackColor = LoadedSkin.BorderInactiveRightBackground;
|
||||
pnlright.BackgroundImage = GetImage("rightborderinactive");
|
||||
pnlright.BackgroundImageLayout = GetImageLayout("rightborderinactive");
|
||||
|
||||
pnlbottom.BackColor = LoadedSkin.BorderInactiveBottomBackground;
|
||||
pnlbottom.BackgroundImage = GetImage("bottomborderinactive");
|
||||
pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborderinactive");
|
||||
|
||||
pnlbottomr.BackColor = LoadedSkin.BorderInactiveBottomRightBackground;
|
||||
pnlbottomr.BackgroundImage = GetImage("bottomrborderinactive");
|
||||
pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborderinactive");
|
||||
|
||||
pnlbottoml.BackColor = LoadedSkin.BorderInactiveBottomLeftBackground;
|
||||
pnlbottoml.BackgroundImage = GetImage("bottomlborderinactive");
|
||||
pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborderinactive");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Setups the skin.
|
||||
/// </summary>
|
||||
/// <returns>The skin.</returns>
|
||||
public void SetupSkin()
|
||||
{
|
||||
//Border colors and images...
|
||||
if (IsFocused)
|
||||
{
|
||||
SetDefaultBorders();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LoadedSkin.RenderInactiveBorders)
|
||||
SetInactiveBorders();
|
||||
else
|
||||
SetDefaultBorders();
|
||||
}
|
||||
|
||||
|
||||
this.DoubleBuffered = true;
|
||||
this.TransparencyKey = LoadedSkin.SystemKey;
|
||||
pnlcontents.BackColor = this.TransparencyKey;
|
||||
pnltitle.Height = LoadedSkin.TitlebarHeight;
|
||||
pnltitleleft.Visible = LoadedSkin.ShowTitleCorners;
|
||||
pnltitleright.Visible = LoadedSkin.ShowTitleCorners;
|
||||
pnltitleleft.Width = LoadedSkin.TitleLeftCornerWidth;
|
||||
pnltitleright.Width = LoadedSkin.TitleRightCornerWidth;
|
||||
|
||||
lbtitletext.BackColor = (pnltitle.BackgroundImage != null) ? Color.Transparent : LoadedSkin.TitleBackgroundColor;
|
||||
lbtitletext.ForeColor = LoadedSkin.TitleTextColor;
|
||||
lbtitletext.Font = LoadedSkin.TitleFont;
|
||||
|
||||
pnlleft.Width = LoadedSkin.LeftBorderWidth;
|
||||
pnlright.Width = LoadedSkin.RightBorderWidth;
|
||||
|
||||
pnlbottom.Height = LoadedSkin.BottomBorderWidth;
|
||||
|
||||
pnlbottomr.Width = pnlright.Width;
|
||||
pnlbottoml.Width = pnlleft.Width;
|
||||
|
||||
lbtitletext.ForeColor = LoadedSkin.TitleTextColor;
|
||||
|
|
|
@ -910,6 +910,7 @@ namespace ShiftOS.WinForms
|
|||
public void ShowWindow(IWindowBorder border)
|
||||
{
|
||||
var brdr = border as Form;
|
||||
|
||||
focused = border;
|
||||
brdr.GotFocus += (o, a) =>
|
||||
{
|
||||
|
|
|
@ -83,28 +83,15 @@ namespace ShiftOS.Engine
|
|||
/// <param name="file">The file to play.</param>
|
||||
public static void Play(string file)
|
||||
{
|
||||
bool play = true;
|
||||
float volume = 1f;
|
||||
if (SaveSystem.CurrentSave != null)
|
||||
try
|
||||
{
|
||||
play = (SaveSystem.CurrentSave.SoundEnabled);
|
||||
volume = (float)SaveSystem.CurrentSave.MusicVolume / 100f;
|
||||
var bytes = File.ReadAllBytes(file);
|
||||
var str = new MemoryStream(bytes);
|
||||
PlayStream(str);
|
||||
}
|
||||
if (play)
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
_reader = new AudioFileReader(file);
|
||||
_out = new WaveOut();
|
||||
_out.Init(_reader);
|
||||
_out.Volume = volume;
|
||||
_out.Play();
|
||||
_out.PlaybackStopped += (o, a) => { PlayCompleted?.Invoke(); };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Audio error: " + ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,31 +101,14 @@ namespace ShiftOS.Engine
|
|||
/// <param name="str">The stream to read from.</param>
|
||||
public static void PlayStream(Stream str)
|
||||
{
|
||||
try
|
||||
bool play = true;
|
||||
if (SaveSystem.CurrentSave != null)
|
||||
play = SaveSystem.CurrentSave.SoundEnabled;
|
||||
if (play)
|
||||
{
|
||||
bool play = true;
|
||||
float volume = 1f;
|
||||
if (SaveSystem.CurrentSave != null)
|
||||
{
|
||||
play = (SaveSystem.CurrentSave.SoundEnabled);
|
||||
volume = (float)SaveSystem.CurrentSave.MusicVolume / 100f;
|
||||
}
|
||||
if (play)
|
||||
{
|
||||
while(_out.PlaybackState == PlaybackState.Playing)
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
ShiftOS.Engine.AudioManager.Stop();
|
||||
_out = new WaveOut();
|
||||
var mp3 = new WaveFileReader(str);
|
||||
_out.Init(mp3);
|
||||
_out.Volume = volume;
|
||||
_out.Play();
|
||||
_out.PlaybackStopped += (o, a) => { PlayCompleted?.Invoke(); };
|
||||
}
|
||||
var splayer = new System.Media.SoundPlayer(str);
|
||||
splayer.Play();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static event Action PlayCompleted;
|
||||
|
|
24
ShiftOS_TheReturn/MissionAttribute.cs
Normal file
24
ShiftOS_TheReturn/MissionAttribute.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ShiftOS.Engine
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
|
||||
public class MissionAttribute : StoryAttribute
|
||||
{
|
||||
public MissionAttribute(string id, string friendlyName, string friendlyDesc, ulong codepointAward, string assigner) : base(id)
|
||||
{
|
||||
Name = friendlyName;
|
||||
Description = friendlyDesc;
|
||||
CodepointAward = codepointAward;
|
||||
Assigner = assigner;
|
||||
}
|
||||
|
||||
public string Name { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
public string Assigner { get; set; }
|
||||
}
|
||||
}
|
|
@ -66,7 +66,7 @@ namespace ShiftOS.Engine
|
|||
/// <summary>
|
||||
/// Boolean representing whether the save system is ready to be used.
|
||||
/// </summary>
|
||||
public static bool Ready = false;
|
||||
public static AutoResetEvent Ready = new AutoResetEvent(false);
|
||||
public static bool IsSandbox = false;
|
||||
|
||||
/// <summary>
|
||||
|
@ -154,25 +154,17 @@ namespace ShiftOS.Engine
|
|||
{
|
||||
Console.WriteLine("{MISC_CONNECTINGTONETWORK}");
|
||||
|
||||
Ready = false;
|
||||
Ready.Reset();
|
||||
|
||||
if (PreDigitalSocietyConnection != null)
|
||||
{
|
||||
PreDigitalSocietyConnection?.Invoke();
|
||||
|
||||
while (!Ready)
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
Ready.WaitOne();
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool guidReceived = false;
|
||||
ServerManager.GUIDReceived += (str) =>
|
||||
{
|
||||
//Connection successful! Stop waiting!
|
||||
guidReceived = true;
|
||||
Console.WriteLine("{MISC_CONNECTIONSUCCESSFUL}");
|
||||
Thread.Sleep(100);
|
||||
Console.WriteLine("{LOADINGMSG2_" + loadingJoke2 + "}");
|
||||
|
@ -184,37 +176,25 @@ namespace ShiftOS.Engine
|
|||
if (ServerManager.ServerOnline)
|
||||
{
|
||||
ServerManager.Initiate(UserConfig.Get().DigitalSocietyAddress, UserConfig.Get().DigitalSocietyPort);
|
||||
//This haults the client until the connection is successful.
|
||||
while (ServerManager.thisGuid == new Guid())
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
// This halts the client until the connection is successful.
|
||||
ServerManager.guidReceiveARE.WaitOne();
|
||||
Console.WriteLine("{MISC_DHCPHANDSHAKEFINISHED}");
|
||||
FinishBootstrap();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("{MISC_NONETWORK}");
|
||||
Console.WriteLine("{LOADINGMSG2_" + loadingJoke2 + "}");
|
||||
FinishBootstrap();
|
||||
}
|
||||
FinishBootstrap();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//No errors, this never gets called.
|
||||
// "No errors, this never gets called."
|
||||
Console.WriteLine("[inetd] SEVERE: " + ex.Message);
|
||||
string dest = "Startup Exception " + DateTime.Now.ToString() + ".txt";
|
||||
System.IO.File.WriteAllText(dest, ex.ToString());
|
||||
Console.WriteLine("[inetd] Full exception details have been saved to: " + dest);
|
||||
Thread.Sleep(3000);
|
||||
Console.WriteLine("[sys] SEVERE: Cannot connect to server. Shutting down in 5...");
|
||||
Thread.Sleep(1000);
|
||||
Console.WriteLine("[sys] 4...");
|
||||
Thread.Sleep(1000);
|
||||
Console.WriteLine("[sys] 3...");
|
||||
Thread.Sleep(1000);
|
||||
Console.WriteLine("[sys] 2...");
|
||||
Thread.Sleep(1000);
|
||||
Console.WriteLine("[sys] 1...");
|
||||
Thread.Sleep(1000);
|
||||
Console.WriteLine("[sys] Bye bye.");
|
||||
System.Diagnostics.Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
|
@ -571,8 +551,6 @@ namespace ShiftOS.Engine
|
|||
/// <param name="amount">The amount of Codepoints to deduct.</param>
|
||||
public static void TransferCodepointsToVoid(ulong amount)
|
||||
{
|
||||
if (amount < 0)
|
||||
throw new ArgumentOutOfRangeException("We see what you did there. Trying to pull Codepoints from the void? That won't work.");
|
||||
CurrentSave.Codepoints -= amount;
|
||||
NotificationDaemon.AddNotification(NotificationType.CodepointsSent, amount);
|
||||
}
|
||||
|
@ -591,36 +569,35 @@ namespace ShiftOS.Engine
|
|||
/// </summary>
|
||||
public static void ReadSave()
|
||||
{
|
||||
string path;
|
||||
|
||||
path = "C:\\ShiftOS2\\";
|
||||
//Migrate old saves.
|
||||
if (System.IO.Directory.Exists("C:\\ShiftOS2"))
|
||||
if (System.IO.Directory.Exists(path) && !System.IO.File.Exists(path + "havemigrated"))
|
||||
{
|
||||
Console.WriteLine("Old save detected. Migrating filesystem to MFS...");
|
||||
foreach (string file in System.IO.Directory.EnumerateDirectories("C:\\ShiftOS2")
|
||||
.Select(d => new DirectoryInfo(d).FullName))
|
||||
foreach (string file in System.IO.Directory.EnumerateFileSystemEntries(path))
|
||||
{
|
||||
if (!Utils.DirectoryExists(file.Replace("C:\\ShiftOS2\\", "0:/").Replace("\\", "/")))
|
||||
Utils.CreateDirectory(file.Replace("C:\\ShiftOS2\\", "0:/").Replace("\\", "/"));
|
||||
string dest = file.Replace(path, "0:/").Replace("\\", "/");
|
||||
if (System.IO.File.GetAttributes(file).HasFlag(FileAttributes.Directory))
|
||||
if (!Utils.DirectoryExists(dest))
|
||||
Utils.CreateDirectory(dest);
|
||||
else
|
||||
{
|
||||
string rfile = Path.GetFileName(file);
|
||||
Utils.WriteAllBytes(dest, System.IO.File.ReadAllBytes(file));
|
||||
Console.WriteLine("Exported file " + file);
|
||||
}
|
||||
}
|
||||
foreach (string file in System.IO.Directory.EnumerateFiles("C:\\ShiftOS2"))
|
||||
{
|
||||
|
||||
string rfile = Path.GetFileName(file);
|
||||
Utils.WriteAllBytes(file.Replace("C:\\ShiftOS2\\", "0:/").Replace("\\", "/"), System.IO.File.ReadAllBytes(file));
|
||||
Console.WriteLine("Exported file " + file);
|
||||
}
|
||||
|
||||
System.IO.File.WriteAllText(path + "havemigrated", "1.0 BETA");
|
||||
}
|
||||
|
||||
string path = Path.Combine(Paths.SaveDirectory, "autosave.save");
|
||||
path = Path.Combine(Paths.SaveDirectory, "autosave.save");
|
||||
|
||||
if (System.IO.File.Exists(Path.Combine(Paths.SaveDirectory, "autosave.save")))
|
||||
{
|
||||
if (System.IO.File.Exists(path))
|
||||
CurrentSave = JsonConvert.DeserializeObject<Save>(System.IO.File.ReadAllText(path));
|
||||
}
|
||||
else
|
||||
{
|
||||
NewSave();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -667,11 +644,8 @@ namespace ShiftOS.Engine
|
|||
})
|
||||
{ IsBackground = false }.Start();
|
||||
if (!System.IO.Directory.Exists(Paths.SaveDirectory))
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(Paths.SaveDirectory);
|
||||
|
||||
}
|
||||
|
||||
System.IO.File.WriteAllText(Path.Combine(Paths.SaveDirectory, "autosave.save"), serialisedSaveFile);
|
||||
}
|
||||
if (!Shiftorium.Silent)
|
||||
|
@ -688,8 +662,6 @@ namespace ShiftOS.Engine
|
|||
/// <param name="amount">The amount of Codepoints.</param>
|
||||
public static void TransferCodepointsFrom(string who, ulong amount)
|
||||
{
|
||||
if (amount < 0)
|
||||
throw new ArgumentOutOfRangeException("We see what you did there... You can't just give a fake character Codepoints like that. It's better if you transfer them to the void.");
|
||||
NotificationDaemon.AddNotification(NotificationType.CodepointsReceived, amount);
|
||||
CurrentSave.Codepoints += amount;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,8 @@ Ping: {ServerManager.DigitalSocietyPing} ms
|
|||
/// </summary>
|
||||
public static Guid thisGuid { get; private set; }
|
||||
|
||||
public static AutoResetEvent guidReceiveARE = new AutoResetEvent(false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the underlying NetSockets client for this connection.
|
||||
/// </summary>
|
||||
|
@ -241,6 +243,7 @@ Ping: {ServerManager.DigitalSocietyPing} ms
|
|||
{
|
||||
thisGuid = new Guid(msg.Contents);
|
||||
GUIDReceived?.Invoke(msg.Contents);
|
||||
guidReceiveARE.Set();
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
|
|
|
@ -139,6 +139,7 @@
|
|||
<Compile Include="Localization.cs" />
|
||||
<Compile Include="LoginManager.cs" />
|
||||
<Compile Include="Lunix.cs" />
|
||||
<Compile Include="MissionAttribute.cs" />
|
||||
<Compile Include="NotificationDaemon.cs" />
|
||||
<Compile Include="OutOfBoxExperience.cs" />
|
||||
<Compile Include="Paths.cs" />
|
||||
|
|
|
@ -574,6 +574,15 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("The color of the titlebar's background.")]
|
||||
public Color TitleBackgroundColor = TitleBG;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[ShifterName("Title Inactive Background Color")]
|
||||
[RequiresUpgrade("shift_titlebar;shift_states")]
|
||||
[ShifterDescription("The color of the titlebar's background when the window isn't active.")]
|
||||
public Color TitleInactiveBackgroundColor = Skin.DefaultBackground;
|
||||
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Left Border Background")]
|
||||
|
@ -581,6 +590,14 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("The background color for the left border.")]
|
||||
public Color BorderLeftBackground = TitleBG;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Left Border Inactive Background")]
|
||||
[RequiresUpgrade("shift_window_borders;shift_states")]
|
||||
[ShifterDescription("The background color for the left border when the window is inactive.")]
|
||||
public Color BorderInactiveLeftBackground = DefaultBackground;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Right Border Background")]
|
||||
|
@ -588,6 +605,14 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("The background color for the right border.")]
|
||||
public Color BorderRightBackground = TitleBG;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Right Border Inactive Background")]
|
||||
[RequiresUpgrade("shift_window_borders;shift_states")]
|
||||
[ShifterDescription("The background color for the right border when the window is inactive.")]
|
||||
public Color BorderInactiveRightBackground = DefaultBackground;
|
||||
|
||||
|
||||
[ShifterMeta("Desktop")]
|
||||
[ShifterCategory("Panel buttons")]
|
||||
[RequiresUpgrade("shift_panel_buttons")]
|
||||
|
@ -602,6 +627,21 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("The background color for the bottom border.")]
|
||||
public Color BorderBottomBackground = TitleBG;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Bottom Border Inactive Background")]
|
||||
[RequiresUpgrade("shift_window_borders;shift_states")]
|
||||
[ShifterDescription("The background color for the bottom border when the window is inactive.")]
|
||||
public Color BorderInactiveBottomBackground = DefaultBackground;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Use Inactive Border Assets?")]
|
||||
[RequiresUpgrade("shift_window_borders;shift_states")]
|
||||
[ShifterDescription("Do you want to use separate colors and images for inactive Window Borders?")]
|
||||
public bool RenderInactiveBorders = false;
|
||||
|
||||
|
||||
[ShifterMeta("Desktop")]
|
||||
[ShifterCategory("Panel buttons")]
|
||||
[ShifterName("Panel button holder from left")]
|
||||
|
@ -609,6 +649,14 @@ namespace ShiftOS.Engine
|
|||
[RequiresUpgrade("shift_panel_buttons")]
|
||||
public int PanelButtonHolderFromLeft = 100;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Bottom Left Border Inactive Background")]
|
||||
[RequiresUpgrade("shift_window_borders;shift_states")]
|
||||
[ShifterDescription("The background color for the bottom left border when the window is inactive.")]
|
||||
public Color BorderInactiveBottomLeftBackground = DefaultBackground;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Bottom Left Border Background")]
|
||||
|
@ -616,6 +664,7 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("The background color for the bottom left border.")]
|
||||
public Color BorderBottomLeftBackground = TitleBG;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Bottom Right Border Background")]
|
||||
|
@ -623,6 +672,14 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("The background color for the bottom right border.")]
|
||||
public Color BorderBottomRightBackground = TitleBG;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[ShifterName("Bottom Right Border Inactive Background")]
|
||||
[RequiresUpgrade("shift_window_borders;shift_states")]
|
||||
[ShifterDescription("The background color for the bottom right border when the window is inactive.")]
|
||||
public Color BorderInactiveBottomRightBackground = DefaultBackground;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Title Buttons")]
|
||||
[ShifterName("Close Button Color")]
|
||||
|
@ -1133,6 +1190,14 @@ namespace ShiftOS.Engine
|
|||
[RequiresUpgrade("skinning;shift_titlebar")]
|
||||
public byte[] TitleBarBackground = null;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[ShifterName("Titlebar inactive background image")]
|
||||
[Image("titlebarinactive")]
|
||||
[RequiresUpgrade("skinning;shift_titlebar;shift_states")]
|
||||
public byte[] TitleBarInactiveBackground = null;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[RequiresUpgrade("shift_titlebar")]
|
||||
|
@ -1148,6 +1213,15 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("What color should be used for the left title corner?")]
|
||||
public Color TitleLeftCornerBackground = TitleBG;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[RequiresUpgrade("shift_titlebar;shift_states")]
|
||||
[ShifterFlag("ShowTitleCorners", true)]
|
||||
[ShifterName("Title left inactive background color")]
|
||||
[ShifterDescription("What color should be used for the left title corner when the window is inactive?")]
|
||||
public Color TitleInactiveLeftCornerBackground = DefaultBackground;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[RequiresUpgrade("shift_titlebar")]
|
||||
|
@ -1156,6 +1230,15 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("What color should be used for the right title corner?")]
|
||||
public Color TitleRightCornerBackground = TitleBG;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[RequiresUpgrade("shift_titlebar;shift_states")]
|
||||
[ShifterFlag("ShowTitleCorners", true)]
|
||||
[ShifterName("Title right inactive background color")]
|
||||
[ShifterDescription("What color should be used for the right title corner when the window is inactive?")]
|
||||
public Color TitleInactiveRightCornerBackground = DefaultBackground;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[RequiresUpgrade("shift_titlebar")]
|
||||
|
@ -1181,6 +1264,16 @@ namespace ShiftOS.Engine
|
|||
[Image("titleleft")]
|
||||
public byte[] TitleLeftBG = null;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[RequiresUpgrade("skinning;shift_titlebar;shift_states")]
|
||||
[ShifterFlag("ShowTitleCorners", true)]
|
||||
[ShifterName("Title left corner inactive background image")]
|
||||
[ShifterDescription("Select an image to appear as the background texture for the left titlebar corner when the window is inactive.")]
|
||||
[Image("titleleftinactive")]
|
||||
public byte[] TitleLeftInactiveBG = null;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[RequiresUpgrade("skinning;shift_titlebar")]
|
||||
|
@ -1190,6 +1283,15 @@ namespace ShiftOS.Engine
|
|||
[Image("titleright")]
|
||||
public byte[] TitleRightBG = null;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Titlebar")]
|
||||
[RequiresUpgrade("skinning;shift_titlebar;shift_states")]
|
||||
[ShifterFlag("ShowTitleCorners", true)]
|
||||
[ShifterName("Title right corner inactive background image")]
|
||||
[ShifterDescription("Select an image to appear as the background texture for the right titlebar corner when the window is inactive.")]
|
||||
[Image("titlerightinactive")]
|
||||
public byte[] TitleRightInactiveBG = null;
|
||||
|
||||
|
||||
[ShifterMeta("System")]
|
||||
[ShifterCategory("General")]
|
||||
|
@ -1205,6 +1307,15 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("Select an image to appear on the bottom border.")]
|
||||
public byte[] BottomBorderBG = null;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[RequiresUpgrade("skinning;shift_window_borders;shift_states")]
|
||||
[Image("bottomborderinactive")]
|
||||
[ShifterName("Bottom Border Inactive Image")]
|
||||
[ShifterDescription("Select an image to appear on the bottom border when the window is inactive. ")]
|
||||
public byte[] BottomBorderInactiveBG = null;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[RequiresUpgrade("skinning;shift_window_borders")]
|
||||
|
@ -1221,6 +1332,25 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("Select an image to appear on the bottom left border.")]
|
||||
public byte[] BottomLBorderBG = null;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[RequiresUpgrade("skinning;shift_window_borders;shift_states")]
|
||||
[Image("bottomrborderinactive")]
|
||||
[ShifterName("Bottom Right Border Inactive Image")]
|
||||
[ShifterDescription("Select an image to appear on the bottom right border when the window is inactive.")]
|
||||
public byte[] BottomRBorderInactiveBG = null;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[RequiresUpgrade("skinning;shift_window_borders;shift_states")]
|
||||
[Image("bottomlborderinactive")]
|
||||
[ShifterName("Bottom Left Border Inactive Image")]
|
||||
[ShifterDescription("Select an image to appear on the bottom left border when the window is inactive.")]
|
||||
public byte[] BottomLBorderInactiveBG = null;
|
||||
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[RequiresUpgrade("skinning;shift_window_borders")]
|
||||
|
@ -1237,6 +1367,25 @@ namespace ShiftOS.Engine
|
|||
[ShifterDescription("Select an image to appear on the right border.")]
|
||||
public byte[] RightBorderBG = null;
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[RequiresUpgrade("skinning;shift_window_borders;shift_states")]
|
||||
[Image("leftborderinactive")]
|
||||
[ShifterName("Left Border Inactive Image")]
|
||||
[ShifterDescription("Select an image to appear on the left border when the window is inactive.")]
|
||||
public byte[] LeftBorderInactiveBG = null;
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[RequiresUpgrade("skinning;shift_window_borders;shift_states")]
|
||||
[Image("rightborderinactive")]
|
||||
[ShifterName("Right Border Inactive Image")]
|
||||
[ShifterDescription("Select an image to appear on the right border when the window is inactive.")]
|
||||
public byte[] RightBorderInactiveBG = null;
|
||||
|
||||
|
||||
|
||||
[ShifterMeta("Windows")]
|
||||
[ShifterCategory("Window border")]
|
||||
[RequiresUpgrade("shift_window_borders")]
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace ShiftOS.Engine
|
|||
{
|
||||
foreach (var mth in type.GetMethods(BindingFlags.Public | BindingFlags.Static))
|
||||
{
|
||||
foreach (var attrib in Array.FindAll(mth.GetCustomAttributes(false), a => a is StoryAttribute))
|
||||
foreach (var attrib in Array.FindAll(mth.GetCustomAttributes(false), a => a is StoryAttribute || a is MissionAttribute))
|
||||
{
|
||||
var story = attrib as StoryAttribute;
|
||||
if (story.StoryID == stid)
|
||||
|
@ -157,6 +157,19 @@ namespace ShiftOS.Engine
|
|||
SaveSystem.CurrentSave.PickupPoint = Context.Id;
|
||||
Context.OnComplete += () =>
|
||||
{
|
||||
if(story is MissionAttribute)
|
||||
{
|
||||
var mission = story as MissionAttribute;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
|
||||
ConsoleEx.Bold = true;
|
||||
Console.WriteLine(" - mission complete - ");
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.White;
|
||||
Console.WriteLine($"{mission.Name} successfully finished. You have earned {mission.CodepointAward} Codepoints for your efforts.");
|
||||
SaveSystem.CurrentSave.Codepoints += mission.CodepointAward;
|
||||
TerminalBackend.PrintPrompt();
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
}
|
||||
StoryComplete?.Invoke(stid);
|
||||
SaveSystem.CurrentSave.PickupPoint = null;
|
||||
};
|
||||
|
@ -209,5 +222,6 @@ namespace ShiftOS.Engine
|
|||
/// </summary>
|
||||
public string StoryID { get; private set; }
|
||||
|
||||
public ulong CodepointAward { get; protected set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue