private void AddDrive_Click(object sender, RoutedEventArgs e) { var service = new DriveService(); var dlg = new EditDriveServiceWindow(service); dlg.Owner = this; if (dlg.ShowDialog().GetValueOrDefault()) { _driveServices.Add(service); service.SyncPeriod = service.SyncPeriod;// force start } }
private void EditService(DriveService service) { if (service == null) { return; } var dlg = new EditDriveServiceWindow(service); dlg.Owner = this; if (dlg.ShowDialog().GetValueOrDefault()) { // do nothing } }