Exemplo n.º 1
0
 /// <summary>
 /// Конструктор для развертывания фигуры по структуре
 /// </summary>
 /// <param name="box"></param>
 public AbstractBox(StructBox box)
 {
     _pen = new Pen(box.Color, box.Width);
     for (int i = 0; i < box.Points.Count; i++)
     {
         Point point = new Point(box.Points[i].Point_X, box.Points[i].Point_Y);
         Points.Add(point);
     }
     Font            = box.Font;
     RectangleWidth  = SizeWidth();
     RectangleHeight = SizeHeight();
     IDataCommon     = box.Data;
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ReadySS"></param>
        /// <param name="CallObj"></param>
        public UnLoading(Model ReadySS, ABaseMode CallObj)
            : base(ReadySS, CallObj)
        {
            //Стандартные включалки
            CurrentMode = Mode.UnLoading;

            //Просто
            AdressUnLoad   = new RefSection(SS);
            BoxUnLoad      = new RefBox(SS);
            DocUnload      = new Doc(SS);
            DocCC          = new StructBox();
            PreviousAction = "";
        } // RefillSet (constructor)
Exemplo n.º 3
0
 /// <summary>
 /// Создание фигуры бокса на базе структуры
 /// </summary>
 /// <param name="box">Структура бокса</param>
 /// <returns></returns>
 private IFigure CreateFigureBox(StructBox box)
 {
     foreach (string typeName in _typeBox)
     {
         if (box.Type == typeName)
         {
             var myClassType = Activator.CreateInstance(Type.GetType(box.Type), box);
             _figure = (IFigure)myClassType;
             break;
         }
     }
     return(_figure);
 }
Exemplo n.º 4
0
        /// <summary>
        /// Создание списка структур на базе списка фигур
        /// </summary>
        /// <param name="Figures">Список фигур</param>
        /// <returns></returns>
        private List <IBase> CreateStructFigure(List <IFigure> Figures)
        {
            List <IBase> iBase = new List <IBase>();

            for (int i = 0; i < Figures.Count; i++)
            {
                if (Figures[i] is AbstractArrow)
                {
                    _arrow = new StructArrow(Figures[i]);
                    iBase.Add(_arrow);
                }
                if (Figures[i] is AbstractBox)
                {
                    _box = new StructBox(Figures[i]);
                    iBase.Add(_box);
                }
            }
            return(iBase);
        }
Exemplo n.º 5
0
 public RectangleInterface(StructBox box) : base(box)
 {
 }
Exemplo n.º 6
0
 public RectangleEnum(StructBox box) : base(box)
 {
 }
Exemplo n.º 7
0
 public RectangleObject(StructBox box) : base(box)
 {
 }
Exemplo n.º 8
0
 public RectangleClass(StructBox box) : base(box)
 {
 }
 public void Setup()
 {
     ValueType         = new StructBox(10, 6);
     ReferenceType     = new ClassNoBox(10, 6);
     ValueTypeOverride = new StructBoxOverride(10, 6);
 }