Exemple #1
0
        private void UpdateStock(string _file)
        {
            StockInformation _stock = FileHandling.LoadStock(_file);

            lbl_StockName.Text = _stock.name;
            lbl_Price.Text     = Convert.ToString(_stock.price);
            lbl_Dividend.Text  = Convert.ToString(_stock.dividend);
            picb_Chart.Load(HtmlHandling.GetChartAddress(_stock.name));
            MainForm.Instance.stock = _stock;
        }
Exemple #2
0
        private void Picb_RefreshClick(object sender, EventArgs e)
        {
            try {
                FileHandling.SaveStockInformation(
                    HtmlHandling.GetStockInformation(lbl_StockName.Text)
                    );
            }
            catch { MessageBox.Show("Enter a valid stock name or check internet connection"); }
            StockViewer _stockViewer = new StockViewer(false, lbl_StockName.Text);

            this.Dispose();
        }
Exemple #3
0
 void KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         try {
             FileHandling.SaveStockInformation(
                 HtmlHandling.GetStockInformation(txt_StockName.Text)
                 );
             StockViewer _stockViewer = new StockViewer(false, "");
             this.Dispose();
         }
         catch { MessageBox.Show("Enter a valid stock name or check internet connection"); }
     }
 }