From 909873af65113a5808e509741a3f37f849d425ca Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 6 Mar 2017 11:52:42 -0500 Subject: All client-side for paid subscriptions is done. --- ShiftOS.WinForms/WinformsDesktop.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ShiftOS.WinForms/WinformsDesktop.cs') diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs index 42fe2c2..4f3328b 100644 --- a/ShiftOS.WinForms/WinformsDesktop.cs +++ b/ShiftOS.WinForms/WinformsDesktop.cs @@ -138,6 +138,24 @@ namespace ShiftOS.WinForms } } + if(SaveSystem.CurrentSave != null) + { + if(SaveSystem.CurrentSave.LastMonthPaid != DateTime.Now.Month) + { + if(SaveSystem.CurrentSave.Codepoints >= DownloadManager.GetAllSubscriptions()[SaveSystem.CurrentSave.ShiftnetSubscription].CostPerMonth) + { + SaveSystem.CurrentSave.Codepoints -= DownloadManager.GetAllSubscriptions()[SaveSystem.CurrentSave.ShiftnetSubscription].CostPerMonth; + SaveSystem.CurrentSave.LastMonthPaid = DateTime.Now.Month; + } + else + { + SaveSystem.CurrentSave.ShiftnetSubscription = 0; + SaveSystem.CurrentSave.LastMonthPaid = DateTime.Now.Month; + Infobox.Show("Shiftnet", "You do not have enough Codepoints to pay for your Shiftnet subscription this month. You have been downgraded to the free plan."); + } + } + } + btnnotifications.Left = lbtime.Left - btnnotifications.Width - 2; btnnotifications.Top = (desktoppanel.Height - btnnotifications.Height) / 2; }; -- cgit v1.2.3