aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs
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/ShiftSoft.cs
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/ShiftSoft.cs')
-rw-r--r--ShiftOS.WinForms/ShiftnetSites/ShiftSoft.cs56
1 files changed, 56 insertions, 0 deletions
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.");
+ }
+ });
}
}
}