using OTS.WinFormsUI.Docking; using OTSIncAReportApp.OTSDataMgrFunction; using OTSIncAReportApp.OTSSampleReportInfo; using OTSIncAReportApp.SysMgrTools; using System; using System.Collections; namespace OTSIncAReportApp { /// /// image分布图排列图主窗体 /// public partial class frmSampleImage : DockContent { #region 变量定义 private frmReportApp m_ReportApp = null; Hashtable table; #endregion #region 构造函数 public frmSampleImage(frmReportApp ReportApp) { InitializeComponent(); m_ReportApp = ReportApp; #region 国际化语言 Language lan = new Language(this); table = lan.GetNameTable(this.Name); #endregion } #endregion #region 分布图排列图主窗体被激活时触发事件 private void OTSSampleImageWindow_Activated(object sender, EventArgs e) { OTSSourceGrid m_SampleImage = m_ReportApp.m_conditionChoose.m_sourceGrid; m_SampleImage.InitGrid(); m_SampleImage.InitGroupTitle(0, table["generalparameters"].ToString()); m_SampleImage.SetPictureType(DisplayPicutureType.AnalyzeImg); m_ReportApp.m_conditionChoose.DisCurrentPicProperty();//先添加属性 //根据标签索引 显示默认的数据图表 if (m_ReportApp.m_SImageWindow.Controls != null) { if (m_ReportApp.m_SImageWindow.Controls.Count == 0) { m_ReportApp.m_conditionChoose.tabIndex = DisplayPicutureType.AnalyzeImg; m_ReportApp.m_conditionChoose.ShowsTheDefaultPic(); } } //设置每个功能模块限制菜单的显示 if (this.Controls.Count != 0) { m_ReportApp.m_RibbonFun.SetRibbonButnStatu_ByModule(DisplayPicutureType.AnalyzeImg); } //判断样品属性与样品窗口在主窗体的位置 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(); } } //判断分布图,排序图全局对象是否为空,不为空的话,加载选择列表,用此来代替刷新,对颗粒列表中的选择颗粒,显示选择到分布图与排序图中 if (m_ReportApp.im_Control_DrawDistrbutionImageAndBSE != null) { if (m_ReportApp.im_ParticlesGridDevidePage != null) { //分布图显示选择颗粒 m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.DisplayParticleByParticlelist(m_ReportApp.im_ParticlesGridDevidePage.GetParticleslist_select()); } } if (m_ReportApp.im_Control_DrawDistrbutionSortImage != null) { if (m_ReportApp.im_ParticlesGridDevidePage != null) { //排序图显示选择颗粒 m_ReportApp.im_Control_DrawDistrbutionSortImage.SetSelectParticle(m_ReportApp.GetSelectedParticles()); } } } #endregion } }