Beispiel #1
0
        private void MitoMapFrm_Load(object sender, EventArgs e)
        {
            string       csv    = Genetic_Genealogy_Kit.Properties.Resources.mtdna_map;
            StreamReader reader = new StreamReader(new MemoryStream(Encoding.ASCII.GetBytes(csv)));
            string       line   = null;

            string[] data   = null;
            Series   series = series = mtdna_chart.Series[0];

            //Map Locus	 Starting	 Ending	bp Length	 Shorthand	 Description
            dgvmtdna.Rows.Clear();
            while ((line = reader.ReadLine()) != null)
            {
                data = line.Split(new char[] { ',' });
                DataPoint dp = new DataPoint();
                dp.IsVisibleInLegend = false;
                dp.Label             = data[0];
                dp.YValues           = new double[] { int.Parse(data[3]) };
                dp.CustomProperties  = "PieLineColor=Black, PieLabelStyle=Outside, Exploded=True";
                series.Points.Add(dp);
                //
                dgvmtdna.Rows.Add(new object[] { data[0], data[1], data[2], data[3], data[4], data[5] });
            }
            reader.Close();
            //
            RSRS = GGKUtilLib.getRSRS();
            for (int i = 0; i < RSRS.Length; i++)
            {
                nucleotides.Add(i + 1, new string[] { (i + 1).ToString(), RSRS[i].ToString(), RSRS[i].ToString() });
            }

            mutations = GGKUtilLib.queryValue("kit_mtdna", new string[] { "mutations" }, "where kit_no='" + kit + "'");
            dgvNucleotides.Columns[2].HeaderText = GGKUtilLib.getKitName(kit) + " (" + kit + ")";

            dgvmtdna.Columns[3].Visible = false;

            loadKitMutations();
        }