Exemplo n.º 1
0
		internal static ProfileList LoadProfiles()
		{
			ProfileList result = new ProfileList();
			string path = GetPortableLibraryPath();
			result.LoadProfiles("v4.0", Path.Combine(path, @"v4.0\Profile"));
			result.LoadProfiles("v4.5", Path.Combine(path, @"v4.5\Profile"));
			return result;
		}
		public SelectProfileDialog(ProfileList profileList)
		{
			if (profileList == null)
				throw new ArgumentNullException("profileList");
			InitializeComponent();
			this.profileList = profileList;
			Debug.WriteLine(string.Join(Environment.NewLine, profileList.AllProfiles.Select(p => p.DisplayName)));
			viewModels = profileList.AllFrameworks.GroupBy(fx => fx.DisplayName, (key, group) => new SupportedFrameworkGroup(group)).ToList();
			this.DataContext = this;
			foreach (var vm in viewModels) {
				vm.PropertyChanged += delegate { UpdateSelectedProfile(); };
			}
			UpdateSelectedProfile();
		}
Exemplo n.º 3
0
        public static Profile LoadProfile(string targetFrameworkVersion, string targetFrameworkProfile)
        {
            string profileDir = Path.Combine(ProfileList.GetPortableLibraryPath(), targetFrameworkVersion, "Profile", targetFrameworkProfile);

            return(LoadProfile(targetFrameworkVersion, targetFrameworkProfile, profileDir));
        }