Commits

André Schnabel committed 8fee2f6 Draft

Initial commit

  • Participants

Comments (0)

Files changed (9)

File AppDelegate.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+using MonoTouch.Dialog;
+using System.Drawing;
+using System.Reflection;
+using System.Text;
+
+namespace DialogTesting {
+
+	// The UIApplicationDelegate for the application. This class is responsible for launching the 
+	// User Interface of the application, as well as listening (and optionally responding) to 
+	// application events from iOS.
+	[Register ("AppDelegate")]
+	public partial class AppDelegate : UIApplicationDelegate {
+		// class-level declarations
+		UIWindow window;
+		DialogTestingViewController viewController;
+
+		public void PresentSettingsDialog(object settingsObj, Action onFinish) {
+			Type settingsType = settingsObj.GetType();
+			FieldInfo[] fields = settingsType.GetFields();
+
+			var root = new RootElement("Settings");
+			var section = new Section();
+			root.Add(section);
+
+			Dictionary<FieldInfo, Element> fieldToElem = new Dictionary<FieldInfo, Element>();
+
+			foreach(FieldInfo field in fields) {
+				Element elem;
+
+				switch(field.FieldType.ToString()) {
+				case "System.Int32":
+					elem = new FloatElement(null, null, Convert.ToSingle(field.GetValue(settingsObj)));
+					((FloatElement)elem).ShowCaption = true;
+					break;
+				case "System.String":
+					elem = new EntryElement(field.Name, "", (string)field.GetValue(settingsObj));
+					break;
+				case "System.Single":
+					elem = new FloatElement(null, null, (Single)field.GetValue(settingsObj));
+					((FloatElement)elem).ShowCaption = true;
+					break;
+				case "System.Boolean":
+					elem = new BooleanElement(field.Name, (Boolean)field.GetValue(settingsObj));
+					break;
+				default:
+					if(field.FieldType.BaseType == typeof(System.Enum)) {
+						Section radioSection = new Section();
+						RadioGroup group;
+						elem = new RootElement("TEst", group = new RadioGroup(0)) { radioSection };
+						int i = 0;
+						foreach(var value in Enum.GetValues(field.FieldType)) {
+							radioSection.Add(new RadioElement(value.ToString()));
+							if(value.ToString() == field.GetValue(settingsObj).ToString()) {
+								group.Selected = i;
+							}
+							i++;
+						}
+					} else
+						throw new Exception("Only int, string, float, bool allowed as types!");
+					break;
+				}
+
+				elem.Caption = field.Name;
+				fieldToElem.Add(field, elem);
+
+				section.Add(elem);
+			}
+
+			var dialogViewController = new DialogViewController(root);
+			//dialogViewController.Root
+
+			UINavigationController ctrl = new UINavigationController(dialogViewController);
+			var item = new UIBarButtonItem("Done", UIBarButtonItemStyle.Done, null);
+			item.Clicked += (psender, pe) => {
+				foreach(FieldInfo field in fieldToElem.Keys) {
+					Element elem = fieldToElem[field];
+
+					switch(field.FieldType.ToString()) {
+					case "System.Int32":
+						FloatElement felem = (FloatElement)elem;
+						field.SetValue(settingsObj, Convert.ToInt32(felem.Value));
+						break;
+					case "System.String":
+						var eelem = (EntryElement)elem;
+						field.SetValue(settingsObj, eelem.Value);
+						break;
+					case "System.Single":
+						felem = (FloatElement)elem;
+						field.SetValue(settingsObj, felem.Value);
+						break;
+					case "System.Boolean":
+						var belem = (BooleanElement)elem;
+						field.SetValue(settingsObj, belem.Value);
+						break;
+					default:
+						if(field.FieldType.BaseType == typeof(System.Enum)) {
+							var relem = (RootElement)elem;
+							int sel = relem.RadioSelected;
+							field.SetValue(settingsObj, Enum.ToObject(field.FieldType, sel));
+						}
+						break;
+					}
+				}
+				onFinish();
+				ctrl.DismissModalViewControllerAnimated(true);
+			};
+			ctrl.NavigationItem.RightBarButtonItem = item;
+			viewController.PresentModalViewController(ctrl, true);
+			dialogViewController.NavigationItem.RightBarButtonItem = item;
+		}
+
+		//
+		// This method is invoked when the application has loaded and is ready to run. In this 
+		// method you should instantiate the window, load the UI into it and then make the window
+		// visible.
+		//
+		// You have 17 seconds to return from this method, or iOS will terminate your application.
+		//
+		public override bool FinishedLaunching(UIApplication app, NSDictionary options) {
+			window = new UIWindow(UIScreen.MainScreen.Bounds);
+			
+			viewController = new DialogTestingViewController();
+
+			var btn = UIButton.FromType(UIButtonType.RoundedRect);
+			btn.Frame = new RectangleF(0, 0, 100, 100);
+			btn.SetTitle("Test", UIControlState.Normal);
+			btn.TouchDown += (sender, e) => {
+				var setting = new CustomSettings() {
+					Strength = 10,
+					Hobby = Hobby.Arts,
+					Male = true,
+					Name = "Peter"
+				};
+				PresentSettingsDialog(setting, () => Console.WriteLine(setting));
+			};
+			viewController.View.AddSubview(btn);
+
+			window.RootViewController = viewController;
+			window.MakeKeyAndVisible();
+			
+			return true;
+		}
+	}
+
+	enum Hobby {
+		Music,
+		Arts
+	}
+
+	class CustomSettings {
+		public string Name;
+		public bool Male;
+		public float Strength;
+		public Hobby Hobby;
+
+		public override string ToString() {
+			var builder = new StringBuilder();
+			var fields = this.GetType().GetFields();
+			foreach(var field in fields) {
+				builder.AppendLine(field.GetValue(this).ToString());
+			}
+			return builder.ToString();
+		}
+	}
+}
+

File DialogTesting.csproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{3BF46608-8149-412C-9889-B3A906929FAF}</ProjectGuid>
+    <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>DialogTesting</RootNamespace>
+    <AssemblyName>DialogTesting</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <MtouchDebug>true</MtouchDebug>
+    <MtouchProfiling>true</MtouchProfiling>
+    <MtouchLink>None</MtouchLink>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\iPhoneSimulator\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <MtouchLink>None</MtouchLink>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\iPhone\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <CodesignKey>iPhone Developer</CodesignKey>
+    <MtouchDebug>true</MtouchDebug>
+    <MtouchProfiling>true</MtouchProfiling>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\iPhone\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <CodesignKey>iPhone Developer</CodesignKey>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <BuildIpa>true</BuildIpa>
+    <CodesignKey>iPhone Distribution</CodesignKey>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\iPhone\AppStore</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <CodesignKey>iPhone Distribution</CodesignKey>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="monotouch" />
+    <Reference Include="MonoTouch.Dialog-1" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Info.plist" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Main.cs" />
+    <Compile Include="AppDelegate.cs" />
+    <Compile Include="DialogTestingViewController.cs" />
+    <Compile Include="DialogTestingViewController.designer.cs">
+      <DependentUpon>DialogTestingViewController.cs</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <InterfaceDefinition Include="DialogTestingViewController_iPhone.xib" />
+    <InterfaceDefinition Include="DialogTestingViewController_iPad.xib" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>

File DialogTesting.sln

+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DialogTesting", "DialogTesting.csproj", "{3BF46608-8149-412C-9889-B3A906929FAF}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|iPhoneSimulator = Debug|iPhoneSimulator
+		Release|iPhoneSimulator = Release|iPhoneSimulator
+		Debug|iPhone = Debug|iPhone
+		Release|iPhone = Release|iPhone
+		Ad-Hoc|iPhone = Ad-Hoc|iPhone
+		AppStore|iPhone = AppStore|iPhone
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
+		{3BF46608-8149-412C-9889-B3A906929FAF}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
+		{3BF46608-8149-412C-9889-B3A906929FAF}.AppStore|iPhone.Build.0 = AppStore|iPhone
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Debug|iPhone.ActiveCfg = Debug|iPhone
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Debug|iPhone.Build.0 = Debug|iPhone
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Release|iPhone.ActiveCfg = Release|iPhone
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Release|iPhone.Build.0 = Release|iPhone
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+		{3BF46608-8149-412C-9889-B3A906929FAF}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = DialogTesting.csproj
+	EndGlobalSection
+EndGlobal

File DialogTestingViewController.cs

+using System;
+using System.Drawing;
+
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+
+namespace DialogTesting {
+	public partial class DialogTestingViewController : UIViewController {
+		static bool UserInterfaceIdiomIsPhone {
+			get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; }
+		}
+
+		public DialogTestingViewController()
+			: base (UserInterfaceIdiomIsPhone ? "DialogTestingViewController_iPhone" : "DialogTestingViewController_iPad", null) {
+		}
+		
+		public override void DidReceiveMemoryWarning() {
+			// Releases the view if it doesn't have a superview.
+			base.DidReceiveMemoryWarning();
+			
+			// Release any cached data, images, etc that aren't in use.
+		}
+		
+		public override void ViewDidLoad() {
+			base.ViewDidLoad();
+			
+			// Perform any additional setup after loading the view, typically from a nib.
+		}
+		
+		public override void ViewDidUnload() {
+			base.ViewDidUnload();
+			
+			// Clear any references to subviews of the main view in order to
+			// allow the Garbage Collector to collect them sooner.
+			//
+			// e.g. myOutlet.Dispose (); myOutlet = null;
+			
+			ReleaseDesignerOutlets();
+		}
+		
+		public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) {
+			// Return true for supported orientations
+			if(UserInterfaceIdiomIsPhone) {
+				return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown);
+			} else {
+				return true;
+			}
+		}
+	}
+}
+

File DialogTestingViewController.designer.cs

+//
+// This file has been generated automatically by MonoDevelop to store outlets and
+// actions made in the Xcode designer. If it is removed, they will be lost.
+// Manual changes to this file may not be handled correctly.
+//
+using MonoTouch.Foundation;
+
+namespace DialogTesting {
+	[Register ("DialogTestingViewController")]
+	partial class DialogTestingViewController {
+		void ReleaseDesignerOutlets() {
+		}
+	}
+}

File DialogTestingViewController_iPad.xib

+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
+	<data>
+		<int key="IBDocument.SystemTarget">1280</int>
+		<string key="IBDocument.SystemVersion">11C25</string>
+		<string key="IBDocument.InterfaceBuilderVersion">1919</string>
+		<string key="IBDocument.AppKitVersion">1138.11</string>
+		<string key="IBDocument.HIToolboxVersion">566.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">916</string>
+		</object>
+		<array key="IBDocument.IntegratedClassDependencies">
+			<string>IBProxyObject</string>
+			<string>IBUIView</string>
+		</array>
+		<array key="IBDocument.PluginDependencies">
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</array>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+			<integer value="1" key="NS.object.0" />
+		</object>
+		<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<object class="IBProxyObject" id="841351856">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBProxyObject" id="606714003">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBUIView" id="766721923">
+				<reference key="NSNextResponder" />
+				<int key="NSvFlags">274</int>
+				<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
+				<reference key="NSSuperview" />
+				<reference key="NSWindow" />
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MQA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
+					<int key="IBUIStatusBarStyle">2</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+		</array>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<array class="NSMutableArray" key="connectionRecords">
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="841351856" />
+						<reference key="destination" ref="766721923" />
+					</object>
+					<int key="connectionID">3</int>
+				</object>
+			</array>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<array key="orderedObjects">
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<array key="object" id="0" />
+						<reference key="children" ref="1000" />
+						<nil key="parent" />
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="841351856" />
+						<reference key="parent" ref="0" />
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="606714003" />
+						<reference key="parent" ref="0" />
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">2</int>
+						<reference key="object" ref="766721923" />
+						<reference key="parent" ref="0" />
+					</object>
+				</array>
+			</object>
+			<dictionary class="NSMutableDictionary" key="flattenedProperties">
+				<string key="-1.CustomClassName">DialogTestingViewController</string>
+				<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="-2.CustomClassName">UIResponder</string>
+				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			</dictionary>
+			<dictionary class="NSMutableDictionary" key="unlocalizedProperties" />
+			<nil key="activeLocalization" />
+			<dictionary class="NSMutableDictionary" key="localizations" />
+			<nil key="sourceID" />
+			<int key="maxID">3</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<object class="IBPartialClassDescription">
+					<string key="className">DialogTestingViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">DialogTestingViewController.h</string>
+					</object>
+				</object>
+			</array>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">916</string>
+	</data>
+</archive>

File DialogTestingViewController_iPhone.xib

+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+	<data>
+		<int key="IBDocument.SystemTarget">1280</int>
+		<string key="IBDocument.SystemVersion">11C25</string>
+		<string key="IBDocument.InterfaceBuilderVersion">1919</string>
+		<string key="IBDocument.AppKitVersion">1138.11</string>
+		<string key="IBDocument.HIToolboxVersion">566.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">916</string>
+		</object>
+		<array key="IBDocument.IntegratedClassDependencies">
+			<string>IBProxyObject</string>
+			<string>IBUIView</string>
+		</array>
+		<array key="IBDocument.PluginDependencies">
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</array>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+			<integer value="1" key="NS.object.0" />
+		</object>
+		<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<object class="IBProxyObject" id="372490531">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="843779117">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUIView" id="774585933">
+				<reference key="NSNextResponder" />
+				<int key="NSvFlags">274</int>
+				<string key="NSFrame">{{0, 20}, {320, 460}}</string>
+				<reference key="NSSuperview" />
+				<reference key="NSWindow" />
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MC43NQA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics" />
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+		</array>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<array class="NSMutableArray" key="connectionRecords">
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="372490531" />
+						<reference key="destination" ref="774585933" />
+					</object>
+					<int key="connectionID">7</int>
+				</object>
+			</array>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<array key="orderedObjects">
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<array key="object" id="0" />
+						<reference key="children" ref="1000" />
+						<nil key="parent" />
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="372490531" />
+						<reference key="parent" ref="0" />
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="843779117" />
+						<reference key="parent" ref="0" />
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">6</int>
+						<reference key="object" ref="774585933" />
+						<reference key="parent" ref="0" />
+					</object>
+				</array>
+			</object>
+			<dictionary class="NSMutableDictionary" key="flattenedProperties">
+				<string key="-1.CustomClassName">DialogTestingViewController</string>
+				<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="-2.CustomClassName">UIResponder</string>
+				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			</dictionary>
+			<dictionary class="NSMutableDictionary" key="unlocalizedProperties" />
+			<nil key="activeLocalization" />
+			<dictionary class="NSMutableDictionary" key="localizations" />
+			<nil key="sourceID" />
+			<int key="maxID">7</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<object class="IBPartialClassDescription">
+					<string key="className">DialogTestingViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">DialogTestingViewController.h</string>
+					</object>
+				</object>
+			</array>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">916</string>
+	</data>
+</archive>
+<?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>UIDeviceFamily</key>
+	<array>
+		<integer>1</integer>
+		<integer>2</integer>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>MinimumOSVersion</key>
+	<string>3.2</string>
+</dict>
+</plist>
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+
+namespace DialogTesting {
+	public class Application {
+		// This is the main entry point of the application.
+		static void Main(string[] args) {
+			// if you want to use a different Application Delegate class from "AppDelegate"
+			// you can specify it here.
+			UIApplication.Main(args, null, "AppDelegate");
+		}
+	}
+}