Esempio n. 1
0
 private void EndDrag()
 {
     trg.BorderThickness = new Thickness(0);
     trg.BorderBrush = null;
     from_temp = null;
     fromDropTo = DropTo.None;
 }
Esempio n. 2
0
    public void BindDropTo()
    {
        adapter = new MySqlDataAdapter("Select * from train_data", con);
        DataTable dt = new DataTable();

        adapter.Fill(dt);
        DropTo.DataSource = dt;
        DropTo.DataBind();
        DropTo.DataTextField = "to";
        DropTo.DataBind();
    }
Esempio n. 3
0
 private void Trg_DragOver(object sender, DragEventArgs e)
 {
     if (trg != null && from_temp != null)
     {
         if(trgElement.Type == IBProjectElementTypes.Folder)
         {
             if (e.GetPosition(trg).Y < HEIGHT / 4)
             {
                 trg.BorderThickness = new Thickness(0, 3, 0, 0);
                 fromDropTo = DropTo.Top;
             }
             else if (e.GetPosition(trg).Y > HEIGHT * 3 / 4 && e.GetPosition(trg).Y < HEIGHT)
             {
                 trg.BorderThickness = new Thickness(0, 0, 0, 3);
                 fromDropTo = DropTo.Bottom;
             }
             else
             {
                 trg.BorderThickness = new Thickness(2);
                 fromDropTo = DropTo.Child;
             }
         }
         else
         {
             if (e.GetPosition(trg).Y < HEIGHT / 2)
             {
                 trg.BorderThickness = new Thickness(0, 3, 0, 0);
                 fromDropTo = DropTo.Top;
             }
             else
             {
                 trg.BorderThickness = new Thickness(0, 0, 0, 3);
                 fromDropTo = DropTo.Bottom;
             }
         }
     }
 }