public Loader(DetailBase detailBase, int capacity) { this.capacity = capacity; this.detailBase = detailBase; details = new List <IDetail>(); TakeDetailsFromBase(); }
public ConveyerAddition(Panel messageBoxPanel, TextBox maxCountTextBox) { Bitmaps = new List <Bitmap>(); NumberOfModels = 0; MyMessageBox = new MyMessageBox(messageBoxPanel); Panels = new List <Panel>();// для создания нескольких конвееров Random = new Random(); TypeOfNextDetail = typeof(Details.SquareDetailDrawing); DetailBase = new DetailBase(TypeOfNextDetail, Convert.ToInt32(maxCountTextBox.Text)); Conveyers = new List <Conveyer>(); Mechanics = new List <IMechanic>(); }
public ConveyerDrawing(int maxDetailsCount, DetailBase detailBase, Bitmap bitmap, int numberOfConveyer) : base(maxDetailsCount, detailBase, numberOfConveyer) { this.bitmap = bitmap; graphics = Graphics.FromImage(bitmap); h = bitmap.Height * 5 / 6 / maxDetailsCount; d = bitmap.Height / 6 / (maxDetailsCount + 1); w = bitmap.Width / 3; rectangles = new List <Rectangle>(); for (int i = 0; i < maxDetailsCount; i++) { rectangles.Add(new Rectangle(bitmap.Width / 2 - w / 2, bitmap.Height - (i * (d + h)), w, h)); } }