Esempio n. 1
0
        TBaseLine GetBaseLine(int num)
        {
            TBaseLine Res = null;

            if ((num >= 0) && (num < Lines.Count))
            {
                Res = (TBaseLine)Lines.ElementAt(num);
            }
            return(Res);
        }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public void  FlagDestroy(TBaseLine ASender, TFlagShape AFlag, int APosFlag)
 {
     if (APosFlag == 1)
     {
         F_MiddleFlag = null;
     }
     if (FOnRctFlagDestroy != null)
     {
         FOnRctFlagDestroy(this, AFlag, APosFlag);
     }
 }
Esempio n. 4
0
 public void FlagCreate(TBaseLine ASender, TFlagShape AFlag, int APosFlag)
 {
     if (APosFlag == 1)
     {
         F_MiddleFlag = AFlag;
     }
     if (FOnRctFlagCreate != null)
     {
         FOnRctFlagCreate(this, AFlag, APosFlag);
     }
 }
Esempio n. 5
0
        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);
            }
        }
Esempio n. 6
0
 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;
     }
 }
Esempio n. 7
0
 void FlagImport(TBaseLine ASource, TBaseLine ADest, TFlagShape AFlag, int APosFlag)
 {
     ASource.NilFlag(AFlag);
 }