コード例 #1
0
        public WcLimitSetup(CLDC_Comm.Enum.Cus_PowerYuanJian Yj, CLDC_DataCore.DataBase.clsWcLimitDataControl WcLimit)
        {
            InitializeComponent();
            _WC = WcLimit;
            _Yj = Yj;

            #region 初始化表格样式


            List <string> _Glyss = CLDC_DataCore.Const.GlobalUnit.g_SystemConfig.GlysZiDian.getGlysName();
            _Columns = new string[_Glyss.Count];
            for (int i = 0; i < _Glyss.Count; i++)
            {
                _Columns[i] = _Glyss[i];
            }

            List <string> _xIbs = CLDC_DataCore.Const.GlobalUnit.g_SystemConfig.xIbDic.getxIb();

            _Rows = new string[_xIbs.Count];

            for (int i = 0; i < _xIbs.Count; i++)
            {
                _Rows[i] = _xIbs[i];
            }
            _xIbs = null;
            #endregion
        }
コード例 #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="TaiType">台体类型0-三相台,1-单相台</param>
 public UI_FA_WcLimit(int TaiType)
 {
     _TaiType = TaiType;
     WcLimit  = new CLDC_DataCore.DataBase.clsWcLimitDataControl();
     InitializeComponent();
     this.DefaultControlStyle();
 }
コード例 #3
0
 private void UI_FA_WcLimit_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (WcLimit != null)
     {
         WcLimit.Close();
     }
     WcLimit = null;
 }
コード例 #4
0
        /// <summary>
        /// 获取当前被检点的误差限
        /// </summary>
        /// <param name="WcLimitName">误差限名称</param>
        /// <param name="GuiChengName">规程名称</param>
        /// <param name="Dj">等级1.0(2.0)</param>
        /// <param name="Hgq">是否经互感器接入</param>
        public void SetWcx(string WcLimitName
                           , string GuiChengName
                           , string Dj
                           , bool Hgq)
        {
            string[] Arr_Dj = CLDC_DataCore.Function.Number.getDj(Dj);

            bool YouGong = true;

            if (((int)this.PowerFangXiang) > 2)
            {
                YouGong = false;
            }

            if (WcLimitName == "规程误差限")
            {
                string _Wcx = "";

                _Wcx = CLDC_DataCore.DataBase.clsWcLimitDataControl.Wcx(this.PowerDianLiu
                                                                        , GuiChengName
                                                                        , (int)this.PowerFangXiang > 2 ? Arr_Dj[1] : Arr_Dj[0]
                                                                        , this.PowerYuanJian, this.PowerYinSu, Hgq, YouGong);
                this.SetWcx(float.Parse(_Wcx), float.Parse(string.Format("-{0}", _Wcx)));       //设置误差限
            }
            else
            {
                CLDC_DataCore.DataBase.clsWcLimitDataControl _WcLimit = new CLDC_DataCore.DataBase.clsWcLimitDataControl();

                CLDC_DataCore.DataBase.IDAndValue   _WcLimitName  = _WcLimit.getWcLimitNameValue(WcLimitName);
                CLDC_DataCore.DataBase.IDAndValue   _GuiChengName = _WcLimit.getGuiChengValue(GuiChengName);
                CLDC_DataCore.DataBase.IDAndValue[] _DjValue      = new CLDC_DataCore.DataBase.IDAndValue[2];
                _DjValue[0] = _WcLimit.getDjValue(Arr_Dj[0]);
                _DjValue[1] = _WcLimit.getDjValue(Arr_Dj[1]);
                CLDC_DataCore.DataBase.IDAndValue _GlysValue = new CLDC_DataCore.DataBase.IDAndValue();
                CLDC_DataCore.DataBase.IDAndValue _xIbValue  = new CLDC_DataCore.DataBase.IDAndValue();

                _GlysValue.Value = this.PowerYinSu;                        //功率因素字符串
                _GlysValue.id    = long.Parse(this.PrjID.Substring(3, 2)); //ID是从prjid中的第三位起,取2位
                _xIbValue.Value  = this.PowerDianLiu;                      //电流倍数字符串
                _xIbValue.id     = long.Parse(this.PrjID.Substring(5, 2)); //ID是从PrjID中的第5位起,取2位

                string[] _Wcx = _WcLimit.GetWcx(_WcLimitName
                                                , _GuiChengName
                                                , !YouGong ? _DjValue[1] : _DjValue[0]
                                                , this.PowerYuanJian
                                                , Hgq
                                                , YouGong
                                                , _GlysValue
                                                , _xIbValue).Split('|');
                this.SetWcx(float.Parse(_Wcx[0].Replace("+", "")), float.Parse(_Wcx[1]));       //设置误差限


                _WcLimit.Close();
                _WcLimit = null;
            }
        }
コード例 #5
0
        /// <summary>
        /// 加载误差限信息(在初始化UI和误差限更改的时候重载)
        /// </summary>
        private void LoadWcLimit()
        {
            CLDC_DataCore.DataBase.clsWcLimitDataControl _WcLimit = new CLDC_DataCore.DataBase.clsWcLimitDataControl();

            List <CLDC_DataCore.DataBase.IDAndValue> _WcLimitNames = _WcLimit.WcLimitName();

            Cmb_WcLimit.Items.Clear();

            Cmb_WcLimit.Items.Add("规程误差限");
            for (int i = 0; i < _WcLimitNames.Count; i++)
            {
                Cmb_WcLimit.Items.Add(_WcLimitNames[i].Value);
            }

            Cmb_WcLimit.SelectedIndex = 0;

            _WcLimit.Close();
            _WcLimit = null;
        }
コード例 #6
0
        /// <summary>
        /// 信息加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UI_FA_WcLimit_Load(object sender, EventArgs e)
        {
            CLDC_DataCore.DataBase.clsWcLimitDataControl _Wc = new CLDC_DataCore.DataBase.clsWcLimitDataControl();

            List <CLDC_DataCore.DataBase.IDAndValue> _WcLimitNames = _Wc.WcLimitName();

            for (int i = 0; i < _WcLimitNames.Count; i++)
            {
                TreeNode _Node = Tvw_Limit.Nodes.Add(_WcLimitNames[i].Value);
                _Node.Tag = _WcLimitNames[i];
            }
            if (Tvw_Limit.Nodes.Count > 0)
            {
                Tvw_Limit.SelectedNode = Tvw_Limit.Nodes[0];
                this.SetWcParmControl(true);
                this.SetWcLimitInfo((CLDC_DataCore.DataBase.IDAndValue)Tvw_Limit.SelectedNode.Tag);
            }
            Lab_Info.Text = string.Format("内控误差限文件数量:  {0:D} 个", Tvw_Limit.Nodes.Count);
        }
コード例 #7
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="FaList">方案列表</param>
        /// <param name="CzFzd">参照负载点</param>
        /// <param name="CzQs">参照圈数</param>
        public WcPrjView(ref CLDC_DataCore.Model.DnbModel.DnbGroupInfo MeterGroup)
        {
            _DnbGroup = MeterGroup;

            InitializeComponent();

            #region 加载电流倍数字典列表
            CLDC_DataCore.SystemModel.Item.csxIbDic _xIbDic = new CLDC_DataCore.SystemModel.Item.csxIbDic();
            _xIbDic.Load();
            List <string> _xIbs = _xIbDic.getxIb();
            Cmb_xIb.Items.Clear();
            for (int i = 0; i < _xIbs.Count; i++)
            {
                Cmb_xIb.Items.Add(_xIbs[i]);
            }

            _xIbs = null;

            _xIbDic = null;
            #endregion


            #region 加载误差限列表

            CLDC_DataCore.DataBase.clsWcLimitDataControl _WcLimit = new CLDC_DataCore.DataBase.clsWcLimitDataControl();

            List <CLDC_DataCore.DataBase.IDAndValue> _WcLimitNames = _WcLimit.WcLimitName();

            Cmb_WcLimit.Items.Add("规程误差限");

            for (int i = 0; i < _WcLimitNames.Count; i++)
            {
                Cmb_WcLimit.Items.Add(_WcLimitNames[i].Value);
            }

            _WcLimitNames = null;

            _WcLimit = null;

            #endregion

            this.CreateFaInfo();
        }
コード例 #8
0
 public WcLimitSetup(CLDC_DataCore.DataBase.clsWcLimitDataControl WcLimit)
 {
     InitializeComponent();
     _WC = WcLimit;
 }
コード例 #9
0
 public UI_FA_WcLimit()
 {
     InitializeComponent();
     WcLimit = new CLDC_DataCore.DataBase.clsWcLimitDataControl();
     this.DefaultControlStyle();
 }