public static ButtonAction AddButton(this ActionCollection actions, string id, string text) { var action = new ButtonAction(id, text); actions.Add(action); return(action); }
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); }
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); }
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); }
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); }
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); }
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); }
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 }
public static RadioAction AddRadio(this ActionCollection actions, RadioAction controller, string id, string text) { return(AddRadio(actions, controller, id, text, string.Empty, null, null)); }
public static CheckAction AddCheck(this ActionCollection actions, string id, string text, EventHandler <EventArgs> activated) { return(AddCheck(actions, id, text, string.Empty, activated, null)); }
public GenerateActionArgs(ActionCollection actions, ActionItemCollection menu, ActionItemCollection toolBar) { this.actions = actions; this.menu = menu; this.toolBar = toolBar; }
public GenerateActionArgs(Generator g, Control control) { this.actions = new ActionCollection(g, control); this.menu = new ActionItemCollection(actions); this.toolBar = new ActionItemCollection(actions); }
public ActionItemSubMenu(ActionCollection actions, string subMenuText) { this.Actions = new ActionItemCollection(actions); this.SubMenuText = subMenuText; }
public ActionItemCollection(ActionCollection actions) { this.actions = actions; }