コード例 #1
0
            public void Enter_Text(DisplaySession InSess, string InText)
            {
                // tab to first entry field -  file name.
                InSess.TabRightToColumn(9);

                InSess.SendKeys(InText + Ehllapier.Key.Enter);
            }
コード例 #2
0
        public void Enter(
            DisplaySession Sess,
            string FileName, string LibraryName, string PositionToMember)
        {
            // tab to first entry field -  file name.
            DisplayLocation loc = new DisplayLocation(3, 22);

            Sess.TabRightToDisplayLocation(loc);

            if (FileName != null)
            {
                Sess.SendKeys(FileName + Ehllapier.Key.FieldExit);
            }

            if (LibraryName != null)
            {
                Sess.SendKeys(LibraryName + Ehllapier.Key.FieldExit);
            }

            if (PositionToMember != null)
            {
                Sess.SendKeys(PositionToMember + Ehllapier.Key.FieldExit);
            }

            Sess.SendKeys(Ehllapier.Key.Enter);
        }
コード例 #3
0
            public PresentationSpace F3_Exit(DisplaySession InSess)
            {
                PresentationSpace ps = null;

                InSess.SendKeys(Ehllapier.Key.F3);
                ps = InSess.GetPresentationSpace();
                return(ps);
            }
コード例 #4
0
            public void Enter_Insert(DisplaySession InSess)
            {
                // tab to first entry field -  file name.
                DisplayLocation loc = new DisplayLocation(3, 1);

                InSess.TabRightToDisplayLocation(loc);

                InSess.SendKeys("I" + Ehllapier.Key.Enter);
            }
コード例 #5
0
 public LowPresentationSpace(
     DisplaySession InSess, byte[] InCharBuf, byte[] InColorBuf, int InPixelSx)
 {
     this.Dim  = InSess.Dim;
     mCharBuf  = InCharBuf;
     mColorBuf = InColorBuf;
     mPixelSx  = InPixelSx;
     LoadPixels( );
     mCursorLocation = InSess.CursorLocation;
 }
コード例 #6
0
            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);
            }
コード例 #7
0
        public void Enter(
            DisplaySession InSess, string InMemberName)
        {
            // tab to first entry field -  source member name.
            DisplayLocation loc = new DisplayLocation(7, 37);

            InSess.TabRightToDisplayLocation(loc);

            InSess.SendKeys(InMemberName + Ehllapier.Key.FieldExit);

            InSess.SendKeys(Ehllapier.Key.Enter);
        }
コード例 #8
0
        public void Enter(
            DisplaySession InSess, string InSelection)
        {
            // tab to entry field as row xxx, col yyy
            var loc = new DisplayLocation(20, 7);

            InSess.TabRightToDisplayLocation(loc);

            InSess.SendKeys(InSelection + Ehllapier.Key.FieldExit);
            InSess.SendKeys(Ehllapier.Key.Enter);
            InSess.Wait();
        }
コード例 #9
0
        public void Enter(
            DisplaySession InSess, string InChangeCreateFlag)
        {
            // tab to first entry field -  file name.
            DisplayLocation loc = new DisplayLocation(5, 42);

            InSess.TabRightToDisplayLocation(loc);

            InSess.SendKeys(InChangeCreateFlag);

            InSess.SendKeys(Ehllapier.Key.Enter);
        }
コード例 #10
0
        public void EnterSubfileOption(
            DisplaySession Sess,
            int RowNbr, string OptionValue)
        {
            // tab to subfile option entry field.
            DisplayLocation loc = new DisplayLocation(11 + RowNbr, 2);

            Sess.TabRightToDisplayLocation(loc);

            Sess.SendKeys(OptionValue + Ehllapier.Key.FieldExit);

            Sess.SendKeys(Ehllapier.Key.Enter);
        }
コード例 #11
0
 public static bool IsScreen(DisplaySession DisplaySession)
 {
     StrseuScreen.ExitScreen dms =
         new StrseuScreen.ExitScreen(DisplaySession.GetPresentationSpace());
     if (dms.IsScreen() == true)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #12
0
        public static bool IsScreen(DisplaySession DisplaySession)
        {
            DisplayMessagesScreen dms =
                new DisplayMessagesScreen(DisplaySession.GetPresentationSpace());

            if (dms.IsScreen() == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #13
0
        public static bool IsScreen(DisplaySession DisplaySession)
        {
            RecoverInteractiveJobScreen dms =
                new RecoverInteractiveJobScreen(DisplaySession.GetPresentationSpace());

            if (dms.IsScreen() == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #14
0
            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);
                }
            }
コード例 #15
0
        public bool AssureSignedOn(
            DisplaySession InSess, string InUserName, string InPassword)
        {
            bool wasSignedOn = false;

            if (IsScreen( ) == true)
            {
                Enter(InSess, InUserName, InPassword);
                wasSignedOn = false;
            }
            else
            {
                wasSignedOn = true;
            }
            return(wasSignedOn);
        }
コード例 #16
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);
                }
            }
        }
コード例 #17
0
        public static SessIdMessage AssureSignedOff(EhllapiSettings Settings)
        {
            SessIdMessage msg = null;

            if (SignonScreen.IsScreen(Settings) == false)
            {
                var script = new SessionScript();
                var sess   = new DisplaySession();
                script.Play_Signoff(Settings);
                msg = new SessIdMessage()
                {
                    SessId  = Settings.SessId,
                    Message = "Session signed off"
                };
            }

            return(msg);
        }
コード例 #18
0
        public void Enter(
            DisplaySession InSess, string InUserName, string InPassword)
        {
            // tab to entry field as row xxx, col yyy
            var loc = new DisplayLocation(6, 53);

            InSess.TabRightToDisplayLocation(loc);

            InSess.SendKeys(InUserName + Ehllapier.Key.FieldExit);
            InSess.SendKeys(InPassword + Ehllapier.Key.FieldExit);
            InSess.SendKeys(Ehllapier.Key.Enter);
            InSess.Wait();

            // advance past "display messages" screen.
            DisplayMessagesScreen dpm =
                new DisplayMessagesScreen(InSess.GetPresentationSpace( ));

            if (dpm.IsScreen( ))
            {
                dpm.Enter(InSess);
            }
        }
コード例 #19
0
 public void Enter(DisplaySession InSess)
 {
     InSess.SendKeys(Ehllapier.Key.Enter);
 }
コード例 #20
0
 public void Initialize(DisplaySession displaySession)
 {
     connectButton.onClick.RemoveAllListeners();
     connectButton.onClick.AddListener(() => displaySession.EnterPasswordAndConnect(inputPassWord.text));
 }
コード例 #21
0
 public static void InvokeEvents(object sender, MushraTestDetailsModel e)
 {
     DisplaySession?.Invoke(sender, e);
     SessionCreated?.Invoke(sender, e);
     _sessionCreatedFlag = true;
 }
コード例 #22
0
        /// <summary>
        /// Returns Notification for a DisplayEndpoint (if any)
        /// </summary>
        /// <param name="displayEndpoint"></param>
        /// <returns></returns>
        private async Task <Notification> GetNotificationAsync(DisplayEndpoint displayEndpoint)
        {
            Notification notificationToReturn = null;

            try
            {
                bool isDataModified = false;

                // Retrieve the DisplayEndpoint's respective DisplaySession
                DisplaySession displaySession = (await _dataClient?.TransientData?.ObtainDisplayConcurrentListAsync())?.ObtainDisplaySession(_displayEndpointID.Value);
                if (displaySession != null)
                {
                    // Fetch Notification to return and
                    // update the DisplaySession accordingly
                    if (displaySession.LocationDeviceID != null)
                    {
                        // Retrieve the Notification for the LocationDevice and return only if it's 'Active'
                        var notification = (await _dataClient?.ConfigurationData?.LocationDevices?
                                            .Include(lD => lD.LocationDeviceNotifications)
                                            .ThenInclude(lDN => lDN.Notification)
                                            .AsNoTracking()
                                            .SingleOrDefaultAsync(lD => lD.LocationDeviceID == displaySession.LocationDeviceID))?.LocationDeviceNotifications?.FirstOrDefault()?.Notification;
                        notificationToReturn = notification?.Active ?? false == true ? notification : null;
                    }
                    else if (displaySession.IsUserExists)
                    {
                        // Retrieve the list of active Notifications
                        List <Notification> activeNotifications = displayEndpoint?.DisplayEndpointNotifications?.Select(dEN => dEN.Notification)?
                                                                  .Where(n => n.Active == true).ToList();

                        if (activeNotifications?.Any() ?? false)
                        {
                            if (displaySession.BufferedShowNotificationID == null)
                            {
                                notificationToReturn = GetARandomNotificationFromAList(activeNotifications);
                                displaySession.BufferedShowNotificationID      = GetARandomNotificationFromAList(activeNotifications, notificationToReturn?.NotificationID)?.NotificationID;
                                displaySession.CurrentShowNotificationExpireAt = DateTime.UtcNow.AddSeconds(notificationToReturn?.Timeout ?? 0);
                                isDataModified = true;
                            }
                            else
                            {
                                if (DateTime.UtcNow <= displaySession.CurrentShowNotificationExpireAt.Value.ToUniversalTime())
                                {
                                    notificationToReturn = activeNotifications
                                                           .SingleOrDefault(n => n.NotificationID == displaySession.BufferedShowNotificationID);
                                }
                                else
                                {
                                    var lastBufferedShowNotification = activeNotifications
                                                                       .SingleOrDefault(n => n.NotificationID == displaySession.BufferedShowNotificationID);

                                    notificationToReturn = GetARandomNotificationFromAList(activeNotifications, displaySession.BufferedShowNotificationID);
                                    displaySession.BufferedShowNotificationID      = notificationToReturn?.NotificationID;
                                    displaySession.CurrentShowNotificationExpireAt = displaySession.CurrentShowNotificationExpireAt.Value.AddSeconds(lastBufferedShowNotification?.Timeout ?? 0).ToUniversalTime();
                                    isDataModified = true;
                                }
                            }
                        }
                    }
                }

                if (isDataModified)
                {
                    // Save the updated DisplaySessions
                    await _dataClient.TransientData.SaveDisplayConcurrentListAsync();

                    Context.Logger.LogLine("DisplaySession updated");
                }
            }
            catch (Exception ex)
            {
                notificationToReturn = null;
                Context.Logger.LogLine("DisplayConcurrentList ERROR: " + ex.Message);
            }

            return(notificationToReturn);
        }
コード例 #23
0
 public void F6_Add(DisplaySession InSess)
 {
     InSess.SendKeys(Ehllapier.Key.F6);
 }
コード例 #24
0
 public void Enter(DisplaySession InSess, string InText)
 {
     InSess.SendKeys(InText + Ehllapier.Key.Enter);
 }