Пример #1
0
		public MainWindow()
		{
			SetWindowTitle("MonoWorks Demo");

			var adapter = new ViewportAdapter(this);
			this.SetCentralWidget(adapter);
			
			// create the scene space
			var sceneSpace = new SceneSpace(adapter.Viewport);
			adapter.Viewport.RootScene = sceneSpace;
			var book = new SceneBook(adapter.Viewport);
			sceneSpace.Root = book;
			
			// create the controls scene
			var controlsScene = new ControlsScene(adapter.Viewport);
			book.Add(controlsScene);
			
	        ToolTip = "This is the MonoWorks demo for Qt";
			Resize(800, 800);
			Show();
			
		}
Пример #2
0
		/// <summary>
		/// Default constructor.
		/// </summary>
		public MainWindow() : base(gtk.WindowType.Toplevel)
		{
			Title = "MonoWorks Demo";
			
			DeleteEvent += OnDeleteEvent;
			
			// create the viewport adapter
			var adapter = new ViewportAdapter();
			Add(adapter);
			
			// create the scene space
			var sceneSpace = new SceneSpace(adapter.Viewport);
			adapter.Viewport.RootScene = sceneSpace;
			var book = new SceneBook(adapter.Viewport);
			sceneSpace.Root = book;
			
			// create the cards scene
			var cards = new CardScene(adapter.Viewport);
			book.Add(cards);
			
			// create the controls scene
			var controls = new ControlsScene(adapter.Viewport);
			book.Add(controls);
			
			// create the controls scene
			var mwx = new MwxScene(adapter.Viewport);
			book.Add(mwx);
			
			// create the 2D plotting scene
			var plot2d = new Plot2dScene(adapter.Viewport);
			book.Add(plot2d);
			
			// create the 3D plotting scene
			var plot3d = new Plot3dScene(adapter.Viewport);
			book.Add(plot3d);
			
			ShowAll();
		}