public MainForm() { instance = this; InitializeComponent(); XMLOperator.Initialize(); BindTreeView(); mCurConfig = XMLOperator.GetConfigs(); }
/// <summary> /// 启动当前选择的程序 /// </summary> private void 启动ToolStripMenuItem_Click(object sender, EventArgs e) { mCurConfig = XMLOperator.GetConfigs(); string url = generateURL(mCurConfig, mCurDevice, mCurProgram); textBox8.Text = SendRequest(url, TIMEOUT, "GET"); }
private void 启动设置ToolStripMenuItem_Click(object sender, EventArgs e) { StartupConfigForm startupConfigForm = new StartupConfigForm(); DialogResult dr = startupConfigForm.ShowDialog(); if (dr == DialogResult.OK) { mCurConfig = XMLOperator.GetConfigs(); } if (dr == DialogResult.Cancel) { // Do nothing } }
/// <summary> /// 启动分组中所有的程序 /// </summary> private void 启动ToolStripMenuItem1_Click(object sender, EventArgs e) { mCurConfig = XMLOperator.GetConfigs(); List <Bases.Program> launchingPrograms = XMLOperator.GetProgramsFromGroup(mCurGroup.groupName); foreach (Bases.Program program in launchingPrograms) { Device device = XMLOperator.GetDevice(program.BelongDevice); string url = generateURL(mCurConfig, device, program); textBox8.Text = SendRequest(url, TIMEOUT, "GET"); Thread.Sleep(10); } }