示例#1
0
        private async void MColouring_Click(object sender, MouseEventArgs e)
        {
            functions.PerformClick();
            BlockUnblockButtons(false);
            startVertexForm = new StartVertexInfo("Number of colours");
            await Task.Run(() => Algorithms.BackTrackingColouring(drawingSurface1, startVertexForm.GetInput(Circle.number)));

            BlockUnblockButtons(true);
        }
示例#2
0
        private async void Dijkstra_Click(object sender, EventArgs e)
        {
            functions.PerformClick();
            BlockUnblockButtons(false);
            startVertexForm = new StartVertexInfo();
            await Task.Run(() => Algorithms.Dijkstra(drawingSurface1, startVertexForm.GetInput(Circle.number) - 1));

            BlockUnblockButtons(true);
        }
示例#3
0
 public Form1()
 {
     InitializeComponent();
     startVertexForm = new StartVertexInfo();
     toolTip1.SetToolTip(addVertex, "Add vertex");
     toolTip2.SetToolTip(addEdge, "Add edge");
     toolTip3.SetToolTip(remove, "Remove");
     toolTip4.SetToolTip(download, "Download/upload graph");
     toolTip5.SetToolTip(functions, "Functions");
     toolTip6.SetToolTip(button10, "Download graph");
     toolTip7.SetToolTip(button11, "Upload graph");
     this.Hide();
 }