Beispiel #1
0
        private void StreamButton_Click(object sender, EventArgs e)
        {
            StreamForm stream = new StreamForm();

            stream.Show();
            this.Hide();
        }
        /// <summary>
        /// Stream
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void StreamButton_Click(object sender, EventArgs e)
        {
            Program.movies.GrandTotal = (double.Parse(GrandTotalTextBox.Text) * 1.13).ToString("#.##");
            StreamForm streamForm = new StreamForm();

            streamForm.Show();
            this.Hide();
        }
        //EVENT HANDELER --------------------------------
        /// <summary>
        /// This method shows the stream form when you click the stream button and menu-stream
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ClickStreamButton(object sender, EventArgs e)
        {
            StreamForm stream = new StreamForm();

            stream.previousForm = this;
            stream.InitailizeStreamForm();
            this.Hide();
            stream.Show();
        }
Beispiel #4
0
 /// <summary>
 /// Handler for stream button click event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void StreamButton_Click(object sender, EventArgs e)
 {
     // for hide current form
     this.Hide();
     // Create a new directory to catch data for next form
     myStreamForm.Movie = new Dictionary <string, string>
     {
         { "Title", TitleTextBox.Text },
         { "Cost", GrandTotalTextBox.Text }
     };
     myStreamForm.Show();
 }
Beispiel #5
0
        /// <summary>
        /// This method handlers all events when any button
        /// is clicked, tagging buttons according to each case.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _buttonClickHandler(object sender, EventArgs e)
        {
            Button ClickHandler = sender as Button;

            switch (ClickHandler.Tag.ToString())
            {
            /*
             * Stream case creates a new object for StreamForm & shows the Form.
             * It sets the value of grandTotal, title to the TextBoxes fields.
             * Calls the info method then Hides the Order Form.
             */
            case "Stream":
                StreamForm streamForm = new StreamForm();
                streamForm.Show();
                streamForm.grandTotal = GrandTotalTextBox.Text;
                title = TitleTextBox.Text;
                streamForm.info();
                this.Hide();
                break;

            /*
             * Cancel case displays a message box showing confirm meesage of exiting the program
             */
            case "Cancel":
                // showing up confirm message when cancel button clicked
                DialogResult result = MessageBox.Show("Are You Sure you want to exit?", "Confirm", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);

                // Closes the program if OK clicked
                if (result == DialogResult.OK)
                {
                    Application.Exit();
                }
                break;

            /*
             * Back case takes user to the previous form (Selection Form)
             * Hides the Order Form
             */
            case "Back":
                previousForm.Show();
                this.Hide();
                break;
            }
        } // End of _buttonClickHandler