Exemplo n.º 1
0
        public SettingsViewModel(MappingViewModel mappingViewModel, OptionsViewModel options)
        {
            _options = options;

            //DuplicatedTestCase =
            //    JsonConvert.DeserializeObject<ObservableCollection<TestCaseOldNewMapping>>(Settings.Default.Mappings);
            //if (DuplicatedTestCase == null)
            //    DuplicatedTestCase = new ObservableCollection<TestCaseOldNewMapping>();
            _mappingViewModel = mappingViewModel;

            StartMigrationCommand = new DelegateCommand(StartMigration, CanWork);

            DeleteMappingCommand = new DelegateCommand <IList>(DeleteMapping);
        }
Exemplo n.º 2
0
        public SettingsViewModel(MappingViewModel mappingViewModel, OptionsViewModel options)
        {
            _options = options;

            DuplicatedTestCase =
                JsonConvert.DeserializeObject<ObservableCollection<TestCaseOldNewMapping>>(Settings.Default.Mappings);
            if (DuplicatedTestCase == null)
                DuplicatedTestCase = new ObservableCollection<TestCaseOldNewMapping>();
            _mappingViewModel = mappingViewModel;

            StartMigrationCommand = new DelegateCommand(StartMigration, CanWork);

            DeleteMappingCommand = new DelegateCommand<IList>(DeleteMapping);
        }
Exemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();

            App.Current.DispatcherUnhandledException += App_DispatcherUnhandledException;

            OptionsViewModel optionsViewModel = new OptionsViewModel();
            MappingViewModel mappingViewModel = new MappingViewModel(plansTree);
            ConnectionsViewModel connectionsViewModel = new ConnectionsViewModel();

            gp_options.DataContext = optionsViewModel;
            gp_copy.DataContext = mappingViewModel;
            gp_connections.DataContext = connectionsViewModel;
            gp_settings.DataContext = new SettingsViewModel(mappingViewModel, optionsViewModel);
        }