public Field(RectangleF frame, ShareViewController controller, string title)
                : base(frame)
            {
                Controller = controller;

                BackgroundColor  = UIColor.White;
                Opaque           = true;
                AutoresizingMask = UIViewAutoresizing.FlexibleWidth;

                TitleLabel = new UILabel()
                {
                    BackgroundColor = UIColor.White,
                    Font            = TextEditorFont,
                    Text            = title + ":",
                    TextColor       = UIColor.Gray,
                };

                var w = TitleLabel.StringSize(TitleLabel.Text, TextEditorFont).Width + 8;

                                #if !__UNIFIED__
                TitleLabel.Frame = new RectangleF(8, 0, w, frame.Height - 1);
                                #else
                TitleLabel.Frame = new RectangleF(8, 0, (float)w, frame.Height - 1);
                                #endif
                AddSubview(TitleLabel);
            }
Ejemplo n.º 2
0
            public ChoiceField(RectangleF frame, ShareViewController controller, string title)
                : base(frame, controller, title)
            {
                ValueLabel = new LabelButton()
                {
                    BackgroundColor  = UIColor.Clear,
                    Font             = TextEditorFont,
                    TextColor        = UIColor.DarkTextColor,
                    TextAlignment    = UITextAlignment.Right,
                    AutoresizingMask = UIViewAutoresizing.FlexibleWidth,
                };
                var tf = TitleLabel.Frame;

                                #if !__UNIFIED__
                ValueLabel.Frame = new RectangleF(tf.Right, 0, frame.Width - tf.Right, frame.Height - 1);
                                #else
                // ValueLabel.Frame = new RectangleF ((float)tf.Right, 0, (float)((nfloat)frame.Width - tf.Right), (float)(frame.Height - 1));
                ValueLabel.Frame = new RectangleF(0, 0, (float)((nfloat)frame.Width - tf.Left), (float)(frame.Height - 1));
                                #endif
                ValueLabel.TouchUpInside += HandleTouchUpInside;

                AddSubview(ValueLabel);

                Picker        = new CheckedPickerView(new RectangleF(0, 0, 320, 216));
                Picker.Hidden = true;
                Picker.SelectedItemChanged += delegate {
                    ValueLabel.Text = Picker.SelectedItem;
                };
                controller.View.AddSubview(Picker);

                ValueLabel.Text = Picker.SelectedItem;
            }
Ejemplo n.º 3
0
 public TextEditorDelegate(ShareViewController controller)
 {
     this.controller = controller;
 }
Ejemplo n.º 4
0
			public ChoiceField (RectangleF frame, ShareViewController controller, string title)
				: base (frame, controller, title)
			{
				ValueLabel = new LabelButton () {
					BackgroundColor = UIColor.White,
					Font = TextEditorFont,
					TextColor = UIColor.DarkTextColor,
					AutoresizingMask = UIViewAutoresizing.FlexibleWidth,
				};				
				var tf = TitleLabel.Frame;
				ValueLabel.Frame = new RectangleF (tf.Right, 0, frame.Width - tf.Right, frame.Height - 1);

				ValueLabel.TouchUpInside += HandleTouchUpInside;

				AddSubview (ValueLabel);

				Picker = new CheckedPickerView (new RectangleF (0, 0, 320, 216));
				Picker.Hidden = true;
				Picker.SelectedItemChanged += delegate {
					ValueLabel.Text = Picker.SelectedItem;
				};
				controller.View.AddSubview (Picker);

				ValueLabel.Text = Picker.SelectedItem;
			}
Ejemplo n.º 5
0
			public Field (RectangleF frame, ShareViewController controller, string title)
				: base (frame)
			{
				Controller = controller;

				BackgroundColor = UIColor.White;
				Opaque = true;
				AutoresizingMask = UIViewAutoresizing.FlexibleWidth;

				TitleLabel = new UILabel () {
					BackgroundColor = UIColor.White,
					Font = TextEditorFont,
					Text = title + ":",
					TextColor = UIColor.Gray,
				};

				var w = TitleLabel.StringSize (TitleLabel.Text, TextEditorFont).Width + 8;
				TitleLabel.Frame = new RectangleF (8, 0, w, frame.Height - 1);

				AddSubview (TitleLabel);
			}
Ejemplo n.º 6
0
			public TextEditorDelegate (ShareViewController controller)
			{
				this.controller = controller;
			}
Ejemplo n.º 7
0
			public Field (RectangleF frame, ShareViewController controller, string title)
				: base (frame)
			{
				Controller = controller;

				BackgroundColor = UIColor.White;
				Opaque = true;
				AutoresizingMask = UIViewAutoresizing.FlexibleWidth;

				TitleLabel = new UILabel () {
					BackgroundColor = UIColor.White,
					Font = TextEditorFont,
					Text = title + ":",
					TextColor = UIColor.Gray,
				};

				#if ! __UNIFIED__
				TitleLabel.Frame = new RectangleF (8, 0, frame.Width, frame.Height - 1);
				#else
				TitleLabel.Frame = new RectangleF (8, 0, (float)frame.Width, frame.Height - 1);
				#endif
				AddSubview (TitleLabel);
			}