• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# NSAction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NSAction的典型用法代码示例。如果您正苦于以下问题:C# NSAction类的具体用法?C# NSAction怎么用?C# NSAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NSAction类属于命名空间,在下文中一共展示了NSAction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FlayoutNavigationItem

 public FlayoutNavigationItem(string caption, NSAction tapped, UIImage image, string controller)
     : base(caption, tapped, image)
 {
     Controller = controller;
     Image = image;
     Callback = tapped;
 }
开发者ID:ChristianJaspers,项目名称:saapp-ios,代码行数:7,代码来源:FlayoutNavigationItem.cs


示例2: Invoke

 public static void Invoke(NSAction action)
 {
     if (_app != null)
     {
         _app.InvokeOnMainThread(action);
     }
 }
开发者ID:jonathanpeppers,项目名称:uController,代码行数:7,代码来源:Execute.cs


示例3: FilterElement

 public FilterElement(IssuesFiltersViewModel.FilterModel filterModel, NSAction action, Action accessory)
     : base(filterModel.IssueModel.FilterName, action)
 {
     Accessory = UITableViewCellAccessory.DetailButton;
     AccessoryTapped += () => accessory();
     FilterModel = filterModel;
 }
开发者ID:vbassini,项目名称:CodeBucket,代码行数:7,代码来源:IssuesFiltersView.cs


示例4: BeginSheet

		public void BeginSheet (NSWindow window, NSAction onEnded)
		{
			BeginSheetForResponse (window, r => {
				if (onEnded != null)
					onEnded ();
			});
		}
开发者ID:Anomalous-Software,项目名称:monomac,代码行数:7,代码来源:NSAlert.cs


示例5: NSActionDispatcher

        public NSActionDispatcher(NSAction action)
        {
            if (action == null)
                throw new ArgumentNullException ("action");

            this.action = action;
        }
开发者ID:officedrop,项目名称:maccore,代码行数:7,代码来源:NSAction.cs


示例6: ImageLoaderStringElement

 public ImageLoaderStringElement(string caption,  NSAction tapped, NSUrl imageUrl, UIImage placeholder)
     : base(caption, tapped)
 {
     Placeholder = placeholder;
     ImageUrl = imageUrl;
     this.Accessory = UITableViewCellAccessory.None;
 }
开发者ID:svrooij,项目名称:monotouch-bindings,代码行数:7,代码来源:ImageLoaderElement.cs


示例7: Create

		public static CADisplayLink Create (NSAction action)
		{
			var dispatcher = new NSActionDispatcher (action);
			var rv = Create (dispatcher, NSActionDispatcher.Selector);
			rv.dispatcher = dispatcher;
			return rv;
		}
开发者ID:Anomalous-Software,项目名称:maccore,代码行数:7,代码来源:CALayer.cs


示例8: StyledElement

 public StyledElement(string caption,  NSAction tapped, UIImage image)
     : base(caption, tapped)
 {
     Init();
     Image = image;
     Accessory = UITableViewCellAccessory.DisclosureIndicator;
 }
开发者ID:sergii-tkachenko,项目名称:Gistacular,代码行数:7,代码来源:StyledElement.cs


示例9: UIRaisedTabBar

 public UIRaisedTabBar(UIImage normal, UIImage highlighted, NSAction tapped)
     : base()
 {
     normalState = normal;
     highlightedState = highlighted;
     if (tapped != null)
         Tapped += tapped;
 }
开发者ID:GSerjo,项目名称:appreciateui,代码行数:8,代码来源:UIRaisedTabBar.cs


示例10: BikeElement

 public BikeElement(BikeLocation bike, NSAction action)
     : base("","",action)
 {
     Bike = bike;
     Caption = bike.Name;
     Value = GetValueString();
     Accessory = UITableViewCellAccessory.DisclosureIndicator;
 }
开发者ID:nicwise,项目名称:londonbikeapp,代码行数:8,代码来源:Elements.cs


示例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;
		}		
开发者ID:briandonahue,项目名称:MonoTouch.MVVM,代码行数:9,代码来源:ElementBadge.cs


示例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;
        }
开发者ID:rsatter,项目名称:MonoCross,代码行数:14,代码来源:ButtonElement.cs


示例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 ();
                    });
                }
            }
        }
开发者ID:kellabyte,项目名称:TweetStation,代码行数:15,代码来源:Main.cs


示例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;
		}		
开发者ID:284247028,项目名称:MvvmCross,代码行数:16,代码来源:ElementBadge.cs


示例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;
		}
开发者ID:modulexcite,项目名称:artapp,代码行数:21,代码来源:CollectionsViewController.cs


示例16: GetRoot

		private RootElement GetRoot()
		{
			IList<Piece> pieces = _parent.Series.Pieces;			
						
			var root = new RootElement("");
			_section = new Section(string.Concat(_parent.Series.Title, " (", _parent.Series.Years , ")"));
									
			for(var i = 0; i < pieces.Count; i++)
			{
				var page = i;
				var piece = pieces[page];
				
				var viewAction = new NSAction(() =>
				{
					GoToPage(page);
				});				
				
				var element = new StyledStringElement(piece.Title, viewAction);		
				element.Activity = true;
				_section.Add(element);
								
				ThreadPool.QueueUserWorkItem(s =>
				{
					var rounded = ImageFactory.LoadRoundedThumbnail(piece);
					InvokeOnMainThread(()=>
					{
						element.Image = rounded;	
						element.Reload();
					});
				});											
			}
						
			// Set the default check box
			CheckPiece(0);
			root.Add(_section);		
			
			View.SetNeedsDisplay();
			return root;
		}
开发者ID:modulexcite,项目名称:artapp,代码行数:39,代码来源:SeriesListViewController.cs


示例17: NSActionDispatcher

 public NSActionDispatcher(NSAction action)
 {
     this.action = action;
 }
开发者ID:kangaroo,项目名称:maccore,代码行数:4,代码来源:NSAction.cs


示例18: CustomImageStringElement

		public CustomImageStringElement (string caption, NSAction tapped, UIImage image) : base (caption, tapped, image)
		{
			_image = image;
		}		
开发者ID:21Off,项目名称:21Off,代码行数:4,代码来源:CustomImageStringElement.cs


示例19: GameInstanceElement

 public GameInstanceElement(NetworkBrowserModel.GameInstanceInfo gameInstanceInfo, NSAction tapped)
     : base(gameInstanceInfo.GameInstance.Name, tapped)
 {
     this.GameInstanceInfo = gameInstanceInfo;
 }
开发者ID:Krumelur,项目名称:Pyramid,代码行数:5,代码来源:GameNetworkInstanceDiscoveryController.cs


示例20: BeginSheet

		public void BeginSheet (NSPrintInfo printInfo, NSWindow docWindow, NSAction onEnded)
		{
			var obj = OneShotTracker.Create (onEnded);
			BeginSheet (printInfo, docWindow, obj, NSActionDispatcher.Selector, IntPtr.Zero);
		}
开发者ID:spicypixel-forks,项目名称:cs-monomac,代码行数:5,代码来源:BeginSheet.cs



注:本文中的NSAction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NSApplication类代码示例发布时间:2022-05-24
下一篇:
C# NRefactoryResolver类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap