Exemplo n.º 1
0
        public void SetNoContextTarget()
        {
            List <MenuListItem> items = new List <MenuListItem>();

            items.AddRange(defaultItems);
            items.AddRange(noContextItems);
            MenuChanged?.Invoke(items);
        }
Exemplo n.º 2
0
        public void SetContextMouseTarget(EntityViewModel target)
        {
            List <MenuListItem> items = new List <MenuListItem>();

            items.AddRange(defaultItems);
            items.AddRange(contextItems);
            items.Add(new SeperatorMenuItem(target.Name));
            MenuChanged?.Invoke(items);
        }
Exemplo n.º 3
0
        public void TriggerMenuChanged()
        {
            MenuChanged?.Invoke(this, null);

            foreach (var menuCommand in GetMenuCommandsWithoutSeparators())
            {
                menuCommand.SetCheckForRegisteredMenuItems();
                menuCommand.UpdateMenuItemsShortcutKeyDisplayString();
            }
        }
        //called when a menu change is requested
        protected virtual void OnMenu(EventData eventData)
        {
            //non-null if an object has subscribed to this event
            MenuChanged?.Invoke(eventData);

            /*
             * //Old form:
             * if (MenuChanged != null)
             *  MenuChanged(eventData);
             */
        }
        // taken from http://stackoverflow.com/questions/5058254/inotifypropertychanged-propertychangedeventhandler-event-is-always-null
        // paramenter name not used
        protected void OnMenuChanged()
        {
            Debug.WriteLine("RevisionGridMenuCommands.OnPropertyChanged()");

            MenuChanged?.Invoke(this, null);

            foreach (var menuCommand in GetMenuCommandsWithoutSeparators())
            {
                menuCommand.SetCheckForRegisteredMenuItems();
                menuCommand.UpdateMenuItemsShortcutKeyDisplayString();
            }
        }
Exemplo n.º 6
0
 internal static void InvokeMenuChanged(IClickableMenu priorMenu, IClickableMenu newMenu)
 {
     MenuChanged.Invoke(null, new EventArgsClickableMenuChanged(priorMenu, newMenu));
 }
Exemplo n.º 7
0
 //called when a menu is shown, hidden or modified
 protected virtual void OnMenuChanged(EventData eventData)
 {
     MenuChanged?.Invoke(eventData);
 }
Exemplo n.º 8
0
 internal static void CallMenuChanged(string newName)
 {
     MenuChanged?.Invoke(null, new StringDataEventArgs(newName));
 }
Exemplo n.º 9
0
 public static void InvokeMenuChanged(IClickableMenu newMenu)
 {
     MenuChanged.Invoke(newMenu);
 }
Exemplo n.º 10
0
 private void Button1_OnClicked(object sender, EventArgs e)
 {
     MenuChanged?.Invoke(this, 1);
     MarkerBoxView.LayoutTo((sender as VisualElement).Bounds, 150, Easing.CubicInOut);
 }
Exemplo n.º 11
0
 private void OnMenuChanged(MenuItemName menuName)
 {
     MenuChanged?.Invoke(this, new MenuChangedEventArgs(menuName));
 }