public Edit_Person_Info(ref PassWords passwords, int selectedPasswordEntityIndex, PasswordController.InfoSelection infoSelection) { InitializeComponent(); this.passwords = passwords; this.selectedPasswordEntityIndex = selectedPasswordEntityIndex; this.infoSelection = infoSelection; label1.Text = infoSelection.ToString(); if (infoSelection == PasswordController.InfoSelection.Name) { textBox1.Text = passwords.ActivePerson.GetName(); } else if (infoSelection == PasswordController.InfoSelection.Details) { textBox1.Text = passwords.ActivePerson.GetDetails(); textBox1.Multiline = true; textBox1.Height = 45; } else if (infoSelection == PasswordController.InfoSelection.ExtraInfo) { textBox1.Text = passwords.ActivePerson.GetExtraInfo(); textBox1.Multiline = true; textBox1.Height = 45; } }
public void Load() { if (File.Exists(Path.Combine(ActivePasswordPath, "Keys"))) { PassWords pass = SD.Serialization.LoadObject <PassWords>(Path.Combine(ActivePasswordPath, "Keys")); if (pass != null) { this.Persons = pass.Persons; } //SD.XML.SerializeDeSerialize seri = new SD.XML.SerializeDeSerialize(); //PassWords pass = seri.DeSerializeObject<PassWords>(Path.Combine(ActivePasswordPath, "Keys")); //this.Persons = pass.Persons; if (this.Persons.Count > 0) { ActivePerson = this.Persons[this.Persons.Count - 1]; } else { ActivePerson = null; } } else { Persons = new List <Person>(); } }
public Edit_old_Pass(ref PassWords passwords, int selectedOldPasswordParentIndex, int selectedOldPassListIndex) { InitializeComponent(); this.passwords = passwords; this.selectedOldPasswordParentIndex = selectedOldPasswordParentIndex; this.selectedOldPassListIndex = selectedOldPassListIndex; textBox1.Text = passwords.ActivePerson.PasswordEntities[selectedOldPasswordParentIndex].GetOldPasswords()[selectedOldPassListIndex]; }
public PasswordController(string activepasswordpath) { passwords = new PassWords(activepasswordpath); names = new List <string>();; namerects = new List <RectangleF>(); Infos = new List <string>(); InfoRects = new List <RectangleF>(); Oldpassrects = new List <RectangleF>(); OldsPass = new List <string>(); BackGroundBrushes = new List <Brush>(); BackgroundRects = new List <RectangleF>(); }
public EditPasswordEntity(ref PassWords passwords, int selectedPasswordEntityIndex) { InitializeComponent(); this.password = passwords; this.selectedPasswordEntityIndex = selectedPasswordEntityIndex; tb_label.Text = password.ActivePerson.PasswordEntities[selectedPasswordEntityIndex].GetPlainLabel(); if (comboBox1.Items.Contains(tb_label.Text)) { comboBox1.SelectedItem = tb_label.Text; } else { comboBox1.SelectedItem = "Custom"; } tb_pass.Text = password.ActivePerson.PasswordEntities[selectedPasswordEntityIndex].GetPlainPassword(); tb_email.Text = password.ActivePerson.PasswordEntities[selectedPasswordEntityIndex].GetPlainEmail(); }