public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.personalInfo     = new PersonalInfo();
            this.dataSource       = new TKDataFormEntityDataSourceHelper(this.personalInfo);
            this.dataFormDelegate = new GettingStartedDataFormDelegate();

            this.dataSource["Password"].HintText              = "Ask every time";
            this.dataSource ["Password"].EditorClass          = new Class(typeof(TKDataFormPasswordEditor));
            this.dataSource["InfoProtocol"].ValuesProvider    = NSArray.FromStrings(new string[] { "L2TP", "PPTP", "IPSec" });
            this.dataSource["EncryptionLevel"].ValuesProvider = NSArray.FromStrings(new string[] { "FIPS Compliant", "High", "Client Compatible", "Low" });

            this.dataSource.AddGroup(" ", new string[] { "InfoProtocol" });
            this.dataSource.AddGroup(" ", new string[] {
                "Details",
                "Server",
                "Account",
                "Secure",
                "Password",
                "EncryptionLevel",
                "SendAllTraffic"
            });

            this.DataForm.BackgroundColor = new UIColor(0.937f, 0.937f, 0.960f, 1.0f);
            this.DataForm.GroupSpacing    = 20;
            this.DataForm.Delegate        = this.dataFormDelegate;
            this.DataForm.WeakDataSource  = this.dataSource.NativeObject;
        }
		public override void ViewDidLoad()
		{
			base.ViewDidLoad ();
		
			this.personalInfo = new PersonalInfo ();
			this.dataSource = new TKDataFormEntityDataSourceHelper (this.personalInfo);
			this.dataFormDelegate = new GettingStartedDataFormDelegate ();

			this.dataSource["Password"].HintText = "Ask every time";
			this.dataSource ["Password"].EditorClass = new Class (typeof(TKDataFormPasswordEditor));
			this.dataSource["InfoProtocol"].ValuesProvider = NSArray.FromStrings(new string[] { "L2TP", "PPTP", "IPSec" });
			this.dataSource["EncryptionLevel"].ValuesProvider = NSArray.FromStrings(new string[] { "FIPS Compliant", "High", "Client Compatible", "Low" });

			this.dataSource.AddGroup(" ", new string[] { "InfoProtocol" });
			this.dataSource.AddGroup (" ", new string[] {
				"Details",
				"Server",
				"Account",
				"Secure",
				"Password",
				"EncryptionLevel",
				"SendAllTraffic"
			});
				
			this.DataForm.BackgroundColor = new UIColor (0.937f, 0.937f, 0.960f, 1.0f);
			this.DataForm.GroupSpacing = 20;
			this.DataForm.Delegate = this.dataFormDelegate;
			this.DataForm.WeakDataSource = this.dataSource.NativeObject;
		}
Example #3
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.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"));
        }