private void button5_Click(object sender, EventArgs e) { if (((Button)sender).Tag != null) { FrmMgr.Show(((Button)sender).Tag.ToString()); } }
private void MainForm_Load(object sender, EventArgs e) { FrmMgr.RegisterContainer(this.panel2); FrmMgr.Show("MainRunForm"); TaskMain.Init(); LoginBtn.DoubleClick += LoginBtn_DoubleClick; ConfigSpace.ConfigHandle.Instance.Load(); Alarm.Canshowmessage = true; }
private void LoginBtn_DoubleClick(object sender, EventArgs e) { if (LoginBtn.Text != "登 录") { MessageShowForm2 messageShowForm = new MessageShowForm2(); messageShowForm.Word.Text = "确认退出当前用户"; if (messageShowForm.ShowDialog(this) == DialogResult.OK) { CurrentUser = null; LoginBtn.Text = "登 录"; LoginBtn.BackColor = Color.Red; Product.Inst.OperiterLevel = 0; FrmMgr.Show("MainRunForm"); } } }
private void button1_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { MessageShowForm2 messageShowForm = new MessageShowForm2(); messageShowForm.Word.Text = "是否读取该产品?"; if (messageShowForm.ShowDialog(this) == DialogResult.OK) { string productName = listView1.SelectedItems[0].SubItems[1].Text; Product.Inst.Load(productName); this.textBox1.Text = Product.Inst.Info.Name; FrmMgr.Show("MainRunForm"); } } else { MessageShowForm1 messageShowForm = new MessageShowForm1(); messageShowForm.Word.Text = "选中产品"; messageShowForm.ShowDialog(this); } }
private void MainForm_Load(object sender, EventArgs e) { FrmMgr.RegisterContainer(this.panel2); FrmMgr.Show("RunForm"); Logic.LogicMain.TaskMain.Init();//任务集合初始化,加入到任务链表 }