예제 #1
0
 public MainForm()
 {
     instance = this;
     InitializeComponent();
     XMLOperator.Initialize();
     BindTreeView();
     mCurConfig = XMLOperator.GetConfigs();
 }
예제 #2
0
        /// <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");
        }
예제 #3
0
        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
            }
        }
예제 #4
0
        /// <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);
            }
        }