TBaseLine GetBaseLine(int num) { TBaseLine Res = null; if ((num >= 0) && (num < Lines.Count)) { Res = (TBaseLine)Lines.ElementAt(num); } return(Res); }
public TFlagShape(int Step, TBaseLine Owner, int number) : base(0, 0, Step, number) { DrawCaption = false; F_Center = new Point(0, 0); F_Radius = 0; F_TypeFlag = 0; F_Owner = Owner; // BrushStyle = bsSolid; F_ShOwner = null; F_ShPos = -1; }
public void FlagDestroy(TBaseLine ASender, TFlagShape AFlag, int APosFlag) { if (APosFlag == 1) { F_MiddleFlag = null; } if (FOnRctFlagDestroy != null) { FOnRctFlagDestroy(this, AFlag, APosFlag); } }
public void FlagCreate(TBaseLine ASender, TFlagShape AFlag, int APosFlag) { if (APosFlag == 1) { F_MiddleFlag = AFlag; } if (FOnRctFlagCreate != null) { FOnRctFlagCreate(this, AFlag, APosFlag); } }
public TRectLine(int step, int number) { x0 = 0; y0 = 0; x1 = 0; y1 = 0; Lines = new List <object>(); F_id = number; F_bend = 0; F_Width = 1; F_Color = Color.Black; // F_Style = psSolid; // F_PenMode = pmCopy; F_Step = step; F_DrawFlag = false; F_FlagColor = Color.White; F_FlagType = 1; F_DrawFlagS = false; F_FlagSColor = Color.White; F_FlagSType = 1; F_DrawFlagE = false; F_FlagEColor = Color.White; F_FlagEType = 1; f_LEControl = false; // F_WndHandler = 0; // F_UnderControl = NULL; // F_MiddleFlag = NULL; // FOnRctFlagCreate = NULL; // FOnRctFlagDestroy = NULL; // f_CurrentBaseLine = 0; f_PaintLine = true; for (int i = 0; i <= 2; i++) { TBaseLine line = new TBaseLine(0, 0, 0, 0, F_Step); line.OnFlagCreate = FlagCreate; line.OnFlagDestroy = FlagDestroy; line.OnFlagImport = FlagImport; Lines.Add(line); } }
void CreateMiddleFlagToLine(TBaseLine ALine, bool ADrawFlag) { if (F_MiddleFlag != null) { if (ADrawFlag) { ALine.ImportFlag(F_MiddleFlag, 1, F_MiddleFlag.TypeFlag, F_MiddleFlag.Radius, F_MiddleFlag.BrushColor); } else { ALine.DrawFlag = false; } return; } else { ALine.DrawFlag = ADrawFlag; } }
void FlagImport(TBaseLine ASource, TBaseLine ADest, TFlagShape AFlag, int APosFlag) { ASource.NilFlag(AFlag); }