Provides data for the VncClient.FramebufferChanged event.
상속: System.EventArgs
예제 #1
0
        /// <summary>
        /// Raises the <see cref="FramebufferChanged"/> event.
        /// </summary>
        /// <param name="e">
        /// A <see cref="FramebufferChangedEventArgs"/> that describes the changes
        /// in the framebuffer.
        /// </param>
        protected virtual void OnFramebufferChanged(FramebufferChangedEventArgs e)
        {
            var ev = this.FramebufferChanged;

            if (ev != null)
            {
                ev(this, e);
            }
        }
예제 #2
0
        protected void RaiseFramebufferChanged(FramebufferChangedEventArgs e)
        {
            var ev = FramebufferChanged;

            if (ev != null)
            {
                ev(this, e);
            }
        }
예제 #3
0
 /// <summary>
 /// Raises the <see cref="FramebufferChanged"/> event.
 /// </summary>
 /// <param name="e">
 /// A <see cref="FramebufferChangedEventArgs"/> that describes the changes
 /// in the framebuffer.
 /// </param>
 protected virtual void OnFramebufferChanged(FramebufferChangedEventArgs e)
 {
     this.FramebufferChanged?.Invoke(this, e);
 }
예제 #4
0
 /// <summary>
 /// Raises the <see cref="FramebufferChanged"/> event.
 /// </summary>
 /// <param name="e">
 /// A <see cref="FramebufferChangedEventArgs"/> that describes the changes
 /// in the framebuffer.
 /// </param>
 protected virtual void OnFramebufferChanged(FramebufferChangedEventArgs e)
 {
     var ev = this.FramebufferChanged;
     if (ev != null)
     {
         ev(this, e);
     }
 }
예제 #5
0
 protected virtual void OnFramebufferChanged(FramebufferChangedEventArgs e)
 {
     RaiseFramebufferChanged(e);
 }
예제 #6
0
        void HandleFramebufferChanged(object sender, FramebufferChangedEventArgs e)
        {
            BeginInvoke(new Action(() =>
                {
                    if (DesignMode) { return; }

                    if (_client == null) { return; }

                    var framebuffer = _client.Framebuffer;
                    if (framebuffer == null) { return; }

                    lock (framebuffer.SyncRoot)
                    {
                        UpdateFramebuffer(false, framebuffer);

                        if (_bitmap != null)
                        {
                            for (int i = 0; i < e.RectangleCount; i++)
                            {
                                var rect = e.GetRectangle(i);
                                VncBitmap.CopyFromFramebuffer(framebuffer, rect, _bitmap, rect.X, rect.Y);
                            }
                        }
                    }

                    for (int i = 0; i < e.RectangleCount; i++)
                    {
                        var rect = e.GetRectangle(i);
                        Invalidate(new Rectangle(rect.X, rect.Y, rect.Width, rect.Height));
                    }
                }));
        }