protected void LoadFooterCtrl(PlaceHolder plcHolder, ControlLocation CtrlKey) { string sControlPath = String.Empty; CarrotCakeConfig config = CarrotCakeConfig.GetConfig(); switch (CtrlKey) { case ControlLocation.PublicFooter: sControlPath = config.AdminFooterControls.ControlPathPublic; break; case ControlLocation.PopupFooter: sControlPath = config.AdminFooterControls.ControlPathPopup; break; case ControlLocation.MainFooter: sControlPath = config.AdminFooterControls.ControlPathMain; break; } if (!String.IsNullOrEmpty(sControlPath)) { if (File.Exists(Server.MapPath(sControlPath))) { Control ctrl = new Control(); ctrl = Page.LoadControl(sControlPath); plcHolder.Controls.Add(ctrl); } } }
protected void InsertSpecialCtrl(Control control, ControlLocation CtrlKey) { string sControlPath = String.Empty; CarrotCakeConfig config = CarrotCakeConfig.GetConfig(); switch (CtrlKey) { case ControlLocation.Header: sControlPath = config.PublicSiteControls.ControlPathHeader; break; case ControlLocation.Footer: sControlPath = config.PublicSiteControls.ControlPathFooter; break; } if (!String.IsNullOrEmpty(sControlPath)) { if (File.Exists(HttpContext.Current.Server.MapPath(sControlPath))) { Control ctrl = new Control(); ctrl = CurrentWebPage.LoadControl(sControlPath); control.Controls.Add(ctrl); } } }
protected void LoadFooterCtrl(PlaceHolder plcHolder, ControlLocation CtrlKey) { string sControlPath = String.Empty; CarrotCakeConfig config = CarrotCakeConfig.GetConfig(); switch (CtrlKey) { case ControlLocation.PublicFooter: sControlPath = config.AdminFooterControls.ControlPathPublic; break; case ControlLocation.PopupFooter: sControlPath = config.AdminFooterControls.ControlPathPopup; break; case ControlLocation.MainFooter: sControlPath = config.AdminFooterControls.ControlPathMain; break; } if (!String.IsNullOrEmpty(sControlPath)) { if (File.Exists(Server.MapPath(sControlPath))) { Control ctrl = new Control(); ctrl = Page.LoadControl(sControlPath); plcHolder.Controls.Add(ctrl); } } }
/// <summary> /// UI初始化 /// </summary> private void InitUI() { base.FaNameCombInit(Cmb_Fa, CLDC_DataCore.Const.Variable.CONST_FA_FZ_FOLDERNAME); PrjUI.PrjFreeze.FreezeBase Item; FreezeControlUI = new ControlLocation(pnl_Prjs); CLDC_DataCore.SystemModel.Item.csFreezeDic _FreezeItem = new CLDC_DataCore.SystemModel.Item.csFreezeDic(); _FreezeItem.Load(); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFreeze.FreezeTiming(_FreezeItem.getFreezePrj(((int)CLDC_Comm.Enum.Cus_FreezeItem.定时冻结).ToString("000"))); this.pnl_Prjs.Controls.Add(Item); FreezeControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFreeze.NotParmPrj(_FreezeItem.getFreezePrj(((int)CLDC_Comm.Enum.Cus_FreezeItem.约定冻结).ToString("000"))); this.pnl_Prjs.Controls.Add(Item); FreezeControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFreeze.NotParmPrj(_FreezeItem.getFreezePrj(((int)CLDC_Comm.Enum.Cus_FreezeItem.瞬时冻结).ToString("000"))); this.pnl_Prjs.Controls.Add(Item); FreezeControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFreeze.NotParmPrj(_FreezeItem.getFreezePrj(((int)CLDC_Comm.Enum.Cus_FreezeItem.日冻结).ToString("000"))); this.pnl_Prjs.Controls.Add(Item); FreezeControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFreeze.NotParmPrj(_FreezeItem.getFreezePrj(((int)CLDC_Comm.Enum.Cus_FreezeItem.整点冻结).ToString("000"))); this.pnl_Prjs.Controls.Add(Item); FreezeControlUI.Add(Item); FreezeControlUI.Sort(); this.SizeChanged += new EventHandler(UI_Freeze_SizeChanged); }
/// <summary> /// UI初始化 /// </summary> private void InitUI() { base.FaNameCombInit(Cmb_Fa, CLDC_DataCore.Const.Variable.CONST_FA_GN_FOLDERNAME); PrjUI.PrjFunction.FunctionBase Item; FunctionControlUI = new ControlLocation(Panel_Prjs); CLDC_DataCore.SystemModel.Item.csFunctionDic _FunctionItem = new CLDC_DataCore.SystemModel.Item.csFunctionDic(); _FunctionItem.Load(); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFunction.FunctionComm(_FunctionItem.getFunctionPrj(((int)CLDC_Comm.Enum.Cus_FunctionItem.计量功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); FunctionControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFunction.NotParmPrj(_FunctionItem.getFunctionPrj(((int)CLDC_Comm.Enum.Cus_FunctionItem.计时功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); FunctionControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFunction.FcShow(_FunctionItem.getFunctionPrj(((int)CLDC_Comm.Enum.Cus_FunctionItem.显示功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); FunctionControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFunction.NotParmPrj(_FunctionItem.getFunctionPrj(((int)CLDC_Comm.Enum.Cus_FunctionItem.费率时段功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); FunctionControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFunction.NotParmPrj(_FunctionItem.getFunctionPrj(((int)CLDC_Comm.Enum.Cus_FunctionItem.冲输出功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); FunctionControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjFunction.FunctionComm(_FunctionItem.getFunctionPrj(((int)CLDC_Comm.Enum.Cus_FunctionItem.最大需量功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); FunctionControlUI.Add(Item); //FunctionControlUI.Sort(); this.SizeChanged += new EventHandler(UI_Dgn_SizeChanged); }
/// <summary> /// 初始化UI /// </summary> private void InitUI() { base.FaNameCombInit(Cmb_Fa, CLDC_DataCore.Const.Variable.CONST_FA_TS_FOLDERNAME); Cmb_Fa.SelectionChangeCommitted += new EventHandler(Cmb_Fa_SelectionChangeCommitted); Cmd_ShowXieBo.Click += new EventHandler(Cmd_ShowXieBo_Click); Cmd_Clear.Click += new EventHandler(Cmd_Clear_Click); Cmd_AddNew.Click += new EventHandler(Cmd_AddNew_Click); SpecialControlUI = new ControlLocation(this.Panel_Items); }
public static ModalWindowControl GetButton(string text, ControlLocation location, ICommand command, object commandParameter) { var button = new Button { Command = command, CommandParameter = commandParameter, Content = text }; var result = new ModalWindowControl { Location = location, Item = button }; return(result); }
/// <summary> /// Add a color picker control to the feature /// </summary> /// <remarks> /// Color pickers do not use the value of the feature to operate. They use a control string; /// so the <see cref="targetValue"/> is superficial and does not correspond to the actual selected color. /// </remarks> /// <param name="targetValue">The value this control occupies on the feature.</param> /// <param name="location">The location of the control in the grid</param> /// <param name="controlUse">The specific use for this control</param> /// <returns>A FeatureFactory with the new color control added</returns> /// <exception cref="ArgumentException">Thrown when a control, targeting the specified value, already exists</exception> public FeatureFactory AddColorPicker(double targetValue, ControlLocation location = null, EControlUse controlUse = EControlUse.NotSpecified) { if (_feature.HasControlForValue(targetValue)) { throw new ArgumentException($"The value {targetValue} already has a control bound to it.", nameof(targetValue)); } var colorPicker = new StatusControl(EControlType.ColorPicker) { TargetValue = targetValue, ControlUse = controlUse, Location = location ?? new ControlLocation() }; _feature.AddStatusControl(colorPicker); return(this); }
/// <summary> /// Add a color picker control to the feature /// </summary> /// <remarks> /// Color pickers do not use the value of the feature to operate. They use a control string; /// so the <see cref="targetRange"/> is superficial and does not correspond to the actual selected color. /// </remarks> /// <param name="targetRange">The values this control occupies on the feature.</param> /// <param name="location">The location of the control in the grid</param> /// <param name="controlUse">The specific use for this control</param> /// <returns>A FeatureFactory with the new color control added</returns> /// <exception cref="ArgumentException">Thrown when a control, targeting the specified value, already exists</exception> public FeatureFactory AddColorPicker(ValueRange targetRange, ControlLocation location = null, EControlUse controlUse = EControlUse.NotSpecified) { if (_feature.HasControlForRange(targetRange)) { throw new ArgumentException($"Some or all of the values in the range {targetRange.Min}-{targetRange.Max} already has a control bound to it.", nameof(targetRange)); } var colorPicker = new StatusControl(EControlType.ColorPicker) { TargetRange = targetRange, IsRange = true, ControlUse = controlUse, Location = location ?? new ControlLocation() }; _feature.AddStatusControl(colorPicker); return(this); }
/// <summary> /// Sets a form location. /// </summary> /// <param name="form">The form.</param> /// <param name="location">The location.</param> static public void SetLocation(this Form form, ControlLocation location) { if (form is null) { return; } var area = SystemInformation.WorkingArea; switch (location) { case ControlLocation.TopLeft: form.Location = new Point(area.Left, area.Top); break; case ControlLocation.TopRight: form.Location = new Point(area.Left + area.Width - form.Width, area.Top); break; case ControlLocation.BottomLeft: form.Location = new Point(area.Left, area.Top + area.Height - form.Height); break; case ControlLocation.BottomRight: form.Location = new Point(area.Left + area.Width - form.Width, area.Top + area.Height - form.Height); break; case ControlLocation.Center: form.Center(area); break; case ControlLocation.Fixed: form.CenterToMainFormElseScreen(); break; case ControlLocation.Loose: break; default: throw new AdvancedNotImplementedException(location); } }
protected void InsertSpecialCtrl(Control control, ControlLocation CtrlKey) { string sControlPath = String.Empty; CarrotCakeConfig config = CarrotCakeConfig.GetConfig(); switch (CtrlKey) { case ControlLocation.Header: sControlPath = config.PublicSiteControls.ControlPathHeader; break; case ControlLocation.Footer: sControlPath = config.PublicSiteControls.ControlPathFooter; break; } if (!String.IsNullOrEmpty(sControlPath)) { if (File.Exists(HttpContext.Current.Server.MapPath(sControlPath))) { Control ctrl = new Control(); ctrl = CurrentWebPage.LoadControl(sControlPath); control.Controls.Add(ctrl); } } }
public FeatureFactory AddValueDropDown(ValueRange targetRange, ControlLocation location = null, EControlUse controlUse = EControlUse.NotSpecified) { if (targetRange == null) { throw new ArgumentNullException(nameof(targetRange)); } if (_feature.HasControlForRange(targetRange)) { throw new ArgumentException($"Some or all of the values in the range {targetRange.Min}-{targetRange.Max} already has a control bound to it.", nameof(targetRange)); } var dropDown = new StatusControl(EControlType.ValueRangeDropDown) { TargetRange = targetRange, ControlUse = controlUse, Location = location ?? new ControlLocation() }; _feature.AddStatusControl(dropDown); return(this); }
public FeatureFactory AddTextInputField(double targetValue, string hintText, ControlLocation location = null, EControlUse controlUse = EControlUse.NotSpecified) { if (string.IsNullOrWhiteSpace(hintText)) { throw new ArgumentNullException(nameof(hintText)); } if (_feature.HasControlForValue(targetValue)) { throw new ArgumentException($"The value {targetValue} already has a control bound to it.", nameof(targetValue)); } var textInput = new StatusControl(EControlType.TextBoxString) { TargetValue = targetValue, Label = hintText, ControlUse = controlUse, Location = location ?? new ControlLocation() }; _feature.AddStatusControl(textInput); return(this); }
//Add Controls public FeatureFactory AddButton(double targetValue, string targetStatus, ControlLocation location = null, EControlUse controlUse = EControlUse.NotSpecified) { if (string.IsNullOrWhiteSpace(targetStatus)) { throw new ArgumentNullException(nameof(targetStatus)); } if (_feature.HasControlForValue(targetValue)) { throw new ArgumentException($"The value {targetValue} already has a control bound to it.", nameof(targetValue)); } var button = new StatusControl(EControlType.Button) { TargetValue = targetValue, Label = targetStatus, ControlUse = controlUse, Location = location ?? new ControlLocation() }; _feature.AddStatusControl(button); return(this); }
/// <summary> /// UI初始化 /// </summary> private void InitUI() { base.FaNameCombInit(Cmb_Fa, CLDC_DataCore.Const.Variable.CONST_FA_PREPARE_FOLDERNAME); PrjUI.PrjPrePare.PreBase Item; DgnControlUI = new ControlLocation(Panel_Prjs); CLDC_DataCore.SystemModel.Item.csDgnDic _DgnItem = new CLDC_DataCore.SystemModel.Item.csDgnDic(); _DgnItem.Load(); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.通信测试).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.PreDayClock(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.日计时误差).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.费率时段检查).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.GPS对时).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.需量清空).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); //Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnReadDl(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.读取电量).ToString("000"))); //Item.PanelBackColor = Color.LightBlue; //Item.CaptionColor = Color.White; //Item.CaptionColorTwo = Color.LightBlue; //this.Panel_Prjs.Controls.Add(Item); //DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.电量清零).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); #region lsx Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj("正向有功"); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj("反向有功"); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj("正向无功"); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj("反向无功"); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); #endregion CLDC_DataCore.Struct.StDgnConfig stW = new CLDC_DataCore.Struct.StDgnConfig(); stW.DgnPrjID = ((int)CLDC_Comm.Enum.Cus_PrepareItem.接线检查).ToString("000"); stW.DgnPrjName = CLDC_Comm.Enum.Cus_PrepareItem.接线检查.ToString(); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjPrePare.NotParmPrj(stW); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); //DgnControlUI.Sort(); this.SizeChanged += new EventHandler(UI_Dgn_SizeChanged); }
/// <summary> /// UI初始化 /// </summary> private void InitUI() { base.FaNameCombInit(Cmb_Fa, CLDC_DataCore.Const.Variable.CONST_FA_EVENTLOG_FOLDERNAME); PrjUI.PrjEventLog.EventLogBase Item; EventLogControlUI = new ControlLocation(Panel_Prjs); CLDC_DataCore.SystemModel.Item.csEventLogDic _EventLogItem = new CLDC_DataCore.SystemModel.Item.csEventLogDic(); _EventLogItem.Load(); //失压 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.失压记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //过压 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.过压记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //欠压 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.压记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //失流 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.失流记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //断流 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.断流记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //过流记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.过流记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //过载 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.过载记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //断相 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.断相记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //掉电 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.掉电记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //全失压 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.全失压记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //电压不平衡记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.电压不平衡记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //电流不平衡记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.电流不平衡记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //电压逆相序记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.电压逆相序记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //电流逆相序记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.电流逆相序记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //开表盖记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.开表盖记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //开端钮盒记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.开端钮盒记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //编程 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.编程记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //校时记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.校时记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //需量清零记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.需量清零记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //事件清零记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.事件清零记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //电表清零记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.电表清零记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //潮流反向记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.潮流反向记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //功率反向记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLosePhase(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.功率反向记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //需量超限记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.需量超限记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //功率因数超下限记录 Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.ELLoseComm(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.功率因数超下限记录).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); EventLogControlUI.Add(Item); //Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjEventLog.NotParmPrj(_EventLogItem.getEventLogPrj(((int)CLDC_Comm.Enum.Cus_EventLogItem.过流记录_ZB).ToString("000"))); //Item.PanelBackColor = SystemColors.Control; //Item.CaptionColor = Color.Silver; //this.Panel_Prjs.Controls.Add(Item); //EventLogControlUI.Add(Item); //EventLogControlUI.Sort(); this.SizeChanged += new EventHandler(UI_EventLog_SizeChanged); }
public FeatureFactory AddRadioSelectList(SortedDictionary <string, double> textOptions, ControlLocation location = null, EControlUse controlUse = EControlUse.NotSpecified) { if (textOptions == null) { throw new ArgumentNullException(nameof(textOptions)); } foreach (var textOption in textOptions) { if (_feature.HasControlForValue(textOption.Value)) { throw new ArgumentException($"The value {textOption.Value} already has a control bound to it.", nameof(textOptions)); } //TODO radio select list location var dropDownOption = new StatusControl(EControlType.RadioOption) { TargetValue = textOption.Value, Label = textOption.Key, ControlUse = controlUse, Location = location ?? new ControlLocation() }; _feature.AddStatusControl(dropDownOption); } return(this); }
/// <summary> /// UI初始化 /// </summary> private void InitUI() { base.FaNameCombInit(Cmb_Fa, CLDC_DataCore.Const.Variable.CONST_FA_DGN_FOLDERNAME); PrjUI.PrjDgn.DgnBase Item; DgnControlUI = new ControlLocation(Panel_Prjs); CLDC_DataCore.SystemModel.Item.csDgnDic _DgnItem = new CLDC_DataCore.SystemModel.Item.csDgnDic(); _DgnItem.Load(); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.通信测试).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnDayCheckTime(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.日计时误差).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnSdtq(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.费率时段检查).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnSdtq(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.时段投切).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnSdtq(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.计度器示值组合误差).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnSdtq(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.费率时段示值误差).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.GPS对时).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.闰年判断功能).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.事件记录检查).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.需量清空).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.电压逐渐变化).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.电压跌落).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.时钟示值误差).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnZdxl(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.最大需量Imax).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnZdxl(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.最大需量10Ib).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnZdxl(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.最大需量01Ib).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnReadDl(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.读取电量).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.电量清零).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnDlMemory(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.电量寄存器检查).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.需量寄存器检查).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.瞬时寄存器检查).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.状态寄存器检查).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.失压寄存器检查).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.校对电量).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.校对需量).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.检查电表运行状态).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.预付费检测).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.NotParmPrj(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.电压短时中断).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjDgn.DgnChangePassword(_DgnItem.getDgnPrj(((int)CLDC_Comm.Enum.Cus_DgnItem.修改密码).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); DgnControlUI.Add(Item); //DgnControlUI.Sort(); this.SizeChanged += new EventHandler(UI_Dgn_SizeChanged); }
public abstract string AddControlToDocument(Control newControl, Control referenceControl, ControlLocation location);
public abstract virtual string AddControlToDocument(System.Web.UI.Control newControl, System.Web.UI.Control referenceControl, ControlLocation location) { }
public override string AddControlToDocument(Control newControl, Control referenceControl, ControlLocation location) { if (newControl is IElement && referenceControl is IElement) { switch (location) { case ControlLocation.FirstChild: ((IElement)referenceControl).ElementDom.AppendChild(((IElement)newControl)); break; case ControlLocation.First: ((IElement)referenceControl).ElementDom.AppendChild(((IElement)newControl)); break; case ControlLocation.LastChild: ((IElement)referenceControl).ElementDom.AppendChild(((IElement)newControl)); break; case ControlLocation.Last: ((IElement)referenceControl).ElementDom.AppendChild(((IElement)newControl)); break; case ControlLocation.After: ((IElement)referenceControl).InsertAdjacentElement(InsertWhere.AfterBegin, (IElement)newControl); break; case ControlLocation.Before: ((IElement)referenceControl).InsertAdjacentElement(InsertWhere.BeforeBegin, (IElement)newControl); break; } } return(""); }
public override string AddControlToDocument(Control newControl, Control referenceControl, ControlLocation location) { throw new NotSupportedException(); }
public abstract virtual string AddControlToDocument(System.Web.UI.Control newControl, System.Web.UI.Control referenceControl, ControlLocation location) { }
/// <summary> /// UI初始化 /// </summary> private void InitUI() { base.FaNameCombInit(Cmb_Fa, CLDC_DataCore.Const.Variable.CONST_FA_FK_FOLDERNAME); PrjUI.PrjCostControl.CostControlBase Item; CostControlUI = new ControlLocation(Panel_Prjs); CLDC_DataCore.SystemModel.Item.csCostControlDic _CostControlItem = new CLDC_DataCore.SystemModel.Item.csCostControlDic(); _CostControlItem.Load(); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.身份认证).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.远程控制).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.报警功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.保电功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.保电解除).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.远程保电).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.数据回抄).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.参数设置).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.剩余电量递减准确度).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.电价切换).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.负荷开关).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.电量清零).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.密钥更新).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.密钥恢复).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.CostControlFunction(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.控制功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.CostStepTariff(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.阶梯电价检测).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.CostRatesTime(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.费率电价检测).ToString("000"))); Item.PanelBackColor = Color.LightBlue; Item.CaptionColor = Color.White; Item.CaptionColorTwo = Color.LightBlue; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.远程控制直接合闸).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.CostControlInitPurse(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.钱包初始化).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); // Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.CostPresetContentSettings(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.预置内容设置).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.远程模式切换本地模式).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.本地模式切换远程模式).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.用户卡开户).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); Item = new CLDC_MeterUI.UI_FA.FAPrj.PrjUI.PrjCostControl.NotParmPrj(_CostControlItem.getCostControlPrj(((int)CLDC_Comm.Enum.Cus_CostControlItem.透支功能).ToString("000"))); Item.PanelBackColor = SystemColors.Control; Item.CaptionColor = Color.Silver; this.Panel_Prjs.Controls.Add(Item); CostControlUI.Add(Item); this.SizeChanged += new EventHandler(UI_Dgn_SizeChanged); }
public abstract string AddControlToDocument(Control newControl, Control referenceControl, ControlLocation location);