Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        private void createDateTimeControls()
        {
            MobileTextBox day   = (MobileTextBox)MainProcess.CreateTextBox(50, 150, 25, string.Empty, ControlsStyle.LabelLarge, false);
            MobileControl dot1  = MainProcess.CreateLabel(".", 80, 150, 5, MobileFontSize.Large, FontStyle.Bold);
            MobileControl month = MainProcess.CreateTextBox(90, 150, 25, string.Empty, ControlsStyle.LabelLarge, false);
            MobileControl dot2  = MainProcess.CreateLabel(".", 120, 150, 5, MobileFontSize.Large, FontStyle.Bold);
            MobileControl year  = MainProcess.CreateTextBox(130, 150, 50, string.Empty, ControlsStyle.LabelLarge, false);

            day.Focus();

            //сохранить нужно как: MM-dd-yyyy, а отображать: dd-MM-yyyy
            controls.Add(month);
            controls.Add(dot1);
            controls.Add(day);
            controls.Add(dot2);
            controls.Add(year);

            TextBox dayBox   = (TextBox)day.GetControl();
            TextBox monthBox = (TextBox)month.GetControl();
            TextBox yearBox  = (TextBox)year.GetControl();

            //dayBox.MaxLength = 2;
            dayBox.TextChanged += ValueEditor_TextChanged;
            //monthBox.MaxLength = 2;
            monthBox.TextChanged += ValueEditor_TextChanged2;
            //yearBox.MaxLength = 2;
            yearBox.TextChanged += ValueEditor_TextChanged3;
        }
Esempio n. 3
0
        private void createIntControls()
        {
            MobileTextBox textBox = (MobileTextBox)MainProcess.CreateTextBox(10, 150, 220, string.Empty, ControlsStyle.LabelLarge, false);

            textBox.Focus();
            controls.Add(textBox);
        }
Esempio n. 4
0
        public override void DrawControls()
        {
            switch (processStep)
            {
            case Steps.DocumentSelecting:
            {
                #region Выбор документа

                //PerformQuery("ПолучитьСписокПланаПриходаТары");
                //if (Parameters == null || Parameters[0] == null)
                //{
                //    ShowMessage("Подойдите в зону беспроводного покрытия");
                //    MainProcess.Process = new SelectingProcess(MainProcess);
                //    return;
                //}

                //dataTable = Parameters[0] as DataTable;
                //if (dataTable.Rows.Count == 0)
                //{
                //    ShowMessage("Нет запланированных документов для приема расходных материалов!");
                //    MainProcess.Process = new SelectingProcess(MainProcess);
                //    return;
                //}

                TableControl = MainProcess.CreateTable("WareList", 259);
                TableControl.OnKeyPressedEvent = OnDataGridViewKeyPress;
                docsVisual = TableControl.GetControl() as DataGrid;
                MainProcess.ToDoCommand = "Выберите документ";



                break;
                #endregion
            }

            case Steps.Incoming:
            {
                #region Пересчет расходных материалов

                MainProcess.ClearControls();

                nomenclatureLabel = MainProcess.CreateLabel("<Ожидается код>", 19, 59, 215, ControlsStyle.LabelNormal).GetControl() as Label;
                MainProcess.CreateLabel("Запланировано:", 19, 93, 201, ControlsStyle.LabelNormal);
                planLabel = MainProcess.CreateLabel("0 / 0", 19, 120, 201, ControlsStyle.LabelRedRightAllign).GetControl() as Label;
                MainProcess.CreateLabel("Принято:", 19, 150, 201, ControlsStyle.LabelNormal);
                realLabel            = MainProcess.CreateLabel("0 / 0", 19, 177, 201, ControlsStyle.LabelRedRightAllign).GetControl() as Label;
                actedLabel           = MainProcess.CreateLabel("Количество брака:", 19, 228, 201, ControlsStyle.LabelNormal).GetControl() as Label;
                actedTextBox         = MainProcess.CreateTextBox(136, 262, 81, "", ControlsStyle.LabelRedRightAllign, OnEnterToActTextbox, false).GetControl() as TextBox;
                uniqueCodeLabel      = MainProcess.CreateLabel("Отмена - Esc", 19, 290, 201, ControlsStyle.LabelNormal).GetControl() as Label;
                actedLabel.Visible   = false;
                actedTextBox.Visible = false;

                MainProcess.ToDoCommand = "ПРИЕМ РАСХ. МАТЕРИАЛОВ";
                break;

                #endregion
            }
            }
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        public override void DrawControls()
        {
            InitDatabase();

            if (!isEmptyCriterions)
            {
                isEmptyCriterions = ShowQuery("Выполнить обновление номенклатуры и критериев оценивания?");
            }

            if (isEmptyCriterions)
            {
                if (!UpdateRules())
                {
                    throw new ConnectionIsNotExistsException("нужно обновить критерии оценивания и номенклатуру!");
                }
            }

            MainProcess.ClearControls();

            MainProcess.ToDoCommand = "Регистрация качества";

            labelControl              = (MainProcess.CreateLabel("", 5, 59, 229, 39, ControlsStyle.LabelMultilineSmall).GetControl()) as Label;
            textBoxControl            = (MainProcess.CreateTextBox(0, 0, 0, "", ControlsStyle.LabelH2, onTextBoxEndEdit, false)).GetControl() as TextBox;
            textBoxControl.LostFocus += new EventHandler(textBoxControl_LostFocus);
            textBoxControl.Hide();
            Nomenclature = "";

            #region Создание рабочей таблицы

            var dataTable = new DataTable();
            dataTable.Columns.AddRange(new DataColumn[] {
                new DataColumn("CriterionName", typeof(string)),
                new DataColumn("CriterionId", typeof(long)),
                new DataColumn("Mark", typeof(int)),
                new DataColumn("HaveSubCriterion", typeof(bool)),
                new DataColumn("ParentCriterionId", typeof(long))
            });

            #endregion

            table    = MainProcess.CreateTable("operations", 217, 99, onRowSelected);
            table.DT = dataTable;
            table.AddColumn("Критерий", "CriterionName", 180);
            table.AddColumn("Балл", "Mark", 34);

            table.Focus();
        }
Esempio n. 8
0
        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);
        }
Esempio n. 9
0
        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);
        }
Esempio n. 10
0
        /// <summary>Ввод регистра</summary>
        private void selectRegister()
        {
            if (registerTextBox == null)
            {
                registerTextBox =
                    (MobileTextBox)
                    MainProcess.CreateTextBox(120, 135, 100, "registerTB", ControlsStyle.LabelNormal,
                                              onRegisterTextChanged, false);
                registerTextBox.Text = registerLabel.Text != NOT_CHOOSEN ? registerLabel.Text : string.Empty;
                registerTextBox.Focus();
                registerLabel.Hide();
            }
            else
            {
                string oldValue = registerLabel.Text;
                hideTextBox();

                if (!oldValue.Equals(registerLabel.Text))
                {
                    clearPosition();
                }
            }
        }
Esempio n. 11
0
        public override void OnHotKey(KeyAction TypeOfAction)
        {
            switch (TypeOfAction)
            {
            case KeyAction.F9:

                if (CurrentControl != null)
                {
                    ShowMessage(string.Format("Left = {0}\r\nTop = {1}\r\nWidth = {2}\r\nHeight = {3}", CurrentControl.Left, CurrentControl.Top, CurrentControl.Width, CurrentControl.Height));
                }
                break;

            case KeyAction.F8:

                if (CurrentControl != null)
                {
                    Control cont = CurrentControl;
                    MainProcess.SelectNextControl(ref CurrentControl);
                    CurrentControl.Paint    += new System.Windows.Forms.PaintEventHandler(DrawBorderForSelectObject);
                    ControlColor             = CurrentControl.BackColor;
                    CurrentControl.BackColor = System.Drawing.Color.Red;
                    CurrentControl.Refresh();

                    MainProcess.RemoveControl(cont);
                }
                break;

            case KeyAction.F10:

                MainProcess.CreateLabel("label", 5, 70, 100, ControlsStyle.LabelNormal);
                if (CurrentControl == null)
                {
                    MainProcess.SelectNextControl(ref CurrentControl);
                    CurrentControl.Paint    += new System.Windows.Forms.PaintEventHandler(DrawBorderForSelectObject);
                    ControlColor             = CurrentControl.BackColor;
                    CurrentControl.BackColor = System.Drawing.Color.Red;
                    CurrentControl.Refresh();
                }
                break;

            case KeyAction.Complate:

                MainProcess.CreateTextBox(5, 100, 150, "ñreateTextBox", ControlsStyle.TextBoxNormal);
                if (CurrentControl == null)
                {
                    MainProcess.SelectNextControl(ref CurrentControl);
                    CurrentControl.Paint    += new System.Windows.Forms.PaintEventHandler(DrawBorderForSelectObject);
                    ControlColor             = CurrentControl.BackColor;
                    CurrentControl.BackColor = System.Drawing.Color.Red;
                    CurrentControl.Refresh();
                }
                break;

            case KeyAction.F12:

                var t = MainProcess.CreateTable("WareList", 30);
                if (CurrentControl == null)
                {
                    MainProcess.SelectNextControl(ref CurrentControl);
                    CurrentControl.Paint    += new System.Windows.Forms.PaintEventHandler(DrawBorderForSelectObject);
                    ControlColor             = CurrentControl.BackColor;
                    CurrentControl.BackColor = System.Drawing.Color.Red;
                    CurrentControl.Refresh();
                }
                t.Show();
                break;

            case KeyAction.F5:

                if (CurrentControl != null)
                {
                    CurrentControl.BackColor = ControlColor;
                    CurrentControl.Paint    -= new System.Windows.Forms.PaintEventHandler(DrawBorderForSelectObject);
                }

                MainProcess.SelectNextControl(ref CurrentControl);
                CurrentControl.Paint    += new System.Windows.Forms.PaintEventHandler(DrawBorderForSelectObject);
                ControlColor             = CurrentControl.BackColor;
                CurrentControl.BackColor = System.Drawing.Color.Red;
                CurrentControl.Refresh();
                break;

            case KeyAction.Recount:

                MoveObjectsState = !MoveObjectsState;
                break;

            case KeyAction.UpKey:

                if (CurrentControl == null)
                {
                    break;
                }

                if (MoveObjectsState)
                {
                    CurrentControl.Top--;
                }
                else
                {
                    CurrentControl.Height--;
                }
                break;

            case KeyAction.DownKey:

                if (CurrentControl == null)
                {
                    break;
                }
                if (MoveObjectsState)
                {
                    CurrentControl.Top++;
                }
                else
                {
                    CurrentControl.Height++;
                }
                break;

            case KeyAction.LeftKey:

                if (CurrentControl == null)
                {
                    break;
                }

                if (MoveObjectsState)
                {
                    CurrentControl.Left--;
                }
                else
                {
                    CurrentControl.Width--;
                }
                break;

            case KeyAction.RightKey:

                if (CurrentControl == null)
                {
                    break;
                }
                if (MoveObjectsState)
                {
                    CurrentControl.Left++;
                }
                else
                {
                    CurrentControl.Width++;
                }
                break;
            }
        }