AddGraphPort() public method

public AddGraphPort ( IGraphPort aPort ) : void
aPort IGraphPort
return void
コード例 #1
0
ファイル: SketchWindow.cs プロジェクト: Wiladams/NewTOAPIA
        public SketchWindow(int width, int height)
            :base()
        {
            InitializeComponent();

            fBlackPen = new GDIPen(RGBColor.Black);

            this.Size = new System.Drawing.Size(width, height);
            this.Text = "Sketcher";
            this.AllowDrop = true;

            fPointList = new List<Point>();

            // Create the backing buffer to retain the image
            // Make it bigger than any likely displays
            backingBuffer = GDIDIBSection.Create(1600, 1200);
            GDIContext bufferContext = GDIContext.CreateForBitmap(backingBuffer);

            bufferContext.ClearToWhite();
            fBackingGraphPort = new GDIRenderer(bufferContext);

            fRetainedGraphPort = new GraphPortDelegate();
            fRetainedGraphPort.AddGraphPort(fBackingGraphPort);
            fRetainedGraphPort.AddGraphPort(GraphPort);

            CreateSession();

        }
コード例 #2
0
ファイル: PassiveSpace.cs プロジェクト: Wiladams/NewTOAPIA
        public PassiveSpace(string title, RECT aframe)
            : base(title, aframe)
        {
            fBackingBuffer = new PixelBuffer(Frame.Width, aframe.Height);

            fWrappedGraphPort = new GraphPortDelegate();
            fWrappedGraphPort.AddGraphPort(fBackingBuffer.GraphPort);
            fWrappedGraphPort.AddGraphPort(base.GraphPort);

            // Add the channel for commands
            fSessionManager = new SessionManager();
            fControlChannel = new SpaceControlChannel(fSessionManager, fSessionManager.UniqueSessionName, this);
        }
コード例 #3
0
ファイル: UISurface.cs プロジェクト: Wiladams/NewTOAPIA
        protected UISurface(string title, int x, int y, int width, int height, Guid uniqueID)
        {
            fTitle = title;
            fFrame = new RECT(x, y, width, height);
            fBackingBuffer = new PixelBuffer(width, height);
            fGraphDelegate = new GraphPortDelegate();
            fGraphDelegate.AddGraphPort(fBackingBuffer.GraphPort);

            fUniqueID = uniqueID;

            UISurface.gSurfaces.Add(uniqueID, this);
        }
コード例 #4
0
ファイル: UIWindow.cs プロジェクト: Wiladams/NewTOAPIA
        protected virtual void OnSurfaceCreated(Guid uniqueID)
        {
            fSurface = MetaSpace.GetSurface(uniqueID);

            fGraphDelegate = new GraphPortDelegate();
            fGraphDelegate.AddGraphPort(fSurface.GraphPort);

            AttachToUISurface();

            if (fIsVisible)
                fSurface.Show();
        }