Beispiel #1
0
 private void HostFinderOnHostFound(object sender, HostFoundEventArgs args)
 {
     try
     {
         if (args.IsCasting)
         {
             if (!_isConnected)
             {
                 axRDPViewer1.SmartSizing = true;
                 axRDPViewer1.Connect(args.ConnectionString, Environment.UserName, "");
             }
         }
         else if (!args.IsCasting)
         {
             if (_isConnected)
             {
                 axRDPViewer1.Disconnect();
             }
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine("Exception:" + ex.Message);
     }
 }
Beispiel #2
0
 protected virtual void OnHostFound(HostFoundEventArgs e)
 {
     HostFound?.Invoke(this, e);
 }