예제 #1
0
        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();
        }
예제 #2
0
 public void OnNodeClicked(object sender, LingTreeNodeClickedEventArgs ltne)
 {
     // do nothing here
 }
예제 #3
0
 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();
 }
예제 #4
0
 protected virtual void OnLingTreeNodeClicked(LingTreeNodeClickedEventArgs ltncea)
 {
     if (LingTreeNodeClicked != null)
         LingTreeNodeClicked(this, ltncea);
 }
예제 #5
0
 private void OnNodeClicked(object sender, LingTreeNodeClickedEventArgs ltne)
 {
     // Do nothing for LingTreeApp.
     //MessageBox.Show("node index = " + ltne.Node.Index + "; content = " + ltne.Node.Content);
 }
예제 #6
0
 private void OnNodeClicked(object sender, LingTreeNodeClickedEventArgs ltne)
 {
     string sId = ltne.Node.Id;
     ShowFSInfo(sId);
     ShowGrammarInfo(sId);
 }
예제 #7
0
 public void OnNodeClicked(object sender, LingTreeNodeClickedEventArgs ltne)
 {
     // do nothing here
 }