From 2302074408b961b36e777b184e2e86df83722f48 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 29 Mar 2020 15:28:38 +0100 Subject: [PATCH] WIP: ui ideas --- LinearAppLauncher.csproj | 27 ++- MainForm.Designer.cs | 229 +++++++++++++++++----- MainForm.cs | 23 +++ Properties/Resources.Designer.cs | 54 ++++- Properties/Resources.resx | 19 +- Resources/arrow-right-ea-16.png | Bin 0 -> 285 bytes Resources/chrome-ea-32.png | Bin 0 -> 1364 bytes Resources/{grid-ea.png => grid-ea-24.png} | Bin Resources/mail-ea-32.png | Bin 0 -> 789 bytes Resources/raw/arrow-down.svg | 1 + Resources/raw/arrow-right.svg | 75 +++++++ Resources/raw/toggle-left.svg | 78 ++++++++ Resources/raw/toggle-right.svg | 77 ++++++++ Resources/toggle-left-ea-16.png | Bin 0 -> 429 bytes Resources/toggle-right-ea-16.png | Bin 0 -> 439 bytes Windows/Forms/HeadingPanel.Designer.cs | 52 ++--- Windows/Forms/HeadingPanel.cs | 62 ++---- Windows/Forms/HeadingPanel.resx | 9 - Windows/Forms/TitlePanel.Designer.cs | 87 ++++++++ Windows/Forms/TitlePanel.cs | 75 +++++++ Windows/Forms/TitlePanel.resx | 120 ++++++++++++ 21 files changed, 853 insertions(+), 135 deletions(-) create mode 100644 Resources/arrow-right-ea-16.png create mode 100644 Resources/chrome-ea-32.png rename Resources/{grid-ea.png => grid-ea-24.png} (100%) create mode 100644 Resources/mail-ea-32.png create mode 100644 Resources/raw/arrow-down.svg create mode 100644 Resources/raw/arrow-right.svg create mode 100644 Resources/raw/toggle-left.svg create mode 100644 Resources/raw/toggle-right.svg create mode 100644 Resources/toggle-left-ea-16.png create mode 100644 Resources/toggle-right-ea-16.png create mode 100644 Windows/Forms/TitlePanel.Designer.cs create mode 100644 Windows/Forms/TitlePanel.cs create mode 100644 Windows/Forms/TitlePanel.resx diff --git a/LinearAppLauncher.csproj b/LinearAppLauncher.csproj index 0c8e3c8..070d176 100644 --- a/LinearAppLauncher.csproj +++ b/LinearAppLauncher.csproj @@ -66,6 +66,12 @@ HeadingPanel.cs + + UserControl + + + TitlePanel.cs + MainForm.cs @@ -82,6 +88,9 @@ HeadingPanel.cs + + TitlePanel.cs + SettingsSingleFileGenerator Settings.Designer.cs @@ -93,8 +102,22 @@ - + + + + + + + + + + + + + + + + - \ No newline at end of file diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index ebf74c2..44f4a6a 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -30,53 +30,54 @@ { this.button1 = new System.Windows.Forms.Button(); this.richTextBox1 = new System.Windows.Forms.RichTextBox(); - this.panel1 = new System.Windows.Forms.Panel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.panel2 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); - this.panel4 = new System.Windows.Forms.Panel(); this.panel5 = new System.Windows.Forms.Panel(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.titlePanel1 = new AppLauncher.Windows.Forms.TitlePanel(); this.headingPanel1 = new AppLauncher.Windows.Forms.HeadingPanel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.panel6 = new System.Windows.Forms.Panel(); + this.panel7 = new System.Windows.Forms.Panel(); + this.panel8 = new System.Windows.Forms.Panel(); + this.panel9 = new System.Windows.Forms.Panel(); + this.panel10 = new System.Windows.Forms.Panel(); + this.panel11 = new System.Windows.Forms.Panel(); + this.panel12 = new System.Windows.Forms.Panel(); + this.panel13 = new System.Windows.Forms.Panel(); + this.panel14 = new System.Windows.Forms.Panel(); + this.panel15 = new System.Windows.Forms.Panel(); + this.panel1 = new System.Windows.Forms.Panel(); this.flowLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // button1 // - this.button1.Location = new System.Drawing.Point(12, 171); + this.button1.Location = new System.Drawing.Point(12, 359); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(120, 40); + this.button1.Size = new System.Drawing.Size(78, 40); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); // // richTextBox1 // - this.richTextBox1.Location = new System.Drawing.Point(12, 217); + this.richTextBox1.Location = new System.Drawing.Point(573, 340); this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.Size = new System.Drawing.Size(215, 211); + this.richTextBox1.Size = new System.Drawing.Size(215, 88); this.richTextBox1.TabIndex = 2; this.richTextBox1.Text = ""; // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.LightGray; - this.panel1.Location = new System.Drawing.Point(157, 130); - this.panel1.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(70, 70); - this.panel1.TabIndex = 3; - // // flowLayoutPanel1 // this.flowLayoutPanel1.Controls.Add(this.panel2); this.flowLayoutPanel1.Controls.Add(this.panel3); - this.flowLayoutPanel1.Controls.Add(this.panel4); this.flowLayoutPanel1.Controls.Add(this.panel5); this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flowLayoutPanel1.Location = new System.Drawing.Point(261, 143); + this.flowLayoutPanel1.Location = new System.Drawing.Point(557, 130); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(231, 238); + this.flowLayoutPanel1.Size = new System.Drawing.Size(231, 204); this.flowLayoutPanel1.TabIndex = 6; // // panel2 @@ -97,15 +98,6 @@ this.panel3.Size = new System.Drawing.Size(70, 70); this.panel3.TabIndex = 5; // - // panel4 - // - this.panel4.BackColor = System.Drawing.Color.LightGray; - this.panel4.Location = new System.Drawing.Point(3, 149); - this.panel4.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(70, 70); - this.panel4.TabIndex = 6; - // // panel5 // this.panel5.BackColor = System.Drawing.Color.LightGray; @@ -115,28 +107,148 @@ this.panel5.Size = new System.Drawing.Size(70, 70); this.panel5.TabIndex = 7; // - // tableLayoutPanel1 + // titlePanel1 // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Location = new System.Drawing.Point(535, 143); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 2; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(209, 247); - this.tableLayoutPanel1.TabIndex = 7; + this.titlePanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.titlePanel1.Location = new System.Drawing.Point(0, 0); + this.titlePanel1.MinimumSize = new System.Drawing.Size(40, 40); + this.titlePanel1.Name = "titlePanel1"; + this.titlePanel1.Size = new System.Drawing.Size(800, 40); + this.titlePanel1.TabIndex = 8; + this.titlePanel1.TitleText = "Launcher"; // // headingPanel1 // - this.headingPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.headingPanel1.Location = new System.Drawing.Point(0, 0); - this.headingPanel1.MinimumSize = new System.Drawing.Size(40, 40); + this.headingPanel1.Checked = false; + this.headingPanel1.Location = new System.Drawing.Point(12, 64); + this.headingPanel1.MinimumSize = new System.Drawing.Size(100, 20); this.headingPanel1.Name = "headingPanel1"; - this.headingPanel1.Size = new System.Drawing.Size(800, 40); - this.headingPanel1.TabIndex = 8; + this.headingPanel1.Size = new System.Drawing.Size(600, 20); + this.headingPanel1.TabIndex = 9; + this.headingPanel1.TitleText = "Featured"; + // + // panel4 + // + this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel4.BackgroundImage = global::AppLauncher.Properties.Resources.mail_ea_32; + this.panel4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel4.Location = new System.Drawing.Point(87, 90); + this.panel4.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(70, 70); + this.panel4.TabIndex = 10; + // + // panel6 + // + this.panel6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel6.Location = new System.Drawing.Point(233, 90); + this.panel6.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(70, 70); + this.panel6.TabIndex = 12; + // + // panel7 + // + this.panel7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel7.Location = new System.Drawing.Point(160, 90); + this.panel7.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(70, 70); + this.panel7.TabIndex = 11; + // + // panel8 + // + this.panel8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel8.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel8.Location = new System.Drawing.Point(233, 163); + this.panel8.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(70, 70); + this.panel8.TabIndex = 16; + // + // panel9 + // + this.panel9.BackColor = System.Drawing.Color.White; + this.panel9.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel9.Location = new System.Drawing.Point(160, 163); + this.panel9.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel9.Name = "panel9"; + this.panel9.Size = new System.Drawing.Size(70, 70); + this.panel9.TabIndex = 15; + // + // panel10 + // + this.panel10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel10.Location = new System.Drawing.Point(87, 163); + this.panel10.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel10.Name = "panel10"; + this.panel10.Size = new System.Drawing.Size(70, 70); + this.panel10.TabIndex = 14; + // + // panel11 + // + this.panel11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel11.Location = new System.Drawing.Point(14, 163); + this.panel11.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel11.Name = "panel11"; + this.panel11.Size = new System.Drawing.Size(70, 70); + this.panel11.TabIndex = 13; + // + // panel12 + // + this.panel12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel12.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel12.Location = new System.Drawing.Point(233, 236); + this.panel12.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel12.Name = "panel12"; + this.panel12.Size = new System.Drawing.Size(70, 70); + this.panel12.TabIndex = 20; + // + // panel13 + // + this.panel13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel13.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel13.Location = new System.Drawing.Point(160, 236); + this.panel13.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel13.Name = "panel13"; + this.panel13.Size = new System.Drawing.Size(70, 70); + this.panel13.TabIndex = 19; + // + // panel14 + // + this.panel14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel14.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel14.Location = new System.Drawing.Point(87, 236); + this.panel14.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel14.Name = "panel14"; + this.panel14.Size = new System.Drawing.Size(70, 70); + this.panel14.TabIndex = 18; + // + // panel15 + // + this.panel15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel15.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel15.Location = new System.Drawing.Point(14, 236); + this.panel15.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel15.Name = "panel15"; + this.panel15.Size = new System.Drawing.Size(70, 70); + this.panel15.TabIndex = 17; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68))))); + this.panel1.BackgroundImage = global::AppLauncher.Properties.Resources.chrome_ea_32; + this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.panel1.Location = new System.Drawing.Point(14, 90); + this.panel1.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(70, 70); + this.panel1.TabIndex = 3; // // MainForm // @@ -145,8 +257,19 @@ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(83)))), ((int)(((byte)(93))))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(800, 440); + this.Controls.Add(this.panel12); + this.Controls.Add(this.panel13); + this.Controls.Add(this.panel14); + this.Controls.Add(this.panel15); + this.Controls.Add(this.panel8); + this.Controls.Add(this.panel9); + this.Controls.Add(this.panel10); + this.Controls.Add(this.panel11); + this.Controls.Add(this.panel6); + this.Controls.Add(this.panel7); + this.Controls.Add(this.panel4); this.Controls.Add(this.headingPanel1); - this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.titlePanel1); this.Controls.Add(this.flowLayoutPanel1); this.Controls.Add(this.panel1); this.Controls.Add(this.richTextBox1); @@ -166,10 +289,20 @@ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.Panel panel4; private System.Windows.Forms.Panel panel5; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private Windows.Forms.TitlePanel titlePanel1; private Windows.Forms.HeadingPanel headingPanel1; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Panel panel9; + private System.Windows.Forms.Panel panel10; + private System.Windows.Forms.Panel panel11; + private System.Windows.Forms.Panel panel12; + private System.Windows.Forms.Panel panel13; + private System.Windows.Forms.Panel panel14; + private System.Windows.Forms.Panel panel15; } } diff --git a/MainForm.cs b/MainForm.cs index 294476c..a06fa49 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -23,6 +23,29 @@ namespace AppLauncher } + private void button1_Click(object sender, EventArgs e) + { + if (this.Width > 40) + { + while (this.Width > 40) + { + this.Width -= 6; + + Application.DoEvents(); + } + } + else + { + while (this.Width < 800) + { + this.Width += 8; + + Application.DoEvents(); + } + } + + } + diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 9aaf4aa..99e37e7 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -63,9 +63,59 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap grid_ea { + internal static System.Drawing.Bitmap arrow_right_ea_16 { get { - object obj = ResourceManager.GetObject("grid_ea", resourceCulture); + object obj = ResourceManager.GetObject("arrow_right_ea_16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap chrome_ea_32 { + get { + object obj = ResourceManager.GetObject("chrome_ea_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap grid_ea_24 { + get { + object obj = ResourceManager.GetObject("grid_ea_24", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap mail_ea_32 { + get { + object obj = ResourceManager.GetObject("mail_ea_32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap toggle_left_ea_16 { + get { + object obj = ResourceManager.GetObject("toggle_left_ea_16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap toggle_right_ea_16 { + get { + object obj = ResourceManager.GetObject("toggle_right_ea_16", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } diff --git a/Properties/Resources.resx b/Properties/Resources.resx index c516ffd..5700ad4 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -118,7 +118,22 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\grid-ea.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\arrow-right-ea-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\chrome-ea-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\grid-ea-24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\mail-ea-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\toggle-left-ea-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\toggle-right-ea-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/Resources/arrow-right-ea-16.png b/Resources/arrow-right-ea-16.png new file mode 100644 index 0000000000000000000000000000000000000000..0eeb39d3b91d980dbaa3ccd7d0d895228ac18b2e GIT binary patch literal 285 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 TuKs*000000NkvXXu0mjf2MlOE literal 0 HcmV?d00001 diff --git a/Resources/raw/arrow-down.svg b/Resources/raw/arrow-down.svg new file mode 100644 index 0000000..4f84f62 --- /dev/null +++ b/Resources/raw/arrow-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/raw/arrow-right.svg b/Resources/raw/arrow-right.svg new file mode 100644 index 0000000..f746daf --- /dev/null +++ b/Resources/raw/arrow-right.svg @@ -0,0 +1,75 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/Resources/raw/toggle-left.svg b/Resources/raw/toggle-left.svg new file mode 100644 index 0000000..51ef76e --- /dev/null +++ b/Resources/raw/toggle-left.svg @@ -0,0 +1,78 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/Resources/raw/toggle-right.svg b/Resources/raw/toggle-right.svg new file mode 100644 index 0000000..788c511 --- /dev/null +++ b/Resources/raw/toggle-right.svg @@ -0,0 +1,77 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/Resources/toggle-left-ea-16.png b/Resources/toggle-left-ea-16.png new file mode 100644 index 0000000000000000000000000000000000000000..94a71376bf0e3865665b76ab2413fe2af00ae2f0 GIT binary patch literal 429 zcmV;e0aE^nP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGma{vGma{-JZxd#9M0YXVcK~y+T)seqS z!%!5)?~Q{mki=|0g6LwaR8R^IQV^k!P+cwU(y30JBIqbM_yAqhqR_1f8U*PJ_yGAg zyP5bqY3-0i_kQr@oco=>_eL#0^xUc-2&!7^4(=YbGO>sVPLd?KbR5SMA!`stQ9Dgj z7x$hfLlQ#K^Dqp<#x%)okk_>=>q;}Z&S6ZTg>V;!;W3HpoF|+=q%aQ#wrFxgUR_f# zrooqKnkNLFi0{BpxPg8~lUpgugSrRIs==oMM+jByA?xqjw!MWvU`iib3YtG+D$?LD zEFSnjNCS_l4W_=~KXb2FwwdDh-~}v&JS4_baU35|kjx)ug-4aQXrpb;Qi~vdO8gtU z|N9%yDR#Nnh;4>QzUU=zV3WKfY=^C{7x(mif1CBYxHY(ziA6}`7xG;G+WSmeawzo! XGBt~P2{4ga00000NkvXXu0mjf+v~F2 literal 0 HcmV?d00001 diff --git a/Resources/toggle-right-ea-16.png b/Resources/toggle-right-ea-16.png new file mode 100644 index 0000000000000000000000000000000000000000..b8ae67e3f6f54c1ea363b98a10a9285e3a2541b6 GIT binary patch literal 439 zcmV;o0Z9IdP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGma{vGma{-JZxd#9M0Zd6mK~y+T)sj6< z!$1&)celv}Y~urPf>20CTM8OSG1QAiBL!>Y?h$GPX zuTB@6Z`TPDu_fv}>1D>VZ{BRi7RwJgiz14m4Jl=pbQ{{HSVjV0vn;!DT{qALV~`}t zS)S)U=@TY>1hK9!LMi1C+GtzodbVxfN+vgX7;(^X9Ouy}7r=luLIdM(G=nrvk1=_` zuqop>9$_%S?XZyl1+xr9iFrB zBN~<73q4cf&ipl=a^N#z$Zh(RLS3(b3)|@SiCu1T_xmA*VYtp~>5*>16;muj8^59R hEz9~SN=ptQegMg1m4cRs@{j-k002ovPDHLkV1f@PuP^`r literal 0 HcmV?d00001 diff --git a/Windows/Forms/HeadingPanel.Designer.cs b/Windows/Forms/HeadingPanel.Designer.cs index bd97db2..3cc838b 100644 --- a/Windows/Forms/HeadingPanel.Designer.cs +++ b/Windows/Forms/HeadingPanel.Designer.cs @@ -28,53 +28,53 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HeadingPanel)); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label1 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // - // pictureBox1 - // - this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.pictureBox1.BackColor = System.Drawing.Color.Transparent; - this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage"))); - this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.pictureBox1.ErrorImage = null; - this.pictureBox1.InitialImage = null; - this.pictureBox1.Location = new System.Drawing.Point(0, 0); - this.pictureBox1.Margin = new System.Windows.Forms.Padding(0); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(40, 40); - this.pictureBox1.TabIndex = 5; - this.pictureBox1.TabStop = false; - // // label1 // this.label1.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.label1.BackColor = System.Drawing.Color.Transparent; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))); - this.label1.Location = new System.Drawing.Point(50, 0); + this.label1.Location = new System.Drawing.Point(25, 0); this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.MinimumSize = new System.Drawing.Size(20, 20); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(647, 40); - this.label1.TabIndex = 6; - this.label1.Text = "Launcher"; + this.label1.Size = new System.Drawing.Size(575, 20); + this.label1.TabIndex = 8; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pictureBox1.ErrorImage = null; + this.pictureBox1.InitialImage = null; + this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(0); + this.pictureBox1.MaximumSize = new System.Drawing.Size(20, 20); + this.pictureBox1.MinimumSize = new System.Drawing.Size(20, 20); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(20, 20); + this.pictureBox1.TabIndex = 7; + this.pictureBox1.TabStop = false; + // // HeadingPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.label1); this.Controls.Add(this.pictureBox1); - this.MinimumSize = new System.Drawing.Size(40, 40); + this.MinimumSize = new System.Drawing.Size(100, 20); this.Name = "HeadingPanel"; - this.Size = new System.Drawing.Size(697, 40); + this.Size = new System.Drawing.Size(600, 20); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); @@ -82,7 +82,7 @@ #endregion - private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label label1; + private System.Windows.Forms.PictureBox pictureBox1; } } diff --git a/Windows/Forms/HeadingPanel.cs b/Windows/Forms/HeadingPanel.cs index 174b687..85e200b 100644 --- a/Windows/Forms/HeadingPanel.cs +++ b/Windows/Forms/HeadingPanel.cs @@ -1,66 +1,36 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.ComponentModel; using System.Windows.Forms; namespace AppLauncher.Windows.Forms { public partial class HeadingPanel : UserControl { - private bool windowDragging = false; - private Point windowOffset = new Point(); + protected bool isChecked = false; public HeadingPanel() { InitializeComponent(); + + this.Checked = false; } - protected override void OnParentBindingContextChanged(EventArgs e) + [Category("Appearance"), Browsable(true)] + public string TitleText { - base.OnParentBindingContextChanged(e); + get => label1.Text; + set => label1.Text = value; + } - if (this.Parent != null) + [Category("Appearance"), Browsable(true)] + public bool Checked + { + get => isChecked; + set { - if (this.Parent.GetType() == typeof(MainForm)) - { - pictureBox1.MouseDown += parentForm_MouseDown; - pictureBox1.MouseUp += parentForm_MouseUp; - pictureBox1.MouseMove += parentForm_MouseMove; - } - } - } + isChecked = value; - protected void parentForm_MouseDown(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - { - return; - } + pictureBox1.BackgroundImage = (value) ? Properties.Resources.toggle_right_ea_16 : Properties.Resources.toggle_left_ea_16; - windowDragging = true; - windowOffset = e.Location; - } - - protected void parentForm_MouseUp(object sender, MouseEventArgs e) - { - windowDragging = false; - } - - protected void parentForm_MouseMove(object sender, MouseEventArgs e) - { - if (windowDragging) - { - Point pos = this.PointToScreen(e.Location); - - int y = Math.Max((pos.Y - windowOffset.Y), Screen.PrimaryScreen.WorkingArea.Y); - y = Math.Min(y, (Screen.PrimaryScreen.WorkingArea.Y + Screen.PrimaryScreen.WorkingArea.Height) - this.Height); - - this.Parent.Location = new Point(Screen.PrimaryScreen.WorkingArea.X, y); } } diff --git a/Windows/Forms/HeadingPanel.resx b/Windows/Forms/HeadingPanel.resx index 04cf4c4..1af7de1 100644 --- a/Windows/Forms/HeadingPanel.resx +++ b/Windows/Forms/HeadingPanel.resx @@ -117,13 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cwAAEnMBjCK5BwAAAHNJREFUSEvtlLENgDAMBL3/WtkmS4ARzhcmsXQFBSgnfZO/F0pB7D/03pvnKNJC - Ra6YSI+EilyxLJzcEVeQEXEFGRFXkBFxBRkRV4yiSqjIFX747n/wfa5rpWvm7Kdif+Bm2ZERccUoqoSK - XOGH+6mYYHYCNMlBzlYWbSwAAAAASUVORK5CYII= - - \ No newline at end of file diff --git a/Windows/Forms/TitlePanel.Designer.cs b/Windows/Forms/TitlePanel.Designer.cs new file mode 100644 index 0000000..213940b --- /dev/null +++ b/Windows/Forms/TitlePanel.Designer.cs @@ -0,0 +1,87 @@ +namespace AppLauncher.Windows.Forms +{ + partial class TitlePanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.BackgroundImage = global::AppLauncher.Properties.Resources.grid_ea_24; + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pictureBox1.ErrorImage = null; + this.pictureBox1.InitialImage = null; + this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(40, 40); + this.pictureBox1.TabIndex = 5; + this.pictureBox1.TabStop = false; + // + // label1 + // + this.label1.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.label1.BackColor = System.Drawing.Color.Black; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))); + this.label1.Location = new System.Drawing.Point(40, 0); + this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.label1.Size = new System.Drawing.Size(657, 40); + this.label1.TabIndex = 6; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // TitlePanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label1); + this.Controls.Add(this.pictureBox1); + this.MinimumSize = new System.Drawing.Size(40, 40); + this.Name = "TitlePanel"; + this.Size = new System.Drawing.Size(697, 40); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label label1; + } +} diff --git a/Windows/Forms/TitlePanel.cs b/Windows/Forms/TitlePanel.cs new file mode 100644 index 0000000..665a72d --- /dev/null +++ b/Windows/Forms/TitlePanel.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AppLauncher.Windows.Forms +{ + public partial class TitlePanel : UserControl + { + private bool windowDragging = false; + private Point windowOffset = new Point(); + + public TitlePanel() + { + InitializeComponent(); + } + + protected override void OnParentBindingContextChanged(EventArgs e) + { + base.OnParentBindingContextChanged(e); + + if (this.Parent != null) + { + if (this.Parent.GetType() == typeof(MainForm)) + { + pictureBox1.MouseDown += parentForm_MouseDown; + pictureBox1.MouseUp += parentForm_MouseUp; + pictureBox1.MouseMove += parentForm_MouseMove; + } + } + } + + [Category("Appearance"), Browsable(true)] + public string TitleText + { + get => label1.Text; + set => label1.Text = value; + } + + protected void parentForm_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + { + return; + } + + windowDragging = true; + windowOffset = e.Location; + } + + protected void parentForm_MouseUp(object sender, MouseEventArgs e) + { + windowDragging = false; + } + + protected void parentForm_MouseMove(object sender, MouseEventArgs e) + { + if (windowDragging) + { + Point pos = this.PointToScreen(e.Location); + + int y = Math.Max((pos.Y - windowOffset.Y), Screen.PrimaryScreen.WorkingArea.Y); + y = Math.Min(y, (Screen.PrimaryScreen.WorkingArea.Y + Screen.PrimaryScreen.WorkingArea.Height) - this.Height); + + this.Parent.Location = new Point(Screen.PrimaryScreen.WorkingArea.X, y); + } + } + + } +} diff --git a/Windows/Forms/TitlePanel.resx b/Windows/Forms/TitlePanel.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Windows/Forms/TitlePanel.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file