Exemple #1
0
        private void MenuItem_Click_DelMethod(object sender, RoutedEventArgs e)
        {
            MenuItem         item = sender as MenuItem;
            ConditionControl node = item.Tag as ConditionControl;

            DelChildNode(node);
        }
Exemple #2
0
        public IfNode(CodeGenerateSystem.Base.ConstructionParams csParam)
            : base(csParam)
        {
            InitConstruction();
            NodeName = "if";
            var ccP = CodeGenerateSystem.Base.BaseNodeControl.CreateConstructionParam(typeof(ConditionControl));

            ccP.CSType             = csParam.CSType;
            ccP.HostNodesContainer = CSParam.HostNodesContainer;
            ConditionControl cc = new ConditionControl(ccP);

            AddChildNode(cc, mChildNodeContainer);

            AddLinkPinInfo("CtrlMethodLink_Pre", mCtrlMethodLink_Pre, null);
            AddLinkPinInfo("CtrlMethodLink_False", mCtrlMethodLink_False, null);
        }
Exemple #3
0
        private void AddConditionControl()
        {
            var ccP = BaseNodeControl.CreateConstructionParam(typeof(ConditionControl));

            ccP.CSType             = mCSParam.CSType;
            ccP.HostNodesContainer = this.HostNodesContainer;
            ConditionControl cc = new ConditionControl(ccP);

            cc.Index = mCCIndex++;

            //ContextMenu menu = new ContextMenu();
            //MenuItem menuItem = new MenuItem();
            //menuItem.Header = "删除条件";
            //menuItem.Click += new RoutedEventHandler(MenuItem_Click_DelMethod);
            //menuItem.Tag = cc;
            //menu.Items.Add(menuItem);
            //cc.ContextMenu = menu;

            AddChildNode(cc, ConditionStack);
        }