コード例 #1
0
        private void PrintReport()
        {
            this.textProgressInformation.Text = string.Empty;

            this.textProgressInformation.Text += "Document preparation started...";

            this.progressScrollViewer.ScrollToBottom();

            m_printButton.IsEnabled  = false;
            m_exportButton.IsEnabled = false;
            try
            {
                bool jobCompleted = GridDetails.Print(cboReport.Text, true, new EventHandler <ProgressEventArgs>(this.ProgressionCallBack), true);

                if (jobCompleted)
                {
                    this.textProgressInformation.Text += "\n...Completed.";
                }
                else
                {
                    this.textProgressInformation.Text += "\n...Canceled.";
                }

                this.progressScrollViewer.ScrollToBottom();
            }
            finally
            {
                m_printButton.IsEnabled  = true;
                m_exportButton.IsEnabled = true;
            }
        }