Example #1
0
        public static void Generate(BarManager barManager, PopupMenu popupMenu, List<MovieModel> movieModel)
        {
            popupMenu.ClearLinks();

            GenerateLock(barManager, popupMenu, movieModel);
            GenerateUnlock(barManager, popupMenu, movieModel);
        }
Example #2
0
        public static void Generate(BarManager barManager, PopupMenu popupMenu, List <MovieModel> movieModel)
        {
            popupMenu.ClearLinks();

            GenerateLock(barManager, popupMenu, movieModel);
            GenerateUnlock(barManager, popupMenu, movieModel);
        }
Example #3
0
        public void YazdirmaSecenekleriniEkle(PopupMenu popupMenu, DizaynTipi dizaynTipi, ItemClickEventHandler action)
        {
            var resYSecenekleri = raporDal.GetAll(context, x => x.DizaynTipi == dizaynTipi.ToString());

            popupMenu.ClearLinks();

            foreach (var item in resYSecenekleri)
            {
                var br = CreateItem(item);
                popupMenu.AddItem(br);
                br.ItemClick += action;
            }
        }
Example #4
0
 private bool BulidMenu(TOCTreeNode pNode, PopupMenu LayerPopupMenu)
 {
     LayerPopupMenu.ClearLinks();
     if (pNode != null)
     {
         if (pNode.TOCNodeType == NodeType.Layer)
         {
             if (pNode.Tag is ITopologyLayer)
             {
                 return(false);
             }
             LayerPopupMenu.AddItem(this.OpenAttributeTable);
             LayerPopupMenu.AddItem(this.ZoomToLayer).BeginGroup = true;
             LayerPopupMenu.AddItem(this.SetVisibleScale);
             LayerPopupMenu.AddItem(this.LabelFeature).BeginGroup  = true;
             LayerPopupMenu.AddItem(this.ExportLayer).BeginGroup   = true;
             LayerPopupMenu.AddItem(this.LayerProperty).BeginGroup = true;
             return(true);
         }
         if (pNode.TOCNodeType == NodeType.GroupLayer)
         {
             LayerPopupMenu.AddItem(this.ZoomToLayer).BeginGroup = true;
             LayerPopupMenu.AddItem(this.SetVisibleScale);
             LayerPopupMenu.AddItem(this.ExportLayer).BeginGroup   = true;
             LayerPopupMenu.AddItem(this.LayerProperty).BeginGroup = true;
             return(true);
         }
         if (pNode.TOCNodeType == NodeType.Table)
         {
             LayerPopupMenu.AddItem(this.OpenAttributeTable);
             return(true);
         }
         if (pNode.TOCNodeType == NodeType.Map)
         {
             LayerPopupMenu.AddItem(this.ExportMap).BeginGroup        = true;
             LayerPopupMenu.AddItem(this.MapFrameProperty).BeginGroup = true;
             return(true);
         }
     }
     return(false);
 }
Example #5
0
        public void SetContextMenu(Control mapControl)
        {
            if (string.IsNullOrEmpty(_oldToolName))
            {
                _ribbonManager.SetPopupContextMenu(mapControl, null);
                return;
            }
            BarItem item = _ribbonManager.Items[_oldToolName];

            if (item == null)
            {
                _ribbonManager.SetPopupContextMenu(mapControl, null);
                return;
            }
            YutaiTool tool = item.Tag as YutaiTool;

            if (!(tool is IToolContextMenu))
            {
                _ribbonManager.SetPopupContextMenu(mapControl, null);
                return;
            }

            PopupMenu mPCurrentPopupMenu = this.m_pCurrentPopupMenu;

            mPCurrentPopupMenu.ClearLinks();
            string[] keys = ((IToolContextMenu)tool).ContextMenuKeys;
            if (keys == null)
            {
                return;
            }
            item = null;
            bool nextGroup = false;

            for (int i = 0; i < keys.Length; i++)
            {
                if (keys[i].Equals('-'))
                {
                    nextGroup = true;
                    continue;
                }
                item = _ribbonManager.Items[keys[i]];

                if (item == null)
                {
                    continue;
                }
                BarItemLink link = mPCurrentPopupMenu.AddItem(item);
                if (nextGroup)
                {
                    link.BeginGroup = true;
                    nextGroup       = false;
                }
            }
            if (mPCurrentPopupMenu.ItemLinks.Count <= 0)
            {
                _ribbonManager.SetPopupContextMenu(mapControl, this.m_pSystemPopupMenu);
            }
            else
            {
                _ribbonManager.SetPopupContextMenu(mapControl, mPCurrentPopupMenu);
            }
        }
        private void PopulateDropDown(IIndexField[] indexFields, DropDownButton button, PopupMenu popupMenu, BarManager barManager, string text)
        {
            popupMenu.ClearLinks();

            popupMenu.AddItem(barManager.Items.CreateButton(text));

            foreach (IIndexField field in indexFields)
                popupMenu.AddItem(barManager.Items.CreateButton(field.Label));

            SetClickEvent(barManager);
            button.DropDownControl = popupMenu;
        }