/// <summary> /// Show dialog /// </summary> /// <returns></returns> DialogResult ShowDialog( string args) { if (Lex.Contains(args, "EditCriteria")) // editing existing query { Query = QueriesControl.Instance.CurrentQuery; QueryTable qt = GetUnpivotedSummaryTable(Query); if (qt != null) { KeyQc = qt.KeyQueryColumn; } //Tso = TargetSummaryOptions.GetFromQueryTable(qt); QueryRendered = true; // should already be rendered } else // new tool query { Query = null; // no query defined yet KeyQc = null; QueryRendered = false; // not yet rendered } KeyCriteriaCtl.Setup(KeyQc); //bool allowDbChange = (Query == null); //KeyCriteriaCtl.SetFormValues(Tso, allowDbChange); DialogResult dr = Instance.ShowDialog(SessionManager.ActiveForm); return(dr); }
/// <summary> /// SetupForm /// </summary> void SetupForm() { // CorpIds if (Parms.KeyCriteriaQc != null) { KeyCriteriaCtl.Setup(Parms.KeyCriteriaQc); } else { KeyCriteriaCtl.Setup(BaseQuery); } // Endpoint EndPointCtl.Setup(BaseQuery, new QueryColumn(Parms.EndpointMc)); // Activity diff calc type ActDiffCalcType calcType = Parms.ActDiffCalcType; if (calcType == ActDiffCalcType.SimpleDifference) { SimpleDifference.Checked = true; } else if (calcType == ActDiffCalcType.NegativeLog) { NegativeLog.Checked = true; } else if (calcType == ActDiffCalcType.MolarNegativeLog) { MolarNegativeLog.Checked = true; } else if (calcType == ActDiffCalcType.Ratio) { Ratio.Checked = true; } CalcAbsoluteValue.Checked = Parms.UseAbsoluteValue; // Molsim parameters if (Parms.SimilarityType == SimilaritySearchType.ECFP4) { ECFP4Similarity.Checked = true; } else if (Parms.SimilarityType == SimilaritySearchType.Normal) { StandardSimilarity.Checked = true; } MinSimCtl.Text = Parms.MinimumSimilarity.ToString(); PairCountCtl.Text = Parms.MaxPairCount.ToString(); return; }