예제 #1
0
        } // Init

        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        protected override void ReactionKeyDo(Keys key)
        {
            if (key == Keys.Escape)
            {
                Cancel();
                return;
            }
            else if (ChoiseCorrect == 0 && key == Keys.D0)
            {
                Cancel();
                return;
            }
            else if (Helper.IsGreenKey(key) || key == Keys.Enter)
            {
                // тут что-то должно быть
                if (ChoiseCorrect == 2)
                {
                    EnterCount();
                }
            }
            else if (key == Keys.D2)
            {
                if (ChoiseCorrect == 0)
                {
                    ChoiseCorrect = 2;
                    Positive("Укажите количество для корректировки");
                    return;
                }
            }
        } // ReactionKeyDo
예제 #2
0
        } // Cancel()

        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        protected override void ReactionKeyDo(Keys key)
        {
            if (key == Keys.Escape || key == Keys.D0)
            {
                Cancel();
            }
            else if (key == Keys.Enter || Helper.IsGreenKey(key))
            {
                SS.OnReport(new ReportEventArgs("Обновляю..."));
                Init();
                return;
            }
            else if (key == Keys.D1)
            {
                if ((int)TaskList.Rows[0]["allowed"] == 1)
                {
                    JumpTo(new RefillSet(SS, this));
                }
            }
            else if (key == Keys.D2)
            {
                if ((int)TaskList.Rows[1]["allowed"] == 1)
                {
                    JumpTo(new RefillLayout(SS, this));
                }
            }
        } // ReactionKeyDo
예제 #3
0
        } // Init

        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        protected override void ReactionKeyDo(Keys key)
        {
            if (key == Keys.Escape)
            {
                Cancel();
                return;
            }
            else if (Helper.IsGreenKey(key))
            {
                Complete();
            }
        } // ReactionKeyDo
예제 #4
0
        }   // Init

        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        protected override void ReactionKeyDo(Keys key)
        {
            if (Helper.IsGreenKey(key) || key == Keys.Enter)
            {
                EnterCount();
            }
            else if (key == Keys.Escape)
            {
                Refresh();
            }
            else if (key == Keys.Right)
            {
                JumpTo(new ItemCard(SS, this));
            }
        } // ReactionKeyDo
예제 #5
0
        }   // Init

        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        protected override void ReactionKeyDo(Keys key)
        {
            if (Helper.IsGreenKey(key) || key == Keys.Enter)
            {
                EnterCount();
            }
            else if (key == Keys.Escape)
            {
                SS.OnReport(new ReportEventArgs("Задача выбрана..."));
                JumpTo(new ChoiseWorkAcceptance(SS, this));
                return;
            }
            else if (key == Keys.Space)
            {
                CompleteLine();
            }
        } // ReactionKeyDo
예제 #6
0
        } // LoaderChoise (constructor)

        protected override void ReactionKeyDo(Keys key)
        {
            if (key == Keys.Escape || key == Keys.D0)
            {
                Cancel();
                return;
            }
            else if (key == Keys.Enter || Helper.IsGreenKey(key))
            {
                SS.OnReport(new ReportEventArgs("Обновляю список..."));
                Init();
                return;
            }

            int Choise = Helper.WhatInt(key);

            if (Choise > 0 && Choise < 9 && Choise <= TaskList.Rows.Count)
            {
                //Номер строки это и есть код
                bool allowed = (int)TaskList.Rows[Choise - 1]["allowed"] == 1 ? true : false;

                if (allowed)
                {
                    //Переход в режимы
                    if (Choise == 1)
                    {
                        SS.OnReport(new ReportEventArgs("Выбран лифт..."));
                        JumpTo(new LoaderChoiseLift(SS, this));
                    }
                    else if (Choise == 2)
                    {
                        SS.OnReport(new ReportEventArgs("Выбран спуск..."));
                        //SS.OnReport(new ReportEventArgs("Выбран спуск и подъем..."));
                        GoDownTask();
                    }
                    else if (Choise == 3)
                    {
                        SS.OnReport(new ReportEventArgs("Выбран подъем..."));
                        GoUpTask();
                    }
                }
            }
        } // ReactionKeyDo
예제 #7
0
        } // Init

        protected override void ReactionKeyDo(Keys key)
        {
            if (key == Keys.Escape || key == Keys.D0)
            {
                Cancel();
                return;
            }
            else if (key == Keys.Enter || Helper.IsGreenKey(key))
            {
                SS.OnReport(new ReportEventArgs("Обновляю список..."));
                Init();
                return;
            }

            int Choise = Helper.WhatInt(key);

            if (Choise > 0 && Choise <= LiftTaskList.Rows.Count)
            {
                GoLiftTask(LiftTaskList.Rows[Choise - 1]["sector"].ToString());
            }
        } // ReactionKeyDo
예제 #8
0
파일: RefillSet.cs 프로젝트: sanekkop/WPM
        } // Cancel

        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        protected override void ReactionKeyDo(Keys key)
        {
            if (CurrentAction == ActionSet.Waiting)
            {
                if (Helper.IsGreenKey(key))
                {
                    SS.OnReport(new ReportEventArgs("Проверим..."));
                    Refresh();
                }
            }
            else if (key == Keys.Escape && CollectedLines > 0)
            {
                Cancel();
                return;
            }
            else if (Helper.IsGreenKey(key) || key == Keys.Enter)
            {
                EnterCount();
            }
            else if (key == Keys.D9 && CurrentAction != ActionSet.EnterCount)
            {
                JumpTo(new RefillSetCorrect(SS, this));
            }
        } // ReactionKeyDo
예제 #9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        protected override void ReactionKeyDo(Keys key)
        {
            if ((Helper.IsGreenKey(key) || key == Keys.Enter) && (GoodsCC.Rows.Count > 0))
            {
                Item = new RefItem(SS);
                Item.FoundID(GoodsCC.Rows[IndexTableItem]["ID"].ToString());
                JumpTo(new ItemCard(SS, this));
            }
            else if (key == Keys.Escape)
            {
                if (ControlCC == null)
                {
                    SS.OnReport(new ReportEventArgs("Задача выбрана..."));
                    JumpTo(new ChoiseWork(SS, this));
                }
                else
                {
                    GoodsCC.Clear();
                    ControlCC      = null;
                    LabelControlCC = null;
                    Item           = new RefItem(SS);
                    Positive("Ожидание команды");
                    return;
                }
            }
            else if (key == Keys.Up)
            {
                if (GoodsCC.Rows.Count == 0)
                {
                    IndexTableItem = 0;
                    return;
                }
                if (IndexTableItem > 0)
                {
                    IndexTableItem--;
                }
                else
                {
                    IndexTableItem = GoodsCC.Rows.Count - 1;
                }
                Positive();
                return;
            }

            else if (key == Keys.Down)
            {
                if (GoodsCC.Rows.Count == 0)
                {
                    IndexTableItem = 0;
                    return;
                }
                if (IndexTableItem < GoodsCC.Rows.Count - 1)
                {
                    IndexTableItem++;
                }
                else
                {
                    IndexTableItem = 0;
                }
                Positive();
                return;
            }
        } // ReactionKeyDo