public UI_PrepareTest(CLDC_Comm.Enum.Cus_TaiType Ttype, CLDC_DataCore.Model.Plan.Plan_PrepareTest FaItem)
     : base(Ttype, FaItem.Name)
 {
     InitializeComponent();
     this.InitUI();
     this.LoadFA(FaItem);
 }
 public override void LoadFA(CLDC_DataCore.Model.Plan.Plan_PrepareTest FaItem)
 {
     base.LoadFA(FaItem);
     if (base.Parm == string.Empty)
     {
         return;
     }
     this.Parm = base.Parm;
 }
            /// <summary>
            /// 拷贝需要检定的方案
            /// </summary>
            /// <param name="TaiType"></param>
            /// <param name="FaName"></param>
            /// <returns></returns>
            public CLDC_DataCore.Model.Plan.Plan_PrepareTest Copy(CLDC_Comm.Enum.Cus_TaiType TaiType, string FaName)
            {
                CLDC_DataCore.Model.Plan.Plan_PrepareTest Dgn = new CLDC_DataCore.Model.Plan.Plan_PrepareTest((int)TaiType, "");           //创建一个新的多功能方案

                for (int i = 0; i < DgnControls.Count; i++)
                {
                    PrjUI.PrjPrePare.PreBase Item = DgnControls[i];
                    if (Item.IsCheck)
                    {
                        Dgn.Add(Item.DgnID, Item.DgnName, Item.DgnPlanPrj.OutPramerter.Jion(), Item.Parm);
                    }
                }
                Dgn.SetPram((int)TaiType, FaName);
                return(Dgn);
            }
        /// <summary>
        /// 方案加载
        /// </summary>
        /// <param name="FaItem">方案项目</param>
        public void LoadFA(CLDC_DataCore.Model.Plan.Plan_PrepareTest FaItem)
        {
            base.FaName = FaItem.Name;

            try
            {
                Cmb_Fa.Text = FaItem.Name;
            }
            catch
            {
                Cmb_Fa.SelectedIndex = 0;
            }

            this.DgnControlUI.LoadFA(FaItem);
        }
示例#5
0
 /// <summary>
 /// 加载方案
 /// </summary>
 /// <param name="FaItem"></param>
 public virtual void LoadFA(CLDC_DataCore.Model.Plan.Plan_PrepareTest FaItem)
 {
     for (int i = 0; i < FaItem.Count; i++)
     {
         if (this._DgnItem.DgnPrjID == FaItem.getDgnPrj(i).PrePrjID)
         {
             this.SetCheck(true);
             this._Parm = FaItem.getDgnPrj(i).PrjParm;
             if (this.PrjSort != null)
             {
                 PrjSort(this, i);
             }
             return;
         }
     }
 }
            /// <summary>
            /// 方案加载
            /// </summary>
            /// <param name="FaItem"></param>
            public void LoadFA(CLDC_DataCore.Model.Plan.Plan_PrepareTest FaItem)
            {
                DgnControlsSort = new SortedDictionary <int, CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.PreBase>();
                for (int i = 0; i < DgnControls.Count; i++)
                {
                    DgnControls[i].LoadFA(FaItem);
                }


                foreach (int i in DgnControlsSort.Keys)
                {
                    DgnControls.Remove(DgnControlsSort[i]);
                    DgnControls.Insert(i, DgnControlsSort[i]);
                }
                this.Sort();
                DgnControlsSort = null;
            }
        /// <summary>
        /// 方案加载
        /// </summary>
        /// <param name="faname">方案名称</param>
        public void LoadFA(string faname)
        {
            CLDC_DataCore.Model.Plan.Plan_PrepareTest _Dgn = new CLDC_DataCore.Model.Plan.Plan_PrepareTest((int)base.TaiType, faname);

            this.LoadFA(_Dgn);
        }