<commit_before>//
// Sample showing the core Element-based API to create a dialog
//
using System;
using System.Linq;
using MonoTouch.Dialog;
using MonoTouch.UIKit;

namespace Sample
{
	public partial class AppDelegate 
	{		
		public void DemoElementApi ()
		{
			var root = CreateRoot ();
				
			var dv = new DialogViewController (root, true);
			navigation.PushViewController (dv, true);				
		}

		RootElement CreateRoot ()
		{
			return new RootElement ("Settings") {
				new Section (){
					new BooleanElement ("Airplane Mode", false),
					new RootElement ("Notifications", 0, 0) {
						new Section (null, "Turn off Notifications to disable Sounds\n" +
							     "Alerts and Home Screen Badges for the\napplications below."){
							new BooleanElement ("Notifications", false)
						}
					}},
				new Section (){
					CreateSoundSection (),
					new RootElement ("Brightness"){
						new Section (){
							new FloatElement (null, null, 0.5f),
							new BooleanElement ("Auto-brightness", false),
						}
					},
					new RootElement ("Wallpaper"){
						new Section (){
							new ImageElement (null),
							new ImageElement (null),
							new ImageElement (null)
						}
					}
				},
				new Section () {
					new EntryElement ("Login", "Your login name", "miguel"),
					new EntryElement ("Password", "<PASSWORD>", "password", true),
					new DateElement ("Select Date", DateTime.Now),
					new TimeElement ("Select Time", DateTime.Now),
				},
				new Section () {
					CreateGeneralSection (),		
					//new RootElement ("Mail, Contacts, Calendars"),
					//new RootElement ("Phone"),
					//new RootElement ("Safari"),
					//new RootElement ("Messages"),
					//new RootElement ("iPod"),
					//new RootElement ("Photos"),
					//new RootElement ("Store"), <commit_msg>Adding use of EntryElement EnablesReturnKeyAutomatically to Sample<commit_after>//
// Sample showing the core Element-based API to create a dialog
//
using System;
using System.Linq;
using MonoTouch.Dialog;
using MonoTouch.UIKit;

namespace Sample
{
	public partial class AppDelegate 
	{		
		public void DemoElementApi ()
		{
			var root = CreateRoot ();
				
			var dv = new DialogViewController (root, true);
			navigation.PushViewController (dv, true);				
		}

		RootElement CreateRoot ()
		{
			return new RootElement ("Settings") {
				new Section (){
					new BooleanElement ("Airplane Mode", false),
					new RootElement ("Notifications", 0, 0) {
						new Section (null, "Turn off Notifications to disable Sounds\n" +
							     "Alerts and Home Screen Badges for the\napplications below."){
							new BooleanElement ("Notifications", false)
						}
					}},
				new Section (){
					CreateSoundSection (),
					new RootElement ("Brightness"){
						new Section (){
							new FloatElement (null, null, 0.5f),
							new BooleanElement ("Auto-brightness", false),
						}
					},
					new RootElement ("Wallpaper"){
						new Section (){
							new ImageElement (null),
							new ImageElement (null),
							new ImageElement (null)
						}
					}
				},
				new Section () {
					new EntryElement ("Login", "Your login name", null)
					{
						EnablesReturnKeyAutomatically = true,
					},
					new EntryElement ("Password", "<PASSWORD>", null, true)
					{
						EnablesReturnKeyAutomatically = true,
					},
					new DateElement ("Select Date", DateTime.Now),
					new TimeElement ("Select Time", DateTime.Now),
				},
				new Section () {
					CreateGeneralSection (),		
					//new RootElement ("Mail, Contacts, Calendars"),
					//new RootElement ("Phone"),
					//new RootElement ("Safari"),
					//new RootElement ("Messages"),
					//new RootElement ("iPod"),
					//new RootElement ("Photos"),
					//new RootElement ("Store"), 
{'fraction_non_alphanumeric': 0.1257020593741642, 'fraction_numerical': 0.0021396095212623694, 'mean_word_length': 2.7066402378592667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4192651', 'n_tokens_mistral': 1461, 'n_tokens_neox': 1023, 'n_words': 332}