Ejemplo n.º 1
0
        private void Form1_Shown(object sender, EventArgs e)
        {
            textBox1.Text = GetAppConfig("ServerIP") == null ? textBox1.Text : GetAppConfig("ServerIP");
            textBox2.Text = GetAppConfig("Acction") == null ? textBox2.Text : GetAppConfig("Acction");
            textBox3.Text = GetAppConfig("Password") == null ? textBox3.Text : GetAppConfig("Password");

            db             = new DataChanged(this);
            db.ConnStatus += ConnectionStatus;
        }
Ejemplo n.º 2
0
        private void Form3_Shown(object sender, EventArgs e)
        {
            textBox8.Text = GetAppConfig("ServerIP") == null ? textBox1.Text : GetAppConfig("ServerIP");
            textBox7.Text = GetAppConfig("Acction") == null ? textBox2.Text : GetAppConfig("Acction");
            textBox6.Text = GetAppConfig("Password") == null ? textBox3.Text : GetAppConfig("Password");

            db             = new DataChanged(this);
            db.ConnStatus += ConnectionStatus;


            Data = new List <dj_item>();

            if (File.Exists(Application.StartupPath + "\\item.txt"))
            {
                Task.Run(() =>
                {
                    Read(Application.StartupPath + "\\item.txt");
                });
            }
            else
            {
                MessageBox.Show("未找到item.txt物品信息文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 3
0
 public Form2(DataChanged _db)
 {
     InitializeComponent();
     db = _db;
 }