public override string GetResults(int samplePeakIndex) { ProjectReview projHandler = FindObjectOfType <ProjectReview>(); ToolsScreen toolStuff = FindObjectOfType <ToolsScreen>(); string results; string headerHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetResultsHeaderColor()); string bodyHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetResultsBodyColor()); string shiftHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetShiftValueColor()); string peakHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetPeakValueColor()); if (maxima.Count > 0) { results = "<color=#" + headerHex + ">Signals found: </color><color=#" + bodyHex + ">" + maxima.Count + "</color>\n"; for (int i = 0; i < maxima.Count; i++) { results = results + "<color=#" + bodyHex + ">" + (i + 1) + ". (</color><color=#" + shiftHex + ">" + maxima[i].shift + "</color><color=#" + bodyHex + ">, </color><color=#" + peakHex + ">" + maxima[i].intensity.ToString("0.#") + "</color><color=#" + bodyHex + ">)</color>\n"; } } else { results = "<color=#" + bodyHex + ">NO SIGNALS</color>"; } return(results); }
public override string GetResults() { ProjectReview projHandler = FindObjectOfType <ProjectReview>(); ToolsScreen toolStuff = FindObjectOfType <ToolsScreen>(); string results; string headerHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetResultsHeaderColor()); string bodyHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetResultsBodyColor()); string shiftHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetShiftValueColor()); string peakHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetPeakValueColor()); string sampleCursorHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetSampleCursorColor()); if (maxima.Count > 0) { results = "<color=#" + headerHex + ">Signals found: " + maxima.Count + "</color>\n"; for (int i = 0; i < maxima.Count; i++) { results = results + "<color=#" + bodyHex + ">" + (i + 1) + ". (</color><color=#" + shiftHex + ">" + maxima[i].shift + "</color><color=#" + bodyHex + ">, </color><color=#" + peakHex + ">" + maxima[i].intensity.ToString("0.#") + "</color><color=#" + bodyHex + ">)</color>\n"; } } else { results = "<color=#" + bodyHex + ">NO SIGNALS</color>"; } string matchRatingTxt = "<color=#" + headerHex + ">Match Rating:</color>\n"; //string matchInfoTxt = "\nMatches: "; //string underMinimumPeakNumTxt = "\nPeak min not met for: "; if (matches.Count > 0) { for (int i = 0; i < matches.Count; i++) { float rating = this.ReturnMatchRatingWithReferenceSet(matches[i]); string ratingHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetMatchRatingColor(rating)); string matchRefHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetMatchRefColor(i)); // Add match info to results text //matchRatingTxt = matchRatingTxt + "(" + NMRRef.sampleAbbName + ") -\t" + this.ReturnMatchRatingWithReferenceSet(NMRRef).ToString("0.#") + ";\n"; matchRatingTxt = matchRatingTxt + "<color=#" + matchRefHex + ">" + matches[i].sampleAbbName + " </color><color=#" + ratingHex + ">" + rating.ToString("0.#") + "</color>\n"; //matchInfoTxt = matchInfoTxt + NMRRef.matchNotes + "; "; //if (this.maxima.Count < NMRRef.minNumOfPeakMatchesRequired) { // underMinimumPeakNumTxt = underMinimumPeakNumTxt + NMRRef.sampleName + "; "; //} } } return(results + matchRatingTxt); //+ underMinimumPeakNumTxt; }
public string GetPeak(int refIndex, int peakIndex) { ToolsScreen toolStuff = FindObjectOfType <ToolsScreen>(); NMRRefPeak peak = matches[refIndex].maxima[peakIndex]; string headerHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetResultsHeaderColor()); string shiftHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetShiftValueColor()); string peakHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetPeakValueColor()); string matchRefHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetMatchRefColor(refIndex)); string refCursorHex = ColorUtility.ToHtmlStringRGBA(toolStuff.GetRefCursorColor()); return("\n<color=#" + matchRefHex + ">" + matches[refIndex].sampleName + "</color><color=#" + headerHex + ">:</color>\n" + "<color=#" + refCursorHex + "> < </color><color=#" + shiftHex + ">" + peak.shift + "</color> <color=#" + peakHex + ">" + peak.intensity.ToString("0.#") + "</color><color=#" + refCursorHex + ">" + "></color>\n" + "<color=#" + refCursorHex + ">" + peak.speciesName + "</color>"); }
static void Main(string[] args) { StartProgram(); if (ToolsDatabaseUpperLayer.OpenDatabaseConnection()) { MainMenu(); ToolsScreen.MakeEmptyLines(2); ToolsOutput.PrintStringOnSeperateLine("Database Demo done !!!"); } else { ToolsOutput.PrintStringOnSeperateLine("Database Demo not done - Fejl ved Database forbindelse !!!"); } ToolsInput.WaitForUser(); }