/// <summary> /// 拷贝方案 /// </summary> /// <returns></returns> public CLDC_DataCore.Model.Plan.Plan_WcPoint Copy() { CLDC_DataCore.Model.Plan.Plan_WcPoint _Obj = new CLDC_DataCore.Model.Plan.Plan_WcPoint((int)TaiType, ""); if (this.WcSetup_H != null) { _Obj = this.WcSetup_H.GetFaInfo(); } if (!CLDC_DataCore.Function.Number.IsNumeric(Txt_Qs.Text)) { _Obj.Czqs = 1; } else { _Obj.Czqs = int.Parse(Txt_Qs.Text); } _Obj.CzWcLimit = Cmb_WcLimit.Text; _Obj.CzCheckOutTime = Cmb_CheckOutTime.Text; _Obj.Qscz = Cmb_xIb.Text; _Obj.SetPram((int)base.TaiType, base.FaName); return(_Obj); }
/// <summary> /// /// </summary> /// <param name="Ttype">台体类型</param> /// <param name="FaItem">方案项目</param> public UI_Error(CLDC_Comm.Enum.Cus_TaiType Ttype, CLDC_DataCore.Model.Plan.Plan_WcPoint FaItem) : base(Ttype, FaItem.Name) { InitializeComponent(); this.InitUI(); this.LoadFA(FaItem); }
/// <summary> /// 设置误差方案项目 (目前未使用!!) /// </summary> /// <param name="CheckPoint"></param> public void CreateWcChecked(ref CLDC_DataCore.Model.Plan.Plan_WcPoint CheckPoint) { if (_PointCount == 0) { return; } for (int Col = 0; Col < DGW_FA.Columns.Count; Col++) { for (int Row = 0; Row < DGW_FA.Rows.Count; Row++) { if (Row == _intPcRpw) { continue; } //if (DGW_FA.Rows[Row].Cells[Col].Style.BackColor == Color.DarkGreen) if (IsSelect(DGW_FA.Rows[Row].Cells[Col])) { CheckPoint.Add((CLDC_Comm.Enum.Cus_WcType) int.Parse((Row / (float)_intPcRpw) < 1 ? "1" : "2") , _Glfx , _Yj , DGW_FA.Rows[Row].HeaderCell.Value.ToString() , DGW_FA.Columns[Col].HeaderCell.Value.ToString() , 0 , 0); } } } }
/// <summary> /// 设置方案列表选择情况 /// </summary> /// <param name="CheckPoint"></param> public void SetWcChecked(CLDC_DataCore.Model.Plan.Plan_WcPoint CheckPoint) { _PointCount = 0; this.Tag = CheckPoint; if (CheckPoint.Count == 0) { PointCountChange(DGW_FA, _PointCount); for (int Col = 0; Col < DGW_FA.Columns.Count; Col++) { for (int Row = 0; Row < DGW_FA.Rows.Count; Row++) { if (Row == _intPcRpw) { continue; } //DGW_FA.Rows[Row].Cells[Col].Style.BackColor = Color.White; SelectPoint(DGW_FA.Rows[Row].Cells[Col], false); } } return; } for (int Col = 0; Col < DGW_FA.Columns.Count; Col++) { for (int Row = 0; Row < DGW_FA.Rows.Count; Row++) { if (Row == _intPcRpw) { continue; } string _PrjID = string.Format("{0}{1:D}{2:D}{3}{4}00" , ((Row / (float)_intPcRpw) < 1?"1":"2") , (int)_Glfx , (int)_Yj , DGW_FA.Rows[Row].HeaderCell.Tag.ToString() , DGW_FA.Columns[Col].Tag.ToString()); if (CheckPoint.CheckedYn(_PrjID)) { //DGW_FA.Rows[Row].Cells[Col].Style.BackColor = Color.DarkGreen; SelectPoint(DGW_FA.Rows[Row].Cells[Col], true); _PointCount++; //选中数量++ if (CheckPoint.CheckedFHC(_PrjID)) { SelectPointFHC(DGW_FA.Rows[Row].Cells[Col], true); } } else { //DGW_FA.Rows[Row].Cells[Col].Style.BackColor = Color.White; SelectPoint(DGW_FA.Rows[Row].Cells[Col], false); } } } PointCountChange(DGW_FA, _PointCount); }
/// <summary> /// 方案加载 /// </summary> /// <param name="FaItem">方案项目</param> public void LoadFA(CLDC_DataCore.Model.Plan.Plan_WcPoint FaItem) { base.FaName = FaItem.Name; Cmb_Fa.SelectedIndex = 0; try { Cmb_Fa.Text = FaItem.Name; } catch { Cmb_Fa.SelectedIndex = 0; } if (FaItem.Count > 0) { StPlan_WcPoint _Item = FaItem.getCheckPoint(0); switch (_Item.PowerFangXiang) { case CLDC_Comm.Enum.Cus_PowerFangXiang.正向有功: this.ToolGLFX_Click(Tab_Pz, new EventArgs()); break; case CLDC_Comm.Enum.Cus_PowerFangXiang.反向有功: this.ToolGLFX_Click(Tab_Pf, new EventArgs()); break; case CLDC_Comm.Enum.Cus_PowerFangXiang.正向无功: this.ToolGLFX_Click(Tab_Qz, new EventArgs()); break; case CLDC_Comm.Enum.Cus_PowerFangXiang.反向无功: this.ToolGLFX_Click(Tab_Qf, new EventArgs()); break; case CLDC_Comm.Enum.Cus_PowerFangXiang.第一象限无功: this.ToolGLFX_Click(Tab_Q1, new EventArgs()); break; case CLDC_Comm.Enum.Cus_PowerFangXiang.第二象限无功: this.ToolGLFX_Click(Tab_Q2, new EventArgs()); break; case CLDC_Comm.Enum.Cus_PowerFangXiang.第三象限无功: this.ToolGLFX_Click(Tab_Q3, new EventArgs()); break; case CLDC_Comm.Enum.Cus_PowerFangXiang.第四象限无功: this.ToolGLFX_Click(Tab_Q4, new EventArgs()); break; } } else { this.ToolGLFX_Click(Tab_Pz, new EventArgs()); } this.Cmb_xIb.Text = FaItem.Qscz; //参照电流 this.Txt_Qs.Text = FaItem.Czqs.ToString(); //参照圈数 this.Cmb_WcLimit.Text = FaItem.CzWcLimit; //参照误差限 this.Cmb_CheckOutTime.Text = FaItem.CzCheckOutTime; #region --------设置功率方向按钮样式------------- this.SetGlfxImageStyle(FaItem.YaoJianGlfx(CLDC_Comm.Enum.Cus_PowerFangXiang.正向有功), Tab_Pz); this.SetGlfxImageStyle(FaItem.YaoJianGlfx(CLDC_Comm.Enum.Cus_PowerFangXiang.反向有功), Tab_Pf); this.SetGlfxImageStyle(FaItem.YaoJianGlfx(CLDC_Comm.Enum.Cus_PowerFangXiang.正向无功), Tab_Qz); this.SetGlfxImageStyle(FaItem.YaoJianGlfx(CLDC_Comm.Enum.Cus_PowerFangXiang.反向无功), Tab_Qf); this.SetGlfxImageStyle(FaItem.YaoJianGlfx(CLDC_Comm.Enum.Cus_PowerFangXiang.第一象限无功), Tab_Q1); this.SetGlfxImageStyle(FaItem.YaoJianGlfx(CLDC_Comm.Enum.Cus_PowerFangXiang.第二象限无功), Tab_Q2); this.SetGlfxImageStyle(FaItem.YaoJianGlfx(CLDC_Comm.Enum.Cus_PowerFangXiang.第三象限无功), Tab_Q3); this.SetGlfxImageStyle(FaItem.YaoJianGlfx(CLDC_Comm.Enum.Cus_PowerFangXiang.第四象限无功), Tab_Q4); #endregion if (this.WcSetup_H != null) { this.WcSetup_H.SetWcChecked(FaItem); } if (this.WcSetup_A != null) { this.WcSetup_A.SetWcChecked(FaItem); } if (this.WcSetup_B != null) { this.WcSetup_B.SetWcChecked(FaItem); } if (this.WcSetup_C != null) { this.WcSetup_C.SetWcChecked(FaItem); } }
/// <summary> /// 方案加载 /// </summary> /// <param name="FAName">方案名称</param> public void LoadFA(string FAName) { CLDC_DataCore.Model.Plan.Plan_WcPoint _CheckPoint = new CLDC_DataCore.Model.Plan.Plan_WcPoint((int)base.TaiType, FAName); //打开一个方案 this.LoadFA(_CheckPoint); }