public RepositoryStatusBarVM(MainVM mainVM) { _mainVM = mainVM; SelectDirectoryCommand = new Action(SelectDirectory); Checkout = new Action <string>((branchName) => _mainVM.ConsoleControlVM.ExecuteCommand($"{GIT_CHECKOUT} {branchName}")); ReactiveAction branchNamesUpdater = new ReactiveAction(() => App.Current.Dispatcher.Invoke(UpdateBranchNames), _mainVM.Repo, _mainVM.RepoNotifier); }
public void CreateViewModel() { MainVM mainVM = new MainVM(); mainVM.CommandButtonVM.HotKeyHelper.Value = new HotKeyHelper(this); AddPanelHotkeys(mainVM.CommandButtonVM.HotKeyHelper.Value); DataContext = mainVM; }
public DiffViewerVM(MainVM mainVM) { _mainVM = mainVM; // If the diff viewer's currently selected file gets changed, the diff viewer needs to be refreshed. // Since the diff viewer is not currently watching its file for changes, I will just refresh it on any repository changes. ReactiveAction itemUpdater = new ReactiveAction(() => Application.Current.Dispatcher.Invoke(RefreshDiffViewer), _mainVM.RepoNotifier, _mainVM.Repo); }
public FileStatusVM(MainVM mainVM) { _mainVM = mainVM; Stage = new Action <string>((path) => _mainVM.ConsoleControlVM.ExecuteCommand($"{GIT_ADD} {path}")); Unstage = new Action <string>((path) => _mainVM.ConsoleControlVM.ExecuteCommand($"{GIT_RESET_HEAD} {path}")); // Call UpdateItems on the dispatcher to avoid threading issues. ReactiveAction itemUpdater = new ReactiveAction(() => Application.Current.Dispatcher.Invoke(UpdateItems), _mainVM.RepoNotifier, _mainVM.Repo); }
public ConsoleControlVM(MainVM mainVM) { _mainVM = mainVM; }
public CommandButtonVM(MainVM mainVM) { _mainVM = mainVM; CreateCommands(); ReactiveAction hotKeySetter = new ReactiveAction(RegisterHotKeys, HotKeyHelper); }