- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 17 edited
- 9 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Advanced/AvailablePluginsView.cs
r5445 r6760 117 117 void updateOrInstallPluginsBackgroundWorker_DoWork(object sender, DoWorkEventArgs e) { 118 118 UpdateOrInstallPluginsBackgroundWorkerArgument info = (UpdateOrInstallPluginsBackgroundWorkerArgument)e.Argument; 119 bool cancelled = false; 119 120 if (info.PluginsToInstall.Count() > 0) 120 installationManager.Install(info.PluginsToInstall );121 installationManager.Install(info.PluginsToInstall, out cancelled); 121 122 if (info.PluginsToUpdate.Count() > 0) 122 installationManager.Update(info.PluginsToUpdate );123 124 if ( info.PluginsToInstall.Count() > 0 || info.PluginsToUpdate.Count() > 0)123 installationManager.Update(info.PluginsToUpdate, out cancelled); 124 125 if (!cancelled && (info.PluginsToInstall.Count() > 0 || info.PluginsToUpdate.Count() > 0)) 125 126 pluginManager.DiscoverAndCheckPlugins(); 126 127 } … … 176 177 var pluginsToInstall = selectedProduct.Plugins.Except(pluginsToUpdate); 177 178 178 updateOrInstallInfo.PluginsToInstall = 179 updateOrInstallInfo.PluginsToInstall = 179 180 pluginsToInstall 180 181 .Cast<IPluginDescription>() 181 182 .ToList(); 182 updateOrInstallInfo.PluginsToUpdate = 183 updateOrInstallInfo.PluginsToUpdate = 183 184 pluginsToUpdate 184 185 .Cast<IPluginDescription>() -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Advanced/BasicUpdateView.cs
r5445 r6760 79 79 select remotePlugin; 80 80 if (pluginsToUpdate.Count() > 0) { 81 installationManager.Update(pluginsToUpdate); 82 pluginManager.DiscoverAndCheckPlugins(); 81 bool cancelled; 82 installationManager.Update(pluginsToUpdate, out cancelled); 83 if (!cancelled) 84 pluginManager.DiscoverAndCheckPlugins(); 83 85 e.Cancel = false; 84 86 } else { -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/ServiceClients.cs
r4722 r6760 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319. 14 // Runtime Version:4.0.30319.225 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if … … 9 9 //------------------------------------------------------------------------------ 10 10 11 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService { 12 13 14 [System.Diagnostics.DebuggerStepThroughAttribute()] 11 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService 12 { 13 using System.Runtime.Serialization; 14 15 16 [System.Diagnostics.DebuggerStepThroughAttribute()] 15 17 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 16 18 [System.Runtime.Serialization.DataContractAttribute(Name="PluginDescription", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Deployment", IsReference=true)] -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManager.cs
r5445 r6760 98 98 /// </summary> 99 99 /// <param name="plugins"></param> 100 public void Install(IEnumerable<IPluginDescription> plugins ) {100 public void Install(IEnumerable<IPluginDescription> plugins, out bool cancelled) { 101 101 var args = new PluginInfrastructureCancelEventArgs(plugins); 102 102 OnPreInstall(args); 103 103 if (!args.Cancel) { 104 cancelled = false; 104 105 var client = DeploymentService.UpdateServiceClientFactory.CreateClient(); 105 106 try { … … 123 124 throw new InstallationManagerException("General communication exception in connection to server.", e); 124 125 } 126 } else { 127 cancelled = true; 125 128 } 126 129 } … … 130 133 /// </summary> 131 134 /// <param name="plugins"></param> 132 public void Update(IEnumerable<IPluginDescription> plugins ) {135 public void Update(IEnumerable<IPluginDescription> plugins, out bool cancelled) { 133 136 PluginInfrastructureCancelEventArgs args = new PluginInfrastructureCancelEventArgs(plugins); 134 137 OnPreUpdate(args); 135 138 if (!args.Cancel) { 139 cancelled = false; 136 140 var client = DeploymentService.UpdateServiceClientFactory.CreateClient(); 137 141 try { … … 155 159 throw new InstallationManagerException("General communication exception in connection to server.", e); 156 160 } 161 } else { 162 cancelled = true; 157 163 } 158 164 } -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerForm.Designer.cs
r5445 r6760 45 45 private void InitializeComponent() { 46 46 this.components = new System.ComponentModel.Container(); 47 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InstallationManagerForm));48 47 this.statusStrip = new System.Windows.Forms.StatusStrip(); 49 48 this.toolStripProgressBar = new System.Windows.Forms.ToolStripProgressBar(); 50 49 this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); 51 50 this.tabControl = new System.Windows.Forms.TabControl(); 52 this.updateAllPluginsTabPage = new System.Windows.Forms.TabPage();53 this.basicUpdateView = new HeuristicLab.PluginInfrastructure.Advanced.BasicUpdateView();54 51 this.localPluginsTabPage = new System.Windows.Forms.TabPage(); 55 52 this.localPluginsView = new HeuristicLab.PluginInfrastructure.Advanced.InstalledPluginsView(); … … 68 65 this.statusStrip.SuspendLayout(); 69 66 this.tabControl.SuspendLayout(); 70 this.updateAllPluginsTabPage.SuspendLayout();71 67 this.localPluginsTabPage.SuspendLayout(); 72 68 this.availablePluginsTabPage.SuspendLayout(); … … 105 101 | System.Windows.Forms.AnchorStyles.Left) 106 102 | System.Windows.Forms.AnchorStyles.Right))); 107 this.tabControl.Controls.Add(this.updateAllPluginsTabPage);108 103 this.tabControl.Controls.Add(this.localPluginsTabPage); 109 104 this.tabControl.Controls.Add(this.availablePluginsTabPage); … … 118 113 this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); 119 114 // 120 // updateAllPluginsTabPage121 //122 this.updateAllPluginsTabPage.Controls.Add(this.basicUpdateView);123 this.updateAllPluginsTabPage.Location = new System.Drawing.Point(4, 22);124 this.updateAllPluginsTabPage.Name = "updateAllPluginsTabPage";125 this.updateAllPluginsTabPage.Padding = new System.Windows.Forms.Padding(3);126 this.updateAllPluginsTabPage.Size = new System.Drawing.Size(590, 366);127 this.updateAllPluginsTabPage.TabIndex = 5;128 this.updateAllPluginsTabPage.Text = "Update Plugins";129 this.toolTip.SetToolTip(this.updateAllPluginsTabPage, "Update all installed plugins");130 this.updateAllPluginsTabPage.UseVisualStyleBackColor = true;131 //132 // basicUpdateView133 //134 this.basicUpdateView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)135 | System.Windows.Forms.AnchorStyles.Left)136 | System.Windows.Forms.AnchorStyles.Right)));137 this.basicUpdateView.InstallationManager = null;138 this.basicUpdateView.Location = new System.Drawing.Point(6, 6);139 this.basicUpdateView.Name = "basicUpdateView";140 this.basicUpdateView.PluginManager = null;141 this.basicUpdateView.Size = new System.Drawing.Size(578, 354);142 this.basicUpdateView.StatusView = null;143 this.basicUpdateView.TabIndex = 0;144 //145 115 // localPluginsTabPage 146 116 // … … 298 268 this.Controls.Add(this.statusStrip); 299 269 this.Controls.Add(this.menuStrip); 300 this.Icon = HeuristicLab.PluginInfrastructure.Resources.HeuristicLab;270 this.Icon = global::HeuristicLab.PluginInfrastructure.Resources.HeuristicLab; 301 271 this.MainMenuStrip = this.menuStrip; 302 272 this.Name = "InstallationManagerForm"; … … 305 275 this.statusStrip.PerformLayout(); 306 276 this.tabControl.ResumeLayout(false); 307 this.updateAllPluginsTabPage.ResumeLayout(false);308 277 this.localPluginsTabPage.ResumeLayout(false); 309 278 this.availablePluginsTabPage.ResumeLayout(false); … … 338 307 private EditProductsView productEditor; 339 308 private InstalledPluginsView localPluginsView; 340 private System.Windows.Forms.TabPage updateAllPluginsTabPage;341 private BasicUpdateView basicUpdateView;342 309 private System.Windows.Forms.ToolTip toolTip; 343 310 } -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerForm.cs
r5445 r6760 67 67 localPluginsView.InstallationManager = installationManager; 68 68 69 basicUpdateView.StatusView = this;70 basicUpdateView.PluginManager = pluginManager;71 basicUpdateView.InstallationManager = installationManager;72 73 69 remotePluginInstaller.StatusView = this; 74 70 remotePluginInstaller.InstallationManager = installationManager; -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstalledPluginsView.cs
r5445 r6760 116 116 select remotePlugin; 117 117 if (pluginsToUpdate.Count() > 0) { 118 installationManager.Update(pluginsToUpdate); 119 } 120 pluginManager.DiscoverAndCheckPlugins(); 118 bool cancelled; 119 installationManager.Update(pluginsToUpdate, out cancelled); 120 if (!cancelled) pluginManager.DiscoverAndCheckPlugins(); 121 } 121 122 } 122 123 -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Advanced/Util.cs
r5445 r6760 66 66 } 67 67 68 // compares for two plugins with same major and minor version if plugin1 is newer than plugin2 69 internal static bool IsNewerThan(IPluginDescription plugin1, IPluginDescription plugin2) { 70 // newer: build version is higher, or if build version is the same revision is higher 71 return plugin1.Version.Build > plugin2.Version.Build || 72 (plugin1.Version.Build == plugin2.Version.Build && plugin1.Version.Revision > plugin2.Version.Revision); 73 } 68 74 } 69 75 } -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/HeuristicLab.PluginInfrastructure-3.3.csproj
r6174 r6760 144 144 <DependentUpon>ConnectionSetupView.cs</DependentUpon> 145 145 </Compile> 146 <Compile Include="Advanced\PluginUpdaterForm.cs"> 147 <SubType>Form</SubType> 148 </Compile> 149 <Compile Include="Advanced\PluginUpdaterForm.Designer.cs"> 150 <DependentUpon>PluginUpdaterForm.cs</DependentUpon> 151 </Compile> 146 152 <Compile Include="Advanced\DeploymentService\AdminServiceClientFactory.cs" /> 147 153 <Compile Include="Advanced\DeploymentService\DeploymentServerCertificateValidator.cs" /> … … 259 265 <Compile Include="Properties\AssemblyInfo.cs" /> 260 266 <None Include="Advanced\DeploymentService\GenerateServiceClients.cmd" /> 261 <None Include="app.config" /> 267 <None Include="app.config"> 268 <SubType>Designer</SubType> 269 </None> 262 270 <None Include="HeuristicLab.snk" /> 263 271 <None Include="Properties\AssemblyInfo.frame" /> … … 308 316 <None Include="Resources\HeuristicLabLogo.png" /> 309 317 <None Include="Resources\HeuristicLabBanner.png" /> 310 < None Include="Resources\VS2008ImageLibrary_Actions_Delete.png" />318 <Content Include="Resources\UpdateAvailable.ico" /> 311 319 <Content Include="Resources\VS2008ImageLibrary_Actions_PublishToWebHS.png" /> 312 320 <Content Include="Resources\VS2008ImageLibrary_Actions_RepeatHS.png" /> -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginValidator.cs
r6021 r6760 406 406 // and sets the dependencies in the plugin descriptions 407 407 private void BuildDependencyTree(IEnumerable<PluginDescription> pluginDescriptions) { 408 foreach (var desc in pluginDescriptions ) {408 foreach (var desc in pluginDescriptions.Where(x => x.PluginState != PluginState.Disabled)) { 409 409 var missingDependencies = new List<PluginDependency>(); 410 410 foreach (var dependency in pluginDependencies[desc]) { 411 411 var matchingDescriptions = from availablePlugin in pluginDescriptions 412 where availablePlugin.PluginState != PluginState.Disabled 412 413 where availablePlugin.Name == dependency.Name 413 414 where IsCompatiblePluginVersion(availablePlugin.Version, dependency.Version) -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Properties/AssemblyInfo.frame
r6099 r6760 38 38 [assembly: AssemblyCulture("")] 39 39 [assembly: CLSCompliant(true)] 40 [assembly: InternalsVisibleTo("HeuristicLab.PluginInfrastructure-3.3.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e3d38bc66a0dd8dd36f57285e34632ec04b3049866ab1e64cf230e95ffcbfbb90c437b4d11dfe74ba981f746274290bb03f3e636e139e685b501031dc6e0bc8409153f0c842721eb9e8e2a703c9e4d102283f3ddbdfab4078c08de51869715992a694d2f608d0fa865c9d17c06b8d6a9135004e982fd862cdb2277e4ad15a4a6")] 40 41 41 42 // Setting ComVisible to false makes the types in this assembly not visible … … 55 56 // 56 57 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3. 4.$WCREV$")]58 [assembly: AssemblyFileVersion("3.3.5.$WCREV$")] -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Resources.Designer.cs
r4068 r6760 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319. 14 // Runtime Version:4.0.30319.225 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if … … 10 10 11 11 namespace HeuristicLab.PluginInfrastructure { 12 13 14 /// <summary> 15 /// A strongly-typed resource class, for looking up localized strings, etc. 16 /// </summary> 17 // This class was auto-generated by the StronglyTypedResourceBuilder 18 // class via a tool like ResGen or Visual Studio. 19 // To add or remove a member, edit your .ResX file then rerun ResGen 20 // with the /str option, or rebuild your VS project. 21 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 22 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 23 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 24 internal class Resources { 25 26 private static global::System.Resources.ResourceManager resourceMan; 27 28 private static global::System.Globalization.CultureInfo resourceCulture; 29 30 [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 31 internal Resources() { 12 using System; 13 14 15 /// <summary> 16 /// A strongly-typed resource class, for looking up localized strings, etc. 17 /// </summary> 18 // This class was auto-generated by the StronglyTypedResourceBuilder 19 // class via a tool like ResGen or Visual Studio. 20 // To add or remove a member, edit your .ResX file then rerun ResGen 21 // with the /str option, or rebuild your VS project. 22 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 internal class Resources { 26 27 private static global::System.Resources.ResourceManager resourceMan; 28 29 private static global::System.Globalization.CultureInfo resourceCulture; 30 31 [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 internal Resources() { 33 } 34 35 /// <summary> 36 /// Returns the cached ResourceManager instance used by this class. 37 /// </summary> 38 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 internal static global::System.Resources.ResourceManager ResourceManager { 40 get { 41 if (object.ReferenceEquals(resourceMan, null)) { 42 global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.PluginInfrastructure.Resources", typeof(Resources).Assembly); 43 resourceMan = temp; 44 } 45 return resourceMan; 46 } 47 } 48 49 /// <summary> 50 /// Overrides the current thread's CurrentUICulture property for all 51 /// resource lookups using this strongly typed resource class. 52 /// </summary> 53 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 internal static global::System.Globalization.CultureInfo Culture { 55 get { 56 return resourceCulture; 57 } 58 set { 59 resourceCulture = value; 60 } 61 } 62 63 internal static System.Drawing.Bitmap Add { 64 get { 65 object obj = ResourceManager.GetObject("Add", resourceCulture); 66 return ((System.Drawing.Bitmap)(obj)); 67 } 68 } 69 70 internal static System.Drawing.Bitmap ArrowUp { 71 get { 72 object obj = ResourceManager.GetObject("ArrowUp", resourceCulture); 73 return ((System.Drawing.Bitmap)(obj)); 74 } 75 } 76 77 internal static System.Drawing.Bitmap Assembly { 78 get { 79 object obj = ResourceManager.GetObject("Assembly", resourceCulture); 80 return ((System.Drawing.Bitmap)(obj)); 81 } 82 } 83 84 internal static System.Drawing.Bitmap Document { 85 get { 86 object obj = ResourceManager.GetObject("Document", resourceCulture); 87 return ((System.Drawing.Bitmap)(obj)); 88 } 89 } 90 91 internal static System.Drawing.Bitmap Error { 92 get { 93 object obj = ResourceManager.GetObject("Error", resourceCulture); 94 return ((System.Drawing.Bitmap)(obj)); 95 } 96 } 97 98 internal static System.Drawing.Icon ErrorIcon { 99 get { 100 object obj = ResourceManager.GetObject("ErrorIcon", resourceCulture); 101 return ((System.Drawing.Icon)(obj)); 102 } 103 } 104 105 internal static System.Drawing.Bitmap File { 106 get { 107 object obj = ResourceManager.GetObject("File", resourceCulture); 108 return ((System.Drawing.Bitmap)(obj)); 109 } 110 } 111 112 internal static System.Drawing.Icon HeuristicLab { 113 get { 114 object obj = ResourceManager.GetObject("HeuristicLab", resourceCulture); 115 return ((System.Drawing.Icon)(obj)); 116 } 117 } 118 119 internal static System.Drawing.Bitmap HeuristicLabBanner { 120 get { 121 object obj = ResourceManager.GetObject("HeuristicLabBanner", resourceCulture); 122 return ((System.Drawing.Bitmap)(obj)); 123 } 124 } 125 126 internal static System.Drawing.Bitmap HeuristicLabLogo { 127 get { 128 object obj = ResourceManager.GetObject("HeuristicLabLogo", resourceCulture); 129 return ((System.Drawing.Bitmap)(obj)); 130 } 131 } 132 133 internal static System.Drawing.Bitmap Install { 134 get { 135 object obj = ResourceManager.GetObject("Install", resourceCulture); 136 return ((System.Drawing.Bitmap)(obj)); 137 } 138 } 139 140 internal static System.Drawing.Bitmap Internet { 141 get { 142 object obj = ResourceManager.GetObject("Internet", resourceCulture); 143 return ((System.Drawing.Bitmap)(obj)); 144 } 145 } 146 147 /// <summary> 148 /// Looks up a localized string similar to HeuristicLab is free software: you can redistribute it and/or modify 149 ///it under the terms of the GNU General Public License as published by 150 ///the Free Software Foundation, either version 3 of the License, or 151 ///(at your option) any later version. 152 /// 153 ///HeuristicLab is distributed in the hope that it will be useful, 154 ///but WITHOUT ANY WARRANTY; without even the implied warranty of 155 ///MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 156 ///GNU General Public License for more details. 157 /// 158 ///You should have received a copy of t [rest of string was truncated]";. 159 /// </summary> 160 internal static string LicenseText { 161 get { 162 return ResourceManager.GetString("LicenseText", resourceCulture); 163 } 164 } 165 166 internal static System.Drawing.Bitmap NetworkConnections { 167 get { 168 object obj = ResourceManager.GetObject("NetworkConnections", resourceCulture); 169 return ((System.Drawing.Bitmap)(obj)); 170 } 171 } 172 173 internal static System.Drawing.Bitmap Plugin { 174 get { 175 object obj = ResourceManager.GetObject("Plugin", resourceCulture); 176 return ((System.Drawing.Bitmap)(obj)); 177 } 178 } 179 180 internal static System.Drawing.Bitmap PublishToWeb { 181 get { 182 object obj = ResourceManager.GetObject("PublishToWeb", resourceCulture); 183 return ((System.Drawing.Bitmap)(obj)); 184 } 185 } 186 187 internal static System.Drawing.Bitmap Remove { 188 get { 189 object obj = ResourceManager.GetObject("Remove", resourceCulture); 190 return ((System.Drawing.Bitmap)(obj)); 191 } 192 } 193 194 internal static System.Drawing.Bitmap Repeat { 195 get { 196 object obj = ResourceManager.GetObject("Repeat", resourceCulture); 197 return ((System.Drawing.Bitmap)(obj)); 198 } 199 } 200 201 internal static System.Drawing.Icon Setup_Install { 202 get { 203 object obj = ResourceManager.GetObject("Setup_Install", resourceCulture); 204 return ((System.Drawing.Icon)(obj)); 205 } 206 } 207 208 internal static System.Drawing.Bitmap ShowDetails { 209 get { 210 object obj = ResourceManager.GetObject("ShowDetails", resourceCulture); 211 return ((System.Drawing.Bitmap)(obj)); 212 } 213 } 214 215 internal static System.Drawing.Bitmap ShowIcons { 216 get { 217 object obj = ResourceManager.GetObject("ShowIcons", resourceCulture); 218 return ((System.Drawing.Bitmap)(obj)); 219 } 220 } 221 222 internal static System.Drawing.Icon UpdateAvailable { 223 get { 224 object obj = ResourceManager.GetObject("UpdateAvailable", resourceCulture); 225 return ((System.Drawing.Icon)(obj)); 226 } 227 } 32 228 } 33 34 /// <summary>35 /// Returns the cached ResourceManager instance used by this class.36 /// </summary>37 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]38 internal static global::System.Resources.ResourceManager ResourceManager {39 get {40 if (object.ReferenceEquals(resourceMan, null)) {41 global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.PluginInfrastructure.Resources", typeof(Resources).Assembly);42 resourceMan = temp;43 }44 return resourceMan;45 }46 }47 48 /// <summary>49 /// Overrides the current thread's CurrentUICulture property for all50 /// resource lookups using this strongly typed resource class.51 /// </summary>52 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]53 internal static global::System.Globalization.CultureInfo Culture {54 get {55 return resourceCulture;56 }57 set {58 resourceCulture = value;59 }60 }61 62 internal static System.Drawing.Bitmap Add {63 get {64 object obj = ResourceManager.GetObject("Add", resourceCulture);65 return ((System.Drawing.Bitmap)(obj));66 }67 }68 69 internal static System.Drawing.Bitmap ArrowUp {70 get {71 object obj = ResourceManager.GetObject("ArrowUp", resourceCulture);72 return ((System.Drawing.Bitmap)(obj));73 }74 }75 76 internal static System.Drawing.Bitmap Assembly {77 get {78 object obj = ResourceManager.GetObject("Assembly", resourceCulture);79 return ((System.Drawing.Bitmap)(obj));80 }81 }82 83 internal static System.Drawing.Bitmap Document {84 get {85 object obj = ResourceManager.GetObject("Document", resourceCulture);86 return ((System.Drawing.Bitmap)(obj));87 }88 }89 90 internal static System.Drawing.Bitmap Error {91 get {92 object obj = ResourceManager.GetObject("Error", resourceCulture);93 return ((System.Drawing.Bitmap)(obj));94 }95 }96 97 internal static System.Drawing.Icon ErrorIcon {98 get {99 object obj = ResourceManager.GetObject("ErrorIcon", resourceCulture);100 return ((System.Drawing.Icon)(obj));101 }102 }103 104 internal static System.Drawing.Bitmap File {105 get {106 object obj = ResourceManager.GetObject("File", resourceCulture);107 return ((System.Drawing.Bitmap)(obj));108 }109 }110 111 internal static System.Drawing.Icon HeuristicLab {112 get {113 object obj = ResourceManager.GetObject("HeuristicLab", resourceCulture);114 return ((System.Drawing.Icon)(obj));115 }116 }117 118 internal static System.Drawing.Bitmap HeuristicLabBanner {119 get {120 object obj = ResourceManager.GetObject("HeuristicLabBanner", resourceCulture);121 return ((System.Drawing.Bitmap)(obj));122 }123 }124 125 internal static System.Drawing.Bitmap HeuristicLabLogo {126 get {127 object obj = ResourceManager.GetObject("HeuristicLabLogo", resourceCulture);128 return ((System.Drawing.Bitmap)(obj));129 }130 }131 132 internal static System.Drawing.Bitmap Install {133 get {134 object obj = ResourceManager.GetObject("Install", resourceCulture);135 return ((System.Drawing.Bitmap)(obj));136 }137 }138 139 internal static System.Drawing.Bitmap Internet {140 get {141 object obj = ResourceManager.GetObject("Internet", resourceCulture);142 return ((System.Drawing.Bitmap)(obj));143 }144 }145 146 /// <summary>147 /// Looks up a localized string similar to HeuristicLab is free software: you can redistribute it and/or modify148 ///it under the terms of the GNU General Public License as published by149 ///the Free Software Foundation, either version 3 of the License, or150 ///(at your option) any later version.151 ///152 ///HeuristicLab is distributed in the hope that it will be useful,153 ///but WITHOUT ANY WARRANTY; without even the implied warranty of154 ///MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the155 ///GNU General Public License for more details.156 ///157 ///You should have received a copy of t [rest of string was truncated]";.158 /// </summary>159 internal static string LicenseText {160 get {161 return ResourceManager.GetString("LicenseText", resourceCulture);162 }163 }164 165 internal static System.Drawing.Bitmap NetworkConnections {166 get {167 object obj = ResourceManager.GetObject("NetworkConnections", resourceCulture);168 return ((System.Drawing.Bitmap)(obj));169 }170 }171 172 internal static System.Drawing.Bitmap Plugin {173 get {174 object obj = ResourceManager.GetObject("Plugin", resourceCulture);175 return ((System.Drawing.Bitmap)(obj));176 }177 }178 179 internal static System.Drawing.Bitmap PublishToWeb {180 get {181 object obj = ResourceManager.GetObject("PublishToWeb", resourceCulture);182 return ((System.Drawing.Bitmap)(obj));183 }184 }185 186 internal static System.Drawing.Bitmap Remove {187 get {188 object obj = ResourceManager.GetObject("Remove", resourceCulture);189 return ((System.Drawing.Bitmap)(obj));190 }191 }192 193 internal static System.Drawing.Bitmap Repeat {194 get {195 object obj = ResourceManager.GetObject("Repeat", resourceCulture);196 return ((System.Drawing.Bitmap)(obj));197 }198 }199 200 internal static System.Drawing.Icon Setup_Install {201 get {202 object obj = ResourceManager.GetObject("Setup_Install", resourceCulture);203 return ((System.Drawing.Icon)(obj));204 }205 }206 207 internal static System.Drawing.Bitmap ShowDetails {208 get {209 object obj = ResourceManager.GetObject("ShowDetails", resourceCulture);210 return ((System.Drawing.Bitmap)(obj));211 }212 }213 214 internal static System.Drawing.Bitmap ShowIcons {215 get {216 object obj = ResourceManager.GetObject("ShowIcons", resourceCulture);217 return ((System.Drawing.Bitmap)(obj));218 }219 }220 }221 229 } -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Resources.resx
r3831 r6760 113 113 </resheader> 114 114 <resheader name="reader"> 115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 116 116 </resheader> 117 117 <resheader name="writer"> 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />120 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 121 121 <data name="Add" type="System.Resources.ResXFileRef, System.Windows.Forms"> 122 122 <value>Resources\VS2008ImageLibrary_CommonElements_Actions_Add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> … … 194 194 <value>Resources\show_icons.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 195 195 </data> 196 <data name="UpdateAvailable" type="System.Resources.ResXFileRef, System.Windows.Forms"> 197 <value>resources\updateavailable.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 198 </data> 196 199 </root> -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs
r6174 r6760 132 132 } 133 133 134 /// <summary>135 /// Loads raw assemblies dynamically from a byte array136 /// </summary>137 /// <param name="assemblies">bytearray of all raw assemblies that should be loaded</param>138 internal void LoadAssemblies(IEnumerable<byte[]> assemblies) {139 foreach (byte[] asm in assemblies) {140 Assembly loadedAsm = Assembly.Load(asm);141 RegisterLoadedAssembly(loadedAsm);142 }143 }144 145 134 // register assembly in the assembly cache for the AssemblyResolveEvent 146 135 private void RegisterLoadedAssembly(Assembly asm) { -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Sandboxing/SandboxManager.cs
r6174 r6760 25 25 using System.Security.Permissions; 26 26 using HeuristicLab.PluginInfrastructure.Manager; 27 using System.IO; 27 28 28 29 namespace HeuristicLab.PluginInfrastructure.Sandboxing { … … 67 68 pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode)); 68 69 pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter)); 69 pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlAppDomain));70 70 //needed for HeuristicLab.Persistence, see DynamicMethod Constructor (String, Type, array<Type []()>[], Type, Boolean) 71 71 pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlEvidence)); 72 73 ReflectionPermission refPerm = new ReflectionPermission(PermissionState.Unrestricted); 74 pSet.AddPermission(refPerm); 72 pSet.AddPermission(new ReflectionPermission(PermissionState.Unrestricted)); 75 73 76 74 FileIOPermission ioPerm = new FileIOPermission(PermissionState.None); 77 75 //allow path discovery for system drive, needed by HeuristicLab.Persistence: Serializer.BuildTypeCache() -> Assembly.CodeBase 78 ioPerm.AddPathList(FileIOPermissionAccess.PathDiscovery, Environment.SystemDirectory.Substring(0, 3));76 ioPerm.AddPathList(FileIOPermissionAccess.PathDiscovery, Path.GetPathRoot(Path.GetFullPath(Environment.SystemDirectory))); 79 77 //allow full access to the appdomain's base directory 80 78 ioPerm.AddPathList(FileIOPermissionAccess.AllAccess, applicationBase); -
branches/PersistenceSpeedUp/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs
r5445 r6760 29 29 using HeuristicLab.PluginInfrastructure.Advanced; 30 30 using HeuristicLab.PluginInfrastructure.Manager; 31 using System.Threading.Tasks; 31 32 32 33 namespace HeuristicLab.PluginInfrastructure.Starter { … … 36 37 /// </summary> 37 38 public partial class StarterForm : Form { 39 private const string pluginManagerItemName = "Plugin Manager"; 40 private const string updatePluginsItemName = "Updates Available"; 41 38 42 39 43 private ListViewItem pluginManagerListViewItem; … … 41 45 private PluginManager pluginManager; 42 46 private SplashScreen splashScreen; 43 47 private bool updatesAvailable = false; 44 48 /// <summary> 45 49 /// Initializes an instance of the starter form. … … 50 54 InitializeComponent(); 51 55 largeImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.HeuristicLab.ToBitmap()); 56 largeImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.UpdateAvailable.ToBitmap()); 52 57 smallImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.HeuristicLab.ToBitmap()); 58 smallImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.UpdateAvailable.ToBitmap()); 53 59 FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location); 54 60 Text = "HeuristicLab " + pluginInfrastructureVersion.FileVersion; … … 61 67 pluginManager.DiscoverAndCheckPlugins(); 62 68 UpdateApplicationsList(); 69 70 CheckUpdatesAvailableAsync(); 71 } 72 73 private void CheckUpdatesAvailableAsync() { 74 string pluginPath = Path.GetFullPath(Application.StartupPath); 75 var task = Task.Factory.StartNew<bool>(() => { 76 var installationManager = new InstallationManager(pluginPath); 77 IEnumerable<IPluginDescription> installedPlugins = pluginManager.Plugins.OfType<IPluginDescription>(); 78 var remotePlugins = installationManager.GetRemotePluginList(); 79 // if there is a local plugin with same name and same major and minor version then it's an update 80 var pluginsToUpdate = from remotePlugin in remotePlugins 81 let matchingLocalPlugins = from installedPlugin in installedPlugins 82 where installedPlugin.Name == remotePlugin.Name 83 where installedPlugin.Version.Major == remotePlugin.Version.Major 84 where installedPlugin.Version.Minor == remotePlugin.Version.Minor 85 where Util.IsNewerThan(remotePlugin, installedPlugin) 86 select installedPlugin 87 where matchingLocalPlugins.Count() > 0 88 select remotePlugin; 89 return pluginsToUpdate.Count() > 0; 90 }); 91 task.ContinueWith(t => { 92 try { 93 t.Wait(); 94 updatesAvailable = t.Result; 95 UpdateApplicationsList(); 96 } 97 catch (AggregateException ae) { 98 ae.Handle(ex => { 99 if (ex is InstallationManagerException) { 100 // this is expected when no internet connection is available => do nothing 101 return true; 102 } else { 103 return false; 104 } 105 }); 106 } 107 }); 63 108 } 64 109 … … 85 130 if (applicationsListView.SelectedItems.Count > 0) { 86 131 ListViewItem selected = applicationsListView.SelectedItems[0]; 87 if (selected == pluginManagerListViewItem) {132 if (selected.Text == pluginManagerItemName) { 88 133 if (pluginManager.Plugins.Any(x => x.PluginState == PluginState.Loaded)) { 89 134 MessageBox.Show("Installation Manager cannot be started while another HeuristicLab application is active." + Environment.NewLine + … … 102 147 } 103 148 } 149 } else if (selected.Text == updatePluginsItemName) { 150 if (pluginManager.Plugins.Any(x => x.PluginState == PluginState.Loaded)) { 151 MessageBox.Show("Updating is not possible while another HeuristicLab application is active." + Environment.NewLine + 152 "Please stop all active HeuristicLab applications and try again.", "Update plugins", 153 MessageBoxButtons.OK, MessageBoxIcon.Information); 154 } else { 155 try { 156 Cursor = Cursors.AppStarting; 157 using (PluginUpdaterForm form = new PluginUpdaterForm(pluginManager)) { 158 form.ShowDialog(this); 159 } 160 updatesAvailable = false; 161 CheckUpdatesAvailableAsync(); 162 UpdateApplicationsList(); 163 } 164 finally { 165 Cursor = Cursors.Arrow; 166 } 167 } 104 168 } else { 105 169 ApplicationDescription app = (ApplicationDescription)applicationsListView.SelectedItems[0].Tag; … … 110 174 111 175 private void UpdateApplicationsList() { 112 applicationsListView.Items.Clear(); 176 if (InvokeRequired) Invoke((Action)UpdateApplicationsList); 177 else { 178 applicationsListView.Items.Clear(); 179 AddPluginManagerItem(); 180 AddUpdatePluginsItem(); 181 182 foreach (ApplicationDescription info in pluginManager.Applications) { 183 ListViewItem item = new ListViewItem(info.Name, 0); 184 item.Tag = info; 185 item.Group = applicationsListView.Groups["Applications"]; 186 item.SubItems.Add(new ListViewItem.ListViewSubItem(item, info.Version.ToString())); 187 item.SubItems.Add(new ListViewItem.ListViewSubItem(item, info.Description)); 188 item.ToolTipText = info.Description; 189 applicationsListView.Items.Add(item); 190 } 191 foreach (ColumnHeader column in applicationsListView.Columns) { 192 if (applicationsListView.Items.Count > 0) 193 column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); 194 else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); 195 } 196 } 197 } 198 199 private void AddPluginManagerItem() { 113 200 FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location); 114 pluginManagerListViewItem = new ListViewItem( "Plugin Manager", 0);201 pluginManagerListViewItem = new ListViewItem(pluginManagerItemName, 0); 115 202 pluginManagerListViewItem.Group = applicationsListView.Groups["Plugin Management"]; 116 203 pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, pluginInfrastructureVersion.FileVersion)); … … 119 206 120 207 applicationsListView.Items.Add(pluginManagerListViewItem); 121 122 foreach (ApplicationDescription info in pluginManager.Applications) { 123 ListViewItem item = new ListViewItem(info.Name, 0); 124 item.Tag = info; 125 item.Group = applicationsListView.Groups["Applications"]; 126 item.SubItems.Add(new ListViewItem.ListViewSubItem(item, info.Version.ToString())); 127 item.SubItems.Add(new ListViewItem.ListViewSubItem(item, info.Description)); 128 item.ToolTipText = info.Description; 129 applicationsListView.Items.Add(item); 130 } 131 foreach (ColumnHeader column in applicationsListView.Columns) { 132 if (applicationsListView.Items.Count > 0) 133 column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); 134 else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); 208 } 209 210 private void AddUpdatePluginsItem() { 211 if (updatesAvailable) { 212 var updateListViewItem = new ListViewItem(updatePluginsItemName, 1); 213 updateListViewItem.Group = applicationsListView.Groups["Plugin Management"]; 214 updateListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(updateListViewItem, "")); 215 updateListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(updateListViewItem, "Download and install updates")); 216 updateListViewItem.ToolTipText = "Download and install updates"; 217 218 applicationsListView.Items.Add(updateListViewItem); 135 219 } 136 220 }
Note: See TracChangeset
for help on using the changeset viewer.