/// <summary>
 /// Dispatches the ConnectComplete event if any targets have registered.
 /// </summary>
 /// <param name="e">A ConnectEventArgs object with information about the remote framebuffer's geometry.</param>
 /// <exception cref="System.InvalidOperationException">Thrown if the RemoteDesktop control is not in the Connected state.</exception>
 protected void OnConnectComplete(ConnectEventArgs e)
 {
     if (ConnectComplete != null)
     {
         ConnectComplete(this, e);
     }
 }
 /// <summary>
 /// Dispatches the ConnectComplete event if any targets have registered.
 /// </summary>
 /// <param name="e">A ConnectEventArgs object with information about the remote framebuffer's geometry.</param>
 /// <exception cref="System.InvalidOperationException">Thrown if the RemoteDesktop control is not in the Connected state.</exception>
 private void OnConnectComplete(ConnectEventArgs e)
 {
     ConnectComplete?.Invoke(this, e);
 }
        private void rd_ConnectComplete(object sender, ConnectEventArgs e)
        {
            // Update the Form to match the geometry of remote desktop (including the height of the menu bar in this form).
            ClientSize = new Size(e.DesktopWidth, e.DesktopHeight + menuStrip1.Height);

            // Change the Form's title to match the remote desktop name
            Text = e.DesktopName;

            FlipMenuOptions();

            // Give the remote desktop focus now that it's connected
            rd.Focus();
        }
Example #4
0
 /// <summary>
 /// Dispatches the ConnectComplete event if any targets have registered.
 /// </summary>
 /// <param name="e">A ConnectEventArgs object with information about the remote framebuffer's geometry.</param>
 /// <exception cref="System.InvalidOperationException">Thrown if the RemoteDesktop control is not in the Connected state.</exception>
 protected void OnConnectComplete(ConnectEventArgs e)
 {
     if (ConnectComplete != null)
     {
         ConnectComplete(this, e);
     }
 }
Example #5
0
        private void rd_ConnectComplete(object sender, ConnectEventArgs e)
        {
            // Update Form to match geometry of remote desktop
            //ClientSize = new Size(e.DesktopWidth, e.DesktopHeight);
            try
            {
                this.connected = true;
                RemoteDesktop remoteDesktop = (RemoteDesktop) sender;
                remoteDesktop.Visible = true;
                remoteDesktop.BringToFront();
                remoteDesktop.FullScreenUpdate();
                remoteDesktop.Enabled = true;
            }
            catch (Exception ex)
            {
                Log.Fatal(
					string.Format("Terminals was unable to create the {0} connection.", this.Favorite.Protocol),
                    ex);
            }
            // Change the Form's title to match desktop name
        }