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 addWorldButton1_Click(object sender, RoutedEventArgs e)
        {
            string result = this.ShowModalInputExternal("Add someone from world", $"Type his name");

            if (result != null && mainwindow.World.FirstOrDefault(x => x.Name.Contains(result)) != null)
            {
                TradeList1.Add(mainwindow.World.FirstOrDefault(x => x.Name.Contains(result)));
                Update();
            }
        }
Ejemplo n.º 3
0
        private void addGuildButton1_Click(object sender, RoutedEventArgs e)
        {
            string result = this.ShowModalInputExternal("Add guildian", $"Type his name");

            if (result != null && mainwindow.SelectedGroup.Crew.FirstOrDefault(x => x.Name.Contains(result)) != null)
            {
                TradeList1.Add(mainwindow.SelectedGroup.Crew.FirstOrDefault(x => x.Name.Contains(result)));
                Update();
            }
        }