private void ServerIPSetForm_Load(object sender, EventArgs e) { System.Net.IPAddress[] ipArr; ipArr = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()); //for (int i = 0; i < ipArr.Length; i++) //{ // if (ipArr[i].AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) // { // cmbServerIP.Items.Add(ipArr[i].ToString()); // } //} cmbServerIP.Items.AddRange(ipArr); txtServerPort.Text = ini.ReadValue("INFOSET", "ServerPort"); cmbServerIP.Text = ini.ReadValue("INFOSET", "ServerIP"); }
private void frmLogin_Load(object sender, EventArgs e) { gbSetting.Visible = false; oLock = new Object(); //读取INI文件 formHeight = this.Height; IniFiles ini = new IniFiles(@Application.StartupPath + "\\Config.ini"); txtServer.Text = ini.ReadValue("Database", "ServerName"); txtDb.Text = ini.ReadValue("Database", "DataBase"); txtDbuser.Text = ini.ReadValue("Database", "LogID"); txtDbPass.Text = ini.ReadValue("Database", "LogPass"); this.Height = formHeight - gbSetting.Height; }
private void TmpFolderSetForm_Load(object sender, EventArgs e) { txtRevTar.Text = inis.ReadValue("FolderSet", "RevTarFolder"); txtTarBuild.Text = inis.ReadValue("FolderSet", "SndTarFolder"); txtUnTar.Text = inis.ReadValue("FolderSet", "UnTarFolder"); txtXMLBuild.Text = inis.ReadValue("FolderSet", "XmlBuildFolder"); txtMedia.Text = inis.ReadValue("FolderSet", "AudioFileFolder"); txtBeUnTar.Text = inis.ReadValue("FolderSet", "BeUnTarFolder"); txtBeBuildXML.Text = inis.ReadValue("FolderSet", "BeXmlFileMakeFolder"); }
private void mainForm_Load(object sender, EventArgs e) { try { m_UsbPwsSupport = ini.ReadValue("USBPSW", "USBPSWSUPPART"); //打开密码器 if (m_UsbPwsSupport == "1") { try { int nReturn = usb.USB_OpenDevice(ref phDeviceHandle); if (nReturn != 0) { MessageBox.Show("密码器打开失败!"); } } catch (Exception em) { MessageBox.Show("密码器打开失败:" + em.Message); } } //初始化写日志线程 string sLogPath = Application.StartupPath + "\\Log"; if (!Directory.Exists(sLogPath)) { Directory.CreateDirectory(sLogPath); } Log.Instance.LogDirectory = sLogPath + "\\"; Log.Instance.FileNamePrefix = "EBD_"; Log.Instance.CurrentMsgType = MsgLevel.Debug; Log.Instance.logFileSplit = LogFileSplit.Daily; Log.Instance.MaxFileSize = 2; Log.Instance.InitParam(); GetAuditData(); GetPlatformInfo(); this.Text = "应急广播消息服务V" + Application.ProductVersion; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void InfoSetForm_Load(object sender, EventArgs e) { txtSourceID.Text = inis.ReadValue("INFOSET", "SourceID"); txtSourceName.Text = inis.ReadValue("INFOSET", "SourceName"); txtSourceType.Text = inis.ReadValue("INFOSET", "SourceType"); }