frmSampleImage.cs 3.4 KB

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