Ejemplo n.º 1
0
        /// <summary>
        /// Shows the message and force disconnection
        /// </summary>
        public override void Show()
        {
            Write(ANSI.ClearScreen());
            ShowLines(Header, 0, Header.Count, 1);
            NameValueCollection netconfig = (NameValueCollection)ConfigurationManager.GetSection("Networking");
            int inactivityTimeout         = Convert.ToInt32(netconfig["InactivityTimeout"]);

            client.lastActivity = DateTime.Now.AddSeconds(-(inactivityTimeout - 10));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Redraws the screen
        /// </summary>
        /// <returns></returns>
        protected virtual int Redraw()
        {
            Write(ANSI.ClearScreen());
            ShowLines(Header, 0, Header.Count, 1);
            ShowLines(Footer, 0, Footer.Count, dataAreaStart + dataAreaSize);
            Write(ANSI.SaveCursorPosition);
            if (Data.HasBodyAlternateBackground)
            {
                ClearBody();
            }
            int ret = ShowLines();

            Write(ANSI.RestoreCursorPosition);
            return(ret);
        }