예제 #1
0
        public PresentationSpace GetPresentationSpace( )
        {
            Ehllapier.Wait(mActiveSessId);
            var ps = Ehllapier.GetPresentationSpace(this);

            return(ps);
        }
예제 #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);
        }
예제 #3
0
        public void Disconnect()
        {
            if (mActiveSessId == null)
            {
                throw new EhllapiExcp("display session is not active");
            }

            Ehllapier.Disconnect(mActiveSessId);
            mActiveSessId = null;
        }
예제 #4
0
        public void Wait()
        {
            Ehllapier.Wait(mActiveSessId);

            // ehllapi wait for host is sometimes not good enough. the new screen
            // from the host may not have arrived yet at the display. Use a dummy
            // read of the presentation space to make sure there is not
            // "wait for host response" going on. ( see CopyPresentationSpaceToString
            // in the Ehllapier class. )
            GetPresentationSpace();
        }
예제 #5
0
 public OperatorInfoArea GetOperatorInfoArea()
 {
     ThrowSessionNotActive("GetShiftState failed.");
     byte[] oiaBytes = Ehllapier.GetOiaBytes(mActiveSessId);
     return(new OperatorInfoArea(oiaBytes));
 }
예제 #6
0
        public string CopyPresentationSpaceToString()
        {
            string psData = Ehllapier.CopyPresentationSpaceToString(mActiveSessId);

            return(psData);
        }
예제 #7
0
        public string Copy_OIA()
        {
            string psData = Ehllapier.Copy_OIA(mActiveSessId);

            return(psData);
        }
예제 #8
0
 public void Connect(string SessId)
 {
     Ehllapier.Connect(SessId);
     mActiveSessId = SessId;
     mDim          = new PresentationSpaceDim(24, 80);
 }
예제 #9
0
 public void SendKeys(KeyboardKey Key)
 {
     Ehllapier.Wait(mActiveSessId);
     Ehllapier.SendKeys(mActiveSessId, Key.KeyText);
 }
예제 #10
0
 public void SendKeys(string InKeys)
 {
     Ehllapier.Wait(mActiveSessId);
     Ehllapier.SendKeys(mActiveSessId, InKeys);
 }