private void click_btn_back(object sender, EventArgs e)
        {
            this.Hide();
            SearchResultSpotList t = new SearchResultSpotList();

            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...");
            }
        }