public Form2(DataChanged _db, int _GoodID, int _Count, double _Price) { InitializeComponent(); db = _db; GoodID = _GoodID; Count = _Count; Price = _Price; }
private void Form1_Shown(object sender, EventArgs e) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("MAC", Mac[0]); //初始化 db = new DataChanged(this); db.ConnStatus += ConnectionStatus; db.IDU_Count += IDU_Status; db.SDR_Count += ReadData; 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"); }