Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13360


Ignore:
Timestamp:
11/24/15 15:45:06 (8 years ago)
Author:
gkronber
Message:

#2522: added new PluginInformationDialog

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  
    1717    <DebugType>full</DebugType>
    1818    <Optimize>false</Optimize>
    19     <OutputPath>..\..\bin\</OutputPath>
     19    <OutputPath>..\bin\</OutputPath>
    2020    <DefineConstants>DEBUG;TRACE</DefineConstants>
    2121    <ErrorReport>prompt</ErrorReport>
     
    2525    <DebugType>pdbonly</DebugType>
    2626    <Optimize>true</Optimize>
    27     <OutputPath>..\..\bin\</OutputPath>
     27    <OutputPath>..\bin\</OutputPath>
    2828    <DefineConstants>TRACE</DefineConstants>
    2929    <ErrorReport>prompt</ErrorReport>
     
    9090      <DependentUpon>MultiSelectListView.cs</DependentUpon>
    9191    </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>
    9298    <Compile Include="PluginView.cs">
    9399      <SubType>Form</SubType>
     
    114120  </ItemGroup>
    115121  <ItemGroup>
     122    <EmbeddedResource Include="PluginInformationDialog.resx">
     123      <DependentUpon>PluginInformationDialog.cs</DependentUpon>
     124    </EmbeddedResource>
    116125    <EmbeddedResource Include="Resources\Error.ico" />
    117126    <EmbeddedResource Include="Resources\HeuristicLab.ico" />
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/PluginInformationDialog.Designer.cs

    r13351 r13360  
    2121
    2222namespace HeuristicLab.PluginInfrastructure.UI {
    23   partial class AboutDialog {
     23  partial class PluginInformationDialog {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    4848      this.okButton = new System.Windows.Forms.Button();
    4949      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()));
    5353      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();
    5854      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();
    6357      this.label2 = new System.Windows.Forms.Label();
    6458      this.panel1 = new System.Windows.Forms.Panel();
     
    6660      this.webLinkLabel = new System.Windows.Forms.LinkLabel();
    6761      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();
    7067      this.panel1.SuspendLayout();
     68      this.panel2.SuspendLayout();
    7169      this.SuspendLayout();
    7270      //
     
    7573      this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    7674      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);
    7876      this.okButton.Name = "okButton";
    7977      this.okButton.Size = new System.Drawing.Size(75, 23);
     
    8583      // pluginListView
    8684      //
    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;
    9089      this.pluginListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    9190            this.pluginNameColumnHeader,
    9291            this.pluginVersionColumnHeader,
    9392            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;
    9599      this.pluginListView.Name = "pluginListView";
    96100      this.pluginListView.ShowGroups = false;
    97       this.pluginListView.Size = new System.Drawing.Size(589, 201);
     101      this.pluginListView.Size = new System.Drawing.Size(303, 514);
    98102      this.pluginListView.SmallImageList = this.imageList;
    99103      this.pluginListView.Sorting = System.Windows.Forms.SortOrder.Ascending;
    100104      this.pluginListView.TabIndex = 0;
     105      this.pluginListView.TileSize = new System.Drawing.Size(300, 60);
    101106      this.pluginListView.UseCompatibleStateImageBehavior = false;
    102       this.pluginListView.View = System.Windows.Forms.View.Details;
     107      this.pluginListView.View = System.Windows.Forms.View.Tile;
    103108      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);
    104111      //
    105112      // pluginNameColumnHeader
     
    121128      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
    122129      //
    123       // pictureBox
    124       //
    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       // label
    133       //
    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       // label1
    142       //
    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       // label3
    151       //
    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       //
    159130      // productTextBox
    160131      //
     
    162133      this.productTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
    163134      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);
    165136      this.productTextBox.Name = "productTextBox";
    166137      this.productTextBox.ReadOnly = true;
     
    169140      this.productTextBox.Text = "HeuristicLab";
    170141      //
    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);
    220169      //
    221170      // label2
    222171      //
    223172      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);
    225175      this.label2.Name = "label2";
    226176      this.label2.Size = new System.Drawing.Size(49, 13);
     
    230180      // panel1
    231181      //
    232       this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
    233                   | System.Windows.Forms.AnchorStyles.Right)));
     182      this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
     183            | System.Windows.Forms.AnchorStyles.Right)));
    234184      this.panel1.BackColor = System.Drawing.SystemColors.Control;
    235185      this.panel1.Controls.Add(this.okButton);
    236186      this.panel1.Location = new System.Drawing.Point(0, 538);
    237187      this.panel1.Name = "panel1";
    238       this.panel1.Size = new System.Drawing.Size(626, 48);
     188      this.panel1.Size = new System.Drawing.Size(888, 48);
    239189      this.panel1.TabIndex = 0;
    240190      //
     
    242192      //
    243193      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);
    245196      this.label4.Name = "label4";
    246197      this.label4.Size = new System.Drawing.Size(47, 13);
     
    251202      //
    252203      this.webLinkLabel.AutoSize = true;
    253       this.webLinkLabel.Location = new System.Drawing.Point(255, 69);
     204      this.webLinkLabel.Location = new System.Drawing.Point(84, 60);
    254205      this.webLinkLabel.Name = "webLinkLabel";
    255206      this.webLinkLabel.Size = new System.Drawing.Size(135, 13);
     
    262213      //
    263214      this.mailLinkLabel.AutoSize = true;
    264       this.mailLinkLabel.Location = new System.Drawing.Point(255, 88);
     215      this.mailLinkLabel.Location = new System.Drawing.Point(84, 79);
    265216      this.mailLinkLabel.Name = "mailLinkLabel";
    266217      this.mailLinkLabel.Size = new System.Drawing.Size(129, 13);
     
    270221      this.mailLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.mailLinkLabel_LinkClicked);
    271222      //
    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
    273286      //
    274287      this.AcceptButton = this.okButton;
    275       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    276288      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    277289      this.BackColor = System.Drawing.SystemColors.Window;
    278290      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);
    283294      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;
    295296      this.MaximizeBox = false;
    296297      this.MinimizeBox = false;
    297       this.Name = "AboutDialog";
     298      this.Name = "PluginInformationDialog";
    298299      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";
    302301      this.panel1.ResumeLayout(false);
     302      this.panel2.ResumeLayout(false);
     303      this.panel2.PerformLayout();
    303304      this.ResumeLayout(false);
    304       this.PerformLayout();
    305305
    306306    }
     
    314314    private System.Windows.Forms.ColumnHeader pluginVersionColumnHeader;
    315315    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;
    320316    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;
    325319    private System.Windows.Forms.Label label2;
    326320    private System.Windows.Forms.Panel panel1;
     
    328322    private System.Windows.Forms.LinkLabel webLinkLabel;
    329323    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;
    330329  }
    331330}
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/PluginInformationDialog.cs

    r13353 r13360  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Drawing;
     25using System.IO;
    2426using System.Linq;
    2527using System.Reflection;
     28using System.Text.RegularExpressions;
    2629using System.Windows.Forms;
    2730
    2831namespace HeuristicLab.PluginInfrastructure.UI {
    2932  /// <summary>
    30   /// Shows product, version and copyright information for HeuristicLab and all plugins.
     33  /// Shows information on all discovered plugins.
    3134  /// </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) {
    3737      InitializeComponent();
    3838      var entryAssembly = Assembly.GetEntryAssembly();
    3939      productTextBox.Text = GetProduct(entryAssembly);
    4040      versionTextBox.Text = entryAssembly.GetFileVersion();
    41       copyrightTextBox.Text = GetCopyright(entryAssembly);
     41      contactTextBox.Text = GetCopyright(entryAssembly);
    4242      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);
    4645      ActiveControl = okButton;
    4746    }
    4847
    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) {
    5949      pluginListView.Items.Clear();
    6050      foreach (var plugin in plugins) {
     
    6656
    6757    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";
    7168      return item;
    7269    }
     
    9188
    9289    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
    9697      }
     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);
    97128    }
    98129
     
    108139      System.Diagnostics.Process.Start("mailto:" + mailLinkLabel.Text);
    109140    }
     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
    110166  }
    111167}
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure.UI/StarterForm.cs

    r13338 r13360  
    3535  /// </summary>
    3636  public partial class StarterForm : Form {
    37     private const string pluginManagerItemName = "Plugin Manager";
     37    private const string pluginManagerItemName = "Plugins";
    3838    // private const string updatePluginsItemName = "Updates Available";
    3939    private const string optimizerItemName = "Optimizer"; // TODO: encoding a specific name of an application here is problematic (applications are discovered dynamically)
     
    100100        ListViewItem selected = applicationsListView.SelectedItems[0];
    101101        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);
    115106            }
     107          } finally {
     108            Cursor = Cursors.Arrow;
    116109          }
    117110        } else {
     
    176169    private void AddPluginManagerItem() {
    177170      pluginManagerListViewItem = new ListViewItem(pluginManagerItemName, 0);
    178       pluginManagerListViewItem.Group = applicationsListView.Groups["Plugin Management"];
     171      pluginManagerListViewItem.Group = applicationsListView.Groups["Plugin Information"];
    179172      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";
    182175
    183176      applicationsListView.Items.Add(pluginManagerListViewItem);
Note: See TracChangeset for help on using the changeset viewer.