From 2ce596a5b3ed1f6a0260d413f7afffd4810ee7ba Mon Sep 17 00:00:00 2001 From: Meisterlala Date: Mon, 17 Jul 2017 02:35:27 +0200 Subject: [PATCH] Design of Edit window --- Autostart Manager/Autostart Manager.csproj | 9 ++ Autostart Manager/Edit.Designer.cs | 141 +++++++++++++++++++++ Autostart Manager/Edit.cs | 20 +++ Autostart Manager/Edit.resx | 120 ++++++++++++++++++ Autostart Manager/Main.cs | 14 +- 5 files changed, 298 insertions(+), 6 deletions(-) create mode 100644 Autostart Manager/Edit.Designer.cs create mode 100644 Autostart Manager/Edit.cs create mode 100644 Autostart Manager/Edit.resx diff --git a/Autostart Manager/Autostart Manager.csproj b/Autostart Manager/Autostart Manager.csproj index c4a2b62..8eaf1e8 100644 --- a/Autostart Manager/Autostart Manager.csproj +++ b/Autostart Manager/Autostart Manager.csproj @@ -82,6 +82,12 @@ About.cs + + Form + + + Edit.cs + @@ -129,6 +135,9 @@ About.cs + + Edit.cs + Main.cs diff --git a/Autostart Manager/Edit.Designer.cs b/Autostart Manager/Edit.Designer.cs new file mode 100644 index 0000000..efad34e --- /dev/null +++ b/Autostart Manager/Edit.Designer.cs @@ -0,0 +1,141 @@ +namespace Autostart_Manager +{ + partial class Edit + { + /// + /// 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 Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.Location = new System.Drawing.Point(12, 12); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(398, 20); + this.textBox1.TabIndex = 0; + this.textBox1.Text = "Name"; + // + // textBox2 + // + this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox2.Location = new System.Drawing.Point(12, 75); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(398, 20); + this.textBox2.TabIndex = 1; + this.textBox2.Text = "Commandline"; + // + // textBox3 + // + this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox3.Location = new System.Drawing.Point(12, 46); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(317, 20); + this.textBox3.TabIndex = 2; + this.textBox3.Text = "Path"; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(335, 46); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 20); + this.button1.TabIndex = 3; + this.button1.Text = "choose"; + this.button1.UseVisualStyleBackColor = true; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Checked = true; + this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox1.Location = new System.Drawing.Point(155, 108); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(89, 17); + this.checkBox1.TabIndex = 4; + this.checkBox1.Text = "Keep running"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button2.Location = new System.Drawing.Point(12, 104); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 5; + this.button2.Text = "Cancel"; + this.button2.UseVisualStyleBackColor = true; + // + // button3 + // + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button3.Location = new System.Drawing.Point(335, 104); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 6; + this.button3.Text = "Add"; + this.button3.UseVisualStyleBackColor = true; + // + // Edit + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(422, 139); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.checkBox1); + this.Controls.Add(this.button1); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Name = "Edit"; + this.Text = "Edit"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + } +} \ No newline at end of file diff --git a/Autostart Manager/Edit.cs b/Autostart Manager/Edit.cs new file mode 100644 index 0000000..bb29e2b --- /dev/null +++ b/Autostart Manager/Edit.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Autostart_Manager +{ + public partial class Edit : Form + { + public Edit() + { + InitializeComponent(); + } + } +} diff --git a/Autostart Manager/Edit.resx b/Autostart Manager/Edit.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Autostart Manager/Edit.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 diff --git a/Autostart Manager/Main.cs b/Autostart Manager/Main.cs index db739a4..d41b791 100644 --- a/Autostart Manager/Main.cs +++ b/Autostart Manager/Main.cs @@ -16,10 +16,10 @@ namespace Autostart_Manager ResizeColumns(); LoadListViewItems(); - StartItem si = new StartItem(); - si.Name = "Test"; - si.Path = "C:/sdasad/sad.exe"; - AddItem(si); + // StartItem si = new StartItem(); + // si.Name = "Test"; + // si.Path = "C:/sdasad/sad.exe"; + // AddItem(si); } public void AddItem(StartItem si) @@ -111,7 +111,7 @@ namespace Autostart_Manager { listViewMain.Columns[1].Width = StatusWidht; var remainder = listViewMain.Width - StatusWidht - 5; - listViewMain.Columns[0].Width = remainder; + listViewMain.Columns[0].Width = remainder - 18; } private void Main_SizeChanged(object sender, EventArgs e) @@ -121,7 +121,9 @@ namespace Autostart_Manager private void buttonAbout_Click(object sender, EventArgs e) { - new About().ShowDialog(); + this.BackColor = Color.FromArgb(180, 155, 255); + + //new About().ShowDialog(); } private void buttonShortcuts_Click(object sender, EventArgs e) -- 2.51.2