public CriteriaStructurePreview() { if (SystemUtil.InDesignMode) { InitializeComponent(); return; } MoleculeGridPageControl.RemoveToolPanelInConstructor = false; // keep tool panel and properly layout of controls InitializeComponent(); MoleculeGridPageControl.RemoveToolPanelInConstructor = true; MoleculeGridPageControl mgpc = MoleculeGridPageControl; mgpc.EditQueryButton.Visible = false; //PreviewCtl.MarkDataButton.Visible = false; mgpc.FormattingButton.Visible = false; mgpc.AdjustToolPanelButtonSpacing(); mgpc.Dock = DockStyle.Fill; Timer = new System.Windows.Forms.Timer(); Timer.Tick += new System.EventHandler(Timer_Tick); return; }
/// <summary> /// Insert tools into display panel /// </summary> public override void InsertToolsIntoDisplayPanel() { if (Qrc == null) { return; } if (!ViewManager.IsControlContainedInQueriesControl(Qrc)) // adjust tools if we're not contained in a QueriesControl { //GridPageControl.EditQueryButton.Visible = false; GridPageControl.FormattingButton.Visible = false; GridPageControl.AdjustToolPanelButtonSpacing(); } return; }
/// <summary> /// Display the related counts /// </summary> /// <param name="rss"></param> /// public void DisplayRelatedCidCounts( RelatedStructureSearchResults rss) { int altCnt, mmpCnt, swCnt, simCnt, allMatchCnt; //MoleculeGridPageControl.Width = this.Width - 3; //MoleculeGridPageControl.Height = this.Height - MoleculeGridPageControl.Top - 3; MoleculeGridPageControl mgpc = MoleculeGridPageControl; if (mgpc.EditQueryButton.Visible) // adjust tool panel for proper display { mgpc.EditQueryButton.Visible = false; //mgpc.MarkDataButton.Visible = false; mgpc.FormattingButton.Visible = false; mgpc.AdjustToolPanelButtonSpacing(); } if (rss == null) { DisplayEmptyCidCountsGrid(); return; } altCnt = SetRelatedCidCount(AltForms, SumByDb(rss.AltCorpDbCnt, rss.AltChemblCnt)); // alternate forms mmpCnt = SetRelatedCidCount(MatchedPairs, SumByDb(rss.MmpCorpDbCnt, rss.MmpChemblCnt)); // matched pairs, no ChEMBL for now if (SmallWorldAvailable) { swCnt = SetRelatedCidCount(SmallWorld, SumByDb(rss.SwCorpDbCnt, rss.SwChemblCnt)); // SmallWorld } else { SmallWorld.Checked = false; if (MatchCountsPanel.RowCount == 5) // remove SmallWorld from the MatchCountsPanel { MatchCountsPanel.SetRow(labelControl3, 2); MatchCountsPanel.SetRow(SimilarStructure, 2); MatchCountsPanel.SetRow(labelControl6, 3); MatchCountsPanel.SetRow(AllMatches, 3); MatchCountsPanel.SetRow(SmallWorldLabel, 4); MatchCountsPanel.SetRow(SmallWorld, 4); SmallWorldLabel.Visible = SmallWorld.Visible = false; SmallWorld.Checked = false; MatchCountsPanel.RowCount = 4; } swCnt = 0; } simCnt = SetRelatedCidCount(SimilarStructure, SumByDb(rss.SimCorpDbCnt, rss.SimChemblCnt)); // similar allMatchCnt = SetRelatedCidCount(AllMatches, altCnt + mmpCnt + swCnt + simCnt); // total SetRelatedCidCount(CorpDB, rss.CorpDbCnt); // these values don't change during life of search results SetRelatedCidCount(ChemblDB, rss.ChemblCnt); return; }