Added app setting for toggle toolbar

This commit is contained in:
Ray 2021-11-15 23:06:55 +00:00
parent 17bd46c9cd
commit a1777634fd
3 changed files with 49 additions and 9 deletions

View File

@ -915,6 +915,8 @@ namespace FizzyLauncher
this.Location = Screen.PrimaryScreen.WorkingArea.Location;
}
toolStrip1.Visible = CurrentSession.ShowToolbar;
this.TopMost = CurrentSession.AlwaysOnTop;
}

View File

@ -20,5 +20,7 @@
public bool IgnoreSSL { get; set; } = false;
public bool ShowToolbar { get; set; } = false;
}
}

View File

@ -21,6 +21,8 @@ namespace FizzyLauncher
private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator2;
private TYesNoPickerBox pickerBox4;
private Label label2;
private TYesNoPickerBox pickerBox5;
private Label label3;
protected MainForm parentForm = null;
@ -56,6 +58,8 @@ namespace FizzyLauncher
this.textBox1 = new RyzStudio.Windows.ThemedForms.TTextBox();
this.pickerBox4 = new RyzStudio.Windows.ThemedForms.TYesNoPickerBox();
this.label2 = new System.Windows.Forms.Label();
this.pickerBox5 = new RyzStudio.Windows.ThemedForms.TYesNoPickerBox();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
@ -63,7 +67,7 @@ namespace FizzyLauncher
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
this.label1.Location = new System.Drawing.Point(10, 193);
this.label1.Location = new System.Drawing.Point(10, 235);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
@ -94,7 +98,7 @@ namespace FizzyLauncher
this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox1.BackColor = System.Drawing.Color.Transparent;
this.pickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.pickerBox1.Location = new System.Drawing.Point(285, 85);
this.pickerBox1.Location = new System.Drawing.Point(285, 127);
this.pickerBox1.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
this.pickerBox1.Name = "pickerBox1";
this.pickerBox1.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
@ -108,7 +112,7 @@ namespace FizzyLauncher
this.label6.AutoSize = true;
this.label6.BackColor = System.Drawing.Color.Transparent;
this.label6.ForeColor = System.Drawing.SystemColors.ControlText;
this.label6.Location = new System.Drawing.Point(10, 85);
this.label6.Location = new System.Drawing.Point(10, 127);
this.label6.Margin = new System.Windows.Forms.Padding(0);
this.label6.Name = "label6";
this.label6.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
@ -122,7 +126,7 @@ namespace FizzyLauncher
this.pickerBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox2.BackColor = System.Drawing.Color.Transparent;
this.pickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.pickerBox2.Location = new System.Drawing.Point(285, 126);
this.pickerBox2.Location = new System.Drawing.Point(285, 168);
this.pickerBox2.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
this.pickerBox2.Name = "pickerBox2";
this.pickerBox2.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
@ -136,7 +140,7 @@ namespace FizzyLauncher
this.label7.AutoSize = true;
this.label7.BackColor = System.Drawing.Color.Transparent;
this.label7.ForeColor = System.Drawing.SystemColors.ControlText;
this.label7.Location = new System.Drawing.Point(10, 126);
this.label7.Location = new System.Drawing.Point(10, 168);
this.label7.Margin = new System.Windows.Forms.Padding(0);
this.label7.Name = "label7";
this.label7.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
@ -211,7 +215,7 @@ namespace FizzyLauncher
this.tHorizontalSeparator3.AutoScrollMargin = new System.Drawing.Size(0, 0);
this.tHorizontalSeparator3.AutoScrollMinSize = new System.Drawing.Size(0, 0);
this.tHorizontalSeparator3.BackColor = System.Drawing.Color.Transparent;
this.tHorizontalSeparator3.Location = new System.Drawing.Point(10, 164);
this.tHorizontalSeparator3.Location = new System.Drawing.Point(10, 206);
this.tHorizontalSeparator3.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
this.tHorizontalSeparator3.MaximumSize = new System.Drawing.Size(4920, 2);
this.tHorizontalSeparator3.MinimumSize = new System.Drawing.Size(0, 22);
@ -226,7 +230,7 @@ namespace FizzyLauncher
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.BackColor = System.Drawing.Color.Transparent;
this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.textBox1.Location = new System.Drawing.Point(192, 192);
this.textBox1.Location = new System.Drawing.Point(192, 234);
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.textBox1.Name = "textBox1";
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
@ -240,7 +244,7 @@ namespace FizzyLauncher
this.pickerBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox4.BackColor = System.Drawing.Color.Transparent;
this.pickerBox4.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.pickerBox4.Location = new System.Drawing.Point(285, 237);
this.pickerBox4.Location = new System.Drawing.Point(285, 279);
this.pickerBox4.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
this.pickerBox4.Name = "pickerBox4";
this.pickerBox4.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
@ -254,7 +258,7 @@ namespace FizzyLauncher
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
this.label2.Location = new System.Drawing.Point(10, 237);
this.label2.Location = new System.Drawing.Point(10, 279);
this.label2.Margin = new System.Windows.Forms.Padding(0);
this.label2.Name = "label2";
this.label2.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
@ -263,11 +267,41 @@ namespace FizzyLauncher
this.label2.Text = "Ignore SSL Errors";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pickerBox5
//
this.pickerBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox5.BackColor = System.Drawing.Color.Transparent;
this.pickerBox5.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.pickerBox5.Location = new System.Drawing.Point(285, 85);
this.pickerBox5.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
this.pickerBox5.Name = "pickerBox5";
this.pickerBox5.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
this.pickerBox5.Size = new System.Drawing.Size(84, 34);
this.pickerBox5.SubmitButton = null;
this.pickerBox5.TabIndex = 196;
this.pickerBox5.Value = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
this.label3.Location = new System.Drawing.Point(10, 85);
this.label3.Margin = new System.Windows.Forms.Padding(0);
this.label3.Name = "label3";
this.label3.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
this.label3.Size = new System.Drawing.Size(111, 34);
this.label3.TabIndex = 195;
this.label3.Text = "Show toolbar menu";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// OptionsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(384, 521);
this.Controls.Add(this.pickerBox5);
this.Controls.Add(this.label3);
this.Controls.Add(this.pickerBox4);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
@ -311,6 +345,7 @@ namespace FizzyLauncher
pickerBox2.Value = parentForm.CurrentSession.AlwaysOnTop;
textBox1.Text = parentForm.CurrentSession.RunCommand ?? string.Empty;
pickerBox4.Value = parentForm.CurrentSession.IgnoreSSL;
pickerBox5.Value = parentForm.CurrentSession.ShowToolbar;
}
private void button1_MouseClick(object sender, MouseEventArgs e)
@ -324,6 +359,7 @@ namespace FizzyLauncher
parentForm.CurrentSession.AlwaysOnTop = pickerBox2.Value;
parentForm.CurrentSession.RunCommand = textBox1.Text?.Trim();
parentForm.CurrentSession.IgnoreSSL = pickerBox4.Value;
parentForm.CurrentSession.ShowToolbar = pickerBox5.Value;
}
this.DialogResult = DialogResult.OK;