private void SelectPendingChanges(SelectPendingChangesCommandArgument selectPendingChangesCommandArgument) { this.Logger().Debug("Select Pending Changes: {0}, Count: {1}", selectPendingChangesCommandArgument.Value, selectPendingChangesCommandArgument.Collection.Count()); _backgroundFunctionPreventDataUpdate = true; foreach (var pendingChangeModel in selectPendingChangesCommandArgument.Collection) { pendingChangeModel.IncludeChange = selectPendingChangesCommandArgument.Value; } _backgroundFunctionPreventDataUpdate = false; PendingChangesOnCollectionChanged(); }
private void SelectPendingChanges(SelectPendingChangesCommandArgument selectPendingChangesCommandArgument) { this.Logger().Debug("Select Pending Changes: {0}, Count: {1}", selectPendingChangesCommandArgument.Value, selectPendingChangesCommandArgument.Collection.Count()); _backgroundFunctionPreventDataUpdate = true; foreach (var pendingChangeModel in selectPendingChangesCommandArgument.Collection) { pendingChangeModel.IncludeChange = selectPendingChangesCommandArgument.Value; } _backgroundFunctionPreventDataUpdate = false; PopulateSelectedPendingChangesSummary(); EvaluateCheckInCommand.Execute(null); }
private static void OnPreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key != Key.Space) { return; } e.Handled = true; var listView = (ListView)sender; var command = (RelayCommand <SelectPendingChangesCommandArgument>)listView.GetValue(CommandProperty); var selectedItems = listView.SelectedItems.Cast <PendingChangeModel>().ToArray(); var workItemModel = selectedItems.Any() && (!selectedItems.Last().IncludeChange); var selectPendingChangesCommandArgument = new SelectPendingChangesCommandArgument { Collection = selectedItems, Value = workItemModel }; command.Execute(selectPendingChangesCommandArgument); }
private bool CanSelectPendingChanges(SelectPendingChangesCommandArgument commandArgument) { return(commandArgument.Collection != null && commandArgument.Collection.Any()); }