Created new Main Form to separate main tasks

It seemed to me that it would make more sense to
separate tht two main tasks completely and have them
independent from each other in the program. So I
created a new MainForm that opens up either a
'Setup Display Profiles' or 'Setup Game Shortcuts'
window depending on what the user clicks.
    The idea is that Display Profile setup only happens
when the app is first installed, and after that it's just
the game shortcut that gets updated.
    Also created a first attempt at a new HeliosPlus Icon.
This commit is contained in:
temacdonald
2020-05-03 20:39:35 +12:00
parent 205dcdf2c7
commit cc42c05bd7
23 changed files with 67665 additions and 911 deletions

View File

@ -1,7 +1,4 @@
using HeliosPlus.Resources;
using HeliosPlus.Shared.UserControls;
namespace HeliosPlus.UIForms
namespace HeliosPlus.UIForms
{
partial class MainForm
{
@ -31,267 +28,103 @@ namespace HeliosPlus.UIForms
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.btn_copy = new System.Windows.Forms.Button();
this.btn_apply = new System.Windows.Forms.Button();
this.btn_edit = new System.Windows.Forms.Button();
this.btn_cancel = new System.Windows.Forms.Button();
this.lbl_profile = new System.Windows.Forms.Label();
this.btn_delete = new System.Windows.Forms.Button();
this.dv_profile = new HeliosPlus.Shared.UserControls.DisplayView();
this.btn_shortcut = new System.Windows.Forms.Button();
this.menu_profiles = new System.Windows.Forms.ContextMenuStrip(this.components);
this.applyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.cloneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.lv_profiles = new System.Windows.Forms.ListView();
this.il_profiles = new System.Windows.Forms.ImageList(this.components);
this.lbl_version = new System.Windows.Forms.Label();
this.menu_profiles.SuspendLayout();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btn_setup_display_profiles = new System.Windows.Forms.Button();
this.pb_display_profile = new System.Windows.Forms.PictureBox();
this.btn_setup_game_shortcuts = new System.Windows.Forms.Button();
this.btn_exit = new System.Windows.Forms.Button();
this.pb_game_shortcut = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pb_display_profile)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pb_game_shortcut)).BeginInit();
this.SuspendLayout();
//
// btn_copy
// splitContainer1
//
this.btn_copy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_copy.Location = new System.Drawing.Point(367, 506);
this.btn_copy.Name = "btn_copy";
this.btn_copy.Size = new System.Drawing.Size(75, 23);
this.btn_copy.TabIndex = 6;
this.btn_copy.Text = "&Copy";
this.btn_copy.UseVisualStyleBackColor = true;
this.btn_copy.Click += new System.EventHandler(this.Copy_Click);
this.splitContainer1.BackColor = System.Drawing.Color.Black;
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.Name = "splitContainer1";
//
// btn_apply
// splitContainer1.Panel1
//
this.btn_apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_apply.Location = new System.Drawing.Point(610, 506);
this.btn_apply.Name = "btn_apply";
this.btn_apply.Size = new System.Drawing.Size(75, 23);
this.btn_apply.TabIndex = 9;
this.btn_apply.Text = global::HeliosPlus.Resources.Language.Apply;
this.btn_apply.UseVisualStyleBackColor = true;
this.btn_apply.Click += new System.EventHandler(this.Apply_Click);
this.splitContainer1.Panel1.Controls.Add(this.btn_setup_display_profiles);
this.splitContainer1.Panel1.Controls.Add(this.pb_display_profile);
//
// btn_edit
// splitContainer1.Panel2
//
this.btn_edit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_edit.Location = new System.Drawing.Point(529, 506);
this.btn_edit.Name = "btn_edit";
this.btn_edit.Size = new System.Drawing.Size(75, 23);
this.btn_edit.TabIndex = 8;
this.btn_edit.Text = global::HeliosPlus.Resources.Language.Edit;
this.btn_edit.UseVisualStyleBackColor = true;
this.btn_edit.Click += new System.EventHandler(this.Edit_Click);
this.splitContainer1.Panel2.Controls.Add(this.btn_setup_game_shortcuts);
this.splitContainer1.Panel2.Controls.Add(this.btn_exit);
this.splitContainer1.Panel2.Controls.Add(this.pb_game_shortcut);
this.splitContainer1.TabStop = false;
//
// btn_cancel
// btn_setup_display_profiles
//
this.btn_cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btn_cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btn_cancel.Location = new System.Drawing.Point(803, 506);
this.btn_cancel.Name = "btn_cancel";
this.btn_cancel.Size = new System.Drawing.Size(75, 23);
this.btn_cancel.TabIndex = 5;
this.btn_cancel.Text = "E&xit";
this.btn_cancel.UseVisualStyleBackColor = true;
this.btn_cancel.Click += new System.EventHandler(this.Exit_Click);
resources.ApplyResources(this.btn_setup_display_profiles, "btn_setup_display_profiles");
this.btn_setup_display_profiles.ForeColor = System.Drawing.Color.White;
this.btn_setup_display_profiles.Name = "btn_setup_display_profiles";
this.btn_setup_display_profiles.UseVisualStyleBackColor = true;
this.btn_setup_display_profiles.Click += new System.EventHandler(this.btn_setup_display_profiles_Click);
//
// lbl_profile
// pb_display_profile
//
this.lbl_profile.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(178)));
this.lbl_profile.Location = new System.Drawing.Point(262, 8);
this.lbl_profile.Name = "lbl_profile";
this.lbl_profile.Size = new System.Drawing.Size(382, 13);
this.lbl_profile.TabIndex = 3;
this.lbl_profile.Text = "[None]";
this.lbl_profile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
resources.ApplyResources(this.pb_display_profile, "pb_display_profile");
this.pb_display_profile.Name = "pb_display_profile";
this.pb_display_profile.TabStop = false;
this.pb_display_profile.Click += new System.EventHandler(this.pb_display_profile_Click);
//
// btn_delete
// btn_setup_game_shortcuts
//
this.btn_delete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_delete.Location = new System.Drawing.Point(448, 506);
this.btn_delete.Name = "btn_delete";
this.btn_delete.Size = new System.Drawing.Size(75, 23);
this.btn_delete.TabIndex = 7;
this.btn_delete.Text = global::HeliosPlus.Resources.Language.Delete;
this.btn_delete.UseVisualStyleBackColor = true;
this.btn_delete.Click += new System.EventHandler(this.Delete_Click);
resources.ApplyResources(this.btn_setup_game_shortcuts, "btn_setup_game_shortcuts");
this.btn_setup_game_shortcuts.ForeColor = System.Drawing.Color.Transparent;
this.btn_setup_game_shortcuts.Name = "btn_setup_game_shortcuts";
this.btn_setup_game_shortcuts.UseVisualStyleBackColor = true;
this.btn_setup_game_shortcuts.Click += new System.EventHandler(this.btn_setup_game_shortcuts_Click);
//
// dv_profile
// btn_exit
//
this.dv_profile.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.dv_profile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(174)))), ((int)(((byte)(184)))), ((int)(((byte)(196)))));
this.dv_profile.Font = new System.Drawing.Font("Consolas", 50F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dv_profile.ForeColor = System.Drawing.Color.MidnightBlue;
this.dv_profile.Location = new System.Drawing.Point(256, 18);
this.dv_profile.Margin = new System.Windows.Forms.Padding(18);
this.dv_profile.Name = "dv_profile";
this.dv_profile.PaddingX = 100;
this.dv_profile.PaddingY = 100;
this.dv_profile.Profile = null;
this.dv_profile.Size = new System.Drawing.Size(634, 482);
this.dv_profile.TabIndex = 4;
resources.ApplyResources(this.btn_exit, "btn_exit");
this.btn_exit.ForeColor = System.Drawing.Color.White;
this.btn_exit.Name = "btn_exit";
this.btn_exit.UseVisualStyleBackColor = true;
this.btn_exit.Click += new System.EventHandler(this.btn_exit_Click);
//
// btn_shortcut
// pb_game_shortcut
//
this.btn_shortcut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_shortcut.Location = new System.Drawing.Point(271, 506);
this.btn_shortcut.Name = "btn_shortcut";
this.btn_shortcut.Size = new System.Drawing.Size(90, 23);
this.btn_shortcut.TabIndex = 10;
this.btn_shortcut.Text = "Create &Shortcut";
this.btn_shortcut.UseVisualStyleBackColor = true;
this.btn_shortcut.Click += new System.EventHandler(this.CreateShortcut_Click);
//
// menu_profiles
//
this.menu_profiles.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.applyToolStripMenuItem,
this.toolStripMenuItem2,
this.cloneToolStripMenuItem,
this.createShortcutToolStripMenuItem,
this.editToolStripMenuItem,
this.deleteToolStripMenuItem});
this.menu_profiles.Name = "menu_profiles";
this.menu_profiles.Size = new System.Drawing.Size(157, 120);
//
// applyToolStripMenuItem
//
this.applyToolStripMenuItem.Name = "applyToolStripMenuItem";
this.applyToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.applyToolStripMenuItem.Text = global::HeliosPlus.Resources.Language.Apply;
this.applyToolStripMenuItem.Click += new System.EventHandler(this.Apply_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(153, 6);
//
// cloneToolStripMenuItem
//
this.cloneToolStripMenuItem.Name = "cloneToolStripMenuItem";
this.cloneToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.cloneToolStripMenuItem.Text = global::HeliosPlus.Resources.Language.Clone;
this.cloneToolStripMenuItem.Click += new System.EventHandler(this.Copy_Click);
//
// createShortcutToolStripMenuItem
//
this.createShortcutToolStripMenuItem.Name = "createShortcutToolStripMenuItem";
this.createShortcutToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.createShortcutToolStripMenuItem.Text = global::HeliosPlus.Resources.Language.Create_Shortcut;
this.createShortcutToolStripMenuItem.Click += new System.EventHandler(this.CreateShortcut_Click);
//
// editToolStripMenuItem
//
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.editToolStripMenuItem.Text = global::HeliosPlus.Resources.Language.Edit;
this.editToolStripMenuItem.Click += new System.EventHandler(this.Edit_Click);
//
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.deleteToolStripMenuItem.Text = global::HeliosPlus.Resources.Language.Delete;
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.Delete_Click);
//
// lv_profiles
//
this.lv_profiles.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lv_profiles.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(248)))), ((int)(((byte)(248)))));
this.lv_profiles.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lv_profiles.GridLines = true;
this.lv_profiles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.lv_profiles.HideSelection = false;
this.lv_profiles.LabelEdit = true;
this.lv_profiles.LargeImageList = this.il_profiles;
this.lv_profiles.Location = new System.Drawing.Point(-1, -1);
this.lv_profiles.MultiSelect = false;
this.lv_profiles.Name = "lv_profiles";
this.lv_profiles.Size = new System.Drawing.Size(254, 544);
this.lv_profiles.SmallImageList = this.il_profiles;
this.lv_profiles.TabIndex = 11;
this.lv_profiles.UseCompatibleStateImageBehavior = false;
this.lv_profiles.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.lv_profiles_AfterLabelEdit);
this.lv_profiles.BeforeLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.lv_profiles_BeforeLabelEdit);
this.lv_profiles.SelectedIndexChanged += new System.EventHandler(this.lv_profiles_SelectedIndexChanged);
this.lv_profiles.DoubleClick += new System.EventHandler(this.lv_profiles_DoubleClick);
this.lv_profiles.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lv_profiles_MouseUp);
//
// il_profiles
//
this.il_profiles.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.il_profiles.ImageSize = new System.Drawing.Size(48, 48);
this.il_profiles.TransparentColor = System.Drawing.Color.Transparent;
//
// lbl_version
//
this.lbl_version.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lbl_version.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(178)));
this.lbl_version.Location = new System.Drawing.Point(724, 8);
this.lbl_version.Name = "lbl_version";
this.lbl_version.Size = new System.Drawing.Size(157, 13);
this.lbl_version.TabIndex = 12;
this.lbl_version.Text = "v{0}";
this.lbl_version.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
resources.ApplyResources(this.pb_game_shortcut, "pb_game_shortcut");
this.pb_game_shortcut.Name = "pb_game_shortcut";
this.pb_game_shortcut.TabStop = false;
this.pb_game_shortcut.Click += new System.EventHandler(this.pb_game_shortcut_Click);
//
// MainForm
//
this.AcceptButton = this.btn_apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(174)))), ((int)(((byte)(184)))), ((int)(((byte)(196)))));
this.CancelButton = this.btn_cancel;
this.ClientSize = new System.Drawing.Size(893, 541);
this.Controls.Add(this.lbl_version);
this.Controls.Add(this.lv_profiles);
this.Controls.Add(this.btn_shortcut);
this.Controls.Add(this.btn_delete);
this.Controls.Add(this.lbl_profile);
this.Controls.Add(this.btn_cancel);
this.Controls.Add(this.btn_edit);
this.Controls.Add(this.btn_apply);
this.Controls.Add(this.dv_profile);
this.Controls.Add(this.btn_copy);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimumSize = new System.Drawing.Size(800, 400);
this.ControlBox = false;
this.Controls.Add(this.splitContainer1);
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "HeliosPlus";
this.Activated += new System.EventHandler(this.MainForm_Activated);
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Load += new System.EventHandler(this.MainForm_Load);
this.menu_profiles.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pb_display_profile)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pb_game_shortcut)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_copy;
private DisplayView dv_profile;
private System.Windows.Forms.Button btn_apply;
private System.Windows.Forms.Button btn_edit;
private System.Windows.Forms.Button btn_cancel;
private System.Windows.Forms.Label lbl_profile;
private System.Windows.Forms.Button btn_delete;
private System.Windows.Forms.Button btn_shortcut;
private System.Windows.Forms.ContextMenuStrip menu_profiles;
private System.Windows.Forms.ToolStripMenuItem cloneToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem applyToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem createShortcutToolStripMenuItem;
private System.Windows.Forms.ListView lv_profiles;
private System.Windows.Forms.ImageList il_profiles;
private System.Windows.Forms.Label lbl_version;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.PictureBox pb_display_profile;
private System.Windows.Forms.PictureBox pb_game_shortcut;
private System.Windows.Forms.Button btn_exit;
private System.Windows.Forms.Button btn_setup_display_profiles;
private System.Windows.Forms.Button btn_setup_game_shortcuts;
}
}
}