예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                getTextBox();

                MyConfig.SaveConfig("//" + listBox1.SelectedItem.ToString());
            }
            catch (Exception ee)
            {
                MessageBox.Show("检查是否选择列表位置");
                MessageBox.Show(ee.ToString());
            }
        }
예제 #2
0
 private void button2_Click_1(object sender, EventArgs e)
 {
     try
     {
         using (WriteName wNamefrm = new WriteName())
         {
             if (wNamefrm.ShowDialog() == DialogResult.OK)
             {
                 getTextBox();
                 MyConfig.SaveConfig("\\" + wNamefrm.pName);
                 Thread.Sleep(200);
                 showData();
             }
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.ToString());
     }
 }