예제 #1
0
        public static ButtonAction AddButton(this ActionCollection actions, string id, string text)
        {
            var action = new ButtonAction(id, text);

            actions.Add(action);
            return(action);
        }
예제 #2
0
        public static ButtonAction AddButton(this ActionCollection actions, string id, string text, EventHandler <EventArgs> activated)
        {
            var action = new ButtonAction(id, text, activated);

            actions.Add(action);
            return(action);
        }
예제 #3
0
파일: ButtonAction.cs 프로젝트: pcdummy/Eto
        public static ButtonAction AddButton(this ActionCollection actions, string id, string text, EventHandler <EventArgs> activated, params Key[] accelerators)
        {
            ButtonAction action = new ButtonAction(id, text, activated);

            action.Accelerators = accelerators;
            actions.Add(action);
            return(action);
        }
예제 #4
0
        public static bool RemoveCheckHandler(this ActionCollection actions, string actionID, EventHandler <EventArgs> checkChangedHandler)
        {
            var action = actions[actionID] as CheckAction;

            if (action != null)
            {
                action.CheckedChanged -= checkChangedHandler;
                return(true);
            }
            return(false);
        }
예제 #5
0
파일: ButtonAction.cs 프로젝트: pcdummy/Eto
        public static ButtonAction AddButton(this ActionCollection actions, string id, string text, string iconResource, EventHandler <EventArgs> activated)
        {
            Icon icon = null;

            if (!string.IsNullOrEmpty(iconResource))
            {
                icon = Icon.FromResource(Assembly.GetCallingAssembly(), iconResource);
            }
            ButtonAction action = new ButtonAction(id, text, icon, activated);

            actions.Add(action);
            return(action);
        }
예제 #6
0
        public static RadioAction AddRadio(this ActionCollection actions, RadioAction controller, string id, string text, string iconResource, EventHandler <EventArgs> activated, params Key[] accelerators)
        {
            Icon icon = null;

            if (!string.IsNullOrEmpty(iconResource))
            {
                icon = Icon.FromResource(Assembly.GetCallingAssembly(), iconResource);
            }
            RadioAction action = new RadioAction(controller, id, text, icon, activated);

            action.Accelerators = accelerators;
            actions.Add(action);
            return(action);
        }
예제 #7
0
        public static ButtonAction AddButton(this ActionCollection actions, string id, string text, string iconResource, EventHandler <EventArgs> activated, params Key[] accelerators)
        {
            Icon icon = null;

            if (iconResource != string.Empty)
            {
                icon = Icon.FromResource(Assembly.GetCallingAssembly(), iconResource);
            }
            ButtonAction action = new ButtonAction(id, text, icon, activated);

            action.Accelerators = accelerators;
            actions.Add(action);
            return(action);
        }
예제 #8
0
        public static ButtonAction AddButton(this ActionCollection actions, string id, string text, string iconResource, EventHandler <EventArgs> activated)
        {
#if WINRT
            throw new NotImplementedException("WinRT does not support Assembly.GetCallingAssembly");
#else
            Icon icon = null;
            if (!string.IsNullOrEmpty(iconResource))
            {
                icon = Icon.FromResource(Assembly.GetCallingAssembly(), iconResource);
            }
            var action = new ButtonAction(id, text, icon, activated);
            actions.Add(action);
            return(action);
#endif
        }
예제 #9
0
 public static RadioAction AddRadio(this ActionCollection actions, RadioAction controller, string id, string text)
 {
     return(AddRadio(actions, controller, id, text, string.Empty, null, null));
 }
예제 #10
0
 public static CheckAction AddCheck(this ActionCollection actions, string id, string text, EventHandler <EventArgs> activated)
 {
     return(AddCheck(actions, id, text, string.Empty, activated, null));
 }
예제 #11
0
 public GenerateActionArgs(ActionCollection actions, ActionItemCollection menu, ActionItemCollection toolBar)
 {
     this.actions = actions;
     this.menu    = menu;
     this.toolBar = toolBar;
 }
예제 #12
0
 public GenerateActionArgs(Generator g, Control control)
 {
     this.actions = new ActionCollection(g, control);
     this.menu    = new ActionItemCollection(actions);
     this.toolBar = new ActionItemCollection(actions);
 }
예제 #13
0
 public ActionItemSubMenu(ActionCollection actions, string subMenuText)
 {
     this.Actions     = new ActionItemCollection(actions);
     this.SubMenuText = subMenuText;
 }
예제 #14
0
 public ActionItemCollection(ActionCollection actions)
 {
     this.actions = actions;
 }