Provides data for the VncClient.FramebufferChanged event.
Inheritance: System.EventArgs
コード例 #1
0
ファイル: VncClient.cs プロジェクト: rajeshwarn/remoteviewing
        /// <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
ファイル: VncClient.cs プロジェクト: 5l1v3r1/remoteviewing
 /// <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
ファイル: VncClient.cs プロジェクト: qmfrederik/remoteviewing
 /// <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));
                    }
                }));
        }