Пример #1
0
 public ModelActions
     (ConclusionClass _conclusionClass, ViewModel _viewModel, GatheredBases _bases, IElementsNamesLanguageConfig config)
 {
     conclusionClass = _conclusionClass;
     viewModel       = _viewModel;
     bases           = _bases;
     _config         = config;
 }
Пример #2
0
 public ActionsOnBase(GatheredBases bases, ViewModel model, IElementsNamesLanguageConfig config)
 {
     _viewModel        = model;
     _config           = config;
     _bases            = bases;
     conclusion        = new ConclusionClass(_bases, _viewModel, config);
     _constrainActions = new ConstrainActions(conclusion, _viewModel, _bases);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConclusionClass"/> class.
 /// </summary>
 /// <param name="bases">The bases.</param>
 /// <param name="viewModel">The view model.</param>
 public ConclusionClass(GatheredBases bases, ViewModel viewModel, IElementsNamesLanguageConfig config)
 {
     _bases            = bases;
     _viewModel        = viewModel;
     _config           = config;
     _constrainActions = new ConstrainActions(this, _viewModel, bases);
     _modelActions     = new ModelActions(this, _viewModel, bases, config);
 }
Пример #4
0
        public ViewModel()
        {
            #region LanguageConfiguration

            MainWindowLanguageConfig     = new PolishMainWindowLanguageConfig();
            ChildWindowsLanguageConfig   = new PolishChildWindowsLanguageConfig();
            _elementsNamesLanguageConfig = new PolishElementsNamesLanguageConfig();

            PolishConfigurationCommand = new RelayCommand(p =>
            {
                MainWindowLanguageConfig     = new PolishMainWindowLanguageConfig();
                ChildWindowsLanguageConfig   = new PolishChildWindowsLanguageConfig();
                _elementsNamesLanguageConfig = new PolishElementsNamesLanguageConfig();
            });

            EnglishConfigurationCommand = new RelayCommand(p =>
            {
                MainWindowLanguageConfig     = new EnglishMainWindowLanguageConfig();
                ChildWindowsLanguageConfig   = new EnglishChildWindowsLanguageConfig();
                _elementsNamesLanguageConfig = new EnglishElementsLanguageConfig();
            });


            _basesCommands = new BasesCommands(this);
            _buttonsLogic  = new ButtonsLogic(this);

            #endregion

            bases = new GatheredBases(this);

            //Instances of classes responsible for opening and actions on RMSE bases
            _openBasesActions = new OpenBasesActions(this, bases);
            _actionsOnBase    = new ActionsOnBase(bases, this, _elementsNamesLanguageConfig);

            #region ConclusionButtons

            ConcludeCommand = new RelayCommand(pars => _actionsOnBase.BackwardConcludeAction(_selectedRule));
            OpenBackwardConcludeWindowCommand = new RelayCommand(p => ShowWindow(new ChooseRule(this)));
            ForwardConcludeCommand            = new RelayCommand(p => _actionsOnBase.ForwardConcludeAction());

            #endregion

            ValueTrue    = new RelayCommand(p => CheckedRuleVal = true);
            ValueUnknown = new RelayCommand(p => CheckedRuleVal = false);

            StartConditionValueTrue    = new RelayCommand(p => StartConditionValue = true);
            StartConditionValueUnknown = new RelayCommand(p => StartConditionValue = false);
            BreakButtonCommand         = new RelayCommand(p => ExceptionValue = true);
            ClearConsoleCommand        = new RelayCommand(p => MainWindowText1 = "");
            ArgumentNullCommand        = new RelayCommand(p => ArgumentNullMethod());
        }