private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            FitDemo FitDemo = this.gvFit.SelectedItem as FitDemo;
            //if (FitDemo != null)
            //{
            //    lock (this)
            //    {
            //        if (!isCanClick) return;
            //        this.SetVidicon.Visibility = Visibility.Visible;
            //        //Loading.Visibility = Visibility.Visible;
            //        isCanClick = false;

            //        System.Threading.ThreadPool.QueueUserWorkItem((x) =>
            //        {
            ModuleConstant.FitDate = Convert.ToDateTime(FitDemo.DayTime);
            ReportPrintDialog = new ReportPrintDialog();
            ReportPrintDialog.Parent = this;
            ReportPrintControl child = new ReportPrintControl();
            child.Close += new EventHandler(child_Close);
            ReportPrintDialog.Content = child;
            ReportPrintDialog.Show();
            //            System.Threading.Thread.Sleep(2000);
            //
            //            Application.Current.Dispatcher.BeginInvoke(new Action(() =>
            //            {
            //                Loading.Visibility = Visibility.Collapsed;
            //                this.SetVidicon.Visibility = Visibility.Collapsed;
            //                isCanClick = true;
            //            }));
            //        });

            //    }
            //}
        }
Ejemplo n.º 2
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;
        }
 public void child_Close(object sender, EventArgs e)
 {
     if (ReportPrintDialog != null)
     {
         ReportPrintDialog.Close();
     }
     if (prescriptionDialog != null)
     {
         prescriptionDialog.Close();
     }
     prescriptionDialog = null;
     ReportPrintDialog = null;
 }