Exemplo n.º 1
0
        private void settingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_Setting frmSetting = new frm_Setting();

            frmSetting.ShowDialog();
            frmSetting.Dispose();
        }
Exemplo n.º 2
0
 //load xml to connect
 private void loadCfg()
 {
     try
     {
         XmlDocument config = new XmlDocument();
         string      path   = Application.StartupPath + @"\config.xml";
         config.Load(path);
         _svrIP   = IPAddress.Parse(config.SelectSingleNode("//ip").InnerText);
         _svrPort = Int32.Parse(config.SelectSingleNode("//port").InnerText);
     }
     catch
     {
         frm_Setting frmSetting = new frm_Setting();
         frmSetting.ShowDialog();
         frmSetting.Dispose();
     }
 }