public MobileLabel CreateLabel(string text, int left, int top, int width, int height, MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle, string controlName) { MobileLabel NewControl = new MobileLabel(MainForm, text, left, top, width, height, size, position, color, fontStyle, controlName); ControlsArray.Add(NewControl); return(NewControl); }
/// <summary>Обьединение контролов "частичных значений" в единое значение</summary> /// <returns>Новое значение свойства</returns> private string concatValue() { StringBuilder valueBuilder = new StringBuilder(); foreach (MobileControl control in controls) { MobileTextBox tb = control as MobileTextBox; if (tb != null) { valueBuilder.Append(tb.Text); continue; } MobileLabel l = control as MobileLabel; if (l != null) { valueBuilder.Append(l.Text); continue; } MobileTable t = control as MobileTable; if (t != null) { valueBuilder.Append(selectedId); } } return(valueBuilder.ToString()); }
public MobileLabel CreateLabel(string text, int left, int top, int width, int height, ControlsStyle style, string controlName) { MobileLabel NewControl = new MobileLabel(MainForm, text, left, top, width, height, style, controlName); ControlsArray.Add(NewControl); return(NewControl); }
public override void DrawControls() { MainProcess.ClearControls(); MainProcess.CreateLabel("Синхронізація!", 5, 125, 230, MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info, FontStyle.Bold); MainProcess.CreateLabel("Зараз оновлюється:", 5, 155, 230, MobileFontSize.Normal, MobileFontPosition.Center); infoLabel = MainProcess.CreateLabel(string.Empty, 5, 175, 230, MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold); }
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 startGroupRegistration() { currentCase = accessory as Cases; if (currentCase.Lamp == 0 || currentCase.ElectronicUnit == 0) { ShowMessage("Нужно заполнить лампу и эл. блок!"); return; } if (!(accessory is Cases)) { return; } currentLamp = new Lamps(); currentLamp.Read(currentCase.Lamp); currentUnit = new ElectronicUnits(); currentUnit.Read(currentCase.ElectronicUnit); if (!string.IsNullOrEmpty(currentLamp.BarCode) || !string.IsNullOrEmpty(currentUnit.BarCode)) { ShowMessage("Для групової реєстрації лампа та блок мають бути без штрих-коду"); return; } if (isMainDataEntered && warrantlyDataIsValid()) { accessory.Write(); } else { showWriteErrorMessage(); return; } groupRegistration = true; currentCase = new Cases(); currentCase.Read(accessory.Id); groupRegistrationButton.Hide(); groupSizeLabel = MainProcess.CreateLabel("", 5, 283, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Info, FontStyle.Bold); groupSize = 0; }
public MobileLabel CreateLabel(string text, int left, int top, int width, int height, MobileFontSize size, MobileFontPosition position, MobileFontColors color, FontStyle fontStyle, string controlName) { MobileLabel NewControl = new MobileLabel(MainForm, text, left, top, width, height, size, position, color, fontStyle, controlName); ControlsArray.Add(NewControl); return NewControl; }
public MobileLabel CreateLabel(string text, int left, int top, int width, int height, ControlsStyle style, string controlName) { MobileLabel NewControl = new MobileLabel(MainForm, text, left, top, width, height, style, controlName); ControlsArray.Add(NewControl); return NewControl; }
private void startGroupRegistration() { currentCase = accessory as Cases; if (currentCase.Lamp == 0 || currentCase.ElectronicUnit == 0) { ShowMessage("����� ��������� ����� � ��. ����!"); return; } if (!(accessory is Cases)) { return; } currentLamp = new Lamps(); currentLamp.Read(currentCase.Lamp); currentUnit = new ElectronicUnits(); currentUnit.Read(currentCase.ElectronicUnit); if (!string.IsNullOrEmpty(currentLamp.BarCode) || !string.IsNullOrEmpty(currentUnit.BarCode)) { ShowMessage("��� ������� ��������� ����� �� ���� ����� ���� ��� �����-����"); return; } if (isMainDataEntered && warrantlyDataIsValid()) { accessory.Write(); } else { showWriteErrorMessage(); return; } groupRegistration = true; currentCase = new Cases(); currentCase.Read(accessory.Id); groupRegistrationButton.Hide(); groupSizeLabel = MainProcess.CreateLabel("", 5, 283, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Info, FontStyle.Bold); groupSize = 0; }
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); }
/// <summary>�������� ���������� �����</summary> /// <param name="label">�����</param> private bool validateLabelData(MobileLabel label) { return !label.Text.Equals(NOT_CHOOSEN); }
/// <summary>Проверка валидности метки</summary> /// <param name="label">Метка</param> private bool validateLabelData(MobileLabel label) { return(!label.Text.Equals(NOT_CHOOSEN)); }