示例#1
0
 private void click_btn_back(object sender, EventArgs e)
 {
     if (flag == 1)
     {
         this.Hide();
         SearchResultsFoodList t = new SearchResultsFoodList();
         t.ShowDialog();
         this.Close();
     }
     else
     {
         this.Hide();
         SearchResultFoodListRadious t = new SearchResultFoodListRadious();
         t.ShowDialog();
         this.Close();
     }
 }
示例#2
0
        private void click_btn_search(object sender, EventArgs e)
        {
            if (cb_searchType.SelectedItem != null)
            {
                KeyValuePair <string, string> kvp = (KeyValuePair <string, string>)cb_searchType.SelectedItem;

                string key = kvp.Key.ToString();

                if (key == "Tourist Spot")
                {
                    this.Hide();
                    SearchResultSpotList t = new SearchResultSpotList();
                    t.ShowDialog();
                    this.Close();
                }

                else if (key == "Restaurent")
                {
                    this.Hide();
                    SearchResultRestaurentList r = new SearchResultRestaurentList();
                    r.ShowDialog();
                    this.Close();
                }

                else if (key == "Food")
                {
                    this.Hide();
                    SearchResultsFoodList s = new SearchResultsFoodList();
                    s.ShowDialog();
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("Please Select A Category...");
            }
        }