Ejemplo n.º 1
0
        public static CheckWinBase NewComponent(WinType type)
        {
            CheckWinBase win = null;

            switch (type)
            {
            case WinType.None:
                break;

            case WinType.Board:
                break;

            case WinType.SubBoard:
                break;

            case WinType.Chip:
                win = new Chip();
                break;

            case WinType.BGA:
                //win = new BGA();
                break;

            case WinType.MarkPoint:
                break;

            case WinType.Land:
                break;

            default:
                break;
            }
            return(win);
        }
Ejemplo n.º 2
0
        public void LoadFrom(MyReader mr)
        {
            id               = mr.LoadInt();
            ShowShape.X      = mr.LoadInt();
            ShowShape.Y      = mr.LoadInt();
            ShowShape.Width  = mr.LoadInt();
            ShowShape.Height = mr.LoadInt();
            ShowShape.Angle  = mr.LoadDouble();

            int mpc = mr.LoadInt();
            int cpc = mr.LoadInt();

            mr.LoadLineEnd();

            for (int i = 0; i < mpc; i++)
            {
                MarkPoint mp = new MarkPoint();
                mp.LoadFrom(mr);
                AddWin(mp);
            }
            for (int i = 0; i < cpc; i++)
            {
                WinType      wt = mr.LoadType();
                CheckWinBase cw = NewComponent(wt);
                cw.LoadFrom(mr);
                AddWin(cw);
            }
        }
Ejemplo n.º 3
0
 public void AddCheckWin(CheckWinBase checkwin)
 {
     if (Components == null)
     {
         Components = new List <CheckWinBase>();
     }
     Components.Add(checkwin);
 }
Ejemplo n.º 4
0
        public void LoadFrom(MyReader mr)
        {
            pcbName             = mr.LoadString();
            pcbWidth            = mr.LoadInt();
            pcbHeight           = mr.LoadInt();
            spareWidth          = mr.LoadInt();
            _pixelSize          = mr.LoadDouble();
            useMainBoardBarcode = mr.LoadBool();
            useSubBoardBarcode  = mr.LoadBool();
            customer            = mr.LoadString();
            halftoneHeight      = mr.LoadDouble();

            int mpc = mr.LoadInt();
            int sbc = mr.LoadInt();
            int cpc = mr.LoadInt();

            mr.LoadLineEnd();
            for (int i = 0; i < mpc; i++)
            {
                MarkPoint mp = new MarkPoint();
                mp.LoadFrom(mr);
                AddWin(mp);
            }
            for (int i = 0; i < sbc; i++)
            {
                SubBoard sb = new SubBoard();
                sb.LoadFrom(mr);
                AddWin(sb);
            }
            for (int i = 0; i < cpc; i++)
            {
                WinType      wt = mr.LoadType();
                CheckWinBase cw = NewComponent(wt);
                cw.LoadFrom(mr);
                AddWin(cw);
            }
        }