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); }
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)); }