Пример #1
0
        public static WallType TypeByID(dsWall dsWall, int ID)
        {
            dsWall.tbWallSegmentRow rw = dsWall.tbWallSegment.FindByКод(ID);

            if (rw == null)
                return WallType.Wall;
            if (rw.Длина < 1e-6)
                return WallType.Corner;

            if (Math.Abs(rw.Угол) < 1e-6)
                return WallType.Line;
            return WallType.Arc;
        }
Пример #2
0
 public static WallSection SectionByID(dsWall dsWall, int ID)
 {
     switch (TypeByID(dsWall, ID))
     {
         case WallType.Arc:
             return new WallArc(dsWall, ID);
         case WallType.Corner:
             return new WallCorner(dsWall, ID);
         case WallType.Line:
             return new WallLine(dsWall, ID);
     }
     return null;
 }
Пример #3
0
        public static void FillNode(TreeNode nd, WallType Type, dsWall dsWall, int ID)
        {
            switch (Type)
            {
                case WallType.Wall:
                    nd.Tag = new Wall(dsWall, ID);
                    break;
                case WallType.Arc:
                    nd.Tag = new WallArc(dsWall, ID);
                    break;
                case WallType.Line:
                    nd.Tag = new WallLine(dsWall, ID);
                    break;
                case WallType.Corner:
                    nd.Tag = new WallCorner(dsWall, ID);
                    break;
            }

            nd.Text = (nd.Tag as WallSection).FullName;
            nd.ImageKey = (nd.Tag as WallSection).Type.ToString();
            nd.SelectedImageKey = (nd.Tag as WallSection).Type.ToString();
        }
Пример #4
0
 public WallArc(dsWall dsWall, int ID)
     : base(dsWall, ID)
 {
 }
Пример #5
0
 public WallSection(dsWall dsWall, int ID)
 {
     Its_ID = ID;
     this.dsWall = dsWall;
     Calc();
 }
Пример #6
0
 public WallPoint(dsWall dsWall, int Numer)
 {
     this.dsWall = dsWall;
     N = Numer;
     Calc();
 }
Пример #7
0
 public WallCorner(dsWall dsWall, int ID)
     : base(dsWall, ID)
 {
 }
Пример #8
0
 public Enumerator(dsWall dsWall, int WallId)
 {
     Index = -1;
     this.dsWall = dsWall;
     this.WallId = WallId;
 }
Пример #9
0
 public LengthWallSection(dsWall dsWall, int ID)
     : base(dsWall, ID)
 {
 }
Пример #10
0
 public WallLine(dsWall dsWall, int ID)
     : base(dsWall, ID)
 {
 }
Пример #11
0
 public WallPartSection(dsWall dsWall, int ID)
     : base(dsWall, ID)
 {
 }