Exemple #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            settings = new Settings ();

            dataSource = new TKDataFormEntityDataSource ();
            dataSource.SelectedObject = settings;
            dataSource.AllowPropertySorting = true;

            dataSource.EntityModel.PropertyWithName ("Title").PropertyIndex = 0;
            dataSource.EntityModel.PropertyWithName ("Message").PropertyIndex = 1;
            dataSource.EntityModel.PropertyWithName ("AllowParallaxEffect").PropertyIndex = 2;
            dataSource.EntityModel.PropertyWithName ("BackgroundStyle").PropertyIndex = 3;
            dataSource.EntityModel.PropertyWithName ("ActionsLayout").PropertyIndex = 4;
            dataSource.EntityModel.PropertyWithName ("DismissMode").PropertyIndex = 5;
            dataSource.EntityModel.PropertyWithName ("DismissDirection").PropertyIndex = 6;
            dataSource.EntityModel.PropertyWithName ("AnimationDuration").PropertyIndex = 7;
            dataSource.EntityModel.PropertyWithName ("BackgroundDim").PropertyIndex = 8;

            dataForm = new TKDataForm ();
            dataForm.Frame = this.ExampleBounds;
            dataForm.Delegate = new DataFormDelegate ();
            this.View.AddSubview (dataForm);

            dataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormSegmentedEditor)), dataSource.EntityModel.PropertyWithName ("ActionsLayout"));
            dataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormSegmentedEditor)), dataSource.EntityModel.PropertyWithName ("BackgroundStyle"));
            dataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormSegmentedEditor)), dataSource.EntityModel.PropertyWithName ("DismissMode"));
            dataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormSegmentedEditor)), dataSource.EntityModel.PropertyWithName ("DismissDirection"));
            dataForm.CommitMode = TKDataFormCommitMode.Delayed;
            dataForm.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;
            dataForm.DataSource = dataSource;

            this.View.BackgroundColor = new UIColor(0.937f, 0.937f, 0.957f, 1.00f);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            dataSource = new TKDataFormEntityDataSource();
            dataSource.AllowPropertySorting = true;

            this.dataSource.SelectedObject = new CardInfo ();

            TKDataFormEntityProperty property = this.dataSource.EntityModel.PropertyWithName ("Edit");
            property.GroupKey = " ";
            property.DisplayName = "Allow Edit";

            dataSource.EntityModel.PropertyWithName ("FirstName").PropertyIndex = 0;
            dataSource.EntityModel.PropertyWithName ("LastName").PropertyIndex = 1;
            dataSource.EntityModel.PropertyWithName ("CardNumber").PropertyIndex = 2;
            dataSource.EntityModel.PropertyWithName ("ZipCode").PropertyIndex = 3;
            dataSource.EntityModel.PropertyWithName ("ExpirationDate").PropertyIndex = 4;

            foreach (TKDataFormEntityProperty p in this.dataSource.EntityModel.Properties) {
                p.Readonly = p.Name != "Edit";
            }

            ReadOnlyDataFormDelegate currentDelegate = new ReadOnlyDataFormDelegate (this.dataSource);

            TKDataForm form = new TKDataForm(this.View.Bounds);
            form.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            form.Delegate = currentDelegate;
            form.DataSource = this.dataSource;
            form.RegisterEditor(new Class(typeof (TKDataFormDatePickerEditor)), this.dataSource.EntityModel.PropertyWithName("ExpirationDate"));
            this.View.AddSubview(form);
        }
Exemple #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            dataSource = new TKDataFormEntityDataSource();
            dataSource.AllowPropertySorting = true;

            this.dataSource.SelectedObject = new CardInfo();

            TKDataFormEntityProperty property = this.dataSource.EntityModel.PropertyWithName("Edit");

            property.GroupKey    = " ";
            property.DisplayName = "Allow Edit";

            dataSource.EntityModel.PropertyWithName("FirstName").PropertyIndex      = 0;
            dataSource.EntityModel.PropertyWithName("LastName").PropertyIndex       = 1;
            dataSource.EntityModel.PropertyWithName("CardNumber").PropertyIndex     = 2;
            dataSource.EntityModel.PropertyWithName("ZipCode").PropertyIndex        = 3;
            dataSource.EntityModel.PropertyWithName("ExpirationDate").PropertyIndex = 4;

            foreach (TKDataFormEntityProperty p in this.dataSource.EntityModel.Properties)
            {
                p.Readonly = p.Name != "Edit";
            }

            ReadOnlyDataFormDelegate currentDelegate = new ReadOnlyDataFormDelegate(this.dataSource);

            TKDataForm form = new TKDataForm(this.View.Bounds);

            form.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            form.Delegate         = currentDelegate;
            form.DataSource       = this.dataSource;
            form.RegisterEditor(new Class(typeof(TKDataFormDatePickerEditor)), this.dataSource.EntityModel.PropertyWithName("ExpirationDate"));
            this.View.AddSubview(form);
        }
Exemple #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            settings = new Settings();

            dataSource = new TKDataFormEntityDataSource();
            dataSource.SelectedObject       = settings;
            dataSource.AllowPropertySorting = true;

            dataSource.EntityModel.PropertyWithName("Title").PropertyIndex               = 0;
            dataSource.EntityModel.PropertyWithName("Message").PropertyIndex             = 1;
            dataSource.EntityModel.PropertyWithName("AllowParallaxEffect").PropertyIndex = 2;
            dataSource.EntityModel.PropertyWithName("BackgroundStyle").PropertyIndex     = 3;
            dataSource.EntityModel.PropertyWithName("ActionsLayout").PropertyIndex       = 4;
            dataSource.EntityModel.PropertyWithName("DismissMode").PropertyIndex         = 5;
            dataSource.EntityModel.PropertyWithName("DismissDirection").PropertyIndex    = 6;
            dataSource.EntityModel.PropertyWithName("AnimationDuration").PropertyIndex   = 7;
            dataSource.EntityModel.PropertyWithName("BackgroundDim").PropertyIndex       = 8;

            dataForm          = new TKDataForm();
            dataForm.Frame    = this.ExampleBounds;
            dataForm.Delegate = new DataFormDelegate();
            this.View.AddSubview(dataForm);

            dataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormSegmentedEditor)), dataSource.EntityModel.PropertyWithName("ActionsLayout"));
            dataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormSegmentedEditor)), dataSource.EntityModel.PropertyWithName("BackgroundStyle"));
            dataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormSegmentedEditor)), dataSource.EntityModel.PropertyWithName("DismissMode"));
            dataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormSegmentedEditor)), dataSource.EntityModel.PropertyWithName("DismissDirection"));
            dataForm.CommitMode       = TKDataFormCommitMode.Delayed;
            dataForm.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;
            dataForm.DataSource       = dataSource;

            this.View.BackgroundColor = new UIColor(0.937f, 0.937f, 0.957f, 1.00f);
        }
Exemple #5
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.dataSource = new TKDataFormEntityDataSource();
            this.dataSource.SelectedObject       = new PersonalInfo();
            this.dataSource.AllowPropertySorting = true;

            dataSource.EntityModel.PropertyWithName("InfoProtocol").GroupKey = " ";

            dataSource.EntityModel.PropertyWithName("Server").PropertyIndex          = 0;
            dataSource.EntityModel.PropertyWithName("Details").PropertyIndex         = 2;
            dataSource.EntityModel.PropertyWithName("Account").PropertyIndex         = 3;
            dataSource.EntityModel.PropertyWithName("Secure").PropertyIndex          = 4;
            dataSource.EntityModel.PropertyWithName("Password").PropertyIndex        = 5;
            dataSource.EntityModel.PropertyWithName("EncryptionLevel").PropertyIndex = 6;
            dataSource.EntityModel.PropertyWithName("SendAllTraffic").PropertyIndex  = 7;

            GettingStartedDataFormDelegate currentDelegate = new GettingStartedDataFormDelegate();

            this.DataForm.Delegate   = currentDelegate;
            this.DataForm.DataSource = this.dataSource;
            this.DataForm.RegisterEditor(new Class(typeof(TKDataFormSegmentedEditor)), this.dataSource.EntityModel.PropertyWithName("InfoProtocol"));
            this.DataForm.RegisterEditor(new Class(typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName("EncryptionLevel"));
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.dataSource = new TKDataFormEntityDataSource();
            this.dataSource.AllowPropertySorting = true;
            this.dataSource.SelectedObject       = new ReservationForm();
            this.dataSource.EntityModel.PropertyWithName("Name").Image   = new UIImage("guest-name.png");
            this.dataSource.EntityModel.PropertyWithName("Phone").Image  = new UIImage("phone.png");
            this.dataSource.EntityModel.PropertyWithName("Date").Image   = new UIImage("calendar.png");
            this.dataSource.EntityModel.PropertyWithName("Time").Image   = new UIImage("time.png");
            this.dataSource.EntityModel.PropertyWithName("Guests").Image = new UIImage("guest-number.png");
            this.dataSource.EntityModel.PropertyWithName("Table").Image  = new UIImage("table-number.png");

            dataSource.EntityModel.PropertyWithName("Name").PropertyIndex              = 0;
            dataSource.EntityModel.PropertyWithName("Phone").PropertyIndex             = 1;
            dataSource.EntityModel.PropertyWithName("Date").PropertyIndex              = 2;
            dataSource.EntityModel.PropertyWithName("Time").PropertyIndex              = 3;
            dataSource.EntityModel.PropertyWithName("Guests").PropertyIndex            = 4;
            dataSource.EntityModel.PropertyWithName("Section").PropertyIndex           = 5;
            dataSource.EntityModel.PropertyWithName("Origin").PropertyIndex            = 6;
            dataSource.EntityModel.PropertyWithName("CancelReservation").PropertyIndex = 7;

            foreach (TKDataFormEntityProperty property in this.dataSource.EntityModel.Properties)
            {
                if (property.Name == "Section" || property.Name == "Table")
                {
                    property.GroupKey = @"TABLE DETAILS";
                }
                else if (property.Name == "Origin" || property.Name == "CancelReservation")
                {
                    property.GroupKey = @"ORIGIN";
                }
                else
                {
                    property.GroupKey = @"RESERVATION DETAILS";
                }
            }

            this.DataForm.BackgroundColor = UIColor.FromPatternImage(new UIImage("wood-pattern.png"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(CallEditor)), this.dataSource.EntityModel.PropertyWithName("Phone"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(CallEditor)), this.dataSource.EntityModel.PropertyWithName("CancelReservation"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName("Section"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName("Table"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormSegmentedEditor)), this.dataSource.EntityModel.PropertyWithName("Origin"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormDatePickerEditor)), this.dataSource.EntityModel.PropertyWithName("Date"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormDatePickerEditor)), this.dataSource.EntityModel.PropertyWithName("Time"));

            CustomizationDataFormDelegate currentDelegate = new CustomizationDataFormDelegate();

            this.DataForm.Delegate   = currentDelegate;
            this.DataForm.DataSource = dataSource;
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.dataSource = new TKDataFormEntityDataSource();
            this.dataSource.SelectedObject       = new RegistrationInfo();
            this.dataSource.AllowPropertySorting = true;


            TKDataFormEntityProperty emailProperty = this.dataSource.EntityModel.PropertyWithName("Email");

            emailProperty.Validators    = new NSObject[] { new EmailValidator() };
            emailProperty.GroupKey      = "Account";
            emailProperty.Validators    = new NSObject[] { new EmailValidator() };
            emailProperty.PropertyIndex = 0;

            TKDataFormEntityProperty password = this.dataSource.EntityModel.PropertyWithName("Password");

            password.Validators    = new NSObject[] { new PasswordValidator() };
            password.GroupKey      = "Account";
            password.Validators    = new NSObject[] { new PasswordValidator() };
            password.PropertyIndex = 1;

            dataSource.EntityModel.PropertyWithName("RepeatPassword").GroupKey      = "Account";
            dataSource.EntityModel.PropertyWithName("RepeatPassword").PropertyIndex = 2;

            dataSource.EntityModel.PropertyWithName("RememberMe").GroupKey      = "Account";
            dataSource.EntityModel.PropertyWithName("RememberMe").PropertyIndex = 3;

            dataSource.EntityModel.PropertyWithName("Name").GroupKey      = "Details";
            dataSource.EntityModel.PropertyWithName("Name").PropertyIndex = 0;

            dataSource.EntityModel.PropertyWithName("DateOfBirth").GroupKey      = "Details";
            dataSource.EntityModel.PropertyWithName("DateOfBirth").PropertyIndex = 1;

            dataSource.EntityModel.PropertyWithName("Gender").GroupKey      = "Details";
            dataSource.EntityModel.PropertyWithName("Gender").PropertyIndex = 2;

            dataSource.EntityModel.PropertyWithName("Country").GroupKey      = "Details";
            dataSource.EntityModel.PropertyWithName("Country").PropertyIndex = 3;

            ValidationDataFormDelegate validationDelegate = new ValidationDataFormDelegate(this.dataSource);

            this.DataForm.Delegate   = validationDelegate;
            this.DataForm.DataSource = dataSource;

            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName("Gender"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName("Country"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof(TKDataFormDatePickerEditor)), this.dataSource.EntityModel.PropertyWithName("DateOfBirth"));
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            this.dataSource = new TKDataFormEntityDataSource ();
            this.dataSource.SelectedObject = new RegistrationInfo ();
            this.dataSource.AllowPropertySorting = true;

            TKDataFormEntityProperty emailProperty = this.dataSource.EntityModel.PropertyWithName("Email");
            emailProperty.Validators = new NSObject[] { new EmailValidator() };
            emailProperty.GroupKey = "Account";
            emailProperty.Validators = new NSObject[] { new EmailValidator () };
            emailProperty.PropertyIndex = 0;

            TKDataFormEntityProperty password = this.dataSource.EntityModel.PropertyWithName("Password");
            password.Validators = new NSObject[] { new PasswordValidator() };
            password.GroupKey = "Account";
            password.Validators = new NSObject[] { new PasswordValidator () };
            password.PropertyIndex = 1;

            dataSource.EntityModel.PropertyWithName("RepeatPassword").GroupKey = "Account";
            dataSource.EntityModel.PropertyWithName("RepeatPassword").PropertyIndex = 2;

            dataSource.EntityModel.PropertyWithName("RememberMe").GroupKey = "Account";
            dataSource.EntityModel.PropertyWithName("RememberMe").PropertyIndex = 3;

            dataSource.EntityModel.PropertyWithName("Name").GroupKey = "Details";
            dataSource.EntityModel.PropertyWithName("Name").PropertyIndex = 0;

            dataSource.EntityModel.PropertyWithName("DateOfBirth").GroupKey = "Details";
            dataSource.EntityModel.PropertyWithName("DateOfBirth").PropertyIndex = 1;

            dataSource.EntityModel.PropertyWithName("Gender").GroupKey = "Details";
            dataSource.EntityModel.PropertyWithName("Gender").PropertyIndex = 2;

            dataSource.EntityModel.PropertyWithName("Country").GroupKey = "Details";
            dataSource.EntityModel.PropertyWithName("Country").PropertyIndex = 3;

            ValidationDataFormDelegate validationDelegate = new ValidationDataFormDelegate (this.dataSource);
            this.DataForm.Delegate = validationDelegate;
            this.DataForm.DataSource = dataSource;

            this.DataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName ("Gender"));
            this.DataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName ("Country"));
            this.DataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormDatePickerEditor)), this.dataSource.EntityModel.PropertyWithName ("DateOfBirth"));
        }
Exemple #9
0
		public override void ViewDidLoad()
		{
			base.ViewDidLoad ();

			dataSource = new TKDataFormEntityDataSource ();
			dataSource.SelectedObject = new TodoDataInfo ();
			dataSource.AllowPropertySorting = true;

			dataSource.EntityModel.PropertyWithName ("Title").PropertyIndex = 1;
			dataSource.EntityModel.PropertyWithName ("Content").PropertyIndex = 2;
			dataSource.EntityModel.PropertyWithName ("Submit").PropertyIndex = 3;

			this.DataForm.RegisterEditor (new Class (typeof(ActionEditor)), this.dataSource.EntityModel.PropertyWithName ("Submit"));

			var currentDelegate = new TodoDataEntryFormDelegate ();

			this.DataForm.Delegate = currentDelegate;
			this.DataForm.DataSource = dataSource;

			this.DataForm.CommitMode = TKDataFormCommitMode.Immediate;

			this.Title = "Add Entry";
		}
Exemple #10
0
		public override void ViewDidLoad()
		{
			base.ViewDidLoad ();

			this.dataSource = new TKDataFormEntityDataSource ();
			this.dataSource.SelectedObject = new LoginDetails();
			this.dataSource.AllowPropertySorting = true;

			dataSource.EntityModel.PropertyWithName ("Mode").GroupKey = " ";
			dataSource.EntityModel.PropertyWithName ("Mode").PropertyIndex = 0;

			dataSource.EntityModel.PropertyWithName ("Username").GroupKey = "Login";
			dataSource.EntityModel.PropertyWithName ("Password").GroupKey = "Login";

			dataSource.EntityModel.PropertyWithName ("Username").PropertyIndex = 1;
			dataSource.EntityModel.PropertyWithName ("Password").PropertyIndex = 2;

			dataSource.EntityModel.PropertyWithName ("Verify").GroupKey = "Register";
			dataSource.EntityModel.PropertyWithName ("Question").GroupKey = "Register";
			dataSource.EntityModel.PropertyWithName ("Answer").GroupKey = "Register";

			dataSource.EntityModel.PropertyWithName ("Verify").PropertyIndex = 4;
			dataSource.EntityModel.PropertyWithName ("Question").PropertyIndex = 5;
			dataSource.EntityModel.PropertyWithName ("Answer").PropertyIndex = 6;

			dataSource.EntityModel.PropertyWithName ("Submit").PropertyIndex = 7;

			this.DataForm.RegisterEditor (new Class (typeof(ActionEditor)), this.dataSource.EntityModel.PropertyWithName ("Submit"));
			this.DataForm.RegisterEditor (new Class (typeof(TKDataFormSegmentedEditor)), this.dataSource.EntityModel.PropertyWithName ("Mode"));

			var currentDelegate = new LoginViewDelegate ();
			this.DataForm.Delegate = currentDelegate;
			this.DataForm.DataSource = this.dataSource;
			this.DataForm.CommitMode = TKDataFormCommitMode.Immediate;

			this.Title = "Login";
		}
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            this.dataSource = new TKDataFormEntityDataSource ();
            this.dataSource.SelectedObject = new PersonalInfo ();
            this.dataSource.AllowPropertySorting = true;

            dataSource.EntityModel.PropertyWithName("InfoProtocol").GroupKey = " ";

            dataSource.EntityModel.PropertyWithName ("Server").PropertyIndex = 0;
            dataSource.EntityModel.PropertyWithName ("Details").PropertyIndex = 2;
            dataSource.EntityModel.PropertyWithName ("Account").PropertyIndex = 3;
            dataSource.EntityModel.PropertyWithName ("Secure").PropertyIndex = 4;
            dataSource.EntityModel.PropertyWithName ("Password").PropertyIndex = 5;
            dataSource.EntityModel.PropertyWithName ("EncryptionLevel").PropertyIndex = 6;
            dataSource.EntityModel.PropertyWithName ("SendAllTraffic").PropertyIndex = 7;

            GettingStartedDataFormDelegate currentDelegate = new GettingStartedDataFormDelegate ();
            this.DataForm.Delegate = currentDelegate;
            this.DataForm.DataSource = this.dataSource;
            this.DataForm.RegisterEditor(new Class(typeof (TKDataFormSegmentedEditor)), this.dataSource.EntityModel.PropertyWithName("InfoProtocol"));
            this.DataForm.RegisterEditor (new Class (typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName("EncryptionLevel"));
        }
Exemple #12
0
 public ReadOnlyDataFormDelegate(TKDataFormEntityDataSource dataSource)
 {
     this.dataSource = dataSource;
 }
 public ValidationDataFormDelegate(TKDataFormEntityDataSource dataSource)
 {
     this.dataSource = dataSource;
 }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            this.dataSource = new TKDataFormEntityDataSource ();
            this.dataSource.AllowPropertySorting = true;
            this.dataSource.SelectedObject = new ReservationForm ();
            this.dataSource.EntityModel.PropertyWithName ("Name").Image = new UIImage ("guest-name.png");
            this.dataSource.EntityModel.PropertyWithName ("Phone").Image = new UIImage ("phone.png");
            this.dataSource.EntityModel.PropertyWithName ("Date").Image = new UIImage ("calendar.png");
            this.dataSource.EntityModel.PropertyWithName ("Time").Image = new UIImage ("time.png");
            this.dataSource.EntityModel.PropertyWithName ("Guests").Image = new UIImage ("guest-number.png");
            this.dataSource.EntityModel.PropertyWithName ("Table").Image = new UIImage ("table-number.png");

            dataSource.EntityModel.PropertyWithName ("Name").PropertyIndex = 0;
            dataSource.EntityModel.PropertyWithName ("Phone").PropertyIndex = 1;
            dataSource.EntityModel.PropertyWithName ("Date").PropertyIndex = 2;
            dataSource.EntityModel.PropertyWithName ("Time").PropertyIndex = 3;
            dataSource.EntityModel.PropertyWithName ("Guests").PropertyIndex = 4;
            dataSource.EntityModel.PropertyWithName ("Section").PropertyIndex = 5;
            dataSource.EntityModel.PropertyWithName ("Origin").PropertyIndex = 6;
            dataSource.EntityModel.PropertyWithName ("CancelReservation").PropertyIndex = 7;

            foreach (TKDataFormEntityProperty property in this.dataSource.EntityModel.Properties) {
                if (property.Name == "Section" || property.Name == "Table") {
                    property.GroupKey = @"TABLE DETAILS";
                }
                else if (property.Name == "Origin" || property.Name == "CancelReservation") {
                    property.GroupKey = @"ORIGIN";
                }
                else {
                    property.GroupKey = @"RESERVATION DETAILS";
                }
            }

            this.DataForm.BackgroundColor = UIColor.FromPatternImage (new UIImage ("wood-pattern.png"));
            this.DataForm.RegisterEditor (new ObjCRuntime.Class (typeof(CallEditor)), this.dataSource.EntityModel.PropertyWithName ("Phone"));
            this.DataForm.RegisterEditor (new ObjCRuntime.Class (typeof(CallEditor)), this.dataSource.EntityModel.PropertyWithName ("CancelReservation"));
            this.DataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName ("Section"));
            this.DataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormOptionsEditor)), this.dataSource.EntityModel.PropertyWithName ("Table"));
            this.DataForm.RegisterEditor (new ObjCRuntime.Class (typeof(TKDataFormSegmentedEditor)), this.dataSource.EntityModel.PropertyWithName ("Origin"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof (TKDataFormDatePickerEditor)), this.dataSource.EntityModel.PropertyWithName("Date"));
            this.DataForm.RegisterEditor(new ObjCRuntime.Class(typeof (TKDataFormDatePickerEditor)), this.dataSource.EntityModel.PropertyWithName("Time"));

            CustomizationDataFormDelegate currentDelegate = new CustomizationDataFormDelegate ();
            this.DataForm.Delegate = currentDelegate;
            this.DataForm.DataSource = dataSource;
        }
Exemple #15
0
 public ReadOnlyDataFormDelegate(TKDataFormEntityDataSource dataSource)
 {
     this.dataSource = dataSource;
 }
 public ValidationDataFormDelegate(TKDataFormEntityDataSource dataSource)
 {
     this.dataSource = dataSource;
 }