Changeset 7655
- Timestamp:
- 03/22/12 16:08:20 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CloudManagerClient.cs
r7577 r7655 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Collections.Specialized; 24 25 using HeuristicLab.Clients.Hive.CloudManager.Azure; 25 26 using HeuristicLab.Clients.Hive.CloudManager.Model; 27 using HeuristicLab.Clients.Hive.CloudManager.Properties; 26 28 using HeuristicLab.Common; 27 29 using HeuristicLab.Core; … … 211 213 } 212 214 213 215 public void PersistSubscriptionsToUserConfig() { 216 StringCollection strCol = new StringCollection(); 217 foreach (Subscription sub in Subscriptions) { 218 if (sub.SaveToConfig) { 219 string setting = sub.GetSettingString(); 220 Settings.Default.AzureSubscriptions.Add(setting); 221 } 222 } 223 //TODO: 224 //Settings.Default.Upgrade(); 225 //Settings.Default.Save(); 226 227 } 228 229 public void RestoreSubscriptionsFromUserConfig() { 230 StringCollection strCol = new StringCollection(); 231 foreach (string azureSub in strCol) { 232 Subscription s = Subscription.ParseSettingString(azureSub); 233 s.SaveToConfig = true; 234 Add(s); 235 } 236 } 214 237 } 215 238 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj
r7608 r7655 80 80 <DependentUpon>Resources.resx</DependentUpon> 81 81 </Compile> 82 <Compile Include="Properties\Settings.Designer.cs"> 83 <AutoGen>True</AutoGen> 84 <DesignTimeSharedInput>True</DesignTimeSharedInput> 85 <DependentUpon>Settings.settings</DependentUpon> 86 </Compile> 87 <Compile Include="Settings.cs" /> 82 88 <Compile Include="Validation.cs" /> 83 89 <Compile Include="Views\AddAzureServiceDialog.cs"> … … 143 149 </ItemGroup> 144 150 <ItemGroup> 151 <None Include="app.config" /> 145 152 <None Include="HeuristicLab.snk" /> 146 153 <None Include="PackageFiles\HeuristicLab.Clients.Hive.Slave.Azure.ExtraLarge.cspkg"> … … 161 168 <None Include="Plugin.cs.frame" /> 162 169 <None Include="Properties\AssemblyInfo.cs.frame" /> 170 <None Include="Properties\Settings.settings"> 171 <Generator>SettingsSingleFileGenerator</Generator> 172 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 173 </None> 163 174 </ItemGroup> 164 175 <ItemGroup> -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/Subscription.cs
r7326 r7655 101 101 this.DiscoverServices = subscription.DiscoverServices; 102 102 } 103 104 public string GetSettingString() { 105 return SubscriptionID + ";" + CertificateThumbprint; 106 } 107 108 public static Subscription ParseSettingString(string settingString) { 109 int idxSeparator = settingString.IndexOf(';'); 110 string subId = settingString.Substring(0, idxSeparator); 111 string certThumbprint = settingString.Substring(idxSeparator, settingString.Length); 112 Subscription sub = new Subscription(); 113 sub.SubscriptionID = subId; 114 sub.CertificateThumbprint = certThumbprint; 115 return sub; 116 } 103 117 } 104 118 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.cs
r7608 r7655 79 79 timer = null; 80 80 } 81 CloudManagerClient.Instance.PersistSubscriptionsToUserConfig(); 81 82 base.Dispose(disposing); 82 83 }
Note: See TracChangeset
for help on using the changeset viewer.