Changeset 13360 for branches/RefactorPluginInfrastructure-2522
- Timestamp:
- 11/24/15 15:45:06 (9 years ago)
- Location:
- branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/HeuristicLab.PluginInfrastructure.UI-4.0.csproj
r13353 r13360 17 17 <DebugType>full</DebugType> 18 18 <Optimize>false</Optimize> 19 <OutputPath>..\ ..\bin\</OutputPath>19 <OutputPath>..\bin\</OutputPath> 20 20 <DefineConstants>DEBUG;TRACE</DefineConstants> 21 21 <ErrorReport>prompt</ErrorReport> … … 25 25 <DebugType>pdbonly</DebugType> 26 26 <Optimize>true</Optimize> 27 <OutputPath>..\ ..\bin\</OutputPath>27 <OutputPath>..\bin\</OutputPath> 28 28 <DefineConstants>TRACE</DefineConstants> 29 29 <ErrorReport>prompt</ErrorReport> … … 90 90 <DependentUpon>MultiSelectListView.cs</DependentUpon> 91 91 </Compile> 92 <Compile Include="PluginInformationDialog.cs"> 93 <SubType>Form</SubType> 94 </Compile> 95 <Compile Include="PluginInformationDialog.Designer.cs"> 96 <DependentUpon>PluginInformationDialog.cs</DependentUpon> 97 </Compile> 92 98 <Compile Include="PluginView.cs"> 93 99 <SubType>Form</SubType> … … 114 120 </ItemGroup> 115 121 <ItemGroup> 122 <EmbeddedResource Include="PluginInformationDialog.resx"> 123 <DependentUpon>PluginInformationDialog.cs</DependentUpon> 124 </EmbeddedResource> 116 125 <EmbeddedResource Include="Resources\Error.ico" /> 117 126 <EmbeddedResource Include="Resources\HeuristicLab.ico" /> -
branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/PluginInformationDialog.Designer.cs
r13351 r13360 21 21 22 22 namespace HeuristicLab.PluginInfrastructure.UI { 23 partial class AboutDialog {23 partial class PluginInformationDialog { 24 24 /// <summary> 25 25 /// Required designer variable. … … 48 48 this.okButton = new System.Windows.Forms.Button(); 49 49 this.pluginListView = new System.Windows.Forms.ListView(); 50 this.pluginNameColumnHeader = new System.Windows.Forms.ColumnHeader();51 this.pluginVersionColumnHeader = new System.Windows.Forms.ColumnHeader();52 this.pluginDescriptionColumnHeader = new System.Windows.Forms.ColumnHeader();50 this.pluginNameColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 51 this.pluginVersionColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 52 this.pluginDescriptionColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 53 53 this.imageList = new System.Windows.Forms.ImageList(this.components); 54 this.pictureBox = new System.Windows.Forms.PictureBox();55 this.label = new System.Windows.Forms.Label();56 this.label1 = new System.Windows.Forms.Label();57 this.label3 = new System.Windows.Forms.Label();58 54 this.productTextBox = new System.Windows.Forms.TextBox(); 59 this.versionTextBox = new System.Windows.Forms.TextBox(); 60 this.copyrightTextBox = new System.Windows.Forms.TextBox(); 61 this.pluginsGroupBox = new System.Windows.Forms.GroupBox(); 62 this.licenseTextBox = new System.Windows.Forms.RichTextBox(); 55 this.contactTextBox = new System.Windows.Forms.TextBox(); 56 this.textBox = new System.Windows.Forms.RichTextBox(); 63 57 this.label2 = new System.Windows.Forms.Label(); 64 58 this.panel1 = new System.Windows.Forms.Panel(); … … 66 60 this.webLinkLabel = new System.Windows.Forms.LinkLabel(); 67 61 this.mailLinkLabel = new System.Windows.Forms.LinkLabel(); 68 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 69 this.pluginsGroupBox.SuspendLayout(); 62 this.label3 = new System.Windows.Forms.Label(); 63 this.label1 = new System.Windows.Forms.Label(); 64 this.versionTextBox = new System.Windows.Forms.TextBox(); 65 this.label = new System.Windows.Forms.Label(); 66 this.panel2 = new System.Windows.Forms.Panel(); 70 67 this.panel1.SuspendLayout(); 68 this.panel2.SuspendLayout(); 71 69 this.SuspendLayout(); 72 70 // … … 75 73 this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 76 74 this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; 77 this.okButton.Location = new System.Drawing.Point( 538, 13);75 this.okButton.Location = new System.Drawing.Point(800, 13); 78 76 this.okButton.Name = "okButton"; 79 77 this.okButton.Size = new System.Drawing.Size(75, 23); … … 85 83 // pluginListView 86 84 // 87 this.pluginListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 88 | System.Windows.Forms.AnchorStyles.Left) 89 | System.Windows.Forms.AnchorStyles.Right))); 85 this.pluginListView.Activation = System.Windows.Forms.ItemActivation.OneClick; 86 this.pluginListView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 87 | System.Windows.Forms.AnchorStyles.Left))); 88 this.pluginListView.BorderStyle = System.Windows.Forms.BorderStyle.None; 90 89 this.pluginListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 91 90 this.pluginNameColumnHeader, 92 91 this.pluginVersionColumnHeader, 93 92 this.pluginDescriptionColumnHeader}); 94 this.pluginListView.Location = new System.Drawing.Point(6, 19); 93 this.pluginListView.FullRowSelect = true; 94 this.pluginListView.GridLines = true; 95 this.pluginListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; 96 this.pluginListView.HideSelection = false; 97 this.pluginListView.Location = new System.Drawing.Point(12, 12); 98 this.pluginListView.MultiSelect = false; 95 99 this.pluginListView.Name = "pluginListView"; 96 100 this.pluginListView.ShowGroups = false; 97 this.pluginListView.Size = new System.Drawing.Size( 589, 201);101 this.pluginListView.Size = new System.Drawing.Size(303, 514); 98 102 this.pluginListView.SmallImageList = this.imageList; 99 103 this.pluginListView.Sorting = System.Windows.Forms.SortOrder.Ascending; 100 104 this.pluginListView.TabIndex = 0; 105 this.pluginListView.TileSize = new System.Drawing.Size(300, 60); 101 106 this.pluginListView.UseCompatibleStateImageBehavior = false; 102 this.pluginListView.View = System.Windows.Forms.View. Details;107 this.pluginListView.View = System.Windows.Forms.View.Tile; 103 108 this.pluginListView.ItemActivate += new System.EventHandler(this.pluginListView_ItemActivate); 109 this.pluginListView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.pluginListView_ItemSelectionChanged); 110 this.pluginListView.ClientSizeChanged += new System.EventHandler(this.pluginListView_ClientSizeChanged); 104 111 // 105 112 // pluginNameColumnHeader … … 121 128 this.imageList.TransparentColor = System.Drawing.Color.Transparent; 122 129 // 123 // pictureBox124 //125 this.pictureBox.Location = new System.Drawing.Point(12, 12);126 this.pictureBox.Name = "pictureBox";127 this.pictureBox.Size = new System.Drawing.Size(160, 180);128 this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;129 this.pictureBox.TabIndex = 2;130 this.pictureBox.TabStop = false;131 //132 // label133 //134 this.label.AutoSize = true;135 this.label.Location = new System.Drawing.Point(183, 12);136 this.label.Name = "label";137 this.label.Size = new System.Drawing.Size(47, 13);138 this.label.TabIndex = 1;139 this.label.Text = "Product:";140 //141 // label1142 //143 this.label1.AutoSize = true;144 this.label1.Location = new System.Drawing.Point(183, 31);145 this.label1.Name = "label1";146 this.label1.Size = new System.Drawing.Size(45, 13);147 this.label1.TabIndex = 3;148 this.label1.Text = "Version:";149 //150 // label3151 //152 this.label3.AutoSize = true;153 this.label3.Location = new System.Drawing.Point(183, 50);154 this.label3.Name = "label3";155 this.label3.Size = new System.Drawing.Size(54, 13);156 this.label3.TabIndex = 5;157 this.label3.Text = "Copyright:";158 //159 130 // productTextBox 160 131 // … … 162 133 this.productTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 163 134 this.productTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 164 this.productTextBox.Location = new System.Drawing.Point( 258, 12);135 this.productTextBox.Location = new System.Drawing.Point(87, 3); 165 136 this.productTextBox.Name = "productTextBox"; 166 137 this.productTextBox.ReadOnly = true; … … 169 140 this.productTextBox.Text = "HeuristicLab"; 170 141 // 171 // versionTextBox 172 // 173 this.versionTextBox.BackColor = System.Drawing.SystemColors.HighlightText; 174 this.versionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 175 this.versionTextBox.Location = new System.Drawing.Point(258, 31); 176 this.versionTextBox.Name = "versionTextBox"; 177 this.versionTextBox.ReadOnly = true; 178 this.versionTextBox.Size = new System.Drawing.Size(355, 13); 179 this.versionTextBox.TabIndex = 4; 180 this.versionTextBox.Text = "1.0"; 181 // 182 // copyrightTextBox 183 // 184 this.copyrightTextBox.BackColor = System.Drawing.SystemColors.HighlightText; 185 this.copyrightTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 186 this.copyrightTextBox.Location = new System.Drawing.Point(258, 50); 187 this.copyrightTextBox.Name = "copyrightTextBox"; 188 this.copyrightTextBox.ReadOnly = true; 189 this.copyrightTextBox.Size = new System.Drawing.Size(355, 13); 190 this.copyrightTextBox.TabIndex = 6; 191 this.copyrightTextBox.Text = "(C)"; 192 // 193 // pluginsGroupBox 194 // 195 this.pluginsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 196 | System.Windows.Forms.AnchorStyles.Left) 197 | System.Windows.Forms.AnchorStyles.Right))); 198 this.pluginsGroupBox.Controls.Add(this.pluginListView); 199 this.pluginsGroupBox.Location = new System.Drawing.Point(12, 306); 200 this.pluginsGroupBox.Name = "pluginsGroupBox"; 201 this.pluginsGroupBox.Size = new System.Drawing.Size(601, 226); 202 this.pluginsGroupBox.TabIndex = 12; 203 this.pluginsGroupBox.TabStop = false; 204 this.pluginsGroupBox.Text = "Plugins"; 205 // 206 // licenseTextBox 207 // 208 this.licenseTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 209 | System.Windows.Forms.AnchorStyles.Right))); 210 this.licenseTextBox.BackColor = System.Drawing.SystemColors.HighlightText; 211 this.licenseTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 212 this.licenseTextBox.Location = new System.Drawing.Point(186, 115); 213 this.licenseTextBox.Name = "licenseTextBox"; 214 this.licenseTextBox.ReadOnly = true; 215 this.licenseTextBox.Size = new System.Drawing.Size(427, 185); 216 this.licenseTextBox.TabIndex = 11; 217 this.licenseTextBox.Text = "License Text"; 218 this.licenseTextBox.WordWrap = false; 219 this.licenseTextBox.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.licenseTextBox_LinkClicked); 142 // contactTextBox 143 // 144 this.contactTextBox.BackColor = System.Drawing.SystemColors.HighlightText; 145 this.contactTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 146 this.contactTextBox.Location = new System.Drawing.Point(87, 41); 147 this.contactTextBox.Name = "contactTextBox"; 148 this.contactTextBox.ReadOnly = true; 149 this.contactTextBox.Size = new System.Drawing.Size(355, 13); 150 this.contactTextBox.TabIndex = 6; 151 this.contactTextBox.Text = "(C)"; 152 // 153 // textBox 154 // 155 this.textBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 156 | System.Windows.Forms.AnchorStyles.Left) 157 | System.Windows.Forms.AnchorStyles.Right))); 158 this.textBox.BackColor = System.Drawing.SystemColors.HighlightText; 159 this.textBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 160 this.textBox.Location = new System.Drawing.Point(6, 98); 161 this.textBox.Name = "textBox"; 162 this.textBox.ReadOnly = true; 163 this.textBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; 164 this.textBox.Size = new System.Drawing.Size(526, 394); 165 this.textBox.TabIndex = 11; 166 this.textBox.Text = "Files and License Text"; 167 this.textBox.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.licenseTextBox_LinkClicked); 168 this.textBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.textBox_MouseClick); 220 169 // 221 170 // label2 222 171 // 223 172 this.label2.AutoSize = true; 224 this.label2.Location = new System.Drawing.Point(183, 69); 173 this.label2.Location = new System.Drawing.Point(3, 60); 174 this.label2.Margin = new System.Windows.Forms.Padding(3); 225 175 this.label2.Name = "label2"; 226 176 this.label2.Size = new System.Drawing.Size(49, 13); … … 230 180 // panel1 231 181 // 232 this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 233 182 this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 183 | System.Windows.Forms.AnchorStyles.Right))); 234 184 this.panel1.BackColor = System.Drawing.SystemColors.Control; 235 185 this.panel1.Controls.Add(this.okButton); 236 186 this.panel1.Location = new System.Drawing.Point(0, 538); 237 187 this.panel1.Name = "panel1"; 238 this.panel1.Size = new System.Drawing.Size( 626, 48);188 this.panel1.Size = new System.Drawing.Size(888, 48); 239 189 this.panel1.TabIndex = 0; 240 190 // … … 242 192 // 243 193 this.label4.AutoSize = true; 244 this.label4.Location = new System.Drawing.Point(183, 88); 194 this.label4.Location = new System.Drawing.Point(3, 79); 195 this.label4.Margin = new System.Windows.Forms.Padding(3); 245 196 this.label4.Name = "label4"; 246 197 this.label4.Size = new System.Drawing.Size(47, 13); … … 251 202 // 252 203 this.webLinkLabel.AutoSize = true; 253 this.webLinkLabel.Location = new System.Drawing.Point( 255, 69);204 this.webLinkLabel.Location = new System.Drawing.Point(84, 60); 254 205 this.webLinkLabel.Name = "webLinkLabel"; 255 206 this.webLinkLabel.Size = new System.Drawing.Size(135, 13); … … 262 213 // 263 214 this.mailLinkLabel.AutoSize = true; 264 this.mailLinkLabel.Location = new System.Drawing.Point( 255, 88);215 this.mailLinkLabel.Location = new System.Drawing.Point(84, 79); 265 216 this.mailLinkLabel.Name = "mailLinkLabel"; 266 217 this.mailLinkLabel.Size = new System.Drawing.Size(129, 13); … … 270 221 this.mailLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.mailLinkLabel_LinkClicked); 271 222 // 272 // AboutDialog 223 // label3 224 // 225 this.label3.AutoSize = true; 226 this.label3.Location = new System.Drawing.Point(3, 41); 227 this.label3.Margin = new System.Windows.Forms.Padding(3); 228 this.label3.Name = "label3"; 229 this.label3.Size = new System.Drawing.Size(54, 13); 230 this.label3.TabIndex = 5; 231 this.label3.Text = "Copyright:"; 232 // 233 // label1 234 // 235 this.label1.AutoSize = true; 236 this.label1.Location = new System.Drawing.Point(3, 22); 237 this.label1.Margin = new System.Windows.Forms.Padding(3); 238 this.label1.Name = "label1"; 239 this.label1.Size = new System.Drawing.Size(45, 13); 240 this.label1.TabIndex = 3; 241 this.label1.Text = "Version:"; 242 // 243 // versionTextBox 244 // 245 this.versionTextBox.BackColor = System.Drawing.SystemColors.HighlightText; 246 this.versionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 247 this.versionTextBox.Location = new System.Drawing.Point(87, 22); 248 this.versionTextBox.Name = "versionTextBox"; 249 this.versionTextBox.ReadOnly = true; 250 this.versionTextBox.Size = new System.Drawing.Size(355, 13); 251 this.versionTextBox.TabIndex = 4; 252 this.versionTextBox.Text = "1.0"; 253 // 254 // label 255 // 256 this.label.AutoSize = true; 257 this.label.Location = new System.Drawing.Point(3, 3); 258 this.label.Margin = new System.Windows.Forms.Padding(3); 259 this.label.Name = "label"; 260 this.label.Size = new System.Drawing.Size(38, 13); 261 this.label.TabIndex = 1; 262 this.label.Text = "Name:"; 263 // 264 // panel2 265 // 266 this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 267 | System.Windows.Forms.AnchorStyles.Left) 268 | System.Windows.Forms.AnchorStyles.Right))); 269 this.panel2.Controls.Add(this.contactTextBox); 270 this.panel2.Controls.Add(this.mailLinkLabel); 271 this.panel2.Controls.Add(this.label); 272 this.panel2.Controls.Add(this.webLinkLabel); 273 this.panel2.Controls.Add(this.label1); 274 this.panel2.Controls.Add(this.label4); 275 this.panel2.Controls.Add(this.label3); 276 this.panel2.Controls.Add(this.productTextBox); 277 this.panel2.Controls.Add(this.label2); 278 this.panel2.Controls.Add(this.versionTextBox); 279 this.panel2.Controls.Add(this.textBox); 280 this.panel2.Location = new System.Drawing.Point(321, 31); 281 this.panel2.Name = "panel2"; 282 this.panel2.Size = new System.Drawing.Size(554, 495); 283 this.panel2.TabIndex = 13; 284 // 285 // PluginInformationDialog 273 286 // 274 287 this.AcceptButton = this.okButton; 275 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);276 288 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 277 289 this.BackColor = System.Drawing.SystemColors.Window; 278 290 this.CancelButton = this.okButton; 279 this.ClientSize = new System.Drawing.Size(625, 586); 280 this.Controls.Add(this.mailLinkLabel); 281 this.Controls.Add(this.webLinkLabel); 282 this.Controls.Add(this.label4); 291 this.ClientSize = new System.Drawing.Size(887, 586); 292 this.Controls.Add(this.pluginListView); 293 this.Controls.Add(this.panel2); 283 294 this.Controls.Add(this.panel1); 284 this.Controls.Add(this.label2); 285 this.Controls.Add(this.licenseTextBox); 286 this.Controls.Add(this.pluginsGroupBox); 287 this.Controls.Add(this.copyrightTextBox); 288 this.Controls.Add(this.versionTextBox); 289 this.Controls.Add(this.productTextBox); 290 this.Controls.Add(this.label3); 291 this.Controls.Add(this.label1); 292 this.Controls.Add(this.label); 293 this.Controls.Add(this.pictureBox); 294 this.Icon = Resources.HeuristicLab; 295 this.Icon = global::HeuristicLab.PluginInfrastructure.UI.Resources.HeuristicLab; 295 296 this.MaximizeBox = false; 296 297 this.MinimizeBox = false; 297 this.Name = " AboutDialog";298 this.Name = "PluginInformationDialog"; 298 299 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 299 this.Text = "About HeuristicLab"; 300 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 301 this.pluginsGroupBox.ResumeLayout(false); 300 this.Text = "About Plugins"; 302 301 this.panel1.ResumeLayout(false); 302 this.panel2.ResumeLayout(false); 303 this.panel2.PerformLayout(); 303 304 this.ResumeLayout(false); 304 this.PerformLayout();305 305 306 306 } … … 314 314 private System.Windows.Forms.ColumnHeader pluginVersionColumnHeader; 315 315 private System.Windows.Forms.ColumnHeader pluginDescriptionColumnHeader; 316 private System.Windows.Forms.PictureBox pictureBox;317 private System.Windows.Forms.Label label;318 private System.Windows.Forms.Label label1;319 private System.Windows.Forms.Label label3;320 316 private System.Windows.Forms.TextBox productTextBox; 321 private System.Windows.Forms.TextBox versionTextBox; 322 private System.Windows.Forms.TextBox copyrightTextBox; 323 private System.Windows.Forms.GroupBox pluginsGroupBox; 324 private System.Windows.Forms.RichTextBox licenseTextBox; 317 private System.Windows.Forms.TextBox contactTextBox; 318 private System.Windows.Forms.RichTextBox textBox; 325 319 private System.Windows.Forms.Label label2; 326 320 private System.Windows.Forms.Panel panel1; … … 328 322 private System.Windows.Forms.LinkLabel webLinkLabel; 329 323 private System.Windows.Forms.LinkLabel mailLinkLabel; 324 private System.Windows.Forms.Label label3; 325 private System.Windows.Forms.Label label1; 326 private System.Windows.Forms.TextBox versionTextBox; 327 private System.Windows.Forms.Label label; 328 private System.Windows.Forms.Panel panel2; 330 329 } 331 330 } -
branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/PluginInformationDialog.cs
r13353 r13360 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Drawing; 25 using System.IO; 24 26 using System.Linq; 25 27 using System.Reflection; 28 using System.Text.RegularExpressions; 26 29 using System.Windows.Forms; 27 30 28 31 namespace HeuristicLab.PluginInfrastructure.UI { 29 32 /// <summary> 30 /// Shows product, version and copyright information for HeuristicLab and allplugins.33 /// Shows information on all discovered plugins. 31 34 /// </summary> 32 public partial class AboutDialog : Form { 33 /// <summary> 34 /// Creates a new about dialog with all plugins loaded in the current application. 35 /// </summary> 36 public AboutDialog() { 35 public partial class PluginInformationDialog : Form { 36 public PluginInformationDialog(IEnumerable<IPluginDescription> plugins) { 37 37 InitializeComponent(); 38 38 var entryAssembly = Assembly.GetEntryAssembly(); 39 39 productTextBox.Text = GetProduct(entryAssembly); 40 40 versionTextBox.Text = entryAssembly.GetFileVersion(); 41 co pyrightTextBox.Text = GetCopyright(entryAssembly);41 contactTextBox.Text = GetCopyright(entryAssembly); 42 42 imageList.Images.Add(Resources.Plugin); 43 pictureBox.Image = Resources.HeuristicLabLogo; 44 licenseTextBox.Text = Resources.LicenseText; 45 UpdatePluginList(ApplicationManager.Manager.Plugins); 43 textBox.Text = Resources.LicenseText; 44 PopulatePluginList(plugins); 46 45 ActiveControl = okButton; 47 46 } 48 47 49 /// <summary> 50 /// Creates a new about dialog listing all plugins in the <paramref name="plugins"/> enumerable. 51 /// </summary> 52 /// <param name="plugins">Enumerable of plugins that should be listed.</param> 53 public AboutDialog(IEnumerable<IPluginDescription> plugins) 54 : this() { 55 UpdatePluginList(plugins); 56 } 57 58 private void UpdatePluginList(IEnumerable<IPluginDescription> plugins) { 48 private void PopulatePluginList(IEnumerable<IPluginDescription> plugins) { 59 49 pluginListView.Items.Clear(); 60 50 foreach (var plugin in plugins) { … … 66 56 67 57 private ListViewItem CreateListViewItem(IPluginDescription plugin) { 68 ListViewItem item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), plugin.Description }); 69 item.Tag = plugin; 70 item.ImageIndex = 0; 58 ListViewItem item = new ListViewItem(new string[] { plugin.Name, plugin.Version.ToString(), plugin.Description }) { 59 Name = plugin.Name, 60 Tag = plugin, 61 ImageIndex = 0 62 }; 63 64 // set sub-item names to make sure they are shown in the corresponding columns of the ListView 65 item.SubItems[0].Name = "Name"; 66 item.SubItems[1].Name = "Version"; 67 item.SubItems[2].Name = "Description"; 71 68 return item; 72 69 } … … 91 88 92 89 private void pluginListView_ItemActivate(object sender, EventArgs e) { 93 if (pluginListView.SelectedItems.Count > 0) { 94 PluginView view = new PluginView((IPluginDescription)pluginListView.SelectedItems[0].Tag); 95 view.Show(this); 90 91 } 92 private void pluginListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { 93 if (e.IsSelected) { 94 pluginListView.EnsureVisible(e.ItemIndex); 95 ShowPluginInformation((IPluginDescription)e.Item.Tag); 96 pluginListView.Select(); // focus plugin list view to highlight selected tile 96 97 } 98 } 99 100 private void ShowPluginInformation(IPluginDescription pluginDescription) { 101 productTextBox.Text = pluginDescription.Name; 102 versionTextBox.Text = pluginDescription.Version.ToString(); 103 contactTextBox.Text = 104 pluginDescription.ContactName + " " + pluginDescription.ContactEmail; 105 106 // build text and later replace plugindependency names with RTF links (too lazy to create RTF document) 107 textBox.Text = 108 pluginDescription.Description + 109 Environment.NewLine + Environment.NewLine + 110 "Files:" + Environment.NewLine + 111 string.Join(Environment.NewLine, pluginDescription.Files) + 112 Environment.NewLine + Environment.NewLine + 113 "Dependencies:" + Environment.NewLine; 114 115 // foreach dependency add a new line and set the formatting 116 117 foreach (var d in pluginDescription.Dependencies) { 118 // remember starting pos for selection 119 var start = textBox.Text.Length; 120 textBox.AppendText(d.Name); 121 textBox.SelectionStart = start; 122 textBox.SelectionLength = d.Name.Length; 123 textBox.SelectionColor = Color.RoyalBlue; 124 textBox.AppendText(Environment.NewLine); 125 } 126 textBox.AppendText(Environment.NewLine); 127 textBox.AppendText(pluginDescription.LicenseText); 97 128 } 98 129 … … 108 139 System.Diagnostics.Process.Start("mailto:" + mailLinkLabel.Text); 109 140 } 141 142 // automatically adjust tile size to 100% width of listview 143 private void pluginListView_ClientSizeChanged(object sender, EventArgs e) { 144 pluginListView.TileSize = new Size(pluginListView.ClientSize.Width, pluginListView.TileSize.Height); 145 } 146 147 private void textBox_MouseClick(object sender, MouseEventArgs e) { 148 int i = textBox.GetCharIndexFromPosition(e.Location); 149 var text = textBox.Text; 150 // extract clicked string (left and right are whitespace 151 int startPos = i; while (startPos >= 0 && !char.IsWhiteSpace(text[startPos])) startPos--; 152 int endPos = i; while (endPos < textBox.TextLength && !char.IsWhiteSpace(text[endPos])) endPos++; 153 string clickedWord = text.Substring(startPos + 1, endPos - startPos - 1); 154 155 pluginListView.SelectedItems.Clear(); 156 157 // find and select first matching item 158 for (int pi = 0; pi < pluginListView.Items.Count; pi++) { 159 if (pluginListView.Items[pi].Text == clickedWord) { 160 pluginListView.Items[pi].Selected = true; 161 break; 162 } 163 } 164 } 165 110 166 } 111 167 } -
branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/StarterForm.cs
r13338 r13360 35 35 /// </summary> 36 36 public partial class StarterForm : Form { 37 private const string pluginManagerItemName = "Plugin Manager";37 private const string pluginManagerItemName = "Plugins"; 38 38 // private const string updatePluginsItemName = "Updates Available"; 39 39 private const string optimizerItemName = "Optimizer"; // TODO: encoding a specific name of an application here is problematic (applications are discovered dynamically) … … 100 100 ListViewItem selected = applicationsListView.SelectedItems[0]; 101 101 if (selected.Text == pluginManagerItemName) { 102 if (pluginManager.Plugins.Any(x => x.PluginState == PluginState.Loaded)) { 103 MessageBox.Show("Installation Manager cannot be started while another HeuristicLab application is active." + Environment.NewLine + 104 "Please stop all active HeuristicLab applications and try again.", "Plugin Manager", 105 MessageBoxButtons.OK, MessageBoxIcon.Information); 106 } else { 107 try { 108 Cursor = Cursors.AppStarting; 109 using (InstallationManagerForm form = new InstallationManagerForm(pluginManager)) { 110 form.ShowDialog(this); 111 } 112 UpdateApplicationsList(); 113 } finally { 114 Cursor = Cursors.Arrow; 102 try { 103 Cursor = Cursors.AppStarting; 104 using (var form = new PluginInformationDialog(pluginManager.Plugins)) { 105 form.ShowDialog(this); 115 106 } 107 } finally { 108 Cursor = Cursors.Arrow; 116 109 } 117 110 } else { … … 176 169 private void AddPluginManagerItem() { 177 170 pluginManagerListViewItem = new ListViewItem(pluginManagerItemName, 0); 178 pluginManagerListViewItem.Group = applicationsListView.Groups["Plugin Management"];171 pluginManagerListViewItem.Group = applicationsListView.Groups["Plugin Information"]; 179 172 pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, AssemblyExtensions.GetFileVersion(GetType().Assembly))); 180 pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, " Install, upgrade or delete plugins"));181 pluginManagerListViewItem.ToolTipText = " Install, upgrade or delete plugins";173 pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, "Show detailed plugin information")); 174 pluginManagerListViewItem.ToolTipText = "Show detailed plugin information"; 182 175 183 176 applicationsListView.Items.Add(pluginManagerListViewItem);
Note: See TracChangeset
for help on using the changeset viewer.