private void btnEdit_Click(object sender, EventArgs e) { if (!btnEdit.Enabled) { return; } if (grdUsers.DataSource == null) { return; } if (!grdUsers.Redraw) { return; } if (grdUsers.RowSel < grdUsers.Rows.Fixed) { return; } string _username = grdUsers[grdUsers.RowSel, "Username"].ToString(); UserInfoDialog _dialog = new UserInfoDialog(_username); _dialog.ShowDialog(); if (_dialog.WithUpdates) { _updatedcurrentuser = _updatedcurrentuser || _dialog.IsCurrentUser; InitializeUsersList(); } _dialog.Dispose(); _dialog = null; Materia.RefreshAndManageCurrentProcess(); }
private void btnAdd_Click(object sender, EventArgs e) { if (!btnAdd.Enabled) { return; } UserInfoDialog _dialog = new UserInfoDialog(); _dialog.ShowDialog(); if (_dialog.WithUpdates) { InitializeUsersList(); } _dialog.Dispose(); _dialog = null; Materia.RefreshAndManageCurrentProcess(); }