• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Dialog.EntryElement类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MonoTouch.Dialog.EntryElement的典型用法代码示例。如果您正苦于以下问题:C# EntryElement类的具体用法?C# EntryElement怎么用?C# EntryElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EntryElement类属于MonoTouch.Dialog命名空间,在下文中一共展示了EntryElement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FinishedLaunching

		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			var what = new EntryElement ("What ?", "e.g. pizza", String.Empty);
			var where = new EntryElement ("Where ?", "here", String.Empty);

			var section = new Section ();
			if (CLLocationManager.LocationServicesEnabled) {
				lm = new CLLocationManager ();
				lm.LocationsUpdated += delegate (object sender, CLLocationsUpdatedEventArgs e) {
					lm.StopUpdatingLocation ();
					here = e.Locations [e.Locations.Length - 1];
					var coord = here.Coordinate;
					where.Value = String.Format ("{0:F4}, {1:F4}", coord.Longitude, coord.Latitude);
				};
				section.Add (new StringElement ("Get Current Location", delegate {
					lm.StartUpdatingLocation ();
				}));
			}

			section.Add (new StringElement ("Search...", async delegate {
				await SearchAsync (what.Value, where.Value);
			}));

			var root = new RootElement ("MapKit Search Sample") {
				new Section ("MapKit Search Sample") { what, where },
				section
			};
			window.RootViewController = new UINavigationController (new DialogViewController (root, true));
			window.MakeKeyAndVisible ();
			return true;
		}
开发者ID:GSerjo,项目名称:monotouch-samples,代码行数:33,代码来源:AppDelegate.cs


示例2: ProvisioningDialog

        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));
        }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:31,代码来源:ProvisioningDialog.cs


示例3: LoginViewController

        public LoginViewController () : base (UITableViewStyle.Grouped, null)
        {
			hostEntry = new EntryElement ("Host", "imap.gmail.com", "imap.gmail.com");
			portEntry = new EntryElement ("Port", "993", "993") {
				KeyboardType = UIKeyboardType.NumberPad
			};
			sslCheckbox = new CheckboxElement ("Use SSL", true);

			userEntry = new EntryElement ("Username", "Email / Username", "");
			passwordEntry = new EntryElement ("Password", "password", "", true);

            Root = new RootElement ("IMAP Login") {
                new Section ("Server") {
					hostEntry,
                    portEntry,
                    sslCheckbox
                },
                new Section ("Account") {
                    userEntry,
                    passwordEntry
                },
                new Section {
                    new StyledStringElement ("Login", Login)
                }
            };

			foldersViewController = new FoldersViewController ();
        }
开发者ID:repne,项目名称:MailKit,代码行数:28,代码来源:LoginViewController.cs


示例4: ViewWillAppear

		public override void ViewWillAppear (bool animated)
		{
			base.ViewWillAppear(animated);
			
			var items = new List<object>();
		
			for(int i = 0;i <= 10;i++)
			{
				items.Add (i);
			}
			chickenName = new EntryElement("Name Of", null, "");
			chickenName.Value = "Big Bird";
			
			rating = new PickerElement("Rating", items.ToArray(), null, this) {
				Width = 40f,
				ValueWidth = 202f, // use this to align picker value with other elements, for the life of me I can't find a calculation that automatically does it.
				Alignment = UITextAlignment.Left
			};			
			// set initial rating.
			rating.Value = "5";
			rating.SetSelectedValue(rating.Value);
			
			date = new DateTimeElement2("Date", DateTime.Now, this) {
				Alignment = UITextAlignment.Left,
				Mode = UIDatePickerMode.Date
			};
			
			Root = new RootElement("Rate Chicken") {
				new Section() {
					chickenName,
					rating,
					date
				}
			};		
		}
开发者ID:jcaudill,项目名称:MonoTouch.Dialog-PickerElement,代码行数:35,代码来源:ChickenDialogViewController.cs


示例5: SettingsViewController

        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");
        }
开发者ID:buehler,项目名称:xamarin-hsr-challenge-project,代码行数:26,代码来源:SettingsViewController.cs


示例6: EchoDicomServer

        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);
        }
开发者ID:GMZ,项目名称:mdcm,代码行数:31,代码来源:EchoDicomServer.cs


示例7: CreateRoot

 RootElement CreateRoot()
 {
     nameElement = new EntryElement ("Name", "", "");
     scoreElement = new EntryElement ("Score", "", "");
     difficultyGroup = new RadioGroup (0);
     return new RootElement ("Parse"){
         new Section("Add a score!"){
             nameElement,
             scoreElement,
             new RootElement ("Difficulty",difficultyGroup){
                 new Section ("Difficulty"){
                     new RadioElement ("Easy"),
                     new RadioElement ("Medium"),
                     new RadioElement ("Hard"),
                 },
             },
         },
         new Section()
         {
             new StringElement("Submit Score",submitScore),
         },
         new Section()
         {
             new StringElement("View High Scores", viewHighScores),
         }
     };
 }
开发者ID:amnextking,项目名称:monotouch-bindings,代码行数:27,代码来源:AppDelegate.cs


示例8: GetViewController

		public UIViewController GetViewController ()
		{
			var network = new BooleanElement ("Remote Server", EnableNetwork);

			var host = new EntryElement ("Host Name", "name", HostName);
			host.KeyboardType = UIKeyboardType.ASCIICapable;
			
			var port = new EntryElement ("Port", "name", HostPort.ToString ());
			port.KeyboardType = UIKeyboardType.NumberPad;
			
			var root = new RootElement ("Options") {
				new Section () { network, host, port }
			};
				
			var dv = new DialogViewController (root, true) { Autorotate = true };
			dv.ViewDissapearing += delegate {
				EnableNetwork = network.Value;
				HostName = host.Value;
				ushort p;
				if (UInt16.TryParse (port.Value, out p))
					HostPort = p;
				else
					HostPort = -1;
				
				var defaults = NSUserDefaults.StandardUserDefaults;
				defaults.SetBool (EnableNetwork, "network.enabled");
				defaults.SetString (HostName ?? String.Empty, "network.host.name");
				defaults.SetInt (HostPort, "network.host.port");
			};
			
			return dv;
		}
开发者ID:playdough,项目名称:Touch.Unit,代码行数:32,代码来源:TouchOptions.cs


示例9: DatePickerDemoViewController

        public DatePickerDemoViewController()
            : base(UITableViewStyle.Grouped, new RootElement ("Demo"), true)
        {
            //NOTE: ENSURE THAT ROOT.UNEVENROWS IS SET TO TRUE
            // OTHERWISE THE DatePickerElement.Height function is not called
            Root.UnevenRows = true;

            // Create section to hold date picker
            Section section = new Section ("Date Picker Test");

            // Create elements
            StringElement descriptionElement = new StringElement ("This demo shows how the date picker works within a section");
            DatePickerElement datePickerElement = new DatePickerElement ("Select date", section, DateTime.Now, UIDatePickerMode.DateAndTime);
            EntryElement entryElement = new EntryElement ("Example entry box", "test", "test");
            StringElement buttonElement = new StringElement ("Reset Date Picker", () => {
                // This is how you can set the date picker after it has been created
                datePickerElement.SelectedDate = DateTime.Now;
            });
            StringElement buttonFinalElement = new StringElement ("Show Selected Date", () => {
                // This is how you can access the selected date from the date picker
                entryElement.Value = datePickerElement.SelectedDate.ToString();
            });

            // Add to section
            section.AddAll (new Element[] { descriptionElement, datePickerElement, entryElement, buttonElement, buttonFinalElement });

            // Add section to root
            Root.Add (section);
        }
开发者ID:RothA,项目名称:Xamarin-iOS7-DatePicker,代码行数:29,代码来源:DatePickerDemoViewController.cs


示例10: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
			Root = new RootElement(""){
                new Section(){
					(item = new EntryElement("Item","Enter Item name",presenter.Item)),
					(quantity = new StepperElement("Quantity", presenter.Quantity, new StepperView())),
					(location = new EntryElement("Location","Enter Location", presenter.Location)),
					new StyledStringElement("Take Picture", delegate {
						TakePicture();
					}){Accessory = UITableViewCellAccessory.DisclosureIndicator},
					new StringElement("View Picture",delegate {
						ShowPicture();
					}),
				}};


            this.NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Save, async delegate
            {
                try
                {
                    presenter.Item = item.Value;
					presenter.Quantity = (int)quantity.Value;
                    presenter.Location = location.Value;
                    await presenter.SaveItem();
                    NavigationController.PopToRootViewController(true);
                }
                catch (Exception e)
                {
                    new UIAlertView("Error Saving",e.Message,null,"OK",null).Show();
                }
            });

        }
开发者ID:jeffbmiller,项目名称:ShoppingList,代码行数:34,代码来源:ShoppingItemView.cs


示例11: Pubnub_MessagingMain

		public Pubnub_MessagingMain () : base (UITableViewStyle.Grouped, null)
		{
			EntryElement entryChannelName = new EntryElement("Channel Name", "Enter Channel Name", "");
			EntryElement entryCipher = new EntryElement("Cipher", "Enter Cipher", "");
			BooleanElement bSsl = new BooleanElement ("Enable SSL", false);
			Root = new RootElement ("Pubnub Messaging") {
				new Section ("Basic Settings")
				{
					entryChannelName,
					bSsl
				},
				new Section ("Enter cipher key for encryption. Leave blank for unencrypted transfer.")
				{
					entryCipher
				},
				new Section()
				{
					new StyledStringElement ("Launch", () => {
						if(String.IsNullOrWhiteSpace (entryChannelName.Value.Trim()))
						{
							new UIAlertView ("Error!", "Please enter a channel name", null, "OK").Show (); 
						}
						else
						{
							new Pubnub_MessagingSub(entryChannelName.Value, entryCipher.Value, bSsl.Value);
						}
					})
					{
						BackgroundColor = UIColor.Blue,
						TextColor = UIColor.White,
						Alignment = UITextAlignment.Center
					},
				}
			};
		}
开发者ID:jhey,项目名称:pubnub-api,代码行数:35,代码来源:Pubnub_MessagingMain.cs


示例12: Initialize

		private void Initialize()
		{
			var loginWithWidgetBtn = new StyledStringElement ("Login with Widget", this.LoginWithWidgetButtonClick) {
				Alignment = UITextAlignment.Center
			};

			var loginWithConnectionBtn = new StyledStringElement ("Login with Google", this.LoginWithConnectionButtonClick) {
				Alignment = UITextAlignment.Center
			};

			var loginBtn = new StyledStringElement ("Login", this.LoginWithUsernamePassword) {
				Alignment = UITextAlignment.Center
			};

			this.resultElement = new StyledMultilineElement (string.Empty, string.Empty, UITableViewCellStyle.Subtitle);

			var login1 = new Section ("Login");
			login1.Add (loginWithWidgetBtn);
			login1.Add (loginWithConnectionBtn);

			var login2 = new Section ("Login with user/password");
			login2.Add (this.userNameElement = new EntryElement ("User", string.Empty, string.Empty));
			login2.Add (this.passwordElement = new EntryElement ("Password", string.Empty, string.Empty, true));
			login2.Add (loginBtn);

			var result = new Section ("Result");
			result.Add(this.resultElement);

			this.Root.Add (new Section[] { login1, login2, result });
		}
开发者ID:ducaciprian,项目名称:Xamarin.Auth0Client,代码行数:30,代码来源:Auth0Client_iOS_SampleViewController.designer.cs


示例13: ViewDidLoad

        public override void ViewDidLoad()
        {

            base.ViewDidLoad();
            
            // Perform any additional setup after loading the view
            var info = new RootElement("Info") {
                new Section() {
                    { eventname = new EntryElement("Event Name", "Enter the Name", null) },
                    { recipients = new EntryElement("Recipients' Names", "Enter the Recipients", null) },
                    { location = new EntryElement("Enter Location", "Enter the Location", null) }
                },

                new Section()
                {
                    { date = new DateElement("Pick the Date", DateTime.Now) },
                    { timeelement = new TimeElement("Pick the Time", DateTime.Now) },
                    { description = new EntryElement("Description", "Enter a Description", null) }
                },

                new Section()
                {
                    new RootElement("Type", category = new RadioGroup("Type of Event", 0)) {
                        new Section() {
                            new RadioElement ("Meeting", "Type of Event"),
                            new RadioElement ("Company Event", "Type of Event"),
                            new RadioElement ("Machine Maintenance", "Type of Event"),
                            new RadioElement ("Emergency", "Type of Event")
                        }
                    },
                    
                    new RootElement("Priority", priority = new RadioGroup ("priority", 0))
                    {
                        new Section()
                        {
                            new RadioElement("Low", "priority"),
                            new RadioElement("Medium", "priority"), 
                            new RadioElement("High", "priority")
                        }
                    }
                },
            };

            Root.Add(info);

            UIButton createEventBtn = UIButton.FromType(UIButtonType.RoundedRect);
            createEventBtn.SetTitle("Add Event", UIControlState.Normal);
            createEventBtn.Frame = new Rectangle(0, 0, 320, 44);
            int y = (int)((View.Frame.Size.Height - createEventBtn.Frame.Size.Height)/1.15);
            int x = ((int)(View.Frame.Size.Width - createEventBtn.Frame.Size.Width)) / 2;
            createEventBtn.Frame = new Rectangle(x, y, (int)createEventBtn.Frame.Width, (int)createEventBtn.Frame.Height);
            View.AddSubview(createEventBtn);


            createEventBtn.TouchUpInside += async (object sender, EventArgs e) =>
            {
                await createEvent(info);
            };
        }
开发者ID:ititwcip,项目名称:ITWCIPApplication,代码行数:59,代码来源:CreateEventController.cs


示例14: PhotoViewController

        public PhotoViewController()
            : base(UITableViewStyle.Grouped, null, true)
        {
            // Add the image that will be publish
            var imageView = new UIImageView (new CGRect (0, 0, View.Frame.Width, 220)) {
                Image = UIImage.FromFile ("wolf.jpg")
            };

            // Add a textbox that where you will be able to add a comment to the photo
            txtMessage = new EntryElement ("", "Say something nice!", "");

            Root = new RootElement ("Post photo!") {
                new Section () {
                    new UIViewElement ("", imageView, true) {
                        Flags = UIViewElement.CellFlags.DisableSelection | UIViewElement.CellFlags.Transparent,
                    },
                    txtMessage
                }
            };

            // Create the request to post a photo into your wall
            NavigationItem.RightBarButtonItem = new UIBarButtonItem ("Post", UIBarButtonItemStyle.Plain, ((sender, e) => {

                // Disable the post button for prevent another untill the actual one finishes
                (sender as UIBarButtonItem).Enabled = false;

                // Add the photo and text that will be publish
                var parameters = new NSDictionary ("picture", UIImage.FromFile ("wolf.jpg").AsPNG (), "caption", txtMessage.Value);

                // Create the request
                var request = new GraphRequest ("/" + Profile.CurrentProfile.UserID + "/photos", parameters, AccessToken.CurrentAccessToken.TokenString, null, "POST");
                var requestConnection = new GraphRequestConnection ();
                requestConnection.AddRequest (request, (connection, result, error) => {

                    // Enable the post button
                    (sender as UIBarButtonItem).Enabled = true;

                    // Handle if something went wrong
                    if (error != null) {
                        new UIAlertView ("Error...", error.Description, null, "Ok", null).Show ();
                        return;
                    }

                    // Do your magic if the request was successful
                    new UIAlertView ("Yay!!", "Your photo was published!", null, "Ok", null).Show ();

                    photoId = (result as NSDictionary) ["post_id"].ToString ();

                    // Add a button to allow to delete the photo posted
                    Root.Add (new Section () {
                        new StyledStringElement ("Delete Post", DeletePost) {
                            Alignment = UITextAlignment.Center,
                            TextColor = UIColor.Red
                        }
                    });
                });
                requestConnection.Start ();
            }));
        }
开发者ID:amnextking,项目名称:monotouch-bindings,代码行数:59,代码来源:PhotoViewController.cs


示例15: FieldImage

        public FieldImage(string farmName,int farmID,FlyoutNavigationController fnc,SelectField sf)
            : base(UITableViewStyle.Grouped, null)
        {
            Root = new RootElement (null) {};
            this.Pushing = true;

            var section = new Section () {};
            var totalRainGuage = new StringElement ("Total Raid Guage(mm): " + DBConnection.getRain (farmID),()=>{});
            var rainGuage=new EntryElement ("New Rain Guage(mm): ",null,"         ");
            rainGuage.KeyboardType = UIKeyboardType.NumbersAndPunctuation;
            var update=new StringElement("Add",()=>{
                try{
                DBConnection.updateRain(farmID,Int32.Parse(rainGuage.Value));
                }
                catch(Exception e){
                    new UIAlertView ("Error", "Wrong input format!", null, "Continue").Show ();
                    return;
                }
                UIAlertView alert = new UIAlertView ();
                alert.Title = "Success";
                alert.Message = "Your Data Has Been Saved";
                alert.AddButton("OK");
                alert.Show();
            });
            var showDetail=new StringElement("Show Rain Guage Detail",()=>{
                RainDetail rd=new RainDetail(farmID,farmName);
                sf.NavigationController.PushViewController(rd,true);
            });
            section.Add (totalRainGuage);
            section.Add (rainGuage);
            section.Add (update);
            section.Add (showDetail);

            Root.Add (section);

            var section2 = new Section () { };
            var farmImg=UIImage.FromFile ("img/"+farmName+".jpg");
            if(farmImg==null)
                farmImg=UIImage.FromFile ("Icon.png");
            var imageView = new UIImageView (farmImg);
            if(farmImg==null)
                farmImg=UIImage.FromFile ("Icon.png");

            var scrollView=new UIScrollView (
                new RectangleF(0,0,fnc.View.Frame.Width-20,250)
            );

            scrollView.ContentSize = imageView.Image.Size;
            scrollView.AddSubview (imageView);

            scrollView.MaximumZoomScale = 3f;
            scrollView.MinimumZoomScale = .1f;
            scrollView.ViewForZoomingInScrollView += (UIScrollView sv) => { return imageView; };

            var imageElement=new UIViewElement(null,scrollView,false);
            section2.Add(imageElement);
            Root.Add (section2);
        }
开发者ID:Bibo77,项目名称:MADMUCfarm,代码行数:58,代码来源:SelectField.cs


示例16: AddEditContactScreen

        public AddEditContactScreen(UINavigationController nav)
            : base(UITableViewStyle.Grouped, null, true)
        {
            _rootContainerNavigationController = nav;

            // Navigation
            NavigationItem.LeftBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Cancel, (sender, args) =>
            {
                NavigationController.DismissViewController(true, null);
            });
            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Done, DoneButtonClicked);
            NavigationItem.Title = "New Contact";

            Root = new RootElement("");

            // Photo
            _photoSection = new Section();
            _photoBadge = new BadgeElement(UIImage.FromBundle("Images/UnknownIcon.jpg"), "Add Photo");
            _photoBadge.Tapped += PhotoBadgeTapped;
            _photoSection.Add(_photoBadge);
            Root.Add(_photoSection);

            // Name
            _nameSection = new Section();
            var firstName = new EntryElement(null, "First", null);
            var middleName = new EntryElement(null, "Middle", null);
            var lastName = new EntryElement(null, "Last", null);
            var org = new EntryElement(null, "Organization", null);
            _nameSection.Add(firstName);
            _nameSection.Add(middleName);
            _nameSection.Add(lastName);
            _nameSection.Add(org);
            Root.Add(_nameSection);

            // Phone numbers
            _phoneSection = new Section("Phone Numbers");
            Root.Add(_phoneSection);
            var phoneLoadMore = new LoadMoreElement("Add More Phone Numbers", "Loading...", PhoneLoadMoreTapped);
            _phoneSection.Add(phoneLoadMore);

            // Emails
            _emailSection = new Section("Emails");
            Root.Add(_emailSection);
            var emailLoadMore = new LoadMoreElement("Add More Emails", "Loading...", EmailLoadMoreTapped);
            _emailSection.Add(emailLoadMore);

            // Urls
            _urlSection = new Section("Urls");
            Root.Add(_urlSection);
            var urlLoadMore = new LoadMoreElement("Add More Urls", "Loading...", UrlLoadMoreTapped);
            _urlSection.Add(urlLoadMore);

            // IMs
            _instantMsgSection = new Section("Instant Messages");
            Root.Add(_instantMsgSection);
            var instantMsgLoadMore = new LoadMoreElement("Add More Instant Messages", "Loading...", InstantMsgLoadMoreTapped);
            _instantMsgSection.Add(instantMsgLoadMore);
        }
开发者ID:NamXH,项目名称:Graphy,代码行数:58,代码来源:AddEditContactScreen.cs


示例17: CreateNicknameElement

 private EntryElement CreateNicknameElement()
 {
     _nickname = new EntryElement("Nickname", "ninja wannabe", null)
         {
             AutocapitalizationType = UITextAutocapitalizationType.None,
             AutocorrectionType = UITextAutocorrectionType.No,
             ReturnKeyType = UIReturnKeyType.Next
         };
     return _nickname;
 }
开发者ID:samilamti,项目名称:ninja-locator,代码行数:10,代码来源:GettingStartedViewController.cs


示例18: Update

		public void Update(EntryElement element, UITableView tableView){
			_element = element;

			if (_entry==null){
				PrepareEntry(tableView);
			}

			_entry.Font = element.Appearance.TextFieldFont;
			_entry.TextColor = element.ReadOnly ? element.Appearance.DisabledLabelTextColor : element.Appearance.TextFieldFontTextColor;

			TextLabel.Font = element.Appearance.LabelFont;
			TextLabel.TextColor = element.ReadOnly ? element.Appearance.DisabledLabelTextColor : element.Appearance.LabelTextColor;
			TextLabel.HighlightedTextColor = element.Appearance.LabelHighlightedTextColor;

			_entry.Enabled = !element.ReadOnly;
			_entry.Text = element.Value ?? "";
			_entry.RightText = element.AppendedText;
			if (_entry.GetType()==typeof(CustomTextField)) {
				((UILabel)((CustomTextField)_entry).RightView).TextColor = element.ReadOnly ? element.Appearance.DisabledLabelTextColor : element.Appearance.LabelTextColor;
			}

			_entry.TextAlignment = element.TextAlignment;
			_entry.Placeholder = element.Placeholder ?? "";
			_entry.SecureTextEntry = element.IsPassword;
			if (element.KeyboardType==UIKeyboardType.EmailAddress || element.IsPassword){
				_entry.AutocorrectionType = UITextAutocorrectionType.No;
				_entry.AutocapitalizationType = UITextAutocapitalizationType.None;
			} else {
				_entry.AutocorrectionType = UITextAutocorrectionType.Default;
				_entry.AutocapitalizationType = element.AutoCapitalize;
			}
			
			_entry.KeyboardType = element.KeyboardType;
            _entry.ReturnKeyType = element.ReturnKeyType;
			_entry.AutocorrectionType = element.AutoCorrection;
			TextLabel.Text = element.Caption;
			_entry.Hidden = element.Hidden;
			this.BackgroundColor = element.ReadOnly ? element.Appearance.BackgroundColorDisabled : element.Appearance.BackgroundColorEditable;
			this.UserInteractionEnabled = !element.ReadOnly;

			
			if (element.ShowToolbar || element.KeyboardType == UIKeyboardType.DecimalPad) {
				var toolbar = new UIToolbar {Translucent = true, Frame = new RectangleF(0,0,320,44)};
				_entry.InputAccessoryView = toolbar;

				toolbar.Items = new UIBarButtonItem[]{
					new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace, null, null),
					new UIBarButtonItem("Done", UIBarButtonItemStyle.Done, (e, a)=>{

						this.ResignFirstResponder();
					}) ,
				};
			};
		}
开发者ID:escoz,项目名称:MonoMobile.Forms,代码行数:54,代码来源:EntryElementCell.cs


示例19: ViewDidLoad

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

            Root.Add(new Section
            {
                (_nameElement = new EntryElement("Name", string.Empty, _settings.Name)),
                (_protectionElement = new BooleanElement("Protect connection", _settings.IsProtected)),
                GetStatusRootView()
            });
        }
开发者ID:sbondini,项目名称:BleChat,代码行数:11,代码来源:SettingsView.cs


示例20: CreateGroupElement

 private EntryElement CreateGroupElement()
 {
     _group = new EntryElement("Group", "The Groupies", null)
         {
             AutocapitalizationType = UITextAutocapitalizationType.Words,
             AutocorrectionType = UITextAutocorrectionType.Yes,
             ReturnKeyType = UIReturnKeyType.Go,
             EntryEnded = (sender, args) => Done()
         };
     return _group;
 }
开发者ID:samilamti,项目名称:ninja-locator,代码行数:11,代码来源:GettingStartedViewController.cs



注:本文中的MonoTouch.Dialog.EntryElement类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Dialog.RootElement类代码示例发布时间:2022-05-26
下一篇:
C# Dialog.DialogViewController类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap