Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void LoadUIProfiles()
- {
- ProxyProfile currentProfile = ProfileManager.Instance.CurrentProfile;
- gridProfiles.Rows.Clear();
- foreach (ProxyProfile profile in AppSettings.Instance.Profiles)
- {
- DataGridViewRow row = new DataGridViewRow();
- row.CreateCells(gridProfiles, profile.Name, profile.ProxyString);
- row.Tag = profile;
- gridProfiles.Rows.Add(row);
- if (profile.Equals(currentProfile))
- currentProfile = null;
- }
- gridProfiles.Sort(colProfileName, ListSortDirection.Ascending);
- if (currentProfile != null)
- {
- DataGridViewRow row = new DataGridViewRow();
- row.CreateCells(gridProfiles, "<Current Profile>", currentProfile.ProxyString);
- row.DefaultCellStyle = new DataGridViewCellStyle();
- row.DefaultCellStyle.ForeColor = Color.Silver;
- gridProfiles.Rows.Add(row);
- }
- }
Add Comment
Please, Sign In to add comment