2using System.Collections.Generic;
3using System.ComponentModel;
8using System.Threading.Tasks;
9using System.Windows.Forms;
13 public partial class SetTool : Form
19 InitializeComponent();
21 foreach (Scripting.Script tool in Scripting.Scripts.Values)
23 if (tool.type == Scripting.ScriptType.tool)
25 ListViewItem item =
new ListViewItem();
26 item.Text = tool.name;
28 toolView.Items.Add(item);
33 public Scripting.Script Script
35 get {
return (Scripting.Script)toolView.SelectedItems[0].Tag;}
41 private void setToolBut_Click(
object sender, EventArgs e)
43 DialogResult = DialogResult.OK;
50 private void toolView_SelectedIndexChanged(
object sender, EventArgs e)
52 if (Script.thread !=
null)
62 private void timer_Tick(
object sender, EventArgs e)
64 foreach (ListViewItem item
in toolView.Items)
66 item.Text = ((Scripting.Script)item.Tag).ToString();
76 private void stopToolStripMenuItem_Click(
object sender, EventArgs e)
78 if (Script.thread !=
null)