public void GetSuperstructureCutSlabCoordinatesAtX(string name, int cutIndex, double xCoordinate, ref eCutStatus status, ref double yTopmostSectionCut, ref double yBottommostSectionCut, ref double yTopmostInteriorCellCut, ref double yBottommostInteriorCellCut) { }
protected override void OnMouseClick(MouseEventArgs e) { base.OnMouseClick(e); if (e.Button == MouseButtons.Right) { cutState = eCutStatus.None; cutRect.Width = 0; cutRect.Height = 0; this.Hide(); } }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (cutState != eCutStatus.Begin) { return; } if (e.Button == MouseButtons.Left) { cutRect.Width = e.X - cutRect.X; cutRect.Height = e.Y - cutRect.Y; cutState = eCutStatus.End; } }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (cutState != eCutStatus.Ready) { return; } if (e.Button == MouseButtons.Left) { cutRect.X = e.X; cutRect.Y = e.Y; cutRect.Width = 0; cutRect.Height = 0; cutState = eCutStatus.Begin; } }
protected override void OnMouseDoubleClick(MouseEventArgs e) { base.OnMouseDoubleClick(e); if (e.X > cutRect.Left && e.X < cutRect.Right && e.Y > cutRect.Top && e.Y < cutRect.Bottom) { Bitmap cutPic = new Bitmap(cutRect.Width, cutRect.Height); Graphics g = Graphics.FromImage(cutPic); g.DrawImage(this.BackgroundImage, new Rectangle(0, 0, cutRect.Width, cutRect.Height), cutRect, GraphicsUnit.Pixel); Clipboard.SetImage(cutPic); g.Dispose(); cutPic.Dispose(); cutState = eCutStatus.None; cutRect.Width = 0; cutRect.Height = 0; this.Hide(); } }
/// <summary> /// This function returns information about the box girder slab thicknesses at a given horizontal location across the box girder section.<para/> /// If the bridge object is not currently linked to existing objects in the model, an error is returned. /// TODO: Handle this. /// </summary> /// <param name="name">The name of an existing bridge object.</param> /// <param name="cutIndex">The index number of the section cut in this bridge object. <para/> /// This must be from 0 to Count-1, where Count is the value returned by the function <see cref="Superstructure.CountSuperstructureCut"/>. <para/> /// Section cuts will be in order of increasing station and increasing location as defined in the <see cref="Superstructure.GetSuperstructureCutLocation"/>.</param> /// <param name="xCoordinate">The X coordinate in the section local coordinate system at which a vertical line is passed through the section and the slab coordinates are returned.</param> /// <param name="status">Status of what is cut.</param> /// <param name="yTopmostSectionCut">The topmost Y coordinate where the vertical line cuts the section. <para/> /// This item is returned as zero when <paramref name="status"/> = <see cref="eCutStatus.NoCut"/>.</param> /// <param name="yBottommostSectionCut">The bottommost Y coordinate where the vertical line cuts the section.<para/> /// This item is returned as zero when <paramref name="status"/> = <see cref="eCutStatus.NoCut"/>.</param> /// <param name="yTopmostInteriorCellCut">The topmost Y coordinate where the vertical line cuts an interior cell.<para/> /// This item is returned as zero when <paramref name="status"/> = <see cref="eCutStatus.NoCut"/> or <see cref="eCutStatus.SectionAndInteriorCellCut"/>.</param> /// <param name="yBottommostInteriorCellCut">The bottommost Y coordinate where the vertical line cuts an interior cell.<para/> /// This item is returned as zero when <paramref name="status"/> = <see cref="eCutStatus.NoCut"/> or <see cref="eCutStatus.SectionAndInteriorCellCut"/>.</param> public void GetSuperstructureCutSlabCoordinatesAtX(string name, int cutIndex, double xCoordinate, ref eCutStatus status, ref double yTopmostSectionCut, ref double yBottommostSectionCut, ref double yTopmostInteriorCellCut, ref double yBottommostInteriorCellCut) { int csiStatus = 0; _callCode = _sapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSlabCoordsAtX(name, cutIndex, xCoordinate, ref csiStatus, ref yTopmostSectionCut, ref yBottommostSectionCut, ref yTopmostInteriorCellCut, ref yBottommostInteriorCellCut); if (throwCurrentApiException(_callCode)) { throw new CSiException(API_DEFAULT_ERROR_CODE); } status = (eCutStatus)csiStatus; }