public static bool IsScreen(EhllapiSettings Settings) { bool isScreen = false; using (DisplaySession sess = new DisplaySession()) { sess.Connect(Settings.SessId); isScreen = StrseuScreen.ExitScreen.IsScreen(sess); } return(isScreen); }
public static void Enter(EhllapiSettings Settings) { using (DisplaySession sess = new DisplaySession()) { sess.Connect(Settings.SessId); StrseuScreen.ExitScreen dms = new StrseuScreen.ExitScreen(sess.GetPresentationSpace()); if (dms.IsScreen() == false) { throw new ApplicationException("not at STRSEU Exit screen."); } dms.Enter(sess); } }
private void SessionTester( ) { var ehSettings = EhllapiSettings.RecallSettings(); // make sure the session is active. SessionScript.Assure_ClientAccessSession(ehSettings); // bring the 5250 window to the foreground. Ehllapier.SetForegroundWindow(ehSettings.SessId); // make sure signed on. if (SignonScreen.IsScreen(ehSettings)) { var script = new SessionScript(); script.Play_Signon(ehSettings); } // in the strseu screen. Exit back to presumably wrkmbrpdm. if (StrseuScreen.EditScreen.IsScreen(ehSettings)) { StrseuScreen.EditScreen.F3_Exit(ehSettings); if (StrseuScreen.ExitScreen.IsScreen(ehSettings)) { StrseuScreen.ExitScreen.Enter(ehSettings); } } // in the seu browse screen. press enter to exit. if (StrseuScreen.BrowseScreen.IsScreen(ehSettings)) { StrseuScreen.BrowseScreen.Enter_Exit(ehSettings); } using (DisplaySession sess = new DisplaySession()) { bool isScreen = false; sess.Connect(ehSettings.SessId); // display messages. press enter. if (DisplayMessagesScreen.IsScreen(sess)) { sess.SendKeys(KeyboardKey.Enter); } } }