public void InitSessions(SessionForm[] sessions, StringCollection individualTypes, StringCollection genotypeStatuses)
        {
            string[] names;

            MySessions = sessions;

            if (MySessions != null)
            {
                names = new string[MySessions.GetLength(0)];
                for (int i = 0; i < MySessions.GetLength(0); i++)
                {
                    names[i] = MySessions[i].Text;
                }

                ComparisonSource1.SetSessionNames(names);
                ComparisonSource2.SetSessionNames(names);
            }
            if (individualTypes != null)
            {
                ComparisonSource1.SetItemTypes(individualTypes);
                ComparisonSource2.SetItemTypes(individualTypes);
            }
            if (genotypeStatuses != null)
            {
                ComparisonSource1.SetGenotypeStatuses(genotypeStatuses);
                ComparisonSource2.SetGenotypeStatuses(genotypeStatuses);
            }
        }
        private void OKButton_Click(object sender, EventArgs e)
        {
            ComparisonSettings      settings;
            InvestigationSourceInfo sourceInfo1, sourceInfo2;
            InvestigationReportForm repForm;

            try
            {
                //Check that both sources have been selected.
                if (ComparisonSource1.GetSourceName().Trim() == "" || ComparisonSource2.GetSourceName().Trim() == "")
                {
                    MessageManager.ShowInformation("Please select two sources.", this);
                    return;
                }

                settings    = GetSettings();
                sourceInfo1 = GetSourceInfo(ComparisonSource1);
                sourceInfo2 = GetSourceInfo(ComparisonSource2);

                repForm = new InvestigationReportForm(MyConnectionString);
                repForm.GenerateComparisonReport(sourceInfo1, sourceInfo2, settings);
            }
            catch (Exception ex)
            {
                MessageManager.ShowError(ex, "Error when generating comparison report.", this);
            }
        }
        public void InitReferenceSets(StringCollection referenceSetNames)
        {
            string[] names;
            int      i = 0;

            names = new string[referenceSetNames.Count];
            foreach (string tempName in referenceSetNames)
            {
                names[i++] = tempName;
            }

            ComparisonSource1.SetReferenceSetNames(names);
            ComparisonSource2.SetReferenceSetNames(names);
        }