teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

追記

2019/04/22 07:18

投稿

YAmaGNZ
YAmaGNZ

スコア10674

answer CHANGED
@@ -1,3 +1,26 @@
1
1
  各イベントハンドラでタイマー起動
2
2
  タイマーでデータ取得処理を行いタイマー停止
3
- というのはどうでしょう?
3
+ というのはどうでしょう?
4
+
5
+ 下記のような感じです。
6
+ ```C#
7
+ private void comboBox1_TextChanged(object sender, EventArgs e)
8
+ {
9
+ Console.WriteLine("comboBox1");
10
+ comboBox2.Text += "1";
11
+ timer1.Start();
12
+ }
13
+
14
+ private void comboBox2_TextChanged(object sender, EventArgs e)
15
+ {
16
+ Console.WriteLine("comboBox2");
17
+ timer1.Start();
18
+ }
19
+
20
+ private void timer1_Tick(object sender, EventArgs e)
21
+ {
22
+ Console.WriteLine("SetData");
23
+ timer1.Stop();
24
+ }
25
+
26
+ ```