public override bool IsScreen()
            {
                PresentationSpace ps = base.PresentationSpace;

                var f1 = ps.FindField(new DisplayLocation(1, 2));
                var f2 = ps.FindField(new DisplayLocation(2, 2));
                var f3 = ps.FindField(new DisplayLocation(1, 37));

                // qualified file name
                var f4 = ps.FindField(new DisplayLocation(1, 79));

                // member name
                var f5 = ps.FindField(new DisplayLocation(2, 79));

                if ((f1.TextContains("Columns") == true) &&
                    (f2.TextContains("SEU==>") == true) &&
                    (f3.TextContains("Browse") == true) &&
                    ((f4 != null) && (f4.Length >= 21)) &&
                    ((f5 != null) && (f5.Length == 10)))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
Example #2
0
        public static PresentationSpace GetPresentationSpace(DisplaySession Sess)
        {
            PresentationSpace ps = null;

            byte[] charBuf = null;
            int    bufSx   = 0;

            // get display characters and char attributes.
            while (true)
            {
                Ehllapier.SetSessionParameters("ATTRB,EAB,NOXLATE");
                bufSx   = (Sess.Dim.Width * Sess.Dim.Height) * 2;
                charBuf = CopyPresentationSpace(bufSx);

                // presentation space contains nulls.
                if ((charBuf[0] == 0x20) && (charBuf[1] == 0x00))
                {
                    Thread.Sleep(1);
                    continue;
                }

                // got some valid data
                break;
            }

            // get the color attributes of presentation space characters.
            Ehllapier.SetSessionParameters("ATTRB,EAB,XLATE");
            byte[] colorBuf = CopyPresentationSpace(bufSx);

            var lowPs = new LowPresentationSpace(Sess, charBuf, colorBuf, 2);

            ps = new PresentationSpace(lowPs);

            return(ps);
        }
        /// <summary>
        /// send keystrokes intended to signoff the display session to the Settings.SessId
        /// identified display session window.
        /// </summary>
        /// <param name="InSess"></param>
        public void Play_Signoff(DisplaySession InSess)
        {
            while (true)
            {
                PresentationSpace          ps  = InSess.GetPresentationSpace();
                CommonScreens.SignonScreen sos = new CommonScreens.SignonScreen(ps);
                if (sos.IsScreen( ))
                {
                    throw new EhllapiExcp("At signon screen. cant signoff from this screen.");
                }

                InSess.SendKeys(Ehllapier.Key.SystemRequest + Ehllapier.Key.Enter);
                InSess.Wait();

                ps = InSess.GetPresentationSpace();
                var sysrqs = new CommonScreens.SystemRequestMenuScreen(ps);
                if (sysrqs.IsScreen( ))
                {
                    break;
                }
            }

            InSess.SendKeys("90" + Ehllapier.Key.Enter);
            InSess.Wait();

            // signoff prompt
            InSess.SendKeys(Ehllapier.Key.Enter);
            InSess.Wait();

            return;

            InSess.SendKeys(Ehllapier.Key.SystemRequest + "90" + Ehllapier.Key.Enter);
            Play_Signoff_WaitUntilSignedOff(InSess);
        }
Example #4
0
        public override bool IsScreen( )
        {
            PresentationSpace ps = base.PresentationSpace;

            PresentationSpaceField f1 =
                ps.FindField(new DisplayLocation(1, 38));
            PresentationSpaceField f2 =
                ps.FindField(new DisplayLocation(3, 2));
            PresentationSpaceField f3 =
                ps.FindField(new DisplayLocation(5, 4));

            // qualified file name
            PresentationSpaceField f4 =
                ps.FindField(new DisplayLocation(5, 42));

            if (((f1 != null) && (f1.Text.Contains("Exit") == true)) &&
                ((f2 != null) && (f2.Text.Contains("Type choices, press Enter") == true)) &&
                ((f3 != null) && (f3.Text.Contains("Change/create member") == true)) &&
                ((f4 != null) && (f4.Length == 1)))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #5
0
            public PresentationSpace F3_Exit(DisplaySession InSess)
            {
                PresentationSpace ps = null;

                InSess.SendKeys(Ehllapier.Key.F3);
                ps = InSess.GetPresentationSpace();
                return(ps);
            }
 private void Play_Signoff_WaitUntilSignedOff(DisplaySession InSess)
 {
     while (true)
     {
         InSess.Wait( );
         PresentationSpace          ps  = InSess.GetPresentationSpace();
         CommonScreens.SignonScreen sos = new CommonScreens.SignonScreen(ps);
         if (sos.IsScreen( ))
         {
             break;
         }
         Thread.Sleep(1);
     }
 }
        /// <summary>
        /// Scrape the screen to determine if the Samuel signon screen is displayed.
        /// </summary>
        /// <param name="InSess"></param>
        /// <returns></returns>
        public bool IsAtxSignon(DisplaySession InSess)
        {
            PresentationSpace ps = null;

            ps = InSess.GetPresentationSpace();
            if ((ps.IndexOf("Sign On") != null) &&
                (ps.IndexOf("User  . . .") != null) &&
                (ps.IndexOf("Password  .") != null))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #8
0
            public override bool IsScreen()
            {
                PresentationSpace ps = base.PresentationSpace;

                PresentationSpaceField f1 =
                    ps.FindField(new DisplayLocation(1, 38));
                PresentationSpaceField f2 =
                    ps.FindField(new DisplayLocation(5, 4));

                if ((f1.TextContains("Exit") == true) &&
                    (f2.TextContains("Change/create member  . .") == true))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        public static PresentationSpace ReadPresentationSpace(
            EhllapiSettings InSettings)
        {
            PresentationSpace ps = null;

            try
            {
                using (DisplaySession sess = new DisplaySession())
                {
                    sess.Connect(InSettings.SessId);

                    ps = sess.GetPresentationSpace();
                }
            }
            catch (ApplicationException excp)
            {
                throw new EhllapiExcp("ReadPresentationSpace failed", excp);
            }
            return(ps);
        }
Example #10
0
        public override bool IsScreen( )
        {
            PresentationSpace ps = base.PresentationSpace;

            PresentationSpaceField f1 =
                ps.FindField(new DisplayLocation(1, 37));
            PresentationSpaceField f2 =
                ps.FindField(new DisplayLocation(6, 17));
            PresentationSpaceField f3 =
                ps.FindField(new DisplayLocation(7, 17));

            if ((f1.TextContains("Sign On") == true) &&
                (f2.TextContains("User  . . .") == true) &&
                (f3.TextContains("Password  .") == true))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #11
0
        public SubfileRow GetSubfileRow(int RowNbr)
        {
            int sflStartRowNbr = 11;
            int rx             = sflStartRowNbr + RowNbr;

            SubfileRow row = new SubfileRow();

            PresentationSpace ps = base.PresentationSpace;

            // option. column 2.
            {
                PresentationSpaceField f1 =
                    ps.FindField(new DisplayLocation(rx, 2));
                row.Opt = f1.Text;
            }

            // member name. column 7.
            {
                PresentationSpaceField f1 =
                    ps.FindField(new DisplayLocation(rx, 7));
                row.Member = f1.Text;
            }

            // member type. column 19.
            {
                PresentationSpaceField f1 =
                    ps.FindField(new DisplayLocation(rx, 19));
                row.Type = f1.Text;
            }

            // member text. column 31.
            {
                PresentationSpaceField f1 =
                    ps.FindField(new DisplayLocation(rx, 31));
                row.Text = f1.Text;
            }

            return(row);
        }
Example #12
0
        public override bool IsScreen( )
        {
            PresentationSpace ps = base.PresentationSpace;

            PresentationSpaceField f1 =
                ps.FindField(new DisplayLocation(1, 28));
            PresentationSpaceField f2 =
                ps.FindField(new DisplayLocation(3, 2));
            PresentationSpaceField f3 =
                ps.FindField(new DisplayLocation(4, 4));

            if ((f1.TextContains("Work with Members Using PDM") == true) &&
                (f2.TextContains("File  . . . . . .") == true) &&
                (f3.TextContains("Library . . . .") == true))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public override bool IsScreen( )
        {
            PresentationSpace ps = base.PresentationSpace;

            PresentationSpaceField f1 =
                ps.FindField(new DisplayLocation(1, 34));
            PresentationSpaceField f2 =
                ps.FindField(new DisplayLocation(5, 2));
            PresentationSpaceField f3 =
                ps.FindField(new DisplayLocation(7, 2));

            if (((f1 != null) && (f1.Text.Contains("(STRSEU)") == true)) &&
                ((f2 != null) && (f2.Text.Contains("Source file  . . . . . .") == true)) &&
                ((f3 != null) && (f3.Text.Contains("Source member  . . . .") == true)))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public override bool IsScreen( )
        {
            PresentationSpace ps = base.PresentationSpace;

            PresentationSpaceField f1 =
                ps.FindField(new DisplayLocation(1, 33));
            PresentationSpaceField f2 =
                ps.FindField(new DisplayLocation(2, 56));
            PresentationSpaceField f3 =
                ps.FindField(new DisplayLocation(7, 2));

            if (((f1 != null) && (f1.Text.Contains("Display Messages") == true)) &&
                ((f2 != null) && (f2.Text.Contains("System:") == true)) &&
                ((f3 != null) &&
                 (f3.Text.Contains("Type reply (if required), press Enter.") == true)))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public static void Play_ItemLocatorInquiry(EhllapiSettings InSettings)
        {
            try
            {
                PresentationSpace ps     = null;
                SessionScript     script = new SessionScript();

                script.AssureSignoff(InSettings);

                // signon the display
                script.Play_Signon(InSettings);

                using (DisplaySession sess = new DisplaySession())
                {
                    sess.Connect(InSettings.SessId);

                    // tab to the menu option input field
                    sess.SendKeys(Ehllapier.Key.TabRight);

                    // option i
                    sess.SendKeys("i");
                    sess.Wait();

                    // 6174054
                    sess.SendKeys("6174054" + Ehllapier.Key.Enter);
                    sess.Wait();

                    // option 10
                    sess.SendKeys(Ehllapier.Key.TabRight + Ehllapier.Key.NewLine + "10" + Ehllapier.Key.Enter);
                    sess.Wait();
                }
            }
            catch (ApplicationException excp)
            {
                throw new EhllapiExcp("Play_ItemLocatorInquiry script failed", excp);
            }
        }
 public DisplayScreen(PresentationSpace InPs)
 {
     mPs = InPs;
 }
 public DisplayMessagesScreen(PresentationSpace InPs)
     : base(InPs)
 {
 }
 public BrowseScreen(PresentationSpace PresentationSpace)
     : base(PresentationSpace)
 {
 }
Example #19
0
 public ExitScreen(PresentationSpace PresentationSpace)
     : base(PresentationSpace)
 {
 }
 public RecoverInteractiveJobScreen(PresentationSpace PresentationSpace)
     : base(PresentationSpace)
 {
 }
Example #21
0
 public WrkmbrpdmScreen(PresentationSpace PresentationSpace)
     : base(PresentationSpace)
 {
 }
Example #22
0
 public SystemRequestMenuScreen(PresentationSpace InPs)
     : base(InPs)
 {
 }
Example #23
0
 public SignonScreen(PresentationSpace InPs)
     : base(InPs)
 {
 }
Example #24
0
 public StrseuExitScreen(PresentationSpace InPs)
     : base(InPs)
 {
 }
 public PromptStrseuScreen(PresentationSpace InPs)
     : base(InPs)
 {
 }