using OTS.WinFormsUI.Docking; using OTSIncAReportApp.OTSRstMgrFunction; using OTSIncAReportApp.OTSSampleReportInfo; using OTSIncAReportApp.SysMgrTools; using System; using System.Collections; namespace OTSIncAReportApp { /// /// Grid表格主窗体 /// public partial class frmTables : DockContent { #region 变量定义 //private frmReportApp m_ReportApp = null; private frmReportApp m_ReportApp { get; set; } Hashtable table; #endregion #region 构造函数 public frmTables(frmReportApp ReportApp) { InitializeComponent(); m_ReportApp = ReportApp; #region 国际化语言 Language lan = new Language(this); table = lan.GetNameTable(this.Name); #endregion } #endregion #region Grid表格被激活时事件 private void OTSCaculationTablesWindow_Activated(object sender, EventArgs e) { OTSSourceGrid m_SampleGrid = m_ReportApp.m_conditionChoose.m_sourceGrid; m_SampleGrid.InitGrid(); m_SampleGrid.InitGroupTitle(0, table["generalparameters"].ToString()); m_SampleGrid.SetPictureType(DisplayPicutureType.AnalyzeDataTable); m_ReportApp.m_conditionChoose.DisCurrentPicProperty();//先添加属性 //根据标签索引 显示默认的数据图表 if (m_ReportApp.m_TablesWindow.Controls != null) { if (m_ReportApp.im_Control_DrawDistrbutionImageAndBSE != null) { if (m_ReportApp.m_TablesWindow.Controls.Count == 0 || m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.WhetherThereAreDeleteParticles()) { m_ReportApp.m_conditionChoose.tabIndex = DisplayPicutureType.AnalyzeDataTable; m_ReportApp.m_conditionChoose.ShowsTheDefaultPic(); } } else { if (m_ReportApp.m_TablesWindow.Controls.Count == 0) { m_ReportApp.m_conditionChoose.tabIndex = DisplayPicutureType.AnalyzeDataTable; m_ReportApp.m_conditionChoose.ShowsTheDefaultPic(); } } } m_ReportApp.m_RstWindow.SelectWorkSampleNode(); //设置每个功能模块限制菜单的显示 if (this.Controls.Count != 0) { m_ReportApp.m_RibbonFun.SetRibbonButnStatu_ByModule(DisplayPicutureType.AnalyzeDataTable); } //判断样品属性与样品窗口在主窗体的位置 if (m_ReportApp.m_conditionChoose.DockState != m_ReportApp.m_RstWindow.DockState) { m_ReportApp.m_RstWindow.Activate(); } else { if (!m_ReportApp.m_conditionChoose.Focus()) { m_ReportApp.m_RstWindow.Activate(); } } } #endregion } }