Exemple #1
0
        private bool CheckNotepad(List <string> slit, PcommCore pc)
        {
            bool pass = true;

            pc.LinkToScreen <SJ672>((SJ672) =>
            {
                var str = SJ672.getContent().ToUpper();
                foreach (string s in slit)
                {
                    if (str.Contains(s.ToUpper()) && !string.IsNullOrEmpty(s))
                    {
                        pass = false;
                        break;
                    }
                }
                base.SendKey(KeyBoard.PF3);
                return(true);
            });
            if (!pass)
            {
                pc.SkipToHomeScreen <S0017>();
            }
            else
            {
                CommonScreen comm       = pc.GetScreen <CommonScreen>();
                string       screenCode = comm.GetText(1, 72, 80);
                if (screenCode.Contains("SJ672"))
                {
                    CheckNotepad(slit, pc);
                }
            }
            return(pass);
        }
Exemple #2
0
        public bool loopSecheme_id(List <string> slit, int row, PcommCore pc)
        {
            bool keyword = false;

            if (string.IsNullOrEmpty(base.ReadRow(row)))

            {
                Message.Add("row data is empty");
                // throw new Exception("row data is empty");
            }
            else
            {
                base.SetText("Y", row, 2);
                base.Enter();
                row++;

                if (row == 20)
                {
                    //throw new Exception("read data was completed");
                    Message.Add("row data is empty");
                }
                pc.LinkToScreen <SJ672>((SJ672) =>
                {
                    var str = SJ672.getContent();
                    slit.ForEach(x => {
                        if (str.Contains(x) && !string.IsNullOrEmpty(x))
                        {
                            keyword = true;
                            Message.Add(x + "key word is exsits");
                            base.SendKey(KeyBoard.PF3);
                            return;
                            //throw new Exception(x + "key word is exsits");
                            //throw new Exception(x + "key word is exsits");
                        }
                        //else
                        //{
                        //    base.SendKey(KeyBoard.PF3);
                        //}
                    });
                    base.SendKey(KeyBoard.PF3);
                    return(true);
                });
            }
            return(keyword);
        }