示例#1
0
        public override void InitDefault()
        {
            base.InitDefault();

            m_SplashImage = NResourceHelper.BitmapFromResource(typeof(NMainForm), "DiagramSplash.png", "Nevron.Examples.Diagram.WinForm.Resources");

            m_sExamplesNamespace = "Nevron.Examples.Diagram.WinForm";
            m_sTreeResource      = "ExamplesTree.xml";
            m_sTreeResourcePath  = "Nevron.Examples.Diagram.WinForm.Resources";
            m_sFormText          = "Nevron Diagram for Windows Forms - Part of Nevron .NET Vision - Examples";

            m_FormIcon = NResourceHelper.IconFromResource(typeof(NMainForm), "Diagram.ico", "Nevron.Examples.Diagram.WinForm.Resources");

            m_sFeedbackString = "mailto:[email protected]?subject=Diagram Feedback";

            m_iExampleTreeNodeImageIndex         = 11;
            m_iExampleTreeNodeSelectedImageIndex = 12;

            m_EmbeddedResourcesAssembly = this.GetType().Assembly;
            m_LayoutStrategy            = new NDiagramExamplesLayoutStrategy();

            ProductLogo       = NResourceHelper.BitmapFromResource(typeof(NMainForm), "DiagramLogo.png", "Nevron.Examples.Diagram.WinForm.Resources");
            ProductName       = "Nevron Diagram for .NET";
            ProductAssemblies = new System.Reflection.Assembly[] { typeof(NDiagramCommandBarsManager).Assembly };
        }
示例#2
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;
			}
		}