Example #1
0
 public void Reset()
 {
     TreeViewAccounting.Reset();
     //UpdateComboBoxDates();
     //_DataHistory.Clear();
     //_CurrentDate = DateTime.Today;
     //_DataHistory[_CurrentDate.Value] = new AccountingData();
 }
Example #2
0
 public void SetUpTree(TreeViewMapping tvm)
 {
     if (TreeViewAccounting.InvokeRequired)
     {
         DelegateTreeWithInput d = new DelegateTreeWithInput(SetUpTree);
         this.Invoke(d, new object[] { tvm });
     }
     else
     {
         TreeViewAccounting.SetUpTree(tvm);
     }
 }
Example #3
0
        private void TreeViewAccounting_DragDrop(object sender, DragEventArgs e)
        {
            // Retrieve the client coordinates of the drop location.
            Point targetPoint = TreeViewAccounting.PointToClient(new Point(e.X, e.Y));

            // Retrieve the node at the drop location.
            TreeNode targetNode = TreeViewAccounting.GetNodeAt(targetPoint);

            // Retrieve the node that was dragged.
            TreeNode draggedNode = (TreeNode)e.Data.GetData(typeof(TreeNode));

            // Confirm that the node at the drop location is not
            // the dragged node and that target node isn't null
            // (for example if you drag outside the control)
            if (!draggedNode.Equals(targetNode) && targetNode != null)
            {
                Data.Map.MoveNode((NodeAddress)draggedNode.Tag, (NodeAddress)targetNode.Tag);
                SetUpTree(Data.Map);
                TreeViewAccounting.ResetGraphics();
            }
        }
Example #4
0
        private void TreeViewAccounting_DragOver(object sender, DragEventArgs e)
        {
            Point pt = TreeViewAccounting.PointToClient(new Point(e.X, e.Y));

            TreeViewAccounting.ShowLine(pt);
        }
Example #5
0
 private void TreeViewAccounting_DragEnter(object sender, DragEventArgs e)
 {
     e.Effect = DragDropEffects.Move;
     TreeViewAccounting.DefineRef(e);
 }
Example #6
0
 public void TreeView_NodeMouseRightClick(TreeNodeMouseClickEventArgs e)
 {
     TreeViewAccounting.NodeMouseRightClick(e);
 }