/// <summary> /// Parameterized class constructor /// </summary> /// <param name="fileA"></param> /// <param name="fileB"></param> /// <param name="compareAs"></param> public AppViewModel(string fileA, string fileB, CompareType compareAs) : this() { _FilePathA.FilePath = fileA; _FilePathB.FilePath = fileB; _DiffCtrl = new DiffDocViewModel(this, compareAs); }
/// <summary> /// Class constructor /// </summary> public AppViewModel() { _cancelTokenSource = new CancellationTokenSource(); _DiffProgress = new DiffProgressViewModel(); _FilePathA = new SuggestSourceViewModel(); _FilePathB = new SuggestSourceViewModel(); _InlineDialog = InlineDialogMode.None; _DiffCtrl = new DiffDocViewModel(); _GotoLineController = new GotoLineControllerViewModel(DiffCtrl.GotoTextLine, ToogleInlineDialog); _OptionsController = new OptionsControllerViewModel(ToogleInlineDialog); _FocusControl = Focus.LeftFilePath; }
/// <summary> /// Class constructor /// </summary> public AppViewModel() { _FocusControl = Focus.LeftView; ViewModesA = new List <DisplayMode>(new DisplayMode[] { DisplayMode.Comparing, DisplayMode.Editing }); _ViewModeASelected = ViewModesA.First(); ViewModesB = new List <DisplayMode>(new DisplayMode[] { DisplayMode.Comparing, DisplayMode.Editing }); _ViewModeBSelected = ViewModesB.First(); _cancelTokenSource = new CancellationTokenSource(); _DiffProgress = new DiffProgressViewModel(); _FilePathA = new SuggestSourceViewModel(); _FilePathB = new SuggestSourceViewModel(); _InlineDialog = InlineDialogMode.None; _DiffCtrl = new DiffDocViewModel(this); _GotoLineController = new GotoLineControllerViewModel(DiffCtrl.GotoTextLine, ToogleInlineDialog); _OptionsController = new OptionsControllerViewModel(ToogleInlineDialog); }