Example #1
0
 private void OnScError(SimplewkHtmlToPdfSharp converter, string errorText)
 {
     if (InvokeRequired)
     {
         BeginInvoke((Action)(() => { MessageBox.Show("Error: " + errorText); }));
     }
     else
     {
         MessageBox.Show("Error: " + errorText);
     }
 }
Example #2
0
 private void OnScBegin(SimplewkHtmlToPdfSharp converter, int expectedphasecount)
 {
     if (InvokeRequired)
     {
         BeginInvoke((Action)(() => { Text = ("Begin, PhaseCount: " + expectedphasecount); }));
     }
     else
     {
         Text = ("Begin, PhaseCount: " + expectedphasecount);
     }
 }
Example #3
0
 private void OnScWarning(SimplewkHtmlToPdfSharp converter, string warningtext)
 {
     if (InvokeRequired)
     {
         BeginInvoke((Action)(() => { MessageBox.Show("Warning: " + warningtext); }));
     }
     else
     {
         MessageBox.Show("Warning: " + warningtext);
     }
 }
Example #4
0
 private void OnScFinished(SimplewkHtmlToPdfSharp converter, bool success)
 {
     if (InvokeRequired)
     {
         BeginInvoke((Action)(() => { Text = ("Finished, Success: " + success); }));
     }
     else
     {
         Text = ("Finished, Success: " + success);
     }
 }
Example #5
0
 private void OnScPhase(SimplewkHtmlToPdfSharp converter, int phasenumber, string phasedescription)
 {
     if (InvokeRequired)
     {
         BeginInvoke((Action)(() => { Text = ("New Phase " + phasenumber + ": " + phasedescription); }));
     }
     else
     {
         Text = ("New Phase " + phasenumber + ": " + phasedescription);
     }
 }
Example #6
0
        //public delegate void Action<in T>(T obj);

        private void OnScProgress(SimplewkHtmlToPdfSharp converter, int progress, string progressdescription)
        {
            if (InvokeRequired)
            {
                // simple Invoke WILL NEVER SUCCEDE, because we're in the button click handler. Invoke will simply deadlock everything

                //BeginInvoke((Action<string>)SetText, "Progress " + progress + ": " + progressdescription);
            }
            else
            {
                Text = ("Progress " + progress + ": " + progressdescription);
            }
        }