Beispiel #1
0
		protected override void LayoutExample()
		{
			base.LayoutExample();
			
			NDiagramExamplesDockManager diagramDockManager = DockManager as NDiagramExamplesDockManager;
			NDiagramExamplesLayoutStrategy diagramLayoutStrategy = Config.LayoutStrategy as NDiagramExamplesLayoutStrategy;

			if (CurrentExampleEntity == null)
				return;

			if (CurrentExampleEntity.LayoutType == currentLayoutType)
				return;

			currentLayoutType = CurrentExampleEntity.LayoutType;

			INDockZone zone = diagramDockManager.m_ExamplePanel.ParentZone;
			if (zone == null)
				return;

			if (CurrentExampleEntity.LayoutType == "Wide")
			{
				diagramLayoutStrategy.WideScreenExampleZone.AddChild(zone);
				((NDiagramExampleUC)CurrentExampleControl).commonControlsPanel.Width = 260;
				((NDiagramExampleUC)CurrentExampleControl).commonControlsPanel.Dock = DockStyle.Right;
			}
			else
			{
				diagramDockManager.m_Container.RootZone.AddChild(zone);
				((NDiagramExampleUC)CurrentExampleControl).commonControlsPanel.Height = 80;
				((NDiagramExampleUC)CurrentExampleControl).commonControlsPanel.Dock = DockStyle.Bottom;
			}
		}
Beispiel #2
0
		/// <summary>
		/// 
		/// </summary>
		private void InitializeDiagramExamplesComponents()
		{
			NDiagramExamplesDockManager dockManager = (NDiagramExamplesDockManager)this.DockManager;

			// create the view
			view = new NDrawingView();
			view.Dock = System.Windows.Forms.DockStyle.Fill;

			// create the document
			document = new NDrawingDocument();
			view.Document = document;

			// create the event log
			eventLogControl = new NEventLogUC();
			dockManager.EventLogPanel.Controls.Add(eventLogControl);
			eventLogControl.Dock = System.Windows.Forms.DockStyle.Fill;
			eventLogControl.Form = this;

			// create the property browser
			propertyBrowser = new NPropertyBrowser();
			propertyBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
			propertyBrowser.View = view;
			dockManager.DiagramExplorerPanel.Controls.Add(propertyBrowser);

			// create the diagram designer panel
			Panel designerPanel = new Panel();
			designerPanel.Dock = System.Windows.Forms.DockStyle.Fill;
			designerPanel.Controls.Add(view);
			dockManager.DiagramDesignerPanel.Controls.Add(designerPanel);

			// create the command bars manager
			commandBarsManager = new NDiagramCommandBarsManager();
			commandBarsManager.View = view;
			commandBarsManager.ParentControl = designerPanel;

			// create the status bar
			NDiagramStatusBar statusBar = new NDiagramStatusBar();
			statusBar.Visible = false;
			statusBar.View = view;
			commandBarsManager.StatusBar = statusBar;
			Controls.Add(statusBar);
		}