示例#1
0
        public void Test()
        {
            using (var vncClient = new VncClient())
            {
                vncClient.Connect(Address, 5900,
                                  new VncClientConnectOptions {
                    OnDemandMode = true, PasswordRequiredCallback = c => "100".ToArray()
                });

                var width  = 200;
                var height = 300;
                var copy   = vncClient.GetFramebuffer(100, 100, width, height);
                var bitmap = this.CreateBitmap(copy, width, height);
                bitmap.Save(@"C:\TestOutput\Test.bmp", ImageFormat.Bmp);
                Assert.AreNotEqual(Color.Black.ToArgb(), bitmap.GetPixel(10, 10).ToArgb());
            }
        }