Exemplo n.º 1
0
 protected override async void OnClosed(EventArgs e)
 {
     base.OnClosed(e);
     waitHandleCommands.Dispose();
     if (supervisorClient != null)
     {
         await supervisorClient.StopAsync();
     }
 }
Exemplo n.º 2
0
        private async Task DoDisconnect()
        {
            btnConnect.Enabled = false;
            if (supervisorClient != null)
            {
                await supervisorClient?.StopAsync();

                supervisorClient = null;
            }
            labStatus.Text            = string.Empty;
            txtAppName.ReadOnly       = false;
            txtServerAddress.ReadOnly = false;
            btnConnect.Enabled        = true;
            btnSystemInfo.Enabled     = false;
            btnScreenshot.Enabled     = false;
            btnConnect.Text           = "Connect";
            btnConnect.ImageKey       = "start.png";
        }