示例#1
0
        public void child_Close(object sender, EventArgs e)
        {
            if (ControlDialog != null)
            {
                ControlDialog.Close();
            }
            ControlDialog = null;
            if (ReportPrintDialog != null)
            {
                ReportPrintDialog.Close();
            }
            ReportPrintDialog = null;

            if (FitResultDialog != null)
            {
                FitResultDialog.Close();
            }
            FitResultDialog = null;

            if (SaveCourseDialog != null)
            {
                SaveCourseDialog.Close();
            }
            SaveCourseDialog = null;
        }
示例#2
0
        /// <summary>
        /// 打印
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnReport_Click(object sender, RoutedEventArgs e)
        {
            ThreadPool.QueueUserWorkItem(new WaitCallback((obj) =>
         {
             lock (objLock)
             {
                 Application.Current.Dispatcher.Invoke(new Action(() =>
                 {
                     if (patientInfo == null)
                     {
                         AlarmDialog dialog = new AlarmDialog();
                         dialog.lblTitle.Text = "提示信息";
                         dialog.lblMsg.Text = "请选择病人!";
                         dialog.ShowDialog();
                     }
                     else
                     {

                         //if (ReportPrintDialog == null)
                         //{
                         //    ReportPrintDialog = new ReportPrintDialog();
                         //    ReportPrintDialog.Parent = this;
                         //    ReportPrintControl child = new ReportPrintControl();
                         //    child.Close += new EventHandler(child_Close);
                         //    ReportPrintDialog.Content = child;
                         //    ReportPrintDialog.Show();
                         //}

                         if (FitResultDialog == null)
                         {
                             FitResultDialog = new FitResultDialog();
                             FitResultDialog.Parent = this;
                             FitResultControl child = new FitResultControl();
                             child.Close += new EventHandler(child_Close);
                             FitResultDialog.Content = child;
                             FitResultDialog.Show();
                         }
                     }
                 }));
             }
         }));
        }