private void Setup3dViewer() { m3dTargetControl = new Viewer3d(); m3dTargetControl.Dock = DockStyle.Fill; m3dTargetControl.BackColor = RenderPanel.BackColor; this.RenderPanel.Controls.Add(m3dTargetControl); mViewDevice = new Viewer3dDevice(m3dTargetControl); mViewDevice.Initialize(); mViewDevice.CodeChanged += new EventHandler(mDevice_CodeChanged); DeviceFactory.RegisterDevice(mViewDevice); }
private void Setup2dViewer() { m2dTargetControl = new Canvas(); m2dTargetControl.Dock = DockStyle.Fill; this.RenderPanel.Controls.Add(m2dTargetControl); mViewDevice = new ViewerDevice(m2dTargetControl); mViewDevice.Initialize(); mViewDevice.CodeChanged += new EventHandler(mDevice_CodeChanged); DeviceFactory.RegisterDevice(mViewDevice); }