private void LingTreeTree_MouseUp(object sender, MouseEventArgs e) { Graphics grfx = this.CreateGraphics(); grfx.PageUnit = GraphicsUnit.Millimeter; grfx.PageScale = .01f; Point[] atpt = { new Point(e.X, e.Y) }; grfx.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Device, atpt); int iClickX = atpt[0].X; int iClickY = atpt[0].Y; foreach (LingTreeNode node in this.Controls) { if (iClickX >= node.XCoord && iClickX <= (node.XCoord + node.Width)) { if (iClickY >= node.YCoord && iClickY <= (node.YCoord + node.Height)) { node.BackColor = SystemColors.Highlight; LingTreeNodeClickedEventArgs ltne = new LingTreeNodeClickedEventArgs(node); if (this.m_LingTreeNodeClickedEvent != null) { m_LingTreeNodeClickedEvent(this, ltne); } } else { node.BackColor = BackColor; } } else { node.BackColor = BackColor; } } Invalidate(); }
public void OnNodeClicked(object sender, LingTreeNodeClickedEventArgs ltne) { // do nothing here }
private void LingTreeTree_MouseUp(object sender, MouseEventArgs e) { Graphics grfx = this.CreateGraphics(); grfx.PageUnit = GraphicsUnit.Millimeter; grfx.PageScale = .01f; Point[] atpt = {new Point(e.X, e.Y)}; grfx.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Device, atpt); int iClickX = atpt[0].X; int iClickY = atpt[0].Y; foreach (LingTreeNode node in this.Controls) { if (iClickX >= node.XCoord && iClickX <= (node.XCoord + node.Width)) if (iClickY >= node.YCoord && iClickY <= (node.YCoord + node.Height)) { node.BackColor = SystemColors.Highlight; LingTreeNodeClickedEventArgs ltne = new LingTreeNodeClickedEventArgs(node); if (this.m_LingTreeNodeClickedEvent != null) m_LingTreeNodeClickedEvent(this, ltne); } else node.BackColor = BackColor; else node.BackColor = BackColor; } Invalidate(); }
protected virtual void OnLingTreeNodeClicked(LingTreeNodeClickedEventArgs ltncea) { if (LingTreeNodeClicked != null) LingTreeNodeClicked(this, ltncea); }
private void OnNodeClicked(object sender, LingTreeNodeClickedEventArgs ltne) { // Do nothing for LingTreeApp. //MessageBox.Show("node index = " + ltne.Node.Index + "; content = " + ltne.Node.Content); }
private void OnNodeClicked(object sender, LingTreeNodeClickedEventArgs ltne) { string sId = ltne.Node.Id; ShowFSInfo(sId); ShowGrammarInfo(sId); }