protected override void InitUIOnShown() { HintProvider.WaitingDone(Application.ProductName); base.InitUIOnShown(); this.pnlButtom.Visible = false; this.btnMin.Visible = true; ControlUtilityTool.SetControlDefaultFont(this.lblCaption, 15, FontStyle.Bold); //this.lblCaption.Text = "网络设备参数设置工具"; string strVersion = string.Format("V{0}", StrUtils.GetFileVersion(Path.Combine(Application.StartupPath, "ParamsSettingTool.exe"))); title = "网络设备参数设置工具" + "(" + strVersion + ")"; this.lblCaption.Text = title; f_UserControls = new Dictionary <string, GeneralUserControl>(); //启动Udp监听 int udpPort = StrUtils.StrToIntDef(AppXmlConfig.Singleton[AppXmlConfig.UDP_SOURCE_PORT].ToString(), AppConst.UDP_SOURCE_PORT); f_UdpListener = new UdpListener(udpPort); string errMsg = string.Empty; if (!f_UdpListener.StartUdp(ref errMsg)) { HintProvider.ShowAutoCloseDialog(this, string.Format("启动Udp监听失败,错误:{0}", errMsg)); } AppXmlConfig.Singleton.Save(); //暂时无云对讲设备 this.nbItemCloudIntercom.Visible = false; }
protected override void InitUIOnShown() { HintProvider.WaitingDone(Application.ProductName); base.InitUIOnShown(); ControlUtilityTool.SetITLTextEditStyle(this.edtPsd); ControlUtilityTool.SetSuperToolTip(this.edtPsd, "密码必须由8位纯数字组成!"); this.rgpPsd.SelectedIndex = 1; this.edtPsd.Properties.MaxLength = 8; this.edtPsd.KeyPress += CommonUtils.edtPort_KeyPress; //只能输入整形 ControlUtilityTool.SetFocus(this.edtPsd); char a = '*'; List <char> lisrt = new List <char>(); lisrt.Add(a); //指定密码框样式 this.edtPsd.Properties.PasswordChar = lisrt[0];//采用的样式 }
private void tmrCommunication_Tick(object sender, EventArgs e) { if ((Environment.TickCount - this.BeginTick >= this.CoolingTick) || (!this.IsBusy)) { this.tmrCommunication.Stop(); this.IsBusy = false; this.tmrCommunication.Interval = 100; HintProvider.WaitingDone(Application.ProductName); } if (this.tmrCommunication.Interval != 800) { this.tmrCommunication.Interval = 800; return; } //如果是广播命令,则继续广播,间隔为900 if (f_SearchDevicesCount > 0) { // f_SearchDevicesCount--; // this.SearchDevices(); } }
protected override void InitUIOnLoad() { base.InitUIOnLoad(); ControlUtilityTool.SetITLLayOutControlStyle(this.lcLinkageCtrl); ControlUtilityTool.SetITLTextEditStyle(this.edtDevIp); ControlUtilityTool.SetITLTextEditStyle(this.edtSubnetMark); ControlUtilityTool.SetITLTextEditStyle(this.edtGateWay); ControlUtilityTool.SetITLTextEditStyle(this.edtCloudUdpPort); ControlUtilityTool.SetITLTextEditStyle(this.edtThirdUdpPort); ControlUtilityTool.SetITLComboBoxEditStyle(this.cmbCloudCtrlCount); ControlUtilityTool.SetControlDefaultColor(this.sclCtrlItems, ControlUtilityTool.PubBackColorNormal); ControlUtilityTool.SetTextEditIPRegEx(this.edtDevIp); ControlUtilityTool.SetTextEditIPRegEx(this.edtSubnetMark); ControlUtilityTool.SetTextEditIPRegEx(this.edtGateWay); this.edtDevIp.Properties.MaxLength = 15; this.edtSubnetMark.Properties.MaxLength = 15; this.edtGateWay.Properties.MaxLength = 15; this.edtCloudUdpPort.Properties.MaxLength = 5; this.edtThirdUdpPort.Properties.MaxLength = 5; this.edtDevIp.KeyPress += CommonUtils.edtIp_KeyPress; this.edtSubnetMark.KeyPress += CommonUtils.edtIp_KeyPress; this.edtGateWay.KeyPress += CommonUtils.edtIp_KeyPress; this.edtCloudUdpPort.KeyPress += CommonUtils.edtPort_KeyPress; this.edtThirdUdpPort.KeyPress += CommonUtils.edtPort_KeyPress; this.InitDevicesCountCmdEdit(); this.InitCloudElevatorItemsUI(); this.DevType = DeviceType.LinkageCtrl; HintProvider.WaitingDone(Application.ProductName); FindCount = new Dictionary <string, hintInfo>(); }