コード例 #1
0
        /// <summary>
        /// This is event handler for printToolStripMenuItem Click event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void printToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // This will give you a message that it will be printing and once the user click ok, it will take you to the Print Preview and you can actually print the product's details

            MessageBox.Show("Your Order will be Printing Now!", "Printing...", MessageBoxButtons.OK, MessageBoxIcon.Information);
            ProductPrintForm.PrintAction = PrintAction.PrintToPreview;
            ProductPrintForm.Print();
        }
コード例 #2
0
        private void printToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var result = MessageBox.Show(this, "Your selection is going to be printed !", "Print message", MessageBoxButtons.OKCancel, MessageBoxIcon.Hand);

            if (result == DialogResult.OK)
            {
                ProductPrintForm.PrintAction = PrintAction.PrintToPreview;
                ProductPrintForm.Print();
            }
        }
コード例 #3
0
 /// <summary>
 /// This method handles the print function event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void printToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ProductPrintForm.PrintAction = PrintAction.PrintToPreview;
     ProductPrintForm.Print();
 }