Exemple #1
0
 private void LBS_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (LBS.SelectedIndex < 0)
     {
         return;
     }
     mnfServer = new MnfServer(Servers[LBS.SelectedIndex]);
     Console.WriteLine("Selected server " + mnfServer.JmenoServeru);
     ServersSelected = LBS.SelectedIndex;
     if (LBS.SelectedIndex > -1)
     {
         OnNewUser(new MnfPlayer()
         {
             Avatar   = mnfAvatar,
             Server   = mnfServer,
             Uzivatel = mnfUzivatel
         });
     }
 }
Exemple #2
0
        public MnfPlayer LBS_Select(int i)
        {
            MnfPlayer mp = null;

            if (i < 0)
            {
                return(mp);
            }
            mnfServer = new MnfServer(Servers[i]);
            Console.WriteLine("Selected server " + mnfServer.JmenoServeru);
            ServersSelected = i;
            if (i > -1)
            {
                mp = new MnfPlayer()
                {
                    Avatar   = mnfAvatar,
                    Server   = mnfServer,
                    Uzivatel = mnfUzivatel
                };
            }
            return(mp);
        }