Exemple #1
0
        public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            var vc = new WebViewController(this)
            {
                Autorotate = dvc.Autorotate
            };
            var frame = UIScreen.MainScreen.Bounds;

            web = new UIWebView(frame)
            {
                BackgroundColor = UIColor.White, ScalesPageToFit = true, AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight
            };
            web.LoadStarted  += delegate { NetworkActivity = true; };
            web.LoadFinished += delegate { NetworkActivity = false; };
            web.LoadError    += (webview, args) =>
            {
                NetworkActivity = false;
                if (web != null)
                {
                    web.LoadHtmlString(String.Format("<html><center><font size=+5 color='red'>An error occurred:<br>{0}</font></center></html>", args.Error.LocalizedDescription), null);
                }
            };
            vc.NavigationItem.Title = Caption;
            vc.View.AddSubview(web);

            dvc.ActivateController(vc, dvc);

            var url = new NSUrl(Value.AbsoluteUri);

            web.LoadRequest(NSUrlRequest.FromUrl(url));
        }
Exemple #2
0
        public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            if (picker == null)
            {
                picker = new UIImagePickerController();
            }
            picker.Delegate = new MyDelegate(this, tableView, path);

            switch (UIDevice.CurrentDevice.UserInterfaceIdiom)
            {
            case UIUserInterfaceIdiom.Pad:
                RectangleF useRect;
                popover = new UIPopoverController(picker);
                var cell = tableView.CellAt(path);
                if (cell == null)
                {
                    useRect = rect;
                }
                else
                {
                    useRect = cell.Frame;
                }
                popover.PresentFromRect(useRect, dvc.View, UIPopoverArrowDirection.Any, true);
                break;

            default:

            case UIUserInterfaceIdiom.Phone:
                dvc.ActivateController(picker, dvc);
                break;
            }
            currentController = dvc;
        }
Exemple #3
0
        public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            var mapViewController = new MapViewController((CLLocationCoordinate2D)DataContext)
            {
                Title = Caption
            };

            dvc.ActivateController(mapViewController, dvc);
        }
Exemple #4
0
        public void ActivateController(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            var newDvc = MakeViewController();

            PrepareDialogViewController(newDvc);
            dvc.ActivateController(newDvc, dvc);

            tableView.DeselectRow(path, false);
        }
        public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            var mapViewController = new MapViewController(Value)
            {
                Title = Caption
            };

            dvc.ActivateController(mapViewController, dvc);
        }
        public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            var vc = new DateTimeController(this)
            {
                Autorotate = dvc.Autorotate
            };

            DatePicker              = CreatePicker();
            DatePicker.Frame        = PickerFrameWithSize(DatePicker.SizeThatFits(SizeF.Empty));
            vc.View.BackgroundColor = tableView.BackgroundColor;
            vc.View.AddSubview(DatePicker);

            //dvc.PresentModalViewController(vc, true);
            dvc.ActivateController(vc, dvc);
        }
		public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			if (picker == null)
				picker = new UIImagePickerController();
			picker.Delegate = new MyDelegate(this, tableView, path);

			switch (UIDevice.CurrentDevice.UserInterfaceIdiom)
			{
				case UIUserInterfaceIdiom.Pad:
					RectangleF useRect;
					popover = new UIPopoverController(picker);
					var cell = tableView.CellAt(path);
					if (cell == null)
						useRect = rect;
					else
						useRect = cell.Frame;
					popover.PresentFromRect(useRect, dvc.View, UIPopoverArrowDirection.Any, true);
					break;
				default:
				
				case UIUserInterfaceIdiom.Phone:
					dvc.ActivateController(picker, dvc);
					break;
			}
			currentController = dvc;
		}
		public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			var mapViewController = new MapViewController((CLLocationCoordinate2D)DataContext) { Title = Caption };
			dvc.ActivateController(mapViewController, dvc);
		}
		public void ActivateController(DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{	
			var newDvc = MakeViewController(dvc.Style);
			PrepareDialogViewController(newDvc);
			dvc.ActivateController(newDvc, dvc);
			
			tableView.DeselectRow(path, false);
		}
		public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			var mapViewController = new MapViewController(Value) { Title = Caption };
			dvc.ActivateController(mapViewController, dvc);
		}
Exemple #11
0
		public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			var vc = new WebViewController(this) { Autorotate = dvc.Autorotate };
			var frame = UIScreen.MainScreen.Bounds;

			web = new UIWebView(frame) { BackgroundColor = UIColor.White, ScalesPageToFit = true, AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight };
			web.LoadStarted += delegate { NetworkActivity = true; };
			web.LoadFinished += delegate { NetworkActivity = false; };
			web.LoadError += (webview, args) =>
			{
				NetworkActivity = false;
				if (web != null)
					web.LoadHtmlString(String.Format("<html><center><font size=+5 color='red'>An error occurred:<br>{0}</font></center></html>", args.Error.LocalizedDescription), null);
			};
			vc.NavigationItem.Title = Caption;
			vc.View.AddSubview(web);
			
			dvc.ActivateController(vc, dvc);

			var url = new NSUrl(Value.AbsoluteUri);
			web.LoadRequest(NSUrlRequest.FromUrl(url));
		}
		public void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			var vc = new DateTimeController(this) { Autorotate = dvc.Autorotate };
			DatePicker = CreatePicker();
			DatePicker.Frame = PickerFrameWithSize(DatePicker.SizeThatFits(SizeF.Empty));
			vc.View.BackgroundColor = tableView.BackgroundColor;
			vc.View.AddSubview(DatePicker);
		
			//dvc.PresentModalViewController(vc, true);
			dvc.ActivateController(vc, dvc);
		}