private void SetViewingProfile(bool handleNote = true, bool doNotUpdateNoteBox = false) { _viewingProfile = _activeProfile; if (!settings.HideProfiles) { profileName.Text = _viewingProfile.ProfileName; profilePicture.ImageLocation = _viewingProfile.ProfilePictureUrl; if (_viewingProfile.Private) { profileRealName.ForeColor = Color.Red; profileRealName.Text = "This profile is private."; profileLocation.Text = string.Empty; } else { profileRealName.ForeColor = Color.Black; profileRealName.Text = _viewingProfile.RealName; profileLocation.Text = _viewingProfile.Location; } } string note = NoteManager.GetNote(_viewingProfile.SteamID64); if (!doNotUpdateNoteBox) { textBoxNotes.Text = note; } if (handleNote) { SetEditingNote(false, false); if (settings.NotifyOnNotedHost && !string.IsNullOrWhiteSpace(note)) { FlashWindow.Flash(this); if (File.Exists("Notification.wav")) { SoundPlayer player = new SoundPlayer("Notification.wav"); player.Play(); } } } }
private void CancelNote_Click(object sender, EventArgs e) { textBoxNotes.Text = NoteManager.GetNote(_viewingProfile.SteamID64); SetEditingNote(false); }
private void TextBoxNotes_TextChanged(object sender, EventArgs e) { SetEditingNote(NoteManager.GetNote(_viewingProfile.SteamID64) != textBoxNotes.Text, false); }