Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request mono#108 from taimila/master
Browse files Browse the repository at this point in the history
Preferences Window Sample
  • Loading branch information
migueldeicaza committed Apr 7, 2013
2 parents 55394d2 + c98106d commit 6a38c63
Show file tree
Hide file tree
Showing 30 changed files with 5,605 additions and 0 deletions.
23 changes: 23 additions & 0 deletions samples/Preferences/Preferences.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Preferences", "Preferences\Preferences.csproj", "{0EC28BCF-260E-4D08-9BC6-766AA13BD456}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
AppStore|x86 = AppStore|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0EC28BCF-260E-4D08-9BC6-766AA13BD456}.AppStore|x86.ActiveCfg = AppStore|x86
{0EC28BCF-260E-4D08-9BC6-766AA13BD456}.AppStore|x86.Build.0 = AppStore|x86
{0EC28BCF-260E-4D08-9BC6-766AA13BD456}.Debug|x86.ActiveCfg = Debug|x86
{0EC28BCF-260E-4D08-9BC6-766AA13BD456}.Debug|x86.Build.0 = Debug|x86
{0EC28BCF-260E-4D08-9BC6-766AA13BD456}.Release|x86.ActiveCfg = Release|x86
{0EC28BCF-260E-4D08-9BC6-766AA13BD456}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Preferences\Preferences.csproj
EndGlobalSection
EndGlobal
26 changes: 26 additions & 0 deletions samples/Preferences/Preferences/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using MonoMac.Foundation;
using MonoMac.AppKit;

namespace Preferences
{
public partial class AppDelegate : NSApplicationDelegate
{
MainWindowController mainWindowController;
PreferencesWindowController preferencesWindowController;

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

// Action method binded in MainMenu.xib to "Preferences..." menu item.
partial void ShowPreferencesWindow (NSObject sender)
{
if (preferencesWindowController == null)
preferencesWindowController = new PreferencesWindowController ();
preferencesWindowController.ShowWindow (this);
}
}
}

21 changes: 21 additions & 0 deletions samples/Preferences/Preferences/AppDelegate.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions samples/Preferences/Preferences/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>Preferences</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
14 changes: 14 additions & 0 deletions samples/Preferences/Preferences/Main.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using MonoMac.AppKit;

namespace Preferences
{
class MainClass
{
static void Main (string [] args)
{
NSApplication.Init ();
NSApplication.Main (args);
}
}
}

Loading

0 comments on commit 6a38c63

Please sign in to comment.