示例#1
0
        public PrimFocalSpec(XmlNode configNode)
        {
            if (configNode != null)
            {
                _config = XMLHelper.XMLToObject(configNode, typeof(FocalSpecConfig)) as FocalSpecConfig;
            }
            else
            {
                return;
            }

            if (!string.IsNullOrEmpty(_config.BasicConfigPath))
            {
                var iRet = ImportFSCoreConfig(_config.BasicConfigPath);
            }
            else
            {
                _fsCoreConfig = new FSCoreConfig();
            }

            _fsCoreModel = new FSCoreModel(_fsCoreConfig);

            PrimConfigUI = new PrimConfigControl(_config, _fsCoreConfig, this);
            PrimDebugUI  = new PrimDebugControl();
            PrimOutputUI = new PrimOutputControl();

            ((PrimConfigControl)PrimConfigUI)._fsCoreConfig = _fsCoreConfig;
            _fsCoreModel._fsCoreConfig = _fsCoreConfig;

            PrimConnStat = PrimConnState.Other;
            PrimRunStat  = PrimRunState.Other;

            ((PrimConfigControl)PrimConfigUI).SetPrimConnState(PrimConnStat);
            ((PrimConfigControl)PrimConfigUI).SetPrimRunState(PrimRunStat);
        }
示例#2
0
        public PrimFocalSpec()
        {
            _config = new FocalSpecConfig();

            if (!string.IsNullOrEmpty(_config.BasicConfigPath))
            {
                var iRet = ImportFSCoreConfig(_config.BasicConfigPath);
            }
            else
            {
                _fsCoreConfig = new FSCoreConfig();
            }

            _fsCoreModel = new FSCoreModel(_fsCoreConfig);

            PrimConfigUI = new PrimConfigControl(_config, _fsCoreConfig, this);
            PrimDebugUI  = new PrimDebugControl();
            PrimOutputUI = new PrimOutputControl();

            ((PrimConfigControl)PrimConfigUI)._fsCoreConfig = _fsCoreConfig;
            _fsCoreModel._fsCoreConfig = _fsCoreConfig;

            PrimConnStat = PrimConnState.Other;
            PrimRunStat  = PrimRunState.Other;

            ((PrimConfigControl)PrimConfigUI).SetPrimConnState(PrimConnStat);
            ((PrimConfigControl)PrimConfigUI).SetPrimRunState(PrimRunStat);
        }