Пример #1
0
        /// <summary>
        /// Applies layout to the diagram
        /// </summary>
        private void ApplyLayout()
        {
            RadialTreeLayoutManager smtLayout = new RadialTreeLayoutManager(this.diagram1.Model, 0, 100, 30);

            smtLayout.TopMargin         = 0;
            smtLayout.LeftMargin        = 40;
            this.diagram1.LayoutManager = smtLayout;
            this.diagram1.LayoutManager.UpdateLayout(null);
        }
Пример #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     diagram1.Model.BeginUpdate();
     this.diagram1.Controller.InPlaceEditing = false;
     this.dtLayoutMgr       = new RadialTreeLayoutManager(this.diagram1.Model, 0, 80, 80);
     dtLayoutMgr.LeftMargin = 80;
     dtLayoutMgr.TopMargin  = 30;
     dtLayoutMgr.AutoLayout = true;
     diagram1.LayoutManager = dtLayoutMgr;
     DiagramAppearance();
     InitializeDiagramFromXMLData(@"..\..\..\..\..\..\..\Common\Data\Diagram\xml\DynamicProperties.xml");
     diagram1.Model.EndUpdate();
     diagram1.View.SelectionList.Clear();
     diagram1.EventSink.NodeMouseEnter += new NodeMouseEventHandler(EventSink_NodeMouseEnter);
     diagram1.EventSink.NodeMouseLeave += new NodeMouseEventHandler(EventSink_NodeMouseLeave);
 }
Пример #3
0
        public Form1()
        {
            InitializeComponent();
            diagram1.BeginUpdate();

            comboLytDirection.SelectedIndex = 0;
            DiagramAppearance();
            PopulateNodes();
            this.diagram1.View.SelectionList.Clear();

            RadialTreeLayoutManager rdlLyt = new RadialTreeLayoutManager(this.diagram1.Model, 0, 10, 10);

            rdlLyt.LeftMargin           = 40;
            rdlLyt.TopMargin            = 20;
            this.diagram1.LayoutManager = rdlLyt;
            this.diagram1.LayoutManager.UpdateLayout(null);
            diagram1.EndUpdate();

            txtHSpacing.Text      = rdlLyt.HorizontalSpacing.ToString();
            txtVSpacing.Text      = rdlLyt.VerticalSpacing.ToString();
            txtLMarigin.Text      = rdlLyt.LeftMargin.ToString();
            txtTMarigin.Text      = rdlLyt.TopMargin.ToString();
            chkAutoLayout.Checked = rdlLyt.AutoLayout;
        }