frmTables.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. /// Grid表格主窗体
  11. /// </summary>
  12. public partial class frmTables : DockContent
  13. {
  14. #region 变量定义
  15. private frmReportApp m_ReportApp = null;
  16. Hashtable table;
  17. #endregion
  18. #region 构造函数
  19. public frmTables(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 Grid表格被激活时事件
  30. private void OTSCaculationTablesWindow_Activated(object sender, EventArgs e)
  31. {
  32. OTSSourceGrid m_SampleGrid = m_ReportApp.m_conditionChoose.m_ConditionGrid;
  33. m_SampleGrid.InitGrid();
  34. m_SampleGrid.InitGroupTitle(0, table["generalparameters"].ToString());
  35. m_SampleGrid.SetPictureType(DisplayPicutureType.AnalyzeDataTable);
  36. m_ReportApp.m_conditionChoose.DisCurrentPicProperty();//先添加属性
  37. //根据标签索引 显示默认的数据图表
  38. if (m_ReportApp.m_TablesWindow.Controls != null)
  39. {
  40. if (m_ReportApp.m_TablesWindow.Controls.Count == 0)
  41. {
  42. m_ReportApp.m_conditionChoose.tabIndex = DisplayPicutureType.AnalyzeDataTable;
  43. m_ReportApp.m_conditionChoose.ShowsTheDefaultPic();
  44. }
  45. }
  46. m_ReportApp.m_RstWindow.SelectWorkSampleNode();
  47. //设置每个功能模块限制菜单的显示
  48. if (this.Controls.Count != 0)
  49. {
  50. m_ReportApp.m_RibbonFun.SetRibbonButnStatu_ByModule(DisplayPicutureType.AnalyzeDataTable);
  51. }
  52. //判断样品属性与样品窗口在主窗体的位置
  53. if (m_ReportApp.m_conditionChoose.DockState != m_ReportApp.m_RstWindow.DockState)
  54. {
  55. m_ReportApp.m_RstWindow.Activate();
  56. }
  57. else
  58. {
  59. if (!m_ReportApp.m_conditionChoose.Focus())
  60. {
  61. m_ReportApp.m_RstWindow.Activate();
  62. }
  63. }
  64. }
  65. #endregion
  66. }
  67. }