Пример #1
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            var config = await ReadConfigAsync();

            _VncClient = new VncClient(config.BitsPerPixel, config.Depth);
            _VncClient.Connect(config.Host, config.Port);

            var auth = new VncAuthenticator(config.Password);

            _VncClient.Authenticate(auth);
            _VncClient.Initialize();

            _VncImage       = new WriteableBitmap(_VncClient.Framebuffer.Width, _VncClient.Framebuffer.Height);
            VncImage.Source = _VncImage;

            _VncClient.OnFramebufferUpdate += _VncClient_OnFramebufferUpdate;
            _VncClient.ReceiveUpdates();
        }