C# Class SourceWriter.AppDelegate

Afficher le fichier Open project: xamarin/mac-samples

Private Properties

Свойство Type Description
OpenDialog void
OpenFile bool
ReleaseDesignerOutlets void

Méthodes publiques

Méthode Description
AppDelegate ( ) : AppKit

Initializes a new instance of the SourceWriter.AppDelegate class.

ApplicationShouldTerminate ( NSApplication sender ) : NSApplicationTerminateReply

Called before the app terminates to allow the app to cancel the termination based on state, such as a file not being saved.

For more details, see: https://developer.xamarin.com/guides/mac/user-interface/working-with-windows/#Modified_Windows_Content

DidFinishLaunching ( NSNotification notification ) : void

Called when the app has finished lanuching.

This routine is manually taking control of the Format Menu. For more information, please see our Enabling and Disabling Menus and Items documentation: https://developer.xamarin.com/guides/mac/user-interface/working-with-menus/#Enabling_and_Disabling_Menus_and_Items

OpenFile ( NSApplication sender, string filename ) : bool

This method is called when the user selects a file from the Open Recent menu item.

For more details, see: https://developer.xamarin.com/guides/mac/user-interface/working-with-menus/#Working_with_the_Open_Recent_Menu

UpdateWindowPreferences ( ) : void

For any open windows, redefine the language to pick up any changes to the user preferences and reformat all of the text in the document.

For more details, see: https://developer.xamarin.com/guides/mac/user-interface/working-with-dialogs/#Creating_a_Preferences_Dialog

WillTerminate ( NSNotification notification ) : void

Called before the app terminates to allow for cleanup such as saving files.

For more details, see: https://developer.xamarin.com/guides/mac/user-interface/working-with-windows/#Modified_Windows_Content

Private Methods

Méthode Description
OpenDialog ( NSObject sender ) : void
OpenFile ( NSUrl url ) : bool

Attempts to open the file at the specified URL. If the file is currently open in a window, that will be brought to the front and selected instead of opening another copy of the file.

ReleaseDesignerOutlets ( ) : void

Method Details

AppDelegate() public méthode

Initializes a new instance of the SourceWriter.AppDelegate class.
public AppDelegate ( ) : AppKit
Résultat AppKit

ApplicationShouldTerminate() public méthode

Called before the app terminates to allow the app to cancel the termination based on state, such as a file not being saved.
For more details, see: https://developer.xamarin.com/guides/mac/user-interface/working-with-windows/#Modified_Windows_Content
public ApplicationShouldTerminate ( NSApplication sender ) : NSApplicationTerminateReply
sender NSApplication A pointer to the app.
Résultat NSApplicationTerminateReply

DidFinishLaunching() public méthode

Called when the app has finished lanuching.
This routine is manually taking control of the Format Menu. For more information, please see our Enabling and Disabling Menus and Items documentation: https://developer.xamarin.com/guides/mac/user-interface/working-with-menus/#Enabling_and_Disabling_Menus_and_Items
public DidFinishLaunching ( NSNotification notification ) : void
notification NSNotification Information about the launch state.
Résultat void

OpenFile() public méthode

This method is called when the user selects a file from the Open Recent menu item.
For more details, see: https://developer.xamarin.com/guides/mac/user-interface/working-with-menus/#Working_with_the_Open_Recent_Menu
public OpenFile ( NSApplication sender, string filename ) : bool
sender NSApplication A pointer to the app.
filename string The full path and filename of the file to open.
Résultat bool

UpdateWindowPreferences() public méthode

For any open windows, redefine the language to pick up any changes to the user preferences and reformat all of the text in the document.
For more details, see: https://developer.xamarin.com/guides/mac/user-interface/working-with-dialogs/#Creating_a_Preferences_Dialog
public UpdateWindowPreferences ( ) : void
Résultat void

WillTerminate() public méthode

Called before the app terminates to allow for cleanup such as saving files.
For more details, see: https://developer.xamarin.com/guides/mac/user-interface/working-with-windows/#Modified_Windows_Content
public WillTerminate ( NSNotification notification ) : void
notification NSNotification Information about the termination state.
Résultat void