Ejemplo n.º 1
0
        public static bool CheckTurningOnInternalState(RadioModel model, out IList <string> errors)
        {
            var state = new Dictionary <string, Check>(LearningFactory.InitialState);

            state.Remove("TurningOn");

            return(LearningFactory.CheckState(model, state, out errors));
        }
Ejemplo n.º 2
0
        public static bool CheckButtonInputConditions(RadioModel model, out IList <string> errors)
        {
            var state = new Dictionary <string, Check>(LearningFactory.InitialState)
            {
                ["TurningOn"] = new Check(m => m.TurningOn.Value == SwitcherState.Enabled, "Питание должно быть включено"),
            };

            return(LearningFactory.CheckState(model, state, out errors));
        }
        public static bool CheckRecordState(RadioModel model, out IList <string> errors)
        {
            var state = new Dictionary <string, Check>(LearningFactory.WorkingState)
            {
                ["RecordWork"] = new Check(m => m.RecordWork.Value == RecordWorkState.Record,
                                           "Переключатель ЗАПИСЬ-РАБОТА должен быть в положении ЗАПИСЬ"),
            };

            return(LearningFactory.CheckState(model, state, out errors));
        }
Ejemplo n.º 4
0
        public static bool CheckWorkingState(RadioModel model, out IList <string> errors)
        {
            var state = new Dictionary <string, Check>(LearningFactory.WorkingState);

            return(LearningFactory.CheckState(model, state, out errors));
        }