Example #1
0
        /// <summary>
        /// 加载智能表功能配置字典
        /// </summary>
        public void Load()
        {
            string  _ErrorString = "";
            XmlNode _XmlNode     = clsXmlControl.LoadXml(Application.StartupPath + Const.Variable.CONST_FUNCTIONDICTIONARY, out _ErrorString);

            if (_ErrorString != "" || _XmlNode.ChildNodes.Count < 6)             //新增加5条
            {
                #region 初始化智能表功能参数信息
                _XmlNode = clsXmlControl.CreateXmlNode("FunctionConfig");
                _XmlNode.AppendChild(clsXmlControl.CreateXmlNode("R", "ID", "001", "Name", "计量功能", "OutPramerter", "1|1|1|0Ib|1.0"));
                _XmlNode.AppendChild(clsXmlControl.CreateXmlNode("R", "ID", "002", "Name", "计时功能", "OutPramerter", "1|1|1|0Ib|1.0"));
                _XmlNode.AppendChild(clsXmlControl.CreateXmlNode("R", "ID", "003", "Name", "显示功能", "OutPramerter", "1|1|1|0Ib|1.0"));
                _XmlNode.AppendChild(clsXmlControl.CreateXmlNode("R", "ID", "004", "Name", "费率时段功能", "OutPramerter", "1|1|1|Imax|1.0"));
                _XmlNode.AppendChild(clsXmlControl.CreateXmlNode("R", "ID", "005", "Name", "脉冲输出功能", "OutPramerter", "1|1|1|0Ib|1.0"));
                _XmlNode.AppendChild(clsXmlControl.CreateXmlNode("R", "ID", "006", "Name", "最大需量功能", "OutPramerter", "1|1|1|0Ib|1.0"));



                clsXmlControl.SaveXml(_XmlNode, Application.StartupPath + Const.Variable.CONST_FUNCTIONDICTIONARY);
                #endregion
            }
            _FunctionConfig.Clear();
            for (int _i = 0; _i < _XmlNode.ChildNodes.Count; _i++)
            {
                Struct.StFunctionConfig _Function = new CLDC_DataCore.Struct.StFunctionConfig();
                _Function.FunctionPrjID   = _XmlNode.ChildNodes[_i].Attributes[0].Value;
                _Function.FunctionPrjName = _XmlNode.ChildNodes[_i].Attributes[1].Value;
                _Function.OutPramerter    = new CLDC_DataCore.Struct.StPowerPramerter();
                _Function.OutPramerter.Split(_XmlNode.ChildNodes[_i].Attributes[2].Value);
                _FunctionConfig.Add(_Function.FunctionPrjID, _Function);
            }
        }
Example #2
0
 public FcShow(CLDC_DataCore.Struct.StFunctionConfig FunctionItem)
     : base(FunctionItem)
 {
     InitializeComponent();
     base.Init(Dgv_Data, Cmd_MoveUp, Cmd_MoveDown);
     base.SetPanel = Panel_Back;
     this.InitPrj();
 }
 public NotParmPrj(CLDC_DataCore.Struct.StFunctionConfig Item)
     : base(Item)
 {
     InitializeComponent();
     base.SetPanel = Panel_Back;
 }
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="DgnItem"></param>
 public FunctionBase(CLDC_DataCore.Struct.StFunctionConfig FunctionItem)
 {
     InitializeComponent();
     _FunctionItem = FunctionItem;
 }