Esempio n. 1
0
        private void StartToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int i = ListBox1.SelectedIndex;

            if (i > -1)
            {
                Objects.Bot.Script script = Core.Global.ScriptList[i];
                bool val;
                if (script.ShouldRun)
                {
                    val = false;
                }
                else
                {
                    val = true;
                }
                Core.Global.ScriptList[i].ShouldRun = val;
                ChangeScriptState(i, val);

                /*if(val)
                 * {
                 *  Core.PreformScript(script.ScriptCode, false);
                 *
                 * }
                 * else
                 * {
                 *  Core.ScriptObjects.DisposeScript(script.ScriptCode);
                 * }
                 */
            }
        }
Esempio n. 2
0
        private void ViewCodeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int i = ListBox1.SelectedIndex;

            if (i > -1)
            {
                Objects.Bot.Script script = Core.Global.ScriptList[i];
                FastColoredTextBox1.Text = script.ScriptCode;
                TextBox1.Text            = script.Name;
            }
        }
Esempio n. 3
0
 private void ExecuteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (FastColoredTextBox1.Text != "")
     {
         if (TextBox1.Text != "")
         {
             Objects.Bot.Script script = new Objects.Bot.Script();
             script.Name       = TextBox1.Text;
             script.ScriptCode = FastColoredTextBox1.Text;
             Core.Global.ScriptList.Add(script);
             FastColoredTextBox1.Text = "";
             TextBox1.Text            = "";
         }
         else
         {
             MessageBox.Show("You must enter a name for the script");
         }
     }
     else
     {
         MessageBox.Show("No Code to Compile");
     }
 }