private void Pn_MouseMove(object sender, MouseEventArgs e) { double x = (double)e.X; double y = (double)e.Y; KeyValuePair <KeyValuePair <int, int>, int> temp = wh.convert(x, y); int k = temp.Value; KeyValuePair <int, int> tmp = temp.Key; if (k < 0 || tmp.Key < 0 || tmp.Value < 0) { txtCurNo.Text = ""; txtCurX.Text = ""; txtCurY.Text = ""; if (f != null) { f.Close(); f = null; } } else { txtCurNo.Text = k.ToString(); txtCurX.Text = tmp.Key.ToString(); txtCurY.Text = tmp.Value.ToString(); if (!check) { if (!compareCoordNate(tmp, temp.Value)) { if (f != null) { f.Close(); f = null; } Package pa = wh.lf[temp.Value].getPackage(new KeyValuePair <int, int>(tmp.Value, tmp.Key)); if (pa != null) { if (pa.getType() == 0) { pa = wh.lf[temp.Value].getPackage(new KeyValuePair <int, int>(tmp.Value, tmp.Key - 1)); } f = new PackageForm(pa); f.Location = new Point(e.X, e.Y + f.Height); f.StartPosition = FormStartPosition.Manual; f.Show(); } } } else { if (_check) { listField.Add(k); } } } preCoordNate = tmp; preField = temp.Value; }