Esempio n. 1
0
        private void Menu_ItemSelected(object sender, MenuEventArgs e)
        {
            if (e.Tag == null)
            {
                return;
            }

            switch (e.Tag.ToString())
            {
                case "menuSetDirectionCondition":
                  //  _Service.GetRelativeUrlAsync("", "Dir", FlowID, r.BeginFlowNode.NodeID, r.EndFlowNode.NodeID, true);
                    showDirectionSetting();
                    break;
                case "menuIsCanBack":
                    this.Visibility = Visibility.Collapsed;
                    var subMenu = MuContentMenu.Items[1] as MenuItem;
                    subMenu.IsChecked = !subMenu.IsChecked;
                    relatedDirection.IsCanBack = subMenu.IsChecked;
                    _container.IsNeedSave = true;
                    break;
                case "menuIsPolyline":
                    this.Visibility = Visibility.Collapsed;
                    subMenu = MuContentMenu.Items[2] as MenuItem;
                    subMenu.IsChecked = !subMenu.IsChecked;
                    relatedDirection.LineType = subMenu.IsChecked ? DirectionLineType.Polyline : DirectionLineType.Line;
                    _container.IsNeedSave = true;   
                    break;
                case "menuDeleteDirection":
                    deleteDirection();
                    break;
            }
            MuContentMenu.Hide();
        }
Esempio n. 2
0
        public void ShowMenu()
        {
            isMultiControlSelect = false;

            if (_container.CurrentSelectedControlCollection != null &&
                _container.CurrentSelectedControlCollection.Count > 0
                )
            {
                if (!_container.CurrentSelectedControlCollection.Contains(relatedLabel))
                {
                    _container.ClearSelectFlowElement(null);
                    isMultiControlSelect = false;
                }
                else
                {
                    isMultiControlSelect = true;
                }
            }
            else
            {
                isMultiControlSelect = false;
            }

            this.Visibility = Visibility.Visible;
            MuContentMenu.Show();
        }
Esempio n. 3
0
        public void ShowMenu()
        {
            isMultiControlSelect = false;

            if (_container.CurrentSelectedControlCollection != null &&
                _container.CurrentSelectedControlCollection.Count > 0
                )
            {
                if (!_container.CurrentSelectedControlCollection.Contains(relatedFlowNode))
                {
                    _container.ClearSelectFlowElement(null);
                    isMultiControlSelect = false;
                }
                else
                {
                    isMultiControlSelect = true;
                }
            }
            else
            {
                isMultiControlSelect = false;
            }

            this.Visibility = Visibility.Visible;
            MuContentMenu.Show();

            try
            {
                if (NodePosType.Start == RelatedFlowNode.HisPosType)
                {
                    MuContentMenu.SetEnabledStatus("menuDeleteNode", false);
                }
                else
                {
                    MuContentMenu.SetEnabledStatus("menuDeleteNode", true);
                }
                setMenuItemStyleByType(RelatedFlowNode.HisRunModel);
            }
            catch
            {
            }
        }
Esempio n. 4
0
        private void Menu_ItemSelected(object sender, MenuEventArgs e)
        {
            if (e.Tag == null)
            {
                return;
            }

            switch (e.Tag.ToString())
            {
            case "menuModifyLabel":
                menuModifyLabel_Click();
                break;

            case "menuDeleteLabel":
                menuDeleteLabel_Click();
                break;
            }

            MuContentMenu.Hide();
        }
Esempio n. 5
0
 public void ShowMenu()
 {
     this.Visibility = Visibility.Visible;
     MuContentMenu.Show();
 }
Esempio n. 6
0
 private void UserControl_MouseLeave(object sender, MouseEventArgs e)
 {
     MuContentMenu.Hide();
 }
Esempio n. 7
0
        private void Menu_ItemSelected(object sender, MenuEventArgs e)
        {
            if (e.Tag == null)
            {
                return;
            }

            switch (e.Tag.ToString())
            {
            case "Help":
                BP.Glo.WinOpen("http://ccflow.org/Help.aspx?wd=设计器", "帮助", 900, 1200);
                break;

            case "menuExp":
                BP.Frm.FrmExp exp = new BP.Frm.FrmExp();
                exp.Show();
                break;

            case "menuImp":
                BP.Frm.FrmImp imp = new BP.Frm.FrmImp();
                imp.Show();
                break;

            case "menuFullScreen":
                Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;
                break;

            case "menuAddNode":
                addAcitivty(FlowNodeType.Ordinary);
                break;

            case "menuAddLine":
                AddLine_Click();
                break;

            case "menuAddLabel":
                menuAddLabel_Click();
                break;

            case "menuFlowPropertity":
                BP.Glo.WinOpenByDoType("CH", BP.UrlFlag.FlowP, _container.FlowID, null, null);
                //_container.SetProper("", "FlowP", _container.FlowID, "0", "0", "流程属性");
                //_container.IsContainerRefresh = true;
                break;

            case "menuRunFlow":
                //_container.IsContainerRefresh = false;
                //_container.SetProper("", "RunFlow", _container.FlowID, "0", "0", "运行");
                BP.Glo.WinOpenByDoType("CH", BP.UrlFlag.RunFlow, _container.FlowID, null, null);
                break;

            case "menuCheckFlow":
                //_container.IsContainerRefresh = false;
                //_container.SetProper("", "FlowCheck", _container.FlowID, "0", "0", "检查");
                BP.Glo.WinOpenByDoType("CH", BP.UrlFlag.FlowCheck, _container.FlowID, null, null);
                break;

            case "menuFlowDefination":
                //_container.IsContainerRefresh = false;
                //_container.SetProper("", "WFRpt", _container.FlowID, "0", "0", "流程报表定义");

                BP.Glo.WinOpenByDoType("CH", BP.UrlFlag.WFRpt, _container.FlowID, null, null);
                break;

            case "menuDelete":     // 删除流程。
                if (System.Windows.Browser.HtmlPage.Window.Confirm("您确定要删除吗?"))
                {
                    _container.DeleteSeletedControl();
                    _container.SaveChange(HistoryType.New);
                    _container.IsNeedSave = true;
                }
                break;

            case "MenuDisplayHideGrid":
                if (_container.GridLinesContainer.Children.Count > 0)
                {
                    _container.GridLinesContainer.Children.Clear();
                }
                else
                {
                    _container.SetGridLines();
                }
                break;
            }
            MuContentMenu.Hide();
        }
Esempio n. 8
0
 private void Border_MouseLeave(object sender, MouseEventArgs e)
 {
     MuContentMenu.Hide();
 }
Esempio n. 9
0
        public void ShowMenu()
        {
            if (RelatedDirection.BeginFlowNode == null && RelatedDirection.EndFlowNode == null)
            {
                this.MuContentMenu.SetEnabledStatus("menuSetDirectionCondition", false);
            }
            else
            {
                this.MuContentMenu.SetEnabledStatus("menuSetDirectionCondition", true);
            }
            isMultiControlSelect = false;

            if (_container.CurrentSelectedControlCollection != null
                && _container.CurrentSelectedControlCollection.Count > 0
                )
            {
                if (!_container.CurrentSelectedControlCollection.Contains(relatedDirection))
                {
                    _container.ClearSelectFlowElement(null);

                    isMultiControlSelect = false;
                }
                else
                {
                    isMultiControlSelect = true;
                }
            }
            else
            {
                isMultiControlSelect = false;
            }

            this.Visibility = Visibility.Visible;

            #region 设置菜单项可见性和选中状态
            //方向条件
            var menu = MuContentMenu.Items[0] as MenuItem;

            if (null != menu)
            {
                menu.Visibility = relatedDirection.DirType == DirType.Backward ?
                    System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible;
            }

            //原路返回
            menu = MuContentMenu.Items[1] as MenuItem;

            if (null != menu)
            {
                menu.Visibility = relatedDirection.DirType == BP.DirType.Backward ?
                    System.Windows.Visibility.Visible : System.Windows.Visibility.Collapsed;
                menu.IsChecked = relatedDirection.IsCanBack;
            }

            //是否折线
            menu = MuContentMenu.Items[2] as MenuItem;

            if (null != menu)
            {
                menu.IsChecked = relatedDirection.LineType == DirectionLineType.Polyline;
            } 
            #endregion

            MuContentMenu.Show();
        }
Esempio n. 10
0
        private void Menu_ItemSelected(object sender, MenuEventArgs e)
        {
            if (e.Tag == null)
            {
                return;
            }
            switch (e.Tag.ToString())
            {
            case "MenuDisplayHideGrid":     //显示/隐藏网格
                if (_container.GridLinesContainer.Children.Count > 0)
                {
                    _container.GridLinesContainer.Children.Clear();
                }
                else
                {
                    _container.SetGridLines();
                }
                break;

            case "menuExp":     // 导出/共享:流程模板
                BP.Frm.FrmExp exp = new BP.Frm.FrmExp();
                exp.Show();
                break;

            case "menuImp":     //  导入/查找:流程模板
                BP.Frm.FrmImp imp = new BP.Frm.FrmImp();
                imp.Show();
                break;

            case "Help":
                Glo.WinOpen("http://ccflow.org/Help.aspx?wd=设计器", "帮助", 900, 1200);
                break;

            case "menuModifyName":
                showFlowNodeSetting();
                break;

            case "menuDeleteNode":
                deleteFlowNode();
                break;

            case "menuDesignNodeFixModel":
                Glo.WinOpenByDoType("CH", "MapDefFixModel", _container.FlowID, RelatedFlowNode.NodeID, null);
                break;

            case "menuDesignNodeFreeModel":
                Glo.WinOpenByDoType("CH", "MapDefFreeModel", _container.FlowID, RelatedFlowNode.NodeID, null);
                break;

            case "menuDesignFlowFrm":     // 表单库
                Glo.WinOpenByDoType("CH", "FrmLib", _container.FlowID, RelatedFlowNode.NodeID, null);
                break;

            case "menuDesignBindFlowFrm":     //流程表单
                Glo.WinOpenByDoType("CH", "FlowFrms", _container.FlowID, RelatedFlowNode.NodeID, null);
                break;

            case "menuJobStation":     // 节点工作岗位。
                Glo.WinOpenByDoType("CH", "StaDef", _container.FlowID, RelatedFlowNode.NodeID, null);
                break;

            case "menuNodeProperty":
                Glo.WinOpenByDoType("CH", "NodeP", _container.FlowID, RelatedFlowNode.NodeID, null);
                break;

            case "menuFlowProperty":
                Glo.WinOpenByDoType("CH", "FlowP", _container.FlowID, RelatedFlowNode.NodeID, null);
                break;

            case "menuNodeTypePT":
                RelatedFlowNode.HisRunModel = FlowNodeType.Ordinary;
                break;

            case "menuNodeTypeFL":
                RelatedFlowNode.HisRunModel = FlowNodeType.FL;
                break;

            case "menuNodeTypeHL":
                RelatedFlowNode.HisRunModel = FlowNodeType.HL;
                break;

            case "menuNodeTypeFHL":
                RelatedFlowNode.HisRunModel = FlowNodeType.FHL;
                break;

            case "menuNodeTypeZLC":
                RelatedFlowNode.HisRunModel = FlowNodeType.SubThread;
                break;
            }
            MuContentMenu.Hide();
        }