public void Reset(bool resetPrevious)
        {
            this.WrappingHelpers = new List <Coordinates>();
            this.PreviousNode    = null;

            if (resetPrevious)
            {
                this.zt.Mode = ZoneToolboxMode.None;
            }

            this.rightClickNode = null;
            this.rightClickEdge = null;

            if (this.moveNode != null)
            {
                this.moveNode.Position = this.moveOriginalCoords;
            }
            this.moveNode = null;
        }
 private void ZoneToolboxStayOutPolygonButton_Click(object sender, EventArgs e)
 {
     if (this.ZoneToolboxStayOutPolygonButton.CheckState == CheckState.Checked)
     {
         this.Mode = ZoneToolboxMode.StayOut;
         this.parentTool.WrappingHelpers = new List<Coordinates>();
     }
     else
     {
         this.Mode = ZoneToolboxMode.None;
         this.parentTool.WrappingHelpers = new List<Coordinates>();
         this.parentTool.Reset(true);
     }
 }
 private void ZoneToolboxSelectZoneButton_Click(object sender, EventArgs e)
 {
     if (this.ZoneToolboxSelectZoneButton.CheckState == CheckState.Checked)
         this.Mode = ZoneToolboxMode.Selection;
     else
     {
         this.Mode = ZoneToolboxMode.None;
         this.parentTool.Reset(true);
     }
 }
        private void ZoneToolboxResetZoneButton_Click(object sender, EventArgs e)
        {
            this.Mode = ZoneToolboxMode.None;

            if (this.current != null)
            {
                this.parentTool.ed.SaveUndoPoint();

                this.current.StayOutAreas = new List<UrbanChallenge.Common.Shapes.Polygon>();
                this.current.NavigationNodes = new List<INavigableNode>();

                foreach (NavigableEdge ne in this.current.NavigableEdges)
                    ne.Start.OutgoingConnections.Remove(ne);
                this.current.NavigableEdges = new List<NavigableEdge>();

                this.parentTool.Reset(true);
                this.parentTool.rd.Invalidate();
            }
        }
 private void ZoneToolboxCreateNodesButton_Click(object sender, EventArgs e)
 {
     if (this.ZoneToolboxCreateNodesButton.CheckState == CheckState.Checked)
     {
         this.Mode = ZoneToolboxMode.NavNodes;
         this.parentTool.PreviousNode = null;
     }
     else
     {
         this.Mode = ZoneToolboxMode.None;
         this.parentTool.Reset(true);
     }
 }