Example #1
0
        /*         public TRect GetAnyRect();
         *       public TRect GetRectSummary(TRect ARect);*/
        public TCompositeBaseWorkItem FindItem(int ABaseShapeID, ref TCompositeBaseWork AFind)
        {
            TCompositeBaseWorkItem WI;
            TCompositeBaseWorkItem Res = null;

            for (int i = 0; i <= f_ListItem.Count - 1; i++)
            {
                WI = (TCompositeBaseWorkItem)(f_ListItem.ElementAt(i));
                if (WI.BaseShape != null)
                {
                    if (WI.BaseShape.ID == ABaseShapeID)
                    {
                        AFind = this;
                        return(WI);
                    }
                }
                for (int j = 0; j <= WI.CompositeWorkCount - 1; j++)
                {
                    Res = WI.CompositeWork[j].FindItem(ABaseShapeID, ref AFind);
                    if (Res != null)
                    {
                        return(Res);
                    }
                }
            }
            return(null);
        }
Example #2
0
 void  SetCompositeWorkShape(TCompositeBaseWork ACWS)
 {
     f_CompositeWorkShape = ACWS;
     if (f_CompositeWorkShape != null)
     {
         /*     f_CompositeWorkShape.FirstLine.UnderControl = F_UnderControl;
          *   f_CompositeWorkShape.FirstLine.WndHandler = F_WndHandler;
          *   f_CompositeWorkShape.FirstLine.OnRctFlagCreate = &FlagCreate;
          *   f_CompositeWorkShape.FirstLine.OnRctFlagDestroy = &FlagDestroy;*/
     }
 }
Example #3
0
        private void Button3_Click(object sender, EventArgs e)
        {
            TBaseWorkShape Sel = Grid.FindShapeFromCompositeWork(Grid.SelectedTFE.ID);

            if (Sel != null)
            {
                if (Sel.CompositeWorkShape != null)
                {
                    TCompositeBaseWork F = new TCompositeBaseWork();
                    Grid.FindComositeBaseWork2(Grid.SelectedTFE.ID, ref F);
                    Sel = F.ConvertedBWS;
                }
                TBaseWorkShape WN = Grid.CreateTempWorkShape(Sel.TypeShape, new Point(0, 0), Sel.FirstShapeId - 1);

                DrawObject imageTfe = new DrawObject();
                //     fmParamAlternative.pbTfs.BackgroundImage = Glbmp;
                BuildGlp(WN, imageTfe, Grid.SelectedTFE);
                ShowParamAlternative(Grid.SelectedTFE, LevelController.ParentShapeID, f_TypeParam, imageTfe, false);
            }
        }
Example #4
0
        /*     void CoordinateCorrectForCompositeWork();*/
        public TCompositeBaseWorkItem FindComositeBaseWork2(int ATFEID, ref TCompositeBaseWork AFind)
        {
            TBaseWorkShape         TempWork;
            TCompositeBaseWork     WF = new TCompositeBaseWork();
            TCompositeBaseWorkItem Item;

            TempWork = g_PainterList.First();
            while (TempWork != null)
            {
                if (TempWork.CompositeWorkShape != null)
                {
                    Item = TempWork.CompositeWorkShape.FindItem(ATFEID, ref WF);
                    if (Item != null)
                    {
                        AFind = WF;
                        return(Item);
                    }
                }
                TempWork = g_PainterList.Next();
            }
            AFind = null;
            return(null);
        }
Example #5
0
        public TBaseWorkShape(int X, int Y, int Step, int NumberShape_Id, int Block_Id, int NumberLine_Id)
        {
            F_Step          = Step;
            F_NumberShapeId = NumberShape_Id;
            F_NumberLineId  = NumberLine_Id;
            F_BlockId       = Block_Id;
            F_LastShapeId   = F_NumberShapeId;
            F_LastLineId    = F_NumberLineId;

            F_StartPoint     = new Point(X, Y);
            f_BaseStartPoint = F_StartPoint;

            F_BrushColor = Color.White;
            //         F_BrushStyle = bsClear;
            F_PenColor   = Color.Black;
            F_FrameColor = Color.Red;
            //         F_PenMode = pmCopy;
            //         F_Font = new Graphics::TFont;

            F_PenWidth = 1;
            //        F_PenStyle = psSolid;
            //         F_DrawFrame = false;

            F_LineColor = Color.Black;
            F_LineWidth = 1;
            //        F_LineStyle = psSolid;
            //         F_LineMode = pmCopy;

            F_IsLineCopy  = true;
            F_IsBrushCopy = true;
            F_IsFontCopy  = true;
            F_IsPenCopy   = true;
            //          OnShapeCopy = NULL;
            //        OnLineCopy = NULL;
            F_DrawCaption = true;

            F_DrawFirstFlag  = false;
            F_DrawLastFlag   = false;
            F_DrawMiddleFlag = false;

            WorkShapes = new List <object>();
            WorkLines  = new List <object>();
            //   ListFlag =  new List<object>();

            f_LEControl = false;

            /*           F_WndHandler = 0;
             *         F_UnderControl = NULL;*/
            F_FlagColor     = Color.White;
            F_FlagType      = 0;
            F_FlagSColor    = Color.White;
            F_FlagSType     = 0;
            F_FlagEColor    = Color.White;
            F_FlagEType     = 0;
            F_FrameColorTFE = Color.Red;

            FOnWSFlagCreate      = null;
            FOnWSFlagDestroy     = null;
            f_ApplyAttribute     = true;
            F_DrawCaption        = true;
            f_ParentShapeID      = 0;
            f_Tag                = 0;
            FOnAfterLinePrepare  = null;
            f_LEActive           = true;
            f_BaseOffsetX        = 0;
            f_BaseOffsetY        = 0;
            F_WidthWork          = 0;
            F_Indent             = 0;
            f_CompositeWorkShape = null;
        }