RootElements are responsible for showing a full configuration page.
At least one RootElement is required to start the MonoTouch.Dialogs process. RootElements can also be used inside Sections to trigger loading a new nested configuration page. When used in this mode the caption provided is used while rendered inside a section and is also used as the Title for the subpage. If a RootElement is initialized with a section/element value then this value is used to locate a child Element that will provide a summary of the configuration which is rendered on the right-side of the display. RootElements are also used to coordinate radio elements. The RadioElement members can span multiple Sections (for example to implement something similar to the ring tone selector and separate custom ring tones from system ringtones). Sections are added by calling the Add method which supports the C# 4.0 syntax to initialize a RootElement in one pass.
Inheritance: Element, IEnumerable
		public NewAccountViewController (AppDelegateIPhone appDel, UINavigationController vc) : base("NewAccountViewController", null)
		{
			_AppDel = appDel;
			_vc = vc;
			
			this.root = CreateRoot ();
		}
Example #2
0
		public TestCaseElement (TestMethod testCase, TouchRunner runner)
			: base (testCase, runner)
		{
			Caption = testCase.Name;
			Value = "NotExecuted";
            this.Tapped += async delegate {
				if (!Runner.OpenWriter (Test.FullName))
					return;

				var suite = (testCase.Parent as TestSuite);
				var context = TestExecutionContext.CurrentContext;
				context.TestObject = Reflect.Construct (testCase.Method.ReflectedType, null);

                await suite.GetOneTimeSetUpCommand ().Execute (context);
                await Run ();
                await suite.GetOneTimeTearDownCommand ().Execute (context);

				Runner.CloseWriter ();
				// display more details on (any) failure (but not when ignored)
				if ((TestCase.RunState == RunState.Runnable) && !Result.IsSuccess ()) {
					var root = new RootElement ("Results") {
						new Section () {
							new TestResultElement (Result)
						}
					};
					var dvc = new DialogViewController (root, true) { Autorotate = true };
					runner.NavigationController.PushViewController (dvc, true);
				} else if (GetContainerTableView () != null) {
					var root = GetImmediateRootElement ();
					root.Reload (this, UITableViewRowAnimation.Fade);
				}
			};
		}
		public RootElement BuildRootWithLoop()
		{
			bankSelection = new RadioGroup (0);

			Section section = null;
			string lastLetter = "";
			RootElement root = new RootElement("Pick your bank", bankSelection);

			foreach(var name in data)
			{
				string currentFirstLetter = name.Substring(0,1);
				if (currentFirstLetter != lastLetter)
				{
					if (section != null && section.Count > 0) root.Add (section);

					lastLetter = currentFirstLetter;
					section = new Section(currentFirstLetter);
				}

				section.Add (new RadioElement(name));

			}

			if (section != null && section.Count > 0) root.Add (section);

			return root;

		}
 public DVCMenu()
     : base(UITableViewStyle.Grouped, null)
 {
     Root = new RootElement ("iCarousel") {
         new Section ("Samples"){
             new StringElement ("Simple Demo", () => {
                 var vc = new SimpleSampleViewController ();
                 NavigationController.PushViewController (vc, true);
             }),
             new StringElement ("Controls Demo", () => {
                 var vc = new ControlsViewController ();
                 NavigationController.PushViewController (vc, true);
             }),
             new StringElement ("Buttons Demo", () => {
                 var vc = new ButtonsViewController ();
                 NavigationController.PushViewController (vc, true);
             }),
             new StringElement ("Auto Scroll Demo", () => {
                 var vc = new AutoScrollViewController ();
                 NavigationController.PushViewController (vc, true);
             }),
             new StringElement ("Async Image Demo", () => {
                 var vc = new AsyncImageViewController ();
                 NavigationController.PushViewController (vc, true);
             })
         }
     };
 }
        private void LoadTable()
        {
            var imageCount = Data.Database.Main.Table<ProjectImage>().Count();
            var allPatternsButton = new StyledElement("All UI Images", imageCount.ToString(), UITableViewCellStyle.Value1);
            if (imageCount > 0)
            {
                allPatternsButton.Accessory = UITableViewCellAccessory.DisclosureIndicator;
                allPatternsButton.Tapped += () => NavigationController.PushViewController(new LocalViewPatternsViewController() { Title = "All" }, true);
            }

            var section = new Section("Albums");
            var projects = Data.Database.Main.Table<Project>();
            foreach (var p in projects)
            {
                var project = p;
                var element = new ProjectElement(project);
                if (Data.Database.Main.Table<ProjectImage>().Where(a => a.ProjectId == project.Id).Count() > 0)
                {
                    element.Accessory = UITableViewCellAccessory.DisclosureIndicator;
                    element.Tapped += () => {
                        NavigationController.PushViewController(new LocalViewPatternsViewController(project.Id) { Title = project.Name }, true);
                    };
                }
                section.Add(element);
            }

            var root = new RootElement(Title) { new Section() { allPatternsButton }, section };
            Root = root;
        }
		public override void LoadView ()
		{
			base.LoadView ();

			var root = new RootElement ("TARP Banks");

			var section = new Section ()
			{
				(usOnlyToggle = new BooleanElement("Show only US banks", false))
			};
			root.Add (section);

			//make a section from the banks. Keep a reference to it
			root.Add ((bankListSection = BuildBankSection (usOnlyToggle.Value)));

			//if the toggle changes, reload the items
			usOnlyToggle.ValueChanged += (sender, e) => {
				var newListSection = BuildBankSection(usOnlyToggle.Value);

				root.Remove(bankListSection, UITableViewRowAnimation.Fade);
				root.Insert(1, UITableViewRowAnimation.Fade, newListSection);
				bankListSection = newListSection;

			};


			Root = root;
		}
        public ProvisioningDialog()
            : base(UITableViewStyle.Grouped, null)
        {
            Root = new RootElement ("GhostPractice Mobile");
            var topSec = new Section ("Welcome");
            topSec.Add (new StringElement ("Please enter activation code"));
            activation = new EntryElement ("Code", "Activation Code", "999998-zcrdbrkqwogh");
            topSec.Add (activation);
            var submit = new StringElement ("Send Code");
            submit.Alignment = UITextAlignment.Center;

            submit.Tapped += delegate {
                if (activation.Value == null || activation.Value == string.Empty) {
                    new UIAlertView ("Device Activation", "Please enter activation code", null, "OK", null).Show ();
                    return;
                }
                if (!isBusy) {
                    getAsyncAppAndPlatform ();
                } else {
                    Wait ();
                }

            };
            topSec.Add (submit);
            Root.Add (topSec);

            UIImage img = UIImage.FromFile ("Images/launch_small.png");
            UIImageView v = new UIImageView (new RectangleF (0, 0, 480, 600));
            v.Image = img;
            Root.Add (new Section (v));
        }
Example #8
0
        public TankMix_History_Fill(List<Fill> Fills,int F)
            : base(UITableViewStyle.Grouped, null)
        {
            this.Pushing = true;
            Root = new RootElement ("Fills");
            var Section = new Section ();

            for(int i=1; i<=F; i++)
            {
                var btn = new StringElement ("Fill "+i, string.Empty);
                btn.Tapped += () => {
                    //this.NavigationController.PushViewController(new TankMix_CalculationCreateFill (Convert.ToInt32(btn.Caption.Split(' ')[1]),Fills,F),true);
                    var index = Convert.ToInt32(btn.Caption.Split(' ')[1])-1;
                    try{
                        this.NavigationController.PushViewController(new TankMix_CalculationCreateNewFill(Fills[index],index+1),true);

                    }catch{
                        new UIAlertView ("Error", "This fill has no data !", null, "Continue").Show ();
                    }
                };
                Section.Add (btn);
            }

            Root.Add (Section);
        }
        public void buildReport()
        {
            Root = new RootElement ("");
            var v = new UIView ();
            v.Frame = new RectangleF (10, 10, 600, 10);
            var dummy = new Section (v);
            Root.Add (dummy);
            var headerLabel = new UILabel (new RectangleF (10, 10, 800, 48)) {
                Font = UIFont.BoldSystemFontOfSize (18),
                BackgroundColor = ColorHelper.GetGPPurple (),
                TextAlignment = UITextAlignment.Center,
                TextColor = UIColor.White,
                Text = "Branch Matter Analysis"
            };
            var view = new UIViewBordered ();
            view.Frame = new RectangleF (10, 20, 800, 48);
            view.Add (headerLabel);
            Root.Add (new Section (view));
            //
            for (int i = 0; i < report.branches.Count; i++) {
                Branch branch = report.branches [i];

                Section s = new Section (branch.name + " Branch Totals");
                Root.Add (s);
                //
                if (branch.branchTotals.matterActivity != null) {
                    var matterActivitySection = new Section ();
                    var mTitle = new TitleElement ("Matter Activity");
                    matterActivitySection.Add (mTitle);
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.active, "Active Matters: "));
                    matterActivitySection.Add (new NumberElement (
                        branch.branchTotals.matterActivity.deactivated,
                        "Deactivated Matters: "
                    ));
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.newWork, "New Work: "));
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.workedOn, "Worked On: "));

                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.noActivity, "No Activity: "));
                    matterActivitySection.Add (new StringElement ("No Activity Duration: " + branch.branchTotals.matterActivity.noActivityDuration));
                    Root.Add (matterActivitySection);
                }
                //
                if (branch.branchTotals.matterBalances != null) {
                    var matterBalancesSection = new Section ();
                    var mTitle = new TitleElement ("Matter Balances");
                    matterBalancesSection.Add (mTitle);
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.business, S.GetText (S.BUSINESS) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.trust, S.GetText (S.TRUST_BALANCE) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.investment, S.GetText (S.INVESTMENTS) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.unbilled, "Unbilled: "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.pendingDisbursements, "Pending Disb.: "));
                    Root.Add (matterBalancesSection);
                }

            }

            for (var i = 0; i < 10; i++) {
                Root.Add (new Section (" "));
            }
        }
Example #10
0
		//
		// 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)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			var web = new WebElement ();
			web.HtmlFile = "instructions";

			var root = new RootElement ("Kannada Keyboard") {
				new Section{
					new UIViewElement("Instruction", web.View, false)
				}
			};
		
			var dv = new DialogViewController (root) {
				Autorotate = true
			};
			var navigation = new UINavigationController ();
			navigation.PushViewController (dv, true);				

			window = new UIWindow (UIScreen.MainScreen.Bounds);
			window.MakeKeyAndVisible ();
			window.AddSubview (navigation.View);
			
			return true;
		}
        public LoginViewController()
            : base (UITableViewStyle.Grouped, null)
        {
            var defaults = NSUserDefaults.StandardUserDefaults;
            string mobileServiceUri = defaults.StringForKey (MobileServiceUriKey);
            string mobileServiceKey = defaults.StringForKey (MobileServiceKeyKey);
            string tags = defaults.StringForKey (TagsKey);

            this.uriEntry = new EntryElement (null, "Mobile Service URI", mobileServiceUri);
            this.keyEntry = new EntryElement (null, "Mobile Service Key", mobileServiceKey);
            this.tagsEntry = new EntryElement (null, "Tags", tags);

            Root = new RootElement ("C# Client Library Tests") {
                new Section ("Login") {
                    this.uriEntry,
                    this.keyEntry,
                    this.tagsEntry
                },

                new Section {
                    new StringElement ("Run Tests", RunTests)                    
                },

                new Section{
                    new StringElement("Login with Microsoft", () => Login(MobileServiceAuthenticationProvider.MicrosoftAccount)),
                    new StringElement("Login with Facebook", () => Login(MobileServiceAuthenticationProvider.Facebook)),
                    new StringElement("Login with Twitter", () => Login(MobileServiceAuthenticationProvider.Twitter)),
                    new StringElement("Login with Google", () => Login(MobileServiceAuthenticationProvider.Google))
                }
            };
        }
		//
		// 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);

			var root = new RootElement("MBProgressHUD")
			{
				new Section ("Samples")
				{
					new StringElement ("Simple indeterminate progress", ShowSimple),
					new StringElement ("With label", ShowWithLabel),
					new StringElement ("With details label", ShowWithDetailsLabel),
					new StringElement ("Determinate mode", ShowWithLabelDeterminate),
					new StringElement ("Annular determinate mode", ShowWIthLabelAnnularDeterminate),
					new StringElement ("Custom view", ShowWithCustomView),
					new StringElement ("Mode switching", ShowWithLabelMixed),
					new StringElement ("Using handlers", ShowUsingHandlers),
					new StringElement ("On Window", ShowOnWindow),
					new StringElement ("NSURLConnection", ShowUrl),
					new StringElement ("Dim background", ShowWithGradient),
					new StringElement ("Text only", ShowTextOnly),
					new StringElement ("Colored", ShowWithColor),
				}
			};

			dvcDialog = new DialogViewController(UITableViewStyle.Grouped, root, false);
			navController = new UINavigationController(dvcDialog);

			window.RootViewController = navController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
Example #13
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Forms.Init ();

            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            rootElement = new RootElement("View.iOS - NetAtmo");

            textSection = new Section();

            buttonSection = new Section()
            {
                new StringElement("Refresh", () =>
                {
                    Refresh();
                })  
            };

            Refresh();

            rootElement.Add(buttonSection);
            rootElement.Add(textSection);


            var rootVC = new DialogViewController(rootElement);
            var nav = new UINavigationController(rootVC);
            Window.RootViewController = nav;
            Window.MakeKeyAndVisible();

            return true;
        }
        public MainViewController()
            : base(UITableViewStyle.Grouped, null)
        {
            SignIn.SharedInstance.Delegate = this;
            SignIn.SharedInstance.UIDelegate = this;

            // Automatically sign in the user.
            SignIn.SharedInstance.SignInUserSilently ();

            status = new StringElement ("Not Signed In", () => {
                // Sign out
                SignIn.SharedInstance.SignOutUser ();

                // Clear signed in app state
                currentAuth = null;
                Root[1].Clear ();
                ToggleAuthUI ();
            });
            signinButton = new SignInButtonElement ();

            Root = new RootElement ("Sign In Migration") {
                new Section {
                    signinButton,
                    status,
                },
                new Section {
                },
            };

            ToggleAuthUI ();
        }
        public DetailViewController(RSSFeedItem item)
            : base(UITableViewStyle.Grouped, null, true)
        {
            var attributes = new NSAttributedStringDocumentAttributes();
              attributes.DocumentType = NSDocumentType.HTML;
              attributes.StringEncoding = NSStringEncoding.UTF8;
              var error = new NSError();
              var htmlString = new NSAttributedString(item.Description, attributes, ref error);

              Root = new RootElement(item.Title) {
                new Section{
                new StringElement(item.Author),
                new StringElement(item.PublishDate),
                        new StyledMultilineElement(htmlString),
                new HtmlElement("Full Article", item.Link)
              }
            };

            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Action, async delegate
                {
                    var message = item.Title + " " + item.Link + " #PlanetXamarin";
                    var social = new UIActivityViewController(new NSObject[] { new NSString(message)},
                        new UIActivity[] { new UIActivity() });
                    PresentViewController(social, true, null);
                });
        }
            public TaskPageController(FlyoutNavigationController navigation, string title)
                : base(null)
            {
                Root = new RootElement (title) {
                    new Section {
                        new CheckboxElement (title)
                    }
                };
                NavigationItem.LeftBarButtonItem = new UIBarButtonItem (UIBarButtonSystemItem.Action, delegate {
                    navigation.ToggleMenu ();
                });

                NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Refresh, delegate
                {
                    if(navigation.IsOpen)
                        navigation.ToggleMenu();

                    if(navigation.FlyMode == FlyoutNavigationController.FlyoutMode.Top)
                        navigation.FlyMode = FlyoutNavigationController.FlyoutMode.Left;
                    else if(navigation.FlyMode == FlyoutNavigationController.FlyoutMode.Left)
                        navigation.FlyMode = FlyoutNavigationController.FlyoutMode.Right;
                    else
                        navigation.FlyMode = FlyoutNavigationController.FlyoutMode.Top;
                });
            }
Example #17
0
        public void EchoDicomServer()
        {
            RootElement root = null;
            Section resultSection = null;

            var hostEntry = new EntryElement("Host", "Host name of the DICOM server", "server");
            var portEntry = new EntryElement("Port", "Port number", "104");
            var calledAetEntry = new EntryElement("Called AET", "Called application AET", "ANYSCP");
            var callingAetEntry = new EntryElement("Calling AET", "Calling application AET", "ECHOSCU");

            var echoButton = new StyledStringElement("Click to test",
            delegate {
                if (resultSection != null) root.Remove(resultSection);
                string message;
                var echoFlag = DoEcho(hostEntry.Value, Int32.Parse(portEntry.Value), calledAetEntry.Value, callingAetEntry.Value, out message);
                var echoImage = new ImageStringElement(String.Empty, echoFlag ? new UIImage("yes-icon.png") : new UIImage("no-icon.png"));
                var echoMessage = new StringElement(message);
                resultSection = new Section(String.Empty, "C-ECHO result") { echoImage, echoMessage };
                root.Add(resultSection);
            })
            { Alignment = UITextAlignment.Center, BackgroundColor = UIColor.Blue, TextColor = UIColor.White };

            root = new RootElement("Echo DICOM server") {
                new Section { hostEntry, portEntry, calledAetEntry, callingAetEntry},
                new Section { echoButton },

            };

            var dvc = new DialogViewController (root, true) { Autorotate = true };
            navigation.PushViewController (dvc, true);
        }
Example #18
0
		public DVCMenu () : base (null)
		{
			Root = new RootElement ("Cute Animals") {
				new Section () {
					new StringElement ("Cute Monkey Pictures!", ()=> {
						var categoryView = new DVCCategory ("Monkey", 8);
						NavigationController.PushViewController (categoryView, true);
					}),
					new StringElement ("Cute Cat Pictures!", ()=> {
						var categoryView = new DVCCategory ("Cat", 4);
						NavigationController.PushViewController (categoryView, true);
					}),
					new StringElement ("Cute Bunny Pictures!", ()=> {
						var categoryView = new DVCCategory ("Bunny", 3);
						NavigationController.PushViewController (categoryView, true);
					}),
					new StringElement ("Cute Lion Pictures!", ()=> {
						var categoryView = new DVCCategory ("Lion", 4);
						NavigationController.PushViewController (categoryView, true);
					}),
					new StringElement ("Cute Tiger Pictures!", ()=> {
						var categoryView = new DVCCategory ("Tiger", 2);
						NavigationController.PushViewController (categoryView, true);
					}),
				}
			};
		}
		public void ButtonSwitcher ()
		{
			if (DBAccountManager.SharedManager.LinkedAccount == null) {
				Root = new RootElement ("DropBox Sync") {
					new Section (){
						new StringElement ("Link Account", () => DBAccountManager.SharedManager.LinkFromController (NavigationController)) { 
							Alignment = UITextAlignment.Center 
						}
					}
				};
			} else {
				Root = new RootElement ("DropBox Sync") {
					new Section () {
						new StringElement ("Unlink Account", () => {
							DBAccountManager.SharedManager.LinkedAccount.Unlink ();
							ButtonSwitcher ();
						}) { Alignment = UITextAlignment.Center },
						new StringElement ("Show DropBox Files", () => {
							filesController = new DVCFiles (DBPath.Root);
							NavigationController.PushViewController (filesController, true);
						}) { Alignment = UITextAlignment.Center } 
					}
				};
			}
		}
Example #20
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var vm = (AboutViewModel)ViewModel;

            var root = new RootElement(Title)
            {
                new Section
                {
                    new MultilinedElement("CodeHub".t()) { Value = About, CaptionColor = Theme.CurrentTheme.MainTitleColor, ValueColor = Theme.CurrentTheme.MainTextColor }
                },
                new Section
                {
                    new StyledStringElement("Source Code".t(), () => vm.GoToSourceCodeCommand.Execute(null))
                },
                new Section(String.Empty, "Thank you for downloading. Enjoy!")
                {
                    new StyledStringElement("Follow On Twitter".t(), () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://twitter.com/CodeHubapp"))),
                    new StyledStringElement("Rate This App".t(), () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://itunes.apple.com/us/app/codehub-github-for-ios/id707173885?mt=8"))),
                    new StyledStringElement("App Version".t(), vm.Version)
                }
            };

            root.UnevenRows = true;
            Root = root;
        }
Example #21
0
		// This method is invoked when the application has loaded its UI and its ready to run
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			var Last = new DateTime (2010, 10, 7);
			Console.WriteLine (Last);
			
			window.AddSubview (navigation.View);

			var menu = new RootElement ("Demos"){
				new Section ("Element API"){
					new StringElement ("iPhone Settings Sample", DemoElementApi),
					new StringElement ("Dynamically load data", DemoDynamic),
					new StringElement ("Add/Remove demo", DemoAddRemove),
					new StringElement ("Assorted cells", DemoDate),
				},
				new Section ("Auto-mapped", footer){
					new StringElement ("Reflection API", DemoReflectionApi)
				},
				new Section ("Other"){
					new StringElement ("Headers and Footers", DemoHeadersFooters)
				}
			};

			var dv = new DialogViewController (menu);
			navigation.PushViewController (dv, true);				
			
			window.MakeKeyAndVisible ();
			
			return true;
		}
Example #22
0
		private void ConfigureRoot()
		{
			TableView.BackgroundColor = UIColor.Clear;

			var root = new RootElement("Home")
			{
				
				new Section()
				{
					new StringElement("Heading Element") { CssClass = "heading" }
				},
				new Section()
				{
					new ImageStringElement("Detailed Item", "This should be orange", null),
					new ImageStringElement("Detailed Item", "This should be all green", null) { CssClass = "Green" },
				},
				new Section()
				{
					new RootElement("Radio Items", new RadioGroup(0))
					{
						new Section("", "", "Radio")
						{
						new RadioElement("Radio Item 1"),
						new RadioElement("Radio Item 2"),
						new RadioElement("This should be big") { CssClass = "Heading" }
					
						}
					}
				}
			};
			
			root.CssClass = "Root";
			Root = root;
		}
        private void FoundResults(ParseObject[] array, NSError error)
        {
            var easySection = new Section("Easy");
            var mediumSection = new Section("Medium");
            var hardSection = new Section("Hard");

            var objects = array.Select(x=> x.ToObject<GameScore>()).OrderByDescending(x=> x.Score).ToList();

            foreach(var score in objects)
            {
                var element = new StringElement(score.Player,score.Score.ToString("#,###"));
                switch(score.Dificulty)
                {
                case GameDificulty.Easy:
                    easySection.Add(element);
                    break;
                case GameDificulty.Medium:
                    mediumSection.Add(element);
                    break;
                case GameDificulty.Hard:
                    hardSection.Add (element);
                    break;
                }
            }
            Root = new RootElement("High Scores")
            {
                easySection,
                mediumSection,
                hardSection,
            };
        }
        public override void ViewDidLoad() {
            base.ViewDidLoad();
            
            _MainSection = new Section() {
                new ActivityElement()
            };
            Root = new RootElement("Markers") {
                _MainSection
            };

            // Simple demo of a progress HUD. Doesn't actually do anything useful.
            // Added after question from audience.
            MTMBProgressHUD progress = new MTMBProgressHUD() {
                DimBackground = true,
                LabelText = "Doing something.",
            };
            View.Add(progress);
            progress.Show(animated: true);
            Task.Factory.StartNew(() => {
                Thread.Sleep(2000);
                InvokeOnMainThread(() => {
                    progress.Hide(animated: true);
                });
            });

            mapController = new MapViewController();
            mapController.NewMarkerCreated += (object sender, MarkerAddedEventArgs e) => {
                InvokeOnMainThread(() => {
                    _Database.SaveMarker(e.MarkerInfo);
                    RefreshMarkers();
                });
            };
            RefreshMarkers();
        }
        private void LoadTimetable(Timetable timetable)
        {
            UIApplication.SharedApplication.InvokeOnMainThread(() =>
            {
                _pageScrollController.Clear();
                if (timetable.BlockedTimetable)
                {
                    var root = new RootElement("Blockiert"){
                        new Section("Blockiert"){
                            new MultilineElement("Benutzer hat Stundenplan\nblockiert")
                        }
                    };
                    var dvc = new DefaultDialogViewController(root, UITableViewStyle.Plain, RefreshRequested);
                    dvc.CustomLastUpdate = timetable.LastUpdated;
                    _pageScrollController.AddPage(dvc);
                }
                else if (timetable.HasError)
                {
                    var root = new RootElement("Error"){
                        new Section("Error"){
                            new MultilineElement(timetable.ErrorMessage)
                        }
                    };
                    var dvc = new DefaultDialogViewController(root, UITableViewStyle.Plain, RefreshRequested);
                    dvc.CustomLastUpdate = timetable.LastUpdated;
                    _pageScrollController.AddPage(dvc);
                }
                else
                {
                    foreach (var day in timetable.TimetableDays)
                    {
                        if (day.Lessions.Count() == 0)
                            continue;
                        var root = new RootElement((string.IsNullOrEmpty(day.Weekday) ? "Ohne Wochentag" : day.Weekday));
                        foreach (var lession in day.Lessions)
                        {
                            var section = new Section(lession.Name + " " + lession.Type);
                            foreach (var alloc in lession.CourseAllocations)
                            {
                                string t = alloc.Timeslot;
                                if (alloc.RoomAllocations.Count() > 0)
                                    t += "\n" + alloc.RoomAllocations.FirstOrDefault().Roomnumber;
                                var tmpLession = new Lession(){CourseAllocations=lession.CourseAllocations,
                                                               Lecturers=lession.Lecturers,
                                                               Name=lession.Name,
                                                               Type=lession.Type};
                                section.Add(new MultilineElement(t, () => {

                                    OnElementTappet(tmpLession);}){Value=lession.LecturersShortVersion});
                            }
                            root.Add(section);
                        }
                        var dvc = new DefaultDialogViewController(root, UITableViewStyle.Plain, RefreshRequested);
                        dvc.CustomLastUpdate = timetable.LastUpdated;
                        _pageScrollController.AddPage(dvc);
                    }
                }
            });
            _loadedTimetable = timetable;
        }
Example #26
0
		/// <summary>
		/// Invoked when it comes time to set the root so the child classes can create their own menus
		/// </summary>
		private void OnCreateMenu(RootElement root)
		{
            var addGistSection = new Section();
            root.Add(addGistSection);
            addGistSection.Add(new MenuElement("New Gist", () => {
                var gistController = new CreateGistController();
                gistController.Created = (id) => {
                    NavigationController.PushViewController(new GistInfoController(id), true);
                };
                var navController = new UINavigationController(gistController);
                PresentViewController(navController, true, null);
            }, Images.Buttons.NewGist));

            var gistMenuSection = new Section() { HeaderView = new MenuSectionView("Gists") };
            root.Add(gistMenuSection);
            gistMenuSection.Add(new MenuElement("My Gists", () => NavigationController.PushViewController(new MyGistsController(), true), Images.Buttons.MyGists));
            gistMenuSection.Add(new MenuElement("Starred", () => NavigationController.PushViewController(new StarredGistsController(), true), Images.Buttons.Star2));
            gistMenuSection.Add(new MenuElement("Public", () => NavigationController.PushViewController(new PublicGistsController(), true), Images.Buttons.Public));

//            var labelSection = new Section() { HeaderView = new MenuSectionView("Tags") };
//            root.Add(labelSection);
//            labelSection.Add(new MenuElement("Add New Tag", () => { }, null));

            var moreSection = new Section() { HeaderView = new MenuSectionView("Info") };
            root.Add(moreSection);
            moreSection.Add(new MenuElement("About", () => NavigationController.PushViewController(new AboutController(), true), Images.Buttons.Info));
            moreSection.Add(new MenuElement("Feedback & Support", () => { 
                var config = UserVoice.UVConfig.Create("http://gistacular.uservoice.com", "lYY6AwnzrNKjHIkiiYbbqA", "9iLse96r8yki4ZKknfHKBlWcbZAH9g8yQWb9fuG4");
                UserVoice.UserVoice.PresentUserVoiceInterface(this, config);
            }, Images.Buttons.Feedback));
            moreSection.Add(new MenuElement("Logout", Logout, Images.Buttons.Logout));
		}
		public void DemoHeadersFooters () 
		{
			var section = new Section () { 
				HeaderView = new UIImageView (UIImage.FromFile ("caltemplate.png")),
#if !__TVOS__
				FooterView = new UISwitch (new RectangleF (0, 0, 80, 30)),
#endif // !__TVOS__
			};
			
			// Fill in some data 
			var linqRoot = new RootElement ("LINQ source"){
				from x in new string [] { "one", "two", "three" }
					select new Section (x) {
						from y in "Hello:World".Split (':')
							select (Element) new StringElement (y)
				}
			};

			section.Add (new RootElement ("Desert", new RadioGroup ("desert", 0)){
				new Section () {
					new RadioElement ("Ice Cream", "desert"),
					new RadioElement ("Milkshake", "desert"),
					new RadioElement ("Chocolate Cake", "desert")
				},
			});
			
			var root = new RootElement ("Headers and Footers") {
				section,
				new Section () { linqRoot }
			};
			var dvc = new DialogViewController (root, true);
			navigation.PushViewController (dvc, true);
		}
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			var hockey = BITHockeyManager.SharedHockeyManager;

			Root = new RootElement ("HockeyApp Sample") {
				new Section {
					new StringElement("Check for Updates", () => {
						hockey.UpdateManager.CheckForUpdate();
					}),
					new StringElement("Show Feedback", () => {
						hockey.FeedbackManager.ShowFeedbackListView();
					}),
					new StringElement("Submit New Feedback", () => {
						hockey.FeedbackManager.ShowFeedbackComposeView();
					}),
					new StringElement("Crashed Last Run:", hockey.CrashManager.DidCrashInLastSession.ToString())
				},
				new Section {
					new StringElement("Throw Managed .NET Exception", () => {

						throw new HockeyAppSampleException("You intentionally caused a crash!");

					})
				}
			};
		}
Example #29
0
		// Creates the dynamic content from the twitter results
		RootElement CreateDynamicContent (XDocument doc)
		{
			var users = doc.XPathSelectElements ("./statuses/status/user").ToArray ();
			var texts = doc.XPathSelectElements ("./statuses/status/text").Select (x=>x.Value).ToArray ();
			var people = doc.XPathSelectElements ("./statuses/status/user/name").Select (x=>x.Value).ToArray ();
			
			var section = new Section ();
			var root = new RootElement ("Tweets") { section };
			
			for (int i = 0; i < people.Length; i++){
				var line = new RootElement (people [i]) { 
					new Section ("Profile"){
						new StringElement ("Screen name", users [i].XPathSelectElement ("./screen_name").Value),
						new StringElement ("Name", people [i]),
						new StringElement ("oFllowers:", users [i].XPathSelectElement ("./followers_count").Value)
					},
					new Section ("Tweet"){
						new StringElement (texts [i])
					}
				};
				section.Add (line);
			}
			
			return root;
		}
        public SettingsViewController()
            : base(new RootElement("Einstellungen"))
        {
            var root = new RootElement("Einstellungen");
            var userEntry = new EntryElement("Benutzername", "benutzername", ApplicationSettings.Instance.UserCredentials.Name);
            var passwordEntry = new EntryElement("Passwort", "passwort", ApplicationSettings.Instance.UserCredentials.Password, true);
            userEntry.AutocorrectionType = MonoTouch.UIKit.UITextAutocorrectionType.No;
            userEntry.AutocapitalizationType = MonoTouch.UIKit.UITextAutocapitalizationType.None;
            userEntry.Changed += UsernameChanged;
            passwordEntry.Changed += PasswordChanged;

            root.Add(new Section("Benutzerinformationen"){
                userEntry,
                passwordEntry
            });

            root.Add(new Section("Stundenplaneinstellungen"){
                new StyledStringElement("Andere Stundenpläne", () => {NavigationController.PushViewController(new SettingsTimetablesDetailViewController(), true);}){
                    Accessory = UITableViewCellAccessory.DisclosureIndicator
                }
            });
            Root = root;
            Title = "Einstellungen";
            NavigationItem.Title = "Einstellungen";
            TabBarItem.Image = UIImage.FromBundle("Settings-icon");
        }
        public MainViewController()
            : base(null)
        {
            _hostNameElement = new EntryElement("Target", "google.com", "")
            {
                TextAlignment = UITextAlignment.Right
            };
            _pingButtonElement = new StyledStringElement("Ping")
            {
                Alignment = UITextAlignment.Center
            };
            _pingButtonElement.Tapped += OnPingButtonClicked;

            Root = new MonoTouch.Dialog.RootElement("SimplePing")
            {
                new Section()
                {
                    _hostNameElement,
                    _pingButtonElement,
                }
            };
        }
Example #32
0
 public Source(DialogViewController container)
 {
     this.Container = container;
     Root           = container.root;
 }
Example #33
0
        private Element GetElementForMember(object dataContext, MemberInfo member)
        {
            string  caption = null;
            Element element = null;
            //MemberInfo last_radio_index = null;
            var bindings = new List <Binding>();

            var captionAttribute        = member.GetCustomAttribute <CaptionAttribute>();
            var orderAttribute          = member.GetCustomAttribute <OrderAttribute>();
            var bindAttributes          = member.GetCustomAttributes(typeof(BindAttribute), false);
            var popOnSelectionAttribute = member.GetCustomAttribute <PopOnSelectionAttribute>();

            //	var memberDataContext = GetDataContextForMember(dataContext, ref member);
            var memberDataContext = dataContext;

            if (captionAttribute != null)
            {
                caption = captionAttribute.Caption;
            }
            else
            {
                caption = MakeCaption(member.Name);
            }

            Type memberType = GetTypeForMember(member);

            if (!(member is MethodInfo))
            {
                foreach (BindAttribute bindAttribute in bindAttributes)
                {
                    bindings.Add(bindAttribute.Binding);
                }

                var valueBinding = bindings.Where((b) => b.TargetPath == "Value").FirstOrDefault() != null;

                if (!valueBinding)
                {
                    bindings.Add(new Binding(member.Name, null));
                }

                foreach (var binding in bindings)
                {
                    if (string.IsNullOrEmpty(binding.SourcePath))
                    {
                        binding.SourcePath = member.Name;
                    }
                    //			else
                    {
                        var sourceDataContext = memberDataContext;
                        var sourceProperty    = sourceDataContext.GetType().GetNestedProperty(ref sourceDataContext, binding.SourcePath, true);
                        if (sourceProperty == null)
                        {
                            sourceDataContext = dataContext;
                            sourceProperty    = sourceDataContext.GetType().GetNestedProperty(ref sourceDataContext, binding.SourcePath, true);
                        }

                        binding.Source = sourceDataContext;
                    }
                }
            }

            if (_ElementPropertyMap.ContainsKey(memberType))
            {
                element = _ElementPropertyMap[memberType](member, caption, dataContext);
            }
            else if (memberType.IsEnum)
            {
                SetDefaultConverter(member, "Value", new EnumConverter()
                {
                    PropertyType = memberType
                }, bindings);

                var csection     = new Section();
                var currentValue = GetValue(member, memberDataContext);
                int index        = 0;
                int selected     = 0;

                var pop = popOnSelectionAttribute != null;

                foreach (Enum value in Enum.GetValues(memberType))
                {
                    if (currentValue == value)
                    {
                        selected = index;
                    }
                    csection.Add(new RadioElement(value.GetDescription(), pop)
                    {
                        Index = index, Value = false
                    });
                    index++;
                }

                element = new RootElement <int>(caption, new RadioGroup(memberType.FullName, selected))
                {
                    csection
                };
                element.Caption        = caption;
                ((IRoot)element).Group = new RadioGroup(memberType.FullName, selected)
                {
                    EnumType = memberType
                };
                ((IRoot)element).CellStyle = UITableViewCellStyle.Value1;
            }
            else if (typeof(EnumCollection).IsAssignableFrom(memberType))
            {
                SetDefaultConverter(member, "Value", new EnumItemsConverter(), bindings);

                var csection = new Section()
                {
                    IsMultiselect = true
                };
                var collection = GetValue(member, memberDataContext);
                if (collection == null)
                {
                    var    collectionType = typeof(EnumCollection <>);
                    var    enumType       = memberType.GetGenericArguments()[0];
                    Type[] generic        = { enumType };

                    collection = Activator.CreateInstance(collectionType.MakeGenericType(generic));
                    (member as PropertyInfo).SetValue(memberDataContext, collection, new object[] {});
                }

                var index = 0;
                var items = (EnumCollection)collection;
                foreach (var item in items.AllValues)
                {
                    csection.Add(new CheckboxElement(item.Description, item.IsChecked, item.GroupName)
                    {
                        Index = index
                    });
                    index++;
                }

                element = new RootElement <int>(caption)
                {
                    csection
                };
                ((IRoot)element).CellStyle = GetCellStyle(member, UITableViewCellStyle.Value1);
            }
            else if (typeof(System.Collections.IEnumerable).IsAssignableFrom(memberType))
            {
                SetDefaultConverter(member, "Value", new EnumerableConverter(), bindings);
                var listBox = new ListBoxElement();
                int index   = 0;

                Type viewType = memberType.GetGenericArguments()[0];

                var rootAttribute = member.GetCustomAttribute <RootAttribute>();

                var items = (IEnumerable)GetValue(member, memberDataContext);
                foreach (var e in items)
                {
                    Element newElement = null;

                    newElement = CreateGenericRoot(viewType, null, e);
                    if (rootAttribute != null)
                    {
                        ((IRoot)newElement).ElementType = rootAttribute.DataTemplateType;
                    }

                    //Populate(e, (IRoot)newElement);

                    listBox.Add(newElement);
                    index++;
                }

                element                    = CreateGenericRoot(memberType, listBox, null);
                element.Caption            = caption;
                ((IRoot)element).CellStyle = GetCellStyle(member, UITableViewCellStyle.Default);
            }
            else
            {
                var nested = GetValue(member, memberDataContext);
                if (nested != null)
                {
                    //		if(nested is IView)
                    //			SetDefaultConverter(member, "Value", new ViewConverter(), bindings);

                    var newRoot = CreateGenericRoot(memberType, null, nested);
                    newRoot.Caption            = caption;
                    ((IRoot)newRoot).CellStyle = GetCellStyle(member, UITableViewCellStyle.Default);

                    //	Populate(nested, (IRoot)newRoot);
                    element = newRoot;
                }
            }

            if (orderAttribute != null)
            {
                element.Order = orderAttribute.Order;
            }

            var bindable = element as IBindable;

            if (bindable != null && bindings.Count != 0)             //&& !(bindable is IRoot)
            {
                foreach (Binding binding in bindings)
                {
                    if (binding.TargetPath == null)
                    {
                        binding.TargetPath = "Value";
                    }

                    BindingOperations.SetBinding(bindable, binding.TargetPath, binding);
                }
            }

            return(element);
        }
Example #34
0
 public DialogViewController(RootElement root) : base(UITableViewStyle.Grouped)
 {
     this.root = root;
 }
Example #35
0
 /// <summary>
 ///     Creates a new DialogViewController from a RootElement and sets the push status
 /// </summary>
 /// <param name="root">
 /// The <see cref="RootElement"/> containing the information to render.
 /// </param>
 /// <param name="pushing">
 /// A <see cref="System.Boolean"/> describing whether this is being pushed
 /// (NavigationControllers) or not.   If pushing is true, then the back button
 /// will be shown, allowing the user to go back to the previous controller
 /// </param>
 public DialogViewController(RootElement root, bool pushing) : base(UITableViewStyle.Grouped)
 {
     this.pushing = pushing;
     PrepareRoot(root);
 }
Example #36
0
 public JsonDialogViewController(RootElement root) : base(root)
 {
     Loading(false);
 }
 public DialogViewController(IntPtr handle) : base(handle)
 {
     this.root = new RootElement("");
 }
Example #38
0
 public DialogViewController(UITableViewStyle style, RootElement root, bool pushing) : base(style)
 {
     this.pushing = pushing;
     Style        = style;
     PrepareRoot(root);
 }
 /// <summary>
 ///     Creates a new DialogViewController from a RootElement and sets the push status
 /// </summary>
 /// <param name="root">
 /// The <see cref="RootElement"/> containing the information to render.
 /// </param>
 /// <param name="pushing">
 /// A <see cref="System.Boolean"/> describing whether this is being pushed
 /// (NavigationControllers) or not.   If pushing is true, then the back button
 /// will be shown, allowing the user to go back to the previous controller
 /// </param>
 public DialogViewController(RootElement root, bool pushing) : base(UITableViewStyle.Grouped)
 {
     this.pushing = pushing;
     this.root    = root;
 }
Example #40
0
 public DialogViewController(RootElement root) : base(UITableViewStyle.Grouped)
 {
     pushing = true;
     PrepareRoot(root);
 }
        void Populate(object callbacks, object o, RootElement root)
        {
            MemberInfo last_radio_index = null;
            var        members          = o.GetType().GetMembers(BindingFlags.DeclaredOnly | BindingFlags.Public |
                                                                 BindingFlags.NonPublic | BindingFlags.Instance);

            Section section = null;

            foreach (var mi in members)
            {
                Type mType = GetTypeForMember(mi);

                if (mType == null)
                {
                    continue;
                }

                string    caption = null;
                object [] attrs   = mi.GetCustomAttributes(false);
                bool      skip    = false;
                foreach (var attr in attrs)
                {
                    if (attr is SkipAttribute || attr is System.Runtime.CompilerServices.CompilerGeneratedAttribute)
                    {
                        skip = true;
                    }
                    else if (attr is CaptionAttribute)
                    {
                        caption = ((CaptionAttribute)attr).Caption;
                    }
                    else if (attr is SectionAttribute)
                    {
                        if (section != null)
                        {
                            root.Add(section);
                        }
                        var sa = attr as SectionAttribute;
                        section = new Section(sa.Caption, sa.Footer);
                    }
                }
                if (skip)
                {
                    continue;
                }

                if (caption == null)
                {
                    caption = MakeCaption(mi.Name);
                }

                if (section == null)
                {
                    section = new Section();
                }

                Element element = null;
                if (mType == typeof(string))
                {
                    PasswordAttribute  pa     = null;
                    AlignmentAttribute align  = null;
                    EntryAttribute     ea     = null;
                    object             html   = null;
                    Action             invoke = null;
                    bool multi = false;

                    foreach (object attr in attrs)
                    {
                        if (attr is PasswordAttribute)
                        {
                            pa = attr as PasswordAttribute;
                        }
                        else if (attr is EntryAttribute)
                        {
                            ea = attr as EntryAttribute;
                        }
                        else if (attr is MultilineAttribute)
                        {
                            multi = true;
                        }
                        else if (attr is HtmlAttribute)
                        {
                            html = attr;
                        }
                        else if (attr is AlignmentAttribute)
                        {
                            align = attr as AlignmentAttribute;
                        }

                        if (attr is OnTapAttribute)
                        {
                            string mname = ((OnTapAttribute)attr).Method;

                            if (callbacks == null)
                            {
                                throw new Exception("Your class contains [OnTap] attributes, but you passed a null object for `context' in the constructor");
                            }

                            var method = callbacks.GetType().GetMethod(mname);
                            if (method == null)
                            {
                                throw new Exception("Did not find method " + mname);
                            }
                            invoke = delegate {
                                method.Invoke(method.IsStatic ? null : callbacks, new object [0]);
                            };
                        }
                    }

                    string value = (string)GetValue(mi, o);
                    if (pa != null)
                    {
                        element = new EntryElement(caption, pa.Placeholder, value, true);
                    }
                    else if (ea != null)
                    {
                        element = new EntryElement(caption, ea.Placeholder, value)
                        {
                            KeyboardType = ea.KeyboardType, AutocapitalizationType = ea.AutocapitalizationType, AutocorrectionType = ea.AutocorrectionType, ClearButtonMode = ea.ClearButtonMode
                        }
                    }
                    ;
                    else if (multi)
                    {
                        element = new MultilineElement(caption, value);
                    }
                    else if (html != null)
                    {
                        element = new HtmlElement(caption, value);
                    }
                    else
                    {
                        var selement = new StringElement(caption, value);
                        element = selement;

                        if (align != null)
                        {
                            selement.Alignment = align.Alignment;
                        }
                    }

                    if (invoke != null)
                    {
                        ((StringElement)element).Tapped += invoke;
                    }
                }
                else if (mType == typeof(float))
                {
                    var floatElement = new FloatElement(null, null, (float)GetValue(mi, o));
                    floatElement.Caption = caption;
                    element = floatElement;

                    foreach (object attr in attrs)
                    {
                        if (attr is RangeAttribute)
                        {
                            var ra = attr as RangeAttribute;
                            floatElement.MinValue    = ra.Low;
                            floatElement.MaxValue    = ra.High;
                            floatElement.ShowCaption = ra.ShowCaption;
                        }
                    }
                }
                else if (mType == typeof(bool))
                {
                    bool checkbox = false;
                    foreach (object attr in attrs)
                    {
                        if (attr is CheckboxAttribute)
                        {
                            checkbox = true;
                        }
                    }

                    if (checkbox)
                    {
                        element = new CheckboxElement(caption, (bool)GetValue(mi, o));
                    }
                    else
                    {
                        element = new BooleanElement(caption, (bool)GetValue(mi, o));
                    }
                }
                else if (mType == typeof(DateTime))
                {
                    var  dateTime = (DateTime)GetValue(mi, o);
                    bool asDate = false, asTime = false;

                    foreach (object attr in attrs)
                    {
                        if (attr is DateAttribute)
                        {
                            asDate = true;
                        }
                        else if (attr is TimeAttribute)
                        {
                            asTime = true;
                        }
                    }

                    if (asDate)
                    {
                        element = new DateElement(caption, dateTime);
                    }
                    else if (asTime)
                    {
                        element = new TimeElement(caption, dateTime);
                    }
                    else
                    {
                        element = new DateTimeElement(caption, dateTime);
                    }
                }
                else if (mType.IsEnum)
                {
                    var   csection = new Section();
                    ulong evalue   = Convert.ToUInt64(GetValue(mi, o), null);
                    int   idx      = 0;
                    int   selected = 0;

                    foreach (var fi in mType.GetFields(BindingFlags.Public | BindingFlags.Static))
                    {
                        ulong v = Convert.ToUInt64(GetValue(fi, null));

                        if (v == evalue)
                        {
                            selected = idx;
                        }

                        CaptionAttribute ca = Attribute.GetCustomAttribute(fi, typeof(CaptionAttribute)) as CaptionAttribute;
                        csection.Add(new RadioElement(ca != null ? ca.Caption : MakeCaption(fi.Name)));
                        idx++;
                    }

                    element = new RootElement(caption, new RadioGroup(null, selected))
                    {
                        csection
                    };
                }
                else if (mType == typeof(UIImage))
                {
                    element = new ImageElement((UIImage)GetValue(mi, o));
                }
                else if (typeof(System.Collections.IEnumerable).IsAssignableFrom(mType))
                {
                    var csection = new Section();
                    int count    = 0;

                    if (last_radio_index == null)
                    {
                        throw new Exception("IEnumerable found, but no previous int found");
                    }
                    foreach (var e in (IEnumerable)GetValue(mi, o))
                    {
                        csection.Add(new RadioElement(e.ToString()));
                        count++;
                    }
                    int selected = (int)GetValue(last_radio_index, o);
                    if (selected >= count || selected < 0)
                    {
                        selected = 0;
                    }
                    element = new RootElement(caption, new MemberRadioGroup(null, selected, last_radio_index))
                    {
                        csection
                    };
                    last_radio_index = null;
                }
                else if (typeof(int) == mType)
                {
                    foreach (object attr in attrs)
                    {
                        if (attr is RadioSelectionAttribute)
                        {
                            last_radio_index = mi;
                            break;
                        }
                    }
                }
                else
                {
                    var nested = GetValue(mi, o);
                    if (nested != null)
                    {
                        var newRoot = new RootElement(caption);
                        Populate(callbacks, nested, newRoot);
                        element = newRoot;
                    }
                }

                if (element == null)
                {
                    continue;
                }
                section.Add(element);
                mappings [element] = new MemberAndInstance(mi, o);
            }
            root.Add(section);
        }
 public DialogViewController(UITableViewStyle style, RootElement root, bool pushing) : base(style)
 {
     Style        = style;
     this.pushing = pushing;
     this.root    = root;
 }
 public DialogViewController(UITableViewStyle style, RootElement root) : base(style)
 {
     PrepareRoot(root);
 }
 public DialogViewController(UITableViewStyle style, RootElement root) : base(style)
 {
     Style     = style;
     this.root = root;
 }