Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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();
                }
            }
        }
Example #4
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);
        }
Example #5
0
        public override void DrawControls()
        {
            MainProcess.CreateLabel("Отсканируйте код", 19, 165, 211, MobileFontSize.Large);
            MainProcess.ToDoCommand = "Регистрация в системе";

            //todo: заглушка
            MainProcess.CreateButton("Enter", 10, 275, 220, 35, "enter", () => OnBarcode("L9786175660690"));

            wifiOffButton = MainProcess.CreateButton("Wifi on/off", 10, 65, 220, 35, "WifiOff", () =>
                {
                    bool startStatus = MainProcess.ConnectionAgent.WifiEnabled;
                    if (startStatus)
                        {
                        MainProcess.ConnectionAgent.StopConnection();
                        }
                    else
                        {
                        MainProcess.StartConnectionAgent();
                        }
                    updateWifiOnOffButtonState(!startStatus);
                });
            updateWifiOnOffButtonState(MainProcess.ConnectionAgent.WifiEnabled);
        }
Example #6
0
        public override void DrawControls()
        {
            MainProcess.CreateLabel("Отсканируйте код", 19, 165, 211, MobileFontSize.Large);
            MainProcess.ToDoCommand = "Регистрация в системе";

            //todo: заглушка
            MainProcess.CreateButton("Enter", 10, 275, 220, 35, "enter", () => OnBarcode("L9786175660690"));

            wifiOffButton = MainProcess.CreateButton("Wifi on/off", 10, 65, 220, 35, "WifiOff", () =>
            {
                bool startStatus = MainProcess.ConnectionAgent.WifiEnabled;
                if (startStatus)
                {
                    MainProcess.ConnectionAgent.StopConnection();
                }
                else
                {
                    MainProcess.StartConnectionAgent();
                }
                updateWifiOnOffButtonState(!startStatus);
            });
            updateWifiOnOffButtonState(MainProcess.ConnectionAgent.WifiEnabled);
        }
Example #7
0
 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;
 }
Example #8
0
        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);
        }
Example #9
0
        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();
                    }
                }
        }
Example #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);
        }