Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VncScreenFramebufferSource"/> class.
        /// </summary>
        /// <param name="name">The framebuffer name. Many VNC clients set their titlebar to this name.</param>
        /// <param name="screen">The bounds of the screen region.</param>
        public VncScreenFramebufferSource(string name, Screen screen)
        {
            if (screen == null)
            {
                throw new ArgumentNullException(nameof(screen));
            }

            this.name            = name ?? throw new ArgumentNullException(nameof(name));
            this.getScreenBounds = () => screen.Bounds;
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VncScreenFramebufferSource"/> class.
 /// Screen region bounds are determined by a callback.
 /// </summary>
 /// <param name="name">The framebuffer name. Many VNC clients set their titlebar to this name.</param>
 /// <param name="getBoundsCallback">A callback supplying the bounds of the screen region to copy.</param>
 public VncScreenFramebufferSource(string name, VncScreenFramebufferSourceGetBoundsCallback getBoundsCallback)
 {
     this.name            = name ?? throw new ArgumentNullException(nameof(name));
     this.getScreenBounds = getBoundsCallback ?? throw new ArgumentNullException(nameof(getBoundsCallback));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VncScreenFramebufferSource"/> class.
 /// Screen region bounds are determined by a callback.
 /// </summary>
 /// <param name="name">The framebuffer name. Many VNC clients set their titlebar to this name.</param>
 /// <param name="getBoundsCallback">A callback supplying the bounds of the screen region to copy.</param>
 public VncScreenFramebufferSource(string name, VncScreenFramebufferSourceGetBoundsCallback getBoundsCallback)
 {
     Throw.If.Null(name, "name").Null(getBoundsCallback, "getBoundsCallback");
     _name = name; _getScreenBounds = getBoundsCallback;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VncScreenFramebufferSource"/> class.
 /// </summary>
 /// <param name="name">The framebuffer name. Many VNC clients set their titlebar to this name.</param>
 /// <param name="screen">The bounds of the screen region.</param>
 public VncScreenFramebufferSource(string name, Screen screen)
 {
     Throw.If.Null(name, "name").Null(screen, "screen");
     _name = name; _getScreenBounds = () => screen.Bounds;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VncScreenFramebufferSource"/> class.
 /// Screen region bounds are determined by a callback.
 /// </summary>
 /// <param name="name">The framebuffer name. Many VNC clients set their titlebar to this name.</param>
 /// <param name="getBoundsCallback">A callback supplying the bounds of the screen region to copy.</param>
 public VncScreenFramebufferSource(string name, VncScreenFramebufferSourceGetBoundsCallback getBoundsCallback)
 {
     Throw.If.Null(name, "name").Null(getBoundsCallback, "getBoundsCallback");
     _name = name; _getScreenBounds = getBoundsCallback;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VncScreenFramebufferSource"/> class.
 /// </summary>
 /// <param name="name">The framebuffer name. Many VNC clients set their titlebar to this name.</param>
 /// <param name="screen">The bounds of the screen region.</param>
 public VncScreenFramebufferSource(string name, Screen screen)
 {
     Throw.If.Null(name, "name").Null(screen, "screen");
     _name = name; _getScreenBounds = () => screen.Bounds;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VncScreenFramebufferSource"/> class.
 /// </summary>
 /// <param name="name">The framebuffer name. Many VNC clients set their titlebar to this name.</param>
 /// <param name="screen">The bounds of the screen region.</param>
 public VncScreenFramebufferSource(string name, Screen screen)
 {
     Throw.If.Null(name, "name").Null(screen, "screen");
     _name            = name;
     _getScreenBounds = () => screen.Bounds;//绑定委托方法,/*日,这里使用C#6.0的语法的Lambda表达式,所以不要疑惑*/
 }