public void UpdateToolTipPoints(List <string> mapData, List <string> testData) { for (int i = 0; i < mapData.Count; i++) { hoverPoint temp = mapTooltipList[i]; temp.tt.SetToolTip(temp.placeholder, mapData[i]); } for (int i = 0; i < testData.Count; i++) { hoverPoint temp = testTooltipList[i]; temp.tt.SetToolTip(temp.placeholder, testData[i]); } splitContainer1.Panel2.Invalidate(); }
/* Mouse down handler */ private void PictureDown(object sender, MouseEventArgs e) { if (SelectingMapPts) { mapPts.Add(e.Location); listView1.Items.Add("Point " + (mapPts.Count-1) + ": (" + e.X + ", " + e.Y + ")"); // Setup invisible label - used as anchor for tooltip Label temp = new Label(); temp.Text = " "; temp.Location = mapPts[mapPts.Count - 1]; temp.AutoSize = true; temp.BackColor = Color.Transparent; temp.Parent = splitContainer1.Panel2; // Setup tooltip ToolTip tt = new ToolTip(); tt.IsBalloon = true; tt.ToolTipIcon = ToolTipIcon.Info; tt.ToolTipTitle = "Map Point: " + (mapPts.Count - 1); tt.AutoPopDelay = 1000; tt.SetToolTip(temp, "lkhgsd"); hoverPoint hp = new hoverPoint(); hp.placeholder = temp; hp.tt = tt; mapTooltipList.Add(hp); splitContainer1.Panel2.Invalidate(); } else if (SelectingTestpts) { testPts.Add(e.Location); listView2.Items.Add("Point " + (testPts.Count-1) + ": (" + e.X + ", " + e.Y + ")"); // Setup invisible label - used as anchor for tooltip Label temp = new Label(); temp.Text = " "; temp.Location = testPts[testPts.Count - 1]; temp.AutoSize = true; temp.BackColor = Color.Transparent; temp.Parent = splitContainer1.Panel2; // Setup tooltip ToolTip tt = new ToolTip(); tt.IsBalloon = true; tt.ToolTipIcon = ToolTipIcon.Info; tt.ToolTipTitle = "Test Point: " + (testPts.Count - 1); tt.AutoPopDelay = 1000; tt.SetToolTip(temp, "lkhgsd"); hoverPoint hp = new hoverPoint(); hp.placeholder = temp; hp.tt = tt; testTooltipList.Add(hp); splitContainer1.Panel2.Invalidate(); } else if (CropBox.Checked) { clicked = true; startPt = e.Location; } }
/* Mouse down handler */ private void PictureDown(object sender, MouseEventArgs e) { if (SelectingMapPts) { mapPts.Add(e.Location); listView1.Items.Add("Point " + (mapPts.Count - 1) + ": (" + e.X + ", " + e.Y + ")"); // Setup invisible label - used as anchor for tooltip Label temp = new Label(); temp.Text = " "; temp.Location = mapPts[mapPts.Count - 1]; temp.AutoSize = true; temp.BackColor = Color.Transparent; temp.Parent = splitContainer1.Panel2; // Setup tooltip ToolTip tt = new ToolTip(); tt.IsBalloon = true; tt.ToolTipIcon = ToolTipIcon.Info; tt.ToolTipTitle = "Map Point: " + (mapPts.Count - 1); tt.AutoPopDelay = 1000; tt.SetToolTip(temp, "lkhgsd"); hoverPoint hp = new hoverPoint(); hp.placeholder = temp; hp.tt = tt; mapTooltipList.Add(hp); splitContainer1.Panel2.Invalidate(); } else if (SelectingTestpts) { testPts.Add(e.Location); listView2.Items.Add("Point " + (testPts.Count - 1) + ": (" + e.X + ", " + e.Y + ")"); // Setup invisible label - used as anchor for tooltip Label temp = new Label(); temp.Text = " "; temp.Location = testPts[testPts.Count - 1]; temp.AutoSize = true; temp.BackColor = Color.Transparent; temp.Parent = splitContainer1.Panel2; // Setup tooltip ToolTip tt = new ToolTip(); tt.IsBalloon = true; tt.ToolTipIcon = ToolTipIcon.Info; tt.ToolTipTitle = "Test Point: " + (testPts.Count - 1); tt.AutoPopDelay = 1000; tt.SetToolTip(temp, "lkhgsd"); hoverPoint hp = new hoverPoint(); hp.placeholder = temp; hp.tt = tt; testTooltipList.Add(hp); splitContainer1.Panel2.Invalidate(); } else if (CropBox.Checked) { clicked = true; startPt = e.Location; } }