frmSampleImage.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using OTS.WinFormsUI.Docking;
  2. using OTSIncAReportApp.OTSDataMgrFunction;
  3. using OTSIncAReportApp.OTSSampleReportInfo;
  4. using System;
  5. namespace OTSIncAReportApp
  6. {
  7. /// <summary>
  8. /// image分布图排列图主窗体
  9. /// </summary>
  10. public partial class frmSampleImage : DockContent
  11. {
  12. #region 变量定义
  13. private frmReportApp m_ReportApp = null;
  14. #endregion
  15. #region 构造函数
  16. public frmSampleImage(frmReportApp ReportApp)
  17. {
  18. InitializeComponent();
  19. m_ReportApp = ReportApp;
  20. }
  21. #endregion
  22. #region 分布图排列图主窗体被激活时触发事件
  23. private void OTSSampleImageWindow_Activated(object sender, EventArgs e)
  24. {
  25. SampleGrid m_SampleImage = m_ReportApp.m_PropWindow.m_SampleGrid;
  26. m_SampleImage.InitGrid();
  27. m_SampleImage.InitGroupTitle(0, "常规参数");
  28. m_SampleImage.SetPictureProperty(DisplayPicutureType.AnalyzeImg);
  29. m_ReportApp.DisCurrentPicProperty();//先添加属性
  30. //根据标签索引 显示默认的数据图表
  31. if (m_ReportApp.m_SImageWindow.Controls != null)
  32. {
  33. if (m_ReportApp.m_SImageWindow.Controls.Count == 0)
  34. {
  35. m_ReportApp.m_PropWindow.tabIndex = DisplayPicutureType.AnalyzeImg;
  36. m_ReportApp.m_DataMgrFun.ShowsTheDefaultPic();
  37. }
  38. }
  39. //设置每个功能模块限制菜单的显示
  40. if (this.Controls.Count != 0)
  41. {
  42. m_ReportApp.m_RibbonFun.SetRibbonButnStatu_ByModule(DisplayPicutureType.AnalyzeImg);
  43. }
  44. //判断样品属性与样品窗口在主窗体的位置
  45. if (m_ReportApp.m_PropWindow.DockState != m_ReportApp.m_RstWindow.DockState)
  46. {
  47. m_ReportApp.m_RstWindow.Activate();
  48. }
  49. else
  50. {
  51. if (!m_ReportApp.m_PropWindow.Focus())
  52. {
  53. m_ReportApp.m_RstWindow.Activate();
  54. }
  55. }
  56. //判断分布图,排序图全局对象是否为空,不为空的话,加载选择列表,用此来代替刷新,对颗粒列表中的选择颗粒,显示选择到分布图与排序图中
  57. if (m_ReportApp.im_Control_DrawDistrbutionImageAndBSE != null)
  58. {
  59. //分布图显示选择颗粒
  60. m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.SetSelectParticle(m_ReportApp.SelectedParticles);
  61. }
  62. if (m_ReportApp.im_Control_DrawDistrbutionSortImage != null)
  63. {
  64. //排序图显示选择颗粒
  65. m_ReportApp.im_Control_DrawDistrbutionSortImage.SetSelectParticle(m_ReportApp.SelectedParticles);
  66. }
  67. }
  68. #endregion
  69. }
  70. }