Changeset 952
- Timestamp:
- 5/1/2009 4:52:00 AM (4 years ago)
- Location:
- branches/eraser6
- Files:
-
- 7 edited
-
DefaultPlugins/SettingsForm.cs (modified) (1 diff)
-
Eraser/Program.cs (modified) (1 diff)
-
Eraser/SettingsPanel.cs (modified) (2 diffs)
-
Eraser/TaskDataSelectionForm.cs (modified) (1 diff)
-
Manager/Language.cs (modified) (1 diff)
-
Manager/Method.cs (modified) (1 diff)
-
Manager/PRNG.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/DefaultPlugins/SettingsForm.cs
r950 r952 41 41 42 42 //Populate the list of erasure passes, except the FL16KB. 43 foreach (ErasureMethod method in ErasureMethodManager. GetAll().Values)43 foreach (ErasureMethod method in ErasureMethodManager.Items.Values) 44 44 if (method.Guid != new Guid("{0C2E07BF-0207-49a3-ADE8-46F9E1499C01}")) 45 45 fl16MethodCmb.Items.Add(method); -
branches/eraser6/Eraser/Program.cs
r948 r952 1067 1067 1068 1068 //Refresh the list of erasure methods 1069 Dictionary<Guid, ErasureMethod> methods = ErasureMethodManager. GetAll();1069 Dictionary<Guid, ErasureMethod> methods = ErasureMethodManager.Items; 1070 1070 foreach (ErasureMethod method in methods.Values) 1071 1071 { -
branches/eraser6/Eraser/SettingsPanel.cs
r948 r952 125 125 126 126 //Refresh the list of languages 127 List<Language> languages = LanguageManager.GetAll();127 IList<Language> languages = LanguageManager.Items; 128 128 foreach (Language culture in languages) 129 129 uiLanguage.Items.Add(culture); 130 130 131 131 //Refresh the list of erasure methods 132 Dictionary<Guid, ErasureMethod> methods = ErasureMethodManager. GetAll();132 Dictionary<Guid, ErasureMethod> methods = ErasureMethodManager.Items; 133 133 foreach (ErasureMethod method in methods.Values) 134 134 { … … 139 139 140 140 //Refresh the list of PRNGs 141 Dictionary<Guid, Prng> prngs = PrngManager. GetAll();141 Dictionary<Guid, Prng> prngs = PrngManager.Items; 142 142 foreach (Prng prng in prngs.Values) 143 143 erasePRNG.Items.Add(prng); -
branches/eraser6/Eraser/TaskDataSelectionForm.cs
r948 r952 82 82 83 83 //And the methods list 84 Dictionary<Guid, ErasureMethod> methods = ErasureMethodManager. GetAll();84 Dictionary<Guid, ErasureMethod> methods = ErasureMethodManager.Items; 85 85 this.method.Items.Add(ErasureMethodManager.Default); 86 86 foreach (ErasureMethod method in methods.Values) -
branches/eraser6/Manager/Language.cs
r941 r952 110 110 /// </summary> 111 111 /// <returns>A list, with an instance of each Language class</returns> 112 public static List<Language> GetAll()112 public static IList<Language> Items 113 113 { 114 List<Language> result = new List<Language>(); 115 foreach (CultureInfo info in CultureInfo.GetCultures(CultureTypes.AllCultures)) 114 get 116 115 { 117 if (string.IsNullOrEmpty(info.Name)) 118 continue; 119 else if (new DirectoryInfo(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + 120 Path.DirectorySeparatorChar + info.Name).Exists) 121 result.Add(new Language(info)); 116 List<Language> result = new List<Language>(); 117 foreach (CultureInfo info in CultureInfo.GetCultures(CultureTypes.AllCultures)) 118 { 119 if (string.IsNullOrEmpty(info.Name)) 120 continue; 121 else if (new DirectoryInfo(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + 122 Path.DirectorySeparatorChar + info.Name).Exists) 123 result.Add(new Language(info)); 124 } 125 126 //Last resort 127 if (result.Count == 0) 128 result.Add(new Language(CultureInfo.GetCultureInfo("EN"))); 129 return result; 122 130 } 123 124 //Last resort125 if (result.Count == 0)126 result.Add(new Language(CultureInfo.GetCultureInfo("EN")));127 return result;128 131 } 129 132 } -
branches/eraser6/Manager/Method.cs
r944 r952 413 413 /// </summary> 414 414 /// <returns>A mutable list, with an instance of each method.</returns> 415 public static Dictionary<Guid, ErasureMethod> GetAll() 416 { 417 Dictionary<Guid, ErasureMethod> result = new Dictionary<Guid, ErasureMethod>(); 418 419 lock (ManagerLibrary.Instance.ErasureMethodManager.methods) 420 { 421 //Iterate over every item registered. 422 Dictionary<Guid, MethodConstructorInfo>.Enumerator iter = 423 ManagerLibrary.Instance.ErasureMethodManager.methods.GetEnumerator(); 424 while (iter.MoveNext()) 415 public static Dictionary<Guid, ErasureMethod> Items 416 { 417 get 418 { 419 Dictionary<Guid, ErasureMethod> result = new Dictionary<Guid, ErasureMethod>(); 420 421 lock (ManagerLibrary.Instance.ErasureMethodManager.methods) 425 422 { 426 MethodConstructorInfo info = iter.Current.Value; 427 result.Add(iter.Current.Key, 428 (ErasureMethod)info.Constructor.Invoke(info.Parameters)); 423 //Iterate over every item registered. 424 Dictionary<Guid, MethodConstructorInfo>.Enumerator iter = 425 ManagerLibrary.Instance.ErasureMethodManager.methods.GetEnumerator(); 426 while (iter.MoveNext()) 427 { 428 MethodConstructorInfo info = iter.Current.Value; 429 result.Add(iter.Current.Key, 430 (ErasureMethod)info.Constructor.Invoke(info.Parameters)); 431 } 429 432 } 430 } 431 432 return result;433 434 return result; 435 } 433 436 } 434 437 -
branches/eraser6/Manager/PRNG.cs
r915 r952 161 161 /// </summary> 162 162 /// <returns>A mutable list, with an instance of each PRNG.</returns> 163 public static Dictionary<Guid, Prng> GetAll() 164 { 165 lock (ManagerLibrary.Instance.PRNGManager.prngs) 166 return ManagerLibrary.Instance.PRNGManager.prngs; 163 public static Dictionary<Guid, Prng> Items 164 { 165 get 166 { 167 lock (ManagerLibrary.Instance.PRNGManager.prngs) 168 return ManagerLibrary.Instance.PRNGManager.prngs; 169 } 167 170 } 168 171
Note: See TracChangeset
for help on using the changeset viewer.
