public MobileButton(MainForm Form, string text, int left, int top, int width, int height, string ControlName, MobileButtonClick mobileButtonClick, MobileSenderClick mobileSenderClick, object tag, bool enabled) { Control.Left = left; Control.Top = top; Control.Text = text; Control.ForeColor = GRAY_COLOR; Enabled = enabled; Tag = tag; MobileButtonClick = mobileButtonClick; MobileSenderClick = mobileSenderClick; Control.Click += Control_Click; if (width > 0) { Control.Width = width; } if (height > 0) { Control.Height = height; } Control.Name = ControlName; Form.Controls.Add(Control); }
/// <summary>Отображение кнопок комплектующих</summary> /// <param name="process">Строковая приставка процесса</param> /// <param name="click">Делегат действия при клике</param> private void drawTypeOfAcceptance(string process, MobileSenderClick click) { MainProcess.ToDoCommand = process; MainProcess.CreateButton("З ремонту", 10, 75, 220, 35, string.Empty, click, new object[] { typeof(SubAcceptanceAccessoriesFromRepairRepairTable).Name, " ремонту" }); MainProcess.CreateButton("З обміну", 10, 120, 220, 35, string.Empty, click, new object[] { typeof(SubAcceptanceAccessoriesFromExchangeExchange).Name, " обміну" }); }
/// <summary>Отображение кнопок комплектующих</summary> /// <param name="process">Строковая приставка процесса</param> /// <param name="click">Делегат действия при клике</param> private void drawAccessoriesBtn(string process, MobileSenderClick click) { MainProcess.ToDoCommand = "Оберіть тип комлектуючого"; MainProcess.CreateButton("Лампа", 10, 75, 220, 35, string.Empty, click, new object[] { TypeOfAccessories.Lamp, string.Concat(process, " ламп") }); MainProcess.CreateButton("Эл.блок", 10, 120, 220, 35, string.Empty, click, new object[] { TypeOfAccessories.ElectronicUnit, string.Concat(process, " эл.блоків") }); MainProcess.CreateButton("Корпус", 10, 165, 220, 35, string.Empty, click, new object[] { TypeOfAccessories.Case, string.Concat(process, " корпусів") }); }
public MobileButton CreateButton(string text, int left, int top, int width, int height, string controlName, MobileButtonClick mobileButtonClick, MobileSenderClick mobileSenderClick, object tag, bool enabled) { MobileButton NewControl = new MobileButton(MainForm, text, left, top, width, height, controlName, mobileButtonClick, mobileSenderClick, tag, enabled); ControlsArray.Add(NewControl); return(NewControl); }
public MobileButton CreateButton(string text, int left, int top, int width, int height, string controlName, MobileButtonClick mobileButtonClick, MobileSenderClick mobileSenderClick, object tag, bool enabled) { MobileButton NewControl = new MobileButton(MainForm, text, left, top, width, height, controlName, mobileButtonClick, mobileSenderClick, tag, enabled); ControlsArray.Add(NewControl); return NewControl; }
public MobileButton CreateButton(string text, int left, int top, int width, int height, string controlName, MobileSenderClick mobileSenderClick, object tag, bool enabled) { return CreateButton(text, left, top, width, height, controlName, null, mobileSenderClick, tag, enabled); }
public MobileButton CreateButton(string text, int left, int top, int width, int height, string controlName, MobileSenderClick mobileSenderClick, object tag, bool enabled) { return(CreateButton(text, left, top, width, height, controlName, null, mobileSenderClick, tag, enabled)); }