private async void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            ulong friendsId = _currentPlayerProfile.Friends[dataGridView1.CurrentCell.RowIndex];
            ApplicationPlayerDetails friendDetails = new ApplicationPlayerDetails();

            if (!await _applicationData.GetUserByIdAsync(friendsId, friendDetails))
            {
                ApplicationConstants.MessageUserNotFound();
                return;
            }

            var friendsProfile = new FormProfileOverview(_applicationData, friendDetails);

            friendsProfile.Show();
        }
Example #2
0
        private void buttonProfile_Click(object sender, EventArgs e)
        {
            if (!_applicationData.IsUsernameSet())
            {
                ApplicationConstants.MessageUsernameNotSet();
                return;
            }

            // I'm sorry... I could not fix it in any better way
            if (!_applicationData.PlayerDetails.EverythingLoaded)
            {
                ApplicationConstants.MessageProfileNotYetLoaded();
                return;
            }
            var profileView = new FormProfileOverview(_applicationData);

            profileView.Show();
        }