コード例 #1
0
 private void TrvFilters_Click(object sender, EventArgs e)
 {
     if (SelectedTransactionType != "" && TrvFilters.GetNodeAt(Cursor.Position) == null)
     {
         TrvFilters.SelectedNode.BackColor = Color.White;
         TrvFilters.SelectedNode.ForeColor = Color.Black;
         //TrvFilters.CollapseAll();
         TrvFilters.SelectedNode = null;
         SelectedTransactionType = "";
         TranTypeWhereClause     = "";
         Fill_DGVTransactions();
         Fill_DGVCategory();
         Fill_DGVHierarchy();
     }
 }
コード例 #2
0
 private void TrvFilters_MouseDown(object sender, MouseEventArgs e)
 {
     if (SelectedTransactionType != "" && TrvFilters.GetNodeAt(e.Location) == null && TrvFilters.SelectedNode != null)
     {
         TrvFilters.SelectedNode.BackColor = Color.White;
         TrvFilters.SelectedNode.ForeColor = Color.Black;
         TrvFilters.CollapseAll();
         TrvFilters.SelectedNode = null;
         SelectedTransactionType = "";
         TranTypeWhereClause     = "";
         Fill_DGVTransactions();
         Fill_DGVCategory();
         Fill_DGVHierarchy();
     }
     else if (TrvFilters.GetNodeAt(e.Location) == null && TrvFilters.SelectedNode == null)
     {
         TrvFilters.CollapseAll();
     }
 }