示例#1
0
 private void pb_Search_Click(object sender, EventArgs e)
 {
     if (tb_Search.Text.ToString() == "스택(Stack)")
     {
         stack             = new Stack();
         stack.FormClosed += Stack_FormClosed;
         stack.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "연결리스트(LinkedList)")
     {
         ll             = new LinkedList();
         ll.FormClosed += Ll_FormClosed;
         ll.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "삽입정렬(InsertSort)")
     {
         Is             = new InsertSort();
         Is.FormClosed += Is_FormClosed;
         Is.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "선택정렬(SelectionSort)")
     {
         ss             = new SelectionSort();
         ss.FormClosed += Ss_FormClosed;
         ss.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "이진탐색트리(BinarySearchTree)")
     {
         bst             = new BinarySearchTree();
         bst.FormClosed += Bst_FormClosed;
         bst.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "큐(Queue)")
     {
         q             = new QUeue();
         q.FormClosed += Q_FormClosed;
         q.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "쉘정렬(ShellSort)")
     {
         shellSort             = new ShellSort();
         shellSort.FormClosed += ShellSort_FormClosed;
         shellSort.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "깊이우선탐색(Depth-first search)")
     {
         dfs             = new DepthFirstSearch();
         dfs.FormClosed += Dfs_FormClosed;
         dfs.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "너비우선탐색(Breadth-first search)")
     {
         bfs             = new BreadthFirstSearch();
         bfs.FormClosed += Bfs_FormClosed;
         bfs.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "버블정렬(BubbleSort)")
     {
         bs             = new BubbleSort();
         bs.FormClosed += Bs_FormClosed;
         bs.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "퀵정렬(QuickSort)")
     {
         qs             = new QuickSort();
         qs.FormClosed += Qs_FormClosed;
         qs.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "힙정렬(HeapSort)")
     {
         hs             = new HeapSort();
         hs.FormClosed += Hs_FormClosed;
         hs.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "기수정렬(RadixSort)")
     {
         rs             = new RadixSort();
         rs.FormClosed += Rs_FormClosed;
         rs.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "버킷정렬(BucketSort)")
     {
         bucketsort             = new BucketSort();
         bucketsort.FormClosed += Bucketsort_FormClosed;
         bucketsort.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "다익스트라알고리즘(Dijkstra algorithm)")
     {
         dijkstra             = new Dijkstra();
         dijkstra.FormClosed += Dijkstra_FormClosed;
         dijkstra.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "프림알고리즘(Prim's algorithm)")
     {
         prim             = new Prim();
         prim.FormClosed += Prim_FormClosed;
         prim.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "머지정렬(MergeSort)")
     {
         mergesort             = new MergeSort();
         mergesort.FormClosed += Mergesort_FormClosed;
         mergesort.Show();
         this.Close();
     }
     if (tb_Search.Text.ToString() == "카운팅정렬(CountingSort)")
     {
         cs             = new CountingSort();
         cs.FormClosed += Cs_FormClosed;
         cs.Show();
         this.Close();
     }
 }