示例#1
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);
        }
示例#2
0
        /// <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());
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
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);
        }
示例#6
0
        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;
        }
示例#7
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;
 }
示例#8
0
 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;
 }
示例#9
0
        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;
        }
示例#10
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);
        }
示例#11
0
 /// <summary>�������� ���������� �����</summary>
 /// <param name="label">�����</param>
 private bool validateLabelData(MobileLabel label)
 {
     return !label.Text.Equals(NOT_CHOOSEN);
 }
示例#12
0
 /// <summary>Проверка валидности метки</summary>
 /// <param name="label">Метка</param>
 private bool validateLabelData(MobileLabel label)
 {
     return(!label.Text.Equals(NOT_CHOOSEN));
 }