Factory class used to create derived EncodedRectangle objects at runtime based on data sent by VNC Server.
コード例 #1
0
ファイル: VncClient.cs プロジェクト: wei-yf/VncSharpWpf
        /// <summary>
        /// Finish setting-up protocol with VNC Host.  Should be called after Connect and Authenticate (if password required).
        /// </summary>
        public void Initialize()
        {
            // Finish initializing protocol with host
            rfb.WriteClientInitialisation(false);
            buffer = rfb.ReadServerInit();
            rfb.WriteSetPixelFormat(buffer);                    // just use the server's framebuffer format

            rfb.WriteSetEncodings(new uint[] { RfbProtocol.ZRLE_ENCODING,
                                               RfbProtocol.HEXTILE_ENCODING,
                                               //	RfbProtocol.CORRE_ENCODING, // CoRRE is buggy in some hosts, so don't bother using
                                               RfbProtocol.RRE_ENCODING,
                                               RfbProtocol.COPYRECT_ENCODING,
                                               RfbProtocol.RAW_ENCODING });

            // Create an EncodedRectangleFactory so that EncodedRectangles can be built according to set pixel layout
            factory = new EncodedRectangleFactory(rfb, buffer);
        }
コード例 #2
0
ファイル: VncClient.cs プロジェクト: nakano531/VncSharpWpf
		/// <summary>
		/// Finish setting-up protocol with VNC Host.  Should be called after Connect and Authenticate (if password required).
		/// </summary>
		public void Initialize()
		{
			// Finish initializing protocol with host
			rfb.WriteClientInitialisation(false);
			buffer = rfb.ReadServerInit();
			rfb.WriteSetPixelFormat(buffer);	// just use the server's framebuffer format

			rfb.WriteSetEncodings(new uint[] {	RfbProtocol.ZRLE_ENCODING,
			                                    RfbProtocol.HEXTILE_ENCODING, 
											//	RfbProtocol.CORRE_ENCODING, // CoRRE is buggy in some hosts, so don't bother using
												RfbProtocol.RRE_ENCODING,
												RfbProtocol.COPYRECT_ENCODING,
												RfbProtocol.RAW_ENCODING });
			
			// Create an EncodedRectangleFactory so that EncodedRectangles can be built according to set pixel layout
			factory = new EncodedRectangleFactory(rfb, buffer);
		}