Ejemplo n.º 1
0
Archivo: Test2.cs Proyecto: koson/DMI
        internal void OnMoveEmails(ucMailTree tree, UCTreeDragDropEventArgs e)
        {
            List <Message> messages = new List <Message>();

            foreach (int row in e.Selection.Rows)
            {
                if (row >= 0 && gridView1.GetRow(row) is Message)
                {
                    messages.Add(gridView1.GetRow(row) as Message);
                }
                if (row < 0)
                {
                    int count = gridView1.GetChildRowCount(row);
                    for (int n = 0; n < count; n++)
                    {
                        int r = gridView1.GetChildRowHandle(row, n);
                        if (r >= 0 && gridView1.GetRow(r) is Message)
                        {
                            messages.Add(gridView1.GetRow(r) as Message);
                        }
                    }
                }
            }
            Console.WriteLine("Drop {0}", messages.Count);
            foreach (Message m in messages)
            {
                Console.WriteLine("{0}", m.From);
                m.MailFolder = (int)tree.GetNodeMailFolder(e.Node);
                m.MailType   = tree.GetNodeMailType(e.Node);
            }
            RaiseUpdateTreeViewMessages();
            ResetDrag();
        }
Ejemplo n.º 2
0
 private void ucMailTree1_UCTreeDragDrop(object sender, UCTreeDragDropEventArgs e)
 {
     if (modulesNavigator.CurrentModule is Mail)
     {
         ((Mail)modulesNavigator.CurrentModule).OnMoveEmails(ucMailTree1, e);
     }
 }