From fc55d4feecb64c2bae355cceac93bdac73fe00ea Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 5 Mar 2017 08:02:30 -0500 Subject: [PATCH] hang on, busy making a sad victor tran face --- ShiftOS.Objects/EngineShiftnetSubscription.cs | 17 ++++++ ShiftOS.Objects/ShiftOS.Objects.csproj | 1 + ShiftOS.WinForms/Applications/Downloader.cs | 10 ++++ .../Properties/Resources.Designer.cs | 60 ++++++++++++++----- ShiftOS.WinForms/Properties/Resources.resx | 3 + .../Resources/ShiftnetServices.txt | 20 +++++++ ShiftOS.WinForms/ShiftOS.WinForms.csproj | 1 + 7 files changed, 96 insertions(+), 16 deletions(-) create mode 100644 ShiftOS.Objects/EngineShiftnetSubscription.cs create mode 100644 ShiftOS.WinForms/Resources/ShiftnetServices.txt diff --git a/ShiftOS.Objects/EngineShiftnetSubscription.cs b/ShiftOS.Objects/EngineShiftnetSubscription.cs new file mode 100644 index 0000000..1296a98 --- /dev/null +++ b/ShiftOS.Objects/EngineShiftnetSubscription.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Objects +{ + public class EngineShiftnetSubscription + { + public string Name { get; set; } + public string Description { get; set; } + public int CostPerMonth { get; set; } + public int DownloadSpeed { get; set; } + public string Company { get; set; } + } +} diff --git a/ShiftOS.Objects/ShiftOS.Objects.csproj b/ShiftOS.Objects/ShiftOS.Objects.csproj index 484f9df..3dc0c33 100644 --- a/ShiftOS.Objects/ShiftOS.Objects.csproj +++ b/ShiftOS.Objects/ShiftOS.Objects.csproj @@ -46,6 +46,7 @@ + diff --git a/ShiftOS.WinForms/Applications/Downloader.cs b/ShiftOS.WinForms/Applications/Downloader.cs index b1b7ed9..48a5cfd 100644 --- a/ShiftOS.WinForms/Applications/Downloader.cs +++ b/ShiftOS.WinForms/Applications/Downloader.cs @@ -187,6 +187,16 @@ namespace ShiftOS.WinForms.Applications return 256; } + public static IEnumerable GetAllSubscriptions() + { + //For now we'll have them hard-coded into the client but in future they'll be in the MUD. + + foreach(var sub in JsonConvert.DeserializeObject(Properties.Resources.ShiftnetServices)) + { + yield return sub; + } + } + public static void StartDownload(Download down) { var t = new Thread(() => diff --git a/ShiftOS.WinForms/Properties/Resources.Designer.cs b/ShiftOS.WinForms/Properties/Resources.Designer.cs index 9262790..2df6f11 100644 --- a/ShiftOS.WinForms/Properties/Resources.Designer.cs +++ b/ShiftOS.WinForms/Properties/Resources.Designer.cs @@ -913,24 +913,52 @@ namespace ShiftOS.WinForms.Properties { /// /// Looks up a localized string similar to [ + /// { + /// Name: "Freebie Solutions", + /// DownloadSpeed: 256, + /// CostPerMonth: 0, + /// Description: "The Shiftnet is a wonderful place full of apps, games, websites and skins for ShiftOS. + /// + ///With Freebie Solutions from ShiftSoft, you'll be able to traverse the Shiftnet without any worry about monthly fees.", + /// Company: "ShiftSoft" + /// }, + /// { + /// Company: "" + /// }, + /// { + /// + /// }, + /// { + /// + /// }, + ///]. + /// + internal static string ShiftnetServices { + get { + return ResourceManager.GetString("ShiftnetServices", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + ///// SCREENSAVER + /// { + /// Name: "Screensavers", + /// Cost: 750, + /// Description: "Like to leave your PC idle for long periods of time? Save some energy and keep your screen from being tired by hiding the desktop behind a black screen with an image on it.", + /// Dependencies: "desktop" + /// }, + /// { + /// Name: "Shift Screensavers", + /// Cost: 100, + /// Description: "This Shifter upgrade will allow you to customize the screensaver.", + /// Dependencies: "screensavers;shifter" + /// }, + /// + /// ///// CALCULATOR UPGRADES /// { - /// Name: "Calculator", - /// Cost: 1000, - /// Dependencies: "wm_free_placement;desktop", - /// Description: "Crazy math problems getting you down? Well, this calculator will take care of that!" - /// }, - /// { - /// Name: "AL Calculator", - /// Cost: 150, - /// Dependencies: "calculator;app_launcher", - /// Description: "Add an App Launcher Entry for the Calculator!" - /// }, - /// { - /// Name: "Calc Equals Button", - /// Cost: 600, - /// Dependencies: "calculator", - /// Description: "Right now, you can only type numbers, [rest of string was truncated]";. + /// Name: "Calcul [rest of string was truncated]";. /// internal static string Shiftorium { get { diff --git a/ShiftOS.WinForms/Properties/Resources.resx b/ShiftOS.WinForms/Properties/Resources.resx index a5e2d4e..5100329 100644 --- a/ShiftOS.WinForms/Properties/Resources.resx +++ b/ShiftOS.WinForms/Properties/Resources.resx @@ -472,4 +472,7 @@ ..\Resources\SnakeyTailU.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ShiftnetServices.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/ShiftnetServices.txt b/ShiftOS.WinForms/Resources/ShiftnetServices.txt new file mode 100644 index 0000000..a396849 --- /dev/null +++ b/ShiftOS.WinForms/Resources/ShiftnetServices.txt @@ -0,0 +1,20 @@ +[ + { + Name: "Freebie Solutions", + DownloadSpeed: 256, + CostPerMonth: 0, + Description: "The Shiftnet is a wonderful place full of apps, games, websites and skins for ShiftOS. + +With Freebie Solutions from ShiftSoft, you'll be able to traverse the Shiftnet without any worry about monthly fees.", + Company: "ShiftSoft" + }, + { + Company: "" + }, + { + + }, + { + + }, +] \ No newline at end of file diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj index 9c39845..7d4f0d3 100644 --- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -565,6 +565,7 @@ +