private void editButton_Click(object sender, EventArgs e) { if (editMode) { tsp = new TSP(vertices, 0, 1000, 10, 0.3); } editMode = !editMode; toggleButton.Enabled = !editMode; resetButton.Enabled = toggleButton.Enabled; clearButton.Enabled = editMode; }
public MainWindow() { InitializeComponent(); vertices = GetVertices(GetRawVertices()); tsp = new TSP(vertices, 0, 1000, 10, 0.3); vertexBrush = new SolidBrush(Color.White); pathPen = new Pen(Color.Gray); bgColor = canvasBox.BackColor; working = false; editMode = false; updateStatusDelegate += UpdateStatus; }