Exemple #1
0
 protected override Document OnLoad(Stream input)
 {
     Image resultImage = null;
     Thread thread = new Thread(delegate()
     {
         PluginForm f = new PluginForm(new StreamReader(input, Encoding.ASCII).ReadToEnd());
         f.ShowDialog();
         f.Dispose();
         resultImage = f.ResultImage;
     });
     thread.SetApartmentState(ApartmentState.STA);
     thread.Start();
     thread.Join();
     return Document.FromImage(resultImage);
 }
Exemple #2
0
        protected override Document OnLoad(Stream input)
        {
            Image  resultImage = null;
            Thread thread      = new Thread(delegate()
            {
                PluginForm f = new PluginForm(new StreamReader(input, Encoding.ASCII).ReadToEnd());
                f.ShowDialog();
                f.Dispose();
                resultImage = f.ResultImage;
            });

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            thread.Join();
            return(Document.FromImage(resultImage));
        }