예제 #1
0
 private void MainPage_PlayerConnected(Player obj)
 {
     lock (ListBoxLeftSync)
     {
         ListBoxLeft.Add(obj);
     }
 }
예제 #2
0
 private void MoveAllLeft_Executed(object obj)
 {
     foreach (var item in ListBoxRight)
     {
         ListBoxLeft.Add(item);
     }
     ListBoxRight.Clear();
 }
예제 #3
0
        private void MoveSelectedLeft_Executed(object obj)
        {
            var players = PlayerListBoxRight.SelectedItems.Cast <Player>().ToArray();

            foreach (var player in players)
            {
                ListBoxLeft.Add(player);
                ListBoxRight.Remove(player);
            }
        }
예제 #4
0
 private void MainPage_ConnectedToServer(TournamentAssistantShared.Models.Packets.ConnectResponse response)
 {
     foreach (var item in response.State.Players)
     {
         lock (ListBoxLeftSync)
         {
             ListBoxLeft.Add(item);
         }
     }
 }
예제 #5
0
 public override void DataBind()
 {
     ListBoxLeft.Items.Clear();
     ListBoxRight.Items.Clear();
     ListBoxLeft.DataSource     = DataSource;
     ListBoxLeft.DataTextField  = DataTextField;
     ListBoxLeft.DataValueField = DataValueField;
     ListBoxLeft.DataBind();
     base.DataBind();
 }
예제 #6
0
 private void MainPage_PlayerDisconnected(Player obj)
 {
     lock (ListBoxLeftSync)
     {
         ListBoxLeft.Remove(obj);
     }
     lock (ListBoxRightSync)
     {
         ListBoxRight.Remove(obj);
     }
 }