コード例 #1
0
ファイル: ProcessingNode.cs プロジェクト: wshanshan/DDD
        public virtual void CreateComponent(CustomContextMenuTag clickedItemTag)
        {
            // bring up a form for input
            String type = clickedItemTag.GetNode().myType;
            InputForm tempInput = new InputForm(clickedItemTag.GetFunctionName(), type); // create the dialog
            tempInput.StartPosition = FormStartPosition.Manual;
            int x = Cursor.Position.X;
            int y = Cursor.Position.Y;
            tempInput.Location = new Point(x, y);

            if (!useDescription)
            {
                tempInput.HideDescriptionField();
            }

            CommonCreate(tempInput, clickedItemTag, type);
        }
コード例 #2
0
ファイル: ProcessingNode.cs プロジェクト: wshanshan/DDD
        public virtual void CreateComponent(CustomContextMenuTag clickedItemTag, Object[] args)
        {
            String type = clickedItemTag.GetNode().myType;

            if (args.Length == 1)
            {
                String var = args[0].ToString();
                Boolean useDesc = Boolean.Parse(var);
                this.useDescription = useDesc;
                this.CreateComponent(clickedItemTag);
                this.useDescription = true; // reset
            }
            else if (args.Length >= 2)
            {
                if (args.Length == 3)
                {
                    type = (String)args[2];
                }

                // bring up a form for input
                InputForm tempInput = new InputForm(clickedItemTag.GetFunctionName(), type); // create the dialog
                tempInput.StartPosition = FormStartPosition.Manual;
                int x = Cursor.Position.X;
                int y = Cursor.Position.Y;
                tempInput.Location = new Point(x, y);

                if (args.Length >= 1)
                {
                    tempInput.AlphaNumericTop = Boolean.Parse((String)args[0]);
                }

                if (args.Length >= 2)
                {
                    tempInput.AlphaNumericBottom = Boolean.Parse((String)args[0]);
                }

                if (!useDescription)
                {
                    tempInput.HideDescriptionField();
                }

                CommonCreate(tempInput, clickedItemTag, type);
            }
        }