public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection) { var dlg = new ConnectionDialog(); var connectionProperties = new ConnectionProperties(cxInfo); if (!isNewConnection) { dlg.ViewModel.LoadFrom(connectionProperties); } if (dlg.ShowDialog().GetValueOrDefault()) { dlg.ViewModel.SaveTo(connectionProperties); return(true); } return(false); }
public ConnectionDialogViewModel(ConnectionDialog view) { View = view ?? throw new ArgumentNullException(nameof(view)); View.pwdBox.PasswordChanged += (s, e) => Password = View.pwdBox.Password; }