Beispiel #1
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);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 从文件读入数据
        /// </summary>
        /// <param name="sr">指示要从中读入数据的自定义流类对象</param>
        public override void LoadFrom(MyReader sr)
        {
            int crc = sr.LoadInt();

            for (int i = 0; i < crc; i++)
            {
                ColorRange cr = new ColorRange();
                cr.LoadFrom(sr);
                this._colors.Add(cr);
            }
        }
Beispiel #3
0
        public virtual void LoadFrom(MyReader mr)
        {
            bool isRect = mr.LoadBool();

            if (isRect && ShowShape is CircleMode)
            {
                ShowShape = new RectangleMode();
            }
            else if (!isRect && ShowShape is RectangleMode)
            {
                ShowShape = new CircleMode();
            }
            ShowShape.X      = mr.LoadInt();
            ShowShape.Y      = mr.LoadInt();
            ShowShape.Width  = mr.LoadInt();
            ShowShape.Height = mr.LoadInt();
            ShowShape.Angle  = mr.LoadDouble();
            mr.LoadLineEnd();
            foreach (var item in uis)
            {
                item.LoadFrom(mr);
            }
            mr.LoadLineEnd();
        }
Beispiel #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);
            }
        }
Beispiel #5
0
 /// <summary>
 /// 从文件读入数据
 /// </summary>
 /// <param name="sr">指示要从中读入数据的自定义流类对象</param>
 public override void LoadFrom(MyReader sr)
 {
     target = sr.LoadInt();
 }