Пример #1
0
        public void ShowPropertyWindow(UIElement element)
        {
            _begin = element as BeginControl;
            if (_begin == null)
            {
                return;
            }

            this.txtName.Text = "流程开始";
        }
Пример #2
0
        private UIElement ElementFactory(ElementType type)
        {
            //SetZoom(1.0);//置放大或者缩小为原点
            UIElement element = null;
            double    left = 0, right = 0;

            switch (type)
            {
            case ElementType.Begin:
            {
                element = new BeginControl(left, right, cnsDesignerContainer.Width, cnsDesignerContainer.Height);
                break;
            }

            case ElementType.Activity:
            {
                element = new SMT.Workflow.Platform.Designer.DesignerControl.ActivityControl(left, right, cnsDesignerContainer.Width, cnsDesignerContainer.Height);
                ((DesignerControl.ActivityControl)element).Title = "新建活动" + this.GetActivieyIdentityNo();
                break;
            }

            case ElementType.Line:
            {
                element = new LineControl(left, right, cnsDesignerContainer.Width, cnsDesignerContainer.Height);
                ((DesignerControl.LineControl)element).Title = "新建连线" + this.GetLineIdentityNo();
                break;
            }

            case ElementType.Finish:
            {
                element = new FinishControl(left, right, cnsDesignerContainer.Width, cnsDesignerContainer.Height);
                break;
            }
            }
            return(element);
        }