コード例 #1
0
 public BackupManager()
 {
     _steamUserManager = new SteamUserManager();
     if (_steamUserManager.SteamUsers.Count > 1)
     {
         using (var cpForm = new ChoosePlayer(_steamUserManager))
         {
             if (cpForm.ShowDialog() == DialogResult.OK)
             {
                 CurrentUser = cpForm.Choosed;
             }
             else
             {
                 MessageBox.Show("猛汉好聚好散,告辞!");
                 Application.ExitThread();
             }
         }
     }
     else
     {
         CurrentUser = _steamUserManager.SteamUsers.FirstOrDefault();
     }
 }
コード例 #2
0
 public ChoosePlayer(SteamUserManager steamUserManager)
 {
     InitializeComponent();
     lbUserList.DataSource    = steamUserManager.SteamUsers;
     lbUserList.DisplayMember = "UserName";
 }