1. André Schnabel
  2. DialogTesting

Commits

André Schnabel  committed f02d7c9 Draft

Changed setting to field for persistence

  • Participants
  • Parent commits 8fee2f6
  • Branches default

Comments (0)

Files changed (1)

File AppDelegate.cs

View file
  • Ignore whitespace
 			dialogViewController.NavigationItem.RightBarButtonItem = item;
 		}
 
+		CustomSettings setting = new CustomSettings() {
+					Strength = 10,
+					Hobby = Hobby.Arts,
+					Male = true,
+					Name = "Peter"
+				};
+
 		//
 		// 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
 			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);