Guest User

Untitled

a guest
Jul 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. private void LoadUIProfiles()
  2. {
  3. ProxyProfile currentProfile = ProfileManager.Instance.CurrentProfile;
  4.  
  5. gridProfiles.Rows.Clear();
  6. foreach (ProxyProfile profile in AppSettings.Instance.Profiles)
  7. {
  8. DataGridViewRow row = new DataGridViewRow();
  9. row.CreateCells(gridProfiles, profile.Name, profile.ProxyString);
  10. row.Tag = profile;
  11. gridProfiles.Rows.Add(row);
  12.  
  13. if (profile.Equals(currentProfile))
  14. currentProfile = null;
  15. }
  16. gridProfiles.Sort(colProfileName, ListSortDirection.Ascending);
  17.  
  18. if (currentProfile != null)
  19. {
  20. DataGridViewRow row = new DataGridViewRow();
  21. row.CreateCells(gridProfiles, "<Current Profile>", currentProfile.ProxyString);
  22. row.DefaultCellStyle = new DataGridViewCellStyle();
  23. row.DefaultCellStyle.ForeColor = Color.Silver;
  24. gridProfiles.Rows.Add(row);
  25. }
  26. }
Add Comment
Please, Sign In to add comment