private void panel1_MouseClick(object sender, MouseEventArgs e) { // thr += 2; // CC = 0; if (e.Button == MouseButtons.Left) { HClusterNode remNode = currentNode; currentNode = CheckRegion(e.X, e.Y); if (currentNode != null) { allRegions.Clear(); memoryClicks.Push(remNode); this.Invalidate(); this.Refresh(); } else { currentNode = remNode; } string lab = CheckColorRegion(e.X, e.Y); if (lab != null) { DialogResult res; colorDialog1 = new ColorDialog(); res = colorDialog1.ShowDialog(); if (res == DialogResult.OK) { colorMap[labelColor[lab]][0] = colorDialog1.Color.R; colorMap[labelColor[lab]][1] = colorDialog1.Color.G; colorMap[labelColor[lab]][2] = colorDialog1.Color.B; this.Invalidate(); this.Refresh(); } } toolStripButton2.Enabled = true; } else { HClusterNode remNode = CheckRegion(e.X, e.Y); if (remNode != null) { visHierar dendrog = new visHierar(remNode, "", measureName, null); dendrog.Show(); } } }
public void SClusters(string item, string measureName, string option) { Dictionary <string, string> dic = ClusterOutput.ReadLabelsFile(output.GetLabelFile()); if (output.clusters != null) { switch (option) { case "Order Visual": if (active == null || !(active is VisOrder)) { VisOrder visOrder; visOrder = new VisOrder(output.clusters, item, null); visOrder.closeForm = Closing; active = visOrder; visOrder.Show(); } return; case "Text List": default: if (active == null || !(active is ListVisual)) { ListVisual visBaker; visBaker = new ListVisual(output.clusters, item, dic); visBaker.closeForm = Closing; active = visBaker; visBaker.Show(); } return; } } if (output.hNode != null) { // win = new visHierar(output.hNode,item,measureName); if (option == null) { return; } switch (option) { case "Dendrogram": default: if (active == null || !(active is visHierar)) { visHierar winH; winH = new visHierar(output.hNode, item, measureName, dic); winH.closeForm = Closing; active = winH; winH.Show(); } return; case "Sunburst chart": if (active == null || !(active is VisHierarCircle)) { VisHierarCircle winC; winC = new VisHierarCircle(output.hNode, item, measureName); winC.closeForm = Closing; active = winC; winC.Show(); } return; } } if (output.juryLike != null || output.hNNRes != null) { if (active == null || !(active is FormText)) { FormText showRes; if (output.juryLike != null) { showRes = new FormText(output.juryLike, item); } else { showRes = new FormText(output.hNNRes, item); } showRes.closeForm = Closing; active = showRes; showRes.Show(); } return; } if (output.nodes != null) { HeatMap heatRes = new HeatMap(output.nodes[1], output.nodes[0], null, output.measure, output.name); active = heatRes; heatRes.Show(); } }
public void SClusters(string item,string measureName,string option) { if (output.clusters != null) { switch(option) { case "Order Visual": if (active == null || !(active is VisOrder)) { VisOrder visOrder; visOrder = new VisOrder(output.clusters, item, null); visOrder.closeForm = Closing; active = visOrder; visOrder.Show(); } return; case "Text List": if (active == null || !(active is ListVisual)) { ListVisual visBaker; visBaker = new ListVisual(output.clusters, item); visBaker.closeForm = Closing; active = visBaker; visBaker.Show(); } return; } } if (output.hNode != null) { // win = new visHierar(output.hNode,item,measureName); if (option == null) return; switch (option) { case "Dendrogram": if (active == null || !(active is visHierar)) { visHierar winH; winH = new visHierar(output.hNode, item, measureName); winH.closeForm = Closing; active = winH; winH.Show(); } return; case "Circle Visual": if (active == null || !(active is VisHierarCircle)) { VisHierarCircle winC; winC = new VisHierarCircle(output.hNode, item, measureName); winC.closeForm = Closing; active = winC; winC.Show(); } return; } } if (output.juryLike != null) { if (active == null || !(active is FormText)) { FormText showRes; showRes = new FormText(output.juryLike, item); showRes.closeForm = Closing; active = showRes; showRes.Show(); } return; } }