protected void BuildSnaphotOverlay() { if (this.snapshotOverlay != null) { this.RemoveSnapshotOverlay(); } this.snapshotOverlay = new UIView(new RectangleF(this.chartContainer.Frame.X, this.chartContainer.Frame.Y, this.chartContainer.Frame.Width, this.chartContainer.Frame.Height)); this.snapshotOverlay.UserInteractionEnabled = false; this.snapshotOverlay.ContentMode = UIViewContentMode.Left; this.Add(this.snapshotOverlay); this.snapshotBtnOverlay = new UIView(new RectangleF(this.chartContainer.Frame.X, this.chartContainer.Frame.Y - 30f, this.chartContainer.Frame.Width, 30f)); this.snapshotBtnOverlay.ContentMode = UIViewContentMode.Left; this.snapshotBtnOverlay.UserInteractionEnabled = true; this.Add(this.snapshotBtnOverlay); snapshotToolView = new SnapshotToolView(this.CurrentReport, this.globalMoodMap, new RectangleF(0, 0, this.snapshotOverlay.Frame.Width, this.snapshotOverlay.Frame.Height)); this.snapshotOverlay.Add(snapshotToolView); this.snapshotToolView.Refresh(); if (this.snapshotDragBtn != null) { this.snapshotDragBtn.RemoveFromSuperview(); this.snapshotDragBtn = null; } this.snapshotDragBtn = new SnapshotDragButtonView(new PointF(0, 0)); this.snapshotDragBtn.Center = new PointF(this.snapshotToolView.Center.X, 15f); this.snapshotDragBtn.DragTarget = this.snapshotToolView; this.snapshotBtnOverlay.Add(this.snapshotDragBtn); }
protected void RemoveSnapshotOverlay() { if (this.snapshotToolView != null) { this.snapshotToolView.Dispose(); this.snapshotToolView.RemoveFromSuperview(); this.snapshotToolView = null; } if (this.snapshotOverlay != null) { this.snapshotOverlay.RemoveFromSuperview(); this.snapshotOverlay.Dispose(); this.snapshotOverlay = null; } if (this.snapshotBtnOverlay != null) { this.snapshotBtnOverlay.RemoveFromSuperview(); this.snapshotBtnOverlay.Dispose(); this.snapshotBtnOverlay = null; } }