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

C# Foundation.NSObject类代码示例

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

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



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

示例1: FinishedLaunching

        public override void FinishedLaunching(NSObject notification)
        {
            try
            {
                LSSharedFileList.InsertLoginItem(NSBundle.MainBundle.BundlePath);
            }
            catch
            {

            }

            var container = new Container();
            Tepeyac.Funq.Registry.Register(container);

            container.Register<IFiber>("GuiFiber", c =>
            {
                var executor =
                    c.Resolve<IExecutor>() ??
                    new Executor();
                var fiber = new CocoaFiber(executor);
                fiber.Start();

                return fiber;
            });

            container.Register<ILauncher>(c =>
                new Tepeyac.UI.Cocoa.Launcher());
            container.Register<IBurritoDayView>(c =>
                new StatusItemBurritoDayView(c));

            container.Resolve<IBurritoDayView>();
        }
开发者ID:ataranto,项目名称:tepeyac,代码行数:32,代码来源:AppDelegate.cs


示例2: FinishedLaunching

        public override void FinishedLaunching(NSObject notification)
        {
            Engine.Instance.TerminateEvent += delegate() {
                new NSObject ().InvokeOnMainThread (() => {
                    //NSApplication.SharedApplication.ReplyToApplicationShouldTerminate (true);
                    NSApplication.SharedApplication.Terminate(new NSObject ());
                });
            };

            UpdateInterfaceStyle ();

            mainWindowController = new MainWindowController ();

            bool startVisible = Engine.Instance.Storage.GetBool("gui.osx.visible");
            if (startVisible) {
                mainWindowController.Window.MakeKeyAndOrderFront (this);
            } else {
                mainWindowController.Window.IsVisible = false;
            }
            NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);

            NSProcessInfo.ProcessInfo.DisableSuddenTermination (); // Already disabled by default

            MenuEvents ();
        }
开发者ID:Clodo76,项目名称:airvpn-client,代码行数:25,代码来源:AppDelegate.cs


示例3: SetObjectValue

			public override void SetObjectValue (NSTableView tableView, NSObject theObject, NSTableColumn tableColumn, int row)
			{
				NSString newNSValue = theObject as NSString;
				if (newNSValue == null)
					return;
				string newValue = newNSValue.ToString ();
				int columnIndex = tableView.FindColumn ((NSString)tableColumn.Identifier);
				BookmarkManager.Entry entry = entries[row];
				switch (columnIndex) {
				case 0:
					if (!string.IsNullOrWhiteSpace (newValue))
						entry.Name = newValue;
					break;
				case 1:
					entry.Notes = newValue;
					break;
				case 2:
					if (!string.IsNullOrWhiteSpace (newValue))
						entry.Url = newValue;
					break;
				default:
					break;
				}
				manager.CommitBookmarkChange (entry);
			}
开发者ID:roblillack,项目名称:monomac,代码行数:25,代码来源:BookmarkAssistantController.cs


示例4: RemoveAction

		public static void RemoveAction (NSObject target, EventHandler handler)
		{
			ActionDispatcher ctarget = target as ActionDispatcher;
			if (ctarget == null)
				return;
			ctarget.Activated -= handler;
		}
开发者ID:kangaroo,项目名称:monomac,代码行数:7,代码来源:ActionDispatcher.cs


示例5: FinishedLaunching

        public override void FinishedLaunching (NSObject notification)
        {
            RxApp.MutableResolver.Register(() => new TestViewController(), typeof(IViewFor<TestViewModel>));

            mainWindowController = new MainWindowController ();
            mainWindowController.Window.MakeKeyAndOrderFront (this);
        }
开发者ID:KimCM,项目名称:ReactiveUI,代码行数:7,代码来源:AppDelegate.cs


示例6: SecondsStepperAction

partial         void SecondsStepperAction(NSObject sender)
        {
            NSStepper stepper = sender as NSStepper;

             //Console.WriteLine ("Change level: {0}", stepper.IntValue);
             SecondsTextField.IntValue = stepper.IntValue;
        }
开发者ID:enecciari,项目名称:mackeepass,代码行数:7,代码来源:PreferencesWindowController.cs


示例7: FinishedLaunching

        public override void FinishedLaunching(NSObject notification)
        {
            mainWindowController = new MainWindowController ();
            mainWindowController.Window.MakeKeyAndOrderFront (this);

            NativeTest.Hello ();
        }
开发者ID:baulig,项目名称:Provcon-Faust,代码行数:7,代码来源:AppDelegate.cs


示例8: CheckToString

 protected override void CheckToString(NSObject obj)
 {
     switch (obj.GetType ().FullName) {
     // native crash calling MonoMac.Foundation.NSObject.get_Description ()
     case "WebKit.WKNavigationAction":
     case "WebKit.WKFrameInfo": //  EXC_BAD_ACCESS (code=1, address=0x0)
     case "MonoMac.Foundation.NSUrlConnection":
     case "Foundation.NSUrlConnection":
     case "MonoMac.AppKit.NSLayoutConstraint": // Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil
     case "AppKit.NSLayoutConstraint":
     case "MonoMac.AVFoundation.AVPlayerItemTrack":
     case "AVFoundation.AVPlayerItemTrack":
     // 10.8
     case "MonoMac.AVFoundation.AVComposition":
     case "AVFoundation.AVComposition":
     case "MonoMac.GameKit.GKPlayer": // Crashing on 10.8.3 from the Apple beta channel for abock (on 2013-01-30)
     case "GameKit.GKPlayer":
     case "MonoMac.AVFoundation.AVAssetResourceLoadingRequest": // Crashing on 10.9.1 for abock (2014-01-13)
     case "AVFoundation.AVAssetResourceLoadingRequest":
     case "MonoMac.AVFoundation.AVAssetResourceLoadingDataRequest": // Crashes on 10.9.3 for chamons (constructor found in AVCompat)
     case "AVFoundation.AVAssetResourceLoadingDataRequest":
     case "MonoMac.AVFoundation.AVCaptureDeviceInputSource": // Crashes on 10.9.5
     case "AVFoundation.AVCaptureDeviceInputSource":
         break;
     default:
         base.CheckToString (obj);
         break;
     }
 }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:29,代码来源:MacApiCtorInitTest.cs


示例9: saveDocument

		partial void saveDocument(NSObject sender)
		{
			if (FileSave != null)
			{
				FileSave(this, EventArgs.Empty);
			}
		}
开发者ID:ngeor,项目名称:ResxTranslator,代码行数:7,代码来源:MainWindowController.cs


示例10: addKey

		partial void addKey(NSObject sender)
		{
			if (KeyAdd != null)
			{
				KeyAdd(this, EventArgs.Empty);
			}
		}
开发者ID:ngeor,项目名称:ResxTranslator,代码行数:7,代码来源:MainWindowController.cs


示例11: openDocument

		partial void openDocument(NSObject sender)
		{
			if (FileOpen != null)
			{
				FileOpen(this, EventArgs.Empty);
			}
		}
开发者ID:ngeor,项目名称:ResxTranslator,代码行数:7,代码来源:MainWindowController.cs


示例12: newDocument

		partial void newDocument(NSObject sender)
		{
			if (FileNew != null)
			{
				FileNew(this, EventArgs.Empty);
			}
		}
开发者ID:ngeor,项目名称:ResxTranslator,代码行数:7,代码来源:MainWindowController.cs


示例13: MakeKeyAndOrderFront

		public override void MakeKeyAndOrderFront(NSObject sender)  {

			base.MakeKeyAndOrderFront (sender);
            /// Program entry point is here

            //TODO: Mac - really here??? Nooo
        }
开发者ID:vhnatyk,项目名称:WebMarco.2.0,代码行数:7,代码来源:MainWindow.cs


示例14: FinishedLaunching

		public override void FinishedLaunching (NSObject notification)
		{
			var indexManager = IndexUpdateManager;
			indexManager.CheckIndexIsFresh ().ContinueWith (t => {
				if (t.IsFaulted)
					Console.WriteLine ("Error while checking indexes: {0}", t.Exception);
				else if (!t.Result)
					indexManager.PerformSearchIndexCreation ();
				else
					indexManager.AdvertiseFreshIndex ();
			}).ContinueWith (t => Console.WriteLine ("Error while creating indexes: {0}", t.Exception), TaskContinuationOptions.OnlyOnFaulted);
			
			// Check if there is a MonoTouch documentation installed and launch accordingly
			if (Root.HelpSources.Cast<HelpSource> ().Any (hs => hs.Name.StartsWith ("MonoTouch", StringComparison.InvariantCultureIgnoreCase))
			    && File.Exists (mergeToolPath)) {
				Task.Factory.StartNew (() => {
					AppleDocHandler.AppleDocInformation infos;
					bool mergeOutdated = false;
					bool docOutdated = AppleDocHandler.CheckAppleDocFreshness (AppleDocHandler.IosAtomFeed, out infos);
					if (!docOutdated)
						mergeOutdated = AppleDocHandler.CheckMergedDocumentationFreshness (infos);
					return Tuple.Create (docOutdated || mergeOutdated, docOutdated, mergeOutdated);
				}).ContinueWith (t => {
					Console.WriteLine ("Merged status {0}", t.Result);
					if (!t.Result.Item1)
						return;
					BeginInvokeOnMainThread (() => LaunchDocumentationUpdate (t.Result.Item2, t.Result.Item3));
				});
			}
		}
开发者ID:utahking,项目名称:monomac,代码行数:30,代码来源:AppDelegate.cs


示例15: FinishedLaunching

        public override void FinishedLaunching(NSObject notification)
        {
            mainWindowController = new MainWindowController ();
            var window = mainWindowController.Window;
            window.MakeKeyAndOrderFront (this);

            titles = new NSObject[] {
                new NSString("Item 1"),
                new NSString("Item 2"),
                new NSString("Item 3"),
                new NSString("Item 4"),
                new NSString("Item 5"),
                new NSString("Item 6"),
                new NSString("Item 7"),
                new NSString("Item 8"),
            };

            cv = new NSCollectionView(window.ContentView.Frame);
            cvi = new MyCollectionViewItem();
            cv.ItemPrototype = cvi;
            cv.Content = titles;

            cv.AutoresizingMask = NSViewResizingMask.MinXMargin | NSViewResizingMask.WidthSizable | NSViewResizingMask.MaxXMargin | NSViewResizingMask.MinYMargin | NSViewResizingMask.HeightSizable | NSViewResizingMask.MaxYMargin;
            window.ContentView.AddSubview(cv);
        }
开发者ID:jonlipsky,项目名称:CollectionView,代码行数:25,代码来源:AppDelegate.cs


示例16: takeName

		partial void takeName (NSObject sender)
		{
			villain.Name = ((NSTextField)sender).StringValue;
			villainsTableView.ReloadData ();
			
			Console.WriteLine(string.Format("current villain properties: {0}", villain.Name));
		}
开发者ID:Anomalous-Software,项目名称:monomac,代码行数:7,代码来源:VillainTrackerAppDelegate.cs


示例17: Create

		async partial void Create(NSObject sender) {
			Wallet wallet = await Wallet.CreateAsync(passphraseField.StringValue, WalletFile);
			await wallet.SaveAsync();

			DidCreate(this, new WalletCreationEventArgs(wallet));
			CloseSheet();
		}
开发者ID:kylewlacy,项目名称:electrolyte.net,代码行数:7,代码来源:WalletCreationSheetController.cs


示例18: FinishedLaunching

		public override void FinishedLaunching(NSObject notification)
		{
			// On the Mac, we are running on Mono - emit the Mono revision
			var monoVersion = "None";
			Type monoRuntimeType;
			MethodInfo getDisplayNameMethod;
			if ((monoRuntimeType = typeof(object).Assembly.GetType("Mono.Runtime")) != null &&
				(getDisplayNameMethod = monoRuntimeType.GetMethod(
					"GetDisplayName",
					BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.DeclaredOnly | BindingFlags.ExactBinding, null,
					Type.EmptyTypes, null)) != null)
			{
				monoVersion = string.Format("Mono {0}", getDisplayNameMethod.Invoke(null, null));
			}

			logger.Info("Finished launching: .NET {0} ({1}); startedSlideshow = {2}", System.Environment.Version, monoVersion, startedSlideshow);
			if (!startedSlideshow)
			{
                Preferences<WatchThisPreferences>.Load(
				    Path.Combine(
    					Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
    					"Library",
    					"Preferences",
    					"WatchThis.rangic.json"));

				controller = new ShowListController();
				controller.Window.MakeKeyAndOrderFront(this);
			}
		}
开发者ID:kevintavog,项目名称:WatchThis.net,代码行数:29,代码来源:AppDelegate.cs


示例19: FinishedLaunching

		public override void FinishedLaunching (NSObject notification)
		{
			testWindowController = new TestWindowController ();
			testWindowController.Window.MakeKeyAndOrderFront (this);
			
			
		}
开发者ID:Anomalous-Software,项目名称:monomac,代码行数:7,代码来源:AppDelegate.cs


示例20: FinishedLaunching

		public override void FinishedLaunching (NSObject notification)
		{
            CCApplication application = new CCApplication(false, new CCSize(1024f, 768f));
            application.ApplicationDelegate = new AppDelegate();

            application.StartGame();
        }
开发者ID:460189852,项目名称:cocos-sharp-samples,代码行数:7,代码来源:Program.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Foundation.NSString类代码示例发布时间:2022-05-26
下一篇:
C# Foundation.NSError类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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