Пример #1
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            AppStartWindow startWin = new AppStartWindow();

            startWin.ShowDialog();

            stocks = startWin.Stocks;

            if (stocks == null)
            {
                Close();
            }
            else if (stocks.Length == 0)
            {
                MessageBox.Show("No input data. App will be closed.");
                Close();
            }
            else
            {
                pairs = FinancialPair.CreateMany(stocks);
                listView.Items.Clear();
                listView.Update(pairs);
                CenterToScreen();
            }
        }
Пример #2
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            AppStartWindow startWin = new AppStartWindow();

            startWin.ShowDialog();

            appData = startWin.AppData;

            if (appData.InputData == null)
            {
                MessageBox.Show("No input data. App will be closed.");
                Close();
            }

            DeltaType deltaType = (DeltaType)Enum.Parse(typeof(DeltaType), appData.DeltaTypeName);

            pairs = FinancialPair.CreateMany(appData.InputData, deltaType);

            listView.Items.Clear();
            listView.Update(pairs);
            CenterToScreen();
        }