override public void FinishWithCustomer() { // get back to the clear screen case ClearScreenAndWait(); _Handler = null; }
private void Form1_Closing(object sender, EventArgs e) { if (m_Handler != null) { m_Handler.Disconnect(); } m_Handler = null; }
private bool SetOpeningState() { try { // if we are doing 3270 if (_use3270) { // connect to the host if not already done so if (m_Handler == null) { m_Handler = new SessionDisplay(); m_Handler.Connect("TRANSPORT=SNA;LOGICALUNITNAME=" + this.InputLUNameBox.Text.Trim().ToUpperInvariant()); m_Handler.Connection.HostCodePage = 37; // set the large form, so that we can see 3270 stuff this.Width = _largeWindowSize; // wait for the Message 10 Screen m_Handler.WaitForContent("TERM NAME", 20000); // try to connect to CICS m_Handler.SendKey("LOGON APPLID(" + this.InputCICSNameBox.Text.Trim().ToUpperInvariant() + ")@E"); // must be in PLU session m_Handler.WaitForSession(SessionDisplayWaitType.PLUSLU, 20000); // wait for the blurb to come m_Handler.WaitForContent(@"DEMONSTRATION", 20000); // go to the clear screen ClearScreenAndWait(); _hostOK = true; } } else { // squash the form down! this.Width = 1049; this.Height = 588; _hostOK = true; } } catch (Exception ex) { MessageBox.Show(ex.Message); if (m_Handler != null) { m_Handler.Disconnect(); } m_Handler = null; return(false); } DisableEverything(); EnableWorkTab(); return(true); }
private void ReconfigureButton_Click(object sender, EventArgs e) { // disconnect the session if we are using 3270 if (m_Handler != null) { m_Handler.Disconnect(); } m_Handler = null; // return to the configuration page DisableEverything(); EnableConfigurationTab(); }
public AccountHandler3270(SessionDisplay handler) { if (handler == null) { throw new ArgumentNullException("handler"); } _Handler = handler; // if we should trace, we need a fixed width font FontFamily fontFamily = new FontFamily("Courier New"); m_FixedFont = new Font(fontFamily, 10, FontStyle.Regular, GraphicsUnit.Pixel); }