private void Configure() { _previousParts = new List <List <Coordinate> >(); YieldStyle = YieldStyles.LeftButton | YieldStyles.RightButton; _layoutDialog = new frmLayoutDialog(); HandleMeasureDialogEvents(); Control map = Map as Control; if (map != null) { map.MouseLeave += map_MouseLeave; } this.Name = "MapFunctionLayout"; }
/// <summary> /// Forces this function to begin collecting points for building a new shape. /// </summary> protected override void OnActivate() { if (_layoutDialog == null || _layoutDialog.IsDisposed) { _layoutDialog = new frmLayoutDialog(); _layoutDialog.pvMap4Draw = pvMap4Draw; HandleMeasureDialogEvents(); } //------------------------------------------------------------- _layoutDialog.pvMap4Draw = pvMap4Draw; _layoutDialog.Show(); //------------------------------------------------------------- if (_standBy == false) { _previousParts = new List <List <Coordinate> >(); _coordinates = new List <Coordinate>(); } _standBy = false; base.OnActivate(); }