public override void ovrAction(MonoTouch.Foundation.NSObject sender) { if (this.Clicked != null) { this.Clicked(this, null); } }
public override void ObserveValue(MonoTouch.Foundation.NSString keyPath, MonoTouch.Foundation.NSObject ofObject, MonoTouch.Foundation.NSDictionary change, IntPtr context) { if (ofObject == TitleLabel) { SetColor(); } }
partial void OnAddAnimalsClick(MonoTouch.Foundation.NSObject sender) { var sheet = new UIActionSheet("Add Animals"); sheet.AddButton("Add Dog"); sheet.AddButton("Add Kitten"); sheet.Clicked += HandleAddAnimalClicked; sheet.ShowInView(this.View); }
public override bool ShouldPerformSegue(string segueIdentifier, MonoTouch.Foundation.NSObject sender) { if (segueIdentifier == LoginSegueName) { return(isLoggedIn); } return(base.ShouldPerformSegue(segueIdentifier, sender)); }
public override void DrawButtonPressed(MonoTouch.Foundation.NSObject sender) { base.DrawButtonPressed(sender); // Remove all buttons but the last one, which is the done button. var doneBtn = this.Items [this.Items.Length - 1]; var demoBtn = new UIBarButtonItem("Drawing toolbar", UIBarButtonItemStyle.Plain, null); this.Items = new UIBarButtonItem[] { demoBtn, new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), doneBtn }; }
public override MKOverlayView GetViewForOverlay(MKMapView mapView, MonoTouch.Foundation.NSObject overlay) { if (this.CircleView == null) { this.circleView = new MKCircleView(this.circle) { StrokeColor = UIColor.Red, LineWidth = 2.0f }; } return(this.CircleView); }
public override MKOverlayView GetViewForOverlay(MKMapView mapView, MonoTouch.Foundation.NSObject overlay) { if (RegionDefinerViewController.PolygonView != null && RegionDefinerViewController.PolygonView.Polygon == RegionDefinerViewController.Polygon) { return(RegionDefinerViewController.PolygonView); } RegionDefinerViewController.Polygon = overlay as MKPolygon; RegionDefinerViewController.PolygonView = new MKPolygonView(RegionDefinerViewController.Polygon) { FillColor = new UIColor(0, 1, 0, .3f), StrokeColor = new UIColor(0, 1, 0, 0.9f), LineWidth = 1.0f }; return(RegionDefinerViewController.PolygonView); }
public GeolocationResult GetLocation() { ManualResetEvent waitToComplete = new ManualResetEvent (false); GeolocationResult result = null; // Not getting the right results if not on main thread MonoTouch.Foundation.NSObject obj = new MonoTouch.Foundation.NSObject (); obj.InvokeOnMainThread (delegate { Task<Position> task = GetTask (); task.ContinueWith (t => { result = new GeolocationResult (_geolocator, t); waitToComplete.Set (); }, _scheduler); }); waitToComplete.WaitOne (); return result; }
partial void DeleteButtonAction(MonoTouch.Foundation.NSObject sender) { SellCommand.Execute(null); }
partial void btnPrevOnClick(MonoTouch.Foundation.NSObject sender) { }
public Dispatcher(MonoTouch.Foundation.NSObject obj, DispatcherId id) { this.obj = obj; Id = id; threadId = System.Threading.Thread.CurrentThread.ManagedThreadId; }
partial void DecreasePriceAction(MonoTouch.Foundation.NSObject sender) { DecreaseCommand.Execute(null); }