Ejemplo n.º 1
0
 private void move(Unit u, bool IsFirst)
 {
     if (IsFirst)
     {
         TradeList1.Remove(u);
         TradeList2.Add(u);
         if (u == Selected1)
         {
             Selected1 = null;
             traderList1.SelectedItem = null;
             itemsList1.ItemsSource   = null;
         }
     }
     else
     {
         TradeList2.Remove(u);
         TradeList1.Add(u);
         if (u == Selected2)
         {
             Selected2 = null;
             traderList2.SelectedItem = null;
             itemsList2.ItemsSource   = null;
         }
     }
     Update();
 }
Ejemplo n.º 2
0
        private void deleteButton1_Click(object sender, RoutedEventArgs e)
        {
            var trader = traderList1.SelectedItem as Unit;

            if (trader != null)
            {
                TradeList1.Remove(trader);
                Selected1 = null;
                itemsList1.ItemsSource = null;
                Update();
            }
        }