aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/ShiftnetSites
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-06-10 10:17:10 -0400
committerMichael <[email protected]>2017-06-10 10:17:15 -0400
commitc40d071d58859e25b3781299b949b91caa0548fe (patch)
treed26956e6a06336af403e05cfe0ace0e50ff1b6ea /ShiftOS.WinForms/ShiftnetSites
parent7dd109719be8a9e8b52655665f490f4f7956df80 (diff)
downloadshiftos_thereturn-c40d071d58859e25b3781299b949b91caa0548fe.tar.gz
shiftos_thereturn-c40d071d58859e25b3781299b949b91caa0548fe.tar.bz2
shiftos_thereturn-c40d071d58859e25b3781299b949b91caa0548fe.zip
main menu system + sandbox mode
Diffstat (limited to 'ShiftOS.WinForms/ShiftnetSites')
-rw-r--r--ShiftOS.WinForms/ShiftnetSites/ShiftSoft.Designer.cs188
-rw-r--r--ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs56
-rw-r--r--ShiftOS.WinForms/ShiftnetSites/ShiftSoft.resx10
3 files changed, 252 insertions, 2 deletions
diff --git a/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.Designer.cs b/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.Designer.cs
index a62b5a8..b3e408f 100644
--- a/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.Designer.cs
+++ b/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.Designer.cs
@@ -28,27 +28,198 @@
/// </summary>
private void InitializeComponent()
{
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShiftSoft));
this.label1 = new System.Windows.Forms.Label();
+ this.pnldivider = new System.Windows.Forms.Panel();
+ this.label2 = new System.Windows.Forms.Label();
+ this.flbuttons = new System.Windows.Forms.FlowLayoutPanel();
+ this.btnhome = new System.Windows.Forms.Button();
+ this.btnservices = new System.Windows.Forms.Button();
+ this.btnping = new System.Windows.Forms.Button();
+ this.pnlhome = new System.Windows.Forms.Panel();
+ this.lbwhere = new System.Windows.Forms.Label();
+ this.lbdesc = new System.Windows.Forms.Label();
+ this.pnlservices = new System.Windows.Forms.Panel();
+ this.lbfreebiedesc = new System.Windows.Forms.Label();
+ this.lbfreebie = new System.Windows.Forms.Label();
+ this.btnjoinfreebie = new System.Windows.Forms.Button();
+ this.flbuttons.SuspendLayout();
+ this.pnlhome.SuspendLayout();
+ this.pnlservices.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Franklin Gothic Heavy", 24.75F, System.Drawing.FontStyle.Italic);
- this.label1.Location = new System.Drawing.Point(13, 17);
+ this.label1.Location = new System.Drawing.Point(13, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(152, 38);
this.label1.TabIndex = 0;
this.label1.Tag = "keepfont";
this.label1.Text = "Shiftsoft";
//
+ // pnldivider
+ //
+ this.pnldivider.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.pnldivider.Location = new System.Drawing.Point(20, 71);
+ this.pnldivider.Name = "pnldivider";
+ this.pnldivider.Size = new System.Drawing.Size(654, 2);
+ this.pnldivider.TabIndex = 1;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(17, 46);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(163, 13);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "What do you want to shift today?";
+ //
+ // flbuttons
+ //
+ this.flbuttons.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.flbuttons.AutoSize = true;
+ this.flbuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.flbuttons.Controls.Add(this.btnhome);
+ this.flbuttons.Controls.Add(this.btnservices);
+ this.flbuttons.Controls.Add(this.btnping);
+ this.flbuttons.Location = new System.Drawing.Point(515, 17);
+ this.flbuttons.Name = "flbuttons";
+ this.flbuttons.Size = new System.Drawing.Size(159, 29);
+ this.flbuttons.TabIndex = 3;
+ //
+ // btnhome
+ //
+ this.btnhome.AutoSize = true;
+ this.btnhome.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.btnhome.Location = new System.Drawing.Point(3, 3);
+ this.btnhome.Name = "btnhome";
+ this.btnhome.Size = new System.Drawing.Size(45, 23);
+ this.btnhome.TabIndex = 0;
+ this.btnhome.Tag = "header3";
+ this.btnhome.Text = "Home";
+ this.btnhome.UseVisualStyleBackColor = true;
+ this.btnhome.Click += new System.EventHandler(this.btnhome_Click);
+ //
+ // btnservices
+ //
+ this.btnservices.AutoSize = true;
+ this.btnservices.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.btnservices.Location = new System.Drawing.Point(54, 3);
+ this.btnservices.Name = "btnservices";
+ this.btnservices.Size = new System.Drawing.Size(58, 23);
+ this.btnservices.TabIndex = 1;
+ this.btnservices.Tag = "header3";
+ this.btnservices.Text = "Services";
+ this.btnservices.UseVisualStyleBackColor = true;
+ this.btnservices.Click += new System.EventHandler(this.btnservices_Click);
+ //
+ // btnping
+ //
+ this.btnping.AutoSize = true;
+ this.btnping.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.btnping.Location = new System.Drawing.Point(118, 3);
+ this.btnping.Name = "btnping";
+ this.btnping.Size = new System.Drawing.Size(38, 23);
+ this.btnping.TabIndex = 2;
+ this.btnping.Tag = "header3";
+ this.btnping.Text = "Ping";
+ this.btnping.UseVisualStyleBackColor = true;
+ this.btnping.Click += new System.EventHandler(this.btnping_Click);
+ //
+ // pnlhome
+ //
+ this.pnlhome.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.pnlhome.Controls.Add(this.lbdesc);
+ this.pnlhome.Controls.Add(this.lbwhere);
+ this.pnlhome.Location = new System.Drawing.Point(20, 92);
+ this.pnlhome.Name = "pnlhome";
+ this.pnlhome.Size = new System.Drawing.Size(654, 271);
+ this.pnlhome.TabIndex = 4;
+ //
+ // lbwhere
+ //
+ this.lbwhere.AutoSize = true;
+ this.lbwhere.Location = new System.Drawing.Point(4, 4);
+ this.lbwhere.Name = "lbwhere";
+ this.lbwhere.Size = new System.Drawing.Size(169, 13);
+ this.lbwhere.TabIndex = 0;
+ this.lbwhere.Tag = "header2";
+ this.lbwhere.Text = "Where do you want to shift today?";
+ //
+ // lbdesc
+ //
+ this.lbdesc.Location = new System.Drawing.Point(4, 17);
+ this.lbdesc.Name = "lbdesc";
+ this.lbdesc.Size = new System.Drawing.Size(361, 160);
+ this.lbdesc.TabIndex = 1;
+ this.lbdesc.Text = resources.GetString("lbdesc.Text");
+ //
+ // pnlservices
+ //
+ this.pnlservices.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.pnlservices.Controls.Add(this.btnjoinfreebie);
+ this.pnlservices.Controls.Add(this.lbfreebiedesc);
+ this.pnlservices.Controls.Add(this.lbfreebie);
+ this.pnlservices.Location = new System.Drawing.Point(20, 92);
+ this.pnlservices.Name = "pnlservices";
+ this.pnlservices.Size = new System.Drawing.Size(654, 271);
+ this.pnlservices.TabIndex = 5;
+ //
+ // lbfreebiedesc
+ //
+ this.lbfreebiedesc.Location = new System.Drawing.Point(4, 17);
+ this.lbfreebiedesc.Name = "lbfreebiedesc";
+ this.lbfreebiedesc.Size = new System.Drawing.Size(361, 105);
+ this.lbfreebiedesc.TabIndex = 1;
+ this.lbfreebiedesc.Text = resources.GetString("lbfreebiedesc.Text");
+ //
+ // lbfreebie
+ //
+ this.lbfreebie.AutoSize = true;
+ this.lbfreebie.Location = new System.Drawing.Point(4, 4);
+ this.lbfreebie.Name = "lbfreebie";
+ this.lbfreebie.Size = new System.Drawing.Size(88, 13);
+ this.lbfreebie.TabIndex = 0;
+ this.lbfreebie.Tag = "header2";
+ this.lbfreebie.Text = "Freebie Solutions";
+ //
+ // btnjoinfreebie
+ //
+ this.btnjoinfreebie.AutoSize = true;
+ this.btnjoinfreebie.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.btnjoinfreebie.Location = new System.Drawing.Point(245, 125);
+ this.btnjoinfreebie.Name = "btnjoinfreebie";
+ this.btnjoinfreebie.Size = new System.Drawing.Size(120, 23);
+ this.btnjoinfreebie.TabIndex = 2;
+ this.btnjoinfreebie.Text = "Join Freebie Solutions";
+ this.btnjoinfreebie.UseVisualStyleBackColor = true;
+ this.btnjoinfreebie.Click += new System.EventHandler(this.btnjoinfreebie_Click);
+ //
// ShiftSoft
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.pnlservices);
+ this.Controls.Add(this.pnlhome);
+ this.Controls.Add(this.flbuttons);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.pnldivider);
this.Controls.Add(this.label1);
this.Name = "ShiftSoft";
- this.Size = new System.Drawing.Size(523, 384);
+ this.Size = new System.Drawing.Size(694, 384);
+ this.flbuttons.ResumeLayout(false);
+ this.flbuttons.PerformLayout();
+ this.pnlhome.ResumeLayout(false);
+ this.pnlhome.PerformLayout();
+ this.pnlservices.ResumeLayout(false);
+ this.pnlservices.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -57,5 +228,18 @@
#endregion
private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Panel pnldivider;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.FlowLayoutPanel flbuttons;
+ private System.Windows.Forms.Button btnhome;
+ private System.Windows.Forms.Button btnservices;
+ private System.Windows.Forms.Button btnping;
+ private System.Windows.Forms.Panel pnlhome;
+ private System.Windows.Forms.Label lbdesc;
+ private System.Windows.Forms.Label lbwhere;
+ private System.Windows.Forms.Panel pnlservices;
+ private System.Windows.Forms.Label lbfreebiedesc;
+ private System.Windows.Forms.Label lbfreebie;
+ private System.Windows.Forms.Button btnjoinfreebie;
}
}
diff --git a/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs b/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs
index 18968cd..0d84ecc 100644
--- a/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs
+++ b/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs
@@ -25,6 +25,18 @@ namespace ShiftOS.WinForms.ShiftnetSites
public void OnSkinLoad()
{
+ pnldivider.Tag = "keepbg";
+ pnldivider.BackColor = SkinEngine.LoadedSkin.ControlTextColor;
+ Tools.ControlManager.SetupControls(flbuttons);
+ Tools.ControlManager.SetupControls(pnlhome);
+ Tools.ControlManager.SetupControls(pnlservices);
+
+ lbfreebiedesc.Top = lbfreebie.Top + lbfreebie.Height + 5;
+ btnjoinfreebie.Top = lbfreebiedesc.Top + lbfreebiedesc.Height + 5;
+
+ SetupFreebieUI();
+
+ lbdesc.Top = lbwhere.Top + lbwhere.Height + 5;
}
public void OnUpgrade()
@@ -33,6 +45,50 @@ namespace ShiftOS.WinForms.ShiftnetSites
public void Setup()
{
+ pnlhome.BringToFront();
+ }
+
+ private void btnping_Click(object sender, EventArgs e)
+ {
+ GoToUrl?.Invoke("shiftnet/shiftsoft/ping");
+ }
+
+ private void btnhome_Click(object sender, EventArgs e)
+ {
+ pnlhome.BringToFront();
+ }
+
+ private void btnservices_Click(object sender, EventArgs e)
+ {
+ pnlservices.BringToFront();
+ SetupFreebieUI();
+ }
+
+ public void SetupFreebieUI()
+ {
+ if(SaveSystem.CurrentSave.ShiftnetSubscription == 0)
+ {
+ btnjoinfreebie.Enabled = false;
+ btnjoinfreebie.Text = "You are already subscribed to Freebie Solutions.";
+ }
+ else
+ {
+ btnjoinfreebie.Enabled = true;
+ btnjoinfreebie.Text = "Join Freebie Solutions";
+ }
+ btnjoinfreebie.Left = (lbfreebiedesc.Left + lbfreebiedesc.Width) - btnjoinfreebie.Width;
+ }
+
+ private void btnjoinfreebie_Click(object sender, EventArgs e)
+ {
+ Infobox.PromptYesNo("Switch providers", "Would you like to switch from your current Shiftnet provider, " + Applications.DownloadManager.GetAllSubscriptions()[SaveSystem.CurrentSave.ShiftnetSubscription].Name + ", to Freebie Solutions by ShiftSoft?", (res) =>
+ {
+ if(res == true)
+ {
+ SaveSystem.CurrentSave.ShiftnetSubscription = 0;
+ Infobox.Show("Switch providers", "The operation has completed successfully.");
+ }
+ });
}
}
}
diff --git a/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.resx b/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.resx
index 1af7de1..cd314f0 100644
--- a/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.resx
+++ b/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.resx
@@ -117,4 +117,14 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <data name="lbdesc.Text" xml:space="preserve">
+ <value>Welcome to ShiftSoft. We understand the troubles of being locked within a digital society. For some, it's a prison. For others, it's all they know. It's what life means for them.
+
+But for us, it's a safe-haven. We may all be locked within an evolving operating system with no possibility of escaping, but we can at least develop ways of improving life within this binary world, and that's what we at ShiftSoft are doing.</value>
+ </data>
+ <data name="lbfreebiedesc.Text" xml:space="preserve">
+ <value>The Shiftnet is a wonderful place full of apps, utilities, enhancements and much more for ShiftOS, but it comes at a cost.
+
+Freebie Solutions takes that cost away. You get free Shiftnet usage, but are locked to sites listed on Ping and you are limited to 256 byte-per-second downloads. Perfect for those situations where Codepoints and shiftnet connectivity are a needed resource.</value>
+ </data>
</root> \ No newline at end of file