public override sealed void DrawControls() { if (IsLoad) { bool underWarrantly = Cases.UnderWarranty(LightBarcode); object[] lightData = Cases.GetLightInfo(LightBarcode); ListOfLabelsConstructor list = new ListOfLabelsConstructor(MainProcess, TOPIC_OF_PROCESS, lightData); list.ListOfLabels = new List <LabelForConstructor> { new LabelForConstructor( underWarrantly ? "УВАГА! Світильник" : string.Empty, ControlsStyle.LabelH2Red), new LabelForConstructor( underWarrantly ? "знаходиться на гарантії!" : string.Empty, ControlsStyle.LabelH2Red), new LabelForConstructor(string.Empty, false), new LabelForConstructor("Модель: {0}"), new LabelForConstructor("Партія: {0}"), new LabelForConstructor("Гарантія до {0}"), new LabelForConstructor("Контрагент {0}"), new LabelForConstructor(string.Empty, false), new LabelForConstructor("Розібрати світильник?", ControlsStyle.LabelH2Red) }; MainProcess.CreateButton("Так", 10, 275, 105, 35, "ok", Ok_click); MainProcess.CreateButton("Ні", 125, 275, 105, 35, "cancel", Cancel_click); } }
public override sealed void DrawControls() { if (IsLoad) { TypesOfLampsStatus state = Accessory.GetState(TypeOfAccessories.ElectronicUnit, UnitBarcode); ListOfLabelsConstructor list = new ListOfLabelsConstructor(MainProcess, "Ел. блок", getData()); list.ListOfLabels = new List <LabelForConstructor> { new LabelForConstructor(string.Empty, false), new LabelForConstructor(string.Empty, false), new LabelForConstructor(string.Empty, false), new LabelForConstructor(string.Empty, false), new LabelForConstructor("Модель: {0}"), new LabelForConstructor("Партія: {0}"), new LabelForConstructor("Гарантія до {0}") }; if (state == TypesOfLampsStatus.ToRepair) { MainProcess.CreateButton("Зберігання", 15, 275, 100, 35, "storage", Storage_Click); } else { MainProcess.CreateButton("Ремонт", 15, 275, 100, 35, "repair", Repair_Click); } MainProcess.CreateButton("Списання", 125, 275, 100, 35, "writeoff", Writeoff_Click, null, null, state != TypesOfLampsStatus.ToCharge); } }
public override sealed void DrawControls() { if (IsLoad) { TypesOfLampsStatus state = Accessory.GetState(TypeOfAccessories.Case, CaseBarcode); ListOfLabelsConstructor list = new ListOfLabelsConstructor(MainProcess, ResultParameters); list.ListOfLabels = new List <LabelForConstructor> { new LabelForConstructor("Корпус", ControlsStyle.LabelH2), new LabelForConstructor("Модель: {0}"), new LabelForConstructor("Партія: {0}"), new LabelForConstructor("Гарантія до {0}"), new LabelForConstructor("Електроблок", ControlsStyle.LabelH2), new LabelForConstructor("Партія: {0}", 1), new LabelForConstructor("Гарантія до {0}"), }; MainProcess.CreateButton("Уснановка", 15, 225, 100, 35, "installNew", InstallNew); MainProcess.CreateButton("Розібрати", 125, 225, 100, 35, "collate", Collate); if (state == TypesOfLampsStatus.ToRepair) { MainProcess.CreateButton("Зберігання", 15, 275, 100, 35, "storages", Storages); } else { MainProcess.CreateButton("Ремонт", 15, 275, 100, 35, "repair", Repair); } MainProcess.CreateButton("Спиння", 125, 275, 100, 35, "writeoff", WriteOff, null, null, state != TypesOfLampsStatus.ToCharge); } }
public override sealed void DrawControls() { if (IsLoad) { sourceTable = new DataTable(); sourceTable.Columns.AddRange(new[] { new DataColumn(ACC_ID_COLUMN, typeof(long)), new DataColumn(DESCRIPTION_COLUMN, typeof(string)), new DataColumn(AMOUNT_COLUMN, typeof(int)), new DataColumn(MODEL_ID_COLUMN, typeof(long)) }); visualTable = MainProcess.CreateTable("Accessories", 205); visualTable.DT = sourceTable; visualTable.AddColumn("Комплектующее", DESCRIPTION_COLUMN, 184); visualTable.AddColumn("Кол-во", AMOUNT_COLUMN, 30); visualTable.OnChangeSelectedRow += visualTable_OnChangeSelectedRow; SqlCeDataReader reader = GetData(); while (reader.Read()) { long id = Convert.ToInt64(reader[ACC_ID_COLUMN]); string description = reader[DESCRIPTION_COLUMN].ToString().TrimEnd(); long nomenclatureId = Convert.ToInt64(reader[MODEL_ID_COLUMN]); visualTable.AddRow(id, description, 0, nomenclatureId); } visualTable.Focus(); MainProcess.CreateButton("Ок", 15, 275, 210, 35, "ok", ok_Click); } }
private void showData(bool accesoryIsExist, string Barcode) { readAccessory(accesoryIsExist, Barcode); if (accessory.Id == 0 && accessory.TypeOfWarrantly == TypesOfLampsWarrantly.None) { accessory.TypeOfWarrantly = TypesOfLampsWarrantly.Without; } //Установить отсканированный штрихкод dbObject.SetValue(accessory, dbObject.BARCODE_NAME, Barcode); //Список кнопок переходов Dictionary <string, KeyValuePair <Type, object> > listOfDetail; //Список доступных полей для редактирования List <LabelForConstructor> listOfLabels = CatalogObject.GetDetailVisualPresenter( currentType, out listOfDetail, accessory); MainProcess.ToDoCommand = currentTopic; //Дополение списка переходов listOfDetail.Add( mainType == currentType ? nextBtnText : okBtnText, new KeyValuePair <Type, object>(mainType, null)); //Отобразить доступные поля для редактирования drawEditableProperties(listOfLabels); //Отобразить кнопоки переходов drawButtons(listOfDetail); if (currentType == typeof(Cases)) { groupRegistrationButton = MainProcess.CreateButton("Групова реєстрація", 5, 275, 230, 35, string.Empty, startGroupRegistration); } //MainProcess.CreateButton("Заповнити як попередній", 5, 275, 230, 35, string.Empty, fillFromPrev); }
public override sealed void DrawControls() { if (IsLoad) { object[] data = getLightPositionInfo(); map = Convert.ToInt32(data[1]); register = Convert.ToInt32(data[2]); position = Convert.ToInt32(data[3]); ListOfLabelsConstructor list = new ListOfLabelsConstructor(MainProcess, "ДЕМОНТАЖ СВІТИЛЬНИКУ", data); list.ListOfLabels = new List <LabelForConstructor> { new LabelForConstructor(string.Empty, ControlsStyle.LabelH2), new LabelForConstructor(string.Empty, ControlsStyle.LabelH2), new LabelForConstructor(string.Empty, ControlsStyle.LabelH2), new LabelForConstructor("Розташування:", ControlsStyle.LabelH2), new LabelForConstructor("Карта: {0}"), new LabelForConstructor("Регістр: {0}", 1), new LabelForConstructor("Позиція №{0}") }; MainProcess.CreateButton("Oк", 10, 275, 105, 35, "ok", Ok_click); MainProcess.CreateButton("Відміна", 125, 275, 105, 35, "cancel", Cancel_click); } }
public override sealed void DrawControls() { if (IsLoad) { sourceTable = new DataTable(); sourceTable.Columns.AddRange(new[] { new DataColumn("Description", typeof(string)) }); visualTable = MainProcess.CreateTable("Accessories", 205); visualTable.DT = sourceTable; visualTable.AddColumn("Комплектующее", "Description", 214); SqlCeDataReader reader = GetData(); while (reader.Read()) { string id = reader["Id"].ToString().TrimEnd(); DataRow row = visualTable.AddRow(id); rows.Add(id, row); } visualTable.Focus(); MainProcess.CreateButton("Ок", 15, 275, 210, 35, "ok", ok_Click); } }
public override sealed void DrawControls() { if (IsLoad) { okButton = MainProcess.CreateButton("Ok", 10, 275, 220, 35, string.Empty, button_Click); valueType = accessory.GetProperyType(propertyName); if (valueType == typeof(string)) { createStringControls(); } else if (valueType == typeof(int)) { createIntControls(); } else if (valueType == typeof(DateTime)) { createDateTimeControls(); } else if (valueType.IsEnum) { createEnumControls(valueType); } else if (valueType == typeof(long)) { createLongControls(); } } }
public override sealed void DrawControls() { int top = 42; top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; MainProcess.CreateLabel("Відскануйте піддон", 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; currentNomenclatureLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; MainProcess.CreateLabel("Код палети", 10, top, 100, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); currentStickerIdTextBox = MainProcess.CreateTextBox(120, top, 80, string.Empty, ControlsStyle.LabelNormal, palletCodeEntered, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 3; printTaskLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 2; complateButton = MainProcess.CreateButton("Роздрукувати (F4)", 5, top, 230, 35, string.Empty, complateProcess); updatePrintTask(); }
public override sealed void DrawControls() { MainProcess.ToDoCommand = "Оберіть комлектуюче"; MainProcess.CreateButton("Електронний блок", 20, 75, 200, 45, "unit", unit_Click); MainProcess.CreateButton("Лампа", 20, 150, 200, 45, "lamp", lamp_Click); MainProcess.CreateButton("Корпус", 20, 225, 200, 45, "case", case_Click); }
/// <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, " обміну" }); }
public override void DrawControls() { MainProcess.ToDoCommand = "Оберіть процес"; MainProcess.CreateButton("Інфо", 20, 75, 200, 45, "info", info_Click); MainProcess.CreateButton("Процеси", 20, 150, 200, 45, "process", process_Click); MainProcess.CreateButton("Реєстрація", 20, 225, 200, 45, "registration", registration_Click); MainProcess.CreateLabel("Синхронізація - F5", 25, 280, 230, MobileFontSize.Large); }
public override void DrawControls() { MainProcess.CreateLabel("Увійдіть до системи", 19, 165, 211, MobileFontSize.Large); MainProcess.ToDoCommand = "Регістрація"; MainProcess.CreateButton("Створити відвантаження", 10, 205, 220, 35, "", createShipment); MainProcess.CreateButton("Вхід", 10, 275, 220, 35, "Вхід", startSelectingProcess); }
/// <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, " корпусів") }); }
private void drawFinishForm() { MainProcess.ClearControls(); MainProcess.ToDoCommand = TOPIC_OF_PROCESS; MainProcess.CreateLabel("Світильник розібрано!", 5, 150, 230, MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default); MainProcess.CreateLabel("Зберегти дані?", 5, 185, 230, MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info); MainProcess.CreateButton("Ок", 10, 275, 105, 35, "ok", Save_click); MainProcess.CreateButton("Відміна", 125, 275, 105, 35, "cancel", Cancel_click); }
public override void DrawControls() { pickingTask = new PickingTaskControls(); int top = 42; top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; pickingTask.planPickingCell = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; pickingTask.pickingWareLine1 = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS - 7; pickingTask.pickingWareLine2 = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; pickingTask.productionDate = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; pickingTask.planedQuantity = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); scanPallet = new ScanPallet(); scanPallet.order = MainProcess.CreateLabel("Відскануйте палету", 10, 240, 230, MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); quantityEditControls = new QuantityEditControls(); top = 205; quantityEditControls.boxesLabel = MainProcess.CreateLabel("Відібрано упаковок", 10, top, 150, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); quantityEditControls.packsCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; quantityEditControls.unitsLabel = MainProcess.CreateLabel("Відібрано одиниць", 10, top, 150, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); quantityEditControls.unitsCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; quantityEditControls.linersLabel = MainProcess.CreateLabel("Знято прокладок", 10, top, 150, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); quantityEditControls.linersCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; quantityEditControls.proceedButton = MainProcess.CreateButton("Продовжити ( F5 )", 10, top, 220, 30, "modelButton", proceed); }
public override sealed void DrawControls() { if (IsLoad) { object idObj = getAcceptanceDoc(); if (idObj != null) { documentId = idObj; acceptanceDoc.Read <AcceptanceOfNewComponents>(documentId); string caseModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.CaseModel); string lampModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.LampModel); string unitModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.UnitModel); caseModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.CaseModel); lampModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.LampModel); unitModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.UnitModel); if (acceptanceDoc.CaseModel == 0) { selectedModelRef = acceptanceDoc.LampModel == 0 ? unitModelRef : lampModelRef; } else { selectedModelRef = caseModelRef; } const string emptyModel = "-"; MainProcess.CreateLabel( string.Concat("Корпус: ", string.IsNullOrEmpty(caseModel) ? emptyModel : caseModel) , 5, 95, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default); MainProcess.CreateLabel( string.Concat("Лампа: ", string.IsNullOrEmpty(lampModel) ? emptyModel : lampModel) , 5, 130, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default); MainProcess.CreateLabel( string.Concat("Блок: ", string.IsNullOrEmpty(unitModel) ? emptyModel : unitModel) , 5, 165, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default); labelOfCount = MainProcess.CreateLabel("0", 0, 215, 240, MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info); MainProcess.CreateButton("Завершити приймання", 15, 275, 210, 35, "ok", ok_Click); } else { MainProcess.CreateLabel( "Не знайдено жодного відкритого документа \"Прийомка нового комплектуючого\" для обраного типу!", 5, 115, 230, 150, MobileFontSize.Multiline, MobileFontPosition.Center, MobileFontColors.Warning, FontStyle.Bold); } } }
public override sealed void DrawControls() { if (IsLoad) { MainProcess.ClearControls(); ListOfLabelsConstructor listOfLabels = new ListOfLabelsConstructor(MainProcess, "Ремонт", getUnitInfo()); List <LabelForConstructor> list = new List <LabelForConstructor>(); bool underWarrantly = underWarranty(); if (underWarrantly) { list.Add(new LabelForConstructor(string.Empty, ControlsStyle.LabelH2Red)); list.Add(new LabelForConstructor("УВАГА! Ел.блок", ControlsStyle.LabelH2Red)); list.Add(new LabelForConstructor("знаходиться на гарантії!", ControlsStyle.LabelH2Red)); } else { list.Add(new LabelForConstructor(string.Empty, ControlsStyle.LabelH2Red)); list.Add(new LabelForConstructor(string.Empty, ControlsStyle.LabelH2Red)); list.Add(new LabelForConstructor("Ел.блок не на гарантії", ControlsStyle.LabelH2)); } list.AddRange( new List <LabelForConstructor> { new LabelForConstructor(string.Empty, false), new LabelForConstructor("Модель: {0}"), new LabelForConstructor("Партія: {0}"), new LabelForConstructor("Гарантія до {0}"), new LabelForConstructor("Контрагент {0}"), new LabelForConstructor(string.Empty, false), new LabelForConstructor(underWarrantly ? "Помітити на обмін?" : string.Empty, ControlsStyle.LabelH2Red) }); listOfLabels.ListOfLabels = list; if (underWarrantly) { MainProcess.CreateButton("Так", 15, 275, 100, 35, "exchangeButton", exchange_Click); MainProcess.CreateButton("Ні", 125, 275, 100, 35, "repairButton", repair_Click); } else { MainProcess.CreateButton("Ок", 15, 275, 100, 35, "repairButton", repair_Click); MainProcess.CreateButton("Відміна", 125, 275, 100, 35, "exitButton", exit_click); } } }
private void createScanPalletLabelControls() { scanNextPalletControls = new ScanPalletControls(); int top = 120; top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; scanNextPalletControls.WillLabel = MainProcess.CreateLabel("Відскануйте палету", 10, top, 230, MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 2; scanNextPalletControls.FinishCellButton = MainProcess.CreateButton(string.Empty, 5, top, 230, 55, "modelButton", () => finishCell()); }
public override sealed void DrawControls() { MainProcess.ToDoCommand = "Вкажіть місце"; MainProcess.CreateButton("Карта", 15, 80, 100, 35, "map", selectMap); registerBtn = MainProcess.CreateButton("Регістр", 15, 125, 100, 35, "register", selectRegister, null, null, false); positionBtn = MainProcess.CreateButton("Позиція", 15, 170, 100, 35, "position", selectPostition, null, null, false); mapLabel = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 90, 100, MobileFontSize.Normal, MobileFontPosition.Center); registerLabel = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 135, 100, MobileFontSize.Normal, MobileFontPosition.Center); positionLabel = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 180, 100, MobileFontSize.Normal, MobileFontPosition.Center); MainProcess.CreateButton("Заповнити як попередній", 20, 230, 200, 35, "fillLikePrev", fillLikePrev); MainProcess.CreateButton("Ok", 20, 275, 200, 35, "ok", Ok); }
private void createReturnWareStepControls() { returnWareControls = new ReturnWareControls(); int top = TOPMOST_CONTROL_Y_POSITION; returnWareControls.WareLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230, MobileFontSize.Little, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.PartyLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230, MobileFontSize.Little, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.QuantityLabel = MainProcess.CreateLabel("Кол-во единиц", 5, top, 160, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); returnWareControls.UnitsCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.QuantityBoxesLabel = MainProcess.CreateLabel("Кол-во упак.", 5, top, 160, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); returnWareControls.PacksCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.LinerButton = MainProcess.CreateButton("<без прокладки>", 5, top, 230, 30, string.Empty, chooseLiner_ButtonClick); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS + 10; returnWareControls.LinersQuantityLabel = MainProcess.CreateLabel("Кол-во прокл.", 5, top, 160, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); returnWareControls.LinersCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false); updateLinerName(); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.ScanPalletLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.NewPalletButton = MainProcess.CreateButton("Новая паллета", 5, top, 230, 40, string.Empty, newPallet_ButtonClick); }
public override sealed void DrawControls() { if (IsLoad) { string accessory = string.Empty; string endOfTopic; switch (typeOfAccessory) { case TypeOfAccessories.Lamp: accessory = "Лампа"; break; case TypeOfAccessories.Case: accessory = "Світильник"; break; case TypeOfAccessories.ElectronicUnit: accessory = "Ел.блок"; break; } switch (newState) { case TypesOfLampsStatus.Storage: endOfTopic = "зберігання"; break; case TypesOfLampsStatus.ToCharge: endOfTopic = "списання"; break; default: const string message = "Для даного статусу не реалізовано логіку!"; ShowMessage(message); throw new Exception(message); } MainProcess.CreateLabel(string.Format("{0} буде поставленно на {1}!", accessory, endOfTopic), 5, 105, 230, 65, MobileFontSize.Multiline, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold); MainProcess.CreateLabel("Зберегти дані?", 5, 190, 230, MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info); MainProcess.CreateButton("Ок", 10, 275, 105, 35, "ok", Save_click); MainProcess.CreateButton("Відміна", 125, 275, 105, 35, "cancel", Cancel_click); } }
public override sealed void DrawControls() { if (IsLoad) { MainProcess.ClearControls(); MainProcess.CreateLabel("Відскануйте", 0, 130, 240, MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Info, FontStyle.Bold); MainProcess.CreateLabel("ШТРИХ-КОД!", 0, 150, 240, MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Info, FontStyle.Bold); if (currentType != typeof(Cases)) { MainProcess.CreateButton("Без штрихкода", 10, 270, 220, 35, string.Empty, () => OnBarcode(string.Empty)); } } }
/// <summary>Окно отображения информации</summary> /// <param name="topic">Заголовок</param> /// <param name="message">Сообщение</param> /// <param name="set">Набор кнопок навигации</param> /// <param name="firstButton">Делегат вызова при нажатии первой кнопки</param> /// <param name="secondButton">Делегат вызова при нажатии второй кнопки</param> private void messageWin(string topic, string message, ButtonsSet set, Stages firstButton, Stages secondButton) { MainProcess.ToDoCommand = topic; MainProcess.CreateLabel(message, 0, 150, 240, MobileFontSize.Multiline, MobileFontPosition.Center); switch (set) { case ButtonsSet.YesNo: MainProcess.CreateButton("Так", 15, 275, 100, 35, "firstButton", button_Click, firstButton, true); MainProcess.CreateButton("Ні", 125, 275, 100, 35, "secondButton", button_Click, secondButton, true); break; case ButtonsSet.OkCancel: MainProcess.CreateButton("Ок", 15, 275, 100, 35, "firstButton", button_Click, firstButton, true); MainProcess.CreateButton("Відміна", 125, 275, 100, 35, "secondButton", button_Click, secondButton, true); break; } }
private void DrawForm1Controls() { MainProcess.CreateLabel("Дата накладной:", 8, 70, 160, ControlsStyle.LabelNormal); MainProcess.CreateLabel(".", 57, 95, 8, ControlsStyle.LabelNormal); MainProcess.CreateLabel(".", 118, 95, 8, ControlsStyle.LabelNormal); dayTextBox = (MobileTextBox)MainProcess.CreateTextBox(9, 95, 41, string.Empty, ControlsStyle.LabelLarge, false); monthTextBox = (MobileTextBox)MainProcess.CreateTextBox(71, 95, 41, string.Empty, ControlsStyle.LabelLarge, false); monthTextBox.Text = DateTime.Now.Month.ToString(); yearTextBox = (MobileTextBox)MainProcess.CreateTextBox(132, 95, 71, string.Empty, ControlsStyle.LabelLarge, false); yearTextBox.Text = DateTime.Now.Year.ToString(); MainProcess.CreateLabel("Количество лет гарантии:", 8, 175, 224, ControlsStyle.LabelNormal); warrantyYearsQuantityTextBox = (MobileTextBox)MainProcess.CreateTextBox(9, 207, 47, string.Empty, ControlsStyle.LabelLarge, false); warrantyYearsQuantityTextBox.Text = "0"; MainProcess.CreateButton("Створити документ", 9, 250, 225, 40, string.Empty, startProcess); }
private void createPalletControls() { palletEditControls = new AcceptancePalletControls(); int top = 42; top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; palletEditControls.nomenclatureLabel = MainProcess.CreateLabel("<номенклатура>", 5, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; palletEditControls.packsLabel = MainProcess.CreateLabel("упаковок:", 5, top, 80, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); palletEditControls.packsCountTextBox = MainProcess.CreateTextBox(90, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false); palletEditControls.unitsLabel = MainProcess.CreateLabel("+ шт.:", 135, top, 55, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); palletEditControls.unitsCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; palletEditControls.stickerIdInfoLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; palletEditControls.trayButton = MainProcess.CreateButton(string.Empty, 5, top, 230, 35, "modelButton", trayButton_Click); updateTrayDescription(); top += 2 * VERTICAL_DISTANCE_BETWEEN_CONTROLS; palletEditControls.linersLabel = MainProcess.CreateLabel("Кількість прокладок:", 5, top, 180, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); palletEditControls.linersQuantityTextBox = MainProcess.CreateTextBox(190, top, 45, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; linerItem = new CatalogItem(); palletEditControls.linerButton = MainProcess.CreateButton(string.Empty, 5, top, 230, 35, "modelButton", linerButton_Click); updateLinerButton(); top += 2 * VERTICAL_DISTANCE_BETWEEN_CONTROLS; palletEditControls.cellCaptionLabel = MainProcess.CreateLabel("Комірка:", 5, top, 80, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); palletEditControls.cellLabel = MainProcess.CreateLabel("<?>", 95, top, 140, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); }
/// <summary>Отобразить кнопоки переходов</summary> /// <param name="listOfDetail">Список кнопок переходов</param> private void drawButtons(Dictionary <string, KeyValuePair <Type, object> > listOfDetail) { if (listOfDetail.Count != 0) { const int top = 235; const int height = 35; int left = 15 / listOfDetail.Count; int width = (240 - left * (listOfDetail.Count + 1)) / listOfDetail.Count; int delta = left; foreach (KeyValuePair <string, KeyValuePair <Type, object> > detail in listOfDetail) { //bool enable = detail.Value.Value== null;// || detail.Value.Key != typeof(Lamps); MainProcess.CreateButton(detail.Key, delta, top, width, height, string.Empty, button_click, detail.Value.Key, true); delta += left + width; } } }
public override sealed void DrawControls() { if (IsLoad) { ListOfLabelsConstructor list = new ListOfLabelsConstructor(MainProcess, "ВСТАНОВЛЕННЯ СВІТИЛЬНИКУ", ResultParameters); list.ListOfLabels = new List <LabelForConstructor> { new LabelForConstructor(string.Empty, ControlsStyle.LabelH2), new LabelForConstructor(string.Empty, ControlsStyle.LabelH2), new LabelForConstructor(string.Empty, ControlsStyle.LabelH2), new LabelForConstructor("МІСЦЕ ВСТАНОВЛЕННЯ:", ControlsStyle.LabelH2), new LabelForConstructor("Карта: {0}"), new LabelForConstructor("Регістр: {0}"), new LabelForConstructor("Позиція №{0}") }; MainProcess.CreateButton("Oк", 10, 275, 105, 35, "ok", Ok_click); MainProcess.CreateButton("Відміна", 125, 275, 105, 35, "cancel", Cancel_click); } }
/// <summary>Кнопки перехода на другие элмеенты</summary> /// <param name="listOfDetail">Словарь данных для кнопок [Текст кнопки; [Тип элемента; Штрих-код элемента]] </param> private void drawButtons(Dictionary <string, KeyValuePair <Type, object> > listOfDetail) { if (listOfDetail.Count != 0) { const int top = 275; const int height = 35; int left = 15 / listOfDetail.Count; int width = (240 - left * (listOfDetail.Count + 1)) / listOfDetail.Count; int delta = left; foreach (KeyValuePair <string, KeyValuePair <Type, object> > detail in listOfDetail) { long id = Convert.ToInt64(detail.Value.Value); MainProcess.CreateButton(detail.Key, delta, top, width, height, detail.Value.Key.Name, button_click, detail.Value.Value, id != 0); delta += left + width; } } }
/// <summary>Окно с шага "UnderWarrantly"</summary> private void warrantlyWin() { object[] lightData = Cases.GetLightInfo(LightBarcode); ListOfLabelsConstructor list = new ListOfLabelsConstructor(MainProcess, REPAIR_TOPIC, lightData); list.ListOfLabels = new List <LabelForConstructor> { new LabelForConstructor("УВАГА! Світильник", ControlsStyle.LabelH2Red), new LabelForConstructor("знаходиться на гарантії!", ControlsStyle.LabelH2Red), new LabelForConstructor(string.Empty, false), new LabelForConstructor("Модель: {0}"), new LabelForConstructor("Партія: {0}"), new LabelForConstructor("Гарантія до {0}"), new LabelForConstructor("Контрагент {0}"), new LabelForConstructor(string.Empty, false), new LabelForConstructor("Помітити на обмін?", ControlsStyle.LabelH2Red) }; MainProcess.CreateButton("Так", 15, 275, 100, 35, "firstButton", button_Click, Stages.FromUnderWarrantly, true); MainProcess.CreateButton("Ні", 125, 275, 100, 35, "secondButton", button_Click, Stages.OutOfWarrantlyUnit, true); }