Esempio n. 1
0
        private void BTN_Search_Stocks_Click(object sender, EventArgs e)
        {
            System.IO.Stream         str = Properties.Resources.Windows_Navigation_Start;
            System.Media.SoundPlayer snd = new System.Media.SoundPlayer(str);
            snd.Play();
            search = TB_Search_Stocks.Text;

            try
            {
                if (!searchableNames.Contains(search))
                {
                    ErrorProvider_Search_Error.SetError(TB_Search_Stocks, "Please enter a valid search");
                }
                else
                {
                    pbLoading.Show();
                    ErrorProvider_Search_Error.Clear();
                    Search_Result_Form srf = new Search_Result_Form();
                    srf.searchString = TB_Search_Stocks.Text.ToString();

                    pbLoading.Hide();
                    srf.ShowDialog();
                }
            }
            catch (System.Net.WebException ex)
            {
                MessageBox.Show(ex.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error " + ex.Message);
            }
        }
Esempio n. 2
0
        private void lvMostPopular_MouseDoubleClick_1(object sender, MouseEventArgs e)
        {
            //MessageBox.Show(lvMostPopular.SelectedItems[0].SubItems[0].Text);
            Search_Result_Form srf = new Search_Result_Form();
            var s = lvMostPopular.SelectedItems[0].SubItems[0].Text.ToString();

            srf.searchString = s.Substring(0, s.Length - 7); //trgni procent vo zagrada da ne zamara za parsiranje so regex posle
            srf.ShowDialog();
        }