예제 #1
0
        private void Chat_Tick(object sender, EventArgs e)
        {
            if (!guessing)
            {
                history.AppendText(wcmp.ParseMessage(resources.GetString("convo"), chat_index, TitleScreen.username) + Environment.NewLine);
                switch (wcmp.GetSpecial(resources.GetString("convo"), chat_index))
                {
                case "addsh":
                    listBox1.Items.Add("SkyHigh");
                    join.Play();
                    this.ParentForm.FormClosing += WebChatClosing;
                    wimponclose = true;
                    break;

                case "nameguess":
                    typechat.Hide();
                    button2.Hide();
                    button3.Show();
                    button4.Show();
                    Chat.Stop();
                    guessing = true;
                    receive.Play();
                    break;

                case "addrain":
                    listBox1.Items.Add("rain49");
                    join.Play();
                    break;

                case "addfile":
                    label5.Show();
                    button5.Show();
                    file.Play();
                    break;

                case "addpadams":
                    listBox1.Items.Add("12padams");
                    join.Play();
                    ((WinClassic)this.ParentForm).closeDisabled = true;
                    TitleScreen.frm95.startbutton.Enabled       = false;
                    TitleScreen.frm95.startmenu.Hide();
                    break;

                case "nostart":
                    TitleScreen.frm95.startbutton.Hide();
                    TitleScreen.frm95.startmenu.Hide();
                    receive.Play();
                    break;

                case "removerain":
                    listBox1.Items.Remove("rain49");
                    leave.Play();
                    break;

                case "iconsded":
                    TitleScreen.frm95.desktopicons.Enabled = false;
                    receive.Play();
                    break;

                case "taskbarded":
                    TitleScreen.frm95.taskbar.Hide();
                    receive.Play();
                    break;

                case "iconsgone":
                    TitleScreen.frm95.desktopicons.Hide();
                    receive.Play();
                    break;

                case "bigtext":
                    history.Font = new Font("Arial", 12F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
                    ((WinClassic)this.ParentForm).maximizebutton.Enabled = false;
                    ((WinClassic)this.ParentForm).WindowState            = FormWindowState.Maximized;
                    receive.Play();
                    break;

                case "notopbar":
                    ((WinClassic)this.ParentForm).programtopbar = null;
                    receive.Play();
                    break;     // TODO: Finish WebChat 1998

                default:
                    receive.Play();
                    break;
                }
                if (TitleScreen.username == "devspeed")
                {
                    Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index) / 2;
                }
                else
                {
                    Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
                }
            }
            else
            {
                if (correctname)
                {
                    history.AppendText("SkyHigh: yay you got it right!" + Environment.NewLine);
                }
                else
                {
                    history.AppendText("SkyHigh: sorry, my name is actually bill" + Environment.NewLine);
                }
                guessing = false;
                receive.Play();
                Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
            }
            chat_index++;
        }
예제 #2
0
        private void Chat_Tick(object sender, EventArgs e)
        {
            if (!guessing)
            {
                if (history.ScrollBars != ScrollBars.None)
                {
                    history.AppendText(wcmp.ParseMessage(resources.GetString("convo"), chat_index, TitleScreen.username));
                }
                else
                {
                    history.Text = wcmp.ParseMessage(resources.GetString("convo"), chat_index, TitleScreen.username);
                }
                switch (wcmp.GetSpecial(resources.GetString("convo"), chat_index))
                {
                case "addsh":
                    listBox1.Items.Add("SkyHigh");
                    join.Play();
                    this.ParentForm.FormClosing += WebChatClosing;
                    wimponclose = true;
                    break;

                case "nameguess":
                    typechat.Hide();
                    button2.Hide();
                    button3.Show();
                    button4.Show();
                    Chat.Stop();
                    guessing = true;
                    receive.Play();
                    break;

                case "addrain":
                    listBox1.Items.Add("rain49");
                    join.Play();
                    break;

                case "addfile":
                    label5.Show();
                    button5.Show();
                    file.Play();
                    break;

                case "addpadams":
                    listBox1.Items.Add("12padams");
                    join.Play();
                    ((WinClassic)this.ParentForm).closeDisabled = true;
                    TitleScreen.frm95.startbutton.Enabled       = false;
                    TitleScreen.frm95.startmenu.Hide();
                    break;

                case "nostart":
                    TitleScreen.frm95.startbutton.Hide();
                    TitleScreen.frm95.startmenu.Hide();
                    receive.Play();
                    break;

                case "removerain":
                    listBox1.Items.Remove("rain49");
                    leave.Play();
                    break;

                case "iconsded":
                    TitleScreen.frm95.desktopicons.Enabled = false;
                    receive.Play();
                    break;

                case "taskbarded":
                    TitleScreen.frm95.taskbar.Hide();
                    receive.Play();
                    break;

                case "iconsgone":
                    TitleScreen.frm95.desktopicons.Hide();
                    receive.Play();
                    break;

                case "bigtext":
                    history.Font = new Font("Arial", 12F, FontStyle.Regular, GraphicsUnit.Point, ((0)));
                    ((WinClassic)this.ParentForm).maximizebutton.Enabled = false;
                    ((WinClassic)this.ParentForm).WindowState            = FormWindowState.Maximized;
                    ((WinClassic)this.ParentForm).right.Hide();
                    ((WinClassic)this.ParentForm).left.Hide();
                    ((WinClassic)this.ParentForm).bottom.Hide();
                    ((WinClassic)this.ParentForm).top.Hide();
                    ((WinClassic)this.ParentForm).bottomleftcorner.Hide();
                    ((WinClassic)this.ParentForm).bottomrightcorner.Hide();
                    ((WinClassic)this.ParentForm).topleftcorner.Hide();
                    ((WinClassic)this.ParentForm).toprightcorner.Hide();
                    ((WinClassic)this.ParentForm).Dock = DockStyle.Fill;
                    ((WinClassic)this.ParentForm).max  = true;
                    ((WinClassic)this.ParentForm).maximizebutton.Image = Engine.Properties.Resources.WinClassicRestore;
                    receive.Play();
                    break;

                case "notopbar":
                    ((WinClassic)this.ParentForm).programtopbar.Hide();
                    receive.Play();
                    break;

                case "filepoof":
                    label5.Hide();
                    button5.Hide();
                    receive.Play();
                    break;

                case "removesky":
                    listBox1.Items.Remove("SkyHigh");
                    leave.Play();
                    break;

                case "notype":
                    typechat.Hide();
                    button2.Hide();
                    receive.Play();
                    break;

                case ".labelgone":
                    label1.Hide();
                    label6.Hide();
                    label7.Hide();
                    break;

                case ".blackout":
                    BackColor         = Color.Black;
                    history.BackColor = Color.Black;
                    history.ForeColor = Color.White;
                    break;

                case "nosound":
                    msgsound = false;
                    break;

                case ".fulltext":
                    foreach (Control c in ((WinClassic)this.ParentForm).program.Controls)
                    {
                        if (c.Name != "programContent")
                        {
                            c.Hide();
                            ((WinClassic)this.ParentForm).program.Controls.Remove(c);
                        }
                    }
                    ((WinClassic)this.ParentForm).programContent.Location = new Point(0, 0);
                    ((WinClassic)this.ParentForm).programContent.Size     = ((WinClassic)this.ParentForm).ClientSize;
                    panel1.Hide();
                    history.Dock = DockStyle.Fill;
                    break;

                case "noscroll":
                    history.ScrollBars = ScrollBars.None;
                    break;

                case "nomouse":
                    Cursor.Hide();
                    break;

                case "type":
                    history.ReadOnly = false;
                    break;

                case "notyper":
                    history.ReadOnly = true;
                    break;     // TODO: Add ending here

                default:
                    if (msgsound)
                    {
                        receive.Play();
                    }
                    break;
                }
                if (TitleScreen.username == "devspeed")
                {
                    Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index) / 2;
                }
                else
                {
                    Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
                }
            }
            else
            {
                if (correctname)
                {
                    history.AppendText("SkyHigh: yay you got it right!" + Environment.NewLine);
                }
                else
                {
                    history.AppendText("SkyHigh: sorry, my name is actually bill" + Environment.NewLine);
                }
                guessing = false;
                receive.Play();
                Chat.Interval = wcmp.GetMessageDelay(resources.GetString("convo"), chat_index);
            }
            chat_index++;
        }