private static void DisplayResult_Invoke(string result) { _formMain.ShowAndSaveMsg_Invoke(result); CogColorConstants outColor = result == resultOK ? CogColorConstants.Green : CogColorConstants.Red; ShowLabel_Invoke(_formMain.cogRecordDisplay1, 30, 1600, 100, outColor, result); }
//public void DrawStaticLine(double _StartX, double _StartY, double _EndX, double _EndY, int _Tickness, string _GroupName, CogColorConstants _Color) //{ // StaticLineSegment.Color = _Color; // StaticLineSegment.Interactive = false; // StaticLineSegment.LineStyle = CogGraphicLineStyleConstants.Solid; // StaticLineSegment.LineWidthInScreenPixels = _Tickness; // StaticLineSegment.SetStartEnd(_StartX, _StartY, _EndX, _EndY); // kCogDisplay.StaticGraphics.Add(StaticLineSegment, _GroupName); //} public void DrawStaticLine(CogLineSegment _Line, string _GroupName, CogColorConstants _Color, CogGraphicLineStyleConstants _LineStyle = CogGraphicLineStyleConstants.Solid) { StaticLineSegment = _Line; StaticLineSegment.Color = _Color; StaticLineSegment.Interactive = false; StaticLineSegment.LineStyle = _LineStyle; kCogDisplay.StaticGraphics.Add(StaticLineSegment, _GroupName); }
/// <summary> /// 수정이 불 가능한 고정 도형 그리기 /// </summary> /// <param name="_cogPolygon">Polygon 객체</param> /// <param name="_groupName">그려지는 그룹명</param> /// <param name="_color">색상</param> public void DrawStaticShape(CogPolygon _cogPolygon, string _groupName, CogColorConstants _color, int _LineSize = 2) { StaticPolygonGraphic = new CogPolygon(); StaticPolygonGraphic = _cogPolygon; StaticPolygonGraphic.Color = _color; StaticPolygonGraphic.LineWidthInScreenPixels = _LineSize; StaticPolygonGraphic.Selected = false; kCogDisplay.ClearDisplay(_groupName); kCogDisplay.StaticGraphics.Add(StaticPolygonGraphic.CopyBase(CogCopyShapeConstants.All), _groupName); }
public void DrawText(string _Message, double _StartX, double _StartY, CogColorConstants _Color, int _FontSize = 9, CogGraphicLabelAlignmentConstants _Align = CogGraphicLabelAlignmentConstants.TopLeft) { System.Drawing.Font _Font = new System.Drawing.Font("나눔바른고딕", _FontSize, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); cogLabel.Color = _Color; cogLabel.Font = _Font; cogLabel.Alignment = _Align; cogLabel.SetXYText(_StartX, _StartY, _Message); kCogDisplay.StaticGraphics.Add(cogLabel, "Message"); }
public void DrawStaticShape(CogCircle _CogCircle, string _groupName, CogColorConstants _color, int _LineSize = 2) { StaticCircleGraphic = new CogCircle(); StaticCircleGraphic = _CogCircle; StaticCircleGraphic.Color = _color; StaticCircleGraphic.LineWidthInScreenPixels = _LineSize; StaticCircleGraphic.GraphicDOFEnable = CogCircleDOFConstants.All; kCogDisplay.ClearDisplay(_groupName); kCogDisplay.StaticGraphics.Add(StaticCircleGraphic, _groupName); }
/// <summary> /// Display에 그리기 /// </summary> /// <param name="_cogRectAffine">CogRectangleAffine 영역</param> /// <param name="_Interactive">Interactive = true, Static = false</param> public void DrawShape(CogRectangleAffine _cogRectAffine, string _groupName, CogColorConstants _color, bool _Interactive) { if (_Interactive == true) { DrawInterActiveShape(_cogRectAffine, _groupName, _color); } else { DrawStaticShape(_cogRectAffine, _groupName, _color); } }
/// <summary> /// Display에 그리기 /// </summary> /// <param name="_cogRectAffine">CogRectangleAffine 영역</param> /// <param name="_Interactive">Interactive = true, Static = false</param> public void DrawShape(CogPointMarker _cogPointMarker, string _groupName, CogColorConstants _color, bool _Interactive) { if (_Interactive == true) { DrawInterActiveShape(_cogPointMarker, _groupName, _color); } else { DrawStaticShape(_cogPointMarker, _groupName, _color); } }
public void DrawStaticShape(CogRectangle _cogRect, string _groupName, CogColorConstants _color, int _LineSize, CogGraphicLineStyleConstants _Style) { StaticRectGraphic = new CogRectangle(); StaticRectGraphic = _cogRect; StaticRectGraphic.Color = _color; StaticRectGraphic.LineWidthInScreenPixels = _LineSize; StaticRectGraphic.LineStyle = _Style; StaticRectGraphic.Selected = false; kCogDisplay.ClearDisplay(_groupName); kCogDisplay.StaticGraphics.Add(StaticRectGraphic.CopyBase(CogCopyShapeConstants.All), _groupName); }
/// <summary> /// 수정이 가능한 도형 그리기 /// </summary> /// <param name="_cogRectAffine">RectAffine 객체</param> /// <param name="_groupName">그려지는 그룹명</param> /// <param name="_color">색상</param> public void DrawInterActiveShape(CogRectangle _cogRect, string _groupName, CogColorConstants _color) { InteractiveRectGraphic = new CogRectangle(); InteractiveRectGraphic = _cogRect; InteractiveRectGraphic.Interactive = true; InteractiveRectGraphic.Color = _color; InteractiveRectGraphic.LineWidthInScreenPixels = 2; InteractiveRectGraphic.GraphicDOFEnable = CogRectangleDOFConstants.All; kCogDisplay.ClearDisplay(_groupName); kCogDisplay.InteractiveGraphics.Add(InteractiveRectGraphic, _groupName, true); }
public static void ShowLabel_Invoke(CogRecordDisplay disp, float size, double posX, double posY, CogColorConstants color, string text) { var label = new CogGraphicLabel(); label.SelectedSpaceName = "#"; label.Alignment = CogGraphicLabelAlignmentConstants.TopLeft; label.Font = new Font("Arial", size); label.Color = color; label.SetXYText(posX, posY, text); _formMain.Invoke((MethodInvoker)(() => { disp.StaticGraphics.Add(label, "label"); })); }
// 2013.12.22 public void AddLine(double dX, double dY, double dRotation, CogColorConstants color) { CogLine cogLine = new CogLine(); cogLine.X = dX; cogLine.Y = dY; cogLine.Rotation = dRotation; ICogGraphic icogGraphic = cogLine as ICogGraphic; icogGraphic.Color = color; AddStaticGraphic(icogGraphic, ""); }
public void AddTxt(double dX, double dY, string strTxt, CogColorConstants color) { CogGraphicLabel cogGraphicLabel = new CogGraphicLabel(); cogGraphicLabel.X = dX; cogGraphicLabel.Y = dY; cogGraphicLabel.SelectedSpaceName = "#"; cogGraphicLabel.Alignment = CogGraphicLabelAlignmentConstants.TopLeft; cogGraphicLabel.Text = strTxt; ICogGraphic icogGraphic = cogGraphicLabel as ICogGraphic; icogGraphic.Color = color; AddStaticGraphic(icogGraphic, ""); }
// 2013.12.22 public void AddLine(double dX, double dY, double dRotation, CogColorConstants color, string strSpaceName) { CogLine cogLine = new CogLine(); cogLine.X = dX; cogLine.Y = dY; cogLine.Rotation = dRotation; cogLine.SelectedSpaceName = strSpaceName; ICogGraphic icogGraphic = cogLine as ICogGraphic; icogGraphic.Color = color; AddStaticGraphic(icogGraphic, ""); }
public static void GCF(CogRecordDisplay mdisplay, string s1, string font, int size, double d1, double d2, string lab, CogColorConstants mcolor, CogGraphicLabelAlignmentConstants mali) { var mlable = new CogGraphicLabel(); //mfont = "微软雅黑"; var mfont = new Font(font, size, FontStyle.Regular); mlable.GraphicDOFEnableBase = CogGraphicDOFConstants.None; mlable.SelectedSpaceName = s1; mlable.Interactive = false; mlable.Font = mfont; mlable.Color = mcolor; mlable.Alignment = mali; mlable.SetXYText(d1, d2, lab); mdisplay.InteractiveGraphics.Add(mlable, "", false); }
// 2013.01.07 public void AddTxt(double dX, double dY, string strTxt, CogColorConstants color, int nSize) { CogGraphicLabel cogGraphicLabel = new CogGraphicLabel(); cogGraphicLabel.X = dX; cogGraphicLabel.Y = dY; cogGraphicLabel.SelectedSpaceName = "#"; cogGraphicLabel.Alignment = CogGraphicLabelAlignmentConstants.TopLeft; cogGraphicLabel.Text = strTxt; // 2013.01.07 System.Drawing.Font tmpFont = new System.Drawing.Font("Microsoft Sans Serif", nSize); cogGraphicLabel.Font = tmpFont; ICogGraphic icogGraphic = cogGraphicLabel as ICogGraphic; icogGraphic.Color = color; AddStaticGraphic(icogGraphic, ""); tmpFont.Dispose(); }
public void DrawCross(int _StartX, int _StartY, int _LengthX, int _LengthY, string _GroupName, CogColorConstants _Color) { if (_LengthX == 0 || _LengthY == 0) { return; } staticGraphicHor.Color = staticGraphicVer.Color = _Color; staticGraphicHor.Interactive = staticGraphicVer.Interactive = false; staticGraphicHor.GraphicDOFEnable = staticGraphicVer.GraphicDOFEnable = CogLineSegmentDOFConstants.BothPoints; staticGraphicHor.LineStyle = staticGraphicVer.LineStyle = CogGraphicLineStyleConstants.Solid; staticGraphicHor.LineWidthInScreenPixels = staticGraphicVer.LineWidthInScreenPixels = 1; staticGraphicHor.SetStartLengthRotation(_StartX - _LengthX / 2, _StartY, _LengthX, 0); staticGraphicVer.SetStartLengthRotation(_StartX, _StartY - _LengthY / 2, _LengthY, 0 + 1.57); if (null == _GroupName) { kCogDisplay.StaticGraphics.Add(staticGraphicHor, "CrossHor"); kCogDisplay.StaticGraphics.Add(staticGraphicVer, "CrossVer"); } else { kCogDisplay.StaticGraphics.Add(staticGraphicHor, _GroupName + "Hor"); kCogDisplay.StaticGraphics.Add(staticGraphicVer, _GroupName + "Ver"); } }
private void DrawReferRegionFunction(CogRectangle _ReferRegion, double _OriginX, double _OriginY, CogColorConstants _Color) { if (eTeachStep.ALGO_SET != CurrentTeachStep) { MessageBox.Show("Not select \"Algorithm Set\" button"); return; } AlgorithmAreaDisplayRefresh(); CogPointMarker _PointMarker = new CogPointMarker(); _PointMarker.SetCenterRotationSize(_OriginX, _OriginY, 0, 1); kpTeachDisplay.DrawInterActiveShape(_ReferRegion, "ReferRegion", _Color); kpTeachDisplay.DrawInterActiveShape(_PointMarker, "ReferOriginPoint", _Color, 14); }
public void AddLine(double dStartX, double dStartY, double dEndX, double dEndY, CogColorConstants color) { CogLineSegment cogLineSegment = new CogLineSegment(); cogLineSegment.StartX = dStartX; cogLineSegment.StartY = dStartY; cogLineSegment.EndX = dEndX; cogLineSegment.EndY = dEndY; ICogGraphic icogGraphic = cogLineSegment as ICogGraphic; icogGraphic.Color = color; AddStaticGraphic(icogGraphic, ""); }
/// <summary> /// RectangleAffine의 선택 여부를 설정하는 Draw 함수 /// </summary> /// <param name="_cogRectAffine"></param> /// <param name="_groupName"></param> /// <param name="_color"></param> /// <param name="_DOFConstants"></param> public void DrawInterActiveShape(CogRectangleAffine _cogRectAffine, string _groupName, CogColorConstants _color, CogRectangleAffineDOFConstants _DOFConstants, bool IsSelected = false) { InteractiveRectAffineGraphic = new CogRectangleAffine(); InteractiveRectAffineGraphic = _cogRectAffine; InteractiveRectAffineGraphic.Interactive = true; InteractiveRectAffineGraphic.Color = _color; InteractiveRectAffineGraphic.SelectedLineWidthInScreenPixels = 3; InteractiveRectAffineGraphic.LineWidthInScreenPixels = 3; InteractiveRectAffineGraphic.GraphicDOFEnable = _DOFConstants; InteractiveRectAffineGraphic.Selected = IsSelected; kCogDisplay.ClearDisplay(_groupName); kCogDisplay.InteractiveGraphics.Add(InteractiveRectAffineGraphic, _groupName, true); }
public void DrawStaticCross(double _StartX, double _StartY, int _Thickness, int _CrossSize, string _GroupName, CogColorConstants _Color) { StaticPointMarker = new CogPointMarker(); StaticPointMarker.Interactive = false; StaticPointMarker.Color = _Color; StaticPointMarker.X = _StartX; StaticPointMarker.Y = _StartY; StaticPointMarker.LineWidthInScreenPixels = _Thickness; StaticPointMarker.SizeInScreenPixels = _CrossSize; StaticPointMarker.GraphicType = CogPointMarkerGraphicTypeConstants.Cross; StaticPointMarker.GraphicDOFEnable = CogPointMarkerDOFConstants.All; //kCogDisplay.ClearDisplay(_GroupName); kCogDisplay.StaticGraphics.Add(StaticPointMarker, _GroupName); }
//LDH, 2017.07.16, Distance Line 그리기 public void DrawDistance(int _StartX, int _StartY, int _EndX, int _EndY, string _DistanceValueName, string _GroupName, CogColorConstants _Color) { staticGraphicDistance.Color = _Color; staticGraphicDistance.Interactive = false; staticGraphicDistance.GraphicDOFEnable = CogLineSegmentDOFConstants.BothPoints; staticGraphicDistance.LineStyle = CogGraphicLineStyleConstants.Solid; staticGraphicDistance.LineWidthInScreenPixels = 1; staticGraphicDistance.SetStartEnd(_StartX, _StartY, _EndX, _EndY); if (null == _GroupName) { kCogDisplay.StaticGraphics.Add(staticGraphicDistance, "DistanceLine"); } else { kCogDisplay.StaticGraphics.Add(staticGraphicDistance, _GroupName + "DistanceLine"); } if (_StartY > _EndY) { DrawText(_DistanceValueName, _StartX + 10, _StartY - 50, _Color); } else { DrawText(_DistanceValueName, _StartX + 10, _StartY + 50, _Color); } }
public void DrwaInterActiveCross(int _StartX, int _StartY, int _Thickness, int _CrossSize, string _GroupName, CogColorConstants _Color) { InteractivePointMarker = new CogPointMarker(); InteractivePointMarker.Interactive = true; InteractivePointMarker.Color = _Color; InteractivePointMarker.X = _StartX; InteractivePointMarker.Y = _StartY; InteractivePointMarker.LineWidthInScreenPixels = _Thickness; InteractivePointMarker.SizeInScreenPixels = _CrossSize; InteractivePointMarker.GraphicType = CogPointMarkerGraphicTypeConstants.Cross; InteractivePointMarker.GraphicDOFEnable = CogPointMarkerDOFConstants.All; kCogDisplay.ClearDisplay(_GroupName); kCogDisplay.InteractiveGraphics.Add(InteractivePointMarker, _GroupName, true); }
/// <summary> /// 수정이 불 가능한 고정 도형 그리기 /// </summary> /// <param name="_cogRectAffine">RectAffine 객체</param> /// <param name="_groupName">그려지는 그룹명</param> /// <param name="_color">색상</param> public void DrawStaticShape(CogRectangleAffine _cogRectAffine, string _groupName, CogColorConstants _color, int _LineSize = 2) { StaticRectAffineGraphic = new CogRectangleAffine(); StaticRectAffineGraphic = _cogRectAffine; StaticRectAffineGraphic.Color = _color; StaticRectAffineGraphic.LineWidthInScreenPixels = _LineSize; StaticRectAffineGraphic.Selected = true; kCogDisplay.ClearDisplay(_groupName); kCogDisplay.StaticGraphics.Add(StaticRectAffineGraphic.CopyBase(CogCopyShapeConstants.All), _groupName); }
public void DrawStaticLine(double _StartX, double _StartY, double _Length, double _Rotate, int _Tickness, string _GroupName, CogColorConstants _Color) { StaticLineSegment.Color = _Color; StaticLineSegment.Interactive = false; StaticLineSegment.LineStyle = CogGraphicLineStyleConstants.Solid; StaticLineSegment.LineWidthInScreenPixels = _Tickness; StaticLineSegment.SetStartLengthRotation(_StartX, _StartY, _Length, _Rotate); kCogDisplay.StaticGraphics.Add(StaticLineSegment, _GroupName); }
/// <summary> /// /// </summary> /// <param name="_cogPointMarker"></param> /// <param name="_groupName"></param> /// <param name="_color"></param> public void DrawInterActiveShape(CogPointMarker _cogPointMarker, string _groupName, CogColorConstants _color, int _LineSize = 12) { InteractivePointMarker = new CogPointMarker(); InteractivePointMarker = _cogPointMarker; InteractivePointMarker.Interactive = true; InteractivePointMarker.Color = _color; InteractivePointMarker.LineWidthInScreenPixels = 2; InteractivePointMarker.SizeInScreenPixels = _LineSize; InteractivePointMarker.GraphicType = CogPointMarkerGraphicTypeConstants.Cross; InteractivePointMarker.GraphicDOFEnable = CogPointMarkerDOFConstants.All; kCogDisplay.ClearDisplay(_groupName); kCogDisplay.InteractiveGraphics.Add(InteractivePointMarker, _groupName, true); }
/// <summary> /// 수정이 불가능한 고정 도형 그리기 /// </summary> /// <param name="_cogRectAffine">RectAffine 객체</param> /// <param name="_groupName">그려지는 그룹명</param> /// <param name="_color">색상</param> public void DrawStaticShape(CogPointMarker _cogPointMarker, string _groupName, CogColorConstants _color, int _LineSize = 12, bool ClearFlag = true) { StaticPointMarker = new CogPointMarker(); StaticPointMarker = _cogPointMarker; StaticPointMarker.Color = _color; StaticPointMarker.LineWidthInScreenPixels = 2; StaticPointMarker.SizeInScreenPixels = _LineSize; StaticPointMarker.GraphicType = CogPointMarkerGraphicTypeConstants.Cross; if (ClearFlag == true) { kCogDisplay.ClearDisplay(_groupName); } kCogDisplay.StaticGraphics.Add(StaticPointMarker, _groupName); }