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); } } }
private void LoginCommandExecuted(object sender, ExecutedRoutedEventArgs e) { var window = new SignonScreen(_viewModel.Provider) { Owner = this }; var result = window.ShowDialog(); if (result == true) { LoginLabel.Content = " Logged In"; Announcement.Visibility = Visibility.Collapsed; Cursor = Cursors.Wait; _viewModel.LoadFacades(); Cursor = Cursors.Arrow; foreach (var facade in _viewModel.Facades) { this.ViewMenu.DropDown.Items.Add(facade.MenuName); } CommandManager.InvalidateRequerySuggested(); } }