当前位置: 首页>>代码示例>>C#>>正文


C# AppKit类代码示例

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


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

示例1: didRegister

		partial void didRegister(AppKit.NSButton sender)
		{
			//register for an event
			MessageBus.Default.Register (MessageHandler);

			//register for CustomMessageBusEvent 
			MessageBus.Default.Register<CustomMessageBusEvent> (CustomMessageEventHandler);
		}
开发者ID:logikonline,项目名称:MessageBus,代码行数:8,代码来源:MainWindowController.cs

示例2: powerStateChanged

		partial void powerStateChanged (AppKit.NSSegmentedControl sender)
		{
			NSError error;
			CurrentInterface.SetPower(powerState.SelectedSegment == 0, out error);

			if(error != null)
				Console.WriteLine("Error occurred while changing interface power state: {0}", error.LocalizedDescription);
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:8,代码来源:MainWindowController.cs

示例3: OnClickedLoad

partial         void OnClickedLoad(AppKit.NSButton sender)
        {
            try
            {
                grvAvatar.Avatar = new Gravatar(txtEmail.StringValue);
            }
            catch (Exception ex)
            {
                Console.WriteLine("");
            }
        }
开发者ID:newky2k,项目名称:GravatarMobile,代码行数:11,代码来源:MainWindowController.cs

示例4: didSendMessage

		partial void didSendMessage(AppKit.NSButton sender)
		{
			var message = txtMessage.StringValue;

			//Creare a MessageBusEvent
			var aEvent = new CoreMessageBusEvent (kEventID) {
				Sender = this,
				Data = new object[]{ message },
			};

			//send it
			MessageBus.Default.Post (aEvent);
		}
开发者ID:logikonline,项目名称:MessageBus,代码行数:13,代码来源:MainWindowController.cs

示例5: GetViewForItem

		public AppKit.NSView GetViewForItem (AppKit.NSTableView tableView, AppKit.NSTableColumn tableColumn, System.nint row)
		{
			if (viewModel.Tweets.Count < row)
				return null;

			TweetView view = (TweetView)tableView.MakeView (identifer, this);
			if (view == null) {
				TweetViewController c = new TweetViewController ();
				view = c.View;
				view.Frame = new CGRect (0, 0, tableView.Frame.Width, 0);
				view.Identifier = identifer;
			}
			view.Tweet = viewModel.Tweets [(int)row];

			return view;
		}
开发者ID:richardkeller411,项目名称:dev-days-labs,代码行数:16,代码来源:MainWindowController.cs

示例6: NotifyMeAction

		partial void NotifyMeAction (AppKit.NSButton sender)
		{
			// First we create our notification and customize as needed
			NSUserNotification not = null;

			try {
				not = new NSUserNotification();
			} catch {
				new NSAlert {
					MessageText = "NSUserNotification Not Supported",
					InformativeText = "This API was introduced in OS X Mountain Lion (10.8)."
				}.RunSheetModal (this);
				return;
			}

			not.Title = "Hello World";
			not.InformativeText = "This is an informative text";
			not.DeliveryDate = (NSDate)DateTime.Now;
			not.SoundName = NSUserNotification.NSUserNotificationDefaultSoundName;

			// We get the Default notification Center
			NSUserNotificationCenter center = NSUserNotificationCenter.DefaultUserNotificationCenter;
			
			center.DidDeliverNotification += (s, e) => 
			{
				Console.WriteLine("Notification Delivered");
				DeliveredColorWell.Color = NSColor.Green;
			};
			
			center.DidActivateNotification += (s, e) => 
			{
				Console.WriteLine("Notification Touched");
				TouchedColorWell.Color = NSColor.Green;
			};

			// If we return true here, Notification will show up even if your app is TopMost.
			center.ShouldPresentNotification = (c, n) => { return true; };
			
			center.ScheduleNotification(not);

		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:41,代码来源:MainWindow.cs

示例7: okButtonClicked

		partial void okButtonClicked (AppKit.NSButton sender)
		{
			spinner.Hidden = false;
			spinner.StartAnimation(this);

			NSError error;
			var networkName = nameTextField.StringValue;
			var password = passwordTextField.StringValue;
			var channelNumber = UInt32.Parse(channelPicker.SelectedItem.Title);
			var security = string.IsNullOrEmpty(password) ? CWIbssModeSecurity.None : CWIbssModeSecurity.WEP40;

			CurrentInterface.StartIbssModeWithSsid(new NSData(), security, channelNumber, password, out error);

			spinner.StopAnimation(this);
			spinner.Hidden = true;

			if(error != null)
				NSAlert.WithError(error).RunModal();
			else
				Window.Close();
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:21,代码来源:IBSSDialogController.cs

示例8: BtnVibrantControlsCaveatsBehindWindowClicked

		partial void BtnVibrantControlsCaveatsBehindWindowClicked (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TestLauncherViewController.designer.cs

示例9: BtnVibrantControlsClicked

		partial void BtnVibrantControlsClicked (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TestLauncherViewController.designer.cs

示例10: BtnPerformanceExampleClicked

		partial void BtnPerformanceExampleClicked (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TestLauncherViewController.designer.cs

示例11: BtnSampleMapsClicked

		partial void BtnSampleMapsClicked (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TestLauncherViewController.designer.cs

示例12: BtnDemoFacetimeClicked

		partial void BtnDemoFacetimeClicked (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TestLauncherViewController.designer.cs

示例13: BtnMaskImageWindowClicked

		partial void BtnMaskImageWindowClicked (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TestLauncherViewController.designer.cs

示例14: BtnClickBasicSidebarPlusImages

		partial void BtnClickBasicSidebarPlusImages (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TestLauncherViewController.designer.cs

示例15: cancel

		partial void cancel (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TableEdit.xib.designer.cs


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