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; } } } }
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); }
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); }