From 5967c0fc3616fe14656f985e8871489ba03cfd10 Mon Sep 17 00:00:00 2001 From: AShifter Date: Thu, 18 May 2017 19:27:39 -0600 Subject: 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). --- ShiftOS.WinForms/Applications/TriPresent.cs | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ShiftOS.WinForms/Applications/TriPresent.cs (limited to 'ShiftOS.WinForms/Applications/TriPresent.cs') diff --git a/ShiftOS.WinForms/Applications/TriPresent.cs b/ShiftOS.WinForms/Applications/TriPresent.cs new file mode 100644 index 0000000..ab5db09 --- /dev/null +++ b/ShiftOS.WinForms/Applications/TriPresent.cs @@ -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(); + } + } +} -- cgit v1.2.3 From 41992360f1a07c7ff2a4627168ca7b2156b31dbc Mon Sep 17 00:00:00 2001 From: Rylan/wowmom98 Date: Thu, 18 May 2017 21:48:40 -0400 Subject: actually made tripresent an IShiftOSWindow --- ShiftOS.WinForms/Applications/TriPresent.cs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'ShiftOS.WinForms/Applications/TriPresent.cs') diff --git a/ShiftOS.WinForms/Applications/TriPresent.cs b/ShiftOS.WinForms/Applications/TriPresent.cs index ab5db09..e16d4bd 100644 --- a/ShiftOS.WinForms/Applications/TriPresent.cs +++ b/ShiftOS.WinForms/Applications/TriPresent.cs @@ -13,10 +13,10 @@ 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")] + [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.", 2048, 1500, "file_skimmer", "Office")] [DefaultTitle("TriPresent")] [Launcher("TriPresent", false, null, "Office")] - public partial class TriPresent : UserControl + public partial class TriPresent : UserControl, IShiftOSWindow { public TriPresent() { @@ -33,5 +33,25 @@ namespace ShiftOS.WinForms.Applications { AddItem.Hide(); } + + public void OnLoad() + { + + } + + public void OnSkinLoad() + { + + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + + } } } -- cgit v1.2.3 From e248514bcfc42fa2b042ef6a39ae31b06871705d Mon Sep 17 00:00:00 2001 From: AShifter Date: Sat, 20 May 2017 11:05:58 -0600 Subject: Make a basic version of TriPresent work. This version has one function: Adding labels. You can add labels with certain text colors, etc. Adding more features very soon. --- .../Applications/TriPresent.Designer.cs | 109 +++++++++++++++------ ShiftOS.WinForms/Applications/TriPresent.cs | 22 +++++ 2 files changed, 101 insertions(+), 30 deletions(-) (limited to 'ShiftOS.WinForms/Applications/TriPresent.cs') diff --git a/ShiftOS.WinForms/Applications/TriPresent.Designer.cs b/ShiftOS.WinForms/Applications/TriPresent.Designer.cs index 1d7f51f..a18550e 100644 --- a/ShiftOS.WinForms/Applications/TriPresent.Designer.cs +++ b/ShiftOS.WinForms/Applications/TriPresent.Designer.cs @@ -40,14 +40,17 @@ 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.yPosition = new System.Windows.Forms.NumericUpDown(); + this.xPosition = new System.Windows.Forms.NumericUpDown(); this.labelContents = new System.Windows.Forms.TextBox(); this.addItemLabel = new System.Windows.Forms.Label(); + this.designerPanel = new System.Windows.Forms.Panel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); this.menuStrip1.SuspendLayout(); this.AddItem.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.yPosition)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xPosition)).BeginInit(); this.SuspendLayout(); // // menuStrip1 @@ -107,23 +110,26 @@ // // AddItem // + this.AddItem.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.AddItem.Controls.Add(this.label1); + this.AddItem.Controls.Add(this.panel1); 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.yPosition); + this.AddItem.Controls.Add(this.xPosition); 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.Size = new System.Drawing.Size(244, 199); this.AddItem.TabIndex = 1; this.AddItem.Visible = false; // // cancelAdd // - this.cancelAdd.Location = new System.Drawing.Point(121, 164); + this.cancelAdd.Location = new System.Drawing.Point(120, 174); this.cancelAdd.Name = "cancelAdd"; this.cancelAdd.Size = new System.Drawing.Size(123, 23); this.cancelAdd.TabIndex = 7; @@ -133,17 +139,18 @@ // // placeAdd // - this.placeAdd.Location = new System.Drawing.Point(0, 164); + this.placeAdd.Location = new System.Drawing.Point(-1, 174); 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; + this.placeAdd.Click += new System.EventHandler(this.placeAdd_Click); // // yLabel // this.yLabel.AutoSize = true; - this.yLabel.Location = new System.Drawing.Point(227, 117); + this.yLabel.Location = new System.Drawing.Point(227, 95); this.yLabel.Name = "yLabel"; this.yLabel.Size = new System.Drawing.Size(14, 13); this.yLabel.TabIndex = 5; @@ -152,27 +159,37 @@ // xLabel // this.xLabel.AutoSize = true; - this.xLabel.Location = new System.Drawing.Point(3, 117); + this.xLabel.Location = new System.Drawing.Point(3, 95); 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; + // yPosition + // + this.yPosition.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.yPosition.Location = new System.Drawing.Point(157, 114); + this.yPosition.Maximum = new decimal(new int[] { + 999999999, + 0, + 0, + 0}); + this.yPosition.Name = "yPosition"; + this.yPosition.Size = new System.Drawing.Size(87, 20); + this.yPosition.TabIndex = 3; + // + // xPosition + // + this.xPosition.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.xPosition.Location = new System.Drawing.Point(3, 114); + this.xPosition.Maximum = new decimal(new int[] { + 999999999, + 0, + 0, + 0}); + this.xPosition.Name = "xPosition"; + this.xPosition.Size = new System.Drawing.Size(87, 20); + this.xPosition.TabIndex = 2; // // labelContents // @@ -192,11 +209,40 @@ this.addItemLabel.Text = "{ADD_ITEM_LABEL}"; this.addItemLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // designerPanel + // + this.designerPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.designerPanel.Location = new System.Drawing.Point(0, 24); + this.designerPanel.Name = "designerPanel"; + this.designerPanel.Size = new System.Drawing.Size(758, 456); + this.designerPanel.TabIndex = 2; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.Black; + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.ForeColor = System.Drawing.Color.Black; + this.panel1.Location = new System.Drawing.Point(203, 144); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(35, 20); + this.panel1.TabIndex = 8; + this.panel1.Click += new System.EventHandler(this.panel1_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(139, 147); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(58, 13); + this.label1.TabIndex = 9; + this.label1.Text = "Text Color:"; + // // 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.designerPanel); this.Controls.Add(this.menuStrip1); this.Name = "TriPresent"; this.Size = new System.Drawing.Size(758, 480); @@ -204,8 +250,8 @@ this.menuStrip1.PerformLayout(); this.AddItem.ResumeLayout(false); this.AddItem.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.yPosition)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xPosition)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -226,8 +272,11 @@ 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.NumericUpDown yPosition; + private System.Windows.Forms.NumericUpDown xPosition; private System.Windows.Forms.TextBox labelContents; + private System.Windows.Forms.Panel designerPanel; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel panel1; } } diff --git a/ShiftOS.WinForms/Applications/TriPresent.cs b/ShiftOS.WinForms/Applications/TriPresent.cs index e16d4bd..d002329 100644 --- a/ShiftOS.WinForms/Applications/TriPresent.cs +++ b/ShiftOS.WinForms/Applications/TriPresent.cs @@ -53,5 +53,27 @@ namespace ShiftOS.WinForms.Applications { } + + private void placeAdd_Click(object sender, EventArgs e) + { + Label label = new Label(); + label.Parent = designerPanel; + label.BackColor = Color.Transparent; + label.ForeColor = panel1.BackColor; + label.Text = labelContents.Text; + label.Location = new Point(Convert.ToInt32(xPosition.Value), Convert.ToInt32(yPosition.Value)); + label.Text = labelContents.Text; + Random rnd = new Random(); + label.Name = labelContents.Text + rnd.Next(0, 500); + } + + private void panel1_Click(object sender, EventArgs e) + { + AppearanceManager.SetupDialog(new ColorPicker(panel1.BackColor, "Text Color", new Action((col) => + { + panel1.ForeColor = col; + panel1.BackColor = col; + }))); + } } } -- cgit v1.2.3 From 328f62b67c453419c47880bb9937526d7d2b2d59 Mon Sep 17 00:00:00 2001 From: AShifter Date: Sat, 20 May 2017 13:14:59 -0600 Subject: Add more features to TriPresent yoy! --- .../Applications/TriPresent.Designer.cs | 186 ++++++++++++--------- ShiftOS.WinForms/Applications/TriPresent.cs | 32 ++-- 2 files changed, 128 insertions(+), 90 deletions(-) (limited to 'ShiftOS.WinForms/Applications/TriPresent.cs') diff --git a/ShiftOS.WinForms/Applications/TriPresent.Designer.cs b/ShiftOS.WinForms/Applications/TriPresent.Designer.cs index a18550e..d0e704f 100644 --- a/ShiftOS.WinForms/Applications/TriPresent.Designer.cs +++ b/ShiftOS.WinForms/Applications/TriPresent.Designer.cs @@ -35,22 +35,27 @@ 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.addLabel = new System.Windows.Forms.Panel(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.label1 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); this.yLabel = new System.Windows.Forms.Label(); this.xLabel = new System.Windows.Forms.Label(); this.yPosition = new System.Windows.Forms.NumericUpDown(); this.xPosition = new System.Windows.Forms.NumericUpDown(); this.labelContents = new System.Windows.Forms.TextBox(); this.addItemLabel = new System.Windows.Forms.Label(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.designerPanel = new System.Windows.Forms.Panel(); - this.panel1 = new System.Windows.Forms.Panel(); - this.label1 = new System.Windows.Forms.Label(); this.menuStrip1.SuspendLayout(); - this.AddItem.SuspendLayout(); + this.addLabel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.yPosition)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xPosition)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); this.SuspendLayout(); // // menuStrip1 @@ -108,49 +113,72 @@ this.addLabelToolStripMenuItem.Text = "Add Label"; this.addLabelToolStripMenuItem.Click += new System.EventHandler(this.addLabelToolStripMenuItem_Click); // - // AddItem - // - this.AddItem.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.AddItem.Controls.Add(this.label1); - this.AddItem.Controls.Add(this.panel1); - 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.yPosition); - this.AddItem.Controls.Add(this.xPosition); - 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, 199); - this.AddItem.TabIndex = 1; - this.AddItem.Visible = false; - // - // cancelAdd - // - this.cancelAdd.Location = new System.Drawing.Point(120, 174); - 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(-1, 174); - 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; - this.placeAdd.Click += new System.EventHandler(this.placeAdd_Click); + // addLabel + // + this.addLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.addLabel.Controls.Add(this.checkBox2); + this.addLabel.Controls.Add(this.checkBox1); + this.addLabel.Controls.Add(this.label1); + this.addLabel.Controls.Add(this.panel1); + this.addLabel.Controls.Add(this.yLabel); + this.addLabel.Controls.Add(this.xLabel); + this.addLabel.Controls.Add(this.yPosition); + this.addLabel.Controls.Add(this.xPosition); + this.addLabel.Controls.Add(this.labelContents); + this.addLabel.Controls.Add(this.addItemLabel); + this.addLabel.Dock = System.Windows.Forms.DockStyle.Fill; + this.addLabel.Location = new System.Drawing.Point(0, 0); + this.addLabel.Name = "addLabel"; + this.addLabel.Size = new System.Drawing.Size(252, 456); + this.addLabel.TabIndex = 1; + this.addLabel.Visible = false; + // + // checkBox2 + // + this.checkBox2.AutoSize = true; + this.checkBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.checkBox2.Location = new System.Drawing.Point(6, 163); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(48, 17); + this.checkBox2.TabIndex = 11; + this.checkBox2.Text = "Italic"; + this.checkBox2.UseVisualStyleBackColor = true; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.checkBox1.Location = new System.Drawing.Point(6, 140); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(51, 17); + this.checkBox1.TabIndex = 10; + this.checkBox1.Text = "Bold"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(115, 144); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(58, 13); + this.label1.TabIndex = 9; + this.label1.Text = "Text Color:"; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.Black; + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.ForeColor = System.Drawing.Color.Black; + this.panel1.Location = new System.Drawing.Point(179, 141); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(35, 20); + this.panel1.TabIndex = 8; + this.panel1.Click += new System.EventHandler(this.panel1_Click); // // yLabel // this.yLabel.AutoSize = true; - this.yLabel.Location = new System.Drawing.Point(227, 95); + this.yLabel.Location = new System.Drawing.Point(200, 96); this.yLabel.Name = "yLabel"; this.yLabel.Size = new System.Drawing.Size(14, 13); this.yLabel.TabIndex = 5; @@ -168,7 +196,7 @@ // yPosition // this.yPosition.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.yPosition.Location = new System.Drawing.Point(157, 114); + this.yPosition.Location = new System.Drawing.Point(127, 114); this.yPosition.Maximum = new decimal(new int[] { 999999999, 0, @@ -196,7 +224,7 @@ 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.Size = new System.Drawing.Size(211, 67); this.labelContents.TabIndex = 1; this.labelContents.Text = "Text"; // @@ -204,54 +232,55 @@ // this.addItemLabel.Location = new System.Drawing.Point(0, 0); this.addItemLabel.Name = "addItemLabel"; - this.addItemLabel.Size = new System.Drawing.Size(244, 23); + this.addItemLabel.Size = new System.Drawing.Size(214, 23); this.addItemLabel.TabIndex = 0; this.addItemLabel.Text = "{ADD_ITEM_LABEL}"; this.addItemLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // designerPanel + // splitContainer1 // - this.designerPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.designerPanel.Location = new System.Drawing.Point(0, 24); - this.designerPanel.Name = "designerPanel"; - this.designerPanel.Size = new System.Drawing.Size(758, 456); - this.designerPanel.TabIndex = 2; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 24); + this.splitContainer1.Name = "splitContainer1"; // - // panel1 + // splitContainer1.Panel1 // - this.panel1.BackColor = System.Drawing.Color.Black; - this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.ForeColor = System.Drawing.Color.Black; - this.panel1.Location = new System.Drawing.Point(203, 144); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(35, 20); - this.panel1.TabIndex = 8; - this.panel1.Click += new System.EventHandler(this.panel1_Click); + this.splitContainer1.Panel1.Controls.Add(this.addLabel); // - // label1 + // splitContainer1.Panel2 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(139, 147); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(58, 13); - this.label1.TabIndex = 9; - this.label1.Text = "Text Color:"; + this.splitContainer1.Panel2.Controls.Add(this.designerPanel); + this.splitContainer1.Size = new System.Drawing.Size(758, 456); + this.splitContainer1.SplitterDistance = 252; + this.splitContainer1.TabIndex = 2; + // + // designerPanel + // + this.designerPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.designerPanel.Location = new System.Drawing.Point(0, 0); + this.designerPanel.Name = "designerPanel"; + this.designerPanel.Size = new System.Drawing.Size(502, 456); + this.designerPanel.TabIndex = 0; + this.designerPanel.Click += new System.EventHandler(this.designerPanel_Click); // // 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.designerPanel); + this.Controls.Add(this.splitContainer1); 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(); + this.addLabel.ResumeLayout(false); + this.addLabel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.yPosition)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xPosition)).EndInit(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -266,17 +295,18 @@ 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.Panel addLabel; 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 yPosition; private System.Windows.Forms.NumericUpDown xPosition; private System.Windows.Forms.TextBox labelContents; - private System.Windows.Forms.Panel designerPanel; private System.Windows.Forms.Label label1; private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.CheckBox checkBox2; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.Panel designerPanel; } } diff --git a/ShiftOS.WinForms/Applications/TriPresent.cs b/ShiftOS.WinForms/Applications/TriPresent.cs index d002329..dee7fda 100644 --- a/ShiftOS.WinForms/Applications/TriPresent.cs +++ b/ShiftOS.WinForms/Applications/TriPresent.cs @@ -9,6 +9,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using ShiftOS.Engine; +using System.Threading; namespace ShiftOS.WinForms.Applications { @@ -26,17 +27,18 @@ namespace ShiftOS.WinForms.Applications private void addLabelToolStripMenuItem_Click(object sender, EventArgs e) { addItemLabel.Text = "Add Label"; - AddItem.Show(); + addLabel.Show(); } private void button2_Click(object sender, EventArgs e) { - AddItem.Hide(); + addLabel.Hide(); } public void OnLoad() { - + panel1.ForeColor = Color.Black; + panel1.BackColor = Color.Black; } public void OnSkinLoad() @@ -56,15 +58,7 @@ namespace ShiftOS.WinForms.Applications private void placeAdd_Click(object sender, EventArgs e) { - Label label = new Label(); - label.Parent = designerPanel; - label.BackColor = Color.Transparent; - label.ForeColor = panel1.BackColor; - label.Text = labelContents.Text; - label.Location = new Point(Convert.ToInt32(xPosition.Value), Convert.ToInt32(yPosition.Value)); - label.Text = labelContents.Text; - Random rnd = new Random(); - label.Name = labelContents.Text + rnd.Next(0, 500); + } private void panel1_Click(object sender, EventArgs e) @@ -75,5 +69,19 @@ namespace ShiftOS.WinForms.Applications panel1.BackColor = col; }))); } + + private void designerPanel_Click(object sender, EventArgs e) + { + if (addLabel.Visible == true) + { + Label label = new Label(); + label.Parent = designerPanel; + label.BackColor = Color.Transparent; + label.ForeColor = panel1.BackColor; + label.Text = labelContents.Text; + label.Location = new Point(Cursor.Position.X / 3, Cursor.Position.Y); + label.Text = labelContents.Text; + } + } } } -- cgit v1.2.3 From 660c42a19c831b9768d7bb6845b22474459a311e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 23 May 2017 19:07:25 -0400 Subject: Disable TriPresent for Beta 2.5. --- ShiftOS.WinForms/Applications/TriPresent.cs | 6 +++++- ShiftOS.WinForms/Applications/TriSheet.cs | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'ShiftOS.WinForms/Applications/TriPresent.cs') diff --git a/ShiftOS.WinForms/Applications/TriPresent.cs b/ShiftOS.WinForms/Applications/TriPresent.cs index dee7fda..fc1d982 100644 --- a/ShiftOS.WinForms/Applications/TriPresent.cs +++ b/ShiftOS.WinForms/Applications/TriPresent.cs @@ -1,4 +1,6 @@ -using ShiftOS.Objects.ShiftFS; +#define BETA_2_5 + +using ShiftOS.Objects.ShiftFS; using System; using System.Collections.Generic; using System.ComponentModel; @@ -13,10 +15,12 @@ using System.Threading; namespace ShiftOS.WinForms.Applications { +#if !BETA_2_5 [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.", 2048, 1500, "file_skimmer", "Office")] [DefaultTitle("TriPresent")] [Launcher("TriPresent", false, null, "Office")] +#endif public partial class TriPresent : UserControl, IShiftOSWindow { public TriPresent() diff --git a/ShiftOS.WinForms/Applications/TriSheet.cs b/ShiftOS.WinForms/Applications/TriSheet.cs index 1013bc7..18b09b3 100644 --- a/ShiftOS.WinForms/Applications/TriSheet.cs +++ b/ShiftOS.WinForms/Applications/TriSheet.cs @@ -1,4 +1,6 @@ -using System; +#define BETA_2_5 + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; -- cgit v1.2.3