private void dataGridView4_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { using (EditGroupWindow egw = new EditGroupWindow(groupid)) { egw.ShowDialog(this.TopLevelControl); } refreshtables(); }
public void Execute(object parameter) { var group = parameter as LogGroup; var window = parameter as Window; // 1st stage if (group != null) { var w = new EditGroupWindow(group); w.ShowDialog(); } // 2nd stage else if (window != null && _vm != null) { // right now, we only have the name to change LogSource.Instance.UpdateGroup(_vm.Group); window.Hide(); window.Close(); } }
private void ExecuteOnViewProfile() { try { Window wnd = null; if (SelectedContact is UserUiInfo userUiInfo) { var user = UserServiceClient.GetUserById(userUiInfo.UserId); wnd = new ContactProfileWindow(user); } else if (SelectedContact is ChatGroupUiInfo chatGroupUiInfo) { wnd = new EditGroupWindow(chatGroupUiInfo); } wnd.Owner = (Window)_view; wnd.Show(); } catch (Exception) { } }