public static ButtonAction AddButton(this ActionCollection actions, string id, string text, EventHandler <EventArgs> activated) { ButtonAction action = new ButtonAction(id, text, activated); actions.Add(action); return(action); }
public static ButtonAction AddButton(this ActionCollection actions, string id, string text) { ButtonAction action = new ButtonAction(id, text); 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 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 }