Exemple #1
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            string itemText = null;

            if (sender is MenuItem)
            {
                itemText = (sender as MenuItem).Header as string;
            }

            if (itemText == "Test")
            {
                SignoffTester();
                return;

                SessionTester();
            }

            else if (itemText == "Exit")
            {
                this.Close();
            }

            else if (itemText == "Settings")
            {
                EhllapiSettings settings = EhllapiSettings.RecallSettings();
                var             wdw      = new EhllapiSettingsEntry();
                wdw.ShowDialog();
            }
        }
Exemple #2
0
        /// <summary>
        /// If the session display does not contain a signon screen, automatically sign
        /// the session off.
        /// </summary>
        /// <param name="SessId"></param>
        public static SessIdMessage AssureSignedOff(string SessId)
        {
            SessIdMessage msg      = null;
            var           settings = EhllapiSettings.RecallSettings();

            settings.SessId = SessId;

            // make sure the session is active.
            SessionScript.Assure_ClientAccessSession(settings);

            msg = SignonScreen.AssureSignedOff(settings);
            return(msg);
        }
        public static DisplaySession StartSession(string SessId)
        {
            var settings = EhllapiSettings.RecallSettings();

            var sess = new DisplaySession()
            {
                mActiveSessId = SessId
            };



            return(sess);
        }
Exemple #4
0
        static pcsapi( )
        {
            var settings = EhllapiSettings.RecallSettings();

            if (settings.DirPath_Emulator.IsNullOrEmpty( ) == false)
            {
                var path = Environment.GetEnvironmentVariable("PATH") ?? string.Empty;
                if (path.Contains(settings.DirPath_Emulator) == false)
                {
                    path += ";" + settings.DirPath_Emulator;
                    Environment.SetEnvironmentVariable("PATH", path);
                }
            }
        }
Exemple #5
0
        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);
                }
            }
        }