Как зафиксировать цикл одним нажатием кнопки и завершить цикл нажатием другой кнопки в C# Windows Forms? ⇐ C#
Как зафиксировать цикл одним нажатием кнопки и завершить цикл нажатием другой кнопки в C# Windows Forms?
I want to have a process run continuously starting when one button (button A) is pressed until another button (button B) is pressed in a C# windows forms application, but I am unable to find a good way to do so.
The idea is to create a program that will access various data tags on an OPC UA server and read the data from those tags continuously as a sort of monitoring system. Since I have functions built in to swap the server's URL and the tags to monitor from the application, I need the monitoring loop to be able to be turned on with a button press and off with a separate a button press.
Does anyone have any good suggestions?
I've tried creating a clock and an event handler to trigger a function when the clock reached the designated time count, but I was unable to get the event handler to run continuously (ironically).
Источник: https://stackoverflow.com/questions/780 ... nother-but
I want to have a process run continuously starting when one button (button A) is pressed until another button (button B) is pressed in a C# windows forms application, but I am unable to find a good way to do so.
The idea is to create a program that will access various data tags on an OPC UA server and read the data from those tags continuously as a sort of monitoring system. Since I have functions built in to swap the server's URL and the tags to monitor from the application, I need the monitoring loop to be able to be turned on with a button press and off with a separate a button press.
Does anyone have any good suggestions?
I've tried creating a clock and an event handler to trigger a function when the clock reached the designated time count, but I was unable to get the event handler to run continuously (ironically).
Источник: https://stackoverflow.com/questions/780 ... nother-but
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Цикл через «Историю» IPTHON с одним нажатием на клавиш, даже когда несколько строк
Anonymous » » в форуме Python - 0 Ответы
- 17 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Цикл через «Историю» IPTHON с одним нажатием на клавиш, даже когда несколько строк
Anonymous » » в форуме Python - 0 Ответы
- 16 Просмотры
-
Последнее сообщение Anonymous
-