Beispiel #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            var storeSelectorForm = new StoreSelectorForm();
            if (storeSelectorForm.ShowDialog(this) != DialogResult.OK) {
                MessageBox.Show("You must select a store before running the application!",
                    "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);

                Close();
                return;
            }

            _selectedStore = storeSelectorForm.SelectedStore;
            StatusStrip_StoreLabel.Text =
                $"Store: {_selectedStore.DisplayString} ({_selectedStore.StoreNumber})";
        }
Beispiel #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            var storeSelectorForm = new StoreSelectorForm();

            if (storeSelectorForm.ShowDialog(this) != DialogResult.OK)
            {
                MessageBox.Show("You must select a store before running the application!",
                                "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);

                Close();
                return;
            }

            _selectedStore = storeSelectorForm.SelectedStore;
            StatusStrip_StoreLabel.Text =
                $"Store: {_selectedStore.DisplayString} ({_selectedStore.StoreNumber})";
        }