STA.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows.Forms;
  8. using Newtonsoft.Json.Linq;
  9. using PTMedicalInsurance.Common;
  10. using PTMedicalInsurance.Forms;
  11. using PTMedicalInsurance.Helper;
  12. using PTMedicalInsurance.Variables;
  13. namespace PTMedicalInsurance.Business
  14. {
  15. class STA
  16. {
  17. //设置业务实例
  18. CenterBusiness cBus = new CenterBusiness();
  19. HisMainBusiness hBus = new HisMainBusiness();
  20. HisIrisServices hIS = new HisIrisServices();
  21. MIIrisServices mIS = new MIIrisServices();
  22. InvokeHelper invoker = new InvokeHelper();
  23. public delegate void callBack(string errMsg);
  24. public void CallBack(string errMsg)
  25. {
  26. MessageBox.Show(errMsg);
  27. }
  28. [STAThread]
  29. public void PrescribeCirculation(object o)
  30. {
  31. try
  32. {
  33. //显示处方上传
  34. PrescriptionCirculation PresCir = new PrescriptionCirculation("");
  35. //PresCir.WindowState = FormWindowState.Minimized;
  36. PresCir.ShowDialog();
  37. }
  38. catch (Exception ex)
  39. {
  40. CallBack(ex.Message);
  41. }
  42. }
  43. }
  44. public class WindowWrapper : System.Windows.Forms.IWin32Window
  45. {
  46. public WindowWrapper(IntPtr handle)
  47. {
  48. _hwnd = handle;
  49. }
  50. public IntPtr Handle
  51. {
  52. get { return _hwnd; }
  53. }
  54. private IntPtr _hwnd;
  55. }
  56. }