How to disable remote control

There may be times when you want to be 100% sure that you are the only person "driving" your programs.

The RGA Example

If you look at the RGA Example project, there is a checkbox for you to disable the remote function. Open the From1.cs in Visual Studio. Double click the checkbox and it will lead you to the code below:

private void checkBox_disableRemote_CheckedChanged(object sender, EventArgs e)
{
if (checkBox_disableRemote.Checked)
{
DataExchangeService.disableGetData = true;
DataExchangeService.disableSetData = true;
}
else
{
DataExchangeService.disableGetData = false;
DataExchangeService.disableSetData = false;

}
}

Disable remote monitoring

Simply set DataExchangeService.disableGetData = false.

Disable remote control

set DataExchangeService.disableSetData = false;

Previous Lesson: Any development tips? Table of Contents Next Lesson: How to switch view programmably?