/// <summary>
        /// Processs the telnet.
        /// </summary>
        /// <param name="bytes">Bytes yo process</param>
        internal byte[] ProcessTelnet(byte[] bytes)
        {
            byte[] to  = new byte[bytes.Length];
            int    i   = 0;
            int    pos = 0;

            while (i < bytes.Length)
            {
                byte b = bytes[i];

                switch (b)
                {
                case BELL:
                {
                    if (main.Config.BellSound != null)
                    {
                        Win32Helper.PlaySound(main.Config.BellSound);
                    }
                    else
                    {
                        Win32Helper.PlaySoundEvent("SystemAsterisk");
                    }
                    ++i;
                    break;
                }

                case IAC:
                {
                    //MessageBox.Show("In IAC");
                    ++i;

                    if (i < bytes.Length)
                    {
                        b = bytes[i];

                        switch (b)
                        {
                        case WILL:
                        {
                            ++i;
                            if (i < bytes.Length)
                            {
                                b = bytes[i];
                                switch (b)
                                {
                                case TELOPT_ECHO:
                                {
                                    //FIXME main.Echo = false;
                                    ++i;
                                    break;
                                }
                                }
                            }
                            break;
                        }

                        case WONT:
                        {
                            ++i;
                            if (i < bytes.Length)
                            {
                                b = bytes[i];
                                switch (b)
                                {
                                case TELOPT_ECHO:
                                {
                                    //FIX ME main.Echo = true;
                                    ++i;
                                    break;
                                }
                                }
                            }
                            break;
                        }
                        }
                    }

                    break;
                }                        //case IAC

                default:
                {
                    to[pos++] = bytes[i++];
                    break;
                }
                }        //switch(b)
            }            //while

            return(to);
        }
 private void btnPlay_Click(object sender, EventArgs e)
 {
     Win32Helper.PlaySound(txtBellSound.Text);
 }