mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
Start work on TriPresent
It's in a basic state right now, and I also fixed a launch bug for people with slightly older ``ShiftOS.mfs`` files (in Localization.cs).
This commit is contained in:
parent
0937c68e19
commit
5967c0fc36
5 changed files with 420 additions and 2 deletions
233
ShiftOS.WinForms/Applications/TriPresent.Designer.cs
generated
Normal file
233
ShiftOS.WinForms/Applications/TriPresent.Designer.cs
generated
Normal file
|
@ -0,0 +1,233 @@
|
|||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
partial class TriPresent
|
||||
{
|
||||
/// <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.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addLabelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.AddItem = new System.Windows.Forms.Panel();
|
||||
this.cancelAdd = new System.Windows.Forms.Button();
|
||||
this.placeAdd = new System.Windows.Forms.Button();
|
||||
this.yLabel = new System.Windows.Forms.Label();
|
||||
this.xLabel = new System.Windows.Forms.Label();
|
||||
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
|
||||
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
|
||||
this.labelContents = new System.Windows.Forms.TextBox();
|
||||
this.addItemLabel = new System.Windows.Forms.Label();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.AddItem.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.editToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(758, 24);
|
||||
this.menuStrip1.TabIndex = 0;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openToolStripMenuItem,
|
||||
this.saveToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// openToolStripMenuItem
|
||||
//
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
|
||||
this.openToolStripMenuItem.Text = "&Open";
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
|
||||
this.saveToolStripMenuItem.Text = "&Save";
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addToolStripMenuItem});
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
||||
this.editToolStripMenuItem.Text = "&Edit";
|
||||
//
|
||||
// addToolStripMenuItem
|
||||
//
|
||||
this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addLabelToolStripMenuItem});
|
||||
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
|
||||
this.addToolStripMenuItem.Size = new System.Drawing.Size(96, 22);
|
||||
this.addToolStripMenuItem.Text = "Add";
|
||||
//
|
||||
// addLabelToolStripMenuItem
|
||||
//
|
||||
this.addLabelToolStripMenuItem.Name = "addLabelToolStripMenuItem";
|
||||
this.addLabelToolStripMenuItem.Size = new System.Drawing.Size(127, 22);
|
||||
this.addLabelToolStripMenuItem.Text = "Add Label";
|
||||
this.addLabelToolStripMenuItem.Click += new System.EventHandler(this.addLabelToolStripMenuItem_Click);
|
||||
//
|
||||
// AddItem
|
||||
//
|
||||
this.AddItem.Controls.Add(this.cancelAdd);
|
||||
this.AddItem.Controls.Add(this.placeAdd);
|
||||
this.AddItem.Controls.Add(this.yLabel);
|
||||
this.AddItem.Controls.Add(this.xLabel);
|
||||
this.AddItem.Controls.Add(this.numericUpDown2);
|
||||
this.AddItem.Controls.Add(this.numericUpDown1);
|
||||
this.AddItem.Controls.Add(this.labelContents);
|
||||
this.AddItem.Controls.Add(this.addItemLabel);
|
||||
this.AddItem.Location = new System.Drawing.Point(260, 152);
|
||||
this.AddItem.Name = "AddItem";
|
||||
this.AddItem.Size = new System.Drawing.Size(244, 187);
|
||||
this.AddItem.TabIndex = 1;
|
||||
this.AddItem.Visible = false;
|
||||
//
|
||||
// cancelAdd
|
||||
//
|
||||
this.cancelAdd.Location = new System.Drawing.Point(121, 164);
|
||||
this.cancelAdd.Name = "cancelAdd";
|
||||
this.cancelAdd.Size = new System.Drawing.Size(123, 23);
|
||||
this.cancelAdd.TabIndex = 7;
|
||||
this.cancelAdd.Text = "Cancel";
|
||||
this.cancelAdd.UseVisualStyleBackColor = true;
|
||||
this.cancelAdd.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// placeAdd
|
||||
//
|
||||
this.placeAdd.Location = new System.Drawing.Point(0, 164);
|
||||
this.placeAdd.Name = "placeAdd";
|
||||
this.placeAdd.Size = new System.Drawing.Size(123, 23);
|
||||
this.placeAdd.TabIndex = 6;
|
||||
this.placeAdd.Text = "Place";
|
||||
this.placeAdd.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// yLabel
|
||||
//
|
||||
this.yLabel.AutoSize = true;
|
||||
this.yLabel.Location = new System.Drawing.Point(227, 117);
|
||||
this.yLabel.Name = "yLabel";
|
||||
this.yLabel.Size = new System.Drawing.Size(14, 13);
|
||||
this.yLabel.TabIndex = 5;
|
||||
this.yLabel.Text = "Y";
|
||||
//
|
||||
// xLabel
|
||||
//
|
||||
this.xLabel.AutoSize = true;
|
||||
this.xLabel.Location = new System.Drawing.Point(3, 117);
|
||||
this.xLabel.Name = "xLabel";
|
||||
this.xLabel.Size = new System.Drawing.Size(14, 13);
|
||||
this.xLabel.TabIndex = 4;
|
||||
this.xLabel.Text = "X";
|
||||
//
|
||||
// numericUpDown2
|
||||
//
|
||||
this.numericUpDown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.numericUpDown2.Location = new System.Drawing.Point(157, 136);
|
||||
this.numericUpDown2.Name = "numericUpDown2";
|
||||
this.numericUpDown2.Size = new System.Drawing.Size(87, 20);
|
||||
this.numericUpDown2.TabIndex = 3;
|
||||
//
|
||||
// numericUpDown1
|
||||
//
|
||||
this.numericUpDown1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.numericUpDown1.Location = new System.Drawing.Point(3, 136);
|
||||
this.numericUpDown1.Name = "numericUpDown1";
|
||||
this.numericUpDown1.Size = new System.Drawing.Size(87, 20);
|
||||
this.numericUpDown1.TabIndex = 2;
|
||||
//
|
||||
// labelContents
|
||||
//
|
||||
this.labelContents.Location = new System.Drawing.Point(3, 26);
|
||||
this.labelContents.Multiline = true;
|
||||
this.labelContents.Name = "labelContents";
|
||||
this.labelContents.Size = new System.Drawing.Size(238, 67);
|
||||
this.labelContents.TabIndex = 1;
|
||||
this.labelContents.Text = "Text";
|
||||
//
|
||||
// addItemLabel
|
||||
//
|
||||
this.addItemLabel.Location = new System.Drawing.Point(0, 0);
|
||||
this.addItemLabel.Name = "addItemLabel";
|
||||
this.addItemLabel.Size = new System.Drawing.Size(244, 23);
|
||||
this.addItemLabel.TabIndex = 0;
|
||||
this.addItemLabel.Text = "{ADD_ITEM_LABEL}";
|
||||
this.addItemLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// TriPresent
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.AddItem);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Name = "TriPresent";
|
||||
this.Size = new System.Drawing.Size(758, 480);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.AddItem.ResumeLayout(false);
|
||||
this.AddItem.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem addLabelToolStripMenuItem;
|
||||
private System.Windows.Forms.Panel AddItem;
|
||||
private System.Windows.Forms.Label addItemLabel;
|
||||
private System.Windows.Forms.Button cancelAdd;
|
||||
private System.Windows.Forms.Button placeAdd;
|
||||
private System.Windows.Forms.Label yLabel;
|
||||
private System.Windows.Forms.Label xLabel;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDown2;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDown1;
|
||||
private System.Windows.Forms.TextBox labelContents;
|
||||
}
|
||||
}
|
37
ShiftOS.WinForms/Applications/TriPresent.cs
Normal file
37
ShiftOS.WinForms/Applications/TriPresent.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using ShiftOS.Objects.ShiftFS;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ShiftOS.Engine;
|
||||
|
||||
namespace ShiftOS.WinForms.Applications
|
||||
{
|
||||
[WinOpen("tripresent")]
|
||||
[AppscapeEntry("TriPresent", "Part of the trilogy of office applications for enhancement of your system. TriPresent is easliy the best presentation creator out there for ShiftOS.", 1024, 750, "file_skimmer", "Office")]
|
||||
[DefaultTitle("TriPresent")]
|
||||
[Launcher("TriPresent", false, null, "Office")]
|
||||
public partial class TriPresent : UserControl
|
||||
{
|
||||
public TriPresent()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void addLabelToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
addItemLabel.Text = "Add Label";
|
||||
AddItem.Show();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddItem.Hide();
|
||||
}
|
||||
}
|
||||
}
|
123
ShiftOS.WinForms/Applications/TriPresent.resx
Normal file
123
ShiftOS.WinForms/Applications/TriPresent.resx
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -70,6 +70,12 @@
|
|||
<Compile Include="Applications\About.Designer.cs">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\TriPresent.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Applications\TriPresent.Designer.cs">
|
||||
<DependentUpon>TriPresent.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Applications\TriWrite.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -412,6 +418,9 @@
|
|||
<EmbeddedResource Include="Applications\About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\TriPresent.resx">
|
||||
<DependentUpon>TriPresent.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Applications\TriWrite.resx">
|
||||
<DependentUpon>TriWrite.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -167,8 +167,24 @@ namespace ShiftOS.Engine
|
|||
// if the user has saved then store their username and systemname in these string variables please
|
||||
if (SaveSystem.CurrentSave != null)
|
||||
{
|
||||
usernameReplace = SaveSystem.CurrentUser.Username;
|
||||
domainReplace = SaveSystem.CurrentSave.SystemName;
|
||||
try
|
||||
{
|
||||
usernameReplace = SaveSystem.CurrentUser.Username;
|
||||
}
|
||||
catch
|
||||
{
|
||||
usernameReplace = "user";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
domainReplace = SaveSystem.CurrentSave.SystemName;
|
||||
}
|
||||
catch
|
||||
{
|
||||
domainReplace = "system";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
string namespaceReplace = "";
|
||||
|
|
Loading…
Reference in a new issue