コード例 #1
0
		public virtual void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			dxHost = this.plotter.Children.OfType<DirectXHost>().FirstOrDefault();
			if (dxHost == null)
				throw new InvalidOperationException("First add DirectXHost to plotter.Children");

			dxHost.AddChild(this);
			dxHost.Render += OnDirectXRender;
		}
コード例 #2
0
        public virtual void OnPlotterAttached(Plotter plotter)
        {
            this.plotter = (Plotter2D)plotter;
            dxHost       = this.plotter.Children.OfType <DirectXHost>().FirstOrDefault();
            if (dxHost == null)
            {
                throw new InvalidOperationException("First add DirectXHost to plotter.Children");
            }

            dxHost.AddChild(this);
            dxHost.Render += OnDirectXRender;
        }