private void OnLoaded(object sender, RoutedEventArgs routedEventArgs) { PreviewMouseWheel += OnPreviewMouseWheel; // let's add Focus when we loading older or newer logs (bug fix) foreach (InputBinding ib in InputBindings) { string s = ib.CommandParameter as string; if (s != null) { if (s == "LoadOlderLogArrayCommand" || s == "LoadNewerLogArrayCommand") { ICommand logic = ib.Command; sCommand c = new sCommand(() => { logic.Execute(null); Focus(); ScrollIntoView(SelectedItem); }); ib.Command = c; } } } ((INotifyCollectionChanged)Items).CollectionChanged += OnCollectionChanged; }
private void InitCommands() { SelectEntryCommand = new sCommand(SelectLogEntryAction); FilterByTimeCommand = new sCommand(FilterByTimeAction); CancelFilterByTimeCommand = new sCommand(CancelFilterByTimeAction); CopyEntriesCommand = new sCommand(CopyEntriesAction); SaveEntriesCommand = new sCommand(SaveEntriesAction); ShowOrHideSettingsCommand = new sCommand(ShowOrHideSettingsAction); ShowOrHideDataGridControlsCommand = new sCommand(ShowOrHideDataGridControlsAction); ShowOrHideDuplicationsTreeCommand = new sCommand(ShowOrHideDuplicationsTreeAction); StartRemovingFromBottomCommand = new sCommand(StartRemovingFromBottomAction); StartRemovingFromTopCommand = new sCommand(StartRemovingFromTopAction); LoadOlderLogCommand = new sCommand(LoadOlderLogAction); LoadOlderLogArrayCommand = new sCommand(LoadOlderLogArrayAction); LoadNewerLogCommand = new sCommand(LoadNewerLogAction); LoadNewerLogArrayCommand = new sCommand(LoadNewerLogArrayAction); SortLogEntriesCollectionCommand = new sCommand(SortLogEntriesCollectionAction); ShowLastLogsCommand = new sCommand(ShowLastLogsAction); SwitchShowLastLogsCommand = new sCommand(SwitchShowLastLogsAction); SwitchScrollToLastLogCommand = new sCommand(SwitchScrollToLastLogAction); LoadStartingFromIDCommand = new sCommand(LoadStartingFromIDAction); SelectLogEntryCommand = new sCommand(SelectLogEntryAction); IsInnerLogVisibleCommand = new sCommand(IsInnerLogVisibleAction); ClearDataGridCommand = new sCommand(ClearDataGridAction); SaveSettingsCommand = new sCommand(SaveSettingsAction); LoadSettingsCommand = new sCommand(LoadSettingsAction); ChangeColorCommand = new sCommand(ChangeColorAction); DefaultColorsCommand = new sCommand(DefaultColorsAction); SwitchTabToNextCommand = new sCommand(SwitchTabToNextAction); SwitchTabToPreviousCommand = new sCommand(SwitchTabToPreviousAction); FocusEndTimeFilterCommand = new sCommand(FocusEndTimeFilterAction); FocusStartTimeFilterCommand = new sCommand(FocusStartTimeFilterAction); FocusStartFromIDCommand = new sCommand(FocusStartFromIDAction); }
public DebugViewModel() { Collection = new ObservableCollection <Tuple <uint, Log9KEntry> >(); ShowTempFileContentsCommand = new sCommand(ShowTempFileContentsAction); HowMuchEntriesCommand = new sCommand(HowMuchEntriesAction); }