本文整理汇总了C#中AppKit类的典型用法代码示例。如果您正苦于以下问题:C# AppKit类的具体用法?C# AppKit怎么用?C# AppKit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AppKit类属于命名空间,在下文中一共展示了AppKit类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: IsEmbeddedNSView
bool IsEmbeddedNSView (AppKit.NSView view)
{
if (IsRootGdkQuartzView (view))
return true;
if (view.Superview != null)
return IsEmbeddedNSView (view.Superview);
return false;
}
开发者ID:lkalif,项目名称:monodevelop,代码行数:8,代码来源:CommandManager.cs
示例17: IsRootGdkQuartzView
bool IsRootGdkQuartzView (AppKit.NSView view)
{
return view.ToString ().Contains ("GdkQuartzView");
}
开发者ID:lkalif,项目名称:monodevelop,代码行数:4,代码来源:CommandManager.cs
示例18: OnNSEventKeyPress
AppKit.NSEvent OnNSEventKeyPress (AppKit.NSEvent ev)
{
// If we have a native window that can handle this command, let it process
// the keys itself and do not go through the command manager.
// Events in Gtk windows do not pass through here except when they're done
// in native NSViews. PerformKeyEquivalent for them will not return true,
// so we're always going to fallback to the command manager for them.
// If no window is focused, it's probably because a gtk window had focus
// and the focus didn't go to any other window on close. (debug popup on hover
// that gets closed on unhover). So if no keywindow is focused, events will
// pass through here and let us use the command manager.
var window = AppKit.NSApplication.SharedApplication.KeyWindow;
if (window != null) {
// Try the handler in the native window.
if (window.PerformKeyEquivalent (ev))
return null;
// If the window is a gtk window and is registered in the command manager
// process the events through the handler.
var gtkWindow = MonoDevelop.Components.Mac.GtkMacInterop.GetGtkWindow (window);
if (gtkWindow != null && !TopLevelWindowStack.Contains (gtkWindow))
return null;
}
var gdkev = MonoDevelop.Components.Mac.GtkMacInterop.ConvertKeyEvent (ev);
if (gdkev != null) {
if (ProcessKeyEvent (gdkev))
return null;
}
return ev;
}
开发者ID:lkalif,项目名称:monodevelop,代码行数:31,代码来源:CommandManager.cs
示例19: cancelButtonClicked
partial void cancelButtonClicked (AppKit.NSButton sender)
{
Window.Close();
}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:4,代码来源:IBSSDialogController.cs
示例20: done
partial void done (AppKit.NSButton sender);
开发者ID:RangoLee,项目名称:mac-samples,代码行数:1,代码来源:TableEdit.xib.designer.cs
注:本文中的AppKit类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论