Quellcode durchsuchen

improve long operating waiting experience.

gsp vor 2 Jahren
Ursprung
Commit
e26e533cd4

+ 10 - 7
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -1457,12 +1457,13 @@ namespace OTSIncAReportGraph.Controls
         //复制图像
         private void toolStripMenuItem_copyimage_Click(object sender, EventArgs e)
         {
-            this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
+           
             SaveFileDialog sfd = new SaveFileDialog();
           
             sfd.Filter = "png Files(*.png)| *.png |BMP Files(*.bmp)| *.bmp |JPG Files(*.jpg)|*.jpg;*.jpeg";
             if (sfd.ShowDialog() == DialogResult.OK)
             {
+                this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
                 OutPIC outpic = new OutPIC();
                 outpic.m_list_allDfield = m_list_allDfield;
                 outpic.resultFile = resultFile;
@@ -1472,10 +1473,11 @@ namespace OTSIncAReportGraph.Controls
                 Thread bThread = new Thread(new ThreadStart(outpic.opencv_outpic));
 
                 bThread.IsBackground = true;
-           
+
                 bThread.Start();
-            
+
             }
+           
           
             
         }
@@ -1485,9 +1487,9 @@ namespace OTSIncAReportGraph.Controls
 
            MessageBox.Show("Export completed!");
 
-            Cursor = Cursors.Default;
-         
-         
+            this.Cursor = System.Windows.Forms.Cursors.Default;
+
+
 
         }
 
@@ -1923,7 +1925,7 @@ namespace OTSIncAReportGraph.Controls
 
         private void ExportoriginalspliceToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
+            
             SaveFileDialog sfd = new SaveFileDialog();
 
             var particledata = new ParticleData(resultFile.FilePath);
@@ -1934,6 +1936,7 @@ namespace OTSIncAReportGraph.Controls
             sfd.Filter = "png Files(*.png)| *.png |BMP Files(*.bmp)| *.bmp |JPG Files(*.jpg)|*.jpg;*.jpeg";
             if (sfd.ShowDialog() == DialogResult.OK)
             {
+                this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
                 OutPIC outpic = new OutPIC();
                 outpic.m_list_allDfield = m_list_allDfield;
                 outpic.resultFile = resultFile;