Example #1
0
        private void startPolling()
        {
            //Disable the button first, but only if in text/default console (to allow user to return to the text console - ref. CA-70314)
            if (Helpers.CreamOrGreater(Source.Connection) && parentVNCTabView.IsRDPControlEnabled())
            {
                parentVNCTabView.EnableToggleVNCButton();
            }
            else
            {
                if (InDefaultConsole())
                {
                    parentVNCTabView.DisableToggleVNCButton();
                }


                //Start the polling again
                if (Source != null && !Source.is_control_domain)
                {
                    if (!Source.IsHVM)
                    {
                        connectionPoller = new Timer(PollVNCPort, null, RETRY_SLEEP_TIME, RDP_POLL_INTERVAL);
                    }
                    else if (hasRDP)
                    {
                        connectionPoller = new Timer(PollRDPPort, null, RETRY_SLEEP_TIME, RDP_POLL_INTERVAL);
                    }
                }
            }
        }
Example #2
0
 void ConnectionSuccess(object sender, EventArgs e)
 {
     ConnectionRetries = 0;
     if (AutoSwitchRDPLater)
     {
         if (OnDetectRDP != null)
         {
             Program.Invoke(this, OnDetectRDP);
         }
         AutoSwitchRDPLater = false;
     }
     if (Helpers.CreamOrGreater(Source.Connection) && parentVNCTabView.IsRDPControlEnabled())
     {
         parentVNCTabView.EnableToggleVNCButton();
     }
 }