Esempio n. 1
0
 private void orderListDlg_FormClosing(object sender, FormClosingEventArgs e)
 {
     orderListDlg = null;
     OnNeedReinitialise(false);
 }
Esempio n. 2
0
 private void orderListMenuItem_Click(object sender, EventArgs e)
 {
     StockPortofolio portofolio = this.StockPortofolioList.Get(sender.ToString());
     if (orderListDlg == null)
     {
         orderListDlg = new OrderListDlg(StockDictionary, portofolio.OrderList);
         orderListDlg.SelectedStockChanged += new SelectedStockChangedEventHandler(OnSelectedStockChanged);
         orderListDlg.StockOrderDeleted += new StockOrderDeletedEventHandler(OnStockOrderDeleted);
         orderListDlg.FormClosing += new FormClosingEventHandler(orderListDlg_FormClosing);
         orderListDlg.Show();
     }
     else
     {
         orderListDlg.Activate();
     }
 }
Esempio n. 3
0
        private void orderGenerationDlg_SimulationCompleted()
        {
            // Refresh portofolio generated stock
            StockPortofolio portofolio = this.orderGenerationDlg.SelectedPortofolio;
            portofolio.Initialize(StockDictionary);
            StockDictionary.CreatePortofolioSerie(portofolio);

            // Refresh the screen
            OnNeedReinitialise(true);

            //Display portofolio window
            if (orderListDlg == null)
            {
                orderListDlg = new OrderListDlg(StockDictionary, portofolio.OrderList);
                orderListDlg.SelectedStockChanged += new SelectedStockChangedEventHandler(OnSelectedStockChanged);
                orderListDlg.FormClosing += new FormClosingEventHandler(orderListDlg_FormClosing);
                orderListDlg.StockOrderDeleted += new StockOrderDeletedEventHandler(OnStockOrderDeleted);
                orderListDlg.Show();
            }
            else
            {
                orderListDlg.SetOrderList(portofolio.OrderList);
                orderListDlg.Activate();
            }

            RefreshPortofolioMenu();
        }