private void ModifyAccountButton_Click(object sender, EventArgs e) { if (ResultListView.SelectedItems.Count > 0) // Check if a item is selected from the result view { HidePanels(); ModifyAccountPanel.Visible = true; ListViewItem item = ResultListView.SelectedItems[0]; ModifyAccountTextBox.Text = item.SubItems[0].Text; // Set values to ModifyAccountTextBox ModifyUsernameTextBox.Text = item.SubItems[1].Text; // Set values to ModifyUsernameTextBox ChangePasswordTextBox.Clear(); ChangePasswordTextBox.Focus(); } else { MessageBox.Show("Select any account from the list"); } }
private void ClearModifyPanelButton_Click(object sender, EventArgs e) { ChangePasswordTextBox.Clear(); }