Esempio n. 1
0
        /// <summary>
        /// event handler for opening the saved form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _savedOrderButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.Show();
        }
Esempio n. 2
0
        /// <summary>
        /// Send the product selected to the Product Info Form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void NextButton_Click(object sender, EventArgs e)
        {
            ProductInfoForm productInfo = new ProductInfoForm(_selectedComputer, this);

            productInfo.Show();
            this.Hide();
        }
Esempio n. 3
0
        // Go to the product info form

        private void btn_loadOrder_Click(object sender, EventArgs e)
        {
            this.Hide();
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.previousForm = this;
            productInfoForm.Show();
        }
Esempio n. 4
0
        //Shows next form
        private void NextButton_Click(object sender, EventArgs e)
        {
            ProductInfoForm info = new ProductInfoForm();

            info.previousForm = this;

            this.Hide();
            info.Show();
        }
Esempio n. 5
0
        /// <summary>
        /// when the next button is pressed the select form is hidden and the productinfo form is opened
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _nextButton_Click(object sender, EventArgs e)
        {
            // Instantiate the next form
            ProductInfoForm productInfoForm = new ProductInfoForm();

            // pass a reference from the current form to the next form
            productInfoForm.previousForm = this;

            productInfoForm.Show();
            this.Hide();
        }
Esempio n. 6
0
        // open product info form and the open file dialog
        private void btnOpenSaved_Click(object sender, EventArgs e)
        {
            SelectForm      selectForm      = new SelectForm();
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.previousForm = selectForm;

            this.Hide();
            productInfoForm.Show();
            productInfoForm.OpenFile(btnOpenSaved, e);
        }
Esempio n. 7
0
        // go to the next form
        private void btnNext_Click(object sender, EventArgs e)
        {
            // instantiate next form
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.previousForm = this;

            // hide this form and show next form
            this.Hide();
            productInfoForm.Show();
        }
Esempio n. 8
0
        /// <summary>
        /// event handler to generate the next form and close this one
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _nextButton_Click(object sender, EventArgs e)
        {
            //1. intantiate
            ProductInfoForm productInfoForm = new ProductInfoForm();

            //2. pass a reference
            productInfoForm.firstForm = this;
            _storingValue();

            productInfoForm.Show();
            this.Hide();
            productInfoForm.storedValues();
        }
Esempio n. 9
0
        /// <summary>
        /// Opens a file dialog box for the user to select a previous order
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LoadOrderButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog file = new OpenFileDialog();

            file.InitialDirectory = Directory.GetCurrentDirectory();
            DialogResult result = file.ShowDialog();

            if (result != DialogResult.Cancel)
            {
                try
                {
                    StreamReader    sr  = new StreamReader(file.FileName);
                    ProductInfoForm pif = new ProductInfoForm(toProduct(sr));
                    pif.Show();
                    this.Hide();
                }
                catch (Exception)
                {
                    Debug.WriteLine("File is invalid");
                }
            }
        }
Esempio n. 10
0
 /// <summary>
 /// event handler to back to the productInfoForm
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void _backButton_Click(object sender, EventArgs e)
 {
     secondForm.Show();
     this.Hide();
 }
Esempio n. 11
0
        // Go back to the product info form

        private void btn_back_Click(object sender, EventArgs e)
        {
            previousForm.Show();
            this.Close();
        }
Esempio n. 12
0
 /// <summary>
 /// this method allows the user to go back to the previous form with their previously selected item loaded
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void _back_Click(object sender, EventArgs e)
 {
     previousForm.Show();
     this.Hide();
 }
Esempio n. 13
0
 // return to previous form
 private void Back(object sender, EventArgs e)
 {
     this.Hide();
     previousForm.Show();
 }