Example #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);
        }
Example #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);
        }
Example #3
0
        public PrimConfigControl(FocalSpecConfig config, FSCoreConfig fsCoreConfig, PrimFocalSpec prim)
        {
            InitializeComponent();

            _config        = config;
            _fsCoreConfig  = fsCoreConfig;
            _primFocalSpec = prim;
        }
Example #4
0
        public int ImportConfig(XmlNode xmlNode)
        {
            var iRet = 0;

            if (xmlNode != null)
            {
                _config = XMLHelper.XMLToObject(xmlNode, typeof(FocalSpecConfig)) as FocalSpecConfig;
            }
            else
            {
                return(-1);
            }
            return(iRet);
        }