/// <summary> /// Override for left-click selection /// </summary> /// <param name="sender">Reference to sending object.</param> /// <param name="e">Mouse event arguments.</param> private void MouseLeftButtonUp( object sender , MouseEventArgs e ) { if ( canvas != null ) { if ( canvas.DrawMode == DrawModes.Select || canvas.DrawMode == DrawModes.LineLoad ) { // start dialog for user input SetFixityDialog dlg = new SetFixityDialog( canvas , this ); dlg.ShowDialog(); // if there is no load in horizontal or vertical direction, delete the load ... if ( !this.IsFixedX && !this.IsFixedY ) { this.Delete(); foreach ( MaterialBlock mb in canvas.MaterialBlocks ) { mb.LineConstraints.RemoveAll( delegate( LineConstraint lc ) { return lc == this; } ); } } // ... otherwise update its visibility and plotting location else { this.Update(); } if ( dlg.DialogResult == true ) { canvas.IsSaved = false; canvas.IsVerified = false; } } } else if ( defineCanvas != null ) { ActivateFixityDialog dlg = new ActivateFixityDialog( defineCanvas , this ); dlg.ShowDialog(); this.Update(); } }
/// <summary> /// Override for left-click selection /// </summary> /// <param name="sender">Reference to sending object.</param> /// <param name="e">Mouse event arguments.</param> private void fixLines_MouseLeftButtonUp( object sender , MouseEventArgs e ) { if ( canvas != null ) { if ( canvas.DrawMode == DrawModes.Select || canvas.DrawMode == DrawModes.LineLoad ) { // start dialog for user input SetFixityDialog dlg = new SetFixityDialog( canvas , this ); dlg.ShowDialog(); if ( dlg.DialogResult == true ) { canvas.IsSaved = false; canvas.IsVerified = false; } } } else if ( defineCanvas != null ) { ActivateFixityDialog dlg = new ActivateFixityDialog( defineCanvas , this ); dlg.ShowDialog(); } }