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

            Ehllapier.Disconnect(mActiveSessId);
            mActiveSessId = null;
        }
        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();
        }
 public OperatorInfoArea GetOperatorInfoArea()
 {
     ThrowSessionNotActive("GetShiftState failed.");
     byte[] oiaBytes = Ehllapier.GetOiaBytes(mActiveSessId);
     return(new OperatorInfoArea(oiaBytes));
 }
        public string CopyPresentationSpaceToString()
        {
            string psData = Ehllapier.CopyPresentationSpaceToString(mActiveSessId);

            return(psData);
        }
        public string Copy_OIA()
        {
            string psData = Ehllapier.Copy_OIA(mActiveSessId);

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