Changeset 3600


Ignore:
Timestamp:
05/03/10 19:15:41 (12 years ago)
Author:
gkronber
Message:

Implemented reviewer comments in plugin infrastructure. #989 (Implement review comments in plugin infrastructure)

Location:
trunk/sources/HeuristicLab.PluginInfrastructure
Files:
3 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/InstallationManagerForm.Designer.cs

    r3573 r3600  
    6363      this.logTextBox = new System.Windows.Forms.TextBox();
    6464      this.menuStrip = new System.Windows.Forms.MenuStrip();
    65       this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    66       this.simpleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    67       this.advancedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    6865      this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    6966      this.connectionSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     
    119116      this.tabControl.Size = new System.Drawing.Size(598, 392);
    120117      this.tabControl.TabIndex = 16;
    121       this.tabControl.Selected += new System.Windows.Forms.TabControlEventHandler(this.tabControl_Selected);
    122118      //
    123119      // updateAllPluginsTabPage
     
    272268      //
    273269      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    274             this.viewToolStripMenuItem,
    275270            this.optionsToolStripMenuItem});
    276271      this.menuStrip.Location = new System.Drawing.Point(0, 0);
     
    279274      this.menuStrip.TabIndex = 17;
    280275      this.menuStrip.Text = "menuStrip1";
    281       //
    282       // viewToolStripMenuItem
    283       //
    284       this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
    285             this.simpleToolStripMenuItem,
    286             this.advancedToolStripMenuItem});
    287       this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
    288       this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
    289       this.viewToolStripMenuItem.Text = "View";
    290       this.viewToolStripMenuItem.Visible = false;
    291       //
    292       // simpleToolStripMenuItem
    293       //
    294       this.simpleToolStripMenuItem.Checked = true;
    295       this.simpleToolStripMenuItem.CheckOnClick = true;
    296       this.simpleToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
    297       this.simpleToolStripMenuItem.Name = "simpleToolStripMenuItem";
    298       this.simpleToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
    299       this.simpleToolStripMenuItem.Text = "Show Most Recent Plugins";
    300       this.simpleToolStripMenuItem.Click += new System.EventHandler(this.simpleToolStripMenuItem_Click);
    301       //
    302       // advancedToolStripMenuItem
    303       //
    304       this.advancedToolStripMenuItem.CheckOnClick = true;
    305       this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem";
    306       this.advancedToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
    307       this.advancedToolStripMenuItem.Text = "Show All Plugins";
    308       this.advancedToolStripMenuItem.Click += new System.EventHandler(this.advancedToolStripMenuItem_Click);
    309276      //
    310277      // optionsToolStripMenuItem
     
    365332    private System.Windows.Forms.TextBox logTextBox;
    366333    private System.Windows.Forms.MenuStrip menuStrip;
    367     private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
    368     private System.Windows.Forms.ToolStripMenuItem simpleToolStripMenuItem;
    369     private System.Windows.Forms.ToolStripMenuItem advancedToolStripMenuItem;
    370334    private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
    371335    private System.Windows.Forms.ToolStripMenuItem connectionSettingsToolStripMenuItem;
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/InstallationManagerForm.cs

    r3573 r3600  
    2929using System.IO;
    3030using HeuristicLab.PluginInfrastructure.Manager;
     31using System.Diagnostics;
    3132
    3233namespace HeuristicLab.PluginInfrastructure.Advanced {
     
    3839    public InstallationManagerForm(PluginManager pluginManager) {
    3940      InitializeComponent();
    40       Text = "HeuristicLab Plugin Manager " + GetType().Assembly.GetName().Version.ToString();
     41      FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
     42      Text = "HeuristicLab Plugin Manager " + pluginInfrastructureVersion.FileVersion;
    4143     
    4244      this.pluginManager = pluginManager;
     
    138140      new ConnectionSetupView().ShowDialog();
    139141    }
    140 
    141     private void tabControl_Selected(object sender, TabControlEventArgs e) {
    142       viewToolStripMenuItem.Visible = e.TabPage == availablePluginsTabPage;
    143       toolStripStatusLabel.Text = string.Empty;
    144       toolStripProgressBar.Visible = false;
    145     }
    146 
    147     private void simpleToolStripMenuItem_Click(object sender, EventArgs e) {
    148       remotePluginInstaller.ShowAllPlugins = false;
    149       advancedToolStripMenuItem.Checked = false;
    150     }
    151 
    152     private void advancedToolStripMenuItem_Click(object sender, EventArgs e) {
    153       remotePluginInstaller.ShowAllPlugins = true;
    154       simpleToolStripMenuItem.Checked = false;
    155     }
    156142    #endregion
    157143
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/LocalPluginsView.cs

    r3547 r3600  
    156156      removeButton.Enabled = localPluginsListView.CheckedItems.Count > 0;
    157157      updateSelectedButton.Enabled = localPluginsListView.CheckedItems.Count > 0;
     158      foreach (ColumnHeader column in localPluginsListView.Columns) {
     159        if (localPluginsListView.Items.Count > 0)
     160          column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     161        else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     162      }
    158163    }
    159164
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/PluginEditor.cs

    r3547 r3600  
    9797        }
    9898        foreach (ColumnHeader column in listView.Columns)
    99           column.Width = -1;
     99          if (listView.Items.Count > 0)
     100            column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     101          else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
    100102        //listView.suppressCheckedEvents = false;
    101103        listView.CheckBoxes = true;
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/PluginListView.cs

    r3474 r3600  
    7474        }
    7575        foreach (ColumnHeader column in listView.Columns)
    76           column.Width = -1;
     76          column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     77
    7778        listView.SuppressItemCheckedEvents = false;
    7879      }
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/PluginView.cs

    r3573 r3600  
    8989        filesListView.Items.Add(fileItem);
    9090      }
     91      foreach (ColumnHeader column in dependenciesListView.Columns) {
     92        if (dependenciesListView.Items.Count > 0)
     93          column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     94        else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     95      }
     96      foreach (ColumnHeader column in filesListView.Columns) {
     97        if (filesListView.Items.Count > 0)
     98          column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     99        else
     100          column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     101      }
    91102      licenseButton.Enabled = !string.IsNullOrEmpty(plugin.LicenseText);
    92103    }
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/RemotePluginInstaller.cs

    r3547 r3600  
    229229        }
    230230      }
     231      foreach (ColumnHeader column in remotePluginsListView.Columns)
     232        if (remotePluginsListView.Items.Count > 0)
     233          column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     234        else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     235
    231236      remotePluginsListView.SuppressItemCheckedEvents = false;
    232237    }
  • trunk/sources/HeuristicLab.PluginInfrastructure/Starter/StarterForm.Designer.cs

    r3573 r3600  
    4747      this.components = new System.ComponentModel.Container();
    4848      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StarterForm));
    49       System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("Applications", System.Windows.Forms.HorizontalAlignment.Left);
    50       System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("Plugin Management", System.Windows.Forms.HorizontalAlignment.Left);
     49      System.Windows.Forms.ListViewGroup listViewGroup3 = new System.Windows.Forms.ListViewGroup("Applications", System.Windows.Forms.HorizontalAlignment.Left);
     50      System.Windows.Forms.ListViewGroup listViewGroup4 = new System.Windows.Forms.ListViewGroup("Plugin Management", System.Windows.Forms.HorizontalAlignment.Left);
    5151      this.startButton = new System.Windows.Forms.Button();
    5252      this.largeImageList = new System.Windows.Forms.ImageList(this.components);
     
    5757      this.smallImageList = new System.Windows.Forms.ImageList(this.components);
    5858      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    59       this.showListButton = new System.Windows.Forms.RadioButton();
     59      this.showLargeIconsButton = new System.Windows.Forms.RadioButton();
    6060      this.showDetailsButton = new System.Windows.Forms.RadioButton();
    61       this.groupBox = new System.Windows.Forms.GroupBox();
    62       this.groupBox.SuspendLayout();
    6361      this.SuspendLayout();
    6462      //
     
    6765      this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    6866      this.startButton.Enabled = false;
    69       this.startButton.Location = new System.Drawing.Point(579, 507);
     67      this.startButton.Location = new System.Drawing.Point(579, 511);
    7068      this.startButton.Name = "startButton";
    7169      this.startButton.Size = new System.Drawing.Size(75, 23);
     
    9189            this.versionColumnHeader,
    9290            this.descriptionColumnHeader});
    93       listViewGroup1.Header = "Applications";
    94       listViewGroup1.Name = "Applications";
    95       listViewGroup2.Header = "Plugin Management";
    96       listViewGroup2.Name = "Plugin Management";
     91      listViewGroup3.Header = "Applications";
     92      listViewGroup3.Name = "Applications";
     93      listViewGroup4.Header = "Plugin Management";
     94      listViewGroup4.Name = "Plugin Management";
    9795      this.applicationsListView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
    98             listViewGroup1,
    99             listViewGroup2});
     96            listViewGroup3,
     97            listViewGroup4});
    10098      this.applicationsListView.LargeImageList = this.largeImageList;
    10199      this.applicationsListView.Location = new System.Drawing.Point(12, 12);
     
    103101      this.applicationsListView.Name = "applicationsListView";
    104102      this.applicationsListView.ShowItemToolTips = true;
    105       this.applicationsListView.Size = new System.Drawing.Size(642, 479);
     103      this.applicationsListView.Size = new System.Drawing.Size(642, 493);
    106104      this.applicationsListView.SmallImageList = this.smallImageList;
    107       this.applicationsListView.TabIndex = 2;
     105      this.applicationsListView.TabIndex = 0;
    108106      this.applicationsListView.UseCompatibleStateImageBehavior = false;
    109107      this.applicationsListView.ItemActivate += new System.EventHandler(this.applicationsListView_ItemActivate);
     
    130128      this.smallImageList.Images.SetKeyName(0, "HeuristicLab.ico");
    131129      //
    132       // showListButton
     130      // showLargeIconsButton
    133131      //
    134       this.showListButton.Appearance = System.Windows.Forms.Appearance.Button;
    135       this.showListButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.show_icons;
    136       this.showListButton.Location = new System.Drawing.Point(6, 9);
    137       this.showListButton.Name = "showListButton";
    138       this.showListButton.Size = new System.Drawing.Size(25, 25);
    139       this.showListButton.TabIndex = 3;
    140       this.showListButton.TabStop = true;
    141       this.toolTip.SetToolTip(this.showListButton, "Show List");
    142       this.showListButton.UseVisualStyleBackColor = true;
    143       this.showListButton.Click += new System.EventHandler(this.largeIconsButton_Click);
     132      this.showLargeIconsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     133      this.showLargeIconsButton.Appearance = System.Windows.Forms.Appearance.Button;
     134      this.showLargeIconsButton.Checked = true;
     135      this.showLargeIconsButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.show_icons;
     136      this.showLargeIconsButton.Location = new System.Drawing.Point(12, 511);
     137      this.showLargeIconsButton.Name = "showLargeIconsButton";
     138      this.showLargeIconsButton.Size = new System.Drawing.Size(23, 23);
     139      this.showLargeIconsButton.TabIndex = 2;
     140      this.toolTip.SetToolTip(this.showLargeIconsButton, "Show Large Icons");
     141      this.showLargeIconsButton.UseVisualStyleBackColor = false;
     142      this.showLargeIconsButton.Click += new System.EventHandler(this.largeIconsButton_Click);
    144143      //
    145144      // showDetailsButton
    146145      //
     146      this.showDetailsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    147147      this.showDetailsButton.Appearance = System.Windows.Forms.Appearance.Button;
    148148      this.showDetailsButton.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.show_details;
    149       this.showDetailsButton.Location = new System.Drawing.Point(37, 9);
     149      this.showDetailsButton.Location = new System.Drawing.Point(41, 511);
    150150      this.showDetailsButton.Name = "showDetailsButton";
    151       this.showDetailsButton.Size = new System.Drawing.Size(25, 25);
    152       this.showDetailsButton.TabIndex = 4;
    153       this.showDetailsButton.TabStop = true;
     151      this.showDetailsButton.Size = new System.Drawing.Size(23, 23);
     152      this.showDetailsButton.TabIndex = 3;
    154153      this.toolTip.SetToolTip(this.showDetailsButton, "Show Details");
    155       this.showDetailsButton.UseVisualStyleBackColor = true;
     154      this.showDetailsButton.UseVisualStyleBackColor = false;
    156155      this.showDetailsButton.Click += new System.EventHandler(this.detailsButton_Click);
    157       //
    158       // groupBox
    159       //
    160       this.groupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    161       this.groupBox.Controls.Add(this.showListButton);
    162       this.groupBox.Controls.Add(this.showDetailsButton);
    163       this.groupBox.Location = new System.Drawing.Point(12, 497);
    164       this.groupBox.Name = "groupBox";
    165       this.groupBox.Size = new System.Drawing.Size(68, 37);
    166       this.groupBox.TabIndex = 5;
    167       this.groupBox.TabStop = false;
    168156      //
    169157      // StarterForm
     
    172160      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    173161      this.ClientSize = new System.Drawing.Size(666, 546);
    174       this.Controls.Add(this.groupBox);
     162      this.Controls.Add(this.showDetailsButton);
     163      this.Controls.Add(this.showLargeIconsButton);
    175164      this.Controls.Add(this.applicationsListView);
    176165      this.Controls.Add(this.startButton);
     
    179168      this.Text = "HeuristicLab Starter";
    180169      this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
    181       this.groupBox.ResumeLayout(false);
    182170      this.ResumeLayout(false);
    183171
     
    194182    private System.Windows.Forms.ImageList smallImageList;
    195183    private System.Windows.Forms.ToolTip toolTip;
    196     private System.Windows.Forms.RadioButton showListButton;
     184    private System.Windows.Forms.RadioButton showLargeIconsButton;
    197185    private System.Windows.Forms.RadioButton showDetailsButton;
    198     private System.Windows.Forms.GroupBox groupBox;
    199186  }
    200187}
  • trunk/sources/HeuristicLab.PluginInfrastructure/Starter/StarterForm.cs

    r3573 r3600  
    5454      : base() {
    5555      InitializeComponent();
    56       Text = "HeuristicLab " + this.GetType().Assembly.GetName().Version;
     56      FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
     57      Text = "HeuristicLab " + pluginInfrastructureVersion.FileVersion;
    5758
    5859      string pluginPath = Path.GetFullPath(Application.StartupPath);
     
    113114    private void UpdateApplicationsList() {
    114115      applicationsListView.Items.Clear();
    115 
     116      FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
    116117      pluginManagerListViewItem = new ListViewItem("Plugin Manager", 0);
    117118      pluginManagerListViewItem.Group = applicationsListView.Groups["Plugin Management"];
    118       pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, GetType().Assembly.GetName().Version.ToString()));
     119      pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, pluginInfrastructureVersion.FileVersion));
    119120      pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, "Install, upgrade or delete plugins"));
    120121      pluginManagerListViewItem.ToolTipText = "Install, upgrade or delete plugins";
     
    130131        item.ToolTipText = info.Description;
    131132        applicationsListView.Items.Add(item);
     133      }
     134      foreach (ColumnHeader column in applicationsListView.Columns) {
     135        if (applicationsListView.Items.Count > 0)
     136          column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     137        else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
    132138      }
    133139    }
     
    165171    private void detailsButton_Click(object sender, EventArgs e) {
    166172      applicationsListView.View = View.Details;
     173      foreach (ColumnHeader column in applicationsListView.Columns) {
     174        if (applicationsListView.Items.Count > 0)
     175          column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     176        else column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     177      }
    167178    }
    168179
  • trunk/sources/HeuristicLab.PluginInfrastructure/Starter/StarterForm.resx

    r3573 r3600  
    213213</value>
    214214  </data>
     215  <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     216    <value>274, 17</value>
     217  </metadata>
    215218  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    216219  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Note: See TracChangeset for help on using the changeset viewer.