Changeset 3608
- Timestamp:
- 05/04/10 16:37:10 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.PluginInfrastructure
- Files:
-
- 3 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/InstallationManagerForm.Designer.cs
r3600 r3608 181 181 // remotePluginInstaller 182 182 // 183 this.remotePluginInstaller.AllPlugins = new HeuristicLab.PluginInfrastructure.IPluginDescription[0];184 183 this.remotePluginInstaller.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 185 184 | System.Windows.Forms.AnchorStyles.Left) … … 188 187 this.remotePluginInstaller.Location = new System.Drawing.Point(6, 6); 189 188 this.remotePluginInstaller.Name = "remotePluginInstaller"; 190 this.remotePluginInstaller.NewPlugins = new HeuristicLab.PluginInfrastructure.IPluginDescription[0];191 189 this.remotePluginInstaller.PluginManager = null; 192 this.remotePluginInstaller.Products = new HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription[0];193 this.remotePluginInstaller.ShowAllPlugins = false;194 190 this.remotePluginInstaller.Size = new System.Drawing.Size(578, 354); 195 191 this.remotePluginInstaller.StatusView = null; -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/LocalPluginsView.Designer.cs
r3573 r3608 55 55 this.descriptionHeader = new System.Windows.Forms.ColumnHeader(); 56 56 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 57 this.pluginImageList = new System.Windows.Forms.ImageList(this.components); 57 58 this.SuspendLayout(); 58 59 // … … 107 108 this.localPluginsListView.Name = "localPluginsListView"; 108 109 this.localPluginsListView.Size = new System.Drawing.Size(539, 477); 110 this.localPluginsListView.SmallImageList = this.pluginImageList; 109 111 this.localPluginsListView.SuppressItemCheckedEvents = false; 110 112 this.localPluginsListView.TabIndex = 13; … … 128 130 this.descriptionHeader.Text = "Description"; 129 131 this.descriptionHeader.Width = 245; 132 // 133 // pluginImageList 134 // 135 this.pluginImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; 136 this.pluginImageList.ImageSize = new System.Drawing.Size(16, 16); 137 this.pluginImageList.TransparentColor = System.Drawing.Color.Transparent; 130 138 // 131 139 // LocalPluginsView … … 151 159 private System.Windows.Forms.ColumnHeader descriptionHeader; 152 160 private System.Windows.Forms.ToolTip toolTip; 161 private System.Windows.Forms.ImageList pluginImageList; 153 162 // private LocalPluginManagerView localPluginManagerView; 154 163 } -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/LocalPluginsView.cs
r3600 r3608 63 63 enabledPluginsGroup = localPluginsListView.Groups["activePluginsGroup"]; 64 64 disabledPluginsGroup = localPluginsListView.Groups["disabledPluginsGroup"]; 65 65 pluginImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.plugin_16); 66 66 removePluginsBackgroundWorker = new BackgroundWorker(); 67 67 removePluginsBackgroundWorker.DoWork += new DoWorkEventHandler(removePluginsBackgroundWorker_DoWork); … … 171 171 ListViewItem item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), plugin.Description }); 172 172 item.Tag = plugin; 173 item.ImageIndex = 0; 173 174 return item; 174 175 } -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/LocalPluginsView.resx
r3573 r3608 121 121 <value>17, 17</value> 122 122 </metadata> 123 <metadata name="pluginImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 <value>107, 17</value> 125 </metadata> 123 126 </root> -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/PluginEditor.Designer.cs
r3573 r3608 54 54 this.descriptionHeader = new System.Windows.Forms.ColumnHeader(); 55 55 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 56 this.pluginImageList = new System.Windows.Forms.ImageList(this.components); 56 57 this.SuspendLayout(); 57 58 // … … 99 100 this.listView.Name = "listView"; 100 101 this.listView.Size = new System.Drawing.Size(539, 476); 102 this.listView.SmallImageList = this.pluginImageList; 101 103 this.listView.SuppressItemCheckedEvents = false; 102 104 this.listView.TabIndex = 8; … … 126 128 this.descriptionHeader.Width = 335; 127 129 // 130 // pluginImageList 131 // 132 this.pluginImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; 133 this.pluginImageList.ImageSize = new System.Drawing.Size(16, 16); 134 this.pluginImageList.TransparentColor = System.Drawing.Color.Transparent; 135 // 128 136 // PluginEditor 129 137 // … … 149 157 private System.Windows.Forms.ColumnHeader descriptionHeader; 150 158 private System.Windows.Forms.ToolTip toolTip; 159 private System.Windows.Forms.ImageList pluginImageList; 151 160 } 152 161 } -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/PluginEditor.cs
r3600 r3608 42 42 public PluginManager PluginManager { 43 43 get { return pluginManager; } 44 set { 45 // if (value == null) throw new ArgumentNullException(); 46 pluginManager = value; 47 } 44 set { pluginManager = value; } 48 45 } 49 46 50 47 public PluginEditor() { 51 48 InitializeComponent(); 52 // Caption = "Upload Plugins"; 53 49 pluginImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.plugin_16); 54 50 localAndServerPlugins = new Dictionary<IPluginDescription, IPluginDescription>(); 55 51 … … 262 258 } 263 259 item.Tag = plugin; 260 item.ImageIndex = 0; 264 261 item.Checked = false; 265 262 return item; -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/PluginEditor.resx
r3573 r3608 121 121 <value>17, 17</value> 122 122 </metadata> 123 <metadata name="pluginImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 <value>107, 17</value> 125 </metadata> 123 126 </root> -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/PluginView.cs
r3600 r3608 55 55 56 56 private void PopulateImageList() { 57 pluginsImageList.Images.Add(IMAGE_KEY_PLUGIN, HeuristicLab.PluginInfrastructure.Resources.Resources. Install);57 pluginsImageList.Images.Add(IMAGE_KEY_PLUGIN, HeuristicLab.PluginInfrastructure.Resources.Resources.plugin_16); 58 58 filesImageList.Images.Add(IMAGE_KEY_ASSEMBLY, HeuristicLab.PluginInfrastructure.Resources.Resources.Assembly); 59 59 filesImageList.Images.Add(IMAGE_KEY_FILE, HeuristicLab.PluginInfrastructure.Resources.Resources.File); -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/ProductEditor.cs
r3547 r3608 42 42 InitializeComponent(); 43 43 44 productImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources. Assembly);44 productImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.Setup_Install); 45 45 productImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.ArrowUp); 46 pluginImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources. Assembly);46 pluginImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.plugin_16); 47 47 48 48 dirtyProducts = new HashSet<DeploymentService.ProductDescription>(); -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/RemotePluginInstaller.Designer.cs
r3547 r3608 44 44 /// </summary> 45 45 private void InitializeComponent() { 46 System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("Products", System.Windows.Forms.HorizontalAlignment.Left); 47 System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("New Plugins", System.Windows.Forms.HorizontalAlignment.Left); 48 System.Windows.Forms.ListViewGroup listViewGroup3 = new System.Windows.Forms.ListViewGroup("All Plugins", System.Windows.Forms.HorizontalAlignment.Left); 49 this.remotePluginsListView = new HeuristicLab.PluginInfrastructure.Advanced.MultiSelectListView(); 46 this.components = new System.ComponentModel.Container(); 47 this.pluginsListView = new HeuristicLab.PluginInfrastructure.Advanced.MultiSelectListView(); 50 48 this.nameHeader = new System.Windows.Forms.ColumnHeader(); 51 49 this.versionHeader = new System.Windows.Forms.ColumnHeader(); 52 50 this.descriptionHeader = new System.Windows.Forms.ColumnHeader(); 51 this.pluginsImageList = new System.Windows.Forms.ImageList(this.components); 53 52 this.refreshButton = new System.Windows.Forms.Button(); 54 this.installButton = new System.Windows.Forms.Button(); 53 this.installPluginsButton = new System.Windows.Forms.Button(); 54 this.productsListView = new System.Windows.Forms.ListView(); 55 this.productNameHeader = new System.Windows.Forms.ColumnHeader(); 56 this.productVersionHeader = new System.Windows.Forms.ColumnHeader(); 57 this.productLargeImageList = new System.Windows.Forms.ImageList(this.components); 58 this.productImageList = new System.Windows.Forms.ImageList(this.components); 59 this.productsGroupBox = new System.Windows.Forms.GroupBox(); 60 this.showDetailsButton = new System.Windows.Forms.RadioButton(); 61 this.showLargeIconsButton = new System.Windows.Forms.RadioButton(); 62 this.installProductsButton = new System.Windows.Forms.Button(); 63 this.pluginsGroupBox = new System.Windows.Forms.GroupBox(); 64 this.splitContainer = new System.Windows.Forms.SplitContainer(); 65 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 66 this.productsGroupBox.SuspendLayout(); 67 this.pluginsGroupBox.SuspendLayout(); 68 this.splitContainer.Panel1.SuspendLayout(); 69 this.splitContainer.Panel2.SuspendLayout(); 70 this.splitContainer.SuspendLayout(); 55 71 this.SuspendLayout(); 56 72 // 57 // remotePluginsListView58 // 59 this. remotePluginsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)60 | System.Windows.Forms.AnchorStyles.Left) 61 | System.Windows.Forms.AnchorStyles.Right))); 62 this. remotePluginsListView.CheckBoxes = true;63 this. remotePluginsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {73 // pluginsListView 74 // 75 this.pluginsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 76 | System.Windows.Forms.AnchorStyles.Left) 77 | System.Windows.Forms.AnchorStyles.Right))); 78 this.pluginsListView.CheckBoxes = true; 79 this.pluginsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 64 80 this.nameHeader, 65 81 this.versionHeader, 66 82 this.descriptionHeader}); 67 listViewGroup1.Header = "Products"; 68 listViewGroup1.Name = "productsGroup"; 69 listViewGroup2.Header = "New Plugins"; 70 listViewGroup2.Name = "newPluginsGroup"; 71 listViewGroup3.Header = "All Plugins"; 72 listViewGroup3.Name = "allPluginsGroup"; 73 this.remotePluginsListView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { 74 listViewGroup1, 75 listViewGroup2, 76 listViewGroup3}); 77 this.remotePluginsListView.Location = new System.Drawing.Point(0, 0); 78 this.remotePluginsListView.Name = "remotePluginsListView"; 79 this.remotePluginsListView.Size = new System.Drawing.Size(533, 527); 80 this.remotePluginsListView.SuppressItemCheckedEvents = false; 81 this.remotePluginsListView.TabIndex = 0; 82 this.remotePluginsListView.UseCompatibleStateImageBehavior = false; 83 this.remotePluginsListView.View = System.Windows.Forms.View.Details; 84 this.remotePluginsListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.remotePluginsListView_ItemChecked); 83 this.pluginsListView.Location = new System.Drawing.Point(6, 19); 84 this.pluginsListView.Name = "pluginsListView"; 85 this.pluginsListView.ShowGroups = false; 86 this.pluginsListView.Size = new System.Drawing.Size(259, 496); 87 this.pluginsListView.SmallImageList = this.pluginsImageList; 88 this.pluginsListView.SuppressItemCheckedEvents = false; 89 this.pluginsListView.TabIndex = 0; 90 this.pluginsListView.UseCompatibleStateImageBehavior = false; 91 this.pluginsListView.View = System.Windows.Forms.View.Details; 92 this.pluginsListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.remotePluginsListView_ItemChecked); 85 93 // 86 94 // nameHeader … … 99 107 this.descriptionHeader.Width = 250; 100 108 // 109 // pluginsImageList 110 // 111 this.pluginsImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; 112 this.pluginsImageList.ImageSize = new System.Drawing.Size(16, 16); 113 this.pluginsImageList.TransparentColor = System.Drawing.Color.Transparent; 114 // 101 115 // refreshButton 102 116 // 103 this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));104 117 this.refreshButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.VS2008ImageLibrary_Objects_Internet; 105 this.refreshButton.Location = new System.Drawing.Point( 0, 533);118 this.refreshButton.Location = new System.Drawing.Point(6, 19); 106 119 this.refreshButton.Name = "refreshButton"; 107 120 this.refreshButton.Size = new System.Drawing.Size(72, 25); … … 109 122 this.refreshButton.Text = "Refresh"; 110 123 this.refreshButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 124 this.toolTip.SetToolTip(this.refreshButton, "Refresh available products from HeuristicLab deployment service"); 111 125 this.refreshButton.UseVisualStyleBackColor = true; 112 126 this.refreshButton.Click += new System.EventHandler(this.refreshRemoteButton_Click); 113 127 // 114 // installButton 115 // 116 this.installButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 117 this.installButton.Enabled = false; 118 this.installButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.VS2008ImageLibrary_Objects_Install; 119 this.installButton.Location = new System.Drawing.Point(78, 533); 120 this.installButton.Name = "installButton"; 121 this.installButton.Size = new System.Drawing.Size(140, 25); 122 this.installButton.TabIndex = 17; 123 this.installButton.Text = "Install Selected Items"; 124 this.installButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 125 this.installButton.UseVisualStyleBackColor = true; 126 this.installButton.Click += new System.EventHandler(this.installButton_Click); 128 // installPluginsButton 129 // 130 this.installPluginsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 131 this.installPluginsButton.Enabled = false; 132 this.installPluginsButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.VS2008ImageLibrary_Objects_Install; 133 this.installPluginsButton.Location = new System.Drawing.Point(6, 521); 134 this.installPluginsButton.Name = "installPluginsButton"; 135 this.installPluginsButton.Size = new System.Drawing.Size(140, 25); 136 this.installPluginsButton.TabIndex = 17; 137 this.installPluginsButton.Text = "Install Selected Plugins"; 138 this.installPluginsButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 139 this.toolTip.SetToolTip(this.installPluginsButton, "Install only checked plugins"); 140 this.installPluginsButton.UseVisualStyleBackColor = true; 141 this.installPluginsButton.Click += new System.EventHandler(this.installPluginsButton_Click); 142 // 143 // productsListView 144 // 145 this.productsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 146 | System.Windows.Forms.AnchorStyles.Left) 147 | System.Windows.Forms.AnchorStyles.Right))); 148 this.productsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 149 this.productNameHeader, 150 this.productVersionHeader}); 151 this.productsListView.HideSelection = false; 152 this.productsListView.LargeImageList = this.productLargeImageList; 153 this.productsListView.Location = new System.Drawing.Point(6, 50); 154 this.productsListView.MultiSelect = false; 155 this.productsListView.Name = "productsListView"; 156 this.productsListView.ShowGroups = false; 157 this.productsListView.Size = new System.Drawing.Size(234, 465); 158 this.productsListView.SmallImageList = this.productImageList; 159 this.productsListView.TabIndex = 18; 160 this.productsListView.UseCompatibleStateImageBehavior = false; 161 this.productsListView.View = System.Windows.Forms.View.Details; 162 this.productsListView.SelectedIndexChanged += new System.EventHandler(this.productsListView_SelectedIndexChanged); 163 // 164 // productNameHeader 165 // 166 this.productNameHeader.Text = "Name"; 167 // 168 // productVersionHeader 169 // 170 this.productVersionHeader.Text = "Version"; 171 // 172 // productLargeImageList 173 // 174 this.productLargeImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; 175 this.productLargeImageList.ImageSize = new System.Drawing.Size(32, 32); 176 this.productLargeImageList.TransparentColor = System.Drawing.Color.Transparent; 177 // 178 // productImageList 179 // 180 this.productImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; 181 this.productImageList.ImageSize = new System.Drawing.Size(16, 16); 182 this.productImageList.TransparentColor = System.Drawing.Color.Transparent; 183 // 184 // productsGroupBox 185 // 186 this.productsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 187 | System.Windows.Forms.AnchorStyles.Left) 188 | System.Windows.Forms.AnchorStyles.Right))); 189 this.productsGroupBox.Controls.Add(this.showDetailsButton); 190 this.productsGroupBox.Controls.Add(this.showLargeIconsButton); 191 this.productsGroupBox.Controls.Add(this.installProductsButton); 192 this.productsGroupBox.Controls.Add(this.refreshButton); 193 this.productsGroupBox.Controls.Add(this.productsListView); 194 this.productsGroupBox.Location = new System.Drawing.Point(3, 3); 195 this.productsGroupBox.Name = "productsGroupBox"; 196 this.productsGroupBox.Size = new System.Drawing.Size(246, 552); 197 this.productsGroupBox.TabIndex = 19; 198 this.productsGroupBox.TabStop = false; 199 this.productsGroupBox.Text = "Products"; 200 // 201 // showDetailsButton 202 // 203 this.showDetailsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 204 this.showDetailsButton.Appearance = System.Windows.Forms.Appearance.Button; 205 this.showDetailsButton.Checked = true; 206 this.showDetailsButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.show_details; 207 this.showDetailsButton.Location = new System.Drawing.Point(215, 19); 208 this.showDetailsButton.Name = "showDetailsButton"; 209 this.showDetailsButton.Size = new System.Drawing.Size(25, 25); 210 this.showDetailsButton.TabIndex = 22; 211 this.showDetailsButton.TabStop = true; 212 this.toolTip.SetToolTip(this.showDetailsButton, "Show Details"); 213 this.showDetailsButton.UseVisualStyleBackColor = true; 214 this.showDetailsButton.CheckedChanged += new System.EventHandler(this.showDetailsButton_CheckedChanged); 215 // 216 // showLargeIconsButton 217 // 218 this.showLargeIconsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 219 this.showLargeIconsButton.Appearance = System.Windows.Forms.Appearance.Button; 220 this.showLargeIconsButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.show_icons; 221 this.showLargeIconsButton.Location = new System.Drawing.Point(184, 19); 222 this.showLargeIconsButton.Name = "showLargeIconsButton"; 223 this.showLargeIconsButton.Size = new System.Drawing.Size(25, 25); 224 this.showLargeIconsButton.TabIndex = 21; 225 this.toolTip.SetToolTip(this.showLargeIconsButton, "Show Large Icons"); 226 this.showLargeIconsButton.UseVisualStyleBackColor = true; 227 this.showLargeIconsButton.CheckedChanged += new System.EventHandler(this.showLargeIconsButton_CheckedChanged); 228 // 229 // installProductsButton 230 // 231 this.installProductsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 232 this.installProductsButton.Enabled = false; 233 this.installProductsButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.VS2008ImageLibrary_Objects_Install; 234 this.installProductsButton.Location = new System.Drawing.Point(6, 521); 235 this.installProductsButton.Name = "installProductsButton"; 236 this.installProductsButton.Size = new System.Drawing.Size(146, 25); 237 this.installProductsButton.TabIndex = 20; 238 this.installProductsButton.Text = "Install Selected Product"; 239 this.installProductsButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 240 this.toolTip.SetToolTip(this.installProductsButton, "Install all plugins for the selected product"); 241 this.installProductsButton.UseVisualStyleBackColor = true; 242 this.installProductsButton.Click += new System.EventHandler(this.installProductsButton_Click); 243 // 244 // pluginsGroupBox 245 // 246 this.pluginsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 247 | System.Windows.Forms.AnchorStyles.Left) 248 | System.Windows.Forms.AnchorStyles.Right))); 249 this.pluginsGroupBox.Controls.Add(this.pluginsListView); 250 this.pluginsGroupBox.Controls.Add(this.installPluginsButton); 251 this.pluginsGroupBox.Location = new System.Drawing.Point(3, 3); 252 this.pluginsGroupBox.Name = "pluginsGroupBox"; 253 this.pluginsGroupBox.Size = new System.Drawing.Size(271, 552); 254 this.pluginsGroupBox.TabIndex = 20; 255 this.pluginsGroupBox.TabStop = false; 256 this.pluginsGroupBox.Text = "Plugins"; 257 // 258 // splitContainer 259 // 260 this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 261 | System.Windows.Forms.AnchorStyles.Left) 262 | System.Windows.Forms.AnchorStyles.Right))); 263 this.splitContainer.Location = new System.Drawing.Point(0, 0); 264 this.splitContainer.Name = "splitContainer"; 265 // 266 // splitContainer.Panel1 267 // 268 this.splitContainer.Panel1.Controls.Add(this.productsGroupBox); 269 // 270 // splitContainer.Panel2 271 // 272 this.splitContainer.Panel2.Controls.Add(this.pluginsGroupBox); 273 this.splitContainer.Size = new System.Drawing.Size(533, 558); 274 this.splitContainer.SplitterDistance = 252; 275 this.splitContainer.TabIndex = 21; 127 276 // 128 277 // RemotePluginInstallerView … … 130 279 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 131 280 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 132 this.Controls.Add(this.refreshButton); 133 this.Controls.Add(this.installButton); 134 this.Controls.Add(this.remotePluginsListView); 281 this.Controls.Add(this.splitContainer); 135 282 this.Name = "RemotePluginInstallerView"; 136 283 this.Size = new System.Drawing.Size(533, 558); 284 this.productsGroupBox.ResumeLayout(false); 285 this.pluginsGroupBox.ResumeLayout(false); 286 this.splitContainer.Panel1.ResumeLayout(false); 287 this.splitContainer.Panel2.ResumeLayout(false); 288 this.splitContainer.ResumeLayout(false); 137 289 this.ResumeLayout(false); 138 290 … … 141 293 #endregion 142 294 143 private MultiSelectListView remotePluginsListView;295 private MultiSelectListView pluginsListView; 144 296 private System.Windows.Forms.ColumnHeader nameHeader; 145 297 private System.Windows.Forms.ColumnHeader versionHeader; 146 298 private System.Windows.Forms.ColumnHeader descriptionHeader; 147 299 private System.Windows.Forms.Button refreshButton; 148 private System.Windows.Forms.Button installButton; 300 private System.Windows.Forms.Button installPluginsButton; 301 private System.Windows.Forms.ListView productsListView; 302 private System.Windows.Forms.GroupBox productsGroupBox; 303 private System.Windows.Forms.GroupBox pluginsGroupBox; 304 private System.Windows.Forms.SplitContainer splitContainer; 305 private System.Windows.Forms.Button installProductsButton; 306 private System.Windows.Forms.ColumnHeader productNameHeader; 307 private System.Windows.Forms.ColumnHeader productVersionHeader; 308 private System.Windows.Forms.ImageList productImageList; 309 private System.Windows.Forms.ImageList pluginsImageList; 310 private System.Windows.Forms.RadioButton showDetailsButton; 311 private System.Windows.Forms.RadioButton showLargeIconsButton; 312 private System.Windows.Forms.ToolTip toolTip; 313 private System.Windows.Forms.ImageList productLargeImageList; 149 314 } 150 315 } -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/RemotePluginInstaller.cs
r3600 r3608 43 43 private BackgroundWorker updateOrInstallPluginsBackgroundWorker; 44 44 45 private ListViewGroup newPluginsGroup;46 private ListViewGroup productsGroup;47 private ListViewGroup allPluginsGroup;48 49 private bool showAllPlugins;50 public bool ShowAllPlugins {51 get { return showAllPlugins; }52 set {53 if (value != showAllPlugins) {54 showAllPlugins = value;55 UpdateControl();56 }57 }58 }59 60 45 private IEnumerable<DeploymentService.ProductDescription> products; 61 public IEnumerable<DeploymentService.ProductDescription> Products {62 get { return products ?? Enumerable.Empty<DeploymentService.ProductDescription>(); }63 set {64 if (value != this.products) {65 this.products = value;66 UpdateControl();67 }68 }69 }70 71 46 private IEnumerable<IPluginDescription> plugins; 72 public IEnumerable<IPluginDescription> AllPlugins { 73 get { return plugins ?? Enumerable.Empty<IPluginDescription>(); } 74 set { 75 if (value != this.plugins) { 76 this.plugins = value; 77 UpdateControl(); 78 } 79 } 80 } 81 82 private IEnumerable<IPluginDescription> newPlugins; 83 public IEnumerable<IPluginDescription> NewPlugins { 84 get { return newPlugins ?? Enumerable.Empty<IPluginDescription>(); } 85 set { 86 if (value != this.newPlugins) { 87 this.newPlugins = value; 88 UpdateControl(); 89 } 90 } 91 } 92 93 public IEnumerable<IPluginDescription> CheckedPlugins { 47 48 private IEnumerable<IPluginDescription> CheckedPlugins { 94 49 get { 95 return (from item in remotePluginsListView.Items.OfType<ListViewItem>()50 return (from item in pluginsListView.Items.OfType<ListViewItem>() 96 51 where item.Checked 97 52 let plugin = item.Tag as IPluginDescription … … 113 68 public RemotePluginInstallerView() { 114 69 InitializeComponent(); 115 70 productImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.Setup_Install); 71 productLargeImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.Setup_Install); 72 pluginsImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.plugin_16); 116 73 refreshServerPluginsBackgroundWorker = new BackgroundWorker(); 117 74 refreshServerPluginsBackgroundWorker.DoWork += new DoWorkEventHandler(refreshServerPluginsBackgroundWorker_DoWork); … … 121 78 updateOrInstallPluginsBackgroundWorker.DoWork += new DoWorkEventHandler(updateOrInstallPluginsBackgroundWorker_DoWork); 122 79 updateOrInstallPluginsBackgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(updateOrInstallPluginsBackgroundWorker_RunWorkerCompleted); 123 124 newPluginsGroup = remotePluginsListView.Groups["newPluginsGroup"];125 productsGroup = remotePluginsListView.Groups["productsGroup"];126 allPluginsGroup = remotePluginsListView.Groups["allPluginsGroup"];127 80 } 128 81 … … 136 89 } else { 137 90 RefreshBackgroundWorkerResult refreshResult = (RefreshBackgroundWorkerResult)e.Result; 138 UpdateRemotePluginList(refreshResult.RemoteProducts, refreshResult.RemotePlugins); 91 products = refreshResult.RemoteProducts; 92 plugins = refreshResult.RemotePlugins; 93 UpdateControl(); 139 94 } 140 95 StatusView.UnlockUI(); … … 183 138 refreshServerPluginsBackgroundWorker.RunWorkerAsync(); 184 139 } 185 private void install Button_Click(object sender, EventArgs e) {140 private void installPluginsButton_Click(object sender, EventArgs e) { 186 141 StatusView.LockUI(); 187 142 StatusView.ShowProgressIndicator(); … … 205 160 updateOrInstallPluginsBackgroundWorker.RunWorkerAsync(updateOrInstallInfo); 206 161 } 162 private void installProductsButton_Click(object sender, EventArgs e) { 163 StatusView.LockUI(); 164 StatusView.ShowProgressIndicator(); 165 var updateOrInstallInfo = new UpdateOrInstallPluginsBackgroundWorkerArgument(); 166 var selectedProduct = (DeploymentService.ProductDescription)productsListView.SelectedItems[0].Tag; 167 // if there is a local plugin with same name and same major and minor version then it's an update 168 var pluginsToUpdate = from plugin in selectedProduct.Plugins 169 let matchingLocalPlugins = from localPlugin in pluginManager.Plugins 170 where localPlugin.Name == plugin.Name 171 where localPlugin.Version.Major == plugin.Version.Major 172 where localPlugin.Version.Minor == plugin.Version.Minor 173 where IsNewerThan(plugin, localPlugin) 174 select localPlugin 175 where matchingLocalPlugins.Count() > 0 176 select plugin; 177 178 // otherwise install a new plugin 179 var pluginsToInstall = selectedProduct.Plugins.Except(pluginsToUpdate); 180 181 updateOrInstallInfo.PluginsToInstall = (IEnumerable<IPluginDescription>)pluginsToInstall.ToList(); 182 updateOrInstallInfo.PluginsToUpdate = (IEnumerable<IPluginDescription>)pluginsToUpdate.ToList(); 183 updateOrInstallPluginsBackgroundWorker.RunWorkerAsync(updateOrInstallInfo); 184 } 185 186 private void showLargeIconsButton_CheckedChanged(object sender, EventArgs e) { 187 productsListView.View = View.LargeIcon; 188 } 189 190 private void showDetailsButton_CheckedChanged(object sender, EventArgs e) { 191 productsListView.View = View.Details; 192 } 193 207 194 #endregion 208 195 209 196 private void UpdateControl() { 210 ClearListView(); 211 remotePluginsListView.SuppressItemCheckedEvents = true; 212 foreach (var newPlugin in NewPlugins) { 213 var item = CreateListViewItem(newPlugin); 214 item.Group = newPluginsGroup; 215 remotePluginsListView.Items.Add(item); 216 } 217 218 foreach (var product in Products) { 197 // clear products view 198 List<ListViewItem> productItemsToDelete = new List<ListViewItem>(productsListView.Items.OfType<ListViewItem>()); 199 productItemsToDelete.ForEach(item => productsListView.Items.Remove(item)); 200 201 // populate products list view 202 foreach (var product in products) { 219 203 var item = CreateListViewItem(product); 220 item.Group = productsGroup; 221 remotePluginsListView.Items.Add(item); 222 } 223 224 if (showAllPlugins) { 225 foreach (var plugin in AllPlugins) { 226 var item = CreateListViewItem(plugin); 227 item.Group = allPluginsGroup; 228 remotePluginsListView.Items.Add(item); 229 } 230 } 231 foreach (ColumnHeader column in remotePluginsListView.Columns) 232 if (remotePluginsListView.Items.Count > 0) 204 productsListView.Items.Add(item); 205 } 206 var allPluginsListViewItem = new ListViewItem(); 207 allPluginsListViewItem.Text = "All Plugins"; 208 allPluginsListViewItem.ImageIndex = 0; 209 productsListView.Items.Add(allPluginsListViewItem); 210 foreach (ColumnHeader column in productsListView.Columns) 211 if (productsListView.Items.Count > 0) 233 212 column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); 234 213 else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); 235 236 remotePluginsListView.SuppressItemCheckedEvents = false; 237 } 238 239 private void ClearListView() { 240 List<ListViewItem> itemsToDelete = new List<ListViewItem>(remotePluginsListView.Items.OfType<ListViewItem>()); 241 itemsToDelete.ForEach(item => remotePluginsListView.Items.Remove(item)); 214 } 215 216 private void UpdatePluginsList() { 217 // clear plugins list view 218 List<ListViewItem> pluginItemsToDelete = new List<ListViewItem>(pluginsListView.Items.OfType<ListViewItem>()); 219 pluginItemsToDelete.ForEach(item => pluginsListView.Items.Remove(item)); 220 221 // populate plugins list 222 if (productsListView.SelectedItems.Count > 0) { 223 pluginsListView.SuppressItemCheckedEvents = true; 224 225 var selectedItem = productsListView.SelectedItems[0]; 226 if (selectedItem.Text == "All Plugins") { 227 foreach (var plugin in plugins) { 228 var item = CreateListViewItem(plugin); 229 pluginsListView.Items.Add(item); 230 } 231 } else { 232 var selectedProduct = (DeploymentService.ProductDescription)productsListView.SelectedItems[0].Tag; 233 foreach (var plugin in selectedProduct.Plugins) { 234 var item = CreateListViewItem(plugin); 235 pluginsListView.Items.Add(item); 236 } 237 } 238 239 foreach (ColumnHeader column in pluginsListView.Columns) 240 if (pluginsListView.Items.Count > 0) 241 column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); 242 else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); 243 244 pluginsListView.SuppressItemCheckedEvents = false; 245 } 242 246 } 243 247 244 248 private ListViewItem CreateListViewItem(DeploymentService.ProductDescription product) { 245 ListViewItem item = new ListViewItem(new string[] { product.Name, product.Version.ToString() , string.Empty});249 ListViewItem item = new ListViewItem(new string[] { product.Name, product.Version.ToString() }); 246 250 item.Tag = product; 251 item.ImageIndex = 0; 247 252 return item; 248 253 } … … 251 256 ListViewItem item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), plugin.Description }); 252 257 item.Tag = plugin; 258 item.ImageIndex = 0; 253 259 return item; 254 260 } 261 262 #region products list view events 263 private void productsListView_SelectedIndexChanged(object sender, EventArgs e) { 264 UpdatePluginsList(); 265 installProductsButton.Enabled = (productsListView.SelectedItems.Count > 0 && 266 productsListView.SelectedItems[0].Text != "All Plugins"); 267 } 268 #endregion 255 269 256 270 #region item checked event handler 257 271 private void remotePluginsListView_ItemChecked(object sender, ItemCheckedEventArgs e) { 258 foreach (ListViewItem item in remotePluginsListView.SelectedItems) {272 foreach (ListViewItem item in pluginsListView.SelectedItems) { 259 273 // dispatch by check state and type of item (product/plugin) 260 274 IPluginDescription plugin = item.Tag as IPluginDescription; … … 273 287 } 274 288 } 275 install Button.Enabled = remotePluginsListView.CheckedItems.Count > 0;289 installPluginsButton.Enabled = pluginsListView.CheckedItems.Count > 0; 276 290 } 277 291 … … 287 301 } 288 302 } 289 remotePluginsListView.UncheckItems(modifiedItems);303 pluginsListView.UncheckItems(modifiedItems); 290 304 } 291 305 … … 303 317 } 304 318 } 305 remotePluginsListView.CheckItems(modifiedItems);319 pluginsListView.CheckItems(modifiedItems); 306 320 } 307 321 … … 333 347 } 334 348 } 335 remotePluginsListView.UncheckItems(modifiedItems);349 pluginsListView.UncheckItems(modifiedItems); 336 350 } 337 351 … … 349 363 } 350 364 } 351 remotePluginsListView.CheckItems(modifiedItems);365 pluginsListView.CheckItems(modifiedItems); 352 366 } 353 367 … … 356 370 #region helper methods 357 371 private IEnumerable<ListViewItem> FindItemsForPlugin(IPluginDescription plugin) { 358 return (from item in remotePluginsListView.Items.OfType<ListViewItem>()372 return (from item in pluginsListView.Items.OfType<ListViewItem>() 359 373 let otherPlugin = item.Tag as IPluginDescription 360 374 where otherPlugin != null && otherPlugin.Name == plugin.Name && otherPlugin.Version == plugin.Version … … 363 377 364 378 private ListViewItem FindItemForProduct(DeploymentService.ProductDescription product) { 365 return (from item in remotePluginsListView.Items.OfType<ListViewItem>()379 return (from item in pluginsListView.Items.OfType<ListViewItem>() 366 380 let otherProduct = item.Tag as DeploymentService.ProductDescription 367 381 where otherProduct != null && otherProduct.Name == product.Name && otherProduct.Version == product.Version … … 369 383 } 370 384 371 private void UpdateRemotePluginList(372 IEnumerable<DeploymentService.ProductDescription> remoteProducts,373 IEnumerable<IPluginDescription> remotePlugins) {374 375 var mostRecentRemotePlugins = from remote in remotePlugins376 where !remotePlugins.Any(x => x.Name == remote.Name && x.Version > remote.Version) // same name and higher version377 select remote;378 379 var newPlugins = from remote in mostRecentRemotePlugins380 let matchingLocal = (from local in pluginManager.Plugins381 where local.Name == remote.Name382 where local.Version < remote.Version383 select local).FirstOrDefault()384 where matchingLocal != null385 select remote;386 387 NewPlugins = newPlugins;388 Products = remoteProducts;389 AllPlugins = remotePlugins;390 }391 385 private bool IsNewerThan(IPluginDescription plugin1, IPluginDescription plugin2) { 392 386 // newer: build version is higher, or if build version is the same revision is higher … … 397 391 #endregion 398 392 399 400 393 } 401 394 } -
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/RemotePluginInstaller.resx
r3474 r3608 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="pluginsImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 <value>365, 17</value> 122 </metadata> 123 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 <value>508, 17</value> 125 </metadata> 126 <metadata name="productLargeImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 127 <value>29, 18</value> 128 </metadata> 129 <metadata name="productImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 130 <value>191, 17</value> 131 </metadata> 132 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 133 <value>508, 17</value> 134 </metadata> 120 135 </root> -
trunk/sources/HeuristicLab.PluginInfrastructure/HeuristicLab.PluginInfrastructure.csproj
r3573 r3608 335 335 <None Include="Resources\show_icons.png" /> 336 336 <None Include="Resources\show_details.png" /> 337 <None Include="Resources\plugin.png" /> 338 <None Include="Resources\plugin_16.png" /> 339 <None Include="Resources\Setup_Install.ico" /> 337 340 <Content Include="Resources\VS2008ImageLibrary_CommonElements_Objects_Arrow_Down.png" /> 338 341 <None Include="Resources\VS2008ImageLibrary_Objects_NetworkConnections.png" /> -
trunk/sources/HeuristicLab.PluginInfrastructure/Resources/Resources.Designer.cs
r3474 r3608 110 110 } 111 111 112 internal static System.Drawing.Bitmap plugin { 113 get { 114 object obj = ResourceManager.GetObject("plugin", resourceCulture); 115 return ((System.Drawing.Bitmap)(obj)); 116 } 117 } 118 119 internal static System.Drawing.Bitmap plugin_16 { 120 get { 121 object obj = ResourceManager.GetObject("plugin_16", resourceCulture); 122 return ((System.Drawing.Bitmap)(obj)); 123 } 124 } 125 112 126 internal static System.Drawing.Bitmap Remove { 113 127 get { … … 116 130 } 117 131 } 132 133 internal static System.Drawing.Icon Setup_Install { 134 get { 135 object obj = ResourceManager.GetObject("Setup_Install", resourceCulture); 136 return ((System.Drawing.Icon)(obj)); 137 } 138 } 118 139 } 119 140 } -
trunk/sources/HeuristicLab.PluginInfrastructure/Resources/Resources.resx
r3474 r3608 140 140 <value>VS2008ImageLibrary_Objects_Internet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 141 141 </data> 142 <data name="plugin" type="System.Resources.ResXFileRef, System.Windows.Forms"> 143 <value>plugin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 144 </data> 145 <data name="plugin_16" type="System.Resources.ResXFileRef, System.Windows.Forms"> 146 <value>plugin_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 147 </data> 142 148 <data name="Remove" type="System.Resources.ResXFileRef, System.Windows.Forms"> 143 149 <value>VS2008ImageLibrary_CommonElements_Actions_Remove.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 144 150 </data> 151 <data name="Setup_Install" type="System.Resources.ResXFileRef, System.Windows.Forms"> 152 <value>Setup_Install.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 153 </data> 145 154 </root>
Note: See TracChangeset
for help on using the changeset viewer.