Пример #1
0
        private void btnWfMatrix_Click(object sender, RoutedEventArgs e)
        {
            if (!DiagramUtils.IsMainDiagram(sender as UIElement))
            {
                return;
            }

            DiagramUtils.WebInterAct.OpenEditor(sender, EditorType.ImportWfMatrix);
        }
Пример #2
0
        /// <summary>
        /// 隐藏活动点上链接接入点
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Node_MouseLeave(object sender, MouseEventArgs e)
        {
            if (!DiagramUtils.IsMainDiagram(sender as UIElement))
            {
                return;
            }

            SetPortsVisible(sender as UIElement, false);
        }
Пример #3
0
        private void btnParameters_Click(object sender, RoutedEventArgs e)
        {
            if (!DiagramUtils.IsMainDiagram(sender as UIElement))
            {
                return;
            }

            DiagramUtils.WebInterAct.OpenEditor(sender, EditorType.ParametersNeedToBeCollected);
        }
Пример #4
0
        private void btnExternalUser_Click(object sender, RoutedEventArgs e)
        {
            if (!DiagramUtils.IsMainDiagram(sender as UIElement))
            {
                return;
            }

            DiagramUtils.WebInterAct.OpenEditor(sender, EditorType.ExternalUsers);
        }
Пример #5
0
        private void btnRelativeLink_Click(object sender, RoutedEventArgs e)
        {
            if (!DiagramUtils.IsMainDiagram(sender as UIElement))
            {
                return;
            }

            DiagramUtils.WebInterAct.OpenEditor(sender, EditorType.RelativeLink);
        }
Пример #6
0
        private void btnBranchProcess_Click(object sender, RoutedEventArgs e)
        {
            if (!DiagramUtils.IsMainDiagram(sender as UIElement))
            {
                return;
            }

            DiagramUtils.WebInterAct.OpenEditor(sender, EditorType.BranchProcess);
        }
Пример #7
0
        private void btnLeaveService_Click(object sender, RoutedEventArgs e)
        {
            if (!DiagramUtils.IsMainDiagram(sender as UIElement))
            {
                return;
            }

            DiagramUtils.WebInterAct.OpenEditor(sender, EditorType.LeaveService);
        }
Пример #8
0
        private void btnVariable_Click(object sender, RoutedEventArgs e)
        {
            var element = sender as UIElement;

            if (!DiagramUtils.IsMainDiagram(element))
            {
                return;
            }

            SetSelectPartAsCurrent(element);
            DiagramUtils.WebInterAct.OpenEditor(sender, EditorType.Variables);
        }
Пример #9
0
        private void btnActivityTempalte_Click(object sender, RoutedEventArgs e)
        {
            var element = sender as UIElement;

            if (!DiagramUtils.IsMainDiagram(element))
            {
                return;
            }

            var diagram = Part.FindAncestor <Diagram>(element);

            if (diagram == null)
            {
                return;
            }


            var nodeData = diagram.SelectedNode.Data as ActivityNode;

            if (nodeData == null)
            {
                return;
            }
            if (nodeData.Category != ActivityType.Normal.ToString())
            {
                MessageBox.Show("只能为Normal节点设置模板");
                return;
            }

            string templateID = Guid.NewGuid().ToString();

            //保存到数据库
            DiagramUtils.WebInterAct.SaveActivityTemplate(templateID);
            //保存到palette中
            DiagramUtils.AddActivityTemplate(diagram, nodeData.WfClone(templateID));
            DiagramUtils.GetTemplateKeys(diagram).Add(templateID);
        }