コード例 #1
0
        private void startButton_Click(object sender, EventArgs e)
        {
            string[] wqlArray = new string[] { textBox1.Text.Trim(), textBox2.Text.Trim(), textBox3.Text.Trim(), textBox4.Text.Trim(), textBox5.Text.Trim() };

            try {
                for (int i = 0; i < 5; i++) {
                    if (wqlArray[i].Length > 0) {
                        watcher[i] = new EventWatcherAsync(wqlArray[i]);
                        watcher[i].Start();
                    }
                }
            } catch (Exception ex) {
                MessageBox.Show(ex.Message, "Failer", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        private void startButton_Click(object sender, EventArgs e)
        {
            string[] wqlArray = new string[] { textBox1.Text.Trim(), textBox2.Text.Trim(), textBox3.Text.Trim(), textBox4.Text.Trim(), textBox5.Text.Trim() };

            try {
                for (int i = 0; i < 5; i++)
                {
                    if (wqlArray[i].Length > 0)
                    {
                        watcher[i] = new EventWatcherAsync(wqlArray[i]);
                        watcher[i].Start();
                    }
                }
            } catch (Exception ex) {
                MessageBox.Show(ex.Message, "Failer", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }