Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/24/10 19:33:44 (14 years ago)
Author:
gkronber
Message:

Implemented changes in plugin administrator UI as requested by swagner. #949 (Overhaul look and feel of plugin administrator)

Location:
trunk/sources/HeuristicLab.PluginAdministrator/3.3
Files:
10 edited
2 copied
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/ConnectionPropertiesAction.cs

    r3206 r3208  
    2626
    2727namespace HeuristicLab.PluginAdministrator {
    28   internal static class EditConnectionAction {
     28  internal static class ConnectionPropertiesAction {
    2929    internal static void Execute(IMainForm mainForm) {
    30       ConnectionSetupView connectionSetup = new ConnectionSetupView();
    31       connectionSetup.Show();
     30      ConnectionPropertiesView connectionPropertiesView = new ConnectionPropertiesView();
     31      connectionPropertiesView.Show();
    3232    }
    3333  }
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/ConnectionPropertiesMenuItem.cs

    r3206 r3208  
    2626
    2727namespace HeuristicLab.PluginAdministrator {
    28   internal class EditConnectionMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IUserInterfaceItemProvider {
     28  internal class ConnectionPropertiesMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IUserInterfaceItemProvider {
    2929    public override string Name {
    30       get { return "Edit Connection Properties"; }
     30      get { return "Connection Properties"; }
    3131    }
    3232
    3333    public override IEnumerable<string> Structure {
    34       get { return new string[] { "Plugin Server" }; }
     34      get { return new string[] { "Settings" }; }
    3535    }
    3636
    3737    public override int Position {
    38       get { return 1300; }
     38      get { return 2100; }
    3939    }
    4040
    4141    public override void Execute() {
    42       EditConnectionAction.Execute(MainFormManager.MainForm);
     42      ConnectionPropertiesAction.Execute(MainFormManager.MainForm);
    4343    }
    4444  }
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/ConnectionPropertiesView.Designer.cs

    r3206 r3208  
    2020#endregion
    2121namespace HeuristicLab.PluginAdministrator {
    22   partial class ConnectionSetupView {
     22  partial class ConnectionPropertiesView {
    2323    /// <summary>
    2424    /// Required designer variable.
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/ConnectionPropertiesView.cs

    r3206 r3208  
    2929
    3030namespace HeuristicLab.PluginAdministrator {
    31   internal partial class ConnectionSetupView : HeuristicLab.MainForm.WindowsForms.View {
    32     public ConnectionSetupView() {
     31  internal partial class ConnectionPropertiesView : HeuristicLab.MainForm.WindowsForms.View {
     32    public ConnectionPropertiesView() {
    3333      InitializeComponent();
    34       Caption = "Edit Connection Settings";
     34      Caption = "Connection Properties";
    3535      updateAddressTextBox.Text = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocation;
    3636      adminAddressTextBox.Text = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationAdministrationAddress;
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/EditProductsAction.cs

    r3206 r3208  
    2727
    2828namespace HeuristicLab.PluginAdministrator {
    29   internal static class OpenProductEditorAction {
     29  internal static class EditProductsAction {
    3030    internal static void Execute(IMainForm mainForm) {
    31       ProductEditor editor = new ProductEditor();
    32       editor.Show();
     31      if (mainForm.Views.Any(x => x is ProductEditor)) {
     32        mainForm.Views.First(x => x is ProductEditor).Show();
     33      } else {
     34        ProductEditor editor = new ProductEditor();
     35        editor.Show();
     36      }
    3337    }
    3438  }
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/EditProductsMenuItem.cs

    r3206 r3208  
    2727
    2828namespace HeuristicLab.PluginAdministrator {
    29   internal class OpenServerProductsEditorMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IUserInterfaceItemProvider {
     29  internal class EditProductsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IUserInterfaceItemProvider {
    3030    public override string Name {
    3131      get { return "Edit Products"; }
     
    3333
    3434    public override IEnumerable<string> Structure {
    35       get { return new string[] { "Plugin Server" }; }
     35      get { return new string[] { "Views" }; }
    3636    }
    3737
    3838    public override int Position {
    39       get { return 1300; }
     39      get { return 1200; }
    4040    }
    4141
    4242    public override void Execute() {
    43       OpenProductEditorAction.Execute(MainFormManager.MainForm);
     43      EditProductsAction.Execute(MainFormManager.MainForm);
    4444    }
    4545  }
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/HeuristicLab.PluginAdministrator-3.3.csproj

    r3081 r3208  
    9292  </ItemGroup>
    9393  <ItemGroup>
    94     <Compile Include="ConnectionSetupView.cs">
    95       <SubType>UserControl</SubType>
    96     </Compile>
    97     <Compile Include="ConnectionSetupView.Designer.cs">
    98       <DependentUpon>ConnectionSetupView.cs</DependentUpon>
    99     </Compile>
    100     <Compile Include="EditConnectionAction.cs" />
    101     <Compile Include="EditConnectionMenuItem.cs" />
     94    <Compile Include="ConnectionPropertiesAction.cs" />
     95    <Compile Include="ConnectionPropertiesMenuItem.cs" />
     96    <Compile Include="ConnectionPropertiesView.cs">
     97      <SubType>UserControl</SubType>
     98    </Compile>
     99    <Compile Include="ConnectionPropertiesView.Designer.cs">
     100      <DependentUpon>ConnectionPropertiesView.cs</DependentUpon>
     101    </Compile>
     102    <Compile Include="EditProductsAction.cs" />
     103    <Compile Include="EditProductsMenuItem.cs" />
    102104    <Compile Include="HeuristicLabPluginAdministratorApplication.cs" />
    103105    <Compile Include="HeuristicLabPluginAdministratorPlugin.cs" />
     
    144146      <DependentUpon>ProductEditor.cs</DependentUpon>
    145147    </Compile>
    146     <Compile Include="OpenProductEditorAction.cs" />
    147     <Compile Include="OpenServerProductsEditMenuItem.cs" />
    148148    <Compile Include="IUserInterfaceItemProvider.cs" />
    149149    <Compile Include="MainForm.cs">
     
    151151    </Compile>
    152152    <Compile Include="Properties\AssemblyInfo.cs" />
     153    <Compile Include="UploadPluginsAction.cs" />
     154    <Compile Include="UploadPluginsMenuItem.cs" />
    153155  </ItemGroup>
    154156  <ItemGroup>
     
    174176  </ItemGroup>
    175177  <ItemGroup>
    176     <EmbeddedResource Include="ConnectionSetupView.resx">
    177       <DependentUpon>ConnectionSetupView.cs</DependentUpon>
     178    <EmbeddedResource Include="ConnectionPropertiesView.resx">
     179      <DependentUpon>ConnectionPropertiesView.cs</DependentUpon>
    178180    </EmbeddedResource>
    179181    <EmbeddedResource Include="LicenseView.resx">
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/MainForm.cs

    r3179 r3208  
    3333      : base(type) {
    3434      InitializeComponent();
     35      this.Controls.Remove(toolStrip);
     36      this.statusStrip.Items.Add(progressBar);
     37      this.statusStrip.Items.Add(statusLabel);
    3538    }
    3639
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/PluginEditor.Designer.cs

    r3081 r3208  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.components = new System.ComponentModel.Container();
    48       this.imageList = new System.Windows.Forms.ImageList(this.components);
    4947      this.refreshButton = new System.Windows.Forms.Button();
    5048      this.uploadButton = new System.Windows.Forms.Button();
    51       this.listView = new MultiSelectListView();
     49      this.listView = new HeuristicLab.PluginAdministrator.MultiSelectListView();
    5250      this.pluginNameHeader = new System.Windows.Forms.ColumnHeader();
    5351      this.localVersionHeader = new System.Windows.Forms.ColumnHeader();
     
    5553      this.descriptionHeader = new System.Windows.Forms.ColumnHeader();
    5654      this.SuspendLayout();
    57       //
    58       // imageList
    59       //
    60       this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
    61       this.imageList.ImageSize = new System.Drawing.Size(16, 16);
    62       this.imageList.TransparentColor = System.Drawing.Color.Transparent;
    6355      //
    6456      // refreshButton
     
    9789      this.listView.Name = "listView";
    9890      this.listView.Size = new System.Drawing.Size(536, 444);
    99       this.listView.StateImageList = this.imageList;
    10091      this.listView.SuppressItemCheckedEvents = false;
    10192      this.listView.TabIndex = 8;
     
    10899      //
    109100      this.pluginNameHeader.Text = "Name";
    110       this.pluginNameHeader.Width = 161;
     101      this.pluginNameHeader.Width = 40;
    111102      //
    112103      // localVersionHeader
    113104      //
    114105      this.localVersionHeader.Text = "Local Version";
    115       this.localVersionHeader.Width = 85;
     106      this.localVersionHeader.Width = 76;
    116107      //
    117108      // serverVersionHeader
    118109      //
    119110      this.serverVersionHeader.Text = "Server Version";
    120       this.serverVersionHeader.Width = 91;
     111      this.serverVersionHeader.Width = 81;
    121112      //
    122113      // descriptionHeader
    123114      //
    124115      this.descriptionHeader.Text = "Description";
    125       this.descriptionHeader.Width = 194;
     116      this.descriptionHeader.Width = 335;
    126117      //
    127118      // PluginEditor
     
    142133    private System.Windows.Forms.Button refreshButton;
    143134    private System.Windows.Forms.Button uploadButton;
    144     private System.Windows.Forms.ImageList imageList;
    145135    private MultiSelectListView listView;
    146136    private System.Windows.Forms.ColumnHeader pluginNameHeader;
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/PluginEditor.cs

    r3179 r3208  
    4444    public PluginEditor() {
    4545      InitializeComponent();
    46       imageList.Images.Add(HeuristicLab.Common.Resources.VS2008ImageLibrary.Assembly);
    47       imageList.Images.Add(HeuristicLab.Common.Resources.VS2008ImageLibrary.ArrowUp);
    48       Caption = "Plugins";
     46      Caption = "Upload Plugins";
    4947
    5048      localAndServerPlugins = new Dictionary<IPluginDescription, PluginDeploymentService.PluginDescription>();
     
    8886          listView.Items.Add(item);
    8987        }
     88        foreach (ColumnHeader column in listView.Columns)
     89          column.Width = -1;
    9090        //listView.suppressCheckedEvents = false;
    9191        listView.CheckBoxes = true;
     
    160160        pluginUploadWorker.RunWorkerAsync(selectedPlugins.ToList());
    161161      }
    162     }
    163 
    164     private void connectButton_Click(object sender, EventArgs e) {
    165       var connectionSetupView = new ConnectionSetupView();
    166       connectionSetupView.Show();
    167162    }
    168163
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/PluginEditor.resx

    r3072 r3208  
    118118    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    119119  </resheader>
    120   <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    121     <value>17, 17</value>
    122   </metadata>
    123120</root>
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/PluginListView.Designer.cs

    r3081 r3208  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.listView = new MultiSelectListView();
     47      this.listView = new HeuristicLab.PluginAdministrator.MultiSelectListView();
    4848      this.nameHeader = new System.Windows.Forms.ColumnHeader();
    4949      this.versionHeader = new System.Windows.Forms.ColumnHeader();
     
    6060      this.listView.Name = "listView";
    6161      this.listView.Size = new System.Drawing.Size(341, 320);
     62      this.listView.SuppressItemCheckedEvents = false;
    6263      this.listView.TabIndex = 1;
    6364      this.listView.UseCompatibleStateImageBehavior = false;
     
    6869      //
    6970      this.nameHeader.Text = "Name";
     71      this.nameHeader.Width = 40;
    7072      //
    7173      // versionHeader
    7274      //
    7375      this.versionHeader.Text = "Version";
     76      this.versionHeader.Width = 297;
    7477      //
    7578      // PluginListView
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/PluginListView.cs

    r3179 r3208  
    7373          listView.Items.Add(CreateListViewItem(plugin));
    7474        }
     75        foreach (ColumnHeader column in listView.Columns)
     76          column.Width = -1;
    7577        listView.SuppressItemCheckedEvents = false;
    7678      }
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/PluginView.Designer.cs

    r3081 r3208  
    165165      //
    166166      this.pluginNameHeader.Text = "Name";
    167       this.pluginNameHeader.Width = 200;
     167      this.pluginNameHeader.Width = 40;
    168168      //
    169169      // pluginVersionHeader
    170170      //
    171171      this.pluginVersionHeader.Text = "Version";
    172       this.pluginVersionHeader.Width = 120;
     172      this.pluginVersionHeader.Width = 288;
    173173      //
    174174      // imageList
     
    181181      //
    182182      this.filesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    183             this.fileNameHeader,
    184             this.fileTypeHeader});
     183            this.fileTypeHeader,
     184            this.fileNameHeader});
    185185      this.filesListView.Dock = System.Windows.Forms.DockStyle.Fill;
    186186      this.filesListView.Location = new System.Drawing.Point(3, 16);
     
    195195      //
    196196      this.fileNameHeader.Text = "Name";
    197       this.fileNameHeader.Width = 200;
     197      this.fileNameHeader.Width = 289;
    198198      //
    199199      // fileTypeHeader
    200200      //
    201201      this.fileTypeHeader.Text = "Type";
    202       this.fileTypeHeader.Width = 120;
     202      this.fileTypeHeader.Width = 36;
    203203      //
    204204      // filesGroupBox
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/ProductEditor.Designer.cs

    r3179 r3208  
    4747      this.components = new System.ComponentModel.Container();
    4848      this.refreshButton = new System.Windows.Forms.Button();
    49       this.saveButton = new System.Windows.Forms.Button();
     49      this.uploadButton = new System.Windows.Forms.Button();
    5050      this.newProductButton = new System.Windows.Forms.Button();
    5151      this.splitContainer = new System.Windows.Forms.SplitContainer();
     52      this.productsGroupBox = new System.Windows.Forms.GroupBox();
    5253      this.productsListView = new System.Windows.Forms.ListView();
    5354      this.productNameHeader = new System.Windows.Forms.ColumnHeader();
    5455      this.productVersionHeader = new System.Windows.Forms.ColumnHeader();
    5556      this.productImageList = new System.Windows.Forms.ImageList(this.components);
     57      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
     58      this.pluginsGroupBox = new System.Windows.Forms.GroupBox();
    5659      this.pluginListView = new HeuristicLab.PluginAdministrator.PluginListView();
    57       this.pluginsLabel = new System.Windows.Forms.Label();
    5860      this.versionTextBox = new System.Windows.Forms.TextBox();
     61      this.nameLabel = new System.Windows.Forms.Label();
     62      this.nameTextBox = new System.Windows.Forms.TextBox();
    5963      this.versionLabel = new System.Windows.Forms.Label();
    60       this.nameTextBox = new System.Windows.Forms.TextBox();
    61       this.nameLabel = new System.Windows.Forms.Label();
    6264      this.pluginImageList = new System.Windows.Forms.ImageList(this.components);
    6365      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     
    6567      this.splitContainer.Panel2.SuspendLayout();
    6668      this.splitContainer.SuspendLayout();
     69      this.productsGroupBox.SuspendLayout();
     70      this.detailsGroupBox.SuspendLayout();
     71      this.pluginsGroupBox.SuspendLayout();
    6772      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    6873      this.SuspendLayout();
     
    7075      // refreshButton
    7176      //
    72       this.refreshButton.Location = new System.Drawing.Point(3, 3);
     77      this.refreshButton.Location = new System.Drawing.Point(6, 19);
    7378      this.refreshButton.Name = "refreshButton";
    7479      this.refreshButton.Size = new System.Drawing.Size(75, 23);
     
    7883      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
    7984      //
    80       // saveButton
    81       //
    82       this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    83       this.saveButton.Enabled = false;
    84       this.saveButton.Location = new System.Drawing.Point(3, 365);
    85       this.saveButton.Name = "saveButton";
    86       this.saveButton.Size = new System.Drawing.Size(96, 23);
    87       this.saveButton.TabIndex = 2;
    88       this.saveButton.Text = "Upload Products";
    89       this.saveButton.UseVisualStyleBackColor = true;
    90       this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
     85      // uploadButton
     86      //
     87      this.uploadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     88      this.uploadButton.Enabled = false;
     89      this.uploadButton.Location = new System.Drawing.Point(6, 397);
     90      this.uploadButton.Name = "uploadButton";
     91      this.uploadButton.Size = new System.Drawing.Size(96, 23);
     92      this.uploadButton.TabIndex = 2;
     93      this.uploadButton.Text = "Upload Products";
     94      this.uploadButton.UseVisualStyleBackColor = true;
     95      this.uploadButton.Click += new System.EventHandler(this.saveButton_Click);
    9196      //
    9297      // newProductButton
    9398      //
    9499      this.newProductButton.Enabled = false;
    95       this.newProductButton.Location = new System.Drawing.Point(84, 3);
     100      this.newProductButton.Location = new System.Drawing.Point(87, 19);
    96101      this.newProductButton.Name = "newProductButton";
    97102      this.newProductButton.Size = new System.Drawing.Size(91, 23);
     
    103108      // splitContainer
    104109      //
    105       this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    106                   | System.Windows.Forms.AnchorStyles.Left)
    107                   | System.Windows.Forms.AnchorStyles.Right)));
    108       this.splitContainer.Location = new System.Drawing.Point(3, 32);
     110      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     111      this.splitContainer.Location = new System.Drawing.Point(0, 0);
    109112      this.splitContainer.Name = "splitContainer";
    110113      //
    111114      // splitContainer.Panel1
    112115      //
    113       this.splitContainer.Panel1.Controls.Add(this.productsListView);
    114       this.splitContainer.Panel1.Controls.Add(this.saveButton);
     116      this.splitContainer.Panel1.Controls.Add(this.productsGroupBox);
    115117      //
    116118      // splitContainer.Panel2
    117119      //
    118       this.splitContainer.Panel2.Controls.Add(this.pluginListView);
    119       this.splitContainer.Panel2.Controls.Add(this.pluginsLabel);
    120       this.splitContainer.Panel2.Controls.Add(this.versionTextBox);
    121       this.splitContainer.Panel2.Controls.Add(this.versionLabel);
    122       this.splitContainer.Panel2.Controls.Add(this.nameTextBox);
    123       this.splitContainer.Panel2.Controls.Add(this.nameLabel);
    124       this.splitContainer.Size = new System.Drawing.Size(659, 391);
    125       this.splitContainer.SplitterDistance = 319;
     120      this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox);
     121      this.splitContainer.Size = new System.Drawing.Size(665, 426);
     122      this.splitContainer.SplitterDistance = 321;
    126123      this.splitContainer.TabIndex = 4;
     124      //
     125      // productsGroupBox
     126      //
     127      this.productsGroupBox.Controls.Add(this.uploadButton);
     128      this.productsGroupBox.Controls.Add(this.newProductButton);
     129      this.productsGroupBox.Controls.Add(this.productsListView);
     130      this.productsGroupBox.Controls.Add(this.refreshButton);
     131      this.productsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     132      this.productsGroupBox.Location = new System.Drawing.Point(0, 0);
     133      this.productsGroupBox.Name = "productsGroupBox";
     134      this.productsGroupBox.Size = new System.Drawing.Size(321, 426);
     135      this.productsGroupBox.TabIndex = 5;
     136      this.productsGroupBox.TabStop = false;
     137      this.productsGroupBox.Text = "Products";
    127138      //
    128139      // productsListView
     
    136147      this.productsListView.Enabled = false;
    137148      this.productsListView.FullRowSelect = true;
    138       this.productsListView.Location = new System.Drawing.Point(3, 3);
     149      this.productsListView.Location = new System.Drawing.Point(6, 48);
    139150      this.productsListView.MultiSelect = false;
    140151      this.productsListView.Name = "productsListView";
    141       this.productsListView.Size = new System.Drawing.Size(313, 356);
     152      this.productsListView.Size = new System.Drawing.Size(309, 343);
    142153      this.productsListView.SmallImageList = this.productImageList;
    143154      this.productsListView.TabIndex = 4;
     
    149160      //
    150161      this.productNameHeader.Text = "Name";
    151       this.productNameHeader.Width = 150;
     162      this.productNameHeader.Width = 40;
    152163      //
    153164      // productVersionHeader
    154165      //
    155166      this.productVersionHeader.Text = "Version";
    156       this.productVersionHeader.Width = 100;
     167      this.productVersionHeader.Width = 265;
    157168      //
    158169      // productImageList
     
    162173      this.productImageList.TransparentColor = System.Drawing.Color.Transparent;
    163174      //
    164       // pluginListView
    165       //
    166       this.pluginListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     175      // detailsGroupBox
     176      //
     177      this.detailsGroupBox.Controls.Add(this.pluginsGroupBox);
     178      this.detailsGroupBox.Controls.Add(this.versionTextBox);
     179      this.detailsGroupBox.Controls.Add(this.nameLabel);
     180      this.detailsGroupBox.Controls.Add(this.nameTextBox);
     181      this.detailsGroupBox.Controls.Add(this.versionLabel);
     182      this.detailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     183      this.detailsGroupBox.Location = new System.Drawing.Point(0, 0);
     184      this.detailsGroupBox.Name = "detailsGroupBox";
     185      this.detailsGroupBox.Size = new System.Drawing.Size(340, 426);
     186      this.detailsGroupBox.TabIndex = 8;
     187      this.detailsGroupBox.TabStop = false;
     188      this.detailsGroupBox.Text = "Details";
     189      //
     190      // pluginsGroupBox
     191      //
     192      this.pluginsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    167193                  | System.Windows.Forms.AnchorStyles.Left)
    168194                  | System.Windows.Forms.AnchorStyles.Right)));
     195      this.pluginsGroupBox.Controls.Add(this.pluginListView);
     196      this.pluginsGroupBox.Location = new System.Drawing.Point(6, 71);
     197      this.pluginsGroupBox.Name = "pluginsGroupBox";
     198      this.pluginsGroupBox.Size = new System.Drawing.Size(328, 349);
     199      this.pluginsGroupBox.TabIndex = 6;
     200      this.pluginsGroupBox.TabStop = false;
     201      this.pluginsGroupBox.Text = "Plugins";
     202      //
     203      // pluginListView
     204      //
     205      this.pluginListView.Dock = System.Windows.Forms.DockStyle.Fill;
    169206      this.pluginListView.Enabled = false;
    170       this.pluginListView.Location = new System.Drawing.Point(3, 85);
     207      this.pluginListView.Location = new System.Drawing.Point(3, 16);
    171208      this.pluginListView.Name = "pluginListView";
    172209      this.pluginListView.Plugins = null;
    173       this.pluginListView.Size = new System.Drawing.Size(330, 303);
     210      this.pluginListView.Size = new System.Drawing.Size(322, 330);
    174211      this.pluginListView.TabIndex = 7;
    175212      this.pluginListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.pluginListView_ItemChecked);
    176       //
    177       // pluginsLabel
    178       //
    179       this.pluginsLabel.AutoSize = true;
    180       this.pluginsLabel.Location = new System.Drawing.Point(11, 69);
    181       this.pluginsLabel.Name = "pluginsLabel";
    182       this.pluginsLabel.Size = new System.Drawing.Size(44, 13);
    183       this.pluginsLabel.TabIndex = 6;
    184       this.pluginsLabel.Text = "Plugins:";
    185213      //
    186214      // versionTextBox
     
    189217                  | System.Windows.Forms.AnchorStyles.Right)));
    190218      this.versionTextBox.Enabled = false;
    191       this.versionTextBox.Location = new System.Drawing.Point(68, 29);
     219      this.versionTextBox.Location = new System.Drawing.Point(57, 45);
    192220      this.versionTextBox.Name = "versionTextBox";
    193       this.versionTextBox.Size = new System.Drawing.Size(233, 20);
     221      this.versionTextBox.Size = new System.Drawing.Size(277, 20);
    194222      this.versionTextBox.TabIndex = 5;
    195223      this.versionTextBox.TextChanged += new System.EventHandler(this.versionTextBox_TextChanged);
    196224      //
     225      // nameLabel
     226      //
     227      this.nameLabel.AutoSize = true;
     228      this.nameLabel.Enabled = false;
     229      this.nameLabel.Location = new System.Drawing.Point(13, 22);
     230      this.nameLabel.Name = "nameLabel";
     231      this.nameLabel.Size = new System.Drawing.Size(38, 13);
     232      this.nameLabel.TabIndex = 2;
     233      this.nameLabel.Text = "Name:";
     234      //
     235      // nameTextBox
     236      //
     237      this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     238                  | System.Windows.Forms.AnchorStyles.Right)));
     239      this.nameTextBox.Enabled = false;
     240      this.nameTextBox.Location = new System.Drawing.Point(57, 19);
     241      this.nameTextBox.Name = "nameTextBox";
     242      this.nameTextBox.Size = new System.Drawing.Size(277, 20);
     243      this.nameTextBox.TabIndex = 3;
     244      this.nameTextBox.TextChanged += new System.EventHandler(this.nameTextBox_TextChanged);
     245      //
    197246      // versionLabel
    198247      //
    199248      this.versionLabel.AutoSize = true;
    200249      this.versionLabel.Enabled = false;
    201       this.versionLabel.Location = new System.Drawing.Point(10, 32);
     250      this.versionLabel.Location = new System.Drawing.Point(6, 48);
    202251      this.versionLabel.Name = "versionLabel";
    203252      this.versionLabel.Size = new System.Drawing.Size(45, 13);
     
    205254      this.versionLabel.Text = "Version:";
    206255      //
    207       // nameTextBox
    208       //
    209       this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    210                   | System.Windows.Forms.AnchorStyles.Right)));
    211       this.nameTextBox.Enabled = false;
    212       this.nameTextBox.Location = new System.Drawing.Point(68, 3);
    213       this.nameTextBox.Name = "nameTextBox";
    214       this.nameTextBox.Size = new System.Drawing.Size(233, 20);
    215       this.nameTextBox.TabIndex = 3;
    216       this.nameTextBox.TextChanged += new System.EventHandler(this.nameTextBox_TextChanged);
    217       //
    218       // nameLabel
    219       //
    220       this.nameLabel.AutoSize = true;
    221       this.nameLabel.Enabled = false;
    222       this.nameLabel.Location = new System.Drawing.Point(17, 6);
    223       this.nameLabel.Name = "nameLabel";
    224       this.nameLabel.Size = new System.Drawing.Size(38, 13);
    225       this.nameLabel.TabIndex = 2;
    226       this.nameLabel.Text = "Name:";
    227       //
    228256      // pluginImageList
    229257      //
     
    241269      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    242270      this.Controls.Add(this.splitContainer);
    243       this.Controls.Add(this.newProductButton);
    244       this.Controls.Add(this.refreshButton);
    245271      this.Name = "ProductEditor";
    246272      this.Size = new System.Drawing.Size(665, 426);
    247273      this.splitContainer.Panel1.ResumeLayout(false);
    248274      this.splitContainer.Panel2.ResumeLayout(false);
    249       this.splitContainer.Panel2.PerformLayout();
    250275      this.splitContainer.ResumeLayout(false);
     276      this.productsGroupBox.ResumeLayout(false);
     277      this.detailsGroupBox.ResumeLayout(false);
     278      this.detailsGroupBox.PerformLayout();
     279      this.pluginsGroupBox.ResumeLayout(false);
    251280      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    252281      this.ResumeLayout(false);
     
    257286
    258287    private System.Windows.Forms.Button refreshButton;
    259     private System.Windows.Forms.Button saveButton;
     288    private System.Windows.Forms.Button uploadButton;
    260289    private System.Windows.Forms.Button newProductButton;
    261290    private System.Windows.Forms.SplitContainer splitContainer;
    262     private System.Windows.Forms.Label pluginsLabel;
    263291    private System.Windows.Forms.TextBox versionTextBox;
    264292    private System.Windows.Forms.Label versionLabel;
     
    272300    private System.Windows.Forms.ImageList pluginImageList;
    273301    private PluginListView pluginListView;
     302    private System.Windows.Forms.GroupBox productsGroupBox;
     303    private System.Windows.Forms.GroupBox detailsGroupBox;
     304    private System.Windows.Forms.GroupBox pluginsGroupBox;
    274305
    275306  }
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/ProductEditor.cs

    r3179 r3208  
    111111        productsListView.Items.Add(CreateListViewItem(prodDesc));
    112112      }
     113      foreach (ColumnHeader column in productsListView.Columns)
     114        column.Width = -1;
    113115    }
    114116
    115117    private void productsListBox_SelectedIndexChanged(object sender, EventArgs e) {
    116       if (productsListView.SelectedItems.Count == 0) return;
     118      bool productSelected = productsListView.SelectedItems.Count > 0;
     119      detailsGroupBox.Enabled = productSelected;
     120      uploadButton.Enabled = productSelected;
     121      if (productsListView.SelectedItems.Count == 0) {
     122        ClearProductDetails();
     123        return;
     124      }
    117125      PluginDeploymentService.ProductDescription activeProduct = (PluginDeploymentService.ProductDescription)((ListViewItem)productsListView.SelectedItems[0]).Tag;
    118126      UpdateProductDetails(activeProduct);
     127    }
     128
     129    private void ClearProductDetails() {
     130      nameTextBox.Text = string.Empty;
     131      versionTextBox.Text = string.Empty;
     132      pluginListView.Plugins = new IPluginDescription[0];
    119133    }
    120134
     
    134148
    135149    private void SetControlsEnabled(bool enabled) {
    136       saveButton.Enabled = enabled;
     150      uploadButton.Enabled = enabled;
    137151      refreshButton.Enabled = enabled;
    138152      newProductButton.Enabled = enabled;
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/UploadPluginsAction.cs

    r3206 r3208  
    2727
    2828namespace HeuristicLab.PluginAdministrator {
    29   internal static class OpenProductEditorAction {
     29  internal static class UploadPluginsAction {
    3030    internal static void Execute(IMainForm mainForm) {
    31       ProductEditor editor = new ProductEditor();
    32       editor.Show();
     31      if (mainForm.Views.Any(x => x is PluginEditor)) {
     32        mainForm.Views.First(x => x is PluginEditor).Show();
     33      } else {
     34        PluginEditor editor = new PluginEditor();
     35        editor.Show();
     36      }
    3337    }
    3438  }
  • trunk/sources/HeuristicLab.PluginAdministrator/3.3/UploadPluginsMenuItem.cs

    r3206 r3208  
    2727
    2828namespace HeuristicLab.PluginAdministrator {
    29   internal class OpenServerProductsEditorMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IUserInterfaceItemProvider {
     29  internal class UploadPluginsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IUserInterfaceItemProvider {
    3030    public override string Name {
    31       get { return "Edit Products"; }
     31      get { return "Upload Plugins"; }
    3232    }
    3333
    3434    public override IEnumerable<string> Structure {
    35       get { return new string[] { "Plugin Server" }; }
     35      get { return new string[] { "Views" }; }
    3636    }
    3737
    3838    public override int Position {
    39       get { return 1300; }
     39      get { return 1100; }
    4040    }
    4141
    4242    public override void Execute() {
    43       OpenProductEditorAction.Execute(MainFormManager.MainForm);
     43      UploadPluginsAction.Execute(MainFormManager.MainForm);
    4444    }
    4545  }
Note: See TracChangeset for help on using the changeset viewer.