Exemplo n.º 1
0
        private void UserControl_PreviewDrop(object sender, DragEventArgs e)
        {
            if (objSlotProcess == null)
            {
                objSlotProcess = new SlotProcess();
            }


            if (e.Data.GetDataPresent("DragSource"))
            {
                SlotData dragSlotData = (SlotData)e.Data.GetData("DragSource");
                objSlotProcess.DoTransferCar(dragSlotData.SlotFloor, dragSlotData.SlotAisle,
                                             dragSlotData.SlotRow, slotData.SlotFloor, slotData.SlotAisle, slotData.SlotRow);
            }
        }
Exemplo n.º 2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (objSlotProcess == null)
     {
         objSlotProcess = new SlotProcess();
     }
     try
     {
         objSlotProcess.DoTransferCar(FromFloor, FromAisle,
                                      FromRow, int.Parse(toFloor.Text), int.Parse(toAisle.Text), int.Parse(toRow.Text));
     }
     catch (FormatException ex)
     {
         MessageBox.Show("Please enter valid inputs");
     }
 }