From 2d46e4e3f8ea571b0280dccfd34c72a526b6b997 Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Sat, 12 Dec 2020 22:54:34 +1300 Subject: [PATCH] [WIP] Adjusted the autoupdate location Also added a settings button. Still need to add a settings page exposing the settings. --- .gitignore | 1 + DisplayMagician/UIForms/MainForm.Designer.cs | 44 +++++++++++++------- DisplayMagician/UIForms/MainForm.cs | 4 +- DisplayMagician/UIForms/MainForm.resx | 43 +++++++++++++++---- 4 files changed, 67 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 90a9447..a222580 100644 --- a/.gitignore +++ b/.gitignore @@ -250,3 +250,4 @@ HeliosDisplayManagement.Setup/HeliosDisplayManagement.Setup/* /vs_community__1091181154.1584848614.exe /MigrationBackup /Notes +/DisplayMagician/Resources/settings.png diff --git a/DisplayMagician/UIForms/MainForm.Designer.cs b/DisplayMagician/UIForms/MainForm.Designer.cs index 403cd5b..2fb1565 100644 --- a/DisplayMagician/UIForms/MainForm.Designer.cs +++ b/DisplayMagician/UIForms/MainForm.Designer.cs @@ -31,8 +31,10 @@ this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.lbl_create_profile = new System.Windows.Forms.Label(); this.btn_setup_display_profiles = new System.Windows.Forms.Button(); this.pb_display_profile = new System.Windows.Forms.PictureBox(); + this.lbl_create_shortcut = new System.Windows.Forms.Label(); this.cb_minimise_notification_area = new System.Windows.Forms.CheckBox(); this.lbl_version = new System.Windows.Forms.Label(); this.btn_setup_game_shortcuts = new System.Windows.Forms.Button(); @@ -51,8 +53,7 @@ this.shortcutToolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.lbl_create_profile = new System.Windows.Forms.Label(); - this.lbl_create_shortcut = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -70,6 +71,7 @@ // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.button1); this.splitContainer1.Panel1.Controls.Add(this.lbl_create_profile); this.splitContainer1.Panel1.Controls.Add(this.btn_setup_display_profiles); this.splitContainer1.Panel1.Controls.Add(this.pb_display_profile); @@ -84,6 +86,14 @@ this.splitContainer1.Panel2.Controls.Add(this.pb_game_shortcut); this.splitContainer1.TabStop = false; // + // lbl_create_profile + // + resources.ApplyResources(this.lbl_create_profile, "lbl_create_profile"); + this.lbl_create_profile.BackColor = System.Drawing.Color.Brown; + this.lbl_create_profile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lbl_create_profile.ForeColor = System.Drawing.Color.White; + this.lbl_create_profile.Name = "lbl_create_profile"; + // // btn_setup_display_profiles // resources.ApplyResources(this.btn_setup_display_profiles, "btn_setup_display_profiles"); @@ -101,6 +111,14 @@ this.pb_display_profile.TabStop = false; this.pb_display_profile.Click += new System.EventHandler(this.pb_display_profile_Click); // + // lbl_create_shortcut + // + resources.ApplyResources(this.lbl_create_shortcut, "lbl_create_shortcut"); + this.lbl_create_shortcut.BackColor = System.Drawing.Color.Brown; + this.lbl_create_shortcut.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lbl_create_shortcut.ForeColor = System.Drawing.Color.White; + this.lbl_create_shortcut.Name = "lbl_create_shortcut"; + // // cb_minimise_notification_area // resources.ApplyResources(this.cb_minimise_notification_area, "cb_minimise_notification_area"); @@ -225,21 +243,14 @@ resources.ApplyResources(this.exitToolStripMenuItem, "exitToolStripMenuItem"); this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // - // lbl_create_profile + // button1 // - resources.ApplyResources(this.lbl_create_profile, "lbl_create_profile"); - this.lbl_create_profile.BackColor = System.Drawing.Color.Brown; - this.lbl_create_profile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.lbl_create_profile.ForeColor = System.Drawing.Color.White; - this.lbl_create_profile.Name = "lbl_create_profile"; - // - // lbl_create_shortcut - // - resources.ApplyResources(this.lbl_create_shortcut, "lbl_create_shortcut"); - this.lbl_create_shortcut.BackColor = System.Drawing.Color.Brown; - this.lbl_create_shortcut.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.lbl_create_shortcut.ForeColor = System.Drawing.Color.White; - this.lbl_create_shortcut.Name = "lbl_create_shortcut"; + this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.IndianRed; + this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Brown; + resources.ApplyResources(this.button1, "button1"); + this.button1.ForeColor = System.Drawing.Color.White; + this.button1.Name = "button1"; + this.button1.UseVisualStyleBackColor = true; // // MainForm // @@ -290,5 +301,6 @@ public System.Windows.Forms.NotifyIcon notifyIcon; private System.Windows.Forms.Label lbl_create_profile; private System.Windows.Forms.Label lbl_create_shortcut; + private System.Windows.Forms.Button button1; } } \ No newline at end of file diff --git a/DisplayMagician/UIForms/MainForm.cs b/DisplayMagician/UIForms/MainForm.cs index b2b1ba1..cb10b5c 100644 --- a/DisplayMagician/UIForms/MainForm.cs +++ b/DisplayMagician/UIForms/MainForm.cs @@ -125,8 +125,10 @@ namespace DisplayMagician.UIForms //SteamGame.GetAllInstalledGames(); EnableShortcutButtonIfProfiles(); + //Run the AutoUpdater to see if there are any updates available. AutoUpdater.CheckForUpdateEvent += AutoUpdaterOnCheckForUpdateEvent; - AutoUpdater.Start("http://rbsoft.org/updates/AutoUpdaterTest.json"); + AutoUpdater.ParseUpdateInfoEvent += AutoUpdaterOnParseUpdateInfoEvent; + AutoUpdater.Start("http://displaymagician.littlebitbig.com/updates/displaymagician.json"); } private void EnableShortcutButtonIfProfiles() diff --git a/DisplayMagician/UIForms/MainForm.resx b/DisplayMagician/UIForms/MainForm.resx index aea8696..d31e6c7 100644 --- a/DisplayMagician/UIForms/MainForm.resx +++ b/DisplayMagician/UIForms/MainForm.resx @@ -132,6 +132,33 @@ Horizontal + + Flat + + + 700, 8 + + + 75, 23 + + + 7 + + + Settings + + + button1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 0 + None @@ -163,7 +190,7 @@ splitContainer1.Panel1 - 0 + 1 None @@ -196,7 +223,7 @@ splitContainer1.Panel1 - 1 + 2 Fill @@ -10744,7 +10771,7 @@ splitContainer1.Panel1 - 2 + 3 splitContainer1.Panel1 @@ -10771,7 +10798,7 @@ NoControl - 220, 247 + 220, 249 343, 22 @@ -10810,7 +10837,7 @@ NoControl - 232, 355 + 232, 358 332, 20 @@ -10843,7 +10870,7 @@ Microsoft Sans Serif, 9.75pt - 12, 357 + 12, 360 25, 16 @@ -10879,7 +10906,7 @@ Microsoft Sans Serif, 21.75pt - 212, 174 + 212, 176 360, 50 @@ -10912,7 +10939,7 @@ NoControl - 700, 352 + 700, 353 75, 23