private void 开台ToolStripMenuItem_Click(object sender, EventArgs e) { try { Label lb = (Label)ops.SourceControl; string envName = tcTabs.SelectedTab.Text.Trim(); string tabName = lb.Text; FormOpen fo = new FormOpen(tabName, envName); DialogResult res = fo.ShowDialog(); if (res == System.Windows.Forms.DialogResult.OK) { lb.BackColor = Color.Red; } } catch { } }
private void lbUserTab_Click(object sender, EventArgs e) { if (tabName == "") { MessageBox.Show("请先选择要开台的餐桌"); } else { if (ValidLB((Label)sender)) { string envName = tcTabs.SelectedTab.Text.Trim(); FormOpen fo = new FormOpen(tabName, envName); DialogResult res = fo.ShowDialog(); if (res == System.Windows.Forms.DialogResult.OK) { UpdateTabs(); } } } }