Exemplo n.º 1
0
        private void DifferView_Loaded(object sender, RoutedEventArgs e)
        {
            string[] args = Environment.GetCommandLineArgs();
            if (args.Length == 3)
            {
                string file1 = args[1];
                string file2 = args[2];

                DifferViewModel vm = this.DataContext as DifferViewModel;
                if (vm != null)
                {
                    vm.InitializeSetting(file1, file2);
                }
            }
        }
Exemplo n.º 2
0
        private void CloseExecute(object parameter)
        {
            DifferViewModel diff = _differVM as DifferViewModel;

            {
                if (diff != null)
                {
                    if (diff.DocArray[0] != null && diff.DocArray[0].Document != null)
                    {
                        diff.DocArray[0].Close();
                    }
                    if (diff.DocArray[1] != null && diff.DocArray[1].Document != null)
                    {
                        diff.DocArray[1].Close();
                    }

                    diff.ClearPreviewFolder();
                }
            }
            App.Current.Shutdown();
        }
Exemplo n.º 3
0
 public MainViewModel()
 {
     _current     = _differVM = new DifferViewModel();
     CloseCommand = new DelegateCommand <object>(CloseExecute);
     OpenCommand  = new DelegateCommand <object>(OpenExecute);
 }