Exemplo n.º 1
0
        void dEngineParentChild_NodeAdded(object sender, NodeAddedEventArgs args)
        {
            if (args.SourceName == "MatthewFamily")
            {
                Syncfusion.Windows.Forms.Diagram.Rectangle rectNode = args.NodeObject as Syncfusion.Windows.Forms.Diagram.Rectangle;
                rectNode.Labels[0].FontStyle.Family = "Segoe UI";
                rectNode.Labels[0].FontStyle.Bold   = true;
                rectNode.FillStyle.Color            = Color.White;
                rectNode.FillStyle.Color            = Color.LightSlateGray;
                rectNode.FillStyle.Type             = Syncfusion.Windows.Forms.Diagram.FillStyleType.LinearGradient;
                rectNode.EnableShading = false;

                rectNode.ShadowStyle.Visible = true;
                rectNode.ShadowStyle.OffsetX = 0;
                rectNode.ShadowStyle.OffsetY = 6;
            }
            else if (args.SourceName == "JohnsonFamily")
            {
                Syncfusion.Windows.Forms.Diagram.Rectangle rectNode = args.NodeObject as Syncfusion.Windows.Forms.Diagram.Rectangle;
                rectNode.Labels[0].FontStyle.Family = "Segoe UI";
                rectNode.Labels[0].FontStyle.Bold   = true;
                rectNode.Labels[0].FontStyle.Italic = true;
                rectNode.FillStyle.Color            = Color.Bisque;
                rectNode.EnableShading            = false;
                rectNode.FillStyle.ForeColor      = Color.White;
                rectNode.FillStyle.Type           = Syncfusion.Windows.Forms.Diagram.FillStyleType.LinearGradient;
                rectNode.FillStyle.GradientCenter = 0.5f;
                rectNode.ShadowStyle.Visible      = true;
                rectNode.ShadowStyle.OffsetX      = 0;
                rectNode.ShadowStyle.OffsetY      = 6;
            }
        }
Exemplo n.º 2
0
        private void OnNodeAdded()
        {
            if (NodeAdded != null)
            {
                ITypeBinderTreeViewNode node = _navigationTreeController.SelectedNode;

                NodeAddedEventArgs args = new NodeAddedEventArgs()
                {
                    DataBoundItem = node.DataBoundItem,
                    DataBoundType = node.Codon.DataBoundType,
                    ItemType      = node.ItemType,
                    Items         = node.Items
                };

                NodeAdded(this, args);
            }
        }
Exemplo n.º 3
0
 void dEngineSelfRelation_NodeAdded(object sender, NodeAddedEventArgs args)
 {
     if (args.NodeObject is Syncfusion.Windows.Forms.Diagram.Rectangle)
     {
         Syncfusion.Windows.Forms.Diagram.Rectangle rect = args.NodeObject as Syncfusion.Windows.Forms.Diagram.Rectangle;
         rect.FillStyle.Color                = Color.FromArgb(242, 242, 242);
         rect.FillStyle.ForeColor            = Color.White;
         rect.LineStyle.LineColor            = Color.Black;
         rect.FillStyle.Type                 = FillStyleType.LinearGradient;
         rect.FillStyle.GradientAngle        = 90;
         rect.FillStyle.GradientCenter       = 1;
         rect.EnableShading                  = false;
         rect.LineStyle.DashCap              = System.Drawing.Drawing2D.DashCap.Round;
         rect.Labels[0].FontStyle.Bold       = true;
         rect.Labels[0].FontStyle.Family     = "Segoe UI";
         rect.Labels[0].FontColorStyle.Color = Color.Black;
     }
 }
Exemplo n.º 4
0
        void m_oModel_NodeAdded(object sender, NodeAddedEventArgs e)
        {
            MethodInvoker MethodBody = delegate()
            {
                TreeNode oParentNode = c_tvView.SelectedNode;
                TreeNode oChildNode  = null;

                while (oParentNode != null && oParentNode.Tag != e.Parent)
                {
                    oChildNode  = oParentNode;
                    oParentNode = oParentNode.Parent;
                }

                if (oParentNode == null)
                {
                    throw new ApplicationException("I'm lost");
                }

                if (oChildNode == null || e.Parent.ShowAllChildren)
                {
                    // --- The node that got added was a child of the selected node ---
                    if (oParentNode != c_tvView.SelectedNode)
                    {
                        throw new ApplicationException("I'm lost");
                    }

                    c_tvView.BeginUpdate();

                    oParentNode.Nodes.Insert(e.Parent.GetIndex(e.Child), WrapModelNode(e.Child));

                    c_tvView.ExpandAll();
                    TreeIntegrityCheck();
                    c_tvView.EndUpdate();
                }
            };

            if (c_tvView.IsHandleCreated)
            {
                c_tvView.Invoke(MethodBody);
            }
        }
        private void OnNodeAddedToRepository(object sender, NodeAddedEventArgs e)
        {
            var viewModel = e.Node.ToStagingNodeViewModel();
            StagingNodes.Add(viewModel);

            if (IsVisible == Visibility.Collapsed)
            {
                IsVisible = Visibility.Visible;
            }
        }
 private void OnNodeAddedToRepository(object sender, NodeAddedEventArgs e)
 {
     var viewModel = e.Node.ToNodeViewModel();
     NodeViewModels.Add(viewModel);
 }
Exemplo n.º 7
0
 private void OnNodeAdded(NodeAddedEventArgs args)
 {
     _sceneChanges.OnNext(SceneChangeEventArgs.NodeAdded(args));
 }
Exemplo n.º 8
0
        void m_oModel_NodeAdded(object sender, NodeAddedEventArgs e)
        {
            MethodInvoker MethodBody = delegate()
            {
                TreeNode oParentNode = c_tvView.SelectedNode;
                TreeNode oChildNode = null;

                while (oParentNode != null && oParentNode.Tag != e.Parent)
                {
                    oChildNode = oParentNode;
                    oParentNode = oParentNode.Parent;
                }

                if (oParentNode == null) throw new ApplicationException("I'm lost");

                if (oChildNode == null || e.Parent.ShowAllChildren)
                {
                    // --- The node that got added was a child of the selected node ---
                    if (oParentNode != c_tvView.SelectedNode) throw new ApplicationException("I'm lost");

                    c_tvView.BeginUpdate();

                    oParentNode.Nodes.Insert(e.Parent.GetIndex(e.Child), WrapModelNode(e.Child));

                    c_tvView.ExpandAll();
                    TreeIntegrityCheck();
                    c_tvView.EndUpdate();
                }
            };

            if (c_tvView.IsHandleCreated)
                c_tvView.Invoke(MethodBody);
        }
 private void OnNodeAddedToRepository(object pSender, NodeAddedEventArgs e)
 {
     var viewModel = e.Node.ToBlueprintViewModel();
     mStagingNodes.Add(viewModel);
     mNodeNetwork.NetworkElementsUpdated();
 }
 public static SceneChangeEventArgs NodeAdded(NodeAddedEventArgs args)
 {
     return(new SceneChangeEventArgs(Change.NodeAdded));
 }