Beispiel #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);
        }
Beispiel #2
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);
        }
Beispiel #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);
        }
Beispiel #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);
        }