diff --git a/.vs/Password Manager/FileContentIndex/1032e6ac-4057-4a9f-88e1-0f7ac066e540.vsidx b/.vs/Password Manager/FileContentIndex/1032e6ac-4057-4a9f-88e1-0f7ac066e540.vsidx deleted file mode 100644 index e9809ce..0000000 Binary files a/.vs/Password Manager/FileContentIndex/1032e6ac-4057-4a9f-88e1-0f7ac066e540.vsidx and /dev/null differ diff --git a/.vs/Password Manager/v17/.suo b/.vs/Password Manager/v17/.suo index 19aedba..239d30e 100644 Binary files a/.vs/Password Manager/v17/.suo and b/.vs/Password Manager/v17/.suo differ diff --git a/Password Manager/Form1.Designer.cs b/Password Manager/MainForm.Designer.cs similarity index 100% rename from Password Manager/Form1.Designer.cs rename to Password Manager/MainForm.Designer.cs diff --git a/Password Manager/Form1.cs b/Password Manager/MainForm.cs similarity index 82% rename from Password Manager/Form1.cs rename to Password Manager/MainForm.cs index 87a4c3b..c297d1f 100644 --- a/Password Manager/Form1.cs +++ b/Password Manager/MainForm.cs @@ -31,9 +31,8 @@ namespace Password_Manager private void AddProfile(object sender, EventArgs e) { - Fields.ListOfProfiles.Add(new Profile("tmp", @"C:\Users\RichardMiskolczi\pass")); - Fields.CurrentProfile = Fields.ListOfProfiles[0]; //temporary - ProfileChange(sender, e); + NewProfileForm npf = new NewProfileForm(); + npf.Show(); } } } \ No newline at end of file diff --git a/Password Manager/Form1.resx b/Password Manager/MainForm.resx similarity index 100% rename from Password Manager/Form1.resx rename to Password Manager/MainForm.resx diff --git a/Password Manager/NewProfileForm.Designer.cs b/Password Manager/NewProfileForm.Designer.cs new file mode 100644 index 0000000..9aff248 --- /dev/null +++ b/Password Manager/NewProfileForm.Designer.cs @@ -0,0 +1,106 @@ +namespace Password_Manager +{ + partial class NewProfileForm + { + /// + /// 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() + { + button1 = new Button(); + button2 = new Button(); + button3 = new Button(); + nameTextBox = new TextBox(); + pathTextBox = new TextBox(); + SuspendLayout(); + // + // button1 + // + button1.Location = new Point(212, 45); + button1.Name = "button1"; + button1.Size = new Size(94, 29); + button1.TabIndex = 0; + button1.Text = "Browse"; + button1.UseVisualStyleBackColor = true; + button1.Click += ChooseFolder; + // + // button2 + // + button2.Location = new Point(161, 78); + button2.Name = "button2"; + button2.Size = new Size(145, 29); + button2.TabIndex = 1; + button2.Text = "Save"; + button2.UseVisualStyleBackColor = true; + // + // button3 + // + button3.Location = new Point(12, 78); + button3.Name = "button3"; + button3.Size = new Size(145, 29); + button3.TabIndex = 2; + button3.Text = "Cancel"; + button3.UseVisualStyleBackColor = true; + // + // textBox1 + // + nameTextBox.Location = new Point(12, 12); + nameTextBox.Name = "textBox1"; + nameTextBox.PlaceholderText = "Work"; + nameTextBox.Size = new Size(194, 27); + nameTextBox.TabIndex = 3; + // + // textBox2 + // + pathTextBox.Location = new Point(12, 45); + pathTextBox.Name = "textBox2"; + pathTextBox.PlaceholderText = "C:\\Passwords"; + pathTextBox.Size = new Size(194, 27); + pathTextBox.TabIndex = 4; + // + // NewProfileForm + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(317, 127); + Controls.Add(pathTextBox); + Controls.Add(nameTextBox); + Controls.Add(button3); + Controls.Add(button2); + Controls.Add(button1); + Name = "NewProfileForm"; + Text = "NewProfileForm"; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private Button button1; + private Button button2; + private Button button3; + private TextBox nameTextBox; + private TextBox pathTextBox; + } +} \ No newline at end of file diff --git a/Password Manager/NewProfileForm.cs b/Password Manager/NewProfileForm.cs new file mode 100644 index 0000000..d3202ba --- /dev/null +++ b/Password Manager/NewProfileForm.cs @@ -0,0 +1,29 @@ +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 Password_Manager +{ + public partial class NewProfileForm : Form + { + public NewProfileForm() + { + InitializeComponent(); + } + + private void ChooseFolder(object sender, EventArgs e) + { + FolderBrowserDialog dialog = new FolderBrowserDialog(); + if (dialog.ShowDialog() == DialogResult.OK) + { + pathTextBox.Text = dialog.SelectedPath; + } + } + } +} diff --git a/Password Manager/NewProfileForm.resx b/Password Manager/NewProfileForm.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/Password Manager/NewProfileForm.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Password Manager/Password Manager.csproj.user b/Password Manager/Password Manager.csproj.user index a21d47b..d61e8d1 100644 --- a/Password Manager/Password Manager.csproj.user +++ b/Password Manager/Password Manager.csproj.user @@ -1,7 +1,10 @@  - + + Form + + Form