示例#1
0
        /// <summary>
        /// 加载默认的初始信息
        /// </summary>
        private void LoadPretermitInf()
        {
            try
            {
                // 20171115
                //绑定系统名称
                var systemName = EnumService.GetEnum(21);
                SystemName.Properties.DataSource = systemName;
                SystemName.Properties.NullText   = "未选择";

                Dictionary <int, EnumcodeInfo> temp;
                for (int i = 0; i <= 128; i++)
                {
                    CcmbAnalogNum.Properties.Items.Add(i.ToString());  //模开量
                    CcmbControlNum.Properties.Items.Add(i.ToString()); //控制量
                    CcmbArticalNum.Properties.Items.Add(i.ToString()); //智能量
                    CcmbPersonNum.Properties.Items.Add(i.ToString());  //人员量
                }
                Dictionary <int, EnumcodeInfo> tempDriver = Model.DEVServiceModel.QueryDriverInf();
                if (null != tempDriver)
                {
                    foreach (var item in tempDriver.Values)
                    {
                        if (item.LngEnumValue == 0)
                        {
                            continue;
                        }
                        CcmbDriverID.Properties.Items.Add(item.LngEnumValue.ToString() + "." + item.StrEnumDisplay);
                    }
                }
                temp = Model.DEVServiceModel.QueryDevMoelsCache();
                this.CcmbDevID.Properties.Items.Add("");
                foreach (var item in temp.Values)
                {
                    if (item.LngEnumValue > 1000)                                                                                                                            //txy 20170323
                    {
                        this.CcmbDevID.Properties.Items.Add(item.LngEnumValue.ToString().Substring(3, item.LngEnumValue.ToString().Length - 3) + "." + item.StrEnumDisplay); //增加设备型号
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error("加载默认的初始信息【LoadPretermitInf】分站", ex);
            }
        }
示例#2
0
        /// <summary>
        /// 加载测点的默认信息函数
        /// </summary>
        public override void LoadPretermitInf()
        {
            //加载识别器类型
            if (pointTypeEnum.Count < 1)
            {
                pointTypeEnum = EnumService.GetEnum(22);
            }
            foreach (var item in pointTypeEnum)
            {
                comboPersonPointType.Properties.Items.Add(item.LngEnumValue.ToString() + "." + item.StrEnumDisplay);
            }
            comboPersonPointType.SelectedIndex = 0;
            //加载默认报警时间
            AlarmTime.Text = "08:00";
            //加载默认离开时间
            LeaveTime.Text = "08:00";
            //加载默认报警类型
            AlarmType.SelectedIndex = 0;
            //加载默认超员报警人数
            RatedPersonCount.Value = 0;

            restrictedpersonInfoList = new List <R_RestrictedpersonInfo>();
        }