Example #1
0
        public void Highlight()
        {
            if (instance.GlobalSettings["taskbar_highlight"])
            {
                if ((Control is ChatConsole && instance.GlobalSettings["highlight_on_chat"]) ||
                    (Control is IMTabWindow && instance.GlobalSettings["highlight_on_im"]) ||
                    (Control is GroupIMTabWindow && instance.GlobalSettings["highlight_on_group_chat"]) ||
                    (Control is ConferenceIMTabWindow && instance.GlobalSettings["highlight_on_group_chat"]))
                {
                    FormFlash.StartFlash(Control.FindForm());
                }
            }

            if (Selected)
            {
                return;
            }

            if (!Detached)
            {
                Button.Image     = Properties.Resources.arrow_forward_16;
                Button.ForeColor = Color.Red;
            }

            Highlighted = true;
            OnTabHighlighted(EventArgs.Empty);
        }
Example #2
0
        private void chkAI_CheckedChanged(object sender, EventArgs e)
        {
            if (isloading)
            {
                return;
            }

            panel1.Enabled = groupBox1.Enabled = checkBox2.Enabled = chkAI.Checked;

            if (chkAI.Checked)
            {
                // Check to see if AI libraries have been installed
                string aimlDirectory = Application.StartupPath.ToString();
                aimlDirectory += "\\aiml\\";

                bool direxists = DirExists(aimlDirectory);

                if (!direxists)
                {
                    DialogResult resp = MessageBox.Show("You must first install the AI libraries. Do you want to download them now?", "METAbrain", MessageBoxButtons.YesNo);

                    if (resp == DialogResult.Yes)
                    {
                        try
                        {
                            // Open Windows Explorer
                            Process.Start("explorer.exe", Application.StartupPath.ToString());

                            // download the libraries
                            WebClient webClient = new WebClient();
                            webClient.DownloadFile("http://www.metabolt.net/dwl/METAbrain.zip", Application.StartupPath.ToString() + "\\METAbrain.zip");

                            FormFlash.Flash(instance.MainForm);

                            MessageBox.Show("Download complete. \n\nLook for 'METAbrain.zip' \n\nand unzip the contents into the folder \nthat's now visible in Windows Explorer.", "METAbrain");

                            webClient.Dispose();
                        }
                        catch (Exception ex)
                        {
                            string exp = ex.Message;
                            MessageBox.Show("There has been an error downloading the library file: \n\n" + exp + "\n\nDownload manually from here:\nhttp://www.metabolt.net/dwl/METAbrain.zip", "METAbrain");
                        }
                    }
                    else
                    {
                        chkAI.Checked = false;
                        return;
                    }
                }
            }
        }
Example #3
0
        public void Unhighlight()
        {
            FormFlash.StopFlash(instance.MainForm);

            if (!detached)
            {
                button.Image = null;
                button.ForeColor = Color.FromKnownColor(KnownColor.ControlText);
            }

            highlighted = partialHighlighted = false;
            OnTabUnhighlighted(EventArgs.Empty);
        }
Example #4
0
        public void Unhighlight()
        {
            if (detached)
            {
                FormFlash.Unflash(owner);
            }
            else
            {
                button.Image     = null;
                button.ForeColor = Color.FromKnownColor(KnownColor.ControlText);
            }

            highlighted = partialHighlighted = imboxhighlighted = false;
            OnTabUnhighlighted(EventArgs.Empty);
        }
Example #5
0
        public void IMboxHighlight()
        {
            if (selected)
            {
                return;
            }

            if (detached)
            {
                if (!owner.Focused)
                {
                    FormFlash.Flash(owner);
                }
            }
            else
            {
                //button.Image = Properties.Resources.arrow_forward_16;
                button.ForeColor = Color.Red;
            }

            imboxhighlighted = true;
            OnTabHighlighted(EventArgs.Empty);
        }
Example #6
0
        public void PartialHighlight()
        {
            if (selected)
            {
                return;
            }

            if (detached)
            {
                if (!owner.Focused)
                {
                    FormFlash.Flash(owner);
                }
            }
            else
            {
                button.Image     = null;
                button.ForeColor = Color.Blue;
            }

            partialHighlighted = true;
            OnTabPartiallyHighlighted(EventArgs.Empty);
        }