本文整理汇总了C#中NSAction类的典型用法代码示例。如果您正苦于以下问题:C# NSAction类的具体用法?C# NSAction怎么用?C# NSAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NSAction类属于命名空间,在下文中一共展示了NSAction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FlayoutNavigationItem
public FlayoutNavigationItem(string caption, NSAction tapped, UIImage image, string controller)
: base(caption, tapped, image)
{
Controller = controller;
Image = image;
Callback = tapped;
}
示例2: Invoke
public static void Invoke(NSAction action)
{
if (_app != null)
{
_app.InvokeOnMainThread(action);
}
}
示例3: FilterElement
public FilterElement(IssuesFiltersViewModel.FilterModel filterModel, NSAction action, Action accessory)
: base(filterModel.IssueModel.FilterName, action)
{
Accessory = UITableViewCellAccessory.DetailButton;
AccessoryTapped += () => accessory();
FilterModel = filterModel;
}
示例4: BeginSheet
public void BeginSheet (NSWindow window, NSAction onEnded)
{
BeginSheetForResponse (window, r => {
if (onEnded != null)
onEnded ();
});
}
示例5: NSActionDispatcher
public NSActionDispatcher(NSAction action)
{
if (action == null)
throw new ArgumentNullException ("action");
this.action = action;
}
示例6: ImageLoaderStringElement
public ImageLoaderStringElement(string caption, NSAction tapped, NSUrl imageUrl, UIImage placeholder)
: base(caption, tapped)
{
Placeholder = placeholder;
ImageUrl = imageUrl;
this.Accessory = UITableViewCellAccessory.None;
}
示例7: Create
public static CADisplayLink Create (NSAction action)
{
var dispatcher = new NSActionDispatcher (action);
var rv = Create (dispatcher, NSActionDispatcher.Selector);
rv.dispatcher = dispatcher;
return rv;
}
示例8: StyledElement
public StyledElement(string caption, NSAction tapped, UIImage image)
: base(caption, tapped)
{
Init();
Image = image;
Accessory = UITableViewCellAccessory.DisclosureIndicator;
}
示例9: UIRaisedTabBar
public UIRaisedTabBar(UIImage normal, UIImage highlighted, NSAction tapped)
: base()
{
normalState = normal;
highlightedState = highlighted;
if (tapped != null)
Tapped += tapped;
}
示例10: BikeElement
public BikeElement(BikeLocation bike, NSAction action)
: base("","",action)
{
Bike = bike;
Caption = bike.Name;
Value = GetValueString();
Accessory = UITableViewCellAccessory.DisclosureIndicator;
}
示例11: BadgeElement
public BadgeElement (UIImage badgeImage, string cellText, NSAction tapped) : base (cellText)
{
if (badgeImage == null)
throw new ArgumentNullException ("badgeImage");
image = badgeImage;
if (tapped != null)
Tapped += tapped;
}
示例12: ButtonElement
public ButtonElement(string caption, NSAction tapped)
: base(caption)
{
this.tapped = tapped;
NormalColor = UIColor.Gray;
NormalTextColor = UIColor.Black;
HighlightedColor = UIColor.Blue;
HighlightedTextColor = UIColor.White;
DisabledColor = UIColor.Gray;
DisabledTextColor = UIColor.DarkGray;
}
示例13: AddAccount
public void AddAccount(DialogViewController dvc, NSAction action)
{
var oauth = new OAuthAuthorizer (TwitterAccount.OAuthConfig);
if (useXauth)
NewAccountXAuth (dvc, action);
else {
if (oauth.AcquireRequestToken ()){
oauth.AuthorizeUser (dvc, delegate {
SetDefaultAccount (oauth);
action ();
});
}
}
}
示例14: BadgeElement
public BadgeElement (UIImage badgeImage, string cellText, NSAction tapped)
: base (cellText)
{
LineBreakMode = UILineBreakMode.TailTruncation;
ContentMode = UIViewContentMode.Left;
Lines = 1;
Accessory = UITableViewCellAccessory.None;
if (badgeImage == null)
throw new ArgumentNullException ("badgeImage");
_image = badgeImage;
if (tapped != null)
Tapped += tapped;
}
示例15: GetRoot
private RootElement GetRoot()
{
IList<Series> coll = AppManifest.Current.Collections;
var root = new RootElement("Collections");
var section = new Section();
for(var i = 0; i < coll.Count; i++)
{
Series series = coll[i];
var rounded = ImageFactory.LoadRoundedThumbnail(series.Pieces[0]);
var viewAction = new NSAction(() => { LoadSeries (series); });
var element = new StyledStringElement(series.Title, viewAction) { Image = rounded };
element.New = series.New.GetValueOrDefault();
section.Add(element);
}
root.Add(section);
return root;
}