Exemplo n.º 1
0
        private void orderAutoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OrderAutoDialog orderAuto = new ImageOrderAutoDialog();

            if (orderAuto.ShowDialog() == DialogResult.OK)
            {
                var make      = orderAuto.MakeTextBox.Text;
                var text      = orderAuto.ColorTextBox.Text;
                var price     = orderAuto.PriceTextBox.Text;
                var orderInfo = string.Format("Mark: {0}, Color: {1}, Price: {2}", make, text, price);
                MessageBox.Show(orderInfo, Resources.OrderInfo);
            }
        }
Exemplo n.º 2
0
        private void orderAutomobileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Create your dialog object.
            ImageOrderAutoDialog dlg = new ImageOrderAutoDialog();

            // Show as modal dialog, and figure out which button
            // they clicked on using the DialogResult return value.
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                // Get values in each text box?
                string orderInfo = string.Format("Make: {0}, Color: {1}, Cost: {2}",
                                                 dlg.txtMake.Text, dlg.txtColor.Text, dlg.txtPrice.Text);
                MessageBox.Show(orderInfo, "Information about your order!");
            }
        }