Пример #1
0
        public DataCheckViewModel()
        {
            boxConnConfig              = new BoxConnConfig();
            boxConnConfig.ShowMessage += BoxConnConfig_ShowMessage;

            GetBoxConnStringCommand = new DelegateCommand();
            GetBoxConnStringCommand.ExecuteAction = GetBoxConnString;

            StartCheckCommand = new DelegateCommand();
            StartCheckCommand.ExecuteAction  = Start;
            StartCheckCommand.CanExecuteFunc = new Func <object, bool>((object obj) => { return(canExecute); });

            OutPutToNotepadCommand = new DelegateCommand();
            OutPutToNotepadCommand.ExecuteAction  = OutPut;
            OutPutToNotepadCommand.CanExecuteFunc = new Func <object, bool>((object obj) => { return(canExecute); });

            Message = "说明:本工具是为了检索出中心与盒子凭证状态不一致的数据而制作,适用于低于2.5版本的非标项目";
        }
Пример #2
0
        public DataSyncViewModel()
        {
            CMD        = "82A";
            LoopSecond = 5;
            Day        = 1;
            Limit      = 100;

            if (EnvironmentInfo.AutoStartSyncEntity.AutoStartFlag == true)
            {
                LoopSecond = EnvironmentInfo.AutoStartSyncEntity.LoopTime;
                Day        = EnvironmentInfo.AutoStartSyncEntity.Day;
                Limit      = EnvironmentInfo.AutoStartSyncEntity.Limit;
                if (EnvironmentInfo.AutoStartSyncEntity.VersionCheck == true)
                {
                    CMD = "742;743;820;821;74A;811";
                }
                else
                {
                    CMD = "82A";
                }
            }

            boxConnConfig              = new BoxConnConfig();
            boxConnConfig.ShowMessage += BoxConnConfig_ShowMessage;

            dictBoxConnStr = new Dictionary <string, string>();

            GetBoxConnStringCommand = new DelegateCommand();
            GetBoxConnStringCommand.ExecuteAction = GetBoxConnString;

            StartDataSyncCommand = new DelegateCommand();
            StartDataSyncCommand.ExecuteAction  = Start;
            StartDataSyncCommand.CanExecuteFunc = new Func <object, bool>((object obj) => { return(canExecute); });

            StopDataSyncCommand = new DelegateCommand();
            StopDataSyncCommand.ExecuteAction  = Stop;
            StopDataSyncCommand.CanExecuteFunc = new Func <object, bool>((object obj) => { return(canExecute); });
        }