public override void ViewDidLoad() { base.ViewDidLoad(); RootElement root = Root; root.UnevenRows = true; UIImageView imageView = new UIImageView(View.Frame); //StringElement messageElement = new StringElement(""); Section imageSection = new Section() { imageView }; root.Add(new Section() { new StyledStringElement("Process", delegate { using (Image <Bgr, byte> resized = DrawSubdivision.Draw(Math.Min(View.Frame.Width, View.Frame.Height), 20)) //using (Image<Bgr, Byte> resized = result.Resize((int)View.Frame.Width, (int)View.Frame.Height, Emgu.CV.CvEnum.INTER.CV_INTER_NN, true)) { imageView.Frame = new RectangleF(PointF.Empty, resized.Size); imageView.Image = resized.ToUIImage(); } //messageElement.Value = String.Format("Detection Time: {0} milliseconds.", processingTime); //messageElement.GetImmediateRootElement().Reload(messageElement, UITableViewRowAnimation.Automatic); imageView.SetNeedsDisplay(); this.ReloadData(); } ) }); //root.Add(new Section() {messageElement}); root.Add(imageSection); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); OnButtonClick += delegate { int maxValue = 600, pointCount = 30; SetImageBitmap(DrawSubdivision.Draw(maxValue, pointCount).ToBitmap()); }; }
public PlanarSubdivisionPage() { var button = this.GetButton(); button.Text = "Calculate Planar Subdivision"; button.Clicked += (sender, args) => { int maxValue = 600, pointCount = 30; SetImage(DrawSubdivision.Draw(maxValue, pointCount)); }; }
public PlanarSubdivisionPage() { var button = this.GetButton(); button.Text = "Calculate Planar Subdivision"; button.Clicked += (sender, args) => { int maxValue = 600, pointCount = 30; SetImage(DrawSubdivision.Draw(maxValue, pointCount)); SetMessage(String.Format("Generated planar subdivision for {0} points", pointCount)); }; }