Ejemplo n.º 1
0
        public ServiceModeViewModel()
        {
            SystemBusWriteCommand = new SystemBusWriteCommand(this);
            SystemBusReadCommand  = new SystemBusReadCommand(this);
            PsuOffCommand         = new PsuOffCommand(this);
            PsuOnCommand          = new PsuOnCommand(this);
            ResetOffCommand       = new ResetOffCommand(this);
            ResetOnCommand        = new ResetOnCommand(this);
            AnalGenRunCommand     = new AnalGenRunCommand(this);
            AnalGenOnCommand      = new AnalGenRunCommand(this);
            AnalGenOffCommand     = new AnalGenRunCommand(this);
            ChangeCommand         = new ChangeCommand(this);
            FcnGenOffCommand      = new FcnGenOffCommand(this);
            FcnGenOnCommand       = new FcnGenOnCommand(this);
            ModulInitCommand      = new ModulInitCommand(this);

            ChannelTypes   = XmlFilterServiceMode.Instance.GetChannelNames();
            FrequencyTypes = XmlFilterServiceMode.Instance.GetDefaultValuesByTag("frequency");
            AmplitudeTypes = XmlFilterServiceMode.Instance.GetDefaultValuesByTag("amplitude");

            SM_UIElementCollectionHelper = new UIElementCollectionHelper(this);
            SM_UIElementCollectionHelper.SM_UIElementVisibilityUpdater(UIElementStateVariations.PsuBeforeClickOn);
        }
Ejemplo n.º 2
0
        public MeasureModeViewModel()
        {
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-us");
            ConnectCommand    = new ConnectCommand(this);
            DisConnectCommand = new DisConnectCommand(this);
            MeasureOffCommand = new MeasureOffCommand(this);
            MeasureOnCommand  = new MeasureOnCommand(this);
            RunCommand        = new RunCommand(this);

            AvailablePorts = SerialCommunicationSettings.ListOfSerialPorts();
            BaudRates      = SerialCommunicationSettings.ListOfSerialBaudRates();
            CardTypes      = XmlFilter.Instance.GetCardTypeNames();

            UpdateTimeUI();
            UIElementCollectionHelper = new UIElementCollectionHelper(this);
            UIElementCollectionHelper.UIElementVisibilityUpdater(UIElementStateVariations.ConnectBeforeClick);

            ReadingSerialState();

            ReportDataCollector.InitializeLists();
            IsRunningNow      = GeneralMessageCollection.IsRunningStateChecker(false);
            _stopWatchTimeOut = new Stopwatch();
            this._udp         = new Udp();
        }