void AddClick(object sender, RoutedEventArgs e) { var result = EditDatabaseConnectDialog.Run(Owner, new DBConnectInfo()); if (result != null) { DBConnectInfos.Add(result); } }
public static DBConnectInfo Run(Window parent, DBConnectInfo dbConnectInfo) { var dialog = new EditDatabaseConnectDialog(dbConnectInfo) { Owner = parent }; return(dialog.ShowDialog() ? dialog.GetResult() : null); }
void EditClick(object sender, RoutedEventArgs e) { if (DBConnectInfo == null) { return; } var result = EditDatabaseConnectDialog.Run(Owner, DBConnectInfo); if (result != null) { DBConnectInfos[DBConnectInfos.IndexOf(DBConnectInfo)] = result; } }
void CopyClick(object sender, RoutedEventArgs e) { if (DBConnectInfo == null) { return; } var result = EditDatabaseConnectDialog.Run(Owner, DBConnectInfo); if (result != null) { DBConnectInfos.Add(result); } }