Пример #1
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();
        }
Пример #2
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
            {
            }
        }
Пример #3
0
 public void ShowMenu()
 {
     this.Visibility = Visibility.Visible;
     MuContentMenu.Show();
 }
Пример #4
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();
        }