Skip to content

Commit

Permalink
Add event RdpControl.RdpClientConfigured to allows users to customize…
Browse files Browse the repository at this point in the history
… the RdpClient in extra ways not covered by the RdpConfiguration
  • Loading branch information
haefele authored and Daniel Häfele committed Aug 8, 2024
1 parent f66427a commit 4919aca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/RoyalApps.Community.Rdp.WinForms/Controls/RdpControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ public class RdpControl : UserControl
/// </summary>
public event EventHandler? RemoteDesktopSizeChanged;

/// <summary>
/// Raised after the <see cref="IRdpClient"/> was created and configured, but before the connection is established.
/// This event allows users to customize the RdpClient in extra ways not covered by the <see cref="RdpConfiguration"/>.
/// </summary>
public event EventHandler? RdpClientConfigured;

/// <summary>
/// Creates a new instance of the RdpControl.
/// </summary>
Expand Down Expand Up @@ -190,6 +196,8 @@ public void Connect()
_canScale = false;

ApplyInitialScaling();

this.RdpClientConfigured?.Invoke(this, EventArgs.Empty);

RdpClient!.Connect();
}
Expand Down

0 comments on commit 4919aca

Please sign in to comment.