diff --git a/DD2Switcher/DD2Switcher.csproj b/DD2Switcher/DD2Switcher.csproj index 2d22f56..f366f03 100644 --- a/DD2Switcher/DD2Switcher.csproj +++ b/DD2Switcher/DD2Switcher.csproj @@ -72,6 +72,9 @@ True Resources.resx + + SettingsForm.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/DD2Switcher/SettingsForm.cs b/DD2Switcher/SettingsForm.cs index b90415b..ed77860 100644 --- a/DD2Switcher/SettingsForm.cs +++ b/DD2Switcher/SettingsForm.cs @@ -7,11 +7,7 @@ using System.Windows.Forms; namespace DD2Switcher { public partial class SettingsForm : Form { - private Label titleLabel; private FlowLayoutPanel windowsPanel; - private Label statusLabel; - private Button refreshButton; - private Button closeButton; private int firstIndex = -1; private int lastIndex = -1; @@ -22,74 +18,33 @@ namespace DD2Switcher { } private void InitializeComponent() { - this.titleLabel = new Label(); - this.windowsPanel = new FlowLayoutPanel(); - this.statusLabel = new Label(); - this.refreshButton = new Button(); - this.closeButton = new Button(); + this.windowsPanel = new System.Windows.Forms.FlowLayoutPanel(); this.SuspendLayout(); // - // titleLabel - // - this.titleLabel.AutoSize = true; - this.titleLabel.Font = new Font("Segoe UI", 14F, FontStyle.Bold); - this.titleLabel.Location = new Point(20, 20); - this.titleLabel.Name = "titleLabel"; - this.titleLabel.Size = new Size(200, 25); - this.titleLabel.Text = "DD2Switcher Settings"; - // // windowsPanel // this.windowsPanel.AutoScroll = true; - this.windowsPanel.BorderStyle = BorderStyle.FixedSingle; - this.windowsPanel.Location = new Point(20, 60); + this.windowsPanel.BackColor = System.Drawing.Color.White; + this.windowsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.windowsPanel.Location = new System.Drawing.Point(12, 12); this.windowsPanel.Name = "windowsPanel"; - this.windowsPanel.Size = new Size(560, 300); - this.windowsPanel.Padding = new Padding(10); - this.windowsPanel.BackColor = Color.White; - // - // statusLabel - // - this.statusLabel.AutoSize = true; - this.statusLabel.Location = new Point(20, 380); - this.statusLabel.Name = "statusLabel"; - this.statusLabel.Size = new Size(400, 15); - this.statusLabel.Text = "DD2Switcher is running in the system tray."; - // - // refreshButton - // - this.refreshButton.Location = new Point(450, 375); - this.refreshButton.Name = "refreshButton"; - this.refreshButton.Size = new Size(75, 23); - this.refreshButton.Text = "Refresh"; - this.refreshButton.Click += new EventHandler(this.refreshButton_Click); - // - // closeButton - // - this.closeButton.Location = new Point(530, 375); - this.closeButton.Name = "closeButton"; - this.closeButton.Size = new Size(75, 23); - this.closeButton.Text = "Close"; - this.closeButton.Click += new EventHandler(this.closeButton_Click); + this.windowsPanel.Padding = new System.Windows.Forms.Padding(10); + this.windowsPanel.Size = new System.Drawing.Size(576, 396); + this.windowsPanel.TabIndex = 1; // // SettingsForm // - this.AutoScaleDimensions = new SizeF(6F, 13F); - this.AutoScaleMode = AutoScaleMode.Font; - this.ClientSize = new Size(600, 420); - this.Controls.Add(this.titleLabel); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(600, 420); this.Controls.Add(this.windowsPanel); - this.Controls.Add(this.statusLabel); - this.Controls.Add(this.refreshButton); - this.Controls.Add(this.closeButton); - this.Name = "SettingsForm"; - this.Text = "DD2Switcher Settings"; - this.StartPosition = FormStartPosition.CenterScreen; - this.FormBorderStyle = FormBorderStyle.FixedSingle; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; + this.Name = "SettingsForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "DD2Switcher Settings"; this.ResumeLayout(false); - this.PerformLayout(); } private void closeButton_Click(object sender, EventArgs e) { diff --git a/DD2Switcher/SettingsForm.resx b/DD2Switcher/SettingsForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/DD2Switcher/SettingsForm.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