MockInvokeForm.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using PTMedicalInsurance.Demo.Entity.Enums;
  2. using PTMedicalInsurance.Demo.Entity.Structs;
  3. using PTMedicalInsurance.Demo.Globals;
  4. using PTMIBase.MIForm;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.ComponentModel;
  8. using System.Data;
  9. using System.Drawing;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows.Forms;
  14. using PTMedicalInsurance.Demo.Forms;
  15. namespace PTMedicalInsurance.Demo
  16. {
  17. public partial class MockInvokeForm : DebugBaseForm
  18. {
  19. public MockInvokeForm()
  20. {
  21. InitializeComponent();
  22. }
  23. public MockInvokeForm(Form frm):base(frm)
  24. {
  25. InitializeComponent();
  26. InitForm();
  27. }
  28. private void InitForm()
  29. {
  30. //增加
  31. var subTypeMapping = new Dictionary<FormEnum, Type>
  32. {
  33. { FormEnum.ChooseCard, typeof(ChooseCardSubBusEnum) },
  34. };
  35. DebugBaseFormHelper<FormEnum>.InitCombox(subTypeMapping,cbBusinessType,cbSubBusiness);
  36. }
  37. private void cbBusinessType_SelectedIndexChanged(object sender, EventArgs e)
  38. {
  39. DebugBaseFormHelper<FormEnum>.UpdateSubTypeAfterCbxMainTypeChanged(cbBusinessType, cbSubBusiness);
  40. }
  41. private void btCall_Click(object sender, EventArgs e)
  42. {
  43. glb.Init();
  44. glb.SetCurrentEnvironment(new CurrentEnvironment());
  45. ChooseCard cc = new ChooseCard();
  46. cc.ShowDialog();
  47. }
  48. }
  49. }