public UIBarButtonItem(string title, UIBarButtonItemStyle style, EventHandler handler) : this(title, style, new Callback (), actionSel) { callback = (Callback) Target; callback.container = this; clicked += handler; MarkDirty (); }
public UIBarButtonItem(string title, UIBarButtonItemStyle style, EventHandler handler) : this(title, style, new Callback(), actionSel) { callback = (Callback)Target; callback.container = this; clicked += handler; MarkDirty(); }
internal UIBarButtonItemPlay(OptionEnum aOptionInsertMode, UIBarButtonItemStyle aStyle, EventHandler aHandler) : base(string.Empty, aStyle, aHandler) { iOptionInsertMode = aOptionInsertMode; if (aOptionInsertMode.Value == OptionInsertMode.kPlayNow) { State = EInsertMode.ePlayNow; } else if (aOptionInsertMode.Value == OptionInsertMode.kPlayNext) { State = EInsertMode.ePlayNext; } else if (aOptionInsertMode.Value == OptionInsertMode.kPlayLater) { State = EInsertMode.ePlayLater; } Clicked += EventClicked; }
private static CommandBarButtonItem CreateCommandBarButton(object view, MemberInfo member, string title, UIView buttonView, UIBarButtonItemStyle style, UIBarButtonSystemItem? buttonType, BarButtonLocation location) { ICommandInterceptor commandInterceptor = null; CommandBarButtonItem button = null; ReflectiveCommand command = null; var methodInfo = member as MethodInfo; if(methodInfo != null) { command = GetCommandForMember(view, member); var cellViewTemplates = member.GetCustomAttributes<CellViewTemplate>(); if (cellViewTemplates.Length > 0) { var interceptorTemplate = cellViewTemplates .FirstOrDefault((template) => template.CellViewType != null && template.CellViewType.GetInterfaces() .Any((type)=> type == typeof(ICommandInterceptor))) as CellViewTemplate; if (interceptorTemplate != null) { commandInterceptor = Activator.CreateInstance(interceptorTemplate.CellViewType) as ICommandInterceptor; } } } if (!string.IsNullOrEmpty(title)) { button = new CommandBarButtonItem(title, style); } else if (buttonView != null) { button = new CommandBarButtonItem(buttonView); } else { if (!buttonType.HasValue) buttonType = UIBarButtonSystemItem.Done; button = new CommandBarButtonItem(buttonType.Value); button.Style = style; } command.CommandButton = button; button.Enabled = true; button.Location = location; button.Command = command; button.CommandInterceptor = commandInterceptor; var orderAttribute = member.GetCustomAttribute<OrderAttribute>(); if (orderAttribute != null) button.Order = orderAttribute.Order; else button.Order = 0; return button; }
public CommandBarButtonItem(UIImage image, UIBarButtonItemStyle style, NSObject target, Selector action) : base(image, style, target, action) { }
public CommandBarButtonItem(UIImage image, UIBarButtonItemStyle style, EventHandler handler) : base(image, style, handler) { }
public UIBarButtonItem([Optional] string title, UIBarButtonItemStyle style, [Optional] AnyObject target, Selector action) { }
public virtual UIImage BackgroundImageForState(UIControlState state, UIBarButtonItemStyle style, UIBarMetrics barMetrics) { return(default(UIImage)); }
public CommandBarButtonItem(UIImage image, UIBarButtonItemStyle style, NSObject target, Selector action): base(image, style, target, action) {}
private CommandBarButtonItem CreateCommandBarButton(object view, MemberInfo member, string title, UIView buttonView, UIBarButtonItemStyle style, UIBarButtonSystemItem buttonType, BarButtonLocation location) { CommandBarButtonItem button = null; ICommand command = null; var methodInfo = member as MethodInfo; if (methodInfo != null) { command = new ReflectiveCommand(view, member as MethodInfo, null); } if (!string.IsNullOrEmpty(title)) { button = new CommandBarButtonItem(title, style, delegate { command.Execute(null); }); } else if (buttonView != null) { button = new CommandBarButtonItem(buttonView); } else { button = new CommandBarButtonItem(buttonType, delegate { command.Execute(null); }); button.Style = style; } button.Enabled = true; button.Location = location; var orderAttribute = member.GetCustomAttribute <OrderAttribute>(); if (orderAttribute != null) { button.Order = orderAttribute.Order; } else { button.Order = 0; } return(button); }
/// <summary> /// Initializes a new instance of the <see cref="KSPictureLoginLib.KSBarButtonItem"/> class. /// </summary> /// <param name="controller">A reference to the <see cref="KSPictureLoginController"/> </param> /// <param name="image">Image.</param> /// <param name="style">Style.</param> public KSBarButtonItem(KSPictureLoginController controller, UIImage image, UIBarButtonItemStyle style) : base(image, style, null) { this.controller = new WeakReference (controller); }
private static CommandBarButtonItem CreateCommandBarButton(object view, MemberInfo member, string title, UIView buttonView, UIBarButtonItemStyle style, UIBarButtonSystemItem? buttonType, BarButtonLocation location) { CommandBarButtonItem button = null; ReflectiveCommand command = null; var methodInfo = member as MethodInfo; if(methodInfo != null) command = GetCommandForMember(view, member); if (!string.IsNullOrEmpty(title)) { button = new CommandBarButtonItem(title, style, (sender, e) => command.Execute(null)); } else if (buttonView != null) { button = new CommandBarButtonItem(buttonView); } else { if (!buttonType.HasValue) buttonType = UIBarButtonSystemItem.Done; button = new CommandBarButtonItem(buttonType.Value, (sender, e) => command.Execute(null)); button.Style = style; } command.CommandButton = button; button.Enabled = true; button.Location = location; button.Command = command; var orderAttribute = member.GetCustomAttribute<OrderAttribute>(); if (orderAttribute != null) button.Order = orderAttribute.Order; else button.Order = 0; return button; }
// Tools UIBarButtonItem createBarButton(string title, UIBarButtonItemStyle style, EventHandler action) { return(new UIBarButtonItem(title, style, action)); }
private static CommandBarButtonItem CreateCommandBarButton(object view, MemberInfo member, string title, UIView buttonView, UIBarButtonItemStyle style, UIBarButtonSystemItem?buttonType, BarButtonLocation location) { CommandBarButtonItem button = null; ReflectiveCommand command = null; var methodInfo = member as MethodInfo; if (methodInfo != null) { command = GetCommandForMember(view, member); } if (!string.IsNullOrEmpty(title)) { button = new CommandBarButtonItem(title, style, (sender, e) => command.Execute(null)); } else if (buttonView != null) { button = new CommandBarButtonItem(buttonView); } else { if (!buttonType.HasValue) { buttonType = UIBarButtonSystemItem.Done; } button = new CommandBarButtonItem(buttonType.Value, (sender, e) => command.Execute(null)); button.Style = style; } command.CommandButton = button; button.Enabled = true; button.Location = location; button.Command = command; var orderAttribute = member.GetCustomAttribute <OrderAttribute>(); if (orderAttribute != null) { button.Order = orderAttribute.Order; } else { button.Order = 0; } return(button); }
public CommandBarButtonItem(UIImage image, UIBarButtonItemStyle style, EventHandler handler): base(image, style, handler) {}
public CommandBarButtonItem(string title, UIBarButtonItemStyle style, EventHandler handler): base(title, style, handler) {}
public CommandBarButtonItem(string title, UIBarButtonItemStyle style): base(title, style, (s, e) => Execute(CommandParameter)) {}
public CommandBarButtonItem(string title, UIBarButtonItemStyle style, NSObject target, Selector action): base(title, style, target, action) {}
private CommandBarButtonItem CreateCommandBarButton(object view, MemberInfo member, string title, UIBarButtonItemStyle style, UIBarButtonSystemItem buttonType, BarButtonLocation location ) { CommandBarButtonItem button = null; ICommand command = null; var methodInfo = member as MethodInfo; if(methodInfo != null) command = new ReflectiveCommand(view, member as MethodInfo, null); if(!string.IsNullOrEmpty(title)) { button = new CommandBarButtonItem(title, style, delegate {command.Execute(null); }); } else { button = new CommandBarButtonItem(buttonType, delegate {command.Execute(null); }); button.Style = style; } button.Enabled = true; button.Location = location; var orderAttribute = member.GetCustomAttribute<OrderAttribute>(); if (orderAttribute != null) button.Order = orderAttribute.Order; else button.Order = 0; return button; }
public virtual void SetBackgroundImage([Optional] UIImage backgroundImage, UIControlState forState, UIBarButtonItemStyle style, UIBarMetrics barMetrics) { }
private static CommandBarButtonItem CreateCommandBarButton(object view, MemberInfo member, string title, UIView buttonView, UIBarButtonItemStyle style, UIBarButtonSystemItem?buttonType, BarButtonLocation location) { ICommandInterceptor commandInterceptor = null; CommandBarButtonItem button = null; ReflectiveCommand command = null; var methodInfo = member as MethodInfo; if (methodInfo != null) { command = GetCommandForMember(view, member); var cellViewTemplates = member.GetCustomAttributes <CellViewTemplate>(); if (cellViewTemplates.Length > 0) { var interceptorTemplate = cellViewTemplates .FirstOrDefault((template) => template.CellViewType != null && template.CellViewType.GetInterfaces() .Any((type) => type == typeof(ICommandInterceptor))) as CellViewTemplate; if (interceptorTemplate != null) { commandInterceptor = Activator.CreateInstance(interceptorTemplate.CellViewType) as ICommandInterceptor; } } } if (!string.IsNullOrEmpty(title)) { button = new CommandBarButtonItem(title, style); } else if (buttonView != null) { button = new CommandBarButtonItem(buttonView); } else { if (!buttonType.HasValue) { buttonType = UIBarButtonSystemItem.Done; } button = new CommandBarButtonItem(buttonType.Value); button.Style = style; } command.CommandButton = button; button.Enabled = true; button.Location = location; button.Command = command; button.CommandInterceptor = commandInterceptor; var orderAttribute = member.GetCustomAttribute <OrderAttribute>(); if (orderAttribute != null) { button.Order = orderAttribute.Order; } else { button.Order = 0; } return(button); }
public UIBarButtonItem([Optional] UIImage image, [Optional] UIImage landscapeImagePhone, UIBarButtonItemStyle style, [Optional] AnyObject target, Selector action) { }
/// <summary> /// Initializes a new instance of the <see cref="KSPictureLoginLib.KSBarButtonItem"/> class. /// </summary> /// <param name="title">Title.</param> /// <param name="style">Style.</param> public KSPictureLoginBarButtonItem( string title, UIBarButtonItemStyle style) : base(title, style, null) { this.Initialize (); }
public CommandBarButtonItem(string title, UIBarButtonItemStyle style, EventHandler handler) : base(title, style, handler) { }
/// <summary> /// Initializes a new instance of the <see cref="KSPictureLoginLib.KSBarButtonItem"/> class. /// </summary> /// <param name="image">Image.</param> /// <param name="style">Style.</param> public KSPictureLoginBarButtonItem(UIImage image, UIBarButtonItemStyle style) : base(image, style, null) { this.Initialize (); }
public CommandBarButtonItem(string title, UIBarButtonItemStyle style, NSObject target, Selector action) : base(title, style, target, action) { }
public CommandBarButtonItem(string title, UIBarButtonItemStyle style) : base(title, style, (s, e) => Execute(CommandParameter)) { }